fix detection of iconv implementations which require libdl
[mplayer.git] / configure
blob74cc50463af6dbbd2bad415d46fa803d4e9982d7
1 #! /bin/sh
3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: check the cvs log !
8 # Cleanups all over the place (c) 2001 pl
11 # Guidelines:
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
20 # GOTCHAS:
21 # - config files are currently:
22 # config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
24 #############################################################################
26 # Prevent locale nonsense from breaking basic text processing utils
27 LC_ALL=C
28 export LC_ALL
30 # Prefer these macros to full length text !
31 # These macros only return an error code - NO display is done
32 cc_check() {
33 echo >> "$TMPLOG"
34 cat "$TMPC" >> "$TMPLOG"
35 echo >> "$TMPLOG"
36 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
37 rm -f "$TMPO"
38 ( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
39 TMP="$?"
40 echo >> "$TMPLOG"
41 echo "ldd $TMPO" >> "$TMPLOG"
42 ( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1
43 echo >> "$TMPLOG"
44 return "$TMP"
47 # Display error message, flushes tempfile, exit
48 die () {
49 echo
50 echo "Error: $@" >&2
51 echo >&2
52 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
53 echo "Check \"$TMPLOG\" if you do not understand why it failed."
54 exit 1
57 # OS test booleans functions
58 issystem() {
59 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
61 linux() { issystem "Linux" ; return "$?" ; }
62 sunos() { issystem "SunOS" ; return "$?" ; }
63 hpux() { issystem "HP-UX" ; return "$?" ; }
64 irix() { issystem "IRIX" ; return "$?" ; }
65 cygwin() { issystem "CYGWIN" ; return "$?" ; }
66 freebsd() { issystem "FreeBSD" ; return "$?" ; }
67 netbsd() { issystem "NetBSD" ; return "$?" ; }
68 bsdos() { issystem "BSD/OS" ; return "$?" ; }
69 openbsd() { issystem "OpenBSD" ; return "$?" ; }
70 bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
71 qnx() { issystem "QNX" ; return "$?" ; }
72 darwin() { issystem "Darwin" ; return "$?" ; }
73 gnu() { issystem "GNU" ; return "$?" ; }
74 mingw32() { issystem "MINGW32" ; return "$?" ; }
75 morphos() { issystem "MorphOS" ; return "$?" ; }
76 win32() { cygwin || mingw32 ; return "$?" ; }
77 beos() { issystem "BEOS" ; return "$?" ; }
79 # arch test boolean functions
80 # x86/x86pc is used by QNX
81 x86() {
82 case "$host_arch" in
83 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;;
84 *) return 1 ;;
85 esac
88 ppc() {
89 case "$host_arch" in
90 ppc) return 0;;
91 *) return 1;;
92 esac
95 alpha() {
96 case "$host_arch" in
97 alpha) return 0;;
98 *) return 1;;
99 esac
102 # not boolean test: implement the posix shell "!" operator for a
103 # non-posix /bin/sh.
104 # usage: not {command}
105 # returns exit status "success" when the execution of "command"
106 # fails.
107 not() {
108 eval "$@"
109 test $? -ne 0
112 # Use this before starting a check
113 echocheck() {
114 echo "============ Checking for $@ ============" >> "$TMPLOG"
115 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
118 # Use this to echo the results of a check
119 echores() {
120 echo "Result is: $@" >> "$TMPLOG"
121 echo "##########################################" >> "$TMPLOG"
122 echo "" >> "$TMPLOG"
123 echo "$@"
125 #############################################################################
127 # Check how echo works in this /bin/sh
128 case `echo -n` in
129 -n) _echo_n= _echo_c='\c' ;; # SysV echo
130 *) _echo_n='-n ' _echo_c= ;; # BSD echo
131 esac
133 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"`
135 for parm in "$@" ; do
136 if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
137 cat << EOF
139 Usage: $0 [OPTIONS]...
141 Configuration:
142 -h, --help display this help and exit
144 Installation directories:
145 --prefix=DIR use this prefix for installing mplayer [/usr/local]
146 --bindir=DIR use this prefix for installing mplayer binary
147 [PREFIX/bin]
148 --datadir=DIR use this prefix for installing machine independent
149 data files (fonts, skins) [PREFIX/share/mplayer]
150 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
151 --confdir=DIR use this prefix for installing configuration files
152 [PREFIX/etc/mplayer]
153 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
155 Optional features:
156 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
157 --enable-gui enable gmplayer compilation (GTK 1.2 GUI) [disable]
158 --enable-largefiles enable support for files > 2 GBytes [disable]
159 --enable-linux-devfs set default devices to devfs ones [disable]
160 --enable-termcap use termcap database for key codes [autodetect]
161 --enable-termios use termios database for key codes [autodetect]
162 --disable-iconv do not use iconv(3) function [autodetect]
163 --disable-setlocale disable setlocale using in mplayer [autodetect]
164 --disable-langinfo do not use langinfo [autodetect]
165 --enable-lirc enable LIRC (remote control) support [autodetect]
166 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
167 --enable-joystick enable joystick support [disable]
168 --disable-vm disable support X video mode extensions [autodetect]
169 --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
170 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
171 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
172 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
173 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
174 --disable-edl disable EDL (edit decision list) support [enable]
175 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
176 --disable-network disable network support (for: http/mms/rtp) [enable]
177 --enable-winsock2 enable winsock2 usage [autodetect]
178 --enable-smb enable Samba (SMB) input support [autodetect]
179 --enable-live enable LIVE.COM Streaming Media support [autodetect]
180 --disable-dvdread Disable libdvdread support [autodetect]
181 --disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
182 --disable-cdparanoia Disable cdparanoia support [autodetect]
183 --disable-freetype Disable freetype2 font rendering support [autodetect]
184 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
185 --disable-unrarlib Disable Unique RAR File Library [enabled]
186 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
187 --disable-sortsub Disable subtitles sorting [enabled]
188 --enable-fribidi Enable using the FriBiDi libs [disabled]
189 --disable-enca Disable using ENCA charset oracle library [autodetect]
190 --disable-macosx Disable Mac OS X specific features [autodetect]
191 --enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
192 --enable-macosx-bundle Enable Mac OS X bundle file locations [autodetect]
193 --disable-inet6 Disable IPv6 support [autodetect]
194 --disable-gethostbyname2 gethostbyname() function is not provided by the C
195 library [autodetect]
196 --disable-ftp Disable ftp support [enabled]
197 --disable-vstream Disable tivo vstream client support [autodetect]
198 --disable-pthreads Disable Posix threads support [autodetect]
200 Codecs:
201 --enable-gif enable gif support [autodetect]
202 --enable-png enable png input/output support [autodetect]
203 --enable-jpeg enable jpeg input/output support [autodetect]
204 --enable-liblzo enable external liblzo support [autodetect]
205 --disable-win32 disable Win32 DLL support [autodetect]
206 --disable-dshow disable Win32/DirectShow support [autodetect]
207 --disable-qtx disable Quicktime codecs [autodetect]
208 --disable-xanim disable XAnim DLL support [autodetect]
209 --disable-real disable RealPlayer DLL support [autodetect]
210 --disable-xvid disable XviD codec [autodetect]
211 --disable-x264 disable H.264 encoder [autodetect]
212 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
213 --enable-opendivx enable _old_ OpenDivx codec [disable]
214 --disable-libavcodec disable libavcodec [autodetect]
215 --disable-libavformat disable libavformat [autodetect]
216 --enable-libfame enable libfame realtime encoder [autodetect]
217 --disable-internal-tremor do not build internal OggVorbis support [enabled]
218 --enable-tremor-low build with lower accuracy internal tremor [disabled]
219 --enable-external-tremor build with external tremor [disabled]
220 --disable-vorbis disable OggVorbis support entirely [autodetect]
221 --enable-theora build with OggTheora support [autodetect]
222 --disable-internal-matroska disable internal Matroska support [enabled]
223 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
224 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
225 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
226 --disable-ladspa disable LADSPA plugin support [autodetect]
227 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
228 --disable-mad disable libmad (MPEG audio) support [autodetect]
229 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
230 --disable-twolame disable Twolame (MPEG layer 2 audio) support in mencoder [autodetect]
231 --enable-xmms build with XMMS inputplugin support [disabled]
232 --disable-mp3lib disable builtin mp3lib [enabled]
233 --disable-liba52 disable builtin liba52 [enabled]
234 --enable-libdts enable libdts support [autodetect]
235 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
236 --disable-musepack disable musepack support [autodetect]
237 --disable-amr_nb disable amr narrowband, floating point [autodetect]
238 --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
239 --disable-amr_wb disable amr wideband, floating point [autodetect]
240 --disable-codec=CODEC disable specified codec
241 --enable-codec=CODEC dnable specified codec
243 Video output:
244 --disable-vidix disable VIDIX [enable on x86 *nix]
245 --enable-gl build with OpenGL render support [autodetect]
246 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
247 --enable-vesa build with VESA support [autodetect]
248 --enable-svga build with SVGAlib support [autodetect]
249 --enable-sdl build with SDL render support [autodetect]
250 --enable-aa build with AAlib render support [autodetect]
251 --enable-caca build with CACA render support [autodetect]
252 --enable-ggi build with GGI render support [autodetect]
253 --enable-ggiwmh build with GGI libggiwmh extension [autodetect]
254 --enable-directx build with DirectX support [autodetect]
255 --enable-dxr2 build with DXR2 render support [autodetect]
256 --enable-dxr3 build with DXR3/H+ render support [autodetect]
257 --enable-dvb build with support for output via DVB-Card [autodetect]
258 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
259 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
260 (check for /dev/mga_vid) [autodetect]
261 --enable-xmga build with mga_vid X Window support
262 (check for X & /dev/mga_vid) [autodetect]
263 --enable-xv build with Xv render support for X 4.x [autodetect]
264 --enable-xvmc build with XvMC acceleration for X 4.x [disable]
265 --enable-vm build with XF86VidMode support for X11 [autodetect]
266 --enable-xinerama build with Xinerama support for X11 [autodetect]
267 --enable-x11 build with X11 render support [autodetect]
268 --enable-fbdev build with FBDev render support [autodetect]
269 --enable-mlib build with MLIB support (Solaris only) [autodetect]
270 --enable-3dfx build with obsolete /dev/3dfx support [disable]
271 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
272 --enable-directfb build with DirectFB support [autodetect]
273 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
274 --enable-bl build with Blinkenlights support [disable]
275 --enable-tdfxvid build with tdfx_vid support [disable]
276 --disable-tga disable targa output support [enable]
277 --disable-pnm disable pnm output support [enable]
278 --disable-md5sum disable md5sum output support [enable]
280 Audio output:
281 --disable-alsa disable ALSA sound support [autodetect]
282 --disable-ossaudio disable OSS sound support [autodetect]
283 --disable-arts disable aRts sound support [autodetect]
284 --disable-esd disable esd sound support [autodetect]
285 --disable-polyp disable Polypaudio sound support [autodetect]
286 --disable-jack disable JACK sound support [autodetect]
287 --disable-nas disable NAS sound support [autodetect]
288 --disable-sgiaudio disable SGI sound support [autodetect]
289 --disable-sunaudio disable Sun sound support [autodetect]
290 --disable-win32waveout disable Windows waveout sound support [autodetect]
291 --disable-select disable using select() on audio device [enable]
293 Miscellaneous options:
294 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
295 --cc=COMPILER use this C compiler to build MPlayer [gcc]
296 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
297 --as=ASSEMBLER use this assembler to build MPlayer [as]
298 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
299 --enable-static build a statically linked binary. Set further linking
300 options with --enable-static="-lslang -lncurses"
301 --charset convert the help messages to this charset
302 --language=list a white space or comma separated list of languages
303 for translated man pages, the first language is the
304 primary and therefore used for translated messages
305 and GUI (also the environment variable \$LINGUAS is
306 honored) [en]
307 (Available: $LANGUAGES all)
308 --enable-shared-pp install & use shared postprocessing lib
309 --with-install=PATH use a custom install program (useful if your OS uses
310 a GNU-incompatible install utility by default and
311 you want to use GNU version)
312 --install-path=PATH the path to a custom install program
313 this option is obsolete and will be removed soon,
314 use --with-install instead.
316 Advanced options:
317 --enable-mmx build with MMX support [autodetect]
318 --enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
319 --enable-3dnow build with 3DNow! support [autodetect]
320 --enable-3dnowex build with extended 3DNow! support [autodetect]
321 --enable-sse build with SSE support [autodetect]
322 --enable-sse2 build with SSE2 support [autodetect]
323 --enable-shm build with shm support [autodetect]
324 --enable-altivec build with Altivec support (PowerPC) [autodetect]
325 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
326 --enable-big-endian Force byte order to big-endian [autodetect]
327 --enable-debug[=1-3] compile debugging information into mplayer [disable]
328 --enable-profile compile profiling information into mplayer [disable]
329 --disable-sighandler disable sighandler for crashes [enable]
330 --enable-crash-debug enable automatic gdb attach on crash [disable]
331 --enable-i18n _experimental_ gnu gettext() support [autodetect]
332 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
334 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
335 --disable-gcc-checking disable gcc version checking [enable]
337 Use these options if autodetection fails (Options marked with (*) accept
338 multiple paths separated by ':'):
339 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
340 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
341 --with-x11incdir=DIR X headers in DIR (*)
342 --with-x11libdir=DIR X library files in DIR (*)
343 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
344 --with-dvbincdir=DIR DVB headers in DIR (*)
345 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
346 --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
347 --with-codecsdir=DIR Binary codec files in DIR
348 --with-win32libdir=DIR W*ndows DLL files in DIR
349 --with-xanimlibdir=DIR XAnim DLL files in DIR
350 --with-reallibdir=DIR RealPlayer DLL files in DIR
351 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
352 --with-xvidincdir=DIR XviD header in DIR (*)
353 --with-x264libdir=DIR libx264 in DIR
354 --with-x264incdir=DIR x264 header in DIR
355 --with-dtslibdir=DIR libdts library in DIR (*)
356 --with-dtsincdir=DIR libdts header in DIR (*)
357 --with-livelibdir=DIR LIVE.COM Streaming Media libraries in DIR
358 --with-toolamedir=DIR path to Toolame library and include file
359 --with-xmmsplugindir=DIR XMMS plugins in DIR
360 --with-xmmslibdir=DIR libxmms.so.1 in DIR
361 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
362 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
363 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
364 --with-termcaplib=NAME name of library with termcap functionality
365 name should be given without leading "lib"
366 checks for "termcap" and "tinfo"
368 --with-freetype-config=PATH path to freetype-config
369 (e.g. /opt/bin/freetype-config)
370 --with-fribidi-config=PATH path to fribidi-config
371 (e.g. /opt/bin/fribidi-config)
372 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
373 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
374 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
376 This configure script is NOT autoconf-based, even though its output is similar.
377 It will try to autodetect all configuration options. If you --enable an option
378 it will be forcefully turned on, skipping autodetection. This can break
379 compilation, so you need to know what you are doing.
381 exit 0
383 done # for parm in ...
386 # 1st pass checking for vital options
387 _install=install
388 _ranlib=ranlib
389 _cc=cc
390 test "$CC" && _cc="$CC"
391 _as=auto
392 _runtime_cpudetection=no
393 for ac_option do
394 case "$ac_option" in
395 --target=*)
396 _target=`echo $ac_option | cut -d '=' -f 2`
398 --cc=*)
399 _cc=`echo $ac_option | cut -d '=' -f 2`
401 --host-cc=*)
402 _host_cc=`echo $ac_option | cut -d '=' -f 2`
404 --as=*)
405 _as=`echo $ac_option | cut -d '=' -f 2`
407 --enable-gcc-checking)
408 _skip_cc_check=no
410 --disable-gcc-checking)
411 _skip_cc_check=yes
413 --enable-static)
414 _ld_static='-static'
416 --disable-static)
417 _ld_static=''
419 --enable-static=*)
420 _ld_static="-static `echo $ac_option | cut -d '=' -f 2`"
422 --with-extraincdir=*)
423 _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
425 --with-extralibdir=*)
426 _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
428 --enable-runtime-cpudetection)
429 _runtime_cpudetection=yes
431 --disable-runtime-cpudetection)
432 _runtime_cpudetection=no
434 --install-path=*)
435 _install=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
437 --with-install=*)
438 _install=`echo $ac_option | cut -d '=' -f 2 `
440 esac
441 done
443 # Determine our OS name and CPU architecture
444 if test -z "$_target" ; then
445 # OS name
446 system_name=`( uname -s ) 2>&1`
447 case "$system_name" in
448 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
450 IRIX*)
451 system_name=IRIX
453 HP-UX*)
454 system_name=HP-UX
456 [cC][yY][gG][wW][iI][nN]*)
457 system_name=CYGWIN
459 MINGW32*)
460 system_name=MINGW32
462 MorphOS)
463 system_name=MorphOS
466 system_name="$system_name-UNKNOWN"
468 esac
471 # host's CPU/instruction set
472 host_arch=`( uname -p ) 2>&1`
473 case "$host_arch" in
474 i386|sparc|ppc|alpha|arm|mips|vax)
476 powerpc) # Darwin returns 'powerpc'
477 host_arch=ppc
479 *) # uname -p on Linux returns 'unknown' for the processor type,
480 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
482 # Maybe uname -m (machine hardware name) returns something we
483 # recognize.
485 # x86/x86pc is used by QNX
486 case "`( uname -m ) 2>&1`" in
487 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 ;;
488 ia64) host_arch=ia64 ;;
489 x86_64|amd64)
490 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
491 -z "`echo $CFLAGS | grep -- -m32`" ]; then
492 host_arch=x86_64
493 else
494 host_arch=i386
497 macppc|ppc|ppc64) host_arch=ppc ;;
498 alpha) host_arch=alpha ;;
499 sparc) host_arch=sparc ;;
500 sparc64) host_arch=sparc64 ;;
501 parisc*|hppa*|9000*) host_arch=hppa ;;
502 arm*) host_arch=arm ;;
503 s390) host_arch=s390 ;;
504 s390x) host_arch=s390x ;;
505 mips) host_arch=mips ;;
506 vax) host_arch=vax ;;
507 *) host_arch=UNKNOWN ;;
508 esac
510 esac
511 else
512 system_name=`echo $_target | cut -d '-' -f 2`
513 case "`echo $system_name | tr A-Z a-z`" in
514 linux) system_name=Linux ;;
515 freebsd) system_name=FreeBSD ;;
516 netbsd) system_name=NetBSD ;;
517 bsd/os) system_name=BSD/OS ;;
518 openbsd) system_name=OpenBSD ;;
519 sunos) system_name=SunOS ;;
520 qnx) system_name=QNX ;;
521 morphos) system_name=MorphOS ;;
522 mingw32msvc) system_name=MINGW32 ;;
523 esac
524 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
525 host_arch=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
528 echo "Detected operating system: $system_name"
529 echo "Detected host architecture: $host_arch"
531 # LGB: temporary files
532 for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
533 test "$I" && break
534 done
536 TMPLOG="configure.log"
537 rm -f "$TMPLOG"
538 TMPC="$I/mplayer-conf-$RANDOM-$$.c"
539 TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
540 TMPO="$I/mplayer-conf-$RANDOM-$$.o"
541 TMPS="$I/mplayer-conf-$RANDOM-$$.S"
543 # config files
545 # FIXME: A lot of stuff is installed under /usr/local
546 # NK: But we should never use this stuff implicitly since we call compiler
547 # from /usr we should be sure that there no effects from other compilers
548 # (libraries) which might be installed into /usr/local. Let users use this
549 # stuff explicitly as command line argument. In other words: It would be
550 # resonable to have only /usr/include or only /usr/local/include.
552 if freebsd ; then
553 _ld_extra="$_ld_extra -L/usr/local/lib"
554 _inc_extra="$_inc_extra -I/usr/local/include"
557 if netbsd ; then
558 for I in `echo $_ld_extra | sed 's/-L//g'` ; do
559 tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
560 done
561 _ld_extra=$tmp
564 _ldd=ldd
565 if darwin; then
566 _ldd="otool -L"
569 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
570 # if used as 'head -1' instead of 'head -n 1', but older versions don't
571 # know about '-n'.
572 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
573 _head() { head -$1 2>/dev/null ; }
574 else
575 _head() { head -n $1 2>/dev/null ; }
577 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
578 _tail() { tail -$1 2>/dev/null ; }
579 else
580 _tail() { tail -n $1 2>/dev/null ; }
583 # Checking CC version...
584 if test "$_skip_cc_check" != yes ; then
585 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
586 if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then
587 echocheck "$_cc version"
588 cc_vendor=intel
589 cc_name=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 1`
590 cc_version=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
591 _cc_major=`echo $cc_version | cut -d '.' -f 1`
592 _cc_minor=`echo $cc_version | cut -d '.' -f 2`
593 # TODO verify older icc/ecc compatibility
594 case $cc_version in
596 cc_version="v. ?.??, bad"
597 cc_verc_fail=yes
599 8.0)
600 cc_version="$cc_version, ok"
601 cc_verc_fail=no
604 cc_version="$cc_version, bad"
605 cc_verc_fail=yes
607 esac
608 echores "$cc_version"
609 else
610 for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
611 echocheck "$_cc version"
612 cc_vendor=gnu
613 cc_name=`( $_cc -v ) 2>&1 | _tail 1 | cut -d ' ' -f 1`
614 cc_version=`( $_cc -dumpversion ) 2>&1`
615 if test "$?" -gt 0; then
616 cc_version="not found"
618 case $cc_version in
620 cc_version="v. ?.??, bad"
621 cc_verc_fail=yes
623 2.95.[2-9]|2.95.[2-9][-.]*|[3-4].*)
624 _cc_major=`echo $cc_version | cut -d '.' -f 1`
625 _cc_minor=`echo $cc_version | cut -d '.' -f 2`
626 _cc_mini=`echo $cc_version | cut -d '.' -f 3`
627 cc_version="$cc_version, ok"
628 cc_verc_fail=no
630 'not found')
631 cc_verc_fail=yes
634 cc_version="$cc_version, bad"
635 cc_verc_fail=yes
637 esac
638 echores "$cc_version"
639 (test "$cc_verc_fail" = "no") && break
640 done
641 fi # icc
642 if test "$cc_verc_fail" = yes ; then
643 cat <<EOF
645 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
647 You are not using a supported compiler. We do not have the time to make sure
648 everything works with compilers other than the ones we use. Use either the
649 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
650 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
652 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
653 mplayer and lame (which is used for mencoder). If you get compile errors,
654 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
655 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
656 bugs!
658 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
660 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
663 die "Bad gcc version"
665 else
666 cat <<EOF
668 ******************************************************************************
670 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
671 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
673 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
674 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
675 Lame which is used by mencoder produces weird errors, too.
677 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
678 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
680 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
682 ******************************************************************************
686 read _answer
689 echocheck "host cc"
690 if not test "$_host_cc" ; then
691 _host_cc=$_cc
693 echores $_host_cc
696 # ---
698 # now that we know what compiler should be used for compilation, try to find
699 # out which assembler is used by the $_cc compiler
700 if test "$_as" = auto ; then
701 _as=`$_cc -print-prog-name=as`
702 test -z "$_as" && _as=as
705 # XXX: this should be ok..
706 _cpuinfo="echo"
707 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
708 # FIXME: Remove the cygwin check once AMD CPUs are supported
709 if test -r /proc/cpuinfo && not cygwin; then
710 # Linux with /proc mounted, extract CPU information from it
711 _cpuinfo="cat /proc/cpuinfo"
712 elif test -r /compat/linux/proc/cpuinfo && not x86 ; then
713 # FreeBSD with Linux emulation /proc mounted,
714 # extract CPU information from it
715 _cpuinfo="cat /compat/linux/proc/cpuinfo"
716 elif darwin ; then
717 # use hostinfo on Darwin
718 _cpuinfo="hostinfo"
719 elif x86; then
720 # all other OSes try to extract CPU information from a small helper
721 # program TOOLS/cpuinfo instead
722 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
723 _cpuinfo="TOOLS/cpuinfo"
726 x86_exts_check()
728 pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | _head 1`
729 if test -z "$pparam" ; then
730 pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | _head 1`
733 _mmx=no
734 _3dnow=no
735 _3dnowex=no
736 _mmx2=no
737 _sse=no
738 _sse2=no
739 _mtrr=no
741 for i in $pparam ; do
742 case "$i" in
743 3dnow) _3dnow=yes ;;
744 3dnowext) _3dnow=yes _3dnowex=yes ;;
745 mmx) _mmx=yes ;;
746 mmxext) _mmx2=yes ;;
747 mtrr|k6_mtrr|cyrix_arr) _mtrr=yes ;;
748 xmm|sse|kni) _sse=yes _mmx2=yes ;;
749 sse2) _sse2=yes ;;
750 esac
751 done
754 case "$host_arch" in
755 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
756 _def_arch="#define ARCH_X86 1"
757 _target_arch="TARGET_ARCH_X86 = yes"
759 pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
760 pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
761 pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
762 pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
763 pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
765 x86_exts_check
767 echocheck "CPU vendor"
768 echores "$pvendor ($pfamily:$pmodel:$pstepping)"
770 echocheck "CPU type"
771 echores "$pname"
773 case "$pvendor" in
774 AuthenticAMD)
775 case "$pfamily" in
776 3) proc=i386 iproc=386 ;;
777 4) proc=i486 iproc=486 ;;
778 5) iproc=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
779 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
780 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
781 proc=k6-3
782 elif test "$pmodel" -ge 8; then
783 proc=k6-2
784 elif test "$pmodel" -ge 6; then
785 proc=k6
786 else
787 proc=i586
788 iproc=586
791 6) iproc=686
792 if test "$pmodel" -ge 7; then
793 proc=athlon-4
794 elif test "$pmodel" -ge 6; then
795 # only Athlon XP supports ssem MP, Duron etc not
796 # but most of them are CPUID 666, so check if sse detected
797 # btw. there is also athlon-mp opt, but we need extended
798 # CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
799 if test "$_sse" = yes && test "$pstepping" -ge 2; then
800 proc=athlon-xp
801 else
802 proc=athlon-4
804 elif test "$pmodel" -ge 4; then
805 proc=athlon-tbird
806 else
807 proc=athlon # TODO: should the Duron Spitfire be considered a Thunderbird instead?
810 15) iproc=686
811 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
812 # caught and remedied in the optimization tests below.
813 proc=k8
816 *) proc=athlon-xp iproc=686 ;;
817 esac
819 GenuineIntel)
820 case "$pfamily" in
821 3) proc=i386 iproc=386 ;;
822 4) proc=i486 iproc=486 ;;
823 5) iproc=586
824 if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then
825 proc=pentium-mmx # 4 is desktop, 8 is mobile
826 else
827 proc=i586
830 6) iproc=686
831 if test "$pmodel" -ge 7; then
832 proc=pentium3
833 elif test "$pmodel" -ge 3; then
834 proc=pentium2
835 else
836 proc=i686
839 15) proc=pentium4 iproc=686 ;;
840 *) proc=pentium4 iproc=686 ;;
841 esac
843 unknown)
844 case "$pfamily" in
845 3) proc=i386 iproc=386 ;;
846 4) proc=i486 iproc=486 ;;
847 *) proc=i586 iproc=586 ;;
848 esac
851 proc=i586 iproc=586 ;;
852 esac
854 # check that gcc supports our CPU, if not, fall back to earlier ones
855 # LGB: check -mcpu and -march swithing step by step with enabling
856 # to fall back till 386.
858 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
860 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] || ( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
861 cpuopt=-mtune
862 else
863 cpuopt=-mcpu
866 echocheck "GCC & CPU optimization abilities"
867 cat > $TMPC << EOF
868 int main(void) { return 0; }
870 if test "$_runtime_cpudetection" = no ; then
871 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
872 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp
874 if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then
875 cc_check -march=$proc $cpuopt=$proc || proc=athlon
877 if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then
878 cc_check -march=$proc $cpuopt=$proc || proc=k6
880 if test "$proc" = "k6"; then
881 if not cc_check -march=$proc $cpuopt=$proc; then
882 if cc_check -march=i586 $cpuopt=i686; then
883 proc=i586-i686
884 else
885 proc=i586
889 if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
890 cc_check -march=$proc $cpuopt=$proc || proc=i686
892 if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then
893 cc_check -march=$proc $cpuopt=$proc || proc=i586
895 if test "$proc" = "i586" ; then
896 cc_check -march=$proc $cpuopt=$proc || proc=i486
898 if test "$proc" = "i486" ; then
899 cc_check -march=$proc $cpuopt=$proc || proc=i386
901 if test "$proc" = "i386" ; then
902 cc_check -march=$proc $cpuopt=$proc || proc=error
904 if test "$proc" = "error" ; then
905 echores "Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
906 _mcpu=""
907 _march=""
908 _optimizing=""
909 elif test "$proc" = "i586-i686"; then
910 _march="-march=i586"
911 _mcpu="$cpuopt=i686"
912 _optimizing="$proc"
913 else
914 _march="-march=$proc"
915 _mcpu="$cpuopt=$proc"
916 _optimizing="$proc"
918 else
919 # i686 is probably the most common CPU - optimize for it
920 _mcpu="$cpuopt=i686"
921 # at least i486 required, for bswap instruction
922 _march="-march=i486"
923 cc_check $_mcpu || _mcpu=""
924 cc_check $_march $_mcpu || _march=""
927 ## Gabucino : --target takes effect here (hopefully...) by overwriting
928 ## autodetected mcpu/march parameters
929 if test "$_target" ; then
930 # TODO: it may be a good idea to check GCC and fall back in all cases
931 if test "$host_arch" = "i586-i686"; then
932 _march="-march=i586"
933 _mcpu="$cpuopt=i686"
934 else
935 _march="-march=$host_arch"
936 _mcpu="$cpuopt=$host_arch"
939 proc="$host_arch"
941 case "$proc" in
942 i386) iproc=386 ;;
943 i486) iproc=486 ;;
944 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx) iproc=586 ;;
945 i686|athlon*|pentium*) iproc=686 ;;
946 *) iproc=586 ;;
947 esac
950 echores "$proc"
953 ia64)
954 _def_arch='#define ARCH_IA64 1'
955 _target_arch='TARGET_ARCH_IA64 = yes'
956 iproc='ia64'
957 proc=''
958 _march=''
959 _mcpu=''
960 _optimizing=''
963 x86_64|amd64)
964 _def_arch='#define ARCH_X86_64 1'
965 _target_arch='TARGET_ARCH_X86_64 = yes'
966 iproc='x86_64'
968 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
969 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
970 cpuopt=-mtune
971 else
972 cpuopt=-mcpu
974 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
975 # caught and remedied in the optimization tests below.
976 proc=k8
978 echocheck "GCC & CPU optimization abilities"
979 cat > $TMPC << EOF
980 int main(void) { return 0; }
982 # This is a stripped-down version of the i386 fallback.
983 if test "$_runtime_cpudetection" = no ; then
984 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
985 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp
987 # This will fail if gcc version < 3.3, which is ok because earlier
988 # versions don't really support 64-bit on amd64.
989 # Is this a valid assumption? -Corey
990 if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" ; then
991 cc_check -march=$proc $cpuopt=$proc || proc=error
993 _march="-march=$proc"
994 _mcpu="$cpuopt=$proc"
995 if test "$proc" = "error" ; then
996 echores "Your $_cc does not even support \"athlon-xp\" for '-march' and '$cpuopt'."
997 _mcpu=""
998 _march=""
1000 else
1001 _march=""
1002 _mcpu=""
1005 _optimizing=""
1007 echores "$proc"
1009 x86_exts_check
1012 sparc)
1013 _def_arch='#define ARCH_SPARC 1'
1014 _target_arch='TARGET_ARCH_SPARC = yes'
1015 iproc='sparc'
1016 if sunos ; then
1017 echocheck "CPU type"
1018 karch=`uname -m`
1019 case "`echo $karch`" in
1020 sun4) proc=v7 ;;
1021 sun4c) proc=v7 ;;
1022 sun4d) proc=v8 ;;
1023 sun4m) proc=v8 ;;
1024 sun4u) proc=v9 _vis='yes' _def_vis='#define HAVE_VIS = yes' ;;
1025 *) ;;
1026 esac
1027 echores "$proc"
1028 else
1029 proc=v8
1031 _march=''
1032 _mcpu="-mcpu=$proc"
1033 _optimizing="$proc"
1036 sparc64)
1037 _def_arch='#define ARCH_SPARC 1'
1038 _target_arch='TARGET_ARCH_SPARC = yes'
1039 _vis='yes'
1040 _def_vis='#define HAVE_VIS = yes'
1041 iproc='sparc'
1042 proc='v9'
1043 _march=''
1044 _mcpu="-mcpu=$proc"
1045 _optimizing="$proc"
1048 arm|armv4l|armv5tel)
1049 _def_arch='#define ARCH_ARMV4L 1'
1050 _target_arch='TARGET_ARCH_ARMV4L = yes'
1051 iproc='arm'
1052 proc=''
1053 _march=''
1054 _mcpu=''
1055 _optimizing=''
1058 ppc)
1059 _def_arch='#define ARCH_POWERPC 1'
1060 _def_dcbzl='#define NO_DCBZL 1'
1061 _target_arch='TARGET_ARCH_POWERPC = yes'
1062 iproc='ppc'
1063 proc=''
1064 _march=''
1065 _mcpu=''
1066 _optimizing=''
1067 _altivec=no
1069 echocheck "CPU type"
1070 if linux && test -n "$_cpuinfo"; then
1071 proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1072 if test -n "`$_cpuinfo | grep altivec`"; then
1073 _altivec=yes
1076 if darwin ; then
1077 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1078 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
1079 _altivec=yes
1080 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
1081 _altivec=yes
1084 # only gcc 3.4 works reliably with altivec code under netbsd
1085 if netbsd ; then
1086 case $cc_version in
1087 2*|3.0*|3.1*|3.2*|3.3*)
1090 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1091 _altivec=yes
1094 esac
1096 if test "$_altivec" = yes; then
1097 echores "$proc altivec"
1098 else
1099 echores "$proc"
1102 echocheck "GCC & CPU optimization abilities"
1104 if test -n "$proc"; then
1105 case "$proc" in
1106 601) _march='-mcpu=601' _mcpu='-mtune=601' ;;
1107 603) _march='-mcpu=603' _mcpu='-mtune=603' ;;
1108 603e|603ev) _march='-mcpu=603e' _mcpu='-mtune=603e' ;;
1109 604|604e|604r|604ev) _march='-mcpu=604' _mcpu='-mtune=604' ;;
1110 740|740/750|745/755) _march='-mcpu=740' _mcpu='-mtune=740' ;;
1111 750|750CX) _march='-mcpu=750' _mcpu='-mtune=750' ;;
1112 *) ;;
1113 esac
1114 # gcc 3.1(.1) and up supports 7400 and 7450
1115 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then
1116 case "$proc" in
1117 7400*|7410*) _march='-mcpu=7400' _mcpu='-mtune=7400' ;;
1118 7450*|7455*) _march='-mcpu=7450' _mcpu='-mtune=7450' ;;
1119 *) ;;
1120 esac
1122 # gcc 3.2 and up supports 970
1123 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
1124 case "$proc" in
1125 970*) _march='-mcpu=970' _mcpu='-mtune=970'
1126 _def_dcbzl='#undef NO_DCBZL' ;;
1127 *) ;;
1128 esac
1132 if test -n "$_mcpu"; then
1133 _optimizing=`echo $_mcpu | cut -c 8-`
1134 echores "$_optimizing"
1135 else
1136 echores "none"
1141 alpha)
1142 _def_arch='#define ARCH_ALPHA 1'
1143 _target_arch='TARGET_ARCH_ALPHA = yes'
1144 iproc='alpha'
1145 _march=''
1147 echocheck "CPU type"
1148 cat > $TMPC << EOF
1149 int main() {
1150 unsigned long ver, mask;
1151 asm ("implver %0" : "=r" (ver));
1152 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1153 printf("%ld-%x\n", ver, ~mask);
1154 return 0;
1157 $_cc -o "$TMPO" "$TMPC"
1158 case `"$TMPO"` in
1160 0-0) proc="ev4"; cpu_understands_mvi="0";;
1161 1-0) proc="ev5"; cpu_understands_mvi="0";;
1162 1-1) proc="ev56"; cpu_understands_mvi="0";;
1163 1-101) proc="pca56"; cpu_understands_mvi="1";;
1164 2-303) proc="ev6"; cpu_understands_mvi="1";;
1165 2-307) proc="ev67"; cpu_understands_mvi="1";;
1166 2-1307) proc="ev68"; cpu_understands_mvi="1";;
1167 esac
1168 echores "$proc"
1170 echocheck "GCC & CPU optimization abilities"
1171 if test "$proc" = "ev68" ; then
1172 cc_check -mcpu=$proc || proc=ev67
1174 if test "$proc" = "ev67" ; then
1175 cc_check -mcpu=$proc || proc=ev6
1177 _mcpu="-mcpu=$proc"
1178 echores "$proc"
1180 _optimizing="$proc"
1182 echocheck "MVI instruction support in GCC"
1183 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1184 _def_gcc_mvi_support="#define CAN_COMPILE_ALPHA_MVI 1"
1185 echores "yes"
1186 else
1187 _def_gcc_mvi_support="#undef CAN_COMPILE_ALPHA_MVI"
1188 echores "no, GCC = `( $_cc -dumpversion ) 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1192 mips)
1193 _def_arch='#define ARCH_SGI_MIPS 1'
1194 _target_arch='TARGET_ARCH_SGI_MIPS = yes'
1195 iproc='sgi-mips'
1196 proc=''
1197 _march=''
1198 _mcpu=''
1199 _optimizing=''
1201 if irix ; then
1202 echocheck "CPU type"
1203 proc=`hinv -c processor | grep CPU | cut -d " " -f3`
1204 case "`echo $proc`" in
1205 R3000) _march='-mips1' _mcpu='-mtune=r2000' ;;
1206 R4000) _march='-mips3' _mcpu='-mtune=r4000' ;;
1207 R4400) _march='-mips3' _mcpu='-mtune=r4400' ;;
1208 R4600) _march='-mips3' _mcpu='-mtune=r4600' ;;
1209 R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
1210 R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
1211 esac
1212 echores "$proc"
1217 hppa)
1218 _def_arch='#define ARCH_PA_RISC 1'
1219 _target_arch='TARGET_ARCH_PA_RISC = yes'
1220 iproc='PA-RISC'
1221 proc=''
1222 _march=''
1223 _mcpu=''
1224 _optimizing=''
1227 s390)
1228 _def_arch='#define ARCH_S390 1'
1229 _target_arch='TARGET_ARCH_S390 = yes'
1230 iproc='390'
1231 proc=''
1232 _march=''
1233 _mcpu=''
1234 _optimizing=''
1237 s390x)
1238 _def_arch='#define ARCH_S390X 1'
1239 _target_arch='TARGET_ARCH_S390X = yes'
1240 iproc='390x'
1241 proc=''
1242 _march=''
1243 _mcpu=''
1244 _optimizing=''
1247 vax)
1248 _def_arch='#define ARCH_VAX 1'
1249 _target_arch='TARGET_ARCH_VAX = yes'
1250 iproc='vax'
1251 proc=''
1252 _march=''
1253 _mcpu=''
1254 _optimizing=''
1258 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1259 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1260 die "unsupported architecture $host_arch"
1262 esac
1264 if test "$_runtime_cpudetection" = yes ; then
1265 if x86; then
1266 _mmx=yes
1267 _3dnow=yes
1268 _3dnowex=yes
1269 _mmx2=yes
1270 _sse=yes
1271 _sse2=yes
1272 _mtrr=yes
1274 if ppc; then
1275 _altivec=yes
1279 if x86 && test "$_runtime_cpudetection" = no ; then
1280 extcheck() {
1281 if test "$1" = yes ; then
1282 echocheck "kernel support of $2"
1283 cat > $TMPC <<EOF
1284 #include <signal.h>
1285 void catch() { exit(1); }
1286 int main(void){
1287 signal(SIGILL, catch);
1288 __asm__ __volatile__ ("$3":::"memory");return(0);
1292 if ( cc_check && $TMPO ) > /dev/null 2>&1 ; then
1293 echores "yes"
1294 _optimizing="$_optimizing $2"
1295 return 0
1296 else
1297 echores "failed"
1298 echo "It seems that your kernel does not correctly support $2."
1299 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1300 return 1
1303 return 0
1306 extcheck $_mmx "mmx" "emms" || _mmx=no
1307 extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
1308 extcheck $_3dnow "3dnow" "femms" || _3dnow=no
1309 extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
1310 extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no _gcc3_ext="$_gcc3_ext -mno-sse"
1311 extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no _gcc3_ext="$_gcc3_ext -mno-sse2"
1312 echocheck "mtrr support"
1313 echores "$_mtrr"
1315 if test "$_mtrr" = yes ; then
1316 _optimizing="$_optimizing mtrr"
1319 if test "$_gcc3_ext" != ""; then
1320 # if we had to disable sse/sse2 because the active kernel does not
1321 # support this instruction set extension, we also have to tell
1322 # gcc3 to not generate sse/sse2 instructions for normal C code
1323 cat > $TMPC << EOF
1324 int main(void) { return 0; }
1326 cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
1331 echocheck "assembler support of -pipe option"
1332 cat > $TMPC << EOF
1333 int main(void) { return 0; }
1335 cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no"
1337 _prefix="/usr/local"
1338 _xvmclib="XvMCNVIDIA"
1340 # GOTCHA: the variables below defines the default behavior for autodetection
1341 # and have - unless stated otherwise - at least 2 states : yes no
1342 # If autodetection is available then the third state is: auto
1343 _libavcodec=auto
1344 _amr_nb=auto
1345 _amr_nb_fixed=auto
1346 _amr_wb=auto
1347 _libavcodecs=`grep 'register_avcodec(&[a-z]' libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
1348 _libavcodecso=auto
1349 _libavformat=auto
1350 _fame=auto
1351 _mp1e=no
1352 _mencoder=yes
1353 _x11=auto
1354 _dga=auto # 1 2 no auto
1355 _xv=auto
1356 _xvmc=no #auto when complete
1357 _sdl=auto
1358 _directx=auto
1359 _win32waveout=auto
1360 _nas=auto
1361 _png=auto
1362 _jpg=auto
1363 _pnm=yes
1364 _md5sum=yes
1365 _gif=auto
1366 _gl=auto
1367 _ggi=auto
1368 _ggiwmh=auto
1369 _aa=auto
1370 _caca=auto
1371 _svga=auto
1372 _vesa=auto
1373 _fbdev=auto
1374 _dvb=auto
1375 _dvbhead=auto
1376 _dxr2=auto
1377 _dxr3=auto
1378 _iconv=auto
1379 _langinfo=auto
1380 _rtc=auto
1381 _ossaudio=auto
1382 _arts=auto
1383 _esd=auto
1384 _polyp=auto
1385 _jack=auto
1386 _liblzo=auto
1387 _mad=auto
1388 _toolame=auto
1389 _twolame=auto
1390 _tremor_internal=yes
1391 _tremor_low=no
1392 _vorbis=auto
1393 _theora=auto
1394 _mp3lib=yes
1395 _liba52=yes
1396 _libdts=auto
1397 _libmpeg2=yes
1398 _matroska_internal=yes
1399 _tremor=no
1400 _faad_internal=auto
1401 _faad_external=auto
1402 _faac=auto
1403 _ladspa=auto
1404 _xmms=no
1405 # dvdnav disabled, it does not work
1406 #_dvdnav=no
1407 _dvdread=auto
1408 _dvdkit=auto
1409 _xanim=auto
1410 _real=auto
1411 _live=auto
1412 _xinerama=auto
1413 _mga=auto
1414 _xmga=auto
1415 _vm=auto
1416 _xf86keysym=auto
1417 _mlib=auto
1418 _sgiaudio=auto
1419 _sunaudio=auto
1420 _alsa=auto
1421 _fastmemcpy=yes
1422 _unrarlib=yes
1423 _win32=auto
1424 _dshow=yes
1425 _select=yes
1426 _tv=yes
1427 _tv_v4l=auto
1428 _tv_v4l2=auto
1429 _tv_bsdbt848=auto
1430 _edl=yes
1431 _network=yes
1432 _winsock2=auto
1433 _smbsupport=auto
1434 _vidix=auto
1435 _joystick=no
1436 _xvid=auto
1437 _x264=auto
1438 _divx4linux=auto
1439 _opendivx=no
1440 _lirc=auto
1441 _lircc=auto
1442 _gui=no
1443 _termcap=auto
1444 _termios=auto
1445 _3dfx=no
1446 _tdfxfb=no
1447 _tdfxvid=no
1448 _tga=yes
1449 _directfb=auto
1450 _zr=auto
1451 _bl=no
1452 _largefiles=no
1453 #_language=en
1454 _shm=auto
1455 _linux_devfs=no
1456 #_charset=utf8
1457 _i18n=auto
1458 _dynamic_plugins=no
1459 _crash_debug=auto
1460 _sighandler=yes
1461 _libdv=auto
1462 _cdparanoia=auto
1463 _big_endian=auto
1464 _freetype=auto
1465 _fontconfig=auto
1466 _shared_pp=no
1467 _menu=no
1468 _qtx=auto
1469 _macosx=auto
1470 _macosx_finder_support=no
1471 _macosx_bundle=auto
1472 _sortsub=yes
1473 _freetypeconfig='freetype-config'
1474 _fribidi=no
1475 _fribidiconfig='fribidi-config'
1476 _enca=auto
1477 _inet6=auto
1478 _gethostbyname2=auto
1479 _ftp=yes
1480 _musepack=auto
1481 _vstream=auto
1482 _pthreads=yes
1483 for ac_option do
1484 case "$ac_option" in
1485 # Skip 1st pass
1486 --target=*) ;;
1487 --cc=*) ;;
1488 --host-cc=*) ;;
1489 --as=*) ;;
1490 --enable-gcc-checking) ;;
1491 --disable-gcc-checking) ;;
1492 --enable-static*) ;;
1493 --disable-static*) ;;
1494 --with-extraincdir=*) ;;
1495 --with-extralibdir=*) ;;
1496 --enable-runtime-cpudetection) ;;
1497 --disable-runtime-cpudetection) ;;
1498 --install-path=*) ;;
1499 --with-install=*) ;;
1501 # Real 2nd pass
1502 --enable-mencoder) _mencoder=yes ;;
1503 --disable-mencoder) _mencoder=no ;;
1504 --enable-i18n) _i18n=yes ;;
1505 --disable-i18n) _i18n=no ;;
1506 --enable-dynamic-plugins) _dynamic_plugins=yes ;;
1507 --disable-dynamic-plugins) _dynamic_plugins=no ;;
1508 --enable-x11) _x11=yes ;;
1509 --disable-x11) _x11=no ;;
1510 --enable-xv) _xv=yes ;;
1511 --disable-xv) _xv=no ;;
1512 --enable-xvmc) _xvmc=yes ;;
1513 --disable-xvmc) _xvmc=no ;;
1514 --enable-sdl) _sdl=yes ;;
1515 --disable-sdl) _sdl=no ;;
1516 --enable-directx) _directx=yes ;;
1517 --disable-directx) _directx=no ;;
1518 --enable-win32waveout) _win32waveout=yes ;;
1519 --disable-win32waveout) _win32waveout=no ;;
1520 --enable-nas) _nas=yes ;;
1521 --disable-nas) _nas=no ;;
1522 --enable-png) _png=yes ;;
1523 --disable-png) _png=no ;;
1524 --enable-jpeg) _jpg=yes ;;
1525 --disable-jpeg) _jpg=no ;;
1526 --enable-pnm) _pnm=yes ;;
1527 --disable-pnm) _pnm=no ;;
1528 --enable-md5sum) _md5sum=yes ;;
1529 --disable-md5sum) _md5sum=no ;;
1530 --enable-gif) _gif=yes ;;
1531 --disable-gif) _gif=no ;;
1532 --enable-gl) _gl=yes ;;
1533 --disable-gl) _gl=no ;;
1534 --enable-ggi) _ggi=yes ;;
1535 --disable-ggi) _ggi=no ;;
1536 --enable-ggiwmh) _ggiwmh=yes ;;
1537 --disable-ggiwmh) _ggiwmh=no ;;
1538 --enable-aa) _aa=yes ;;
1539 --disable-aa) _aa=no ;;
1540 --enable-caca) _caca=yes ;;
1541 --disable-caca) _caca=no ;;
1542 --enable-svga) _svga=yes ;;
1543 --disable-svga) _svga=no ;;
1544 --enable-vesa) _vesa=yes ;;
1545 --disable-vesa) _vesa=no ;;
1546 --enable-fbdev) _fbdev=yes ;;
1547 --disable-fbdev) _fbdev=no ;;
1548 --enable-dvb) _dvb=yes ;;
1549 --disable-dvb) _dvb=no ;;
1550 --enable-dvbhead) _dvbhead=yes ;;
1551 --disable-dvbhead) _dvbhead=no ;;
1552 --enable-dxr2) _dxr2=yes ;;
1553 --disable-dxr2) _dxr2=no ;;
1554 --enable-dxr3) _dxr3=yes ;;
1555 --disable-dxr3) _dxr3=no ;;
1556 --enable-iconv) _iconv=yes ;;
1557 --disable-iconv) _iconv=no ;;
1558 --enable-langinfo) _langinfo=yes ;;
1559 --disable-langinfo) _langinfo=no ;;
1560 --enable-rtc) _rtc=yes ;;
1561 --disable-rtc) _rtc=no ;;
1562 --enable-mp1e) _mp1e=yes ;;
1563 --disable-mp1e) _mp1e=no ;;
1564 --enable-libdv) _libdv=yes ;;
1565 --disable-libdv) _libdv=no ;;
1566 --enable-ossaudio) _ossaudio=yes ;;
1567 --disable-ossaudio) _ossaudio=no ;;
1568 --enable-arts) _arts=yes ;;
1569 --disable-arts) _arts=no ;;
1570 --enable-esd) _esd=yes ;;
1571 --disable-esd) _esd=no ;;
1572 --enable-polyp) _polyp=yes ;;
1573 --disable-polyp) _polyp=no ;;
1574 --enable-jack) _jack=yes ;;
1575 --disable-jack) _jack=no ;;
1576 --enable-mad) _mad=yes ;;
1577 --disable-mad) _mad=no ;;
1578 --disable-toolame) _toolame=no ;;
1579 --disable-twolame) _twolame=no ;;
1580 --enable-liblzo) _liblzo=yes ;;
1581 --disable-liblzo) _liblzo=no ;;
1582 --enable-vorbis) _vorbis=yes ;;
1583 --disable-vorbis) _vorbis=no ;;
1584 --enable-internal-tremor) _tremor_internal=yes ;;
1585 --disable-internal-tremor) _tremor_internal=no ;;
1586 --enable-tremor-low) _tremor_low=yes ;;
1587 --disable-tremor-low) _tremor_low=no ;;
1588 --enable-external-tremor) _tremor=yes ;;
1589 --disable-external-tremor) _tremor=no ;;
1590 --enable-theora) _theora=yes ;;
1591 --disable-theora) _theora=no ;;
1592 --enable-mp3lib) _mp3lib=yes ;;
1593 --disable-mp3lib) _mp3lib=no ;;
1594 --enable-liba52) _liba52=yes ;;
1595 --disable-liba52) _liba52=no ;;
1596 --enable-libdts) _libdts=yes ;;
1597 --disable-libdts) _libdts=no ;;
1598 --enable-libmpeg2) _libmpeg2=yes ;;
1599 --disable-libmpeg2) _libmpeg2=no ;;
1600 --enable-musepack) _musepack=yes ;;
1601 --disable-musepack) _musepack=no ;;
1602 --enable-internal-matroska) _matroska_internal=yes ;;
1603 --disable-internal-matroska) _matroska_internal=no ;;
1604 --enable-internal-faad) _faad_internal=yes _faad_external=no ;;
1605 --disable-internal-faad) _faad_internal=no ;;
1606 --enable-external-faad) _faad_external=yes _faad_internal=no ;;
1607 --disable-external-faad) _faad_external=no ;;
1608 --enable-faac) _faac=yes ;;
1609 --disable-faac) _faac=no ;;
1610 --enable-ladspa) _ladspa=yes ;;
1611 --disable-ladspa) _ladspa=no ;;
1612 --enable-xmms) _xmms=yes ;;
1613 --disable-xmms) _xmms=no ;;
1614 --enable-dvdread) _dvdread=yes ;;
1615 --disable-dvdread) _dvdread=no ;;
1616 --enable-mpdvdkit) _dvdkit=yes ;;
1617 --disable-mpdvdkit) _dvdkit=no ;;
1618 # dvdnav disabled, it does not work
1619 # --enable-dvdnav) _dvdnav=yes ;;
1620 # --disable-dvdnav) _dvdnav=no ;;
1621 --enable-xanim) _xanim=yes ;;
1622 --disable-xanim) _xanim=no ;;
1623 --enable-real) _real=yes ;;
1624 --disable-real) _real=no ;;
1625 --enable-live) _live=yes ;;
1626 --disable-live) _live=no ;;
1627 --enable-xinerama) _xinerama=yes ;;
1628 --disable-xinerama) _xinerama=no ;;
1629 --enable-mga) _mga=yes ;;
1630 --disable-mga) _mga=no ;;
1631 --enable-xmga) _xmga=yes ;;
1632 --disable-xmga) _xmga=no ;;
1633 --enable-vm) _vm=yes ;;
1634 --disable-vm) _vm=no ;;
1635 --enable-xf86keysym) _xf86keysym=yes ;;
1636 --disable-xf86keysym) _xf86keysym=no ;;
1637 --enable-mlib) _mlib=yes ;;
1638 --disable-mlib) _mlib=no ;;
1639 --enable-sunaudio) _sunaudio=yes ;;
1640 --disable-sunaudio) _sunaudio=no ;;
1641 --enable-sgiaudio) _sgiaudio=yes ;;
1642 --disable-sgiaudio) _sgiaudio=no ;;
1643 --enable-alsa) _alsa=yes ;;
1644 --disable-alsa) _alsa=no ;;
1645 --enable-tv) _tv=yes ;;
1646 --disable-tv) _tv=no ;;
1647 --enable-edl) _edl=yes ;;
1648 --disable-edl) _edl=no ;;
1649 --enable-tv-bsdbt848) _tv_bsdbt848=yes ;;
1650 --disable-tv-bsdbt848) _tv_bsdbt848=no ;;
1651 --enable-tv-v4l) _tv_v4l=yes ;;
1652 --disable-tv-v4l) _tv_v4l=no ;;
1653 --enable-tv-v4l2) _tv_v4l2=yes ;;
1654 --disable-tv-v4l2) _tv_v4l2=no ;;
1655 --enable-fastmemcpy) _fastmemcpy=yes ;;
1656 --disable-fastmemcpy) _fastmemcpy=no ;;
1657 --enable-network) _network=yes ;;
1658 --disable-network) _network=no ;;
1659 --enable-winsock2) _winsock2=yes ;;
1660 --disable-winsock2) _winsock2=no ;;
1661 --enable-smb) _smbsupport=yes ;;
1662 --disable-smb) _smbsupport=no ;;
1663 --enable-vidix) _vidix=yes ;;
1664 --disable-vidix) _vidix=no ;;
1665 --enable-joystick) _joystick=yes ;;
1666 --disable-joystick) _joystick=no ;;
1667 --enable-xvid) _xvid=yes ;;
1668 --disable-xvid) _xvid=no ;;
1669 --enable-x264) _x264=yes ;;
1670 --disable-x264) _x264=no ;;
1671 --enable-divx4linux) _divx4linux=yes ;;
1672 --disable-divx4linux) _divx4linux=no ;;
1673 --enable-opendivx) _opendivx=yes ;;
1674 --disable-opendivx) _opendivx=no ;;
1675 --enable-libavcodec) _libavcodec=yes ;;
1676 --disable-libavcodec) _libavcodec=no ;;
1677 --enable-amr_nb) _amr_nb=yes ;;
1678 --disable-amr_nb) _amr_nb=no ;;
1679 --enable-amr_nb-fixed) _amr_nb_fixed=yes ;;
1680 --disable-amr_nb-fixed) _amr_nb_fixed=no ;;
1681 --enable-amr_wb) _amr_wb=yes ;;
1682 --disable-amr_wb) _amr_wb=no ;;
1683 --enable-codec=*) _libavcodecs="$_libavcodecs `echo $ac_option | cut -d '=' -f 2`" ;;
1684 --disable-codec=*) _libavcodecs=`echo $_libavcodecs | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
1685 --enable-libavformat) _libavformat=yes;;
1686 --disable-libavformat) _libavformat=no ;;
1687 --enable-libfame) _fame=yes ;;
1688 --disable-libfame) _fame=no ;;
1689 --enable-lirc) _lirc=yes ;;
1690 --disable-lirc) _lirc=no ;;
1691 --enable-lircc) _lircc=yes ;;
1692 --disable-lircc) _lircc=no ;;
1693 --enable-gui) _gui=yes ;;
1694 --disable-gui) _gui=no ;;
1695 --enable-termcap) _termcap=yes ;;
1696 --disable-termcap) _termcap=no ;;
1697 --enable-termios) _termios=yes ;;
1698 --disable-termios) _termios=no ;;
1699 --enable-3dfx) _3dfx=yes ;;
1700 --disable-3dfx) _3dfx=no ;;
1701 --enable-tdfxfb) _tdfxfb=yes ;;
1702 --disable-tdfxvid) _tdfxvid=no ;;
1703 --enable-tdfxvid) _tdfxvid=yes ;;
1704 --disable-tga) _tga=no ;;
1705 --enable-tga) _tga=yes ;;
1706 --disable-tdfxfb) _tdfxfb=no ;;
1707 --enable-directfb) _directfb=yes ;;
1708 --disable-directfb) _directfb=no ;;
1709 --enable-zr) _zr=yes ;;
1710 --disable-zr) _zr=no ;;
1711 --enable-bl) _bl=yes ;;
1712 --disable-bl) _bl=no ;;
1713 --enable-mtrr) _mtrr=yes ;;
1714 --disable-mtrr) _mtrr=no ;;
1715 --enable-largefiles) _largefiles=yes ;;
1716 --disable-largefiles) _largefiles=no ;;
1717 --enable-shm) _shm=yes ;;
1718 --disable-shm) _shm=no ;;
1719 --enable-select) _select=yes ;;
1720 --disable-select) _select=no ;;
1721 --enable-linux-devfs) _linux_devfs=yes ;;
1722 --disable-linux-devfs) _linux_devfs=no ;;
1723 --enable-cdparanoia) _cdparanoia=yes ;;
1724 --disable-cdparanoia) _cdparanoia=no ;;
1725 --enable-big-endian) _big_endian=yes ;;
1726 --disable-big-endian) _big_endian=no ;;
1727 --enable-freetype) _freetype=yes ;;
1728 --disable-freetype) _freetype=no ;;
1729 --enable-fontconfig) _fontconfig=yes ;;
1730 --disable-fontconfig) _fontconfig=no ;;
1731 --enable-unrarlib) _unrarlib=yes ;;
1732 --disable-unrarlib) _unrarlib=no ;;
1733 --enable-ftp) _ftp=yes ;;
1734 --disable-ftp) _ftp=no ;;
1735 --enable-vstream) _vstream=yes ;;
1736 --disable-vstream) _vstream=no ;;
1737 --enable-pthreads) _pthreads=yes ;;
1738 --disable-pthreads) _pthreads=no ;;
1740 --enable-fribidi) _fribidi=yes ;;
1741 --disable-fribidi) _fribidi=no ;;
1743 --enable-enca) _enca=yes ;;
1744 --disable-enca) _enca=no ;;
1746 --enable-inet6) _inet6=yes ;;
1747 --disable-inet6) _inet6=no ;;
1749 --enable-gethostbyname2) _gethostbyname2=yes ;;
1750 --disable-gethostbyname2) _gethostbyname2=no ;;
1752 --enable-dga) _dga=auto ;; # as we don't know if it's 1 or 2
1753 --enable-dga=*) _dga=`echo $ac_option | cut -d '=' -f 2` ;;
1754 --disable-dga) _dga=no ;;
1756 --enable-shared-pp) _shared_pp=yes ;;
1757 --disable-shared-pp) _shared_pp=no ;;
1759 --enable-menu) _menu=yes ;;
1760 --disable-menu) _menu=no ;;
1762 --enable-qtx) _qtx=yes ;;
1763 --disable-qtx) _qtx=no ;;
1765 --enable-macosx) _macosx=yes ;;
1766 --disable-macosx) _macosx=no ;;
1767 --enable-macosx-finder-support) _macosx_finder_support=yes ;;
1768 --disable-macosx-finder-support) _macosx_finder_support=no ;;
1769 --enable-macosx-bundle) _macosx_bundle=yes;;
1770 --disable-macosx-bundle) _macosx_bundle=no;;
1772 --enable-sortsub) _sortsub=yes ;;
1773 --disable-sortsub) _sortsub=no ;;
1775 --charset=*)
1776 _charset=`echo $ac_option | cut -d '=' -f 2`
1778 --language=*)
1779 _language=`echo $ac_option | cut -d '=' -f 2`
1781 # dvdnav disabled, it does not work
1782 # --with-libdvdnav=*)
1783 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1784 # _dvdnav=yes
1785 # ;;
1787 --with-codecsdir=*)
1788 _win32libdir=`echo $ac_option | cut -d '=' -f 2`
1789 _xanimlibdir=`echo $ac_option | cut -d '=' -f 2`
1790 _reallibdir=`echo $ac_option | cut -d '=' -f 2`
1792 --with-win32libdir=*)
1793 _win32libdir=`echo $ac_option | cut -d '=' -f 2`
1794 _win32=yes
1796 --with-xanimlibdir=*)
1797 _xanimlibdir=`echo $ac_option | cut -d '=' -f 2`
1798 _xanim=yes
1800 --with-reallibdir=*)
1801 _reallibdir=`echo $ac_option | cut -d '=' -f 2`
1802 _real=yes
1804 --with-livelibdir=*)
1805 _livelibdir=`echo $ac_option | cut -d '=' -f 2`
1807 --with-toolamedir=*)
1808 _toolamedir=`echo $ac_option | cut -d '=' -f 2`
1810 --with-mlibdir=*)
1811 _mlibdir=`echo $ac_option | cut -d '=' -f 2`
1812 _mlib=yes
1815 --with-xmmslibdir=*)
1816 _xmmslibdir=`echo $ac_option | cut -d '=' -f 2`
1819 --with-xmmsplugindir=*)
1820 _xmmsplugindir=`echo $ac_option | cut -d '=' -f 2`
1823 --enable-profile)
1824 _profile='-p'
1826 --disable-profile)
1827 _profile=
1829 --enable-debug)
1830 _debug='-g'
1832 --enable-debug=*)
1833 _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1835 --disable-debug)
1836 _debug=
1838 --enable-crash-debug)
1839 _crash_debug=yes
1841 --disable-crash-debug)
1842 _crash_debug=no
1844 --enable-sighandler)
1845 _sighandler=yes
1847 --disable-sighandler)
1848 _sighandler=no
1851 --enable-sse) _sse=yes ;;
1852 --disable-sse) _sse=no ;;
1853 --enable-sse2) _sse2=yes ;;
1854 --disable-sse2) _sse2=no ;;
1855 --enable-mmx2) _mmx2=yes ;;
1856 --disable-mmx2) _mmx2=no ;;
1857 --enable-3dnow) _3dnow=yes ;;
1858 --disable-3dnow) _3dnow=no _3dnowex=no ;;
1859 --enable-3dnowex) _3dnow=yes _3dnowex=yes ;;
1860 --disable-3dnowex) _3dnowex=no ;;
1861 --enable-altivec) _altivec=yes ;;
1862 --disable-altivec) _altivec=no ;;
1863 --enable-mmx) _mmx=yes ;;
1864 --disable-mmx) # 3Dnow! and MMX2 require MMX
1865 _3dnow=no _3dnowex=no _mmx=no _mmx2=no ;;
1867 --enable-win32) _win32=yes ;;
1868 --disable-win32) _win32=no _dshow=no ;;
1869 --enable-dshow) _win32=yes _dshow=yes ;;
1870 --disable-dshow) _dshow=no ;;
1872 --with-x11incdir=*)
1873 _inc_x11=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1875 --with-x11libdir=*)
1876 _x11_paths=`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1878 --with-dxr2incdir=*)
1879 _inc_dxr2=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1881 --with-xvmclib=*)
1882 _xvmclib=`echo $ac_option | cut -d '=' -f 2`
1884 --with-dvbincdir=*)
1885 _inc_dvb=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1887 --with-xvidlibdir=*)
1888 _ld_xvid=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1890 --with-xvidincdir=*)
1891 _inc_xvid=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1893 --with-dtslibdir=*)
1894 _ld_libdts=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1896 --with-dtsincdir=*)
1897 _inc_libdts=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1899 --with-x264libdir=*)
1900 _ld_x264=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1902 --with-x264incdir=*)
1903 _inc_x264=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
1905 --with-sdl-config=*)
1906 _sdlconfig=`echo $ac_option | cut -d '=' -f 2`
1908 --with-freetype-config=*)
1909 _freetypeconfig=`echo $ac_option | cut -d '=' -f 2`
1911 --with-fribidi-config=*)
1912 _fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
1914 --with-gtk-config=*)
1915 _gtkconfig=`echo $ac_option | cut -d '=' -f 2`
1917 --with-glib-config=*)
1918 _glibconfig=`echo $ac_option | cut -d '=' -f 2`
1920 # dvdnav disabled, it does not work
1921 # --with-dvdnav-config=*)
1922 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
1923 # ;;
1924 --with-madlibdir=*)
1925 _ld_mad=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1927 --with-cdparanoiaincdir=*)
1928 _inc_cdparanoia=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1930 --with-cdparanoialibdir=*)
1931 _ld_cdparanoia=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1933 --with-termcaplib=*)
1934 _ld_termcap=-l`echo $ac_option | cut -d '=' -f 2`
1935 _termcap=yes
1937 --prefix=*)
1938 _prefix=`echo $ac_option | cut -d '=' -f 2`
1940 --bindir=*)
1941 _bindir=`echo $ac_option | cut -d '=' -f 2`
1943 --datadir=*)
1944 _datadir=`echo $ac_option | cut -d '=' -f 2`
1946 --mandir=*)
1947 _mandir=`echo $ac_option | cut -d '=' -f 2`
1949 --confdir=*)
1950 _confdir=`echo $ac_option | cut -d '=' -f 2`
1952 --libdir=*)
1953 _libdir=`echo $ac_option | cut -d '=' -f 2`
1957 echo "Unknown parameter: $ac_option"
1958 exit 1
1961 esac
1962 done
1964 # Atmos: moved this here, to be correct, if --prefix is specified
1965 test -z "$_bindir" && _bindir="$_prefix/bin"
1966 test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
1967 test -z "$_mandir" && _mandir="$_prefix/man"
1968 test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
1969 test -z "$_libdir" && _libdir="$_prefix/lib"
1970 test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
1972 if x86 ; then
1973 # Checking assembler (_as) compatibility...
1974 # Added workaround for older as that reads from stdin by default - atmos
1975 as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
1976 echocheck "assembler ($_as $as_version)"
1978 _pref_as_version='2.9.1'
1979 echo 'nop' > $TMPS
1980 if test "$_mmx" = yes ; then
1981 echo 'emms' >> $TMPS
1983 if test "$_3dnow" = yes ; then
1984 _pref_as_version='2.10.1'
1985 echo 'femms' >> $TMPS
1987 if test "$_3dnowex" = yes ; then
1988 _pref_as_version='2.10.1'
1989 echo 'pswapd %mm0, %mm0' >> $TMPS
1991 if test "$_mmx2" = yes ; then
1992 _pref_as_version='2.10.1'
1993 echo 'movntq %mm0, (%eax)' >> $TMPS
1995 if test "$_sse" = yes ; then
1996 _pref_as_version='2.10.1'
1997 echo 'xorps %xmm0, %xmm0' >> $TMPS
1999 #if test "$_sse2" = yes ; then
2000 # _pref_as_version='2.11'
2001 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2003 $_as $TMPS -o $TMPO > /dev/null 2>&1 || as_verc_fail=yes
2005 if test "$as_verc_fail" != yes ; then
2006 echores "ok"
2007 else
2008 echores "failed"
2009 echo "Upgrade binutils to ${_pref_as_version} ..."
2010 die "obsolete binutils version"
2014 if ppc ; then
2016 # check if altivec is supported by the compiler, and how to enable it
2018 _altivec_gcc_flags=''
2020 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2021 echocheck "GCC altivec support"
2023 p=''
2024 cat > $TMPC << EOF
2025 int main() {
2026 return 0;
2029 FSF_flags='-maltivec -mabi=altivec'
2030 Darwin_flags='-faltivec -D__APPLE_ALTIVEC__'
2032 # check for Darwin-style flags first, since
2033 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2034 # accepts but ignores FSF-style flags...
2036 if test -z "$p"; then
2037 cc_check $Darwin_flags && p='Darwin'
2039 if test -z "$p"; then
2040 cc_check $FSF_flags && p='FSF'
2043 case $p in
2044 FSF) _altivec_gcc_flags="$FSF_flags" _altivec=yes ;;
2045 Darwin) _altivec_gcc_flags="$Darwin_flags" _altivec=yes ;;
2046 *) _altivec=no ;;
2047 esac
2049 if test -z "$p"; then
2050 p=none
2051 else
2052 p="$p-style ($_altivec_gcc_flags)"
2055 echores "$p"
2058 # check if <altivec.h> should be included
2060 _def_altivec_h='#undef HAVE_ALTIVEC_H'
2062 if test "$_altivec" = yes ; then
2063 echocheck "altivec.h"
2064 cat > $TMPC << EOF
2065 #include <altivec.h>
2066 int main(void) { return 0; }
2068 _have_altivec_h=no
2069 cc_check $_altivec_gcc_flags && _have_altivec_h=yes
2070 if test "$_have_altivec_h" = yes ; then
2071 _def_altivec_h='#define HAVE_ALTIVEC_H 1'
2073 echores "$_have_altivec_h"
2076 # disable runtime cpudetection if
2077 # - we cannot generate altivec code
2078 # - altivec is disabled by the user
2080 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no ; then
2081 _runtime_cpudetection=no
2084 # show that we are optimizing for altivec (if enabled and supported)
2086 if test "$_runtime_cpudetection" = no -a "$_altivec" = yes ; then
2087 _optimizing="$_optimizing altivec"
2090 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2092 if test "$_altivec" = yes ; then
2093 _mcpu="$_mcpu $_altivec_gcc_flags"
2096 # setup _def_altivec correctly
2098 if test "$_altivec" = yes ; then
2099 _def_altivec='#define HAVE_ALTIVEC 1'
2100 else
2101 _def_altivec='#undef HAVE_ALTIVEC'
2105 _def_mmx='#undef HAVE_MMX'
2106 test "$_mmx" = yes && _def_mmx='#define HAVE_MMX 1'
2107 _def_mmx2='#undef HAVE_MMX2'
2108 test "$_mmx2" = yes && _def_mmx2='#define HAVE_MMX2 1'
2109 _def_3dnow='#undef HAVE_3DNOW'
2110 test "$_3dnow" = yes && _def_3dnow='#define HAVE_3DNOW 1'
2111 _def_3dnowex='#undef HAVE_3DNOWEX'
2112 test "$_3dnowex" = yes && _def_3dnowex='#define HAVE_3DNOWEX 1'
2113 _def_sse='#undef HAVE_SSE'
2114 test "$_sse" = yes && _def_sse='#define HAVE_SSE 1'
2115 _def_sse2='#undef HAVE_SSE2'
2116 test "$_sse2" = yes && _def_sse2='#define HAVE_SSE2 1'
2118 # Checking kernel version...
2119 if x86 && linux ; then
2120 _k_verc_problem=no
2121 kernel_version=`uname -r 2>&1`
2122 echocheck "$system_name kernel version"
2123 case "$kernel_version" in
2124 '') kernel_version="?.??"; _k_verc_fail=yes;;
2125 [0-1].[0-9].[0-9]*|2.[0-3].[0-9]*)
2126 _k_verc_problem=yes;;
2127 esac
2128 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2129 _k_verc_fail=yes
2131 if test "$_k_verc_fail" ; then
2132 echores "$kernel_version, fail"
2133 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2134 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2135 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2136 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2137 echo "2.2.x you must upgrade it to get SSE support!"
2138 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2139 else
2140 echores "$kernel_version, ok"
2144 if test "$_vidix" = auto ; then
2145 _vidix=no
2146 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2147 x86 && _vidix=yes
2148 ppc && linux && _vidix=yes
2149 alpha && linux && _vidix=yes
2150 qnx && _vidix=no
2151 sunos && _vidix=no
2152 beos && _vidix=no
2155 echocheck "mplayer binary name"
2156 if win32 ; then
2157 _prg="mplayer.exe"
2158 _prg_mencoder="mencoder.exe"
2159 else
2160 _prg="mplayer"
2161 _prg_mencoder="mencoder"
2163 echores $_prg
2166 # On QNX we must link to libph - Gabucino
2167 if qnx ; then
2168 _ld_arch="$_ld_arch -lph"
2171 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2172 _awk=
2173 if test "$_vidix" = yes ; then
2174 _awk_verc_fail=yes
2175 echocheck "awk"
2176 for _awk in mawk gawk nawk awk; do
2177 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2178 _awk_verc_fail=no
2179 break
2181 done
2182 test "$_awk_verc_fail" = yes && _awk=no
2183 echores "$_awk"
2184 if test "$_awk_verc_fail" = yes; then
2185 echo "VIDIX needs awk, but no working implementation was found!"
2186 echo "Try the GNU version, which can be downloaded from:"
2187 echo "ftp://ftp.gnu.org/gnu/gawk/"
2188 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2189 die "no awk"
2193 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2194 if irix ; then
2195 _ranlib='ar -r'
2196 elif linux ; then
2197 _ranlib='true'
2200 ######################
2201 # MAIN TESTS GO HERE #
2202 ######################
2205 echocheck "extra headers"
2206 if test "$_inc_extra" ; then
2207 echores "$_inc_extra"
2208 else
2209 echores "none"
2213 echocheck "extra libs"
2214 if test "$_ld_extra" ; then
2215 echores "$_ld_extra"
2216 else
2217 echores "none"
2220 echocheck "-lposix"
2221 cat > $TMPC <<EOF
2222 int main(void) { return 0; }
2224 if cc_check -lposix ; then
2225 _ld_arch="$_ld_arch -lposix"
2226 echores "yes"
2227 else
2228 echores "no"
2231 echocheck "-lm"
2232 cat > $TMPC <<EOF
2233 int main(void) { return 0; }
2235 if cc_check -lm ; then
2236 _ld_lm="-lm"
2237 echores "yes"
2238 else
2239 _ld_lm=""
2240 echores "no"
2243 # Checking for localization ...
2244 # CSAK EGY MARADHAT - A HEGYLAKO
2245 echocheck "i18n"
2246 if test "$_i18n" != no ; then
2247 cat > $TMPC <<EOF
2248 #include <libintl.h>
2249 int main(void) { gettext("test"); return 0; }
2251 _i18n=no
2252 _i18n_libs=""
2253 if test "$_i18n" = auto ; then
2254 cc_check && _i18n=yes
2255 else
2256 for i18n_lib in "" "-lintl"; do
2257 cc_check $i18n_lib && _i18n=yes && _i18n_libs=$i18n_lib && break
2258 done
2261 if test "$_i18n" = yes ; then
2262 _def_i18n='#define USE_I18N 1'
2263 else
2264 _def_i18n='#undef USE_I18N'
2266 if test -z "$_i18n_libs" ; then
2267 echores "$_i18n"
2268 else
2269 echores "$_i18n (using $_i18n_libs)"
2273 echocheck "langinfo"
2274 if test "$_langinfo" = auto ; then
2275 cat > $TMPC <<EOF
2276 #include <langinfo.h>
2277 int main(void) { nl_langinfo(CODESET); return 0; }
2279 _langinfo=no
2280 cc_check && _langinfo=yes
2282 if test "$_langinfo" = yes ; then
2283 _def_langinfo='#define USE_LANGINFO 1'
2284 else
2285 _def_langinfo='#undef USE_LANGINFO'
2287 echores "$_langinfo"
2290 echocheck "language"
2291 test -z "$_language" && _language=$LINGUAS
2292 _language=`echo $_language | sed 's/,/ /g'`
2293 echo $_language | grep all > /dev/null || LANGUAGES="$_language en"
2294 for lang in $_language ; do
2295 test "$lang" = all && lang=en
2296 if test -f "help/help_mp-${lang}.h" ; then
2297 _language=$lang
2298 break
2299 else
2300 echo -n "$lang not found, "
2301 _language=`echo $_language | sed "s/$lang *//"`
2303 done
2304 test -z "$_language" && _language=en
2305 _mp_help="help/help_mp-${_language}.h"
2306 test -f $_mp_help || die "$_mp_help not found"
2307 for lang in $LANGUAGES ; do
2308 if test -f "DOCS/man/$lang/mplayer.1" ; then
2309 MAN_LANG="$MAN_LANG $lang"
2311 done
2312 _doc_lang=$_language
2313 test -d DOCS/xml/$_doc_lang || _doc_lang=en
2314 echores "using $_language (man pages: $MAN_LANG)"
2317 echocheck "enable sighandler"
2318 if test "$_sighandler" = yes ; then
2319 _def_sighandler='#define ENABLE_SIGHANDLER 1'
2320 else
2321 _def_sighandler='#undef ENABLE_SIGHANDLER'
2323 echores "$_sighandler"
2325 echocheck "runtime cpudetection"
2326 if test "$_runtime_cpudetection" = yes ; then
2327 _optimizing="Runtime CPU-Detection enabled"
2328 _def_runtime_cpudetection='#define RUNTIME_CPUDETECT 1'
2329 else
2330 _def_runtime_cpudetection='#undef RUNTIME_CPUDETECT'
2332 echores "$_runtime_cpudetection"
2335 echocheck "restrict keyword"
2336 for restrict_keyword in restrict __restrict __restrict__ ; do
2337 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2338 if cc_check; then
2339 _def_restrict_keyword=$restrict_keyword
2340 break;
2342 done
2343 if [ -n "$_def_restrict_keyword" ]; then
2344 echores "$_def_restrict_keyword"
2345 else
2346 echores "none"
2348 # Avoid infinite recursion loop ("#define restrict restrict")
2349 if [ "$_def_restrict_keyword" != "restrict" ]; then
2350 _def_restrict_keyword="#define restrict $_def_restrict_keyword"
2351 else
2352 _def_restrict_keyword=""
2356 echocheck "__builtin_expect"
2357 # GCC branch prediction hint
2358 cat > $TMPC << EOF
2359 int foo (int a) {
2360 a = __builtin_expect (a, 10);
2361 return a == 10 ? 0 : 1;
2363 int main() { return foo(10) && foo(0); }
2365 _builtin_expect=no
2366 cc_check && _builtin_expect=yes
2367 if test "$_builtin_expect" = yes ; then
2368 _def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1'
2369 else
2370 _def_builtin_expect='#undef HAVE_BUILTIN_EXPECT'
2372 echores "$_builtin_expect"
2375 echocheck "kstat"
2376 cat > $TMPC << EOF
2377 #include <kstat.h>
2378 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2380 _kstat=no
2381 cc_check -lkstat && _kstat=yes
2382 if test "$_kstat" = yes ; then
2383 _ld_arch="-lkstat $_ld_arch"
2385 if test "$_kstat" = yes ; then
2386 _def_kstat="#define HAVE_LIBKSTAT 1"
2387 else
2388 _def_kstat="#undef HAVE_LIBKSTAT"
2390 echores "$_kstat"
2393 echocheck "posix4"
2394 # required for nanosleep on some systems
2395 cat > $TMPC << EOF
2396 #include <time.h>
2397 int main(void) { (void) nanosleep(0, 0); return 0; }
2399 _posix4=no
2400 cc_check -lposix4 && _posix4=yes
2401 if test "$_posix4" = yes ; then
2402 _ld_arch="-lposix4 $_ld_arch"
2404 echores "$_posix4"
2406 echocheck "-std=gnu99"
2407 cat > $TMPC << EOF
2408 int main(void) { return 0; }
2410 _gnu99=no
2411 cc_check -std=gnu99 && _gnu99=yes
2412 if test "$_gnu99" = yes ; then
2413 _opt_gnu99="-std=gnu99"
2414 else
2415 _opt_gnu99=""
2417 echores "$_gnu99"
2419 echocheck "lrintf"
2420 cat > $TMPC << EOF
2421 #include <math.h>
2422 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2424 _lrintf=no
2425 cc_check $_opt_gnu99 -D_GNU_SOURCE $_ld_lm && _lrintf=yes
2426 if test "$_lrintf" = yes ; then
2427 _def_lrintf="#define HAVE_LRINTF 1"
2428 else
2429 _def_lrintf="#undef HAVE_LRINTF"
2431 echores "$_lrintf"
2433 echocheck "round"
2434 cat > $TMPC << EOF
2435 #include <math.h>
2436 int main(void) { (void) round(0.0); return 0; }
2438 _round=no
2439 cc_check $_ld_lm && _round=yes
2440 if test "$_round" = yes ; then
2441 _def_round="#define HAVE_ROUND 1"
2442 else
2443 _def_round="#undef HAVE_ROUND"
2445 echores "$_round"
2447 echocheck "nanosleep"
2448 # also check for nanosleep
2449 cat > $TMPC << EOF
2450 #include <time.h>
2451 int main(void) { (void) nanosleep(0, 0); return 0; }
2453 _nanosleep=no
2454 cc_check $_ld_arch && _nanosleep=yes
2455 if test "$_nanosleep" = yes ; then
2456 _def_nanosleep='#define HAVE_NANOSLEEP 1'
2457 else
2458 _def_nanosleep='#undef HAVE_NANOSLEEP'
2460 echores "$_nanosleep"
2463 echocheck "socklib"
2464 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2465 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2466 cat > $TMPC << EOF
2467 #include <netdb.h>
2468 int main(void) { (void) gethostbyname(0); return 0; }
2470 cc_check -lsocket && _ld_sock="-lsocket"
2471 cc_check -lnsl && _ld_sock="-lnsl"
2472 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
2473 cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet"
2474 cc_check -lsocket -lbind && _ld_sock="-lsocket -lbind"
2475 if test $_winsock2 = auto && not cygwin ; then
2476 _winsock2=no
2477 cat > $TMPC << EOF
2478 #include <winsock2.h>
2479 int main(void) { (void) gethostbyname(0); return 0; }
2481 cc_check -lws2_32 && _ld_sock="-lws2_32" && _winsock2=yes
2483 if test "$_ld_sock" ; then
2484 echores "yes (using $_ld_sock)"
2485 else
2486 echores "no"
2490 if test $_winsock2 = yes ; then
2491 _ld_sock="-lws2_32"
2492 _def_winsock2='#define HAVE_WINSOCK2 1'
2493 else
2494 _def_winsock2='#undef HAVE_WINSOCK2'
2498 _use_aton=no
2499 echocheck "inet_pton()"
2500 cat > $TMPC << EOF
2501 #include <sys/types.h>
2502 #include <sys/socket.h>
2503 #include <arpa/inet.h>
2504 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2506 if test "$_winsock2" = yes ; then
2507 echores "not needed (using winsock2 functions)"
2508 elif cc_check $_ld_sock ; then
2509 # NOTE: Linux has libresolv but does not need it
2511 echores "yes (using $_ld_sock)"
2512 elif cc_check $_ld_sock -lresolv ; then
2513 # NOTE: needed for SunOS at least
2514 _ld_sock="$_ld_sock -lresolv"
2515 echores "yes (using $_ld_sock)"
2516 else
2517 echores "no (=> i'll try inet_aton next)"
2519 echocheck "inet_aton()"
2520 cat > $TMPC << EOF
2521 #include <sys/types.h>
2522 #include <sys/socket.h>
2523 #include <arpa/inet.h>
2524 int main(void) { (void) inet_aton(0, 0); return 0; }
2526 _use_aton=yes
2527 if cc_check $_ld_sock ; then
2528 # NOTE: Linux has libresolv but does not need it
2530 echores "yes (using $_ld_sock)"
2531 elif cc_check $_ld_sock -lresolv ; then
2532 # NOTE: needed for SunOS at least
2533 _ld_sock="$_ld_sock -lresolv"
2534 echores "yes (using $_ld_sock)"
2535 else
2536 _use_aton=no
2537 _network=no
2538 echores "no (=> network support disabled)"
2542 _def_use_aton='#undef USE_ATON'
2543 if test "$_use_aton" != no; then
2544 _def_use_aton='#define USE_ATON 1'
2548 echocheck "inttypes.h (required)"
2549 cat > $TMPC << EOF
2550 #include <inttypes.h>
2551 int main(void) { return 0; }
2553 _inttypes=no
2554 cc_check && _inttypes=yes
2555 if test "$_inttypes" = yes ; then
2556 # nothing to do
2558 else
2559 echores "no"
2560 echocheck "bitypes.h (inttypes.h predecessor)"
2561 cat > $TMPC << EOF
2562 #include <sys/bitypes.h>
2563 int main(void) { return 0; }
2565 _inttypes=no
2566 cc_check && _inttypes=yes
2567 if test "$_inttypes" = yes ; then
2568 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."
2569 else
2570 die "Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2573 echores "$_inttypes"
2576 echocheck "int_fastXY_t in inttypes.h"
2577 cat > $TMPC << EOF
2578 #include <inttypes.h>
2579 int main(void) {
2580 volatile int_fast16_t v= 0;
2581 return v; }
2583 _fast_inttypes=no
2584 cc_check && _fast_inttypes=yes
2585 if test "$_fast_inttypes" = yes ; then
2586 # nothing to do
2588 else
2589 _def_fast_inttypes='
2590 typedef signed char int_fast8_t;
2591 typedef signed int int_fast16_t;
2592 typedef signed int int_fast32_t;
2593 typedef unsigned char uint_fast8_t;
2594 typedef unsigned int uint_fast16_t;
2595 typedef unsigned int uint_fast32_t;'
2597 echores "$_fast_inttypes"
2600 echocheck "word size"
2601 _mp_wordsize="#undef MP_WORDSIZE"
2602 cat > $TMPC << EOF
2603 #include <stdio.h>
2604 #include <sys/types.h>
2605 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2607 cc_check && _wordsize=`$TMPO` && _mp_wordsize="#define MP_WORDSIZE $_wordsize"
2608 echores "$_wordsize"
2611 echocheck "stddef.h"
2612 cat > $TMPC << EOF
2613 #include <stddef.h>
2614 int main(void) { return 0; }
2616 _stddef=no
2617 cc_check && _stddef=yes
2618 if test "$_stddef" = yes ; then
2619 _def_stddef='#define HAVE_STDDEF_H 1'
2620 else
2621 _def_stddef='#undef HAVE_STDDEF_H'
2623 echores "$_stddef"
2626 echocheck "malloc.h"
2627 cat > $TMPC << EOF
2628 #include <malloc.h>
2629 int main(void) { (void) malloc(0); return 0; }
2631 _malloc=no
2632 cc_check && _malloc=yes
2633 if test "$_malloc" = yes ; then
2634 _def_malloc='#define HAVE_MALLOC_H 1'
2635 else
2636 _def_malloc='#undef HAVE_MALLOC_H'
2638 # malloc.h emits a warning in FreeBSD and OpenBSD
2639 (freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H'
2640 echores "$_malloc"
2643 echocheck "memalign()"
2644 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2645 cat > $TMPC << EOF
2646 #include <malloc.h>
2647 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2649 _memalign=no
2650 cc_check && _memalign=yes
2651 if test "$_memalign" = yes ; then
2652 _def_memalign='#define HAVE_MEMALIGN 1'
2653 else
2654 _def_memalign='#undef HAVE_MEMALIGN'
2656 echores "$_memalign"
2659 echocheck "alloca.h"
2660 cat > $TMPC << EOF
2661 #include <alloca.h>
2662 int main(void) { (void) alloca(0); return 0; }
2664 _alloca=no
2665 cc_check && _alloca=yes
2666 if cc_check ; then
2667 _def_alloca='#define HAVE_ALLOCA_H 1'
2668 else
2669 _def_alloca='#undef HAVE_ALLOCA_H'
2671 echores "$_alloca"
2674 echocheck "mman.h"
2675 cat > $TMPC << EOF
2676 #include <sys/types.h>
2677 #include <sys/mman.h>
2678 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2680 _mman=no
2681 cc_check && _mman=yes
2682 if test "$_mman" = yes ; then
2683 _def_mman='#define HAVE_SYS_MMAN_H 1'
2684 else
2685 _def_mman='#undef HAVE_SYS_MMAN_H'
2687 echores "$_mman"
2689 cat > $TMPC << EOF
2690 #include <sys/types.h>
2691 #include <sys/mman.h>
2692 int main(void) { void *p = MAP_FAILED; return 0; }
2694 _mman_has_map_failed=no
2695 cc_check && _mman_has_map_failed=yes
2696 if test "$_mman_has_map_failed" = yes ; then
2697 _def_mman_has_map_failed=''
2698 else
2699 _def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)'
2702 echocheck "dynamic loader"
2703 cat > $TMPC << EOF
2704 #include <dlfcn.h>
2705 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2707 _dl=no
2708 if cc_check ; then
2709 _dl=yes
2710 elif cc_check -ldl ; then
2711 _dl=yes
2712 _ld_dl='-ldl'
2714 if test "$_dl" = yes ; then
2715 _def_dl='#define HAVE_LIBDL 1'
2716 else
2717 _def_dl='#undef HAVE_LIBDL'
2719 echores "$_dl"
2722 echocheck "dynamic a/v plugins support"
2723 if test "$_dl" = no ; then
2724 _dynamic_plugins=no
2726 if test "$_dynamic_plugins" = yes ; then
2727 _def_dynamic_plugins='#define DYNAMIC_PLUGINS 1'
2728 else
2729 _def_dynamic_plugins='#undef DYNAMIC_PLUGINS'
2731 echores "$_dynamic_plugins"
2734 #echocheck "dynamic linking"
2735 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2736 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2737 #cat > $TMPC << EOF
2738 #int main(void) { return 0; }
2739 #EOF
2740 #if cc_check -rdynamic ; then
2741 # _ld_dl_dynamic='-rdynamic'
2742 #elif cc_check -Bdynamic ; then
2743 # _ld_dl_dynamic='-Bdynamic'
2744 #elif cc_check ; then
2745 # _ld_dl_dynamic=''
2747 #echores "using $_ld_dl_dynamic"
2749 _def_threads='#undef HAVE_THREADS'
2751 echocheck "pthread"
2752 _ld_pthread=''
2753 if test "$_pthreads" != no ; then
2754 cat > $TMPC << EOF
2755 #include <pthread.h>
2756 void* func(void *arg) { return arg; }
2757 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2759 if hpux ; then
2760 _ld_pthread=''
2761 elif ( cc_check -lpthreadGC2 && $TMPO ) ; then # mingw pthreads-win32
2762 _ld_pthread='-lpthreadGC2'
2763 elif ( cc_check && $TMPO ) ; then # QNX
2764 _ld_pthread=' ' # _ld_pthread='' would disable pthreads, but the test worked
2765 elif ( cc_check -lpthread && $TMPO ) ; then
2766 _ld_pthread='-lpthread'
2767 elif ( cc_check -pthread && $TMPO ) ; then
2768 _ld_pthread='-pthread'
2769 else
2770 if test "$_ld_static" ; then
2771 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2772 if ( cc_check -lpthread ) ; then
2773 _ld_pthread='-lpthread'
2774 elif ( cc_check -pthread ) ; then
2775 _ld_pthread='-pthread'
2776 else
2777 _ld_pthread=''
2779 else
2780 _ld_pthread=''
2784 if test "$_ld_pthread" != '' ; then
2785 echores "yes (using $_ld_pthread)"
2786 _pthreads='yes'
2787 _def_pthreads='#define HAVE_PTHREADS 1'
2788 _def_threads='#define HAVE_THREADS 1'
2789 else
2790 echores "no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)"
2791 _pthreads=''
2792 _def_pthreads='#undef HAVE_PTHREADS'
2793 _nas=no ; _tv_v4l=no ; _macosx=no
2794 if not mingw32 ; then
2795 _win32=no
2800 echocheck "iconv"
2801 if test "$_iconv" = auto ; then
2802 _iconv_tmp='#include <iconv.h>'
2804 cat > $TMPC << EOF
2805 #include <stdio.h>
2806 #include <unistd.h>
2807 $_iconv_tmp
2808 #define INBUFSIZE 1024
2809 #define OUTBUFSIZE 4096
2811 char inbuffer[INBUFSIZE];
2812 char outbuffer[OUTBUFSIZE];
2814 int main(void) {
2815 size_t numread;
2816 iconv_t icdsc;
2817 char *tocode="UTF-8";
2818 char *fromcode="cp1250";
2819 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2820 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2821 char *iptr=inbuffer;
2822 char *optr=outbuffer;
2823 size_t inleft=numread;
2824 size_t outleft=OUTBUFSIZE;
2825 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2826 != (size_t)(-1)) {
2827 write (1, outbuffer, OUTBUFSIZE - outleft);
2830 if (iconv_close(icdsc) == -1)
2835 _iconv=no
2836 if cc_check $_ld_lm ; then
2837 _iconv=yes
2838 elif cc_check $_ld_lm -liconv ; then
2839 _iconv=yes
2840 _ld_iconv='-liconv'
2841 elif cc_check $_ld_lm -liconv $_ld_dl ; then
2842 _iconv=yes
2843 _ld_iconv='-liconv $_ld_dl'
2846 if test "$_iconv" = yes ; then
2847 _def_iconv='#define USE_ICONV 1'
2848 else
2849 _def_iconv='#undef USE_ICONV'
2851 echores "$_iconv"
2854 echocheck "sys/soundcard.h"
2855 cat > $TMPC << EOF
2856 #include <sys/soundcard.h>
2857 int main(void) { return 0; }
2859 _sys_soundcard=no
2860 cc_check && _sys_soundcard=yes
2861 if test "$_sys_soundcard" = yes ; then
2862 _def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1'
2863 _inc_soundcard='#include <sys/soundcard.h>'
2864 else
2865 _def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H'
2867 echores "$_sys_soundcard"
2869 if test "$_sys_soundcard" != yes ; then
2870 echocheck "soundcard.h"
2871 cat > $TMPC << EOF
2872 #include <soundcard.h>
2873 int main(void) { return 0; }
2875 _soundcard=no
2876 cc_check && _soundcard=yes
2877 if linux || test "$_ossaudio" != no ; then
2878 # use soundcard.h on Linux, or when OSS support is enabled
2879 echores "$_soundcard"
2880 else
2881 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2882 echores "$_soundcard, but ignored!"
2883 _soundcard=no
2885 if test "$_soundcard" = yes ; then
2886 _def_soundcard='#define HAVE_SOUNDCARD_H 1'
2887 _inc_soundcard='#include <soundcard.h>'
2888 else
2889 _def_soundcard='#undef HAVE_SOUNDCARD_H'
2891 else
2892 _def_soundcard='#undef HAVE_SOUNDCARD_H'
2896 echocheck "sys/dvdio.h"
2897 cat > $TMPC << EOF
2898 #include <unistd.h>
2899 #include <sys/dvdio.h>
2900 int main(void) { return 0; }
2902 _dvdio=no
2903 cc_check && _dvdio=yes
2904 if test "$_dvdio" = yes ; then
2905 _def_dvdio='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2906 else
2907 _def_dvdio='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2909 echores "$_dvdio"
2912 echocheck "sys/cdio.h"
2913 cat > $TMPC << EOF
2914 #include <unistd.h>
2915 #include <sys/cdio.h>
2916 int main(void) { return 0; }
2918 _cdio=no
2919 cc_check && _cdio=yes
2920 if test "$_cdio" = yes ; then
2921 _def_cdio='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2922 else
2923 _def_cdio='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2925 echores "$_cdio"
2928 echocheck "linux/cdrom.h"
2929 cat > $TMPC << EOF
2930 #include <sys/types.h>
2931 #include <linux/cdrom.h>
2932 int main(void) { return 0; }
2934 _cdrom=no
2935 cc_check && _cdrom=yes
2936 if test "$_cdrom" = yes ; then
2937 _def_cdrom='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2938 else
2939 _def_cdrom='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2941 echores "$_cdrom"
2944 echocheck "dvd.h"
2945 cat > $TMPC << EOF
2946 #include <dvd.h>
2947 int main(void) { return 0; }
2949 _dvd=no
2950 cc_check && _dvd=yes
2951 if test "$_dvd" = yes ; then
2952 _def_dvd='#define DVD_STRUCT_IN_DVD_H 1'
2953 else
2954 _def_dvd='#undef DVD_STRUCT_IN_DVD_H'
2956 echores "$_dvd"
2959 echocheck "BSDI dvd.h"
2960 cat > $TMPC << EOF
2961 #include <dvd.h>
2962 int main(void) { return 0; }
2964 _bsdi_dvd=no
2965 cc_check && _bsdi_dvd=yes
2966 if test "$_bsdi_dvd" = yes ; then
2967 _def_bsdi_dvd='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2968 else
2969 _def_bsdi_dvd='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2971 echores "$_bsdi_dvd"
2974 echocheck "HPUX SCSI header"
2975 cat > $TMPC << EOF
2976 #include <sys/scsi.h>
2977 int main(void) { return 0; }
2979 _hpux_scsi_h=no
2980 cc_check && _hpux_scsi_h=yes
2981 if test "$_hpux_scsi_h" = yes ; then
2982 _def_hpux_scsi_h='#define HPUX_SCTL_IO 1'
2983 else
2984 _def_hpux_scsi_h='#undef HPUX_SCTL_IO'
2986 echores "$_hpux_scsi_h"
2989 echocheck "userspace SCSI headers (Solaris)"
2990 cat > $TMPC << EOF
2991 # include <unistd.h>
2992 # include <stropts.h>
2993 # include <sys/scsi/scsi_types.h>
2994 # include <sys/scsi/impl/uscsi.h>
2995 int main(void) { return 0; }
2997 _sol_scsi_h=no
2998 cc_check && _sol_scsi_h=yes
2999 if test "$_sol_scsi_h" = yes ; then
3000 _def_sol_scsi_h='#define SOLARIS_USCSI 1'
3001 else
3002 _def_sol_scsi_h='#undef SOLARIS_USCSI'
3004 echores "$_sol_scsi_h"
3007 echocheck "termcap"
3008 if test "$_termcap" = auto ; then
3009 cat > $TMPC <<EOF
3010 int main(void) { return 0; }
3012 _termcap=no
3013 cc_check -ltermcap && _termcap=yes && _ld_termcap='-ltermcap'
3014 cc_check -ltinfo && _termcap=yes && _ld_termcap='-ltinfo'
3016 if test "$_termcap" = yes ; then
3017 _def_termcap='#define USE_TERMCAP 1'
3018 echores "yes (using $_ld_termcap)"
3019 else
3020 _def_termcap='#undef USE_TERMCAP'
3021 echores no
3025 echocheck "termios"
3026 if test "$_termios" = auto ; then
3027 cat > $TMPC <<EOF
3028 #include <sys/termios.h>
3029 int main(void) { return 0; }
3031 _termios=auto
3032 cc_check && _termios=yes
3033 _def_termios_h_name='sys/termios.h'
3035 # second test:
3036 if test "$_termios" = auto ; then
3037 cat > $TMPC <<EOF
3038 #include <termios.h>
3039 int main(void) { return 0; }
3041 _termios=no
3042 cc_check && _termios=yes
3043 _def_termios_h_name='termios.h'
3046 if test "$_termios" = yes ; then
3047 _def_termios='#define HAVE_TERMIOS 1'
3048 _def_termios_h='#undef HAVE_TERMIOS_H'
3049 _def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
3051 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3052 _def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1'
3053 elif test "$_def_termios_h_name" = 'termios.h' ; then
3054 _def_termios_h='#define HAVE_TERMIOS_H 1'
3056 echores "yes (using $_def_termios_h_name)"
3057 else
3058 _def_termios='#undef HAVE_TERMIOS'
3059 _def_termios_h_name=''
3060 echores "no"
3064 echocheck "shm"
3065 if test "$_shm" = auto ; then
3066 cat > $TMPC << EOF
3067 #include <sys/types.h>
3068 #include <sys/shm.h>
3069 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3071 _shm=no
3072 cc_check && _shm=yes
3074 if test "$_shm" = yes ; then
3075 _def_shm='#define HAVE_SHM 1'
3076 else
3077 _def_shm='#undef HAVE_SHM'
3079 echores "$_shm"
3082 # XXX: FIXME, add runtime checking
3083 echocheck "linux devfs"
3084 echores "$_linux_devfs"
3087 echocheck "scandir()"
3088 cat > $TMPC << EOF
3089 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3091 _scandir=no
3092 cc_check && _scandir=yes
3093 if test "$_scandir" = yes ; then
3094 _def_scandir='#define HAVE_SCANDIR 1'
3095 else
3096 _def_scandir='#undef HAVE_SCANDIR'
3098 echores "$_scandir"
3101 echocheck "strsep()"
3102 cat > $TMPC << EOF
3103 #include <string.h>
3104 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3106 _strsep=no
3107 cc_check && _strsep=yes
3108 if test "$_strsep" = yes ; then
3109 _def_strsep='#define HAVE_STRSEP 1'
3110 else
3111 _def_strsep='#undef HAVE_STRSEP'
3113 echores "$_strsep"
3115 echocheck "strlcpy()"
3116 cat > $TMPC << EOF
3117 #include <string.h>
3118 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3120 _strlcpy=no
3121 cc_check && _strlcpy=yes
3122 if test "$_strlcpy" = yes ; then
3123 _def_strlcpy='#define HAVE_STRLCPY 1'
3124 else
3125 _def_strlcpy='#undef HAVE_STRLCPY'
3127 echores "$_strlcpy"
3129 echocheck "strlcat()"
3130 cat > $TMPC << EOF
3131 #include <string.h>
3132 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3134 _strlcat=no
3135 cc_check && _strlcat=yes
3136 if test "$_strlcat" = yes ; then
3137 _def_strlcat='#define HAVE_STRLCAT 1'
3138 else
3139 _def_strlcat='#undef HAVE_STRLCAT'
3141 echores "$_strlcat"
3143 echocheck "fseeko()"
3144 cat > $TMPC << EOF
3145 #include <stdio.h>
3146 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3148 _fseeko=no
3149 cc_check && _fseeko=yes
3150 if test "$_fseeko" = yes ; then
3151 _def_fseeko='#define HAVE_FSEEKO 1'
3152 else
3153 _def_fseeko='#undef HAVE_FSEEKO'
3155 echores "$_fseeko"
3157 echocheck "localtime_r()"
3158 cat > $TMPC << EOF
3159 #include <time.h>
3160 int main( void ) { localtime_r(NULL, NULL); }
3162 _localtime_r=no
3163 cc_check && _localtime_r=yes
3164 if test "$_localtime_r" = yes ; then
3165 _def_localtime_r='#define HAVE_LOCALTIME_R 1'
3166 else
3167 _def_localtime_r='#undef HAVE_LOCALTIME_R'
3169 echores "$_localtime_r"
3171 echocheck "vsscanf()"
3172 cat > $TMPC << EOF
3173 #include <stdarg.h>
3174 int main(void) { vsscanf(0, 0, 0); return 0; }
3176 _vsscanf=no
3177 cc_check && _vsscanf=yes
3178 if test "$_vsscanf" = yes ; then
3179 _def_vsscanf='#define HAVE_VSSCANF 1'
3180 else
3181 _def_vsscanf='#undef HAVE_VSSCANF'
3183 echores "$_vsscanf"
3186 echocheck "swab()"
3187 cat > $TMPC << EOF
3188 #include <unistd.h>
3189 int main(void) { swab(0, 0, 0); return 0; }
3191 _swab=no
3192 cc_check && _swab=yes
3193 if test "$_swab" = yes ; then
3194 _def_swab='#define HAVE_SWAB 1'
3195 else
3196 _def_swab='#undef HAVE_SWAB'
3198 echores "$_swab"
3200 echocheck "posix select()"
3201 cat > $TMPC << EOF
3202 #include <stdio.h>
3203 #include <stdlib.h>
3204 #include <sys/types.h>
3205 #include <string.h>
3206 #include <sys/time.h>
3207 #include <unistd.h>
3208 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3210 _posix_select=no
3211 cc_check && _posix_select=yes
3212 if test "$_posix_select" = no ; then
3213 _def_no_posix_select='#define HAVE_NO_POSIX_SELECT 1'
3214 else
3215 _def_no_posix_select='#undef HAVE_NO_POSIX_SELECT'
3217 echores "$_posix_select"
3220 echocheck "gettimeofday()"
3221 cat > $TMPC << EOF
3222 #include <stdio.h>
3223 #include <sys/time.h>
3224 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3226 _gettimeofday=no
3227 cc_check && _gettimeofday=yes
3228 if test "$_gettimeofday" = yes ; then
3229 _def_gettimeofday='#define HAVE_GETTIMEOFDAY 1'
3230 else
3231 _def_gettimeofday='#undef HAVE_GETTIMEOFDAY'
3233 echores "$_gettimeofday"
3236 echocheck "glob()"
3237 cat > $TMPC << EOF
3238 #include <stdio.h>
3239 #include <glob.h>
3240 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3242 _glob=no
3243 cc_check && _glob=yes
3244 if test "$_glob" = yes ; then
3245 _def_glob='#define HAVE_GLOB 1'
3246 else
3247 _def_glob='#undef HAVE_GLOB'
3249 echores "$_glob"
3252 echocheck "sys/sysinfo.h"
3253 cat > $TMPC << EOF
3254 #include <sys/sysinfo.h>
3255 int main(void) {
3256 struct sysinfo s_info;
3257 sysinfo(&s_info);
3258 return 0;
3261 _sys_sysinfo=no
3262 cc_check && _sys_sysinfo=yes
3263 if test "$_sys_sysinfo" = yes ; then
3264 _def_sys_sysinfo='#define HAVE_SYS_SYSINFO_H 1'
3265 _inc_sysinfo='#include <sys/sysinfo.h>'
3266 else
3267 _def_sys_sysinfo='#undef HAVE_SYS_SYSINFO_H'
3269 echores "$_sys_sysinfo"
3272 echocheck "Mac OS X APIs"
3273 if test "$_macosx" = auto ; then
3274 if darwin && ppc; then
3275 _macosx=yes
3276 else
3277 _macosx=no
3278 _def_macosx='#undef MACOSX'
3279 _noaomodules="macosx $_noaomodules"
3280 _novomodules="quartz $_novomodules"
3283 if test "$_macosx" = yes ; then
3284 cat > $TMPC <<EOF
3285 #include <Carbon/Carbon.h>
3286 #include <QuickTime/QuickTime.h>
3287 #include <CoreAudio/CoreAudio.h>
3288 int main(void) {
3289 EnterMovies();
3290 ExitMovies();
3291 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3294 if cc_check -framework Carbon -framework QuickTime -framework CoreAudio; then
3295 _macosx=yes
3296 _macosx_frameworks="-framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3297 _def_macosx='#define MACOSX 1'
3298 _aosrc="$_aosrc ao_macosx.c"
3299 _aomodules="macosx $_aomodules"
3300 _vosrc="$_vosrc vo_quartz.c"
3301 _vomodules="quartz $_vomodules"
3302 else
3303 _macosx=no
3304 _def_macosx='#undef MACOSX'
3305 _noaomodules="macosx $_noaomodules"
3306 _novomodules="quartz $_novomodules"
3308 cat > $TMPC <<EOF
3309 #include <Carbon/Carbon.h>
3310 #include <QuartzCore/CoreVideo.h>
3311 int main(void) {}
3313 if cc_check -framework Carbon -framework QuartzCore -framework OpenGL; then
3314 _vosrc="$_vosrc vo_macosx.m"
3315 _vomodules="macosx $_vomodules"
3316 _macosx_frameworks="$_macosx_frameworks -framework Cocoa -framework QuartzCore -framework OpenGL"
3317 _def_macosx_corevideo='#define MACOSX_COREVIDEO 1'
3318 _macosx_corevideo=yes
3319 else
3320 _novomodules="macosx $_novomodules"
3321 _def_macosx_corevideo='#undef MACOSX_COREVIDEO'
3322 _macosx_corevideo=no
3325 echores "$_macosx"
3327 echocheck "Mac OS X Finder Support"
3328 if test "$_macosx_finder_support" = auto ; then
3329 _macosx_finder_support=$_macosx
3331 if test "$_macosx_finder_support" = yes; then
3332 _def_macosx_finder_support='#define MACOSX_FINDER_SUPPORT 1'
3333 _macosx_finder_support=yes
3334 else
3335 _def_macosx_finder_support='#undef MACOSX_FINDER_SUPPORT'
3336 _macosx_finder_support=no
3338 echores "$_macosx_finder_support"
3340 echocheck "Mac OS X Bundle file locations"
3341 if test "$_macosx_bundle" = auto ; then
3342 _macosx_bundle=$_macosx_finder_support
3344 if test "$_macosx_bundle" = yes; then
3345 _def_macosx_bundle='#define MACOSX_BUNDLE 1'
3346 else
3347 _def_macosx_bundle='#undef MACOSX_BUNDLE'
3348 _macosx_bundle=no
3350 echores "$_macosx_bundle"
3352 echocheck "Samba support (libsmbclient)"
3353 if test "$_smbsupport" = yes; then
3354 _ld_smb="-lsmbclient"
3356 if test "$_smbsupport" = auto; then
3357 _smbsupport=no
3358 cat > $TMPC << EOF
3359 #include <libsmbclient.h>
3360 int main(void) { smbc_opendir("smb://"); return 0; }
3362 if cc_check -lsmbclient ; then
3363 _smbsupport=yes
3364 _ld_smb="-lsmbclient"
3365 else
3366 if cc_check -lsmbclient $_ld_dl ; then
3367 _smbsupport=yes
3368 _ld_smb="-lsmbclient $_ld_dl"
3369 else
3370 if cc_check -lsmbclient $_ld_dl -lnsl ; then
3371 _smbsupport=yes
3372 _ld_smb="-lsmbclient $_ld_dl -lnsl"
3373 else
3374 if cc_check -lsmbclient $_ld_dl -lssl -lnsl ; then
3375 _smbsupport=yes
3376 _ld_smb="-lsmbclient $_ld_dl -lssl -lnsl"
3383 if test "$_smbsupport" = yes; then
3384 _def_smbsupport="#define LIBSMBCLIENT"
3385 _inputmodules="smb $_inputmodules"
3386 else
3387 _def_smbsupport="#undef LIBSMBCLIENT"
3388 _noinputmodules="smb $_noinputmodules"
3390 echores "$_smbsupport"
3393 #########
3394 # VIDEO #
3395 #########
3398 echocheck "3dfx"
3399 if test "$_3dfx" = yes ; then
3400 _def_3dfx='#define HAVE_3DFX 1'
3401 _vosrc="$_vosrc vo_3dfx.c"
3402 _vomodules="3dfx $_vomodules"
3403 else
3404 _def_3dfx='#undef HAVE_3DFX'
3405 _novomodules="3dfx $_novomodules"
3407 echores "$_3dfx"
3410 echocheck "tdfxfb"
3411 if test "$_tdfxfb" = yes ; then
3412 _def_tdfxfb='#define HAVE_TDFXFB 1'
3413 _vosrc="$_vosrc vo_tdfxfb.c"
3414 _vomodules="tdfxfb $_vomodules"
3415 else
3416 _def_tdfxfb='#undef HAVE_TDFXFB'
3417 _novomodules="tdfxfb $_novomodules"
3419 echores "$_tdfxfb"
3421 echocheck "tdfxvid"
3422 if test "$_tdfxvid" = yes ; then
3423 _def_tdfxvid='#define HAVE_TDFX_VID 1'
3424 _vosrc="$_vosrc vo_tdfx_vid.c"
3425 _vomodules="tdfx_vid $_vomodules"
3426 else
3427 _def_tdfxvid='#undef HAVE_TDFX_VID'
3428 _novomodules="tdfx_vid $_novomodules"
3430 echores "$_tdfxfb"
3432 echocheck "tga"
3433 if test "$_tga" = yes ; then
3434 _def_tga='#define HAVE_TGA 1'
3435 _vosrc="$_vosrc vo_tga.c"
3436 _vomodules="tga $_vomodules"
3437 else
3438 _def_tga='#undef HAVE_TGA'
3439 _novomodules="tga $_novomodules"
3441 echores "$_tga"
3443 echocheck "DirectFB headers presence"
3444 if test -z "$_inc_directfb" ; then
3445 for I in /usr/include /usr/local/include $_inc_extra; do
3446 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3447 _inc_directfb="-I$I/directfb"
3448 echores "yes (using $_inc_directfb)"
3449 break
3451 if test -d "$I" && test -f "$I/directfb.h" ; then
3452 _inc_directfb="-I$I"
3453 echores "yes (using $_inc_directfb)"
3454 break
3456 done
3457 if test -z "$_inc_directfb" ; then
3458 _directfb=no
3459 echores "not found"
3461 else
3462 echores "yes (using $_inc_directfb)"
3464 if test "$_inc_directfb" = "-I/usr/include" ; then
3465 _inc_directfb=""
3468 echocheck "DirectFB"
3469 if test "$_directfb" = auto ; then
3470 _directfb=no
3471 cat > $TMPC <<EOF
3472 #include <directfb.h>
3473 int main(void) { IDirectFB *foo; return 0; }
3475 linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes
3478 if test "$_directfb" = yes; then
3479 cat > $TMPC <<EOF
3480 #include <directfb.h>
3481 int main(void) {
3482 printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version);
3483 return 0;
3486 if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then
3487 _directfb_version=`"$TMPO"`
3488 _def_directfb_version="#define DIRECTFBVERSION $_directfb_version"
3489 if test "$_directfb_version" -ge 913; then
3490 echores "yes ($_directfb_version)"
3491 else
3492 _def_directfb_version='#undef DIRECTFBVERSION'
3493 _directfb=no
3494 echores "no (version >=0.9.13 required)"
3496 else
3497 _directfb=no
3498 echores "no (failed to get version)"
3500 else
3501 echores "$_directfb"
3504 if test "$_directfb" = yes ; then
3505 _def_directfb='#define HAVE_DIRECTFB 1'
3506 if test "$_directfb_version" -ge 913; then
3507 _vosrc="$_vosrc vo_directfb2.c"
3508 _vomodules="directfb $_vomodules"
3509 _ld_directfb='-ldirectfb'
3512 if test "$_directfb_version" -ge 915; then
3513 _vosrc="$_vosrc vo_dfbmga.c"
3514 _vomodules="dfbmga $_vomodules"
3516 else
3517 _def_directfb='#undef HAVE_DIRECTFB'
3518 _novomodules="directfb $_novomodules"
3519 _inc_directfb=""
3523 echocheck "X11 headers presence"
3524 if test -z "$_inc_x11" ; then
3525 for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/include /usr/openwin/include ; do
3526 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3527 _inc_x11="-I$I"
3528 echores "yes (using $I)"
3529 break
3531 done
3532 if test -z "$_inc_x11" ; then
3533 _x11=no
3534 echores "not found (check if the dev(el) packages are installed)"
3536 else
3537 echores "yes (using $_inc_x11)"
3539 if test "$_inc_x11" = "-I/usr/include" ; then
3540 _inc_x11=""
3544 echocheck "X11"
3545 if test "$_x11" != no ; then
3546 cat > $TMPC <<EOF
3547 #include <X11/Xlib.h>
3548 #include <X11/Xutil.h>
3549 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3551 if test -z "$_x11_paths" ; then
3552 _x11_paths="/usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib"
3554 for I in $_x11_paths ; do
3555 _ld_x11="-L$I -lXext -lX11 $_ld_sock"
3556 if netbsd; then
3557 _ld_x11="$_ld_x11 -Wl,-R$I"
3559 if test -d "$I" && cc_check $_inc_x11 $_ld_x11 ; then
3560 _x11=yes
3561 break
3563 done
3565 if test "$_x11" = yes ; then
3566 _def_x11='#define HAVE_X11 1'
3567 _vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3568 _vomodules="x11 xover $_vomodules"
3569 echores "yes (using $I)"
3570 else
3571 _x11=no
3572 _def_x11='#undef HAVE_X11'
3573 _inc_x11=''
3574 _ld_x11=''
3575 _novomodules="x11 $_novomodules"
3576 echores "no (check if the dev(el) packages are installed)"
3580 echocheck "DPMS"
3581 _xdpms3=no
3582 if test "$_x11" = yes ; then
3583 cat > $TMPC <<EOF
3584 #include <X11/Xmd.h>
3585 #include <X11/Xlib.h>
3586 #include <X11/Xutil.h>
3587 #include <X11/Xatom.h>
3588 #include <X11/extensions/dpms.h>
3589 int main(void) {
3590 (void) DPMSQueryExtension(0, 0, 0);
3593 cc_check $_inc_x11 -lXdpms $_ld_x11 && _xdpms3=yes
3595 _xdpms4=no
3596 if test "$_x11" = yes ; then
3597 cat > $TMPC <<EOF
3598 #include <X11/Xlib.h>
3599 #include <X11/extensions/dpms.h>
3600 int main(void) {
3601 (void) DPMSQueryExtension(0, 0, 0);
3604 cc_check $_inc_x11 $_ld_x11 && _xdpms4=yes
3606 if test "$_xdpms4" = yes ; then
3607 _def_xdpms='#define HAVE_XDPMS 1'
3608 echores "yes (using Xdpms 4)"
3609 elif test "$_xdpms3" = yes ; then
3610 _def_xdpms='#define HAVE_XDPMS 1'
3611 _ld_x11="-lXdpms $_ld_x11"
3612 echores "yes (using Xdpms 3)"
3613 else
3614 _def_xdpms='#undef HAVE_XDPMS'
3615 echores "no"
3619 echocheck "Xv"
3620 if test "$_x11" = yes && test "$_xv" != no ; then
3621 cat > $TMPC <<EOF
3622 #include <X11/Xlib.h>
3623 #include <X11/extensions/Xvlib.h>
3624 int main(void) {
3625 (void) XvGetPortAttribute(0, 0, 0, 0);
3626 (void) XvQueryPortAttributes(0, 0, 0);
3627 return 0; }
3629 _xv=no
3630 cc_check $_inc_x11 -lXv $_ld_x11 && _xv=yes
3631 else
3632 _xv=no
3634 if test "$_xv" = yes ; then
3635 _def_xv='#define HAVE_XV 1'
3636 _ld_xv='-lXv'
3637 _vosrc="$_vosrc vo_xv.c"
3638 _vomodules="xv $_vomodules"
3639 else
3640 _def_xv='#undef HAVE_XV'
3641 _novomodules="xv $_novomodules"
3643 echores "$_xv"
3646 echocheck "XvMC"
3647 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no ; then
3648 _xvmc=no
3649 cat > $TMPC <<EOF
3650 #include <X11/Xlib.h>
3651 #include <X11/extensions/Xvlib.h>
3652 #include <X11/extensions/XvMClib.h>
3653 int main(void) {
3654 (void) XvMCQueryExtension(0,0,0);
3655 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3656 return 0; }
3658 cc_check $_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc=yes
3660 if test "$_xvmc" = yes ; then
3661 _def_xvmc='#define HAVE_XVMC 1'
3662 _ld_xvmc="-lXvMC -l$_xvmclib"
3663 _vosrc="$_vosrc vo_xvmc.c"
3664 _vomodules="xvmc $_vomodules"
3665 else
3666 _def_xvmc='#undef HAVE_XVMC'
3667 _novomodules="xvmc $_novomodules"
3669 echores "$_xvmc"
3672 echocheck "Xinerama"
3673 if test "$_x11" = yes && test "$_xinerama" != no ; then
3674 cat > $TMPC <<EOF
3675 #include <X11/Xlib.h>
3676 #include <X11/extensions/Xinerama.h>
3677 int main(void) { (void) XineramaIsActive(0); return 0; }
3679 _xinerama=no
3680 cc_check $_inc_x11 -lXinerama $_ld_x11 && _xinerama=yes
3681 else
3682 _xinerama=no
3684 if test "$_xinerama" = yes ; then
3685 _def_xinerama='#define HAVE_XINERAMA 1'
3686 _ld_xinerama='-lXinerama'
3687 else
3688 _def_xinerama='#undef HAVE_XINERAMA'
3690 echores "$_xinerama"
3693 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3694 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3695 # named 'X extensions' or something similar.
3696 # This check may be useful for future mplayer versions (to change resolution)
3697 # If you run into problems, remove '-lXxf86vm'.
3698 echocheck "Xxf86vm"
3699 if test "$_x11" = yes && test "$_vm" = auto ; then
3700 cat > $TMPC <<EOF
3701 #include <X11/Xlib.h>
3702 #include <X11/extensions/xf86vmode.h>
3703 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3705 _vm=no
3706 cc_check $_inc_x11 -lXxf86vm $_ld_x11 && _vm=yes
3708 if test "$_vm" = yes ; then
3709 _def_vm='#define HAVE_XF86VM 1'
3710 _ld_vm='-lXxf86vm'
3711 else
3712 _def_vm='#undef HAVE_XF86VM'
3714 echores "$_vm"
3716 # Check for the presence of special keycodes, like audio control buttons
3717 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3718 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3719 # have these new keycodes.
3720 echocheck "XF86keysym"
3721 if test "$_xf86keysym" = auto; then
3722 _xf86keysym=no
3723 if test "$_x11" = yes ; then
3724 cat > $TMPC <<EOF
3725 #include <X11/Xlib.h>
3726 #include <X11/XF86keysym.h>
3727 int main(void) { return XF86XK_AudioPause; }
3729 cc_check $_inc_x11 $_ld_x11 && _xf86keysym=yes
3732 if test "$_xf86keysym" = yes ; then
3733 _def_xf86keysym='#define HAVE_XF86XK 1'
3734 else
3735 _def_xf86keysym='#undef HAVE_XF86XK'
3737 echores "$_xf86keysym"
3739 echocheck "DGA"
3740 if test "$_x11" = no ; then
3741 _dga=no
3743 # Version 2 is preferred to version 1 if available
3744 if test "$_dga" = auto ; then
3745 cat > $TMPC << EOF
3746 #include <X11/Xlib.h>
3747 #include <X11/extensions/xf86dga.h>
3748 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3750 _dga=no
3751 cc_check $_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga=1
3753 cat > $TMPC << EOF
3754 #include <X11/Xlib.h>
3755 #include <X11/extensions/xf86dga.h>
3756 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3758 cc_check $_inc_x11 -lXxf86dga $_ld_x11 && _dga=2
3761 _def_dga='#undef HAVE_DGA'
3762 _def_dga2='#undef HAVE_DGA2'
3763 if test "$_dga" = 1 ; then
3764 _def_dga='#define HAVE_DGA 1'
3765 _ld_dga='-lXxf86dga'
3766 _vosrc="$_vosrc vo_dga.c"
3767 _vomodules="dga $_vomodules"
3768 echores "yes (using DGA 1.0)"
3769 elif test "$_dga" = 2 ; then
3770 _def_dga='#define HAVE_DGA 1'
3771 _def_dga2='#define HAVE_DGA2 1'
3772 _ld_dga='-lXxf86dga'
3773 _vosrc="$_vosrc vo_dga.c"
3774 _vomodules="dga $_vomodules"
3775 echores "yes (using DGA 2.0)"
3776 elif test "$_dga" = no ; then
3777 echores "no"
3778 _novomodules="dga $_novomodules"
3779 else
3780 die "DGA version must be 1 or 2"
3784 echocheck "OpenGL"
3785 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3786 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then
3787 cat > $TMPC << EOF
3788 #include <GL/gl.h>
3789 int main(void) { return 0; }
3791 _gl=no
3792 if cc_check $_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3793 _gl=yes
3794 _ld_gl="-lGL $_ld_dl"
3795 elif cc_check $_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3796 _gl=yes
3797 _ld_gl="-lGL $_ld_pthread $_ld_ld"
3798 elif cc_check -lopengl32 ; then
3799 _gl=yes
3800 _gl_win32=yes
3801 _ld_gl="-lopengl32 -lgdi32"
3803 else
3804 _gl=no
3806 if test "$_gl" = yes ; then
3807 _def_gl='#define HAVE_GL 1'
3808 if test "$_gl_win32" = yes ; then
3809 _def_gl_win32='#define GL_WIN32 1'
3810 _vosrc="$_vosrc vo_gl2.c w32_common.c gl_common.c"
3811 else
3812 _vosrc="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3814 _vomodules="opengl $_vomodules"
3815 else
3816 _def_gl='#undef HAVE_GL'
3817 _def_gl_win32='#undef GL_WIN32'
3818 _novomodules="opengl $_novomodules"
3820 echores "$_gl"
3823 echocheck "/dev/mga_vid"
3824 if test "$_mga" = auto ; then
3825 _mga=no
3826 test -c /dev/mga_vid && _mga=yes
3828 if test "$_mga" = yes ; then
3829 _def_mga='#define HAVE_MGA 1'
3830 _vosrc="$_vosrc vo_mga.c"
3831 _vomodules="mga $_vomodules"
3832 else
3833 _def_mga='#undef HAVE_MGA'
3834 _novomodules="mga $_novomodules"
3836 echores "$_mga"
3839 # echocheck "syncfb"
3840 # _syncfb=no
3841 # test "$_mga" = yes && _syncfb=yes
3842 # if test "$_syncfb" = yes ; then
3843 # _def_syncfb='#define HAVE_SYNCFB 1'
3844 # _vosrc="$_vosrc vo_syncfb.c"
3845 # else
3846 # _def_syncfb='#undef HAVE_SYNCFB'
3847 # fi
3848 # echores "$_syncfb"
3851 echocheck "xmga"
3852 if test "$_xmga" = auto ; then
3853 _xmga=no
3854 test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
3856 if test "$_xmga" = yes ; then
3857 _def_xmga='#define HAVE_XMGA 1'
3858 _vosrc="$_vosrc vo_xmga.c"
3859 _vomodules="xmga $_vomodules"
3860 else
3861 _def_xmga='#undef HAVE_XMGA'
3862 _novomodules="xmga $_novomodules"
3864 echores "$_xmga"
3867 echocheck "GGI"
3868 if test "$_ggi" = auto ; then
3869 cat > $TMPC << EOF
3870 #include <ggi/ggi.h>
3871 int main(void) { return 0; }
3873 _ggi=no
3874 cc_check -lggi && _ggi=yes
3876 if test "$_ggi" = yes ; then
3877 _def_ggi='#define HAVE_GGI 1'
3878 _ld_ggi='-lggi'
3879 _vosrc="$_vosrc vo_ggi.c"
3880 _vomodules="ggi $_vomodules"
3881 else
3882 _def_ggi='#undef HAVE_GGI'
3883 _novomodules="ggi $_novomodules"
3885 echores "$_ggi"
3887 echocheck "GGI extension: libggiwmh"
3888 if test "$_ggiwmh" = auto ; then
3889 _ggiwmh=no
3890 cat > $TMPC << EOF
3891 #include <ggi/ggi.h>
3892 #include <ggi/wmh.h>
3893 int main(void) { return 0; }
3895 cc_check -lggi -lggiwmh && _ggiwmh=yes
3897 # needed to get right output on obscure combination
3898 # like --disable-ggi --enable-ggiwmh
3899 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
3900 _def_ggiwmh='#define HAVE_GGIWMH 1'
3901 _ld_ggi="$_ld_ggi -lggiwmh"
3902 else
3903 _ggiwmh=no
3904 _def_ggiwmh='#undef HAVE_GGIWMH'
3906 echores "$_ggiwmh"
3909 echocheck "AA"
3910 if test "$_aa" = auto ; then
3911 cat > $TMPC << EOF
3912 #include <aalib.h>
3913 int main(void) { (void) aa_init(0, 0, 0); return 0; }
3915 _aa=no
3916 if cc_check -laa ; then
3917 _aa=yes
3918 _ld_aa="-laa"
3919 elif cc_check $_ld_x11 -laa ; then
3920 _aa=yes
3921 _ld_aa="$_ld_x11 -laa"
3924 if test "$_aa" = yes ; then
3925 _def_aa='#define HAVE_AA 1'
3926 if cygwin ; then
3927 _ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6`
3929 _vosrc="$_vosrc vo_aa.c"
3930 _vomodules="aa $_vomodules"
3931 else
3932 _def_aa='#undef HAVE_AA'
3933 _novomodules="aa $_novomodules"
3935 echores "$_aa"
3938 echocheck "CACA"
3939 if test "$_caca" = auto ; then
3940 _caca=no
3941 if ( caca-config --version ) >> "$TMPLOG" 2>&1 ; then
3942 cat > $TMPC << EOF
3943 #include <caca.h>
3944 int main(void) { (void) caca_init(); return 0; }
3946 cc_check `caca-config --libs` && _caca=yes
3949 if test "$_caca" = yes ; then
3950 _def_caca='#define HAVE_CACA 1'
3951 _inc_caca=`caca-config --cflags`
3952 _ld_caca=`caca-config --libs`
3953 _vosrc="$_vosrc vo_caca.c"
3954 _vomodules="caca $_vomodules"
3955 else
3956 _def_caca='#undef HAVE_CACA'
3957 _novomodules="caca $_novomodules"
3959 echores "$_caca"
3962 echocheck "SVGAlib"
3963 if test "$_svga" = auto ; then
3964 cat > $TMPC << EOF
3965 #include <vga.h>
3966 int main(void) { return 0; }
3968 _svga=no
3969 cc_check -lvga $_ld_lm && _svga=yes
3971 if test "$_svga" = yes ; then
3972 _def_svga='#define HAVE_SVGALIB 1'
3973 _ld_svga="-lvga $_ld_lm"
3974 _vosrc="$_vosrc vo_svga.c"
3975 _vomodules="svga $_vomodules"
3976 else
3977 _def_svga='#undef HAVE_SVGALIB'
3978 _novomodules="svga $_novomodules"
3980 echores "$_svga"
3983 echocheck "FBDev"
3984 if test "$_fbdev" = auto ; then
3985 _fbdev=no
3986 linux && test -c /dev/fb0 && _fbdev=yes
3988 if test "$_fbdev" = yes ; then
3989 _def_fbdev='#define HAVE_FBDEV 1'
3990 _vosrc="$_vosrc vo_fbdev.c vo_fbdev2.c"
3991 _vomodules="fbdev $_vomodules"
3992 else
3993 _def_fbdev='#undef HAVE_FBDEV'
3994 _novomodules="fbdev $_novomodules"
3996 echores "$_fbdev"
4000 echocheck "DVB"
4001 if test "$_dvb" != no ; then
4002 _dvb=no
4003 cat >$TMPC << EOF
4004 #include <sys/poll.h>
4005 #include <sys/ioctl.h>
4006 #include <stdio.h>
4007 #include <time.h>
4008 #include <unistd.h>
4010 #include <ost/dmx.h>
4011 #include <ost/frontend.h>
4012 #include <ost/sec.h>
4013 #include <ost/video.h>
4014 #include <ost/audio.h>
4015 int main(void) {return 0;}
4017 if cc_check ; then
4018 _dvb=yes
4019 echores "yes"
4020 else
4021 for I in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
4022 if cc_check "$I" ; then
4023 _dvb=yes
4024 _inc_dvb="$I"
4025 echores "yes (using $_inc_dvb)"
4026 break
4028 done
4029 test "$_dvb" = no && echores "no (specify path to DVB/ost/include with --with-dvbincdir=DIR)"
4031 else
4032 echores "no"
4034 if test "$_dvb" = yes ; then
4035 _def_dvb='#define HAVE_DVB 1'
4036 _def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
4037 _aomodules="mpegpes(dvb) $_aomodules"
4038 _vomodules="mpegpes(dvb) $_vomodules"
4040 if test "$_dvbhead" != no ; then
4041 echocheck "DVB HEAD"
4042 if test "$_dvbhead" != no ; then
4043 _dvbhead=no
4045 cat >$TMPC << EOF
4046 #include <sys/poll.h>
4047 #include <sys/ioctl.h>
4048 #include <stdio.h>
4049 #include <time.h>
4050 #include <unistd.h>
4052 #include <linux/dvb/dmx.h>
4053 #include <linux/dvb/frontend.h>
4054 #include <linux/dvb/video.h>
4055 #include <linux/dvb/audio.h>
4056 int main(void) {return 0;}
4058 if cc_check ; then
4059 _dvbhead=yes
4060 echores "yes"
4061 else
4062 for I in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
4063 if cc_check "$I" ; then
4064 _dvbhead=yes
4065 _inc_dvb="$I"
4066 echores "yes (using $_inc_dvb)"
4067 break
4069 done
4070 test "$_dvbhead" = no && echores "no (specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR)"
4072 else
4073 echores "no"
4075 if test "$_dvbhead" = yes ; then
4076 _def_dvb='#define HAVE_DVB_HEAD 1'
4077 _def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
4078 _aomodules="mpegpes(dvb) $_aomodules"
4079 _vomodules="mpegpes(dvb) $_vomodules"
4082 if test "$_dvbhead" = no && test "$_dvb" = no ; then
4083 _def_dvb='#undef HAVE_DVB'
4084 _def_dvb_in='#undef HAS_DVBIN_SUPPORT '
4085 _aomodules="mpegpes(file) $_aomodules"
4086 _vomodules="mpegpes(file) $_vomodules"
4089 if test "$_dvb" = yes || test "$_dvbhead" = yes ; then
4090 _dvbin=yes
4091 _inputmodules="dvb $_inputmodules"
4092 else
4093 _dvbin=no
4094 _noinputmodules="dvb $_noinputmodules"
4097 echocheck "PNG support"
4098 if test "$_png" = auto ; then
4099 _png=no
4100 if irix ; then
4101 # Don't check for -lpng on irix since it has its own libpng
4102 # incompatible with the GNU libpng
4103 echores "disabled on irix (not GNU libpng)"
4104 else
4105 cat > $TMPC << EOF
4106 #include <png.h>
4107 #include <string.h>
4108 int main(void) {
4109 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4110 printf("libpng: %s\n", png_libpng_ver);
4111 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4114 if cc_check -lpng -lz $_ld_lm ; then
4115 if "$TMPO" >> "$TMPLOG" ; then
4116 _png=yes
4117 echores yes
4118 else
4119 echores "no (mismatch of library and header versions)"
4121 else
4122 echores no
4125 else
4126 echores "$_png"
4128 if test "$_png" = yes ; then
4129 _def_png='#define HAVE_PNG 1'
4130 _ld_png='-lpng -lz'
4131 _vosrc="$_vosrc vo_png.c"
4132 _vomodules="png $_vomodules"
4133 _mkf_png="yes"
4134 else
4135 _def_png='#undef HAVE_PNG'
4136 _novomodules="png $_novomodules"
4137 _mkf_png="no"
4140 echocheck "JPEG support"
4141 if test "$_jpg" = auto ; then
4142 _jpg=no
4143 cat > $TMPC << EOF
4144 #include <stdio.h>
4145 #include <stdlib.h>
4146 #include <setjmp.h>
4147 #include <string.h>
4148 #include <jpeglib.h>
4149 int main(void) {
4150 return 0;
4153 if cc_check -ljpeg $_ld_lm ; then
4154 if "$TMPO" >> "$TMPLOG" ; then
4155 _jpg=yes
4159 echores "$_jpg"
4161 if test "$_jpg" = yes ; then
4162 _def_jpg='#define HAVE_JPEG 1'
4163 _vosrc="$_vosrc vo_jpeg.c"
4164 _vomodules="jpeg $_vomodules"
4165 _ld_jpg="-ljpeg"
4166 _mkf_jpg="yes"
4167 else
4168 _def_jpg='#undef HAVE_JPEG'
4169 _novomodules="jpeg $_novomodules"
4170 _mkf_jpg="no"
4175 echocheck "PNM support"
4176 if test "$_pnm" = yes; then
4177 _def_pnm="#define HAVE_PNM"
4178 _vosrc="$_vosrc vo_pnm.c"
4179 _vomodules="pnm $_vomodules"
4180 else
4181 _def_pnm="#undef HAVE_PNM"
4182 _novomodules="pnm $_novomodules"
4184 echores "$_pnm"
4188 echocheck "md5sum support"
4189 if test "$_md5sum" = yes; then
4190 _def_md5sum="#define HAVE_MD5SUM"
4191 _vosrc="$_vosrc vo_md5sum.c md5sum.c"
4192 _vomodules="md5sum $_vomodules"
4193 else
4194 _def_md5sum="#undef HAVE_MD5SUM"
4195 _novomodules="md5sum $_novomodules"
4197 echores "$_md5sum"
4201 echocheck "GIF support"
4202 # This is to appease people who want to force gif support.
4203 # If it is forced to yes, then we still do checks to determine
4204 # which gif library to use.
4205 if test "$_gif" = yes ; then
4206 _force_gif=yes
4207 _gif=auto
4210 if test "$_gif" = auto ; then
4211 _gif=no
4212 cat > $TMPC << EOF
4213 #include <gif_lib.h>
4214 int main(void) {
4215 return 0;
4218 if cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then
4219 _gif=yes
4220 _ld_gif="-lungif"
4221 elif cc_check -lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
4222 _gif=yes
4223 _ld_gif="-lungif $_ld_x11"
4224 elif cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then
4225 _gif=yes
4226 _ld_gif="-lgif"
4227 elif cc_check -lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
4228 _gif=yes
4229 _ld_gif="-lgif $_ld_x11"
4233 # If no library was found, and the user wants support forced,
4234 # then we force it on with libgif, as this is the safest
4235 # assumption IMHO. (libungif & libregif both create symbolic
4236 # links to libgif. We also assume that no x11 support is needed,
4237 # because if you are forcing this, then you _should_ know what
4238 # you are doing. [ Besides, package maintainers should never
4239 # have compiled x11 deps into libungif in the first place. ] )
4240 # </rant>
4241 # --Joey
4242 if test "$_force_gif" = yes && test "$_gif" = no ; then
4243 _gif=yes
4244 _ld_gif="-lgif"
4247 if test "$_gif" = yes ; then
4248 _def_gif='#define HAVE_GIF 1'
4249 _vosrc="$_vosrc vo_gif89a.c"
4250 _codecmodules="gif $_codecmodules"
4251 _vomodules="gif89a $_vomodules"
4252 _mkf_gif="yes"
4253 _gif="yes (old version, some encoding functions disabled)"
4254 _def_gif_4='#undef HAVE_GIF_4'
4256 cat > $TMPC << EOF
4257 #include <signal.h>
4258 #include <gif_lib.h>
4259 void catch() { exit(1); }
4260 int main(void) {
4261 signal(SIGSEGV, catch); // catch segfault
4262 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4263 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4264 return 0;
4267 if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4268 _def_gif_4='#define HAVE_GIF_4 1'
4269 _gif="yes"
4271 else
4272 _def_gif='#undef HAVE_GIF'
4273 _def_gif_4='#undef HAVE_GIF_4'
4274 _novomodules="gif89a $_novomodules"
4275 _nocodecmodules="gif $_nocodecmodules"
4276 _mkf_gif="no"
4278 echores "$_gif"
4281 case "$_gif" in yes*)
4282 echocheck "broken giflib workaround"
4283 _def_gif_tvt_hack='#define HAVE_GIF_TVT_HACK 1'
4285 cat > $TMPC << EOF
4286 #include <gif_lib.h>
4287 int main(void) {
4288 GifFileType gif;
4289 printf("UserData is at address %p\n", gif.UserData);
4290 return 0;
4293 if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4294 _def_gif_tvt_hack='#undef HAVE_GIF_TVT_HACK'
4295 echores "disabled"
4296 else
4297 echores "enabled"
4300 esac
4303 echocheck "VESA support"
4304 if test "$_vesa" = auto ; then
4305 if x86 && linux ; then
4306 _vesa=no
4307 cat > $TMPC << EOF
4308 #include <sys/io.h>
4309 int main(void) { return 0; }
4311 cc_check && _vesa=yes
4314 if test "$_vesa" = yes ; then
4315 _def_vesa='#define HAVE_VESA 1'
4316 _vosrc="$_vosrc vo_vesa.c vesa_lvo.c"
4317 _vomodules="vesa $_vomodules"
4318 echores "yes"
4319 else
4320 _def_vesa='#undef HAVE_VESA'
4321 echores "no (not supported on this OS/architecture)"
4322 _novomodules="vesa $_novomodules"
4325 #################
4326 # VIDEO + AUDIO #
4327 #################
4330 echocheck "SDL"
4331 if test -z "$_sdlconfig" ; then
4332 if ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then
4333 _sdlconfig="sdl-config"
4334 elif ( sdl11-config --version ) >>"$TMPLOG" 2>&1 ; then
4335 _sdlconfig="sdl11-config"
4336 else
4337 _sdlconfig=false
4340 if test "$_sdl" = auto || test "$_sdl" = yes ; then
4341 cat > $TMPC << EOF
4342 #include <SDL.h>
4343 int main(int argc, char *argv[]) { return 0; }
4345 _sdl=no
4346 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4347 if cc_check `$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4348 _sdlversion=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4349 if test "$_sdlversion" -gt 116 ; then
4350 if test "$_sdlversion" -lt 121 ; then
4351 _def_sdlbuggy='#define BUGGY_SDL'
4352 else
4353 _def_sdlbuggy='#undef BUGGY_SDL'
4355 _sdl=yes
4356 else
4357 _sdl=outdated
4362 if test "$_sdl" = yes ; then
4363 _def_sdl='#define HAVE_SDL 1'
4364 if cygwin ; then
4365 _ld_sdl=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4366 _inc_sdl=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4367 elif mingw32 ; then
4368 _ld_sdl=`$_sdlconfig --libs | sed s/-mwindows//`
4369 _inc_sdl=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4370 else
4371 _ld_sdl=`$_sdlconfig --libs`
4372 _inc_sdl=`$_sdlconfig --cflags`
4374 _vosrc="$_vosrc vo_sdl.c"
4375 _vomodules="sdl $_vomodules"
4376 _aosrc="$_aosrc ao_sdl.c"
4377 _aomodules="sdl $_aomodules"
4378 echores "yes (using $_sdlconfig)"
4379 else
4380 _def_sdl='#undef HAVE_SDL'
4381 _novomodules="sdl $_novomodules"
4382 _noaomodules="sdl $_noaomodules"
4383 echores "no"
4386 echocheck "Windows waveout"
4387 if test "$_win32waveout" = auto ; then
4388 cat > $TMPC << EOF
4389 #include <windows.h>
4390 #include <mmsystem.h>
4391 int main(void) { return 0; }
4393 _win32waveout=no
4394 cc_check -lwinmm && _win32waveout=yes
4396 if test "$_win32waveout" = yes ; then
4397 _def_win32waveout='#define HAVE_WIN32WAVEOUT 1'
4398 _ld_win32libs="-lwinmm $_ld_win32libs"
4399 _aosrc="$_aosrc ao_win32.c"
4400 _aomodules="win32 $_aomodules"
4401 else
4402 _def_win32waveout='#undef HAVE_WIN32WAVEOUT'
4403 _noaomodules="win32 $_noaomodules"
4405 echores "$_win32waveout"
4407 echocheck "Directx"
4408 if test "$_directx" = auto ; then
4409 cat > $TMPC << EOF
4410 #include <windows.h>
4411 #include <ddraw.h>
4412 #include <dsound.h>
4413 int main(void) { return 0; }
4415 _directx=no
4416 cc_check -lgdi32 && _directx=yes
4418 if test "$_directx" = yes ; then
4419 _def_directx='#define HAVE_DIRECTX 1'
4420 _ld_win32libs="-lgdi32 $_ld_win32libs"
4421 _vosrc="$_vosrc vo_directx.c"
4422 _vomodules="directx $_vomodules"
4423 _aosrc="$_aosrc ao_dsound.c"
4424 _aomodules="dsound $_aomodules"
4425 else
4426 _def_directx='#undef HAVE_DIRECTX'
4427 _novomodules="directx $_novomodules"
4428 _noaomodules="dsound $_noaomodules"
4430 echores "$_directx"
4432 echocheck "NAS"
4433 if test "$_nas" = auto || test "$_nas" = yes ; then
4434 cat > $TMPC << EOF
4435 #include <audio/audiolib.h>
4436 int main(void) { return 0; }
4438 _nas=no
4439 cc_check -laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas=yes
4441 if test "$_nas" = yes ; then
4442 _def_nas='#define HAVE_NAS 1'
4443 _ld_nas="-laudio -lXt $_ld_x11"
4444 _aosrc="$_aosrc ao_nas.c"
4445 _aomodules="nas $_aomodules"
4446 else
4447 _noaomodules="nas $_noaomodules"
4448 _def_nas='#undef HAVE_NAS'
4450 echores "$_nas"
4452 echocheck "DXR2"
4453 if test "$_dxr2" = auto; then
4454 _dxr2=no
4455 for _inc_dxr2 in "$_inc_dxr2" \
4456 "-I/usr/local/include/dxr2" \
4457 "-I/usr/include/dxr2"; do
4458 cat > $TMPC << EOF
4459 #include <dxr2ioctl.h>
4460 int main(void) { return 0; }
4462 cc_check $_inc_dxr2 && _dxr2=yes && break
4463 done
4465 if test "$_dxr2" = yes; then
4466 _def_dxr2='#define HAVE_DXR2 1'
4467 _vosrc="$_vosrc vo_dxr2.c"
4468 _aosrc="$_aosrc ao_dxr2.c"
4469 _aomodules="dxr2 $_aomodules"
4470 _vomodules="dxr2 $_vomodules"
4471 echores "yes (using $_inc_dxr2)"
4472 else
4473 _def_dxr2='#undef HAVE_DXR2'
4474 _noaomodules="dxr2 $_noaomodules"
4475 _novomodules="dxr2 $_novomodules"
4476 _inc_dxr2=""
4477 echores "no"
4480 echocheck "DXR3/H+"
4481 if test "$_dxr3" = auto ; then
4482 cat > $TMPC << EOF
4483 #include <linux/em8300.h>
4484 int main(void) { return 0; }
4486 _dxr3=no
4487 cc_check && _dxr3=yes
4489 if test "$_dxr3" = yes ; then
4490 _def_dxr3='#define HAVE_DXR3 1'
4491 _vosrc="$_vosrc vo_dxr3.c"
4492 _vomodules="dxr3 $_vomodules"
4493 else
4494 _def_dxr3='#undef HAVE_DXR3'
4495 _novomodules="dxr3 $_novomodules"
4496 if test "$_mp1e" = auto ; then
4497 # we don't need mp1e
4498 _mp1e=no
4501 echores "$_dxr3"
4503 echocheck "libmp1e"
4504 if test "$_mmx" = no ; then
4505 # mp1e REQUIRES mmx!
4506 _mp1e=no
4508 if test "$_mp1e" != no ; then
4509 _mp1e=yes
4510 _def_mp1e='#define USE_MP1E'
4511 _ld_mp1e='libmp1e/libmp1e.a'
4512 _dep_mp1e='libmp1e/libmp1e.a'
4513 else
4514 _mp1e=no
4515 _def_mp1e='#undef USE_MP1E'
4516 _ld_mp1e=""
4517 _dep_mp1e=''
4519 echores "$_mp1e"
4522 echocheck "libfame"
4523 if test "$_fame" = auto ; then
4524 _fame=no
4525 test "$_dxr2" = yes && _fame=auto
4526 test "$_dxr3" = yes && _fame=auto
4527 test "$_dvb" = yes && _fame=auto
4529 if test "$_fame" = auto ; then
4530 _fame=no
4531 if test -d libfame && test -f libfame/fame.h ; then
4532 # disable fame on cygwin as no sense to port - atmos
4533 cygwin || _fame=yes
4534 echores $_fame
4535 else
4536 echores "no (no fame dir)"
4538 else
4539 echores "$_fame"
4542 _def_fame='#undef USE_LIBFAME'
4543 if test "$_fame" = yes ; then
4544 _def_fame='#define USE_LIBFAME 1'
4545 _ld_fame='libfame/libfame.a'
4549 #########
4550 # AUDIO #
4551 #########
4554 echocheck "OSS Audio"
4555 if test "$_ossaudio" = auto ; then
4556 cat > $TMPC << EOF
4557 #include <sys/ioctl.h>
4558 $_inc_soundcard
4559 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4561 _ossaudio=no
4562 cc_check && _ossaudio=yes
4564 if test "$_ossaudio" = yes ; then
4565 _def_ossaudio='#define USE_OSS_AUDIO 1'
4566 _aosrc="$_aosrc ao_oss.c"
4567 _aomodules="oss $_aomodules"
4568 if test "$_linux_devfs" = yes; then
4569 _def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound/dsp"'
4570 _def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4571 else
4572 cat > $TMPC << EOF
4573 #include <sys/ioctl.h>
4574 $_inc_soundcard
4575 #ifdef OPEN_SOUND_SYSTEM
4576 int main(void) { return 0; }
4577 #else
4578 #error Not the real thing
4579 #endif
4581 _real_ossaudio=no
4582 cc_check && _real_ossaudio=yes
4583 if test "$_real_ossaudio" = yes; then
4584 _def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
4585 elif netbsd || openbsd ; then
4586 _def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
4587 _ld_arch="$_ld_arch -lossaudio"
4588 else
4589 _def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
4591 _def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
4593 else
4594 _def_ossaudio='#undef USE_OSS_AUDIO'
4595 _def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
4596 _def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
4597 _noaomodules="oss $_noaomodules"
4599 echores "$_ossaudio"
4602 echocheck "aRts"
4603 if test "$_arts" = auto ; then
4604 _arts=no
4605 if ( artsc-config --version ) >> "$TMPLOG" 2>&1 ; then
4607 cat > $TMPC << EOF
4608 #include <artsc.h>
4609 int main(void) { return 0; }
4611 cc_check `artsc-config --libs` `artsc-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _arts=yes
4616 if test "$_arts" = yes ; then
4617 _def_arts='#define USE_ARTS 1'
4618 _aosrc="$_aosrc ao_arts.c"
4619 _aomodules="arts $_aomodules"
4620 _ld_arts=`artsc-config --libs`
4621 _inc_arts=`artsc-config --cflags`
4622 else
4623 _noaomodules="arts $_noaomodules"
4625 echores "$_arts"
4628 echocheck "EsounD"
4629 if test "$_esd" = auto ; then
4630 _esd=no
4631 if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then
4633 cat > $TMPC << EOF
4634 #include <esd.h>
4635 int main(void) { return 0; }
4637 cc_check `esd-config --libs` `esd-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _esd=yes
4641 echores "$_esd"
4643 if test "$_esd" = yes ; then
4644 _def_esd='#define USE_ESD 1'
4645 _aosrc="$_aosrc ao_esd.c"
4646 _aomodules="esd $_aomodules"
4647 _ld_esd=`esd-config --libs`
4648 _inc_esd=`esd-config --cflags`
4650 echocheck "esd_get_latency()"
4651 cat > $TMPC << EOF
4652 #include <esd.h>
4653 int main(void) { return esd_get_latency(0); }
4655 cc_check `esd-config --libs` `esd-config --cflags` && _esd_latency=yes && _def_esd_latency='#define HAVE_ESD_LATENCY'
4656 echores "$_esd_latency"
4657 else
4658 _def_esd='#undef USE_ESD'
4659 _def_esd_latency='#undef HAVE_ESD_LATENCY'
4660 _noaomodules="esd $_noaomodules"
4663 echocheck "Polyp"
4664 if test "$_polyp" = auto ; then
4665 _polyp=no
4666 if ( pkg-config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ) >> "$TMPLOG" 2>&1 ; then
4668 cat > $TMPC << EOF
4669 #include <polyp/polyplib.h>
4670 #include <polyp/mainloop.h>
4671 #include <polyp/polyplib-error.h>
4672 int main(void) { return 0; }
4674 cc_check `pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _polyp=yes
4678 echores "$_polyp"
4680 if test "$_polyp" = yes ; then
4681 _def_polyp='#define USE_POLYP 1'
4682 _aosrc="$_aosrc ao_polyp.c"
4683 _aomodules="polyp $_aomodules"
4684 _ld_polyp=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
4685 _inc_polyp=`pkg-config --cflags polyplib polyplib-error polyplib-mainloop`
4686 else
4687 _def_polyp='#undef USE_POLYP'
4688 _noaomodules="polyp $_noaomodules"
4692 echocheck "JACK"
4693 if test "$_jack" = auto ; then
4694 _jack=no
4695 if ( ( pkg-config --modversion jack ) > /dev/null 2>&1 ) &&
4696 ( jackd --version | grep version | awk '{ print $3 }' ) >> "$TMPLOG" 2>&1 ; then
4698 cat > $TMPC << EOF
4699 #include <jack/jack.h>
4700 int main(void) { jack_client_new("test"); return 0; }
4702 cc_check `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes
4706 if test "$_jack" = yes ; then
4707 _def_jack='#define USE_JACK 1'
4708 _aosrc="$_aosrc ao_jack.c"
4709 _aomodules="jack $_aomodules"
4710 _ld_jack="`pkg-config --libs jack`"
4711 _inc_jack=`pkg-config --cflags jack`
4712 else
4713 _noaomodules="jack $_noaomodules"
4715 echores "$_jack"
4718 echocheck "ALSA audio"
4719 if test "$_alsa" != no ; then
4720 _alsa=no
4721 cat > $TMPC << EOF
4722 #include <sys/asoundlib.h>
4723 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==5)); }
4725 cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.5.x'
4727 cat > $TMPC << EOF
4728 #include <sys/asoundlib.h>
4729 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4731 cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x-sys'
4732 cat > $TMPC << EOF
4733 #include <alsa/asoundlib.h>
4734 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4736 cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x-alsa'
4738 cat > $TMPC << EOF
4739 #include <sys/asoundlib.h>
4740 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4742 cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='1.0.x-sys'
4743 cat > $TMPC << EOF
4744 #include <alsa/asoundlib.h>
4745 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4747 cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='1.0.x-alsa'
4749 _def_alsa5='#undef HAVE_ALSA5'
4750 _def_alsa9='#undef HAVE_ALSA9'
4751 _def_alsa1x='#undef HAVE_ALSA1X'
4752 _def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H'
4753 _def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
4754 if test "$_alsaver" ; then
4755 if test "$_alsaver" = '0.5.x' ; then
4756 _aosrc="$_aosrc ao_alsa5.c"
4757 _aomodules="alsa5 $_aomodules"
4758 _def_alsa5='#define HAVE_ALSA5 1'
4759 _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
4760 echores "yes (using alsa 0.5.x and sys/asoundlib.h)"
4761 elif test "$_alsaver" = '0.9.x-sys' ; then
4762 _aosrc="$_aosrc ao_alsa.c"
4763 _aomodules="alsa $_aomodules"
4764 _def_alsa9='#define HAVE_ALSA9 1'
4765 _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
4766 echores "yes (using alsa 0.9.x and sys/asoundlib.h)"
4767 elif test "$_alsaver" = '0.9.x-alsa' ; then
4768 _aosrc="$_aosrc ao_alsa.c"
4769 _aomodules="alsa $_aomodules"
4770 _def_alsa9='#define HAVE_ALSA9 1'
4771 _def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
4772 echores "yes (using alsa 0.9.x and alsa/asoundlib.h)"
4773 elif test "$_alsaver" = '1.0.x-sys' ; then
4774 _aosrc="$_aosrc ao_alsa.c"
4775 _aomodules="alsa $_aomodules"
4776 _def_alsa1x="#define HAVE_ALSA1X 1"
4777 _def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
4778 echores "yes (using alsa 1.0.x and sys/asoundlib.h)"
4779 elif test "$_alsaver" = '1.0.x-alsa' ; then
4780 _aosrc="$_aosrc ao_alsa.c"
4781 _aomodules="alsa $_aomodules"
4782 _def_alsa1x="#define HAVE_ALSA1X 1"
4783 _def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
4784 echores "yes (using alsa 1.0.x and alsa/asoundlib.h)"
4786 _ld_alsa="-lasound $_ld_dl $_ld_pthread"
4787 else
4788 _noaomodules="alsa $_noaomodules"
4789 echores "no"
4793 echocheck "Sun audio"
4794 if test "$_sunaudio" = auto ; then
4795 cat > $TMPC << EOF
4796 #include <sys/types.h>
4797 #include <sys/audioio.h>
4798 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4800 _sunaudio=no
4801 cc_check && _sunaudio=yes
4803 if test "$_sunaudio" = yes ; then
4804 _def_sunaudio='#define USE_SUN_AUDIO 1'
4805 _aosrc="$_aosrc ao_sun.c"
4806 _aomodules="sun $_aomodules"
4807 else
4808 _def_sunaudio='#undef USE_SUN_AUDIO'
4809 _noaomodules="sun $_noaomodules"
4811 echores "$_sunaudio"
4814 echocheck "Sun mediaLib"
4815 if test "$_mlib" = auto ; then
4816 _mlib=no
4817 test -z "$_mlibdir" && _mlibdir=/opt/SUNWmlib
4818 cat > $TMPC << EOF
4819 #include <mlib.h>
4820 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
4822 cc_check -I${_mlibdir}/include -L${_mlibdir}/lib -lmlib && _mlib=yes
4824 if test "$_mlib" = yes ; then
4825 _def_mlib='#define HAVE_MLIB 1'
4826 _inc_mlib=" -I${_mlibdir}/include "
4827 _ld_mlib=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
4828 else
4829 _def_mlib='#undef HAVE_MLIB'
4831 echores "$_mlib"
4834 echocheck "SGI audio"
4835 if test "$_sgiaudio" = auto ; then
4836 # check for SGI audio
4837 cat > $TMPC << EOF
4838 #include <dmedia/audio.h>
4839 int main(void) { return 0; }
4841 _sgiaudio=no
4842 cc_check && _sgiaudio=yes
4844 if test "$_sgiaudio" = "yes" ; then
4845 _def_sgiaudio='#define USE_SGI_AUDIO 1'
4846 _ld_sgiaudio='-laudio'
4847 _aosrc="$_aosrc ao_sgi.c"
4848 _aomodules="sgi $_aomodules"
4849 else
4850 _def_sgiaudio='#undef USE_SGI_AUDIO'
4851 _noaomodules="sgi $_noaomodules"
4853 echores "$_sgiaudio"
4856 echocheck "VCD support"
4857 if linux || bsdos || freebsd || netbsd || sunos || darwin ; then
4858 _inputmodules="vcd $_inputmodules"
4859 _def_vcd='#define HAVE_VCD 1'
4860 echores "ok"
4861 else
4862 _def_vcd='#undef HAVE_VCD'
4863 _noinputmodules="vcd $_noinputmodules"
4864 echores "not supported on this OS"
4867 echocheck "DVD support (libmpdvdkit)"
4868 if test "$_dvdkit" = auto ; then
4869 _dvdkit=no
4870 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux; then
4871 test -f "./libmpdvdkit2/Makefile" && _dvdkit=yes
4872 test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
4875 if test "$_dvdkit" = yes ; then
4876 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
4877 if test -f "./libmpdvdkit2/Makefile" ; then
4878 _inputmodules="mpdvdkit2 $_inputmodules"
4879 _dvdread=libmpdvdkit2
4880 _dvdkit2=yes
4881 _dvdkit=no
4882 else
4883 _inputmodules="mpdvdkit $_inputmodules"
4884 _dvdread=libmpdvdkit
4886 else
4887 _noinputmodules="mpdvdkit $_noinputmodules"
4889 _def_dvd_linux='#undef HAVE_LINUX_DVD_STRUCT'
4890 _def_dvd_bsd='#undef HAVE_BSD_DVD_STRUCT'
4891 _dev_dvd_openbsd='#undef HAVE_OPENBSD_DVD_STRUCT'
4892 _def_dvd_darwin='#undef DARWIN_DVD_IOCTL'
4893 if linux || netbsd || openbsd || bsdos ; then
4894 _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
4895 if openbsd ; then
4896 _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
4898 else
4899 if freebsd ; then
4900 _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
4901 else
4902 if darwin ; then
4903 _def_dvd_darwin='#define DARWIN_DVD_IOCTL'
4907 else
4908 _noinputmodules="mpdvdkit $_noinputmodules"
4910 if test "$_dvdkit" = yes || test "$_dvdkit2" = yes; then
4911 echores "yes"
4912 else
4913 echores "no"
4916 echocheck "DVD support (libdvdread)"
4917 if test "$_dvdread" = auto ; then
4918 cat > $TMPC << EOF
4919 #include <inttypes.h>
4920 #include <dvdread/dvd_reader.h>
4921 #include <dvdread/ifo_types.h>
4922 #include <dvdread/ifo_read.h>
4923 #include <dvdread/nav_read.h>
4924 int main(void) { return 0; }
4926 _dvdread=no
4927 if test "$_dl" = yes; then
4928 cc_check \
4929 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
4930 _dvdread=yes
4933 _def_mpdvdkit="#undef USE_MPDVDKIT"
4934 case "$_dvdread" in
4935 yes)
4936 _largefiles=yes
4937 _def_dvdread='#define USE_DVDREAD 1'
4938 _ld_dvdread='-ldvdread'
4939 _inputmodules="dvdread $_inputmodules"
4940 echores "yes"
4943 _def_dvdread='#undef USE_DVDREAD'
4944 _noinputmodules="dvdread $_noinputmodules"
4945 echores "no"
4947 libmpdvdkit)
4948 _largefiles=yes
4949 _def_dvdread='#define USE_DVDREAD 1'
4950 _ld_dvdread='-Llibmpdvdkit -lmpdvdkit'
4951 _noinputmodules="dvdread $_noinputmodules"
4952 _def_mpdvdkit="#define USE_MPDVDKIT 1"
4953 echores "disabled by libmpdvdkit"
4955 libmpdvdkit2)
4956 _largefiles=yes
4957 _def_dvdread='#define USE_DVDREAD 1'
4958 _ld_dvdread='-Llibmpdvdkit2 -lmpdvdkit'
4959 _noinputmodules="dvdread $_noinputmodules"
4960 _def_mpdvdkit="#define USE_MPDVDKIT 2"
4961 echores "disabled by libmpdvdkit2"
4963 esac
4965 # dvdnav disabled, it does not work
4966 # echocheck "DVD support (libdvdnav)"
4967 # if test "$_dvdnav" = yes ; then
4968 # cat > $TMPC <<EOF
4969 # #include <dvdnav.h>
4970 # int main(void) { dvdnav_t *dvd=0; return 0; }
4971 # EOF
4972 # _dvdnav=no
4973 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
4974 # if test -z "$_dvdnavconfig" ; then
4975 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
4976 # _dvdnavconfig="dvdnav-config"
4977 # fi
4978 # fi
4979 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
4980 # _used_css=
4981 # test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
4982 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
4983 # fi
4984 # if test "$_dvdnav" = yes ; then
4985 # _largefiles=yes
4986 # _def_dvdnav='#define USE_DVDNAV 1'
4987 # if test -n "$_legal_dvdnavdir" ; then
4988 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
4989 # elif test -n "$_dvdnavconfig" ; then
4990 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
4991 # else
4992 # _ld_css="$_ld_css -ldvdnav"
4993 # fi
4994 # if test -n "$_dvdnavconfig" ; then
4995 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
4996 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
4997 # fi
4998 # if test -n "$_dvdnavdir" ; then
4999 # _inc_extra="$_inc_extra -I$_dvdnavdir"
5000 # fi
5001 # _inputmodules="dvdnav $_inputmodules"
5002 # echores "yes"
5003 # else
5004 # _def_dvdnav='#undef USE_DVDNAV'
5005 # _noinputmodules="dvdnav $_noinputmodules"
5006 # echores "no"
5007 # fi
5009 echocheck "cdparanoia"
5010 if test "$_cdparanoia" = auto ; then
5011 cat > $TMPC <<EOF
5012 #include <cdda_interface.h>
5013 #include <cdda_paranoia.h>
5014 // This need a better test. How ?
5015 int main(void) { return 1; }
5017 _cdparanoia=no
5018 if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
5019 _cdparanoia=yes
5020 else
5021 for I in /usr/include/cdda /usr/local/include/cdda ; do
5022 if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
5023 _cdparanoia=yes; _inc_cdparanoia="-I$I"; break
5025 done
5028 if test "$_cdparanoia" = yes ; then
5029 _def_cdparanoia='#define HAVE_CDDA'
5030 _inputmodules="cdda $_inputmodules"
5031 _ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
5032 openbsd && _ld_cdparanoia="$_ld_cdparanoia -lutil"
5033 else
5034 _def_cdparanoia='#undef HAVE_CDDA'
5035 _noinputmodules="cdda $_noinputmodules"
5037 echores "$_cdparanoia"
5040 echocheck "freetype >= 2.0.9"
5042 # freetype depends on iconv
5043 if test "$_iconv" = no ; then
5044 _freetype="no (iconv support needed)"
5047 if test "$_freetype" = auto ; then
5048 if ( $_freetypeconfig --version ) >/dev/null 2>&1 ; then
5049 cat > $TMPC << EOF
5050 #include <stdio.h>
5051 #include <ft2build.h>
5052 #include FT_FREETYPE_H
5053 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5054 #error "Need FreeType 2.0.9 or newer"
5055 #endif
5056 int main()
5058 FT_Library library;
5059 FT_Int major=-1,minor=-1,patch=-1;
5060 int err=FT_Init_FreeType(&library);
5061 if(err){
5062 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5063 exit(err);
5065 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5066 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5067 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5068 (int)major,(int)minor,(int)patch );
5069 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5070 printf("Library and header version mismatch! Fix it in your distribution!\n");
5071 exit(1);
5073 return 0;
5076 _freetype=no
5077 cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype=yes
5078 else
5079 _freetype=no
5082 if test "$_freetype" = yes ; then
5083 _def_freetype='#define HAVE_FREETYPE'
5084 _inc_freetype=`$_freetypeconfig --cflags`
5085 _ld_freetype=`$_freetypeconfig --libs`
5086 else
5087 _def_freetype='#undef HAVE_FREETYPE'
5089 echores "$_freetype"
5091 if test "$_freetype" = no ; then
5092 _fontconfig=no
5094 echocheck "fontconfig"
5095 if test "$_fontconfig" = auto ; then
5096 if ( pkg-config --modversion fontconfig) > /dev/null 2>&1 ; then
5097 cat > $TMPC << EOF
5098 #include <stdio.h>
5099 #include <fontconfig/fontconfig.h>
5100 int main()
5102 int err = FcInit();
5103 if(err == FcFalse){
5104 printf("Couldn't initialize fontconfig lib\n");
5105 exit(err);
5107 return 0;
5111 _fontconfig=no
5112 cc_check `pkg-config --cflags --libs fontconfig` && ( $TMPO >> "$TMPLOG" ) && _fontconfig=yes
5113 else
5114 _fontconfig=no
5117 if test "$_fontconfig" = yes ; then
5118 _def_fontconfig='#define HAVE_FONTCONFIG'
5119 _inc_fontconfig=`pkg-config --cflags fontconfig`
5120 _ld_fontconfig=`pkg-config --libs fontconfig`
5121 else
5122 _def_fontconfig='#undef HAVE_FONTCONFIG'
5124 echores "$_fontconfig"
5126 echocheck "fribidi with charsets"
5127 if test "$_fribidi" = yes ; then
5128 if ( $_fribidiconfig --version ) >/dev/null 2>&1 ; then
5129 cat > $TMPC << EOF
5130 #include <stdio.h>
5131 /* workaround for fribidi 0.10.4 and below */
5132 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5133 #include <fribidi/fribidi.h>
5134 int main()
5136 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5137 printf("Fribidi headers are not consistents with the library!\n");
5138 exit(1);
5140 return 0;
5143 _fribidi=no
5144 cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _fribidi=yes
5145 else
5146 _fribidi=no
5149 if test "$_fribidi" = yes ; then
5150 _def_fribidi='#define USE_FRIBIDI'
5151 _inc_fribidi=`$_fribidiconfig --cflags`
5152 _ld_fribidi=`$_fribidiconfig --libs`
5153 else
5154 _def_fribidi='#undef USE_FRIBIDI'
5156 echores "$_fribidi"
5159 echocheck "ENCA"
5160 if test "$_enca" = auto ; then
5161 cat > $TMPC << EOF
5162 #include <enca.h>
5163 int main()
5165 const char **langs;
5166 size_t langcnt;
5167 langs = enca_get_languages(&langcnt);
5168 return 0;
5171 _enca=no
5172 cc_check -lenca && _enca=yes
5174 if test "$_enca" = yes ; then
5175 _def_enca='#define HAVE_ENCA 1'
5176 _ld_enca='-lenca'
5177 else
5178 _def_enca='#undef HAVE_ENCA'
5180 echores "$_enca"
5183 echocheck "zlib"
5184 cat > $TMPC << EOF
5185 #include <zlib.h>
5186 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5188 _zlib=no
5189 cc_check -lz && _zlib=yes
5190 if test "$_zlib" = yes ; then
5191 _def_zlib='#define HAVE_ZLIB 1'
5192 _ld_zlib='-lz'
5193 else
5194 _def_zlib='#undef HAVE_ZLIB'
5196 echores "$_zlib"
5199 echocheck "RTC"
5200 if test "$_rtc" = auto ; then
5201 cat > $TMPC << EOF
5202 #include <sys/ioctl.h>
5203 #ifdef __linux__
5204 #include <linux/rtc.h>
5205 #else
5206 #include <rtc.h>
5207 #define RTC_PIE_ON RTCIO_PIE_ON
5208 #endif
5209 int main(void) { return RTC_PIE_ON; }
5211 _rtc=no
5212 cc_check && _rtc=yes
5214 if test "$_rtc" = yes ; then
5215 _def_rtc='#define HAVE_RTC 1'
5216 else
5217 _def_rtc='#undef HAVE_RTC'
5219 echores "$_rtc"
5222 echocheck "external liblzo support"
5223 if test "$_liblzo" = auto ; then
5224 _liblzo=no
5225 cat > $TMPC << EOF
5226 #include <lzo1x.h>
5227 int main(void) { lzo_init();return 0; }
5229 cc_check -llzo && _liblzo=yes
5231 if test "$_liblzo" = yes ; then
5232 _def_liblzo='#define USE_LIBLZO 1'
5233 _ld_liblzo='-llzo'
5234 _codecmodules="liblzo $_codecmodules"
5235 else
5236 _def_liblzo='#undef USE_LIBLZO'
5237 _nocodecmodules="liblzo $_nocodecmodules"
5239 echores "$_liblzo"
5242 echocheck "mad support"
5243 if test "$_mad" = auto ; then
5244 _mad=no
5245 cat > $TMPC << EOF
5246 #include <mad.h>
5247 int main(void) { return 0; }
5249 cc_check $_madlibdir -lmad && _mad=yes
5251 if test "$_mad" = yes ; then
5252 _def_mad='#define USE_LIBMAD 1'
5253 _ld_mad='-lmad'
5254 _codecmodules="libmad $_codecmodules"
5255 else
5256 _def_mad='#undef USE_LIBMAD'
5257 _nocodecmodules="libmad $_nocodecmodules"
5259 echores "$_mad"
5261 echocheck "Toolame"
5262 if test "$_toolame" = auto ; then
5263 cat > $TMPC <<EOF
5264 #include <toolame.h>
5265 int main(void) { toolame_init(); return 0; }
5267 _toolame=no
5268 _toolame_extraflags=""
5269 _toolame_lib="-ltoolame"
5270 if test -n "$_toolamedir"; then
5271 _toolame_extraflags="-I$_toolamedir -L$_toolamedir"
5273 cc_check $_toolame_extraflags $_toolame_lib $_ld_lm && _toolame=yes
5275 if test "$_toolame" = yes ; then
5276 _def_toolame='#define HAVE_TOOLAME 1'
5277 _codecmodules="$_codecmodules toolame"
5278 else
5279 _def_toolame='#undef HAVE_TOOLAME'
5280 _toolame_lib=""
5281 _nocodecmodules="toolame $_nocodecmodules"
5283 if test -z "$_toolamedir" ; then
5284 echores "$_toolame"
5285 else
5286 echores "$_toolame (using $_toolamedir)"
5289 echocheck "Twolame"
5290 if test "$_twolame" = auto ; then
5291 cat > $TMPC <<EOF
5292 #include <twolame.h>
5293 int main(void) { twolame_init(); return 0; }
5295 _twolame=no
5296 _twolame_lib="-ltwolame"
5297 cc_check $_twolame_lib $_ld_lm && _twolame=yes
5299 if test "$_twolame" = yes ; then
5300 _def_twolame='#define HAVE_TWOLAME 1'
5301 _codecmodules="$_codecmodules twolame"
5302 else
5303 _def_twolame='#undef HAVE_TWOLAME'
5304 _twolame_lib=""
5305 _nocodecmodules="twolame $_nocodecmodules"
5307 echores "$_twolame"
5309 echocheck "OggVorbis support"
5310 if test "$_tremor_internal" = yes; then
5311 _vorbis=yes
5312 elif test "$_vorbis" = auto; then
5313 _vorbis=no
5314 cat > $TMPC << EOF
5315 #include <vorbis/codec.h>
5316 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5318 cc_check -lvorbis -logg $_ld_lm && _vorbis=yes
5320 if test "$_vorbis" = yes ; then
5321 _def_vorbis='#define HAVE_OGGVORBIS 1'
5322 if test "$_tremor_internal" = yes ; then
5323 # do not set _ld_vorbis as it is resolved separately
5324 # mp3lame support for vorbis is deprecated so don't care
5325 _def_tremor='#define TREMOR 1'
5326 if test "$_tremor_low" = yes ; then
5327 _tremor_flags='-D_LOW_ACCURACY_'
5328 else
5329 _tremor_flags=''
5331 _codecmodules="tremor(internal) $_codecmodules"
5332 elif test "$_tremor" = yes ; then
5333 _def_tremor='#define TREMOR 1'
5334 _ld_vorbis='-lvorbisidec'
5335 _codecmodules="tremor $_codecmodules"
5336 else
5337 _def_tremor='#undef TREMOR'
5338 _ld_vorbis='-lvorbis -logg'
5339 _codecmodules="libvorbis $_codecmodules"
5341 else
5342 _def_vorbis='#undef HAVE_OGGVORBIS'
5343 _def_tremor='#undef TREMOR'
5344 _nocodecmodules="libvorbis $_nocodecmodules"
5346 if test "$_vorbis" = yes -a "$_tremor_internal" = yes -a "$_tremor_low" = yes ; then
5347 echores "$_vorbis (internal low accuracy Tremor)"
5348 elif test "$_vorbis" = yes -a "$_tremor_internal" = yes ; then
5349 echores "$_vorbis (internal Tremor)"
5350 elif test "$_vorbis" = yes -a "$_tremor" = yes ; then
5351 echores "$_vorbis (Tremor)"
5352 else
5353 echores "$_vorbis"
5356 echocheck "OggTheora support (only the CVS version!)"
5357 if test "$_theora" = auto ; then
5358 _theora=no
5359 cat > $TMPC << EOF
5360 #include <theora/theora.h>
5361 #include <string.h>
5362 int main(void)
5364 /* theora is in flux, make sure that all interface routines and
5365 * datatypes exist and work the way we expect it, so we don't break
5366 * mplayer */
5367 ogg_packet op;
5368 theora_comment tc;
5369 theora_info inf;
5370 theora_state st;
5371 yuv_buffer yuv;
5372 int r;
5373 double t;
5375 theora_info_init (&inf);
5376 theora_comment_init (&tc);
5378 return 0;
5380 /* we don't want to execute this kind of nonsense; just for making sure
5381 * that compilation works... */
5382 memset(&op, 0, sizeof(op));
5383 r = theora_decode_header (&inf, &tc, &op);
5384 r = theora_decode_init (&st, &inf);
5385 t = theora_granule_time (&st, op.granulepos);
5386 r = theora_decode_packetin (&st, &op);
5387 r = theora_decode_YUVout (&st, &yuv);
5388 theora_clear (&st);
5390 return 0;
5393 cc_check -ltheora -logg $_ld_lm && _theora=yes
5395 if test "$_theora" = yes ; then
5396 _def_theora='#define HAVE_OGGTHEORA 1'
5397 _codecmodules="libtheora $_codecmodules"
5398 _ld_theora="-ltheora -logg"
5399 else
5400 _def_theora='#undef HAVE_OGGTHEORA'
5401 _nocodecmodules="libtheora $_nocodecmodules"
5403 echores "$_theora"
5405 echocheck "mp3lib support"
5406 if test "$_mp3lib" = yes ; then
5407 _def_mp3lib='#define USE_MP3LIB 1'
5408 _codecmodules="mp3lib $_codecmodules"
5409 else
5410 _def_mp3lib='#undef USE_MP3LIB'
5411 _nocodecmodules="mp3lib $_nocodecmodules"
5413 echores "$_mp3lib"
5415 echocheck "liba52 support"
5416 if test "$_liba52" = yes ; then
5417 _def_liba52='#define USE_LIBA52 1'
5418 _codecmodules="liba52 $_codecmodules"
5419 else
5420 _def_liba52='#undef USE_LIBA52'
5421 _nocodecmodules="liba52 $_nocodecmodules"
5423 echores "$_liba52"
5425 echocheck "libdts support"
5426 if test "$_libdts" = auto ; then
5427 _libdts=no
5428 cat > $TMPC << EOF
5429 #include <inttypes.h>
5430 #include <dts.h>
5431 int main(void) { dts_init (0); return 0; }
5433 cc_check $_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts=yes
5435 if test "$_libdts" = yes ; then
5436 _def_libdts='#define CONFIG_DTS 1'
5437 _ld_libdts="$_ld_libdts -ldts $_ld_lm"
5438 _codecmodules="libdts $_codecmodules"
5439 else
5440 _def_libdts='#undef CONFIG_DTS'
5441 _nocodecmodules="libdts $_nocodecmodules"
5443 echores "$_libdts"
5445 echocheck "libmpeg2 support"
5446 if test "$_libmpeg2" = yes ; then
5447 _def_libmpeg2='#define USE_LIBMPEG2 1'
5448 _codecmodules="libmpeg2 $_codecmodules"
5449 else
5450 _def_libmpeg2='#undef USE_LIBMPEG2'
5451 _nocodecmodules="libmpeg2 $_nocodecmodules"
5453 echores "$_libmpeg2"
5455 echocheck "patched libmpcdec (musepack)"
5456 if test "$_musepack" = auto ; then
5457 _musepack=no
5458 cat > $TMPC << EOF
5459 #include <mpcdec/mpcdec.h>
5460 int main(void) {
5461 mpc_streaminfo info;
5462 mpc_decoder decoder;
5463 mpc_decoder_set_streaminfo(&decoder, &info);
5464 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5467 cc_check -lmpcdec $_ld_lm && _musepack=yes
5469 if test "$_musepack" = yes ; then
5470 _def_musepack='#define HAVE_MUSEPACK 1'
5471 _ld_musepack='-lmpcdec'
5472 _codecmodules="musepack $_codecmodules"
5473 else
5474 _def_musepack='#undef HAVE_MUSEPACK'
5475 _nocodecmodules="musepack $_nocodecmodules"
5477 echores "$_musepack"
5480 echocheck "Matroska support"
5481 if test "$_matroska_internal" = yes ; then
5482 _inputmodules="matroska $_inputmodules"
5483 _def_matroska='#define HAVE_MATROSKA 1'
5484 else
5485 _noinputmodules="matroska $_noinputmodules"
5486 _def_matroska='#undef HAVE_MATROSKA'
5488 echores "$_matroska_internal"
5490 echocheck "FAAC (AAC encoder) support"
5491 if test "$_faac" = auto ; then
5492 cat > $TMPC <<EOF
5493 #include <inttypes.h>
5494 #include <faac.h>
5495 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5497 if ( cc_check -c -O4 -lfaac $_ld_lm ); then
5498 _faac=yes
5499 elif ( cc_check -c -O4 -lfaac -lmp4v2 -lstdc++ $_ld_lm ); then
5500 _faac=yes
5501 _ld_faac="-lmp4v2 -lstdc++"
5502 else
5503 _faac=no
5506 if test "$_faac" = yes ; then
5507 _def_faac="#define HAVE_FAAC 1"
5508 _codecmodules="$_codecmodules faac"
5509 _ld_faac="-lfaac $_ld_faac"
5510 else
5511 _def_faac="#undef HAVE_FAAC"
5512 _nocodecmodules="$_nocodecmodules faac"
5514 echores "$_faac"
5516 echocheck "internal FAAD2 (AAC) support"
5517 _inc_faad="-I`pwd`/libfaad2"
5518 if test "$_faad_internal" = auto ; then
5519 # the faad check needs a config.h file
5520 if not test -f "config.h" ; then
5521 cat > config.h << EOF
5522 /* C99 lrintf function available */
5523 $_def_lrintf
5526 # internal faad: check if our dear gcc is able to compile it...
5527 cp "`pwd`/libfaad2/cfft.c" $TMPC
5528 if ( cc_check -c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer $_opt_gnu99 -D_GNU_SOURCE $_inc_faad ); then
5529 _faad_internal=yes
5530 else
5531 _faad_internal="no (broken gcc)"
5534 if test "$_faad_internal" = yes ; then
5535 _def_faad_internal="#define USE_INTERNAL_FAAD 1"
5536 _faad_external=no
5537 else
5538 _def_faad_internal="#undef USE_INTERNAL_FAAD"
5539 _inc_faad=
5541 echores "$_faad_internal"
5544 echocheck "external FAAD2 (AAC) support"
5545 if test "$_faad_external" != no ; then
5546 _ld_faad='-lfaad'
5547 _inc_faad="$_inc_extra"
5548 # external faad: check if it's really faad2 :)
5549 if test "$_faad_external" = auto ; then
5550 _faad_external=no
5551 cat > $TMPC << EOF
5552 #include <faad.h>
5553 #ifndef FAAD_MIN_STREAMSIZE
5554 #error Too old version
5555 #endif
5556 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5558 cc_check $_inc_faad $_ld_faad $_ld_lm && _faad_external=yes
5560 echores "$_faad_external"
5561 else
5562 echores "no"
5565 if test "$_faad_external" = yes; then
5566 _def_faad='#define HAVE_FAAD 1'
5567 _codecmodules="faad2(external) $_codecmodules"
5568 elif test "$_faad_internal" = yes; then
5569 _def_faad='#define HAVE_FAAD 1'
5570 _codecmodules="faad2(internal) $_codecmodules"
5571 else
5572 _def_faad='#undef HAVE_FAAD'
5573 _nocodecmodules="faad2 $_nocodecmodules"
5574 _ld_faad=
5578 echocheck "LADSPA plugin support"
5579 if test "$_ladspa" = auto ; then
5580 cat > $TMPC <<EOF
5581 #include <stdio.h>
5582 #include <ladspa.h>
5583 int main(void) {
5584 const LADSPA_Descriptor *ld = NULL;
5585 return 0;
5588 _ladspa=no
5589 cc_check && _ladspa=yes
5591 if test "$_ladspa" = yes; then
5592 _def_ladspa="#define HAVE_LADSPA"
5593 _afsrc="$_afsrc af_ladspa.c"
5594 _afmodules="ladspa $_afmodules"
5595 else
5596 _def_ladspa="#undef HAVE_LADSPA"
5597 _noafmodules="ladspa $_noafmodules"
5599 echores "$_ladspa"
5602 if test "$_win32" = auto ; then
5603 if x86 ; then
5604 qnx && _win32=no
5605 else
5606 _win32=no # x86 arch only
5610 if test "$_win32" != no ; then
5611 if test -z "$_win32libdir" ; then
5612 for I in "$_libdir/codecs" "$_libdir/win32" /usr/local/lib/codecs /usr/lib/codecs /usr/local/lib/win32 /usr/lib/win32 ; do
5613 if test -d "$I" ; then
5614 _win32libdir="$I"
5615 break;
5617 done
5621 echocheck "Win32 codec DLL support"
5622 if test "$_win32" = auto ; then
5623 _win32=no
5624 test -n "$_win32libdir" && _win32=yes
5626 if test "$_win32" = yes ; then
5627 _def_win32='#define USE_WIN32DLL 1'
5628 echores "yes (using $_win32libdir)"
5629 else
5630 _def_win32='#undef USE_WIN32DLL'
5631 _nocodecmodules="win32 $_nocodecmodules"
5632 _dshow=no
5633 echores "no"
5636 if test "$_win32" != no ; then
5637 _def_win32_loader='#undef WIN32_LOADER'
5638 echocheck "Win32 loader support"
5639 _ld_win32='loader/libloader.a'
5640 _dep_win32='loader/libloader.a'
5641 _codecmodules="win32 $_codecmodules"
5642 if openbsd ; then
5643 x86 && _ld_win32="$_ld_win32 -li386"
5645 if not win32 ; then
5646 _def_win32_loader='#define WIN32_LOADER 1'
5647 echores "yes"
5648 else
5649 _ld_win32libs="$_ld_win32libs -ladvapi32 -lole32"
5650 echores "no (using native windows)"
5654 echocheck "DirectShow"
5655 if false ; then
5657 if test "$_dshow" != no ; then
5658 _dshow=no
5659 # check if compiler supports C++ and C++-libs are installed correctly
5660 cat > "$TMPCPP" << EOF
5661 #include <string>
5662 class myclass {
5663 private: int ret;
5664 public: int myreturn(void);
5666 int myclass::myreturn(void) { ret = 0; return ret ; }
5667 int main(void) { myclass myobject; return myobject.myreturn(); }
5669 echo "------------------------------------------------" >> "$TMPLOG"
5670 cat "$TMPCPP" >> "$TMPLOG"
5671 if ( $_cc "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
5672 _dshow=yes
5673 echores "yes (C++ is ok)"
5674 else
5675 echores "no"
5676 cat << EOF
5678 Your C++ runtime environment is broken.
5680 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5681 Are the C++ libraries correctly installed?
5682 Check for libstdc++ and in (/etc/)ld.so.conf.
5684 If you do not need DirectShow support, you can also use:
5685 ./configure --disable-dshow <your-normal-configure-options>
5686 to disable building the C++ based DirectShow code.
5689 die "$_cc's C++ is broken"
5695 echores "$_dshow"
5697 if test "$_dshow" = yes ; then
5698 _def_dshow='#define USE_DIRECTSHOW 1'
5699 _ld_dshow='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5700 _dep_dshow='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5701 _codecmodules="dshow/dmo $_codecmodules"
5702 else
5703 _def_dshow='#undef USE_DIRECTSHOW'
5704 _nocodecmodules="dshow/dmo $_nocodecmodules"
5708 echocheck "XAnim DLL"
5709 if test "$_xanim" = auto ; then
5710 _xanim=no
5711 if test "$_dl" = yes ; then
5712 if test -z "$_xanimlibdir" ; then
5713 for I in "$_libdir/codecs" /usr/local/lib/xanim/mods /usr/lib/xanim/mods /usr/lib/xanim $XANIM_MOD_DIR ; do
5714 if test -d "$I" ; then
5715 _xanimlibdir="$I"
5716 break;
5718 done
5720 test "$_xanimlibdir" && _xanim=yes
5721 if test "$_xanim" = yes ; then
5722 echores "yes (using $_xanimlibdir)"
5723 else
5724 echores "no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5726 else
5727 echores "no (dynamic loader support needed)"
5729 else
5730 echores "$_xanim (using $_xanimlibdir)"
5732 if test "$_xanim" = yes ; then
5733 _def_xanim='#define USE_XANIM 1'
5734 _def_xanim_path="#define XACODEC_PATH \"$_xanimlibdir\""
5735 _codecmodules="xanim $_codecmodules"
5736 else
5737 _def_xanim='#undef USE_XANIM'
5738 _def_xanim_path='#undef XACODEC_PATH'
5739 _nocodecmodules="xanim $_nocodecmodules"
5742 echocheck "RealPlayer DLL"
5743 if test "$_real" = auto ; then
5744 _real=no
5745 if test "$_dl" = yes || test "$_win32" = yes ; then
5746 # if test "$_dl" = yes ; then
5747 if linux || freebsd || netbsd || win32 || darwin ; then
5748 _real=yes
5749 else
5750 echores "no (tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin)"
5752 if test "$_real" = yes ; then
5753 if test -z "$_reallibdir" ; then
5754 for I in "$_libdir/codecs" "$_libdir/real" /usr/lib/real \
5755 /usr/lib/RealPlayer{9,8,}/Codecs /usr/local/RealPlayer{9,8,}/Codecs \
5756 /usr/local/lib/RealPlayer{9,8,}/Codecs /opt/RealPlayer{9,8,}/{Real/,}Codecs \
5757 {~,}/Applications/RealOne\ Player.app/Contents/MacOS/Library/Codecs \
5758 "$_win32libdir"; do
5759 if test -d "$I" ; then
5760 _reallibdir="$I"
5761 break
5763 done
5765 test "$_reallibdir" || _real=no
5766 if test "$_real" = yes ; then
5767 echores "yes (using $_reallibdir)"
5768 else
5769 echores "no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5772 else
5773 echores "no (dynamic loader support needed)"
5775 else
5776 echores "$_real (using $_reallibdir)"
5778 if test "$_real" = yes ; then
5779 _def_real='#define USE_REALCODECS 1'
5780 _def_real_path="#define REALCODEC_PATH \"$_reallibdir\""
5781 _codecmodules="real $_codecmodules"
5782 else
5783 _def_real='#undef USE_REALCODECS'
5784 _def_real_path="#undef REALCODEC_PATH"
5785 _nocodecmodules="real $_nocodecmodules"
5789 echocheck "LIVE.COM Streaming Media libraries"
5790 if test "$_live" = auto && test "$_network" = yes ; then
5791 _TMPC=$TMPC
5792 TMPC=$TMPCPP
5793 cat >$TMPC <<EOF
5794 #include <liveMedia.hh>
5795 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
5796 #error Please upgrade to version 2004.07.19 or later of the "LIVE.COM Streaming Media" libraries - available from <www.live.com/liveMedia/>
5797 #endif
5798 int main(void) {}
5801 _live_dist=no
5802 if test -z "$_livelibdir" ; then
5803 if cc_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock; then
5804 _live_dist=yes
5805 else
5806 for I in $_libdir/live /usr/lib/live /usr/local/live /usr/local/lib/live; do
5807 if test -d "$I" ; then
5808 _livelibdir="$I"
5809 break;
5811 done
5815 if test "$_live_dist" = no && test "$_livelibdir" && cc_check -I$_livelibdir/liveMedia/include \
5816 -I$_livelibdir/UsageEnvironment/include -I$_livelibdir/groupsock/include; then
5817 _live=yes
5818 else
5819 _live=no
5821 TMPC=$_TMPC
5823 if test "$_live" = yes && test "$_network" = yes ; then
5824 echores "yes (using $_livelibdir)"
5825 _def_live='#define STREAMING_LIVE_DOT_COM 1'
5826 _live_libs_def="# LIVE.COM Streaming Media libraries:
5827 LIVE_LIB_DIR = $_livelibdir
5828 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
5829 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
5830 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
5831 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
5832 LIVE_LIBS += -lstdc++
5833 LIVE_INCLUDES = -I\$(LIVE_LIB_DIR)/liveMedia/include
5834 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/UsageEnvironment/include
5835 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/BasicUsageEnvironment/include
5836 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/groupsock/include"
5837 _ld_live='$(LIVE_LIBS)'
5838 _inputmodules="live.com $_inputmodules"
5839 elif test "$_live_dist" = yes && test "$_network" = yes ; then
5840 echores "yes (using distribution version)"
5841 _live="yes"
5842 _def_live='#define STREAMING_LIVE_DOT_COM 1'
5843 _live_libs_def="# LIVE.COM Streaming Media libraries:
5844 LIVE_LIB_DIR = $_livelibdir
5845 LIVE_LIBS = -lliveMedia
5846 LIVE_LIBS += -lgroupsock
5847 LIVE_LIBS += -lUsageEnvironment
5848 LIVE_LIBS += -lBasicUsageEnvironment
5849 LIVE_LIBS += -lstdc++
5850 LIVE_INCLUDES = -I/usr/include/liveMedia
5851 LIVE_INCLUDES += -I/usr/include/UsageEnvironment
5852 LIVE_INCLUDES += -I/usr/include/BasicUsageEnvironment
5853 LIVE_INCLUDES += -I/usr/include/groupsock"
5854 _ld_live='$(LIVE_LIBS)'
5855 _inputmodules="live.com $_inputmodules"
5856 else
5857 echores "no"
5858 _def_live='#undef STREAMING_LIVE_DOT_COM'
5859 _noinputmodules="live.com $_noinputmodules"
5863 echocheck "FFmpeg libavcodec (static)"
5864 if test "$_libavcodec" = auto ; then
5865 # Note: static linking is preferred to dynamic linking
5866 _libavcodec=no
5867 if test -d libavcodec && test -f libavcodec/utils.c ; then
5868 if grep avcodec_find_encoder_by_name libavcodec/utils.c > /dev/null 2>&1 ; then
5869 _libavcodec=yes
5870 echores "yes"
5871 else
5872 echores "no (old ffmpeg version, use CVS !)"
5874 else
5875 echores "no (see DOCS/HTML/$_doc_lang/codecs.html)"
5877 else
5878 echores "$_libavcodec"
5881 echocheck "FFmpeg libavformat (static)"
5882 if test "$_libavformat" = auto ; then
5883 # Note: static linking is preferred to dynamic linking
5884 _libavformat=no
5885 if test -d libavformat && test -f libavformat/utils.c ; then
5886 _libavformat=yes
5887 echores "yes"
5888 else
5889 echores "no"
5891 else
5892 echores "$_libavformat"
5895 _def_haveffpostprocess='no'
5896 if test -d libavcodec && test -f libavcodec/libpostproc/postprocess.h ; then
5897 _def_haveffpostprocess='yes'
5900 if test "$_libavcodec" != yes ; then
5901 echocheck "FFmpeg libavcodec (dynamic)"
5902 if test "$_libavcodecso" = auto ; then
5903 _libavcodecso=no
5904 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
5905 cat > $TMPC << EOF
5906 #define FF_POSTPROCESS 1
5907 #include <ffmpeg/avcodec.h>
5908 int main(void) {
5909 avcodec_find_encoder_by_name("");
5910 return 0;
5913 if cc_check -lavcodec $_ld_lm ; then
5914 _libavcodecso=yes
5915 echores "yes (using libavcodec.so)"
5916 else
5917 echores "no (libavcodec.so is broken/obsolete)"
5919 else
5920 echores "$_libavcodecso"
5924 _def_libavcodec='#undef USE_LIBAVCODEC'
5925 _def_libavcodecso='#undef USE_LIBAVCODEC_SO'
5926 _def_ffpostprocess='#undef FF_POSTPROCESS'
5927 if test "$_libavcodec" = yes ; then
5928 _def_libavcodec='#define USE_LIBAVCODEC 1'
5929 _ld_libavcodec='libavcodec/libavcodec.a'
5930 _dep_libavcodec='libavcodec/libavcodec.a'
5931 _def_ffpostprocess='#define FF_POSTPROCESS 1'
5932 _codecmodules="libavcodec $_codecmodules"
5933 elif test "$_libavcodecso" = yes ; then
5934 _def_libavcodec='#define USE_LIBAVCODEC 1'
5935 _def_libavcodecso='#define USE_LIBAVCODEC_SO 1'
5936 _ld_libavcodec='-lavcodec'
5937 _codecmodules="libavcodec.so $_codecmodules"
5938 else
5939 _nocodecmodules="libavcodec $_nocodecmodules"
5942 _def_libavformat='#undef USE_LIBAVFORMAT'
5943 _def_libavformat_win32='#undef CONFIG_WIN32'
5944 if test "$_libavformat" = yes ; then
5945 _def_libavformat='#define USE_LIBAVFORMAT 1'
5946 _ld_libavformat='libavformat/libavformat.a'
5947 _dep_libavformat='libavformat/libavformat.a'
5948 if win32 ; then
5949 _def_libavformat_win32='#define CONFIG_WIN32 1'
5953 echocheck "amr narrowband"
5954 _echomsg=""
5955 if test "$_amr_nb" = auto ; then
5956 if test -f libavcodec/amr_float/sp_dec.c ; then
5957 if test "$_libavcodec" = yes ; then
5958 _amr_nb=yes
5959 else
5960 _amr_nb=no
5961 _echomsg "libavcodec (static) is required by amr_nb, sorry"
5963 else
5964 _amr_nb=no
5967 if test "$_amr_nb" = yes ; then
5968 _def_amr_nb='#define AMR_NB 1'
5969 else
5970 _def_amr_nb='#undef AMR_NB'
5972 echores "$_amr_nb $_echomsg"
5974 echocheck "amr narrowband, fixed point"
5975 _echomsg=""
5976 if test "$_amr_nb_fixed" = auto ; then
5977 if test -f libavcodec/amr/dtx_dec.c ; then
5978 if test "$_libavcodec" = yes ; then
5979 if test "$_amr_nb" = no ; then
5980 _amr_nb_fixed=yes
5981 else
5982 _amr_nb_fixed=no
5983 _echomsg="(disabled by amr_nb)"
5985 else
5986 _amr_nb_fixed=no
5987 _echomsg "libavcodec (static) is required by amr_nb-fixed, sorry"
5989 else
5990 _amr_nb_fixed=no
5993 if test "$_amr_nb_fixed" = yes ; then
5994 _def_amr_nb='#define AMR_NB 1'
5995 _def_amr_nb_fixed='#define AMR_NB_FIXED 1'
5996 _amr_nb=yes;
5997 else
5998 _def_amr_nb_fixed='#undef AMR_NB_FIXED'
6000 echores "$_amr_nb_fixed $_echomsg"
6002 if test "$_amr_nb" = yes ; then
6003 _codecmodules="amr_nb $_codecmodules"
6004 else
6005 _nocodecmodules="amr_nb $_nocodecmodules"
6008 echocheck "amr wideband"
6009 _echomsg=""
6010 if test "$_amr_wb" = auto ; then
6011 if test -f libavcodec/amrwb_float/dec_dtx.c ; then
6012 if test "$_libavcodec" = yes ; then
6013 _amr_wb=yes
6014 else
6015 _amr_wb=no
6016 _echomsg="libavcodec (static) is required by amr_wb, sorry"
6018 else
6019 _amr_wb=no
6022 if test "$_amr_wb" = yes ; then
6023 _def_amr_wb='#define AMR_WB 1'
6024 _codecmodules="amr_wb $_codecmodules"
6025 else
6026 _def_amr_wb='#undef AMR_WB'
6027 _nocodecmodules="amr_wb $_nocodecmodules"
6029 echores "$_amr_wb $_echomsg"
6031 echocheck "libdv-0.9.5+"
6032 if test "$_libdv" = auto ; then
6033 _libdv=no
6034 cat > $TMPC <<EOF
6035 #include <libdv/dv.h>
6036 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6038 cc_check -ldv $_ld_lm && _libdv=yes
6040 if test "$_libdv" = yes ; then
6041 _def_libdv='#define HAVE_LIBDV095 1'
6042 _ld_libdv="-ldv"
6043 _codecmodules="libdv $_codecmodules"
6044 else
6045 _def_libdv='#undef HAVE_LIBDV095'
6046 _nocodecmodules="libdv $_nocodecmodules"
6048 echores "$_libdv"
6050 echocheck "zr"
6051 if test "$_zr" = auto ; then
6052 #36067's seem to identify themselves as 36057PQC's, so the line
6053 #below should work for 36067's and 36057's.
6054 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc/pci > /dev/null 2>&1; then
6055 _zr=yes
6056 else
6057 _zr=no
6060 if test "$_zr" = yes ; then
6061 if test "$_libavcodec" = yes ; then
6062 _def_zr='#define HAVE_ZR 1'
6063 _vosrc="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6064 _vomodules="zr zr2 $_vomodules"
6065 echores "$_zr"
6066 else
6067 echores "libavcodec (static) is required by zr, sorry"
6068 _novomodules="zr $_novomodules"
6069 _def_zr='#undef HAVE_ZR'
6071 else
6072 _def_zr='#undef HAVE_ZR'
6073 _novomodules="zr zr2 $_novomodules"
6074 echores "$_zr"
6077 echocheck "bl"
6078 if test "$_bl" = yes ; then
6079 _def_bl='#define HAVE_BL 1'
6080 _vosrc="$_vosrc vo_bl.c"
6081 _vomodules="bl $_vomodules"
6082 else
6083 _def_bl='#undef HAVE_BL'
6084 _novomodules="bl $_novomodules"
6086 echores "$_bl"
6088 echocheck "XviD"
6089 cat > $TMPC << EOF
6090 #include <xvid.h>
6091 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
6093 _ld_xvid="$_ld_xvid -lxvidcore $_ld_lm"
6094 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then
6095 _xvid=yes
6096 _def_xvid3='#define HAVE_XVID3 1'
6097 _def_xvid4='#undef HAVE_XVID4'
6098 _codecmodules="xvid $_codecmodules"
6099 else
6100 cat > $TMPC << EOF
6101 #include <xvid.h>
6102 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6104 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then
6105 _xvid=yes
6106 _def_xvid3='#undef HAVE_XVID3'
6107 _def_xvid4='#define HAVE_XVID4 1'
6108 _codecmodules="xvid $_codecmodules"
6109 else
6110 _xvid=no
6111 _ld_xvid=''
6112 _def_xvid3='#undef HAVE_XVID3'
6113 _def_xvid4='#undef HAVE_XVID4'
6114 _nocodecmodules="xvid $_nocodecmodules"
6117 echores "$_xvid"
6119 _xvidcompat=no
6120 _def_decore_xvid='#undef DECORE_XVID'
6121 _def_encore_xvid='#undef ENCORE_XVID'
6122 if test "$_xvid" = yes ; then
6123 echocheck "DivX4 compatibility in XviD"
6124 cat > $TMPC << EOF
6125 #include <divx4.h>
6126 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
6128 cc_check $_ld_lm "$_ld_xvid" && _xvidcompat=yes
6129 echores "$_xvidcompat"
6132 echocheck "x264"
6133 cat > $TMPC << EOF
6134 #include <inttypes.h>
6135 #include <x264.h>
6136 #if X264_BUILD < 29
6137 #error We do not support old versions of x264. Get the latest from SVN.
6138 #endif
6139 int main(void) { x264_encoder_open((void*)0); return 0; }
6141 _ld_x264="$_ld_x264 -lx264 $_ld_lm $_ld_pthread"
6142 if test "$_x264" != no && \
6143 ( cc_check $_inc_x264 $_ld_x264 || \
6144 ( test "$_x11" = yes && cc_check $_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 )) ; \
6145 then
6146 _x264=yes
6147 _def_x264='#define HAVE_X264 1'
6148 _codecmodules="x264 $_codecmodules"
6149 else
6150 _x264=no
6151 _ld_x264=''
6152 _def_x264='#undef HAVE_X264'
6153 _nocodecmodules="x264 $_nocodecmodules"
6155 echores "$_x264"
6157 echocheck "DivX4linux/DivX5linux/OpenDivX decore"
6158 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
6159 cat > $TMPC << EOF
6160 #include <decore.h>
6161 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
6163 if test "$_divx4linux" != no && cc_check $_ld_lm -ldivxdecore ; then
6164 _opendivx=no
6165 _ld_decore='-ldivxdecore'
6166 _def_decore='#define NEW_DECORE 1'
6167 _def_divx='#define USE_DIVX'
6168 _def_divx5='#undef DECORE_DIVX5'
6169 _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
6170 _codecmodules="divx4linux $_codecmodules"
6171 echores "DivX4linux (with libdivxdecore.so)"
6172 else
6173 # if test "$_divx4linux" != no ; then
6174 # DivX5 check
6175 # OdivxPP disabled because of:
6176 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
6177 cat > $TMPC << EOF
6178 #include <decore.h>
6179 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
6181 if test "$_divx4linux" != no && cc_check $_ld_lm -ldivxdecore ; then
6182 _opendivx=no
6183 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
6184 _ld_decore='-ldivxdecore'
6185 _def_decore='#define NEW_DECORE 1'
6186 _def_divx='#define USE_DIVX'
6187 _def_divx5='#define DECORE_DIVX5 1'
6188 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
6189 _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
6190 _codecmodules="divx5linux $_codecmodules"
6191 _nocodecmodules="divx4linux $_nocodecmodules"
6192 echores "DivX5linux (with libdivxdecore.so)"
6193 elif test "$_opendivx" != no ; then
6194 _opendivx=yes
6195 _ld_decore='opendivx/libdecore.a'
6196 _def_decore='#undef NEW_DECORE'
6197 _def_divx='#define USE_DIVX'
6198 _def_divx5='#undef DECORE_DIVX5'
6199 _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
6200 _codecmodules="opendivx $_codecmodules"
6201 _nocodecmodules="divx5linux $_nocodecmodules"
6202 echores "OpenDivX"
6203 elif test "$_xvidcompat" = yes ; then
6204 _opendivx=no
6205 _ld_decore=''
6206 _def_decore='#define NEW_DECORE 1'
6207 _def_divx='#define USE_DIVX 1'
6208 _def_divx5='#undef DECORE_DIVX5'
6209 _def_decore_xvid='#define DECORE_XVID 1'
6210 _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
6211 _nocodecmodules="opendivx divx5linux divx4linux $_nocodecmodules"
6212 echores "XviD compat."
6213 else
6214 _opendivx=no
6215 _ld_decore=''
6216 _def_decore='#undef NEW_DECORE'
6217 _def_divx='#undef USE_DIVX'
6218 _def_divx5='#undef DECORE_DIVX5'
6219 _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
6220 _nocodecmodules="opendivx $_nocodecmodules"
6221 echores "no"
6222 fi # DivX5 check
6226 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
6227 if test "$_mencoder" != no ; then
6229 echocheck "libmp3lame (for mencoder)"
6230 _mp3lame=no
6231 cat > $TMPC <<EOF
6232 #include <lame/lame.h>
6233 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; }
6235 # Note: libmp3lame usually depends on vorbis
6236 cc_check -lmp3lame $_ld_vorbis $_ld_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes
6237 if test "$_mp3lame" = yes ; then
6238 _def_mp3lame="#define HAVE_MP3LAME `$TMPO`"
6239 _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`"
6240 _ld_mp3lame="-lmp3lame $_ld_vorbis"
6241 else
6242 _def_mp3lame='#undef HAVE_MP3LAME'
6243 _def_cfg_mp3lame='#undef CONFIG_MP3LAME'
6245 echores "$_mp3lame"
6248 echocheck "DivX4linux encore (for mencoder)"
6249 cat > $TMPC << EOF
6250 #include <encore2.h>
6251 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
6253 if test "$_divx4linux" != no && cc_check -ldivxencore $_ld_lm ; then
6254 _def_encore='#define HAVE_DIVX4ENCORE 1'
6255 _ld_encore='-ldivxencore'
6256 echores "DivX4linux (with libdivxencore.so)"
6257 elif test "$_xvidcompat" = yes ; then
6258 _def_encore='#define HAVE_DIVX4ENCORE 1'
6259 _ld_encore=''
6260 _def_encore_xvid='#define ENCORE_XVID 1'
6261 echores "XviD compat."
6262 else
6263 _def_encore='#undef HAVE_DIVX4ENCORE'
6264 echores "no"
6269 echocheck "mencoder"
6270 _mencoder_flag='#undef HAVE_MENCODER'
6271 if test "$_mencoder" = yes ; then
6272 _mencoder_flag='#define HAVE_MENCODER'
6274 echores "$_mencoder"
6276 echocheck "fastmemcpy"
6277 # fastmemcpy check is done earlier with tests of CPU & binutils features
6278 if test "$_fastmemcpy" = yes ; then
6279 _def_fastmemcpy='#define USE_FASTMEMCPY 1'
6280 else
6281 _def_fastmemcpy='#undef USE_FASTMEMCPY'
6283 echores "$_fastmemcpy"
6285 echocheck "UniquE RAR File Library"
6286 if test "$_unrarlib" = yes ; then
6287 _def_unrarlib='#define USE_UNRARLIB 1'
6288 else
6289 _def_unrarlib='#undef USE_UNRARLIB'
6291 echores "$_unrarlib"
6293 echocheck "TV interface"
6294 if test "$_tv" = yes ; then
6295 _def_tv='#define USE_TV 1'
6296 _inputmodules="tv $_inputmodules"
6297 else
6298 _noinputmodules="tv $_noinputmodules"
6299 _def_tv='#undef USE_TV'
6301 echores "$_tv"
6303 echocheck "EDL support"
6304 if test "$_edl" = yes ; then
6305 _def_edl='#define USE_EDL'
6306 _inputmodules="edl $_inputmodules"
6307 else
6308 _noinputmodules="edl $_noinputmodules"
6309 _def_edl='#undef USE_EDL'
6311 echores "$_edl"
6313 echocheck "*BSD BrookTree 848 TV interface"
6314 if test "$_tv_bsdbt848" = auto ; then
6315 _tv_bsdbt848=no
6316 if test "$_tv" = yes ; then
6317 cat > $TMPC <<EOF
6318 #include <sys/types.h>
6319 #if defined(__NetBSD__)
6320 #include <dev/ic/bt8xx.h>
6321 #else
6322 #include <machine/ioctl_bt848.h>
6323 #endif
6324 int main(void) { return 0; }
6326 cc_check && _tv_bsdbt848=yes
6329 if test "$_tv_bsdbt848" = yes ; then
6330 _def_tv_bsdbt848='#define HAVE_TV_BSDBT848 1'
6331 _inputmodules="tv-bsdbt848 $_inputmodules"
6332 else
6333 _def_tv_bsdbt848='#undef HAVE_TV_BSDBT848'
6334 _noinputmodules="tv-bsdbt848 $_noinputmodules"
6336 echores "$_tv_bsdbt848"
6338 echocheck "Video 4 Linux TV interface"
6339 if test "$_tv_v4l" = auto ; then
6340 _tv_v4l=no
6341 if test "$_tv" = yes && linux ; then
6342 for I in /dev/video /dev/video? ; do
6343 if test -c $I ; then
6344 cat > $TMPC <<EOF
6345 #include <stdlib.h>
6346 #include <linux/videodev.h>
6347 int main(void) { return 0; }
6349 cc_check && _tv_v4l=yes
6350 break
6352 done
6355 if test "$_tv_v4l" = yes ; then
6356 _def_tv_v4l='#define HAVE_TV_V4L 1'
6357 _inputmodules="tv-v4l $_inputmodules"
6358 else
6359 _noinputmodules="tv-v4l $_noinputmodules"
6360 _def_tv_v4l='#undef HAVE_TV_V4L'
6362 echores "$_tv_v4l"
6365 echocheck "Video 4 Linux 2 TV interface"
6366 if test "$_tv_v4l2" = auto ; then
6367 _tv_v4l2=no
6368 if test "$_tv" = yes && linux ; then
6369 for I in /dev/video /dev/video? ; do
6370 if test -c $I ; then
6371 _tv_v4l2=yes
6372 break
6374 done
6377 if test "$_tv_v4l2" = yes ; then
6378 _def_tv_v4l2='#define HAVE_TV_V4L2 1'
6379 _inputmodules="tv-v4l2 $_inputmodules"
6380 else
6381 _noinputmodules="tv-v4l2 $_noinputmodules"
6382 _def_tv_v4l2='#undef HAVE_TV_V4L2'
6384 echores "$_tv_v4l2"
6387 echocheck "audio select()"
6388 if test "$_select" = no ; then
6389 _def_select='#undef HAVE_AUDIO_SELECT'
6390 elif test "$_select" = yes ; then
6391 _def_select='#define HAVE_AUDIO_SELECT 1'
6393 echores "$_select"
6396 echocheck "network"
6397 # FIXME network check
6398 if test "$_network" != no ; then
6399 _def_network='#define MPLAYER_NETWORK 1'
6400 _ld_network="$_ld_sock"
6401 _inputmodules="network $_inputmodules"
6402 else
6403 _noinputmodules="network $_noinputmodules"
6404 _def_network='#undef MPLAYER_NETWORK'
6405 _ftp=no
6407 echores "$_network"
6409 echocheck "ftp"
6410 if (not beos) && (test "$_ftp" != no) ; then
6411 _def_ftp='#define HAVE_FTP 1'
6412 _inputmodules="ftp $_inputmodules"
6413 else
6414 _noinputmodules="ftp $_noinputmodules"
6415 _def_ftp='#undef HAVE_FTP'
6417 echores "$_ftp"
6419 echocheck "vstream client"
6420 if test "$_vstream" = auto ; then
6421 _vstream=no
6422 cat > $TMPC <<EOF
6423 #include <vstream-client.h>
6424 void vstream_error(const char *format, ... ) {}
6425 int main(void) { vstream_start(); return 0; }
6427 cc_check -lvstream-client && _vstream=yes
6429 if test "$_vstream" = yes ; then
6430 _def_vstream='#define HAVE_VSTREAM 1'
6431 _inputmodules="vstream $_inputmodules"
6432 _ld_vstream='-lvstream-client'
6433 else
6434 _noinputmodules="vstream $_noinputmodules"
6435 _def_vstream='#undef HAVE_VSTREAM'
6437 echores "$_vstream"
6439 # endian testing
6440 echocheck "byte order"
6441 if test "$_big_endian" = auto ; then
6442 cat > $TMPC <<EOF
6443 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6444 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6445 int main(){
6446 char* s = (char*)ascii_name;
6447 return 0;
6450 if cc_check ; then
6451 if strings $TMPO | grep -l MPlayerBigEndian >/dev/null ; then
6452 _big_endian=yes
6453 else
6454 _big_endian=no
6456 else
6457 echo -n "failed to autodetect byte order, defaulting to "
6460 if test "$_big_endian" = yes ; then
6461 _byte_order='big-endian'
6462 _def_words_endian='#define WORDS_BIGENDIAN 1'
6463 else
6464 _byte_order='little-endian'
6465 _def_words_endian='#undef WORDS_BIGENDIAN'
6467 echores "$_byte_order"
6469 echocheck "shared postprocess lib"
6470 echores "$_shared_pp"
6472 echocheck "OSD menu"
6473 if test "$_menu" = yes ; then
6474 _def_menu='#define HAVE_MENU 1'
6475 else
6476 _def_menu='#undef HAVE_MENU'
6478 echores "$_menu"
6480 # Check to see if they want QTX codecs enabled
6481 echocheck "QTX codecs"
6482 if test "$_qtx" = auto ; then
6483 _qtx=$_win32
6485 if test "$_qtx" = yes ; then
6486 _def_qtx='#define USE_QTX_CODECS 1'
6487 _codecmodules="qtx $_codecmodules"
6488 else
6489 _def_qtx='#undef USE_QTX_CODECS'
6490 _nocodecmodules="qtx $_nocodecmodules"
6492 echores "$_qtx"
6495 echocheck "Subtitles sorting"
6496 if test "$_sortsub" = yes ; then
6497 _def_sortsub='#define USE_SORTSUB 1'
6498 else
6499 _def_sortsub='#undef USE_SORTSUB'
6501 echores "$_sortsub"
6504 echocheck "XMMS inputplugin support"
6505 if test "$_xmms" = yes ; then
6507 if ( xmms-config --version ) >/dev/null 2>&1 ; then
6508 if test -z "$_xmmsplugindir" ; then
6509 _xmmsplugindir=`xmms-config --input-plugin-dir`
6511 if test -z "$_xmmslibdir" ; then
6512 _xmmslibdir=`xmms-config --exec-prefix`/lib
6514 else
6515 if test -z "$_xmmsplugindir" ; then
6516 _xmmsplugindir=/usr/lib/xmms/Input
6518 if test -z "$_xmmslibdir" ; then
6519 _xmmslibdir=/usr/lib
6523 _def_xmms='#define HAVE_XMMS 1'
6524 if darwin ; then
6525 _xmms_lib="${_xmmslibdir}/libxmms.dylib"
6526 else
6527 _xmms_lib="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6529 else
6530 _def_xmms='#undef HAVE_XMMS'
6532 echores "$_xmms"
6534 echocheck "inet6"
6535 if test "$_inet6" = auto ; then
6536 cat > $TMPC << EOF
6537 #include <sys/types.h>
6538 #include <sys/socket.h>
6539 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6541 _inet6=no
6542 if cc_check ; then
6543 _inet6=yes
6546 if test "$_inet6" = yes ; then
6547 _def_inet6='#define HAVE_AF_INET6 1'
6548 else
6549 _def_inet6='#undef HAVE_AF_INET6'
6551 echores "$_inet6"
6554 echocheck "gethostbyname2"
6555 if test "$_gethostbyname2" = auto ; then
6556 cat > $TMPC << EOF
6557 #include <sys/types.h>
6558 #include <sys/socket.h>
6559 #include <netdb.h>
6560 int main(void) { gethostbyname2("", AF_INET); }
6562 _gethostbyname2=no
6563 if cc_check ; then
6564 _gethostbyname2=yes
6568 if test "$_gethostbyname2" = yes ; then
6569 _def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1'
6570 else
6571 _def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2'
6573 echores "$_gethostbyname2"
6575 # --------------- GUI specific tests begin -------------------
6576 echocheck "GUI"
6577 echo "$_gui"
6578 if test "$_gui" = yes ; then
6580 # Required libraries
6581 test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6582 test "$_x11" != yes && die "X11 support required for GUI compilation"
6584 echocheck "XShape extension"
6585 _xshape=no
6586 if test "$_x11" = yes ; then
6587 cat > $TMPC << EOF
6588 #include <X11/Xlib.h>
6589 #include <X11/Xproto.h>
6590 #include <X11/Xutil.h>
6591 #include <X11/extensions/shape.h>
6592 #include <stdlib.h>
6593 int main(void) {
6594 char *name = ":0.0";
6595 Display *wsDisplay;
6596 int exitvar = 0;
6597 int eventbase, errorbase;
6598 if (getenv("DISPLAY"))
6599 name=getenv("DISPLAY");
6600 wsDisplay=XOpenDisplay(name);
6601 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6602 exitvar=1;
6603 XCloseDisplay(wsDisplay);
6604 return exitvar;
6607 cc_check $_inc_x11 $_ld_x11 && _xshape=yes
6609 if test "$_xshape" = yes ; then
6610 _def_xshape='#define HAVE_XSHAPE 1'
6611 else
6612 die "The GUI requires the X11 extension XShape (which was not found)."
6614 echores "$_xshape"
6617 # Check for GTK:
6618 echocheck "GTK version"
6619 if test -z "$_gtkconfig" ; then
6620 if ( gtk-config --version ) >/dev/null 2>&1 ; then
6621 _gtkconfig="gtk-config"
6622 elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
6623 _gtkconfig="gtk12-config"
6624 else
6625 die "The GUI requires GTK devel packages (which were not found)."
6628 _gtk=`$_gtkconfig --version 2>&1`
6629 _inc_gtk=`$_gtkconfig --cflags 2>&1`
6630 _ld_gtk=`$_gtkconfig --libs 2>&1`
6631 echores "$_gtk (using $_gtkconfig)"
6633 # Check for GLIB
6634 echocheck "glib version"
6635 if test -z "$_glibconfig" ; then
6636 if ( glib-config --version ) >/dev/null 2>&1 ; then
6637 _glibconfig="glib-config"
6638 elif ( glib12-config --version ) >/dev/null 2>&1 ; then
6639 _glibconfig="glib12-config"
6640 else
6641 die "The GUI requires GLib devel packages (which were not found)"
6644 _glib=`$_glibconfig --version 2>&1`
6645 _inc_glib=`$_glibconfig --cflags 2>&1`
6646 _ld_glib=`$_glibconfig --libs 2>&1`
6647 echores "$_glib (using $_glibconfig)"
6649 _def_gui='#define HAVE_NEW_GUI 1'
6650 _ld_gui='$(GTKLIB) $(GLIBLIB)'
6652 echo "Creating Gui/config.mak"
6653 cat > Gui/config.mak << EOF
6654 # -------- Generated by configure -----------
6656 GTKINC = $_inc_gtk
6657 GTKLIBS = $_ld_gtk
6658 GLIBINC = $_inc_glib
6659 GLIBLIBS = $_ld_glib
6663 else
6664 _def_gui='#undef HAVE_NEW_GUI'
6666 # --------------- GUI specific tests end -------------------
6670 #############################################################################
6672 # Checking for CFLAGS
6673 _stripbinaries=yes
6674 if test "$_profile" != "" || test "$_debug" != "" ; then
6675 CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6676 if test "$_cc_major" -ge "3" ; then
6677 CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6679 _stripbinaries=no
6680 elif test -z "$CFLAGS" ; then
6681 CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6682 # always compile with '-g' if .developer:
6683 if test -f ".developer" ; then
6684 CFLAGS="-g $CFLAGS"
6685 if (test "$_crash_debug" = auto) && (not mingw32) ; then
6686 _crash_debug=yes
6688 _stripbinaries=no
6690 else
6691 _warn_CFLAGS=yes
6694 echocheck "automatic gdb attach"
6695 if test "$_crash_debug" = yes ; then
6696 _def_crash_debug='#define CRASH_DEBUG 1'
6697 else
6698 _def_crash_debug='#undef CRASH_DEBUG'
6699 _crash_debug=no
6701 echores "$_crash_debug"
6703 if darwin ; then
6704 CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN"
6705 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
6706 CFLAGS="$CFLAGS -no-cpp-precomp"
6709 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
6710 test "$_altivec" = yes && CFLAGS="$CFLAGS -DCONFIG_DARWIN"
6712 if hpux ; then
6713 # use flag for HPUX missing setenv()
6714 CFLAGS="$CFLAGS -DHPUX"
6716 # Thread support
6717 if linux ; then
6718 CFLAGS="$CFLAGS -D_REENTRANT"
6719 elif bsd ; then
6720 # FIXME bsd needs this so maybe other OS'es
6721 CFLAGS="$CFLAGS -D_THREAD_SAFE"
6723 # 64 bit file offsets?
6724 if test "$_largefiles" = yes || freebsd ; then
6725 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6726 if test "$_dvdread" = yes ; then
6727 # dvdread support requires this (for off64_t)
6728 CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
6732 echocheck "compiler support for -fno-PIC"
6733 if x86; then
6734 cat > $TMPC <<EOF
6735 int main(void) { return 0; }
6737 if cc_check -fno-PIC ; then
6738 CFLAGS="-fno-PIC $CFLAGS"
6739 echores "yes"
6740 else
6741 echores "no"
6743 else
6744 echores "only used for x86"
6747 echocheck "compiler support for noexecstack"
6748 cat > $TMPC <<EOF
6749 int main(void) { return 0; }
6751 if cc_check -Wl,-z,noexecstack ; then
6752 _ld_extra="-Wl,-z,noexecstack $_ld_extra"
6753 echores "yes"
6754 else
6755 echores "no"
6758 echocheck "ftello()"
6759 # if we don't have ftello use the osdep/ compatibility module
6760 cat > $TMPC << EOF
6761 #include <stdio.h>
6762 #include <sys/types.h>
6763 int main (void) { ftello(stdin); return 0; }
6765 _ftello=no
6766 cc_check && _ftello=yes
6767 if test "$_ftello" = yes ; then
6768 _def_ftello='#define HAVE_FTELLO 1'
6769 else
6770 _def_ftello='#undef HAVE_FTELLO'
6772 echores "$_ftello"
6774 # Determine OS dependent libs
6775 if cygwin ; then
6776 _def_confwin32='#define WIN32'
6777 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
6778 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
6779 CFLAGS="$CFLAGS -D__CYGWIN__"
6782 if win32 ; then
6783 _confwin32='TARGET_WIN32 = yes'
6784 else
6785 _confwin32='TARGET_WIN32 = no'
6788 # Dynamic linking flags
6789 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6790 _ld_dl_dynamic=''
6791 bsd && _ld_dl_dynamic='-rdynamic'
6792 if test "$_real" = yes || test "$_xanim" = yes && not win32 && not qnx ; then
6793 _ld_dl_dynamic='-rdynamic'
6796 _ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6797 bsdos && _ld_arch="$_ld_arch -ldvd"
6798 if netbsd ; then
6799 x86 && _ld_arch="$_ld_arch -li386"
6802 _def_debug='#undef MP_DEBUG'
6803 test "$_debug" != "" && _def_debug='#define MP_DEBUG 1'
6805 _def_linux='#undef TARGET_LINUX'
6806 linux && _def_linux='#define TARGET_LINUX 1'
6808 # TODO cleanup the VIDIX stuff here
6809 _def_vidix='#define CONFIG_VIDIX 1'
6810 test "$_vidix" = no && _def_vidix='#undef CONFIG_VIDIX'
6811 if test "$_vidix" = yes; then
6812 _vosrc="$_vosrc vo_cvidix.c"
6813 _vomodules="cvidix $_vomodules"
6814 else
6815 _novomodules="cvidix $_novomodules"
6817 if test "$_vidix" = yes && (win32); then
6818 _vosrc="$_vosrc vo_winvidix.c"
6819 _vomodules="winvidix $_vomodules"
6820 _ld_win32libs="-lgdi32 $_ld_win32libs"
6821 else
6822 _novomodules="winvidix $_novomodules"
6824 if test "$_vidix" = yes && test "$_x11" = yes; then
6825 _vosrc="$_vosrc vo_xvidix.c"
6826 _vomodules="xvidix $_vomodules"
6827 else
6828 _novomodules="xvidix $_novomodules"
6830 echo Checking for VIDIX ... "$_vidix"
6832 _def_joystick='#undef HAVE_JOYSTICK'
6833 if test "$_joystick" = yes ; then
6834 if linux ; then
6835 # TODO add some check
6836 _def_joystick='#define HAVE_JOYSTICK 1'
6837 else
6838 _joystick="no (unsupported under $system_name)"
6841 echo Checking for joystick ... "$_joystick"
6843 echocheck "lirc"
6844 if test "$_lirc" = auto ; then
6845 _lirc=no
6846 if test -c /dev/lirc -o -c /dev/lirc/0 ; then
6847 cat > $TMPC <<EOF
6848 #include <lirc/lirc_client.h>
6849 int main(void) { return 0; }
6851 cc_check -llirc_client && _lirc=yes
6854 if test "$_lirc" = yes ; then
6855 _def_lirc='#define HAVE_LIRC 1'
6856 _ld_lirc='-llirc_client'
6857 else
6858 _def_lirc='#undef HAVE_LIRC'
6860 echores "$_lirc"
6862 echocheck "lircc"
6863 if test "$_lircc" = auto ; then
6864 _lircc=no
6865 cat > $TMPC <<EOF
6866 #include <lirc/lircc.h>
6867 int main(void) { return 0; }
6869 cc_check -llircc && _lircc=yes
6871 if test "$_lircc" = yes ; then
6872 _def_lircc='#define HAVE_LIRCC 1'
6873 _ld_lircc='-llircc'
6874 else
6875 _def_lircc='#undef HAVE_LIRCC'
6877 echores "$_lircc"
6879 #############################################################################
6880 echo "Creating config.mak"
6881 cat > config.mak << EOF
6882 # -------- Generated by configure -----------
6884 LANG = C
6885 MAN_LANG = $MAN_LANG
6886 TARGET_OS = $system_name
6887 DESTDIR =
6888 prefix = \$(DESTDIR)$_prefix
6889 BINDIR = \$(DESTDIR)$_bindir
6890 DATADIR = \$(DESTDIR)$_datadir
6891 MANDIR = \$(DESTDIR)$_mandir
6892 CONFDIR = \$(DESTDIR)$_confdir
6893 LIBDIR = \$(DESTDIR)$_libdir
6894 # FFmpeg uses libdir instead of LIBDIR
6895 libdir = \$(LIBDIR)
6896 #AR = ar
6897 CC = $_cc
6898 HOST_CC = $_host_cc
6899 AWK = $_awk
6900 RANLIB = $_ranlib
6901 INSTALL = $_install
6902 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
6903 EXTRA_INC = $_inc_extra $_inc_gtk
6904 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC) $_opt_gnu99
6905 STRIPBINARIES = $_stripbinaries
6906 CHARSET = $_charset
6907 HELP_FILE = $_mp_help
6909 PRG = $_prg
6910 PRG_MENCODER = $_prg_mencoder
6912 $_live_libs_def
6914 MPLAYER_NETWORK = $_network
6915 STREAMING_LIVE_DOT_COM = $_live
6916 MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
6917 DVBIN = $_dvbin
6918 VIDIX = $_vidix
6919 SHARED_PP = $_shared_pp
6920 CONFIG_PP = yes
6921 CONFIG_RISKY = yes
6922 CONFIG_MP3LAME = $_mp3lame
6923 LIBMENU = $_menu
6924 I18NLIBS = $_i18n_libs
6925 MATROSKA = $_matroska_internal
6927 OPENDIVX = $_opendivx
6929 MP3LIB = $_mp3lib
6930 LIBA52 = $_liba52
6931 LIBMPEG2 = $_libmpeg2
6932 TREMOR = $_tremor_internal
6933 TREMOR_FLAGS = $_tremor_flags
6935 MUSEPACK = $_musepack
6937 UNRARLIB = $_unrarlib
6938 HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
6939 PNG = $_mkf_png
6940 JPEG = $_mkf_jpg
6941 GIF = $_mkf_gif
6943 EXTRA_LIB = $_ld_extra
6944 Z_LIB = $_ld_static $_ld_zlib
6945 HAVE_MLIB = $_mlib
6946 WIN32_LIB = $_ld_win32libs
6947 STATIC_LIB = $_ld_static
6948 ENCA_LIB = $_ld_enca
6949 HAVE_PTHREADS = $_pthreads
6950 MATH_LIB = $_ld_lm
6952 X11_INC = $_inc_x11
6953 X11DIR = $_ld_x11
6955 HAVE_XVMC_ACCEL = $_xvmc
6957 # for libavcodec:
6958 SRC_PATH=..
6959 LIBPREF=lib
6960 LIBSUF=.a
6961 SLIBPREF=lib
6962 SLIBSUF=.so
6964 # video output
6965 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
6966 GGI_LIB = $_ld_ggi
6967 MLIB_LIB = $_ld_mlib
6968 MLIB_INC = $_inc_mlib
6969 DXR2_INC = $_inc_dxr2
6970 DVB_INC = $_inc_dvb
6971 PNG_LIB = $_ld_png
6972 JPEG_LIB = $_ld_jpg
6973 GIF_LIB = $_ld_gif
6974 SDL_LIB = $_ld_sdl
6975 SVGA_LIB = $_ld_svga
6976 AA_LIB = $_ld_aa
6977 CACA_INC = $_inc_caca
6978 CACA_LIB = $_ld_caca
6980 # audio output
6981 ALSA_LIB = $_ld_alsa
6982 NAS_LIB = $_ld_nas
6983 ARTS_LIB = $_ld_arts
6984 ARTS_INC = $_inc_arts
6985 ESD_LIB = $_ld_esd
6986 ESD_INC = $_inc_esd
6987 POLYP_LIB = $_ld_polyp
6988 POLYP_INC = $_inc_polyp
6989 JACK_LIB = $_ld_jack
6990 JACK_INC = $_inc_jack
6991 SGIAUDIO_LIB = $_ld_sgiaudio
6993 # input/demuxer/codecs
6994 TERMCAP_LIB = $_ld_termcap
6995 LIRC_LIB = $_ld_lirc
6996 LIRCC_LIB = $_ld_lircc
6997 DVDREAD_LIB = $_ld_dvdread
6998 DVDKIT = $_dvdkit
6999 DVDKIT2 = $_dvdkit2
7000 DVDKIT_SHARED = no
7001 SDL_INC = $_inc_sdl
7002 W32_DEP = $_dep_win32
7003 W32_LIB = $_ld_win32
7004 DS_DEP = $_dep_dshow
7005 DS_LIB = $_ld_dshow
7006 AV_DEP = $_dep_libavcodec $_dep_libavformat
7007 AV_LIB = $_ld_libavcodec $_ld_libavformat
7008 CONFIG_LIBAVCODEC = $_libavcodec
7009 CONFIG_LIBAVFORMAT = $_libavformat
7010 ZORAN = $_zr
7011 FAME = $_fame
7012 FAME_LIB = $_ld_fame
7013 MP1E_DEP = $_dep_mp1e
7014 MP1E_LIB = $_ld_mp1e
7015 ARCH_LIB = $_ld_arch $_ld_iconv
7016 XVID = $_xvid
7017 XVID_INC = $_inc_xvid
7018 XVID_LIB = $_ld_xvid
7019 X264 = $_x264
7020 X264_INC = $_inc_x264
7021 X264_LIB = $_ld_x264
7022 CONFIG_DTS = $_libdts
7023 DTS_INC = $_inc_libdts
7024 DTS_LIB = $_ld_libdts
7025 DECORE_LIB = $_ld_decore $_ld_mp3lame
7026 MENCODER = $_mencoder
7027 ENCORE_LIB = $_ld_encore $_ld_mp3lame
7028 DIRECTFB_INC = $_inc_directfb
7029 DIRECTFB_LIB = $_ld_directfb
7030 CDPARANOIA_INC = $_inc_cdparanoia
7031 CDPARANOIA_LIB = $_ld_cdparanoia
7032 FREETYPE_INC = $_inc_freetype
7033 FREETYPE_LIB = $_ld_freetype
7034 FONTCONFIG_INC = $_inc_fontconfig
7035 FONTCONFIG_LIB = $_ld_fontconfig
7036 FRIBIDI_INC = $_inc_fribidi
7037 FRIBIDI_LIB = $_ld_fribidi
7038 LIBLZO_LIB= $_ld_liblzo
7039 MAD_LIB = $_ld_mad
7040 VORBIS_LIB = $_ld_vorbis $_ld_libdv
7041 THEORA_LIB = $_ld_theora
7042 FAAD_LIB = $_ld_faad
7043 INTERNAL_FAAD = $_faad_internal
7044 SMBSUPPORT_LIB = $_ld_smb
7045 XMMS_PLUGINS = $_xmms
7046 XMMS_LIB = $_xmms_lib
7047 MACOSX = $_macosx
7048 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7049 MACOSX_BUNDLE = $_macosx_bundle
7050 MACOSX_FRAMEWORKS = $_macosx_frameworks
7051 MACOSX_COREVIDEO = $_macosx_corevideo
7052 TOOLAME=$_toolame
7053 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
7054 TOOLAME_LIB=$_toolame_lib
7055 TWOLAME=$_twolame
7056 TWOLAME_LIB=$_twolame_lib
7057 MUSEPACK_LIB = $_ld_musepack
7058 FAAC=$_faac
7059 FAAC_LIB=$_ld_faac
7060 AMR_NB=$_amr_nb
7061 AMR_NB_FIXED=$_amr_nb_fixed
7062 AMR_WB=$_amr_wb
7063 `echo $_libavcodecs | tr 'a-z ' 'A-Z\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7065 # --- Some stuff for autoconfigure ----
7066 $_target_arch
7067 $_confwin32
7068 TARGET_CPU=$iproc
7069 TARGET_MMX = $_mmx
7070 TARGET_MMX2 = $_mmx2
7071 TARGET_3DNOW = $_3dnow
7072 TARGET_3DNOWEX = $_3dnowex
7073 TARGET_SSE = $_sse
7074 TARGET_ALTIVEC = $_altivec
7075 TARGET_VIS = $_vis
7077 # --- GUI stuff ---
7078 GTKLIB = $_ld_static $_ld_gtk
7079 GLIBLIB = $_ld_static $_ld_glib
7080 GTK_LIBS = $_ld_static $_ld_gui
7081 GUI = $_gui
7082 DEBUG = -DDEBUG
7086 #############################################################################
7087 echo "Creating config.h"
7088 cat > config.h << EOF
7089 /* -------- This file has been automatically generated by configure ---------
7090 Note: Any changes in it will be lost when you run configure again. */
7092 /* Protect against multiple inclusion */
7093 #ifndef MPLAYER_CONFIG_H
7094 #define MPLAYER_CONFIG_H 1
7096 /* use GNU internationalization */
7097 $_def_i18n
7099 /* Runtime CPU detection */
7100 $_def_runtime_cpudetection
7102 /* Dynamic a/v plugins */
7103 $_def_dynamic_plugins
7105 /* "restrict" keyword */
7106 $_def_restrict_keyword
7108 /* __builtin_expect branch prediction hint */
7109 $_def_builtin_expect
7111 /* attribute(used) as needed by some compilers */
7112 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7113 # define attribute_used __attribute__((used))
7114 #else
7115 # define attribute_used
7116 #endif
7118 #define PREFIX "$_prefix"
7120 #define USE_OSD 1
7121 #define USE_SUB 1
7123 /* enable/disable SIGHANDLER */
7124 $_def_sighandler
7126 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7127 $_def_crash_debug
7129 /* Toggles debugging informations */
7130 $_def_debug
7132 /* Indicates that Ogle's libdvdread is available for DVD playback */
7133 $_def_dvdread
7135 /* Indicates that dvdread is from libmpdvdkit */
7136 $_def_mpdvdkit
7138 /* Additional options for libmpdvdkit*/
7139 $_def_dvd
7140 $_def_cdrom
7141 $_def_cdio
7142 $_def_dvdio
7143 $_def_bsdi_dvd
7144 $_def_dvd_bsd
7145 $_def_dvd_linux
7146 $_dev_dvd_openbsd
7147 $_def_dvd_darwin
7148 $_def_sol_scsi_h
7149 $_def_hpux_scsi_h
7150 $_def_stddef
7152 /* Common data directory (for fonts, etc) */
7153 #define MPLAYER_DATADIR "$_datadir"
7154 #define MPLAYER_CONFDIR "$_confdir"
7155 #define MPLAYER_LIBDIR "$_libdir"
7157 /* Define this to compile stream-caching support, it can be enabled via
7158 -cache <kilobytes> */
7159 #define USE_STREAM_CACHE 1
7161 /* Define to include support for XviD/Divx4Linux/OpenDivx */
7162 $_def_divx
7164 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
7165 /* You have to change DECORE_LIBS in config.mak, too! */
7166 $_def_decore
7168 /* Define if you are using DivX5Linux Decore library */
7169 $_def_divx5
7171 /* Define if you are using XviD library */
7172 $_def_xvid3
7173 $_def_xvid4
7174 $_def_decore_xvid
7175 $_def_encore_xvid
7177 /* Define if you are using the X.264 library */
7178 $_def_x264
7180 /* Define to include support for libdv-0.9.5 */
7181 $_def_libdv
7183 /* If build mencoder */
7184 $_mencoder_flag
7186 /* Indicates if XviD/Divx4linux encore is available
7187 Note: for mencoder */
7188 $_def_encore
7190 /* Indicates if libmp3lame is available
7191 Note: for mencoder */
7192 $_def_mp3lame
7193 $_def_cfg_mp3lame
7195 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
7196 $_def_mp1e
7198 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7199 (use -bps or -nobps commandline option for run-time method selection)
7200 -bps gives better sync for vbr mp3 audio, it is now default */
7201 #define AVI_SYNC_BPS 1
7203 /* Undefine this if you do not want to select mono audio (left or right)
7204 with a stereo MPEG layer 2/3 audio stream. The command line option
7205 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7206 right-only), with 0 being the default.
7208 #define USE_FAKE_MONO 1
7210 /* Undefine this if your sound card driver has no working select().
7211 If you have kernel Oops, player hangups, or just no audio, you should
7212 try to recompile MPlayer with this option disabled! */
7213 $_def_select
7215 /* define this to use iconv(3) function to codepage conversions */
7216 $_def_iconv
7218 /* define this to use nl_langinfo function */
7219 $_def_langinfo
7221 /* define this to use RTC (/dev/rtc) for video timers */
7222 $_def_rtc
7224 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7225 #define MAX_OUTBURST 65536
7227 /* set up audio OUTBURST. Do not change this! */
7228 #define OUTBURST 512
7230 /* Define this if your system has the header file for the OSS sound interface */
7231 $_def_sys_soundcard
7233 /* Define this if your system has the header file for the OSS sound interface
7234 * in /usr/include */
7235 $_def_soundcard
7237 /* Define this if your system has the sysinfo header */
7238 $_def_sys_sysinfo
7240 /* Define this if your system has ftello() */
7242 $_def_ftello
7243 #ifndef HAVE_FTELLO
7244 /* Need these for FILE and off_t an config.h is usually before other includes*/
7245 #include <stdio.h>
7246 #include <sys/types.h>
7247 off_t ftello(FILE *);
7248 #endif
7250 /* Define this if your system has the "malloc.h" header file */
7251 $_def_malloc
7253 /* memalign is mapped to malloc if unsupported */
7254 $_def_memalign
7255 #ifndef HAVE_MEMALIGN
7256 # define memalign(a,b) malloc(b)
7257 #define MEMALIGN_HACK 1
7258 #endif
7260 /* Define this if your system has the "alloca.h" header file */
7261 $_def_alloca
7263 /* Define this if your system has the "sys/mman.h" header file */
7264 $_def_mman
7265 $_def_mman_has_map_failed
7267 /* Define this if you have the elf dynamic linker -ldl library */
7268 $_def_dl
7270 /* Define this if you have the kstat kernel statistics library */
7271 $_def_kstat
7273 /* Define this if you have zlib */
7274 $_def_zlib
7275 #ifdef HAVE_ZLIB
7276 #define CONFIG_ZLIB 1
7277 #endif
7279 /* Define this if you have shm support */
7280 $_def_shm
7282 /* Define this if your system has scandir & alphasort */
7283 $_def_scandir
7285 /* Define this if your system has strsep */
7286 $_def_strsep
7288 /* Define this if your system has strlcpy */
7289 $_def_strlcpy
7290 #ifndef HAVE_STRLCPY
7291 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7292 #endif
7294 /* Define this if your system has strlcat */
7295 $_def_strlcat
7296 #ifndef HAVE_STRLCAT
7297 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7298 #endif
7300 /* Define this if your system has fseeko */
7301 $_def_fseeko
7302 #ifndef HAVE_FSEEKO
7303 /* Need these for FILE and off_t an config.h is usually before other includes*/
7304 #include <stdio.h>
7305 #include <sys/types.h>
7306 int fseeko(FILE *, off_t, int);
7307 #endif
7309 $_def_localtime_r
7311 /* Define this if your system has vsscanf */
7312 $_def_vsscanf
7314 /* Define this if your system has swab */
7315 $_def_swab
7317 /* Define this if your system has no posix select */
7318 $_def_no_posix_select
7320 /* Define this if your system has gettimeofday */
7321 $_def_gettimeofday
7323 /* Define this if your system has glob */
7324 $_def_glob
7326 /* Define this if your system has pthreads */
7327 $_def_pthreads
7329 /* Define this if you enabled thread support for libavcodec */
7330 $_def_threads
7332 /* LIRC (remote control, see www.lirc.org) support: */
7333 $_def_lirc
7336 * LIRCCD (LIRC client daemon)
7337 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7339 $_def_lircc
7341 /* DVD navigation support using libdvdnav */
7342 $_def_dvdnav
7343 $_def_dvdnav_version
7345 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7346 #define MPEG12_POSTPROC 1
7348 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7349 $_def_ffpostprocess
7351 /* Define to include support for OpenDivx postprocessing */
7352 $_def_odivx_postprocess
7354 /* Win32 DLL support */
7355 $_def_win32
7356 #define WIN32_PATH "$_win32libdir"
7358 /* DirectShow support */
7359 $_def_dshow
7361 /* Mac OS X specific features */
7362 $_def_macosx
7363 $_def_macosx_finder_support
7364 $_def_macosx_bundle
7365 $_def_macosx_corevideo
7367 /* Build our Win32-loader */
7368 $_def_win32_loader
7370 /* ffmpeg's libavcodec support (requires libavcodec source) */
7371 $_def_libavcodec
7372 $_def_libavcodecso
7374 /* ffmpeg's libavformat support (requires libavformat source) */
7375 $_def_libavformat
7376 $_def_libavformat_win32
7378 /* risky codecs */
7379 #define CONFIG_RISKY 1
7381 /* Use libavcodec's decoders */
7382 #define CONFIG_DECODERS 1
7383 /* Use libavcodec's encoders */
7384 #define CONFIG_ENCODERS 1
7386 #define CONFIG_MPEGAUDIO_HP 1
7388 /* Use amr codecs from libavcodec (requires amr sources) */
7389 $_def_amr_nb
7390 $_def_amr_nb_fixed
7391 $_def_amr_wb
7393 /* Use specific codecs from libavcodec */
7394 `echo $_libavcodecs | tr 'a-z ' 'A-Z\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
7396 /* Use codec libs included in mplayer CVS / source dist: */
7397 $_def_mp3lib
7398 $_def_liba52
7399 $_def_libdts
7400 $_def_libmpeg2
7402 /* Use libfame encoder filter */
7403 $_def_fame
7405 /* XAnim DLL support */
7406 $_def_xanim
7407 /* Default search path */
7408 $_def_xanim_path
7410 /* RealPlayer DLL support */
7411 $_def_real
7412 /* Default search path */
7413 $_def_real_path
7415 /* LIVE.COM Streaming Media library support */
7416 $_def_live
7418 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
7419 $_def_fastmemcpy
7421 /* Use unrarlib for Vobsubs */
7422 $_def_unrarlib
7424 /* gui support, please do not edit this option */
7425 $_def_gui
7427 /* Audio output drivers */
7428 $_def_ossaudio
7429 $_def_ossaudio_devdsp
7430 $_def_ossaudio_devmixer
7431 $_def_alsa5
7432 $_def_alsa9
7433 $_def_alsa1x
7434 $_def_arts
7435 $_def_esd
7436 $_def_esd_latency
7437 $_def_polyp
7438 $_def_jack
7439 $_def_sys_asoundlib_h
7440 $_def_alsa_asoundlib_h
7441 $_def_sunaudio
7442 $_def_sgiaudio
7443 $_def_win32waveout
7444 $_def_nas
7446 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7447 #undef FAST_OSD
7448 #undef FAST_OSD_TABLE
7450 /* Enable TV Interface support */
7451 $_def_tv
7453 /* Enable EDL support */
7454 $_def_edl
7456 /* Enable Video 4 Linux TV interface support */
7457 $_def_tv_v4l
7459 /* Enable Video 4 Linux 2 TV interface support */
7460 $_def_tv_v4l2
7462 /* Enable *BSD BrookTree TV interface support */
7463 $_def_tv_bsdbt848
7465 /* Define if your processor stores words with the most significant
7466 byte first (like Motorola and SPARC, unlike Intel and VAX). */
7467 $_def_words_endian
7469 $_def_arch
7471 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
7472 have the instruction. */
7473 $_def_dcbzl
7475 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
7476 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
7478 #ifdef ARCH_POWERPC
7479 #define ARCH_PPC 1
7480 #endif
7482 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
7483 #ifdef ARCH_ARMV4L
7484 #define ARCH_ARM 1
7485 #endif
7487 /* only gcc3 can compile mvi instructions */
7488 $_def_gcc_mvi_support
7490 /* Define this for Cygwin build for win32 */
7491 $_def_confwin32
7493 /* Define this to any prefered value from 386 up to infinity with step 100 */
7494 #define __CPU__ $iproc
7496 $_mp_wordsize
7498 $_def_linux
7500 $_def_vcd
7502 #ifdef sun
7503 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
7504 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7505 #elif defined(HPUX)
7506 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7507 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7508 #elif defined(WIN32)
7509 #define DEFAULT_CDROM_DEVICE "D:"
7510 #define DEFAULT_DVD_DEVICE "D:"
7511 #elif defined(SYS_DARWIN)
7512 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
7513 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
7514 #elif defined(__OpenBSD__)
7515 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
7516 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7517 #else
7518 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7519 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7520 #endif
7523 /*----------------------------------------------------------------------------
7525 ** NOTE: Instead of modifying these definitions here, use the
7526 ** --enable/--disable options of the ./configure script!
7527 ** See ./configure --help for details.
7529 *---------------------------------------------------------------------------*/
7531 /* C99 lrintf function available */
7532 $_def_lrintf
7534 /* round function is available */
7535 $_def_round
7537 /* yes, we have inttypes.h */
7538 #define HAVE_INTTYPES_H 1
7540 /* int_fastXY_t emulation */
7541 $_def_fast_inttypes
7543 /* nanosleep support */
7544 $_def_nanosleep
7546 /* SMB support */
7547 $_def_smbsupport
7549 /* termcap flag for getch2.c */
7550 $_def_termcap
7552 /* termios flag for getch2.c */
7553 $_def_termios
7554 $_def_termios_h
7555 $_def_termios_sys_h
7557 /* enable PNG support */
7558 $_def_png
7560 /* enable JPEG support */
7561 $_def_jpg
7563 /* enable PNM support */
7564 $_def_pnm
7566 /* enable md5sum support */
7567 $_def_md5sum
7569 /* enable GIF support */
7570 $_def_gif
7571 $_def_gif_4
7572 $_def_gif_tvt_hack
7574 /* enable FreeType support */
7575 $_def_freetype
7577 /* enable Fontconfig support */
7578 $_def_fontconfig
7580 /* enable FriBiDi usage */
7581 $_def_fribidi
7583 /* enable ENCA usage */
7584 $_def_enca
7586 /* liblzo support */
7587 $_def_liblzo
7589 /* libmad support */
7590 $_def_mad
7592 /* enable OggVorbis support */
7593 $_def_vorbis
7595 /* enable Tremor as vorbis decoder */
7596 $_def_tremor
7598 /* enable musepack support */
7599 $_def_musepack
7601 /* enable OggTheora support */
7602 $_def_theora
7604 /* enable Matroska support */
7605 $_def_matroska
7607 /* enable FAAD (AAC) support */
7608 $_def_faad
7609 $_def_faad_internal
7611 /* enable FAAC (AAC encoder) support */
7612 $_def_faac
7614 /* enable LADSPA plugin support */
7615 $_def_ladspa
7617 /* enable network */
7618 $_def_network
7620 /* enable ftp support */
7621 $_def_ftp
7623 /* enable vstream support */
7624 $_def_vstream
7626 /* enable winsock2 instead of Unix functions*/
7627 $_def_winsock2
7629 /* define this to use inet_aton() instead of inet_pton() */
7630 $_def_use_aton
7632 /* enables / disables cdparanoia support */
7633 $_def_cdparanoia
7635 /* enables / disables VIDIX usage */
7636 $_def_vidix
7638 /* enables / disables new input joystick support */
7639 $_def_joystick
7641 /* enables / disables QTX codecs */
7642 $_def_qtx
7644 /* enables / disables osd menu */
7645 $_def_menu
7647 /* enables / disables subtitles sorting */
7648 $_def_sortsub
7650 /* XMMS input plugin support */
7651 $_def_xmms
7652 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7654 /* enables inet6 support */
7655 $_def_inet6
7657 /* do we have gethostbyname2? */
7658 $_def_gethostbyname2
7660 /* Extension defines */
7661 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
7662 $_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
7663 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
7664 $_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
7665 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
7666 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
7667 $_def_altivec // only define if you have Altivec (G4)
7669 $_def_altivec_h // enables usage of altivec.h
7672 $_def_mlib // Sun mediaLib, available only on solaris
7673 $_def_vis // only define if you have VIS ( ultrasparc )
7675 /* libmpeg2 uses a different feature test macro for mediaLib */
7676 #ifdef HAVE_MLIB
7677 #define LIBMPEG2_MLIB 1
7678 #endif
7680 /* libvo options */
7681 #define SCREEN_SIZE_X 1
7682 #define SCREEN_SIZE_Y 1
7683 $_def_x11
7684 $_def_xv
7685 $_def_xvmc
7686 $_def_vm
7687 $_def_xf86keysym
7688 $_def_xinerama
7689 $_def_gl
7690 $_def_gl_win32
7691 $_def_dga
7692 $_def_dga2
7693 $_def_sdl
7694 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
7695 $_def_sdlbuggy
7696 $_def_directx
7697 $_def_ggi
7698 $_def_ggiwmh
7699 $_def_3dfx
7700 $_def_tdfxfb
7701 $_def_tdfxvid
7702 $_def_directfb
7703 $_def_directfb_version
7704 $_def_zr
7705 $_def_bl
7706 $_def_mga
7707 $_def_xmga
7708 $_def_syncfb
7709 $_def_fbdev
7710 $_def_dxr2
7711 $_def_dxr3
7712 $_def_dvb
7713 $_def_dvb_in
7714 $_def_svga
7715 $_def_vesa
7716 $_def_xdpms
7717 $_def_aa
7718 $_def_caca
7719 $_def_tga
7720 $_def_toolame
7721 $_def_twolame
7723 /* used by GUI: */
7724 $_def_xshape
7726 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
7727 #define X11_FULLSCREEN 1
7728 #endif
7730 #endif /* MPLAYER_CONFIG_H */
7733 #############################################################################
7735 echo "Creating libvo/config.mak"
7736 _voobj=`echo $_vosrc | sed -e 's/\.c/\.o/g;s/\.m/\.o/g'`
7737 cat > libvo/config.mak << EOF
7738 include ../config.mak
7739 OPTIONAL_SRCS = $_vosrc
7740 OPTIONAL_OBJS = $_voobj
7743 #############################################################################
7745 echo "Creating libao2/config.mak"
7746 _aoobj=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
7747 cat > libao2/config.mak << EOF
7748 include ../config.mak
7749 OPTIONAL_SRCS = $_aosrc
7750 OPTIONAL_OBJS = $_aoobj
7753 #############################################################################
7755 echo "Creating libaf/config.mak"
7756 _afobj=`echo $_afsrc | sed -e 's/\.c/\.o/g'`
7757 cat > libaf/config.mak << EOF
7758 include ../config.mak
7759 OPTIONAL_SRCS = $_afsrc
7760 OPTIONAL_OBJS = $_afobj
7763 #############################################################################
7765 cat << EOF
7767 Config files successfully generated by ./configure !
7769 Install prefix: $_prefix
7770 Data directory: $_datadir
7771 Config direct.: $_confdir
7773 Byte order: $_byte_order
7774 Optimizing for: $_optimizing
7776 Languages:
7777 Messages/GUI: $_language
7780 echo -n " Manual pages: $MAN_LANG"
7781 test "$LANGUAGES" = en && echo -n " (no localization selected, use --language=all)"
7782 echo
7784 cat << EOF
7786 Enabled optional drivers:
7787 Input: $_inputmodules
7788 Codecs: $_codecmodules
7789 Audio output: $_aomodules
7790 Video output: $_vomodules
7791 Audio filters: $_afmodules
7792 Disabled optional drivers:
7793 Input: $_noinputmodules
7794 Codecs: $_nocodecmodules
7795 Audio output: $_noaomodules
7796 Video output: $_novomodules
7797 Audio filters: $_noafmodules
7799 'config.h' and 'config.mak' contain your configuration options.
7800 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7801 compile *** DO NOT REPORT BUGS if you tweak these files ***
7803 'make' will now compile MPlayer and 'make install' will install it.
7804 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7809 if test "$_mtrr" = yes ; then
7810 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
7811 echo
7814 if test "$_sdl" = "outdated" ; then
7815 cat <<EOF
7816 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
7817 support has therefore been disabled.
7819 Please upgrade to a more recent version (version 1.1.8 and above are known to
7820 work). You may get this library from: http://www.libsdl.org
7822 You need to rerun ./configure and recompile after updating SDL. If you are
7823 only interested in the libSDL audio drivers, then an older version might work.
7825 Use --enable-sdl to force usage of libSDL.
7830 if x86; then
7831 if test "$_win32" = no ; then
7832 if test "$_win32libdir" ; then
7833 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
7834 else
7835 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
7837 cat << EOF
7838 Create it and copy the DLL files there! You can download the codecs from our
7839 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
7843 else
7844 cat <<EOF
7845 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7846 operating system ($system_name). You may encounter a few files that cannot
7847 be played due to missing open source video/audio codec support.
7853 cat <<EOF
7855 Check $TMPLOG if you wonder why an autodetection failed (check whether
7856 the development headers/packages are installed).
7857 Do not report compilation errors if you used any of the --enable-* options
7858 (except --enable-gui and maybe --enable-debug).
7860 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
7864 if test "$_vidix" = no ; then
7865 cat <<EOF
7866 You've disabled VIDIX. Although it would be better to PORT it instead.
7867 Have a look at the documentation for supported cards!
7872 if test "$_warn_CFLAGS" = yes; then
7873 cat <<EOF
7875 MPlayer compilation will use the CFLAGS set by you, but:
7877 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7879 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7880 To do so, execute 'CFLAGS= ./configure <options>'
7885 # Last move:
7886 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"