3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: check the cvs log !
8 # Cleanups all over the place (c) 2001 pl
12 # If the option is named 'opt':
13 # _opt : should have a value in yes/no/auto
14 # _def_opt : '#define ... 1' or '#undef ...' that is: some C code
15 # _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option
16 # _inc_opt : ' -I/path/dir/include '
18 # In this file, a tab is 8 chars and indentation shift is 2 characters
21 # - config files are currently:
22 # config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
24 #############################################################################
26 # Prefer these macros to full length text !
27 # These macros only return an error code - NO display is done
30 cat "$TMPC" >> "$TMPLOG"
32 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
34 ( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
37 echo "ldd $TMPO" >> "$TMPLOG"
38 ( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1
43 # Display error message, flushes tempfile, exit
48 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
49 echo "Check \"$TMPLOG\" if you do not understand why it failed."
53 # OS test booleans functions
55 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
57 linux
() { issystem
"Linux" ; return "$?" ; }
58 sunos
() { issystem
"SunOS" ; return "$?" ; }
59 hpux
() { issystem
"HP-UX" ; return "$?" ; }
60 irix
() { issystem
"IRIX" ; return "$?" ; }
61 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
62 freebsd
() { issystem
"FreeBSD" ; return "$?" ; }
63 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
64 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
65 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
66 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
67 qnx
() { issystem
"QNX" ; return "$?" ; }
68 darwin
() { issystem
"Darwin" ; return "$?" ; }
69 gnu
() { issystem
"GNU" ; return "$?" ; }
70 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
71 morphos
() { issystem
"MorphOS" ; return "$?" ; }
72 win32
() { cygwin || mingw32
; return "$?" ; }
73 beos
() { issystem
"BEOS" ; return "$?" ; }
75 # arch test boolean functions
76 # x86/x86pc is used by QNX
79 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
98 # not boolean test: implement the posix shell "!" operator for a
100 # usage: not {command}
101 # returns exit status "success" when the execution of "command"
108 # Use this before starting a check
110 echo "============ Checking for $@ ============" >> "$TMPLOG"
111 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
114 # Use this to echo the results of a check
116 echo "Result is: $@" >> "$TMPLOG"
117 echo "##########################################" >> "$TMPLOG"
121 #############################################################################
123 # Check how echo works in this /bin/sh
125 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
126 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
129 LANGUAGES
=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s:help/help_mp-\(..\).h:\1:g" | sed "s:help/help_mp-\(.....\).h:\1:g"`
131 for parm
in "$@" ; do
132 if test "$parm" = "--help" ||
test "$parm" = "-help" ||
test "$parm" = "-h" ; then
135 Usage: $0 [OPTIONS]...
138 -h, --help display this help and exit
140 Installation directories:
141 --prefix=DIR use this prefix for installing mplayer [/usr/local]
142 --bindir=DIR use this prefix for installing mplayer binary
144 --datadir=DIR use this prefix for installing machine independent
145 data files (fonts, skins) [PREFIX/share/mplayer]
146 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
147 --confdir=DIR use this prefix for installing configuration files
149 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
152 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
153 --enable-gui enable gmplayer compilation (GTK 1.2 GUI) [disable]
154 --enable-largefiles enable support for files > 2 GBytes [disable]
155 --enable-linux-devfs set default devices to devfs ones [disable]
156 --enable-termcap use termcap database for key codes [autodetect]
157 --enable-termios use termios database for key codes [autodetect]
158 --disable-iconv do not use iconv(3) function [autodetect]
159 --disable-setlocale disable setlocale using in mplayer [autodetect]
160 --disable-langinfo do not use langinfo [autodetect]
161 --enable-lirc enable LIRC (remote control) support [autodetect]
162 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
163 --enable-joystick enable joystick support [disable]
164 --disable-vm disable support X video mode extensions [autodetect]
165 --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
166 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
167 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
168 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
169 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
170 --disable-edl disable EDL (edit decision list) support [enable]
171 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
172 --disable-network disable network support (for: http/mms/rtp) [enable]
173 --enable-winsock2 enable winsock2 usage [autodetect]
174 --enable-smb enable Samba (SMB) input support [autodetect]
175 --enable-live enable LIVE.COM Streaming Media support [autodetect]
176 --disable-dvdread Disable libdvdread support [autodetect]
177 --disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
178 --disable-cdparanoia Disable cdparanoia support [autodetect]
179 --disable-freetype Disable freetype2 font rendering support [autodetect]
180 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
181 --disable-unrarlib Disable Unique RAR File Library [enabled]
182 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
183 --disable-sortsub Disable subtitles sorting [enabled]
184 --enable-fribidi Enable using the FriBiDi libs [disabled]
185 --disable-enca Disable using ENCA charset oracle library [autodetect]
186 --disable-macosx Disable Mac OS X specific features [autodetect]
187 --enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
188 --disable-inet6 Disable IPv6 support [autodetect]
189 --disable-gethostbyname2 gethostbyname() function is not provided by the C
191 --disable-ftp Disable ftp support [enabled]
192 --disable-vstream Disable tivo vstream client support [autodetect]
195 --enable-gif enable gif support [autodetect]
196 --enable-png enable png input/output support [autodetect]
197 --enable-jpeg enable jpeg input/output support [autodetect]
198 --enable-liblzo enable external liblzo support [autodetect]
199 --disable-win32 disable Win32 DLL support [autodetect]
200 --disable-dshow disable Win32/DirectShow support [autodetect]
201 --disable-qtx disable Quicktime codecs [autodetect]
202 --disable-xanim disable XAnim DLL support [autodetect]
203 --disable-real disable RealPlayer DLL support [autodetect]
204 --disable-xvid disable XviD codec [autodetect]
205 --disable-x264 disable H.264 encoder [autodetect]
206 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
207 --enable-opendivx enable _old_ OpenDivx codec [disable]
208 --disable-libavcodec disable libavcodec [autodetect]
209 --disable-libavformat disable libavformat [autodetect]
210 --enable-libfame enable libfame realtime encoder [autodetect]
211 --disable-internal-tremor do not build internal OggVorbis support [enabled]
212 --enable-tremor-low build with lower accuracy internal tremor [disabled]
213 --enable-external-tremor build with external tremor [disabled]
214 --disable-vorbis disable OggVorbis support entirely [autodetect]
215 --enable-theora build with OggTheora support [autodetect]
216 --disable-internal-matroska disable internal Matroska support [enabled]
217 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
218 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
219 --disable-ladspa disable LADSPA plugin support [autodetect]
220 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
221 --disable-mad disable libmad (MPEG audio) support [autodetect]
222 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
223 --enable-xmms build with XMMS inputplugin support [disabled]
224 --disable-mp3lib disable builtin mp3lib [enabled]
225 --disable-liba52 disable builtin liba52 [enabled]
226 --enable-libdts enable libdts support [autodetect]
227 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
228 --disable-amr_nb disable amr narrowband, floating point [autodetect]
229 --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
230 --disable-amr_wb disable amr wideband, floating point [autodetect]
233 --disable-vidix disable VIDIX [enable on x86 *nix]
234 --enable-gl build with OpenGL render support [autodetect]
235 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
236 --enable-vesa build with VESA support [autodetect]
237 --enable-svga build with SVGAlib support [autodetect]
238 --enable-sdl build with SDL render support [autodetect]
239 --enable-aa build with AAlib render support [autodetect]
240 --enable-caca build with CACA render support [autodetect]
241 --enable-ggi build with GGI render support [autodetect]
242 --enable-directx build with DirectX support [autodetect]
243 --enable-dxr2 build with DXR2 render support [autodetect]
244 --enable-dxr3 build with DXR3/H+ render support [autodetect]
245 --enable-dvb build with support for output via DVB-Card [autodetect]
246 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
247 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
248 (check for /dev/mga_vid) [autodetect]
249 --enable-xmga build with mga_vid X Window support
250 (check for X & /dev/mga_vid) [autodetect]
251 --enable-xv build with Xv render support for X 4.x [autodetect]
252 --enable-xvmc build with XvMC acceleration for X 4.x [disable]
253 --enable-vm build with XF86VidMode support for X11 [autodetect]
254 --enable-xinerama build with Xinerama support for X11 [autodetect]
255 --enable-x11 build with X11 render support [autodetect]
256 --enable-fbdev build with FBDev render support [autodetect]
257 --enable-mlib build with MLIB support (Solaris only) [autodetect]
258 --enable-3dfx build with obsolete /dev/3dfx support [disable]
259 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
260 --enable-directfb build with DirectFB support [autodetect]
261 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
262 --enable-bl build with Blinkenlights support [disable]
263 --enable-tdfxvid build with tdfx_vid support [disable]
264 --disable-tga disable targa output support [enable]
265 --disable-pnm disable pnm output support [enable]
266 --disable-md5sum disable md5sum output support [enable]
269 --disable-alsa disable ALSA sound support [autodetect]
270 --disable-ossaudio disable OSS sound support [autodetect]
271 --disable-arts disable aRts sound support [autodetect]
272 --disable-esd disable esd sound support [autodetect]
273 --disable-polyp disable Polypaudio sound support [autodetect]
274 --disable-jack disable JACK sound support [autodetect]
275 --disable-nas disable NAS sound support [autodetect]
276 --disable-sgiaudio disable SGI sound support [autodetect]
277 --disable-sunaudio disable Sun sound support [autodetect]
278 --disable-win32waveout disable Windows waveout sound support [autodetect]
279 --disable-select disable using select() on audio device [enable]
281 Miscellaneous options:
282 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
283 --cc=COMPILER use this C compiler to build MPlayer [gcc]
284 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
285 --as=ASSEMBLER use this assembler to build MPlayer [as]
286 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
287 --enable-static build a statically linked binary. Set further linking
288 options with --enable-static="-lslang -lncurses"
289 --charset convert the help messages to this charset
290 --language=list a white space or comma separated list of languages
291 for translated man pages, the first language is the
292 primary and therefore used for translated messages
293 and GUI (also the environment variable \$LINGUAS is
295 (Available: $LANGUAGES all)
296 --enable-shared-pp install & use shared postprocessing lib
297 --with-install=PATH use a custom install program (useful if your OS uses
298 a GNU-incompatible install utility by default and
299 you want to use GNU version)
300 --install-path=PATH the path to a custom install program
301 this option is obsolete and will be removed soon,
302 use --with-install instead.
305 --enable-mmx build with MMX support [autodetect]
306 --enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
307 --enable-3dnow build with 3DNow! support [autodetect]
308 --enable-3dnowex build with extended 3DNow! support [autodetect]
309 --enable-sse build with SSE support [autodetect]
310 --enable-sse2 build with SSE2 support [autodetect]
311 --enable-shm build with shm support [autodetect]
312 --enable-altivec build with Altivec support (PowerPC) [autodetect]
313 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
314 --enable-big-endian Force byte order to big-endian [autodetect]
315 --enable-debug[=1-3] compile debugging information into mplayer [disable]
316 --enable-profile compile profiling information into mplayer [disable]
317 --disable-sighandler disable sighandler for crashes [enable]
318 --enable-crash-debug enable automatic gdb attach on crash [disable]
319 --enable-i18n _experimental_ gnu gettext() support [autodetect]
320 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
322 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
323 --disable-gcc-checking disable gcc version checking [enable]
325 Use these options if autodetection fails (Options marked with (*) accept
326 multiple paths separated by ':'):
327 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
328 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
329 --with-x11incdir=DIR X headers in DIR (*)
330 --with-x11libdir=DIR X library files in DIR (*)
331 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
332 --with-dvbincdir=DIR DVB headers in DIR (*)
333 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
334 --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
335 --with-codecsdir=DIR Binary codec files in DIR
336 --with-win32libdir=DIR W*ndows DLL files in DIR
337 --with-xanimlibdir=DIR XAnim DLL files in DIR
338 --with-reallibdir=DIR RealPlayer DLL files in DIR
339 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
340 --with-xvidincdir=DIR XviD header in DIR (*)
341 --with-x264libdir=DIR libx264 in DIR
342 --with-x264incdir=DIR x264 header in DIR
343 --with-dtslibdir=DIR libdts library in DIR (*)
344 --with-dtsincdir=DIR libdts header in DIR (*)
345 --with-livelibdir=DIR LIVE.COM Streaming Media libraries in DIR
346 --with-toolamedir=DIR path to Toolame library and include file
347 --with-xmmsplugindir=DIR XMMS plugins in DIR
348 --with-xmmslibdir=DIR libxmms.so.1 in DIR
349 --with-bio2jack=DIR libbio2jack.a in DIR
350 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
351 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
352 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
353 --with-termcaplib=NAME name of library with termcap functionality
354 name should be given without leading "lib"
355 checks for "termcap" and "tinfo"
357 --with-freetype-config=PATH path to freetype-config
358 (e.g. /opt/bin/freetype-config)
359 --with-fribidi-config=PATH path to fribidi-config
360 (e.g. /opt/bin/fribidi-config)
361 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
362 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
363 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
367 done # for parm in ...
370 # 1st pass checking for vital options
374 test "$CC" && _cc
="$CC"
376 _runtime_cpudetection
=no
380 _target
=`echo $ac_option | cut -d '=' -f 2`
383 _cc
=`echo $ac_option | cut -d '=' -f 2`
386 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
389 _as
=`echo $ac_option | cut -d '=' -f 2`
391 --enable-gcc-checking)
394 --disable-gcc-checking)
404 _ld_static
="-static `echo $ac_option | cut -d '=' -f 2`"
406 --with-extraincdir=*)
407 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
409 --with-extralibdir=*)
410 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
412 --enable-runtime-cpudetection)
413 _runtime_cpudetection
=yes
415 --disable-runtime-cpudetection)
416 _runtime_cpudetection
=no
419 _install
=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
422 _install
=`echo $ac_option | cut -d '=' -f 2 `
427 # Determine our OS name and CPU architecture
428 if test -z "$_target" ; then
430 system_name
=`( uname -s ) 2>&1`
431 case "$system_name" in
432 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
440 [cC
][yY
][gG
][wW
][iI
][nN
]*)
450 system_name
="$system_name-UNKNOWN"
455 # host's CPU/instruction set
456 host_arch
=`( uname -p ) 2>&1`
458 i386|sparc|ppc|alpha|arm|mips|vax
)
460 powerpc
) # Darwin returns 'powerpc'
463 *) # uname -p on Linux returns 'unknown' for the processor type,
464 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
466 # Maybe uname -m (machine hardware name) returns something we
469 # x86/x86pc is used by QNX
470 case "`( uname -m ) 2>&1`" in
471 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
;;
472 ia64
) host_arch
=ia64
;;
474 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
475 -z "`echo $CFLAGS | grep -- -m32`" ]; then
481 macppc|ppc
) host_arch
=ppc
;;
482 alpha
) host_arch
=alpha
;;
483 sparc
) host_arch
=sparc
;;
484 sparc64
) host_arch
=sparc64
;;
485 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
486 arm
*) host_arch
=arm
;;
487 s390
) host_arch
=s390
;;
488 s390x
) host_arch
=s390x
;;
489 mips
) host_arch
=mips
;;
490 vax
) host_arch
=vax
;;
491 *) host_arch
=UNKNOWN
;;
496 system_name
=`echo $_target | cut -d '-' -f 2`
497 case "`echo $system_name | tr A-Z a-z`" in
498 linux
) system_name
=Linux
;;
499 freebsd
) system_name
=FreeBSD
;;
500 netbsd
) system_name
=NetBSD
;;
501 bsd
/os
) system_name
=BSD
/OS
;;
502 openbsd
) system_name
=OpenBSD
;;
503 sunos
) system_name
=SunOS
;;
504 qnx
) system_name
=QNX
;;
505 morphos
) system_name
=MorphOS
;;
506 mingw32msvc
) system_name
=MINGW32
;;
508 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
509 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
512 echo "Detected operating system: $system_name"
513 echo "Detected host architecture: $host_arch"
515 # LGB: temporary files
516 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
520 TMPLOG
="configure.log"
522 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
523 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
524 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
525 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
529 # FIXME: A lot of stuff is installed under /usr/local
530 # NK: But we should never use this stuff implicitly since we call compiler
531 # from /usr we should be sure that there no effects from other compilers
532 # (libraries) which might be installed into /usr/local. Let users use this
533 # stuff explicitly as command line argument. In other words: It would be
534 # resonable to have only /usr/include or only /usr/local/include.
537 _ld_extra
="$_ld_extra -L/usr/local/lib"
538 _inc_extra
="$_inc_extra -I/usr/local/include"
542 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
543 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
553 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
554 # if used as 'head -1' instead of 'head -n 1', but older versions don't
556 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
557 _head
() { head -$1 2>/dev
/null
; }
559 _head
() { head -n $1 2>/dev
/null
; }
561 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
562 _tail
() { tail -$1 2>/dev
/null
; }
564 _tail
() { tail -n $1 2>/dev
/null
; }
567 # Checking CC version...
568 if test "$_skip_cc_check" != yes ; then
569 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
570 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
571 echocheck
"$_cc version"
573 cc_name
=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 1`
574 cc_version
=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
575 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
576 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
577 # TODO verify older icc/ecc compatibility
580 cc_version
="v. ?.??, bad"
584 cc_version
="$cc_version, ok"
588 cc_version
="$cc_version, bad"
592 echores
"$cc_version"
594 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
595 echocheck
"$_cc version"
597 cc_name
=`( $_cc -v ) 2>&1 | _tail 1 | cut -d ' ' -f 1`
598 cc_version
=`( $_cc -dumpversion ) 2>&1`
599 if test "$?" -gt 0; then
600 cc_version
="not found"
604 cc_version
="v. ?.??, bad"
607 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
3.
[0-9]|
3.
[0-9].
[0-9])
608 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
609 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
610 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
611 cc_version
="$cc_version, ok"
618 cc_version
="$cc_version, bad"
622 echores
"$cc_version"
623 (test "$cc_verc_fail" = "no") && break
626 if test "$cc_verc_fail" = yes ; then
629 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
631 You are not using a supported compiler. We do not have the time to make sure
632 everything works with compilers other than the ones we use. Use either the
633 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
634 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
636 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
637 mplayer and lame (which is used for mencoder). If you get compile errors,
638 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
639 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
642 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
644 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
647 die
"Bad gcc version"
652 ******************************************************************************
654 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
655 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
657 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
658 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
659 Lame which is used by mencoder produces weird errors, too.
661 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
662 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
664 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
666 ******************************************************************************
674 if not
test "$_host_cc" ; then
682 # now that we know what compiler should be used for compilation, try to find
683 # out which assembler is used by the $_cc compiler
684 if test "$_as" = auto
; then
685 _as
=`$_cc -print-prog-name=as`
686 test -z "$_as" && _as
=as
689 # XXX: this should be ok..
691 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
692 # FIXME: Remove the cygwin check once AMD CPUs are supported
693 if test -r /proc
/cpuinfo
&& not cygwin
; then
694 # Linux with /proc mounted, extract CPU information from it
695 _cpuinfo
="cat /proc/cpuinfo"
696 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86
; then
697 # FreeBSD with Linux emulation /proc mounted,
698 # extract CPU information from it
699 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
701 # use hostinfo on Darwin
704 # all other OSes try to extract CPU information from a small helper
705 # program TOOLS/cpuinfo instead
706 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
707 _cpuinfo
="TOOLS/cpuinfo"
712 pparam
=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | _head 1`
713 if test -z "$pparam" ; then
714 pparam
=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | _head 1`
725 for i
in $pparam ; do
728 3dnowext
) _3dnow
=yes _3dnowex
=yes ;;
731 mtrr|k6_mtrr|cyrix_arr
) _mtrr
=yes ;;
732 xmm|sse|kni
) _sse
=yes _mmx2
=yes ;;
739 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
740 _def_arch
="#define ARCH_X86 1"
741 _target_arch
="TARGET_ARCH_X86 = yes"
743 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
744 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
745 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
746 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
747 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
751 echocheck
"CPU vendor"
752 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
760 3) proc
=i386 iproc
=386 ;;
761 4) proc
=i486 iproc
=486 ;;
762 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
763 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
764 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
766 elif test "$pmodel" -ge 8; then
768 elif test "$pmodel" -ge 6; then
776 if test "$pmodel" -ge 7; then
778 elif test "$pmodel" -ge 6; then
779 # only Athlon XP supports ssem MP, Duron etc not
780 # but most of them are CPUID 666, so check if sse detected
781 # btw. there is also athlon-mp opt, but we need extended
782 # CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
783 if test "$_sse" = yes && test "$pstepping" -ge 2; then
788 elif test "$pmodel" -ge 4; then
791 proc
=athlon
# TODO: should the Duron Spitfire be considered a Thunderbird instead?
795 *) proc
=athlon-xp iproc
=686 ;;
800 3) proc
=i386 iproc
=386 ;;
801 4) proc
=i486 iproc
=486 ;;
803 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
804 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
810 if test "$pmodel" -ge 7; then
812 elif test "$pmodel" -ge 3; then
818 15) proc
=pentium4 iproc
=686 ;;
819 *) proc
=pentium4 iproc
=686 ;;
824 3) proc
=i386 iproc
=386 ;;
825 4) proc
=i486 iproc
=486 ;;
826 *) proc
=i586 iproc
=586 ;;
830 proc
=i586 iproc
=586 ;;
833 # check that gcc supports our CPU, if not, fall back to earlier ones
834 # LGB: check -mcpu and -march swithing step by step with enabling
835 # to fall back till 386.
837 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
839 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
845 echocheck
"GCC & CPU optimization abilities"
847 int main(void) { return 0; }
849 if test "$_runtime_cpudetection" = no
; then
850 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ||
test "$proc" = "athlon-tbird"; then
851 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
853 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
854 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
856 if test "$proc" = "k6"; then
857 if not cc_check
-march=$proc $cpuopt=$proc; then
858 if cc_check
-march=i586
$cpuopt=i686
; then
865 if test "$proc" = "pentium4" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon"; then
866 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
868 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx"; then
869 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
871 if test "$proc" = "i586" ; then
872 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
874 if test "$proc" = "i486" ; then
875 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
877 if test "$proc" = "i386" ; then
878 cc_check
-march=$proc $cpuopt=$proc || proc
=error
880 if test "$proc" = "error" ; then
881 echores
"Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
885 elif test "$proc" = "i586-i686"; then
890 _march
="-march=$proc"
891 _mcpu
="$cpuopt=$proc"
895 # i686 is probably the most common CPU - optimize for it
897 # at least i486 required, for bswap instruction
899 cc_check
$_mcpu || _mcpu
=""
900 cc_check
$_march $_mcpu || _march
=""
903 ## Gabucino : --target takes effect here (hopefully...) by overwriting
904 ## autodetected mcpu/march parameters
905 if test "$_target" ; then
906 # TODO: it may be a good idea to check GCC and fall back in all cases
907 if test "$host_arch" = "i586-i686"; then
911 _march
="-march=$host_arch"
912 _mcpu
="$cpuopt=$host_arch"
920 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
921 i686|athlon
*|pentium
*) iproc
=686 ;;
930 _def_arch
='#define ARCH_IA64 1'
931 _target_arch
='TARGET_ARCH_IA64 = yes'
940 _def_arch
='#define ARCH_X86_64 1'
941 _target_arch
='TARGET_ARCH_X86_64 = yes'
951 _def_arch
='#define ARCH_SPARC 1'
952 _target_arch
='TARGET_ARCH_SPARC = yes'
957 case "`echo $karch`" in
962 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
975 _def_arch
='#define ARCH_SPARC 1'
976 _target_arch
='TARGET_ARCH_SPARC = yes'
978 _def_vis
='#define HAVE_VIS = yes'
987 _def_arch
='#define ARCH_ARMV4L 1'
988 _target_arch
='TARGET_ARCH_ARMV4L = yes'
997 _def_arch
='#define ARCH_POWERPC 1'
998 _target_arch
='TARGET_ARCH_POWERPC = yes'
1006 echocheck
"CPU type"
1007 if linux
&& test -n "$_cpuinfo"; then
1008 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1009 if test -n "`$_cpuinfo | grep altivec`"; then
1014 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1015 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
1017 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
1021 # only gcc 3.4 works reliably with altivec code under netbsd
1024 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1027 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1033 if test "$_altivec" = yes; then
1034 echores
"$proc altivec"
1039 echocheck
"GCC & CPU optimization abilities"
1041 if test -n "$proc"; then
1043 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1044 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1045 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1046 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1047 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1048 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1051 # gcc 3.1(.1) and up supports 7400 and 7450
1052 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1"; then
1054 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1055 7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1059 # gcc 3.2 and up supports 970
1060 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3"; then
1062 970*) _march
='-mcpu=970' _mcpu
='-mtune=970' ;;
1068 if test -n "$_mcpu"; then
1069 _optimizing
=`echo $_mcpu | cut -c 8-`
1070 echores
"$_optimizing"
1078 _def_arch
='#define ARCH_ALPHA 1'
1079 _target_arch
='TARGET_ARCH_ALPHA = yes'
1083 echocheck
"CPU type"
1086 unsigned long ver, mask;
1087 asm ("implver %0" : "=r" (ver));
1088 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1089 printf("%ld-%x\n", ver, ~mask);
1093 $_cc -o "$TMPO" "$TMPC"
1096 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1097 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1098 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1099 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1100 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1101 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1102 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
1106 echocheck
"GCC & CPU optimization abilities"
1107 if test "$proc" = "ev68" ; then
1108 cc_check
-mcpu=$proc || proc
=ev67
1110 if test "$proc" = "ev67" ; then
1111 cc_check
-mcpu=$proc || proc
=ev6
1118 echocheck
"MVI instruction support in GCC"
1119 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1120 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
1123 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
1124 echores
"no, GCC = `( $_cc -dumpversion ) 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1129 _def_arch
='#define ARCH_SGI_MIPS 1'
1130 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
1138 echocheck
"CPU type"
1139 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
1140 case "`echo $proc`" in
1141 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
1142 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
1143 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
1144 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
1145 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
1146 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
1154 _def_arch
='#define ARCH_PA_RISC 1'
1155 _target_arch
='TARGET_ARCH_PA_RISC = yes'
1164 _def_arch
='#define ARCH_S390 1'
1165 _target_arch
='TARGET_ARCH_S390 = yes'
1174 _def_arch
='#define ARCH_S390X 1'
1175 _target_arch
='TARGET_ARCH_S390X = yes'
1184 _def_arch
='#define ARCH_VAX 1'
1185 _target_arch
='TARGET_ARCH_VAX = yes'
1194 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1195 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1196 die
"unsupported architecture $host_arch"
1200 if test "$_runtime_cpudetection" = yes ; then
1215 if x86
&& test "$_runtime_cpudetection" = no
; then
1217 if test "$1" = yes ; then
1218 echocheck
"kernel support of $2"
1221 void catch() { exit(1); }
1223 signal(SIGILL, catch);
1224 __asm__ __volatile__ ("$3":::"memory");return(0);
1228 if ( cc_check
&& $TMPO ) > /dev
/null
2>&1 ; then
1230 _optimizing
="$_optimizing $2"
1234 echo "It seems that your kernel does not correctly support $2."
1235 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1242 extcheck
$_mmx "mmx" "emms" || _mmx
=no
1243 extcheck
$_mmx2 "mmx2" "sfence" || _mmx2
=no
1244 extcheck
$_3dnow "3dnow" "femms" || _3dnow
=no
1245 extcheck
$_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex
=no
1246 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _sse
=no _gcc3_ext
="$_gcc3_ext -mno-sse"
1247 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2
=no _gcc3_ext
="$_gcc3_ext -mno-sse2"
1248 echocheck
"mtrr support"
1251 if test "$_mtrr" = yes ; then
1252 _optimizing
="$_optimizing mtrr"
1255 if test "$_gcc3_ext" != ""; then
1256 # if we had to disable sse/sse2 because the active kernel does not
1257 # support this instruction set extension, we also have to tell
1258 # gcc3 to not generate sse/sse2 instructions for normal C code
1260 int main(void) { return 0; }
1262 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1267 echocheck
"assembler support of -pipe option"
1269 int main(void) { return 0; }
1271 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
1273 _prefix
="/usr/local"
1274 _xvmclib
="XvMCNVIDIA"
1276 # GOTCHA: the variables below defines the default behavior for autodetection
1277 # and have - unless stated otherwise - at least 2 states : yes no
1278 # If autodetection is available then the third state is: auto
1289 _dga
=auto
# 1 2 no auto
1291 _xvmc
=no
#auto when complete
1323 _tremor_internal
=yes
1331 _matroska_internal
=yes
1337 # dvdnav disabled, it does not work
1402 _macosx_finder_support
=no
1404 _freetypeconfig
='freetype-config'
1406 _fribidiconfig
='fribidi-config'
1409 _gethostbyname2
=auto
1413 case "$ac_option" in
1419 --enable-gcc-checking) ;;
1420 --disable-gcc-checking) ;;
1421 --enable-static*) ;;
1422 --disable-static*) ;;
1423 --with-extraincdir=*) ;;
1424 --with-extralibdir=*) ;;
1425 --enable-runtime-cpudetection) ;;
1426 --disable-runtime-cpudetection) ;;
1427 --install-path=*) ;;
1428 --with-install=*) ;;
1431 --enable-mencoder) _mencoder
=yes ;;
1432 --disable-mencoder) _mencoder
=no
;;
1433 --enable-i18n) _i18n
=yes ;;
1434 --disable-i18n) _i18n
=no
;;
1435 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
1436 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
1437 --enable-x11) _x11
=yes ;;
1438 --disable-x11) _x11
=no
;;
1439 --enable-xv) _xv
=yes ;;
1440 --disable-xv) _xv
=no
;;
1441 --enable-xvmc) _xvmc
=yes ;;
1442 --disable-xvmc) _xvmc
=no
;;
1443 --enable-sdl) _sdl
=yes ;;
1444 --disable-sdl) _sdl
=no
;;
1445 --enable-directx) _directx
=yes ;;
1446 --disable-directx) _directx
=no
;;
1447 --enable-win32waveout) _win32waveout
=yes ;;
1448 --disable-win32waveout) _win32waveout
=no
;;
1449 --enable-nas) _nas
=yes ;;
1450 --disable-nas) _nas
=no
;;
1451 --enable-png) _png
=yes ;;
1452 --disable-png) _png
=no
;;
1453 --enable-jpeg) _jpg
=yes ;;
1454 --disable-jpeg) _jpg
=no
;;
1455 --enable-pnm) _pnm
=yes ;;
1456 --disable-pnm) _pnm
=no
;;
1457 --enable-md5sum) _md5sum
=yes ;;
1458 --disable-md5sum) _md5sum
=no
;;
1459 --enable-gif) _gif
=yes ;;
1460 --disable-gif) _gif
=no
;;
1461 --enable-gl) _gl
=yes ;;
1462 --disable-gl) _gl
=no
;;
1463 --enable-ggi) _ggi
=yes ;;
1464 --disable-ggi) _ggi
=no
;;
1465 --enable-aa) _aa
=yes ;;
1466 --disable-aa) _aa
=no
;;
1467 --enable-caca) _caca
=yes ;;
1468 --disable-caca) _caca
=no
;;
1469 --enable-svga) _svga
=yes ;;
1470 --disable-svga) _svga
=no
;;
1471 --enable-vesa) _vesa
=yes ;;
1472 --disable-vesa) _vesa
=no
;;
1473 --enable-fbdev) _fbdev
=yes ;;
1474 --disable-fbdev) _fbdev
=no
;;
1475 --enable-dvb) _dvb
=yes ;;
1476 --disable-dvb) _dvb
=no
;;
1477 --enable-dvbhead) _dvbhead
=yes ;;
1478 --disable-dvbhead) _dvbhead
=no
;;
1479 --enable-dxr2) _dxr2
=yes ;;
1480 --disable-dxr2) _dxr2
=no
;;
1481 --enable-dxr3) _dxr3
=yes ;;
1482 --disable-dxr3) _dxr3
=no
;;
1483 --enable-iconv) _iconv
=yes ;;
1484 --disable-iconv) _iconv
=no
;;
1485 --enable-langinfo) _langinfo
=yes ;;
1486 --disable-langinfo) _langinfo
=no
;;
1487 --enable-rtc) _rtc
=yes ;;
1488 --disable-rtc) _rtc
=no
;;
1489 --enable-mp1e) _mp1e
=yes ;;
1490 --disable-mp1e) _mp1e
=no
;;
1491 --enable-libdv) _libdv
=yes ;;
1492 --disable-libdv) _libdv
=no
;;
1493 --enable-ossaudio) _ossaudio
=yes ;;
1494 --disable-ossaudio) _ossaudio
=no
;;
1495 --enable-arts) _arts
=yes ;;
1496 --disable-arts) _arts
=no
;;
1497 --enable-esd) _esd
=yes ;;
1498 --disable-esd) _esd
=no
;;
1499 --enable-polyp) _polyp
=yes ;;
1500 --disable-polyp) _polyp
=no
;;
1501 --enable-jack) _jack
=yes ;;
1502 --disable-jack) _jack
=no
;;
1503 --enable-mad) _mad
=yes ;;
1504 --disable-mad) _mad
=no
;;
1505 --disable-toolame) _toolame
=no
;;
1506 --enable-liblzo) _liblzo
=yes ;;
1507 --disable-liblzo) _liblzo
=no
;;
1508 --enable-vorbis) _vorbis
=yes ;;
1509 --disable-vorbis) _vorbis
=no
;;
1510 --enable-internal-tremor) _tremor_internal
=yes ;;
1511 --disable-internal-tremor) _tremor_internal
=no
;;
1512 --enable-tremor-low) _tremor_low
=yes ;;
1513 --disable-tremor-low) _tremor_low
=no
;;
1514 --enable-external-tremor) _tremor
=yes ;;
1515 --disable-external-tremor) _tremor
=no
;;
1516 --enable-theora) _theora
=yes ;;
1517 --disable-theora) _theora
=no
;;
1518 --enable-mp3lib) _mp3lib
=yes ;;
1519 --disable-mp3lib) _mp3lib
=no
;;
1520 --enable-liba52) _liba52
=yes ;;
1521 --disable-liba52) _liba52
=no
;;
1522 --enable-libdts) _libdts
=yes ;;
1523 --disable-libdts) _libdts
=no
;;
1524 --enable-libmpeg2) _libmpeg2
=yes ;;
1525 --disable-libmpeg2) _libmpeg2
=no
;;
1526 --enable-internal-matroska) _matroska_internal
=yes ;;
1527 --disable-internal-matroska) _matroska_internal
=no
;;
1528 --enable-internal-faad) _faad_internal
=yes _faad_external
=no
;;
1529 --disable-internal-faad) _faad_internal
=no
;;
1530 --enable-external-faad) _faad_external
=yes _faad_internal
=no
;;
1531 --disable-external-faad) _faad_external
=no
;;
1532 --enable-ladspa) _ladspa
=yes ;;
1533 --disable-ladspa) _ladspa
=no
;;
1534 --enable-xmms) _xmms
=yes ;;
1535 --disable-xmms) _xmms
=no
;;
1536 --enable-dvdread) _dvdread
=yes ;;
1537 --disable-dvdread) _dvdread
=no
;;
1538 --enable-mpdvdkit) _dvdkit
=yes ;;
1539 --disable-mpdvdkit) _dvdkit
=no
;;
1540 # dvdnav disabled, it does not work
1541 # --enable-dvdnav) _dvdnav=yes ;;
1542 # --disable-dvdnav) _dvdnav=no ;;
1543 --enable-xanim) _xanim
=yes ;;
1544 --disable-xanim) _xanim
=no
;;
1545 --enable-real) _real
=yes ;;
1546 --disable-real) _real
=no
;;
1547 --enable-live) _live
=yes ;;
1548 --disable-live) _live
=no
;;
1549 --enable-xinerama) _xinerama
=yes ;;
1550 --disable-xinerama) _xinerama
=no
;;
1551 --enable-mga) _mga
=yes ;;
1552 --disable-mga) _mga
=no
;;
1553 --enable-xmga) _xmga
=yes ;;
1554 --disable-xmga) _xmga
=no
;;
1555 --enable-vm) _vm
=yes ;;
1556 --disable-vm) _vm
=no
;;
1557 --enable-xf86keysym) _xf86keysym
=yes ;;
1558 --disable-xf86keysym) _xf86keysym
=no
;;
1559 --enable-mlib) _mlib
=yes ;;
1560 --disable-mlib) _mlib
=no
;;
1561 --enable-sunaudio) _sunaudio
=yes ;;
1562 --disable-sunaudio) _sunaudio
=no
;;
1563 --enable-sgiaudio) _sgiaudio
=yes ;;
1564 --disable-sgiaudio) _sgiaudio
=no
;;
1565 --enable-alsa) _alsa
=yes ;;
1566 --disable-alsa) _alsa
=no
;;
1567 --enable-tv) _tv
=yes ;;
1568 --disable-tv) _tv
=no
;;
1569 --enable-edl) _edl
=yes ;;
1570 --disable-edl) _edl
=no
;;
1571 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1572 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1573 --enable-tv-v4l) _tv_v4l
=yes ;;
1574 --disable-tv-v4l) _tv_v4l
=no
;;
1575 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1576 --disable-tv-v4l2) _tv_v4l2
=no
;;
1577 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1578 --disable-fastmemcpy) _fastmemcpy
=no
;;
1579 --enable-network) _network
=yes ;;
1580 --disable-network) _network
=no
;;
1581 --enable-winsock2) _winsock2
=yes ;;
1582 --disable-winsock2) _winsock2
=no
;;
1583 --enable-smb) _smbsupport
=yes ;;
1584 --disable-smb) _smbsupport
=no
;;
1585 --enable-vidix) _vidix
=yes ;;
1586 --disable-vidix) _vidix
=no
;;
1587 --enable-joystick) _joystick
=yes ;;
1588 --disable-joystick) _joystick
=no
;;
1589 --enable-xvid) _xvid
=yes ;;
1590 --disable-xvid) _xvid
=no
;;
1591 --enable-x264) _x264
=yes ;;
1592 --disable-x264) _x264
=no
;;
1593 --enable-divx4linux) _divx4linux
=yes ;;
1594 --disable-divx4linux) _divx4linux
=no
;;
1595 --enable-opendivx) _opendivx
=yes ;;
1596 --disable-opendivx) _opendivx
=no
;;
1597 --enable-libavcodec) _libavcodec
=yes ;;
1598 --disable-libavcodec) _libavcodec
=no
;;
1599 --enable-amr_nb) _amr_nb
=yes ;;
1600 --disable-amr_nb) _amr_nb
=no
;;
1601 --enable-amr_nb-fixed) _amr_nb_fixed
=yes ;;
1602 --disable-amr_nb-fixed) _amr_nb_fixed
=no
;;
1603 --enable-amr_wb) _amr_wb
=yes ;;
1604 --disable-amr_wb) _amr_wb
=no
;;
1605 --enable-libavformat) _libavformat
=yes;;
1606 --disable-libavformat) _libavformat
=no
;;
1607 --enable-libfame) _fame
=yes ;;
1608 --disable-libfame) _fame
=no
;;
1609 --enable-lirc) _lirc
=yes ;;
1610 --disable-lirc) _lirc
=no
;;
1611 --enable-lircc) _lircc
=yes ;;
1612 --disable-lircc) _lircc
=no
;;
1613 --enable-gui) _gui
=yes ;;
1614 --disable-gui) _gui
=no
;;
1615 --enable-termcap) _termcap
=yes ;;
1616 --disable-termcap) _termcap
=no
;;
1617 --enable-termios) _termios
=yes ;;
1618 --disable-termios) _termios
=no
;;
1619 --enable-3dfx) _3dfx
=yes ;;
1620 --disable-3dfx) _3dfx
=no
;;
1621 --enable-tdfxfb) _tdfxfb
=yes ;;
1622 --disable-tdfxvid) _tdfxvid
=no
;;
1623 --enable-tdfxvid) _tdfxvid
=yes ;;
1624 --disable-tga) _tga
=no
;;
1625 --enable-tga) _tga
=yes ;;
1626 --disable-tdfxfb) _tdfxfb
=no
;;
1627 --enable-directfb) _directfb
=yes ;;
1628 --disable-directfb) _directfb
=no
;;
1629 --enable-zr) _zr
=yes ;;
1630 --disable-zr) _zr
=no
;;
1631 --enable-bl) _bl
=yes ;;
1632 --disable-bl) _bl
=no
;;
1633 --enable-mtrr) _mtrr
=yes ;;
1634 --disable-mtrr) _mtrr
=no
;;
1635 --enable-largefiles) _largefiles
=yes ;;
1636 --disable-largefiles) _largefiles
=no
;;
1637 --enable-shm) _shm
=yes ;;
1638 --disable-shm) _shm
=no
;;
1639 --enable-select) _select
=yes ;;
1640 --disable-select) _select
=no
;;
1641 --enable-linux-devfs) _linux_devfs
=yes ;;
1642 --disable-linux-devfs) _linux_devfs
=no
;;
1643 --enable-cdparanoia) _cdparanoia
=yes ;;
1644 --disable-cdparanoia) _cdparanoia
=no
;;
1645 --enable-big-endian) _big_endian
=yes ;;
1646 --disable-big-endian) _big_endian
=no
;;
1647 --enable-freetype) _freetype
=yes ;;
1648 --disable-freetype) _freetype
=no
;;
1649 --enable-fontconfig) _fontconfig
=yes ;;
1650 --disable-fontconfig) _fontconfig
=no
;;
1651 --enable-unrarlib) _unrarlib
=yes ;;
1652 --disable-unrarlib) _unrarlib
=no
;;
1653 --enable-ftp) _ftp
=yes ;;
1654 --disable-ftp) _ftp
=no
;;
1655 --enable-vstream) _vstream
=yes ;;
1656 --disable-vstream) _vstream
=no
;;
1658 --enable-fribidi) _fribidi
=yes ;;
1659 --disable-fribidi) _fribidi
=no
;;
1661 --enable-enca) _enca
=yes ;;
1662 --disable-enca) _enca
=no
;;
1664 --enable-inet6) _inet6
=yes ;;
1665 --disable-inet6) _inet6
=no
;;
1667 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1668 --disable-gethostbyname2) _gethostbyname2
=no
;;
1670 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1671 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1672 --disable-dga) _dga
=no
;;
1674 --enable-shared-pp) _shared_pp
=yes ;;
1675 --disable-shared-pp) _shared_pp
=no
;;
1677 --enable-menu) _menu
=yes ;;
1678 --disable-menu) _menu
=no
;;
1680 --enable-qtx) _qtx
=yes ;;
1681 --disable-qtx) _qtx
=no
;;
1683 --enable-macosx) _macosx
=yes ;;
1684 --disable-macosx) _macosx
=no
;;
1685 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1686 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1688 --enable-sortsub) _sortsub
=yes ;;
1689 --disable-sortsub) _sortsub
=no
;;
1692 _charset
=`echo $ac_option | cut -d '=' -f 2`
1695 _language
=`echo $ac_option | cut -d '=' -f 2`
1697 # dvdnav disabled, it does not work
1698 # --with-libdvdnav=*)
1699 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1704 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1705 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1706 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1708 --with-win32libdir=*)
1709 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1712 --with-xanimlibdir=*)
1713 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1716 --with-reallibdir=*)
1717 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1720 --with-livelibdir=*)
1721 _livelibdir
=`echo $ac_option | cut -d '=' -f 2`
1723 --with-toolamedir=*)
1724 _toolamedir
=`echo $ac_option | cut -d '=' -f 2`
1727 _mlibdir
=`echo $ac_option | cut -d '=' -f 2`
1731 --with-xmmslibdir=*)
1732 _xmmslibdir
=`echo $ac_option | cut -d '=' -f 2`
1735 --with-xmmsplugindir=*)
1736 _xmmsplugindir
=`echo $ac_option | cut -d '=' -f 2`
1740 _bio2jackdir
=`echo $ac_option | cut -d '=' -f 2`
1753 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1758 --enable-crash-debug)
1761 --disable-crash-debug)
1764 --enable-sighandler)
1767 --disable-sighandler)
1771 --enable-sse) _sse
=yes ;;
1772 --disable-sse) _sse
=no
;;
1773 --enable-sse2) _sse2
=yes ;;
1774 --disable-sse2) _sse2
=no
;;
1775 --enable-mmx2) _mmx2
=yes ;;
1776 --disable-mmx2) _mmx2
=no
;;
1777 --enable-3dnow) _3dnow
=yes ;;
1778 --disable-3dnow) _3dnow
=no _3dnowex
=no
;;
1779 --enable-3dnowex) _3dnow
=yes _3dnowex
=yes ;;
1780 --disable-3dnowex) _3dnowex
=no
;;
1781 --enable-altivec) _altivec
=yes ;;
1782 --disable-altivec) _altivec
=no
;;
1783 --enable-mmx) _mmx
=yes ;;
1784 --disable-mmx) # 3Dnow! and MMX2 require MMX
1785 _3dnow
=no _3dnowex
=no _mmx
=no _mmx2
=no
;;
1787 --enable-win32) _win32
=yes ;;
1788 --disable-win32) _win32
=no _dshow
=no
;;
1789 --enable-dshow) _win32
=yes _dshow
=yes ;;
1790 --disable-dshow) _dshow
=no
;;
1793 _inc_x11
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1796 _ld_x11
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1798 --with-dxr2incdir=*)
1799 _inc_dxr2
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1802 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
1805 _inc_dvb
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1807 --with-xvidlibdir=*)
1808 _ld_xvid
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1810 --with-xvidincdir=*)
1811 _inc_xvid
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1814 _ld_libdts
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1817 _inc_libdts
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1819 --with-x264libdir=*)
1820 _ld_x264
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1822 --with-x264incdir=*)
1823 _inc_x264
=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
1825 --with-sdl-config=*)
1826 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
1828 --with-freetype-config=*)
1829 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
1831 --with-fribidi-config=*)
1832 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
1834 --with-gtk-config=*)
1835 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
1837 --with-glib-config=*)
1838 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
1840 # dvdnav disabled, it does not work
1841 # --with-dvdnav-config=*)
1842 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
1845 _ld_mad
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1847 --with-cdparanoiaincdir=*)
1848 _inc_cdparanoia
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1850 --with-cdparanoialibdir=*)
1851 _ld_cdparanoia
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1853 --with-termcaplib=*)
1854 _ld_termcap
=-l`echo $ac_option | cut -d '=' -f 2`
1858 _prefix
=`echo $ac_option | cut -d '=' -f 2`
1861 _bindir
=`echo $ac_option | cut -d '=' -f 2`
1864 _datadir
=`echo $ac_option | cut -d '=' -f 2`
1867 _mandir
=`echo $ac_option | cut -d '=' -f 2`
1870 _confdir
=`echo $ac_option | cut -d '=' -f 2`
1873 _libdir
=`echo $ac_option | cut -d '=' -f 2`
1877 echo "Unknown parameter: $ac_option"
1884 # Atmos: moved this here, to be correct, if --prefix is specified
1885 test -z "$_bindir" && _bindir
="$_prefix/bin"
1886 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1887 test -z "$_mandir" && _mandir
="$_prefix/man"
1888 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1889 test -z "$_libdir" && _libdir
="$_prefix/lib"
1890 test -z "$_mlibdir" && _mlibdir
="$MLIBHOME"
1893 # Checking assembler (_as) compatibility...
1894 # Added workaround for older as that reads from stdin by default - atmos
1895 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
1896 echocheck
"assembler ($_as $as_version)"
1898 _pref_as_version
='2.9.1'
1900 if test "$_mmx" = yes ; then
1901 echo 'emms' >> $TMPS
1903 if test "$_3dnow" = yes ; then
1904 _pref_as_version
='2.10.1'
1905 echo 'femms' >> $TMPS
1907 if test "$_3dnowex" = yes ; then
1908 _pref_as_version
='2.10.1'
1909 echo 'pswapd %mm0, %mm0' >> $TMPS
1911 if test "$_mmx2" = yes ; then
1912 _pref_as_version
='2.10.1'
1913 echo 'movntq %mm0, (%eax)' >> $TMPS
1915 if test "$_sse" = yes ; then
1916 _pref_as_version
='2.10.1'
1917 echo 'xorps %xmm0, %xmm0' >> $TMPS
1919 #if test "$_sse2" = yes ; then
1920 # _pref_as_version='2.11'
1921 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
1923 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
1925 if test "$as_verc_fail" != yes ; then
1929 echo "Upgrade binutils to ${_pref_as_version} ..."
1930 die
"obsolete binutils version"
1936 # check if altivec is supported by the compiler, and how to enable it
1938 _altivec_gcc_flags
=''
1940 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
1941 echocheck
"GCC altivec support"
1949 FSF_flags
='-maltivec -mabi=altivec'
1950 Darwin_flags
='-faltivec'
1952 # check for Darwin-style flags first, since
1953 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
1954 # accepts but ignores FSF-style flags...
1956 if test -z "$p"; then
1957 cc_check
$Darwin_flags && p
='Darwin'
1959 if test -z "$p"; then
1960 cc_check
$FSF_flags && p
='FSF'
1964 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
1965 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
1969 if test -z "$p"; then
1972 p
="$p-style ($_altivec_gcc_flags)"
1978 # check if <altivec.h> should be included
1980 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
1982 if test "$_altivec" = yes ; then
1983 echocheck
"altivec.h"
1985 #include <altivec.h>
1986 int main(void) { return 0; }
1989 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
1990 if test "$_have_altivec_h" = yes ; then
1991 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
1993 echores
"$_have_altivec_h"
1996 # disable runtime cpudetection if
1997 # - we cannot generate altivec code
1998 # - altivec is disabled by the user
2000 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2001 _runtime_cpudetection
=no
2004 # show that we are optimizing for altivec (if enabled and supported)
2006 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2007 _optimizing
="$_optimizing altivec"
2010 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2012 if test "$_altivec" = yes ; then
2013 _mcpu
="$_mcpu $_altivec_gcc_flags"
2016 # setup _def_altivec correctly
2018 if test "$_altivec" = yes ; then
2019 _def_altivec
='#define HAVE_ALTIVEC 1'
2021 _def_altivec
='#undef HAVE_ALTIVEC'
2025 _def_mmx
='#undef HAVE_MMX'
2026 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2027 _def_mmx2
='#undef HAVE_MMX2'
2028 test "$_mmx2" = yes && _def_mmx2
='#define HAVE_MMX2 1'
2029 _def_3dnow
='#undef HAVE_3DNOW'
2030 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2031 _def_3dnowex
='#undef HAVE_3DNOWEX'
2032 test "$_3dnowex" = yes && _def_3dnowex
='#define HAVE_3DNOWEX 1'
2033 _def_sse
='#undef HAVE_SSE'
2034 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2035 _def_sse2
='#undef HAVE_SSE2'
2036 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2038 # Checking kernel version...
2039 if x86
&& linux
; then
2041 kernel_version
=`uname -r 2>&1`
2042 echocheck
"$system_name kernel version"
2043 case "$kernel_version" in
2044 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2045 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2046 _k_verc_problem
=yes;;
2048 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2051 if test "$_k_verc_fail" ; then
2052 echores
"$kernel_version, fail"
2053 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2054 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2055 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2056 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2057 echo "2.2.x you must upgrade it to get SSE support!"
2058 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2060 echores
"$kernel_version, ok"
2064 if test "$_vidix" = auto
; then
2066 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2068 ppc
&& linux
&& _vidix
=yes
2069 alpha
&& linux
&& _vidix
=yes
2075 echocheck
"mplayer binary name"
2078 _prg_mencoder
="mencoder.exe"
2081 _prg_mencoder
="mencoder"
2086 # On QNX we must link to libph - Gabucino
2088 _ld_arch
="$_ld_arch -lph"
2091 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2093 if test "$_vidix" = yes ; then
2096 for _awk
in mawk gawk nawk
awk; do
2097 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2102 test "$_awk_verc_fail" = yes && _awk
=no
2104 if test "$_awk_verc_fail" = yes; then
2105 echo "VIDIX needs awk, but no working implementation was found!"
2106 echo "Try the GNU version, which can be downloaded from:"
2107 echo "ftp://ftp.gnu.org/gnu/gawk/"
2108 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2113 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2120 ######################
2121 # MAIN TESTS GO HERE #
2122 ######################
2125 echocheck
"extra headers"
2126 if test "$_inc_extra" ; then
2127 echores
"$_inc_extra"
2133 echocheck
"extra libs"
2134 if test "$_ld_extra" ; then
2135 echores
"$_ld_extra"
2142 int main(void) { return 0; }
2144 if cc_check
-lposix ; then
2145 _ld_arch
="$_ld_arch -lposix"
2153 int main(void) { return 0; }
2155 if cc_check
-lm ; then
2163 # Checking for localization ...
2164 # CSAK EGY MARADHAT - A HEGYLAKO
2166 if test "$_i18n" != no
; then
2168 #include <libintl.h>
2169 int main(void) { gettext("test"); return 0; }
2173 if test "$_i18n" = auto
; then
2174 cc_check
&& _i18n
=yes
2176 for i18n_lib
in "" "-lintl"; do
2177 cc_check
$i18n_lib && _i18n
=yes && _i18n_libs
=$i18n_lib && break
2181 if test "$_i18n" = yes ; then
2182 _def_i18n
='#define USE_I18N 1'
2184 _def_i18n
='#undef USE_I18N'
2186 if test -z "$_i18n_libs" ; then
2189 echores
"$_i18n (using $_i18n_libs)"
2194 if test "$_iconv" = auto
; then
2195 _iconv_tmp
='#include <iconv.h>'
2201 #define INBUFSIZE 1024
2202 #define OUTBUFSIZE 4096
2204 char inbuffer[INBUFSIZE];
2205 char outbuffer[OUTBUFSIZE];
2210 char *tocode="UTF-8";
2211 char *fromcode="cp1250";
2212 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2213 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2214 char *iptr=inbuffer;
2215 char *optr=outbuffer;
2216 size_t inleft=numread;
2217 size_t outleft=OUTBUFSIZE;
2218 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2220 write (1, outbuffer, OUTBUFSIZE - outleft);
2223 if (iconv_close(icdsc) == -1)
2229 if cc_check
$_ld_lm ; then
2231 elif cc_check
$_ld_lm -liconv ; then
2236 if test "$_iconv" = yes ; then
2237 _def_iconv
='#define USE_ICONV 1'
2239 _def_iconv
='#undef USE_ICONV'
2244 echocheck
"langinfo"
2245 if test "$_langinfo" = auto
; then
2247 #include <langinfo.h>
2248 int main(void) { nl_langinfo(CODESET); return 0; }
2251 cc_check
&& _langinfo
=yes
2253 if test "$_langinfo" = yes ; then
2254 _def_langinfo
='#define USE_LANGINFO 1'
2256 _def_langinfo
='#undef USE_LANGINFO'
2258 echores
"$_langinfo"
2261 echocheck
"language"
2262 test -z "$_language" && _language
=$LINGUAS
2263 _language
=`echo $_language | sed 's/,/ /g'`
2264 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2265 for lang
in $_language ; do
2266 test "$lang" = all
&& lang
=en
2267 if test -f "help/help_mp-${lang}.h" ; then
2271 echo -n "$lang not found, "
2272 _language
=`echo $_language | sed "s/$lang *//"`
2275 test -z "$_language" && _language
=en
2276 _mp_help
="help/help_mp-${_language}.h"
2277 test -f $_mp_help || die
"$_mp_help not found"
2278 for lang
in $LANGUAGES ; do
2279 if test -f "DOCS/man/$lang/mplayer.1" ; then
2280 MAN_LANG
="$MAN_LANG $lang"
2283 _doc_lang
=$_language
2284 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2285 echores
"using $_language (man pages: $MAN_LANG)"
2288 echocheck
"enable sighandler"
2289 if test "$_sighandler" = yes ; then
2290 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2292 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2294 echores
"$_sighandler"
2296 echocheck
"runtime cpudetection"
2297 if test "$_runtime_cpudetection" = yes ; then
2298 _optimizing
="Runtime CPU-Detection enabled"
2299 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2301 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2303 echores
"$_runtime_cpudetection"
2306 echocheck
"restrict keyword"
2307 for restrict_keyword
in restrict __restrict __restrict__
; do
2308 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2310 _def_restrict_keyword
=$restrict_keyword
2314 if [ -n "$_def_restrict_keyword" ]; then
2315 echores
"$_def_restrict_keyword"
2319 # Avoid infinite recursion loop ("#define restrict restrict")
2320 if [ "$_def_restrict_keyword" != "restrict" ]; then
2321 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2323 _def_restrict_keyword
=""
2327 echocheck
"__builtin_expect"
2328 # GCC branch prediction hint
2331 a = __builtin_expect (a, 10);
2332 return a == 10 ? 0 : 1;
2334 int main() { return foo(10) && foo(0); }
2337 cc_check
&& _builtin_expect
=yes
2338 if test "$_builtin_expect" = yes ; then
2339 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2341 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2343 echores
"$_builtin_expect"
2349 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2352 cc_check
-lkstat && _kstat
=yes
2353 if test "$_kstat" = yes ; then
2354 _ld_arch
="-lkstat $_ld_arch"
2356 if test "$_kstat" = yes ; then
2357 _def_kstat
="#define HAVE_LIBKSTAT 1"
2359 _def_kstat
="#undef HAVE_LIBKSTAT"
2365 # required for nanosleep on some systems
2368 int main(void) { (void) nanosleep(0, 0); return 0; }
2371 cc_check
-lposix4 && _posix4
=yes
2372 if test "$_posix4" = yes ; then
2373 _ld_arch
="-lposix4 $_ld_arch"
2381 int main(void) { (void) lrintf(0.0); return 0; }
2384 cc_check
$_ld_lm && _lrintf
=yes
2385 if test "$_lrintf" = yes ; then
2386 _def_lrintf
="#define HAVE_LRINTF 1"
2388 _def_lrintf
="#undef HAVE_LRINTF"
2393 echocheck
"nanosleep"
2394 # also check for nanosleep
2397 int main(void) { (void) nanosleep(0, 0); return 0; }
2400 cc_check
$_ld_arch && _nanosleep
=yes
2401 if test "$_nanosleep" = yes ; then
2402 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2404 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2406 echores
"$_nanosleep"
2410 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2411 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2414 int main(void) { (void) gethostbyname(0); return 0; }
2416 cc_check
-lsocket && _ld_sock
="-lsocket"
2417 cc_check
-lnsl && _ld_sock
="-lnsl"
2418 cc_check
-lsocket -lnsl && _ld_sock
="-lsocket -lnsl"
2419 cc_check
-lsocket -ldnet && _ld_sock
="-lsocket -ldnet"
2420 cc_check
-lsocket -lbind && _ld_sock
="-lsocket -lbind"
2421 if test $_winsock2 = auto
&& not cygwin
; then
2424 #include <winsock2.h>
2425 int main(void) { (void) gethostbyname(0); return 0; }
2427 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2429 if test "$_ld_sock" ; then
2430 echores
"yes (using $_ld_sock)"
2436 if test $_winsock2 = yes ; then
2438 _def_winsock2
='#define HAVE_WINSOCK2 1'
2440 _def_winsock2
='#undef HAVE_WINSOCK2'
2445 echocheck
"inet_pton()"
2447 #include <sys/types.h>
2448 #include <sys/socket.h>
2449 #include <arpa/inet.h>
2450 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2452 if test "$_winsock2" = yes ; then
2453 echores
"not needed (using winsock2 functions)"
2454 elif cc_check
$_ld_sock ; then
2455 # NOTE: Linux has libresolv but does not need it
2457 echores
"yes (using $_ld_sock)"
2458 elif cc_check
$_ld_sock -lresolv ; then
2459 # NOTE: needed for SunOS at least
2460 _ld_sock
="$_ld_sock -lresolv"
2461 echores
"yes (using $_ld_sock)"
2463 echores
"no (=> i'll try inet_aton next)"
2465 echocheck
"inet_aton()"
2467 #include <sys/types.h>
2468 #include <sys/socket.h>
2469 #include <arpa/inet.h>
2470 int main(void) { (void) inet_aton(0, 0); return 0; }
2473 if cc_check
$_ld_sock ; then
2474 # NOTE: Linux has libresolv but does not need it
2476 echores
"yes (using $_ld_sock)"
2477 elif cc_check
$_ld_sock -lresolv ; then
2478 # NOTE: needed for SunOS at least
2479 _ld_sock
="$_ld_sock -lresolv"
2480 echores
"yes (using $_ld_sock)"
2484 echores
"no (=> network support disabled)"
2488 _def_use_aton
='#undef USE_ATON'
2489 if test "$_use_aton" != no
; then
2490 _def_use_aton
='#define USE_ATON 1'
2494 echocheck
"inttypes.h (required)"
2496 #include <inttypes.h>
2497 int main(void) { return 0; }
2500 cc_check
&& _inttypes
=yes
2501 if test "$_inttypes" = yes ; then
2506 echocheck
"bitypes.h (inttypes.h predecessor)"
2508 #include <sys/bitypes.h>
2509 int main(void) { return 0; }
2512 cc_check
&& _inttypes
=yes
2513 if test "$_inttypes" = yes ; then
2514 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."
2516 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2519 echores
"$_inttypes"
2522 echocheck
"int_fastXY_t in inttypes.h"
2524 #include <inttypes.h>
2526 volatile int_fast16_t v= 0;
2530 cc_check
&& _fast_inttypes
=yes
2531 if test "$_fast_inttypes" = yes ; then
2535 _def_fast_inttypes
='
2536 typedef signed char int_fast8_t;
2537 typedef signed int int_fast16_t;
2538 typedef signed int int_fast32_t;
2539 typedef unsigned char uint_fast8_t;
2540 typedef unsigned int uint_fast16_t;
2541 typedef unsigned int uint_fast32_t;'
2543 echores
"$_fast_inttypes"
2546 echocheck
"word size"
2547 _mp_wordsize
="#undef MP_WORDSIZE"
2550 #include <sys/types.h>
2551 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2553 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2554 echores
"$_wordsize"
2557 echocheck
"stddef.h"
2560 int main(void) { return 0; }
2563 cc_check
&& _stddef
=yes
2564 if test "$_stddef" = yes ; then
2565 _def_stddef
='#define HAVE_STDDEF_H 1'
2567 _def_stddef
='#undef HAVE_STDDEF_H'
2572 echocheck
"malloc.h"
2575 int main(void) { (void) malloc(0); return 0; }
2578 cc_check
&& _malloc
=yes
2579 if test "$_malloc" = yes ; then
2580 _def_malloc
='#define HAVE_MALLOC_H 1'
2582 _def_malloc
='#undef HAVE_MALLOC_H'
2584 # malloc.h emits a warning in FreeBSD and OpenBSD
2585 (freebsd || openbsd
) && _def_malloc
='#undef HAVE_MALLOC_H'
2589 echocheck
"memalign()"
2590 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2593 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2596 cc_check
&& _memalign
=yes
2597 if test "$_memalign" = yes ; then
2598 _def_memalign
='#define HAVE_MEMALIGN 1'
2600 _def_memalign
='#undef HAVE_MEMALIGN'
2602 echores
"$_memalign"
2605 echocheck
"alloca.h"
2608 int main(void) { (void) alloca(0); return 0; }
2611 cc_check
&& _alloca
=yes
2613 _def_alloca
='#define HAVE_ALLOCA_H 1'
2615 _def_alloca
='#undef HAVE_ALLOCA_H'
2622 #include <sys/types.h>
2623 #include <sys/mman.h>
2624 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2627 cc_check
&& _mman
=yes
2628 if test "$_mman" = yes ; then
2629 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2631 _def_mman
='#undef HAVE_SYS_MMAN_H'
2636 #include <sys/types.h>
2637 #include <sys/mman.h>
2638 int main(void) { void *p = MAP_FAILED; return 0; }
2640 _mman_has_map_failed
=no
2641 cc_check
&& _mman_has_map_failed
=yes
2642 if test "$_mman_has_map_failed" = yes ; then
2643 _def_mman_has_map_failed
=''
2645 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2648 echocheck
"dynamic loader"
2651 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2656 elif cc_check
-ldl ; then
2660 if test "$_dl" = yes ; then
2661 _def_dl
='#define HAVE_LIBDL 1'
2663 _def_dl
='#undef HAVE_LIBDL'
2668 echocheck
"dynamic a/v plugins support"
2669 if test "$_dl" = no
; then
2672 if test "$_dynamic_plugins" = yes ; then
2673 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2675 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
2677 echores
"$_dynamic_plugins"
2680 #echocheck "dynamic linking"
2681 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2682 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2684 #int main(void) { return 0; }
2686 #if cc_check -rdynamic ; then
2687 # _ld_dl_dynamic='-rdynamic'
2688 #elif cc_check -Bdynamic ; then
2689 # _ld_dl_dynamic='-Bdynamic'
2690 #elif cc_check ; then
2693 #echores "using $_ld_dl_dynamic"
2695 _def_threads
='#undef HAVE_THREADS'
2699 #include <pthread.h>
2700 void* func(void *arg) { return arg; }
2701 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2707 elif ( cc_check
&& $TMPO ) ; then # QNX
2708 _ld_pthread
=' ' # _ld_pthread='' would disable pthreads, but the test worked
2709 elif ( cc_check
-lpthread && $TMPO ) ; then
2710 _ld_pthread
='-lpthread'
2711 elif ( cc_check
-pthread && $TMPO ) ; then
2712 _ld_pthread
='-pthread'
2714 if test "$_ld_static" ; then
2715 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2716 if ( cc_check
-lpthread ) ; then
2717 _ld_pthread
='-lpthread'
2718 elif ( cc_check
-pthread ) ; then
2719 _ld_pthread
='-pthread'
2721 echores
"no static pthread found (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, Win32 loader disabled)"
2722 _ld_pthread
='' ; _nas
=no
; _tv_v4l
=no
; _macosx
=no
; _win32
=no
2725 echores
"no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)"
2726 _ld_pthread
='' ; _nas
=no
; _tv_v4l
=no
; _macosx
=no
; _win32
=no
2729 if test "$_ld_pthread" != '' ; then
2730 echores
"yes (using $_ld_pthread)"
2732 _def_pthreads
='#define HAVE_PTHREADS 1'
2733 _def_threads
='#define HAVE_THREADS 1'
2737 _def_pthreads
='#undef HAVE_PTHREADS'
2741 echocheck
"sys/soundcard.h"
2743 #include <sys/soundcard.h>
2744 int main(void) { return 0; }
2747 cc_check
&& _sys_soundcard
=yes
2748 if test "$_sys_soundcard" = yes ; then
2749 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
2750 _inc_soundcard
='#include <sys/soundcard.h>'
2752 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
2754 echores
"$_sys_soundcard"
2756 if test "$_sys_soundcard" != yes ; then
2757 echocheck
"soundcard.h"
2759 #include <soundcard.h>
2760 int main(void) { return 0; }
2763 cc_check
&& _soundcard
=yes
2764 if linux ||
test "$_ossaudio" != no
; then
2765 # use soundcard.h on Linux, or when OSS support is enabled
2766 echores
"$_soundcard"
2768 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2769 echores
"$_soundcard, but ignored!"
2772 if test "$_soundcard" = yes ; then
2773 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
2774 _inc_soundcard
='#include <soundcard.h>'
2776 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2779 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2783 echocheck
"sys/dvdio.h"
2786 #include <sys/dvdio.h>
2787 int main(void) { return 0; }
2790 cc_check
&& _dvdio
=yes
2791 if test "$_dvdio" = yes ; then
2792 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2794 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2799 echocheck
"sys/cdio.h"
2802 #include <sys/cdio.h>
2803 int main(void) { return 0; }
2806 cc_check
&& _cdio
=yes
2807 if test "$_cdio" = yes ; then
2808 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2810 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2815 echocheck
"linux/cdrom.h"
2817 #include <sys/types.h>
2818 #include <linux/cdrom.h>
2819 int main(void) { return 0; }
2822 cc_check
&& _cdrom
=yes
2823 if test "$_cdrom" = yes ; then
2824 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2826 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2834 int main(void) { return 0; }
2837 cc_check
&& _dvd
=yes
2838 if test "$_dvd" = yes ; then
2839 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
2841 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
2846 echocheck
"BSDI dvd.h"
2849 int main(void) { return 0; }
2852 cc_check
&& _bsdi_dvd
=yes
2853 if test "$_bsdi_dvd" = yes ; then
2854 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2856 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2858 echores
"$_bsdi_dvd"
2861 echocheck
"HPUX SCSI header"
2863 #include <sys/scsi.h>
2864 int main(void) { return 0; }
2867 cc_check
&& _hpux_scsi_h
=yes
2868 if test "$_hpux_scsi_h" = yes ; then
2869 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
2871 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
2873 echores
"$_hpux_scsi_h"
2876 echocheck
"userspace SCSI headers (Solaris)"
2878 # include <unistd.h>
2879 # include <stropts.h>
2880 # include <sys/scsi/scsi_types.h>
2881 # include <sys/scsi/impl/uscsi.h>
2882 int main(void) { return 0; }
2885 cc_check
&& _sol_scsi_h
=yes
2886 if test "$_sol_scsi_h" = yes ; then
2887 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
2889 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
2891 echores
"$_sol_scsi_h"
2895 if test "$_termcap" = auto
; then
2897 int main(void) { return 0; }
2900 cc_check
-ltermcap && _termcap
=yes && _ld_termcap
='-ltermcap'
2901 cc_check
-ltinfo && _termcap
=yes && _ld_termcap
='-ltinfo'
2903 if test "$_termcap" = yes ; then
2904 _def_termcap
='#define USE_TERMCAP 1'
2905 echores
"yes (using $_ld_termcap)"
2907 _def_termcap
='#undef USE_TERMCAP'
2913 if test "$_termios" = auto
; then
2915 #include <sys/termios.h>
2916 int main(void) { return 0; }
2919 cc_check
&& _termios
=yes
2920 _def_termios_h_name
='sys/termios.h'
2923 if test "$_termios" = auto
; then
2925 #include <termios.h>
2926 int main(void) { return 0; }
2929 cc_check
&& _termios
=yes
2930 _def_termios_h_name
='termios.h'
2933 if test "$_termios" = yes ; then
2934 _def_termios
='#define HAVE_TERMIOS 1'
2935 _def_termios_h
='#undef HAVE_TERMIOS_H'
2936 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
2938 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
2939 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
2940 elif test "$_def_termios_h_name" = 'termios.h' ; then
2941 _def_termios_h
='#define HAVE_TERMIOS_H 1'
2943 echores
"yes (using $_def_termios_h_name)"
2945 _def_termios
='#undef HAVE_TERMIOS'
2946 _def_termios_h_name
=''
2952 if test "$_shm" = auto
; then
2954 #include <sys/types.h>
2955 #include <sys/shm.h>
2956 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
2959 cc_check
&& _shm
=yes
2961 if test "$_shm" = yes ; then
2962 _def_shm
='#define HAVE_SHM 1'
2964 _def_shm
='#undef HAVE_SHM'
2969 # XXX: FIXME, add runtime checking
2970 echocheck
"linux devfs"
2971 echores
"$_linux_devfs"
2974 echocheck
"scandir()"
2976 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
2979 cc_check
&& _scandir
=yes
2980 if test "$_scandir" = yes ; then
2981 _def_scandir
='#define HAVE_SCANDIR 1'
2983 _def_scandir
='#undef HAVE_SCANDIR'
2988 echocheck
"strsep()"
2991 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
2994 cc_check
&& _strsep
=yes
2995 if test "$_strsep" = yes ; then
2996 _def_strsep
='#define HAVE_STRSEP 1'
2998 _def_strsep
='#undef HAVE_STRSEP'
3002 echocheck
"strlcpy()"
3005 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3008 cc_check
&& _strlcpy
=yes
3009 if test "$_strlcpy" = yes ; then
3010 _def_strlcpy
='#define HAVE_STRLCPY 1'
3012 _def_strlcpy
='#undef HAVE_STRLCPY'
3016 echocheck
"strlcat()"
3019 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3022 cc_check
&& _strlcat
=yes
3023 if test "$_strlcat" = yes ; then
3024 _def_strlcat
='#define HAVE_STRLCAT 1'
3026 _def_strlcat
='#undef HAVE_STRLCAT'
3030 echocheck
"fseeko()"
3033 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3036 cc_check
&& _fseeko
=yes
3037 if test "$_fseeko" = yes ; then
3038 _def_fseeko
='#define HAVE_FSEEKO 1'
3040 _def_fseeko
='#undef HAVE_FSEEKO'
3044 echocheck
"localtime_r()"
3047 int main( void ) { localtime_r(NULL, NULL); }
3050 cc_check
&& _localtime_r
=yes
3051 if test "$_localtime_r" = yes ; then
3052 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3054 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3056 echores
"$_localtime_r"
3058 echocheck
"vsscanf()"
3061 int main(void) { vsscanf(0, 0, 0); return 0; }
3064 cc_check
&& _vsscanf
=yes
3065 if test "$_vsscanf" = yes ; then
3066 _def_vsscanf
='#define HAVE_VSSCANF 1'
3068 _def_vsscanf
='#undef HAVE_VSSCANF'
3076 int main(void) { swab(0, 0, 0); return 0; }
3079 cc_check
&& _swab
=yes
3080 if test "$_swab" = yes ; then
3081 _def_swab
='#define HAVE_SWAB 1'
3083 _def_swab
='#undef HAVE_SWAB'
3087 echocheck
"posix select()"
3091 #include <sys/types.h>
3093 #include <sys/time.h>
3095 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3098 cc_check
&& _posix_select
=yes
3099 if test "$_posix_select" = no
; then
3100 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3102 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3104 echores
"$_posix_select"
3107 echocheck
"gettimeofday()"
3110 #include <sys/time.h>
3111 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3114 cc_check
&& _gettimeofday
=yes
3115 if test "$_gettimeofday" = yes ; then
3116 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3118 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3120 echores
"$_gettimeofday"
3127 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3130 cc_check
&& _glob
=yes
3131 if test "$_glob" = yes ; then
3132 _def_glob
='#define HAVE_GLOB 1'
3134 _def_glob
='#undef HAVE_GLOB'
3139 echocheck
"sys/sysinfo.h"
3141 #include <sys/sysinfo.h>
3143 struct sysinfo s_info;
3149 cc_check
&& _sys_sysinfo
=yes
3150 if test "$_sys_sysinfo" = yes ; then
3151 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3152 _inc_sysinfo
='#include <sys/sysinfo.h>'
3154 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3156 echores
"$_sys_sysinfo"
3159 echocheck
"Mac OS X APIs"
3160 if test "$_macosx" = auto
; then
3161 if darwin
&& ppc
; then
3165 _def_macosx
='#undef MACOSX'
3166 _noaomodules
="macosx $_noaomodules"
3167 _novomodules
="quartz $_novomodules"
3170 if test "$_macosx" = yes ; then
3172 #include <Carbon/Carbon.h>
3173 #include <QuickTime/QuickTime.h>
3174 #include <CoreAudio/CoreAudio.h>
3178 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3181 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3183 _macosx_frameworks
="-framework Carbon -framework QuickTime -framework CoreAudio"
3184 _def_macosx
='#define MACOSX 1'
3185 _aosrc
="$_aosrc ao_macosx.c"
3186 _aomodules
="macosx $_aomodules"
3187 _vosrc
="$_vosrc vo_quartz.c"
3188 _vomodules
="quartz $_vomodules"
3191 _def_macosx
='#undef MACOSX'
3192 _noaomodules
="macosx $_noaomodules"
3193 _novomodules
="quartz $_novomodules"
3198 echocheck
"Mac OS X Finder Support"
3199 if test "$_macosx_finder_support" = auto
; then
3200 _macosx_finder_support
=$_macosx
3202 if test "$_macosx_finder_support" = yes; then
3203 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3204 _macosx_finder_support
=yes
3206 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3207 _macosx_finder_support
=no
3209 echores
"$_macosx_finder_support"
3211 echocheck
"Samba support (libsmbclient)"
3212 if test "$_smbsupport" = yes; then
3213 _ld_smb
="-lsmbclient"
3215 if test "$_smbsupport" = auto
; then
3218 #include <libsmbclient.h>
3219 int main(void) { smbc_opendir("smb://"); return 0; }
3221 if cc_check
-lsmbclient ; then
3223 _ld_smb
="-lsmbclient"
3225 if cc_check
-lsmbclient $_ld_dl ; then
3227 _ld_smb
="-lsmbclient $_ld_dl"
3229 if cc_check
-lsmbclient $_ld_dl -lnsl ; then
3231 _ld_smb
="-lsmbclient $_ld_dl -lnsl"
3233 if cc_check
-lsmbclient $_ld_dl -lssl -lnsl ; then
3235 _ld_smb
="-lsmbclient $_ld_dl -lssl -lnsl"
3242 if test "$_smbsupport" = yes; then
3243 _def_smbsupport
="#define LIBSMBCLIENT"
3244 _inputmodules
="smb $_inputmodules"
3246 _def_smbsupport
="#undef LIBSMBCLIENT"
3247 _noinputmodules
="smb $_noinputmodules"
3249 echores
"$_smbsupport"
3258 if test "$_3dfx" = yes ; then
3259 _def_3dfx
='#define HAVE_3DFX 1'
3260 _vosrc
="$_vosrc vo_3dfx.c"
3261 _vomodules
="3dfx $_vomodules"
3263 _def_3dfx
='#undef HAVE_3DFX'
3264 _novomodules
="3dfx $_novomodules"
3270 if test "$_tdfxfb" = yes ; then
3271 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3272 _vosrc
="$_vosrc vo_tdfxfb.c"
3273 _vomodules
="tdfxfb $_vomodules"
3275 _def_tdfxfb
='#undef HAVE_TDFXFB'
3276 _novomodules
="tdfxfb $_novomodules"
3281 if test "$_tdfxvid" = yes ; then
3282 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3283 _vosrc
="$_vosrc vo_tdfx_vid.c"
3284 _vomodules
="tdfx_vid $_vomodules"
3286 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3287 _novomodules
="tdfx_vid $_novomodules"
3292 if test "$_tga" = yes ; then
3293 _def_tga
='#define HAVE_TGA 1'
3294 _vosrc
="$_vosrc vo_tga.c"
3295 _vomodules
="tga $_vomodules"
3297 _def_tga
='#undef HAVE_TGA'
3298 _novomodules
="tga $_novomodules"
3302 echocheck
"DirectFB headers presence"
3303 if test -z "$_inc_directfb" ; then
3304 for I
in /usr
/include
/usr
/local
/include
$_inc_extra; do
3305 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3306 _inc_directfb
="-I$I/directfb"
3307 echores
"yes (using $_inc_directfb)"
3310 if test -d "$I" && test -f "$I/directfb.h" ; then
3311 _inc_directfb
="-I$I"
3312 echores
"yes (using $_inc_directfb)"
3316 if test -z "$_inc_directfb" ; then
3321 echores
"yes (using $_inc_directfb)"
3323 if test "$_inc_directfb" = "-I/usr/include" ; then
3327 echocheck
"DirectFB"
3328 if test "$_directfb" = auto
; then
3331 #include <directfb.h>
3332 int main(void) { IDirectFB *foo; return 0; }
3334 linux
&& test -c /dev
/fb0
&& cc_check
$_inc_directfb -ldirectfb && _directfb
=yes
3337 if test "$_directfb" = yes; then
3339 #include <directfb.h>
3341 printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version);
3345 if cc_check
$_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then
3346 _directfb_version
=`"$TMPO"`
3347 _def_directfb_version
="#define DIRECTFBVERSION $_directfb_version"
3348 if test "$_directfb_version" -ge 913; then
3349 echores
"yes ($_directfb_version)"
3351 _def_directfb_version
='#undef DIRECTFBVERSION'
3353 echores
"no (version >=0.9.13 required)"
3357 echores
"no (failed to get version)"
3360 echores
"$_directfb"
3363 if test "$_directfb" = yes ; then
3364 _def_directfb
='#define HAVE_DIRECTFB 1'
3365 if test "$_directfb_version" -ge 913; then
3366 _vosrc
="$_vosrc vo_directfb2.c"
3367 _vomodules
="directfb $_vomodules"
3368 _ld_directfb
='-ldirectfb'
3371 if test "$_directfb_version" -ge 915; then
3372 _vosrc
="$_vosrc vo_dfbmga.c"
3373 _vomodules
="dfbmga $_vomodules"
3376 _def_directfb
='#undef HAVE_DIRECTFB'
3377 _novomodules
="directfb $_novomodules"
3382 echocheck
"X11 headers presence"
3383 if test -z "$_inc_x11" ; then
3384 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3385 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3387 echores
"yes (using $I)"
3391 if test -z "$_inc_x11" ; then
3393 echores
"not found (check if the dev(el) packages are installed)"
3396 echores
"yes (using $_inc_x11)"
3398 if test "$_inc_x11" = "-I/usr/include" ; then
3403 echocheck
"X11 libs presence"
3404 if test -z "$_ld_x11" ; then
3405 for I
in /usr
/X11R
6/lib
/usr
/lib
/X11R6
/usr
/X11
/lib
/usr
/lib32
/usr
/openwin
/lib
/usr
/X11R
6/lib64
/usr
/lib
; do
3406 if test -d "$I" && ( test -f "$I/libX11.so" ||
test -f "$I/libX11.a" ||
test -f "$I/libX11.dll.a" ) ; then
3408 _ld_x11
="-L$I -Wl,-R$I"
3412 echores
"yes (using $I)"
3416 if test -z "$_ld_x11" ; then
3418 echores
"not found (check if the dev(el) packages are installed)"
3421 echores
"yes (using $_ld_x11)"
3423 _ld_x11
="$_ld_x11 -lXext -lX11 $_ld_sock"
3427 if test "$_x11" != no
; then
3429 #include <X11/Xlib.h>
3430 #include <X11/Xutil.h>
3431 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3434 cc_check
$_inc_x11 $_ld_x11 && _x11
=yes
3436 if test "$_x11" = yes ; then
3437 _def_x11
='#define HAVE_X11 1'
3438 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3439 _vomodules
="x11 xover $_vomodules"
3441 _def_x11
='#undef HAVE_X11'
3444 _novomodules
="x11 $_novomodules"
3451 if test "$_x11" = yes ; then
3453 #include <X11/Xmd.h>
3454 #include <X11/Xlib.h>
3455 #include <X11/Xutil.h>
3456 #include <X11/Xatom.h>
3457 #include <X11/extensions/dpms.h>
3459 (void) DPMSQueryExtension(0, 0, 0);
3462 cc_check
$_inc_x11 -lXdpms $_ld_x11 && _xdpms3
=yes
3465 if test "$_x11" = yes ; then
3467 #include <X11/Xlib.h>
3468 #include <X11/extensions/dpms.h>
3470 (void) DPMSQueryExtension(0, 0, 0);
3473 cc_check
$_inc_x11 $_ld_x11 && _xdpms4
=yes
3475 if test "$_xdpms4" = yes ; then
3476 _def_xdpms
='#define HAVE_XDPMS 1'
3477 echores
"yes (using Xdpms 4)"
3478 elif test "$_xdpms3" = yes ; then
3479 _def_xdpms
='#define HAVE_XDPMS 1'
3480 _ld_x11
="-lXdpms $_ld_x11"
3481 echores
"yes (using Xdpms 3)"
3483 _def_xdpms
='#undef HAVE_XDPMS'
3489 if test "$_x11" = yes && test "$_xv" != no
; then
3491 #include <X11/Xlib.h>
3492 #include <X11/extensions/Xvlib.h>
3494 (void) XvGetPortAttribute(0, 0, 0, 0);
3495 (void) XvQueryPortAttributes(0, 0, 0);
3499 cc_check
$_inc_x11 -lXv $_ld_x11 && _xv
=yes
3503 if test "$_xv" = yes ; then
3504 _def_xv
='#define HAVE_XV 1'
3506 _vosrc
="$_vosrc vo_xv.c"
3507 _vomodules
="xv $_vomodules"
3509 _def_xv
='#undef HAVE_XV'
3510 _novomodules
="xv $_novomodules"
3516 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no
; then
3519 #include <X11/Xlib.h>
3520 #include <X11/extensions/Xvlib.h>
3521 #include <X11/extensions/XvMClib.h>
3523 (void) XvMCQueryExtension(0,0,0);
3524 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3527 cc_check
$_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc
=yes
3529 if test "$_xvmc" = yes ; then
3530 _def_xvmc
='#define HAVE_XVMC 1'
3531 _ld_xvmc
="-lXvMC -l$_xvmclib"
3532 _vosrc
="$_vosrc vo_xvmc.c"
3533 _vomodules
="xvmc $_vomodules"
3535 _def_xvmc
='#undef HAVE_XVMC'
3536 _novomodules
="xvmc $_novomodules"
3541 echocheck
"Xinerama"
3542 if test "$_x11" = yes && test "$_xinerama" != no
; then
3544 #include <X11/Xlib.h>
3545 #include <X11/extensions/Xinerama.h>
3546 int main(void) { (void) XineramaIsActive(0); return 0; }
3549 cc_check
$_inc_x11 -lXinerama $_ld_x11 && _xinerama
=yes
3553 if test "$_xinerama" = yes ; then
3554 _def_xinerama
='#define HAVE_XINERAMA 1'
3555 _ld_xinerama
='-lXinerama'
3557 _def_xinerama
='#undef HAVE_XINERAMA'
3559 echores
"$_xinerama"
3562 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3563 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3564 # named 'X extensions' or something similar.
3565 # This check may be useful for future mplayer versions (to change resolution)
3566 # If you run into problems, remove '-lXxf86vm'.
3568 if test "$_x11" = yes && test "$_vm" = auto
; then
3570 #include <X11/Xlib.h>
3571 #include <X11/extensions/xf86vmode.h>
3572 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3575 cc_check
$_inc_x11 -lXxf86vm $_ld_x11 && _vm
=yes
3577 if test "$_vm" = yes ; then
3578 _def_vm
='#define HAVE_XF86VM 1'
3581 _def_vm
='#undef HAVE_XF86VM'
3585 # Check for the presence of special keycodes, like audio control buttons
3586 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3587 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3588 # have these new keycodes.
3589 echocheck
"XF86keysym"
3590 if test "$_xf86keysym" = auto
; then
3592 if test "$_x11" = yes ; then
3594 #include <X11/Xlib.h>
3595 #include <X11/XF86keysym.h>
3596 int main(void) { return XF86XK_AudioPause; }
3598 cc_check
$_inc_x11 $_ld_x11 && _xf86keysym
=yes
3601 if test "$_xf86keysym" = yes ; then
3602 _def_xf86keysym
='#define HAVE_XF86XK 1'
3604 _def_xf86keysym
='#undef HAVE_XF86XK'
3606 echores
"$_xf86keysym"
3609 if test "$_x11" = no
; then
3612 # Version 2 is preferred to version 1 if available
3613 if test "$_dga" = auto
; then
3615 #include <X11/Xlib.h>
3616 #include <X11/extensions/xf86dga.h>
3617 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3620 cc_check
$_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga
=1
3623 #include <X11/Xlib.h>
3624 #include <X11/extensions/xf86dga.h>
3625 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3627 cc_check
$_inc_x11 -lXxf86dga $_ld_x11 && _dga
=2
3630 _def_dga
='#undef HAVE_DGA'
3631 _def_dga2
='#undef HAVE_DGA2'
3632 if test "$_dga" = 1 ; then
3633 _def_dga
='#define HAVE_DGA 1'
3634 _ld_dga
='-lXxf86dga'
3635 _vosrc
="$_vosrc vo_dga.c"
3636 _vomodules
="dga $_vomodules"
3637 echores
"yes (using DGA 1.0)"
3638 elif test "$_dga" = 2 ; then
3639 _def_dga
='#define HAVE_DGA 1'
3640 _def_dga2
='#define HAVE_DGA2 1'
3641 _ld_dga
='-lXxf86dga'
3642 _vosrc
="$_vosrc vo_dga.c"
3643 _vomodules
="dga $_vomodules"
3644 echores
"yes (using DGA 2.0)"
3645 elif test "$_dga" = no
; then
3647 _novomodules
="dga $_novomodules"
3649 die
"DGA version must be 1 or 2"
3654 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3655 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
3658 int main(void) { return 0; }
3661 if cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3664 elif cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3666 _ld_gl
="-lGL $_ld_pthread"
3667 elif cc_check
-lopengl32 ; then
3670 _ld_gl
="-lopengl32 -lgdi32"
3675 if test "$_gl" = yes ; then
3676 _def_gl
='#define HAVE_GL 1'
3677 if test "$_gl_win32" = yes ; then
3678 _def_gl_win32
='#define GL_WIN32 1'
3679 _vosrc
="$_vosrc vo_gl2.c w32_common.c gl_common.c"
3681 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3683 _vomodules
="opengl $_vomodules"
3685 _def_gl
='#undef HAVE_GL'
3686 _def_gl_win32
='#undef GL_WIN32'
3687 _novomodules
="opengl $_novomodules"
3692 echocheck
"/dev/mga_vid"
3693 if test "$_mga" = auto
; then
3695 test -c /dev
/mga_vid
&& _mga
=yes
3697 if test "$_mga" = yes ; then
3698 _def_mga
='#define HAVE_MGA 1'
3699 _vosrc
="$_vosrc vo_mga.c"
3700 _vomodules
="mga $_vomodules"
3702 _def_mga
='#undef HAVE_MGA'
3703 _novomodules
="mga $_novomodules"
3708 # echocheck "syncfb"
3710 # test "$_mga" = yes && _syncfb=yes
3711 # if test "$_syncfb" = yes ; then
3712 # _def_syncfb='#define HAVE_SYNCFB 1'
3713 # _vosrc="$_vosrc vo_syncfb.c"
3715 # _def_syncfb='#undef HAVE_SYNCFB'
3717 # echores "$_syncfb"
3721 if test "$_xmga" = auto
; then
3723 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
3725 if test "$_xmga" = yes ; then
3726 _def_xmga
='#define HAVE_XMGA 1'
3727 _vosrc
="$_vosrc vo_xmga.c"
3728 _vomodules
="xmga $_vomodules"
3730 _def_xmga
='#undef HAVE_XMGA'
3731 _novomodules
="xmga $_novomodules"
3737 if test "$_ggi" = auto
; then
3739 #include <ggi/ggi.h>
3740 int main(void) { return 0; }
3743 cc_check
-lggi && _ggi
=yes
3745 if test "$_ggi" = yes ; then
3746 _def_ggi
='#define HAVE_GGI 1'
3748 _vosrc
="$_vosrc vo_ggi.c"
3749 _vomodules
="ggi $_vomodules"
3751 _def_ggi
='#undef HAVE_GGI'
3752 _novomodules
="ggi $_novomodules"
3758 if test "$_aa" = auto
; then
3761 int main(void) { (void) aa_init(0, 0, 0); return 0; }
3764 if cc_check
-laa ; then
3767 elif cc_check
$_ld_x11 -laa ; then
3769 _ld_aa
="$_ld_x11 -laa"
3772 if test "$_aa" = yes ; then
3773 _def_aa
='#define HAVE_AA 1'
3775 _ld_aa
=`aalib-config --libs | cut -d " " -f 2,5,6`
3777 _vosrc
="$_vosrc vo_aa.c"
3778 _vomodules
="aa $_vomodules"
3780 _def_aa
='#undef HAVE_AA'
3781 _novomodules
="aa $_novomodules"
3787 if test "$_caca" = auto
; then
3789 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
3792 int main(void) { (void) caca_init(); return 0; }
3794 cc_check
`caca-config --libs` && _caca
=yes
3797 if test "$_caca" = yes ; then
3798 _def_caca
='#define HAVE_CACA 1'
3799 _inc_caca
=`caca-config --cflags`
3800 _ld_caca
=`caca-config --libs`
3801 _vosrc
="$_vosrc vo_caca.c"
3802 _vomodules
="caca $_vomodules"
3804 _def_caca
='#undef HAVE_CACA'
3805 _novomodules
="caca $_novomodules"
3811 if test "$_svga" = auto
; then
3815 int main(void) { return 0; }
3818 cc_check
-lvgagl -lvga $_ld_lm && _svga
=yes
3820 if test "$_svga" = yes ; then
3821 _def_svga
='#define HAVE_SVGALIB 1'
3822 _ld_svga
="-lvgagl -lvga $_ld_lm"
3823 _vosrc
="$_vosrc vo_svga.c"
3824 _vomodules
="svga $_vomodules"
3826 _def_svga
='#undef HAVE_SVGALIB'
3827 _novomodules
="svga $_novomodules"
3833 if test "$_fbdev" = auto
; then
3835 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
3837 if test "$_fbdev" = yes ; then
3838 _def_fbdev
='#define HAVE_FBDEV 1'
3839 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
3840 _vomodules
="fbdev $_vomodules"
3842 _def_fbdev
='#undef HAVE_FBDEV'
3843 _novomodules
="fbdev $_novomodules"
3850 if test "$_dvb" != no
; then
3853 #include <sys/poll.h>
3854 #include <sys/ioctl.h>
3859 #include <ost/dmx.h>
3860 #include <ost/frontend.h>
3861 #include <ost/sec.h>
3862 #include <ost/video.h>
3863 #include <ost/audio.h>
3864 int main(void) {return 0;}
3870 for I
in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
3871 if cc_check
"$I" ; then
3874 echores
"yes (using $_inc_dvb)"
3878 test "$_dvb" = no
&& echores
"no (specify path to DVB/ost/include with --with-dvbincdir=DIR)"
3883 if test "$_dvb" = yes ; then
3884 _def_dvb
='#define HAVE_DVB 1'
3885 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
3886 _aomodules
="mpegpes(dvb) $_aomodules"
3887 _vomodules
="mpegpes(dvb) $_vomodules"
3889 if test "$_dvbhead" != no
; then
3890 echocheck
"DVB HEAD"
3891 if test "$_dvbhead" != no
; then
3895 #include <sys/poll.h>
3896 #include <sys/ioctl.h>
3901 #include <linux/dvb/dmx.h>
3902 #include <linux/dvb/frontend.h>
3903 #include <linux/dvb/video.h>
3904 #include <linux/dvb/audio.h>
3905 int main(void) {return 0;}
3911 for I
in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
3912 if cc_check
"$I" ; then
3915 echores
"yes (using $_inc_dvb)"
3919 test "$_dvbhead" = no
&& echores
"no (specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR)"
3924 if test "$_dvbhead" = yes ; then
3925 _def_dvb
='#define HAVE_DVB_HEAD 1'
3926 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
3927 _aomodules
="mpegpes(dvb) $_aomodules"
3928 _vomodules
="mpegpes(dvb) $_vomodules"
3931 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
3932 _def_dvb
='#undef HAVE_DVB'
3933 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
3934 _aomodules
="mpegpes(file) $_aomodules"
3935 _vomodules
="mpegpes(file) $_vomodules"
3938 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
3940 _inputmodules
="dvb $_inputmodules"
3943 _noinputmodules
="dvb $_noinputmodules"
3946 echocheck
"PNG support"
3947 if test "$_png" = auto
; then
3950 # Don't check for -lpng on irix since it has its own libpng
3951 # incompatible with the GNU libpng
3952 echores
"disabled on irix (not GNU libpng)"
3958 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
3959 printf("libpng: %s\n", png_libpng_ver);
3960 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
3963 if cc_check
-lpng -lz $_ld_lm ; then
3964 if "$TMPO" >> "$TMPLOG" ; then
3968 echores
"no (mismatch of library and header versions)"
3977 if test "$_png" = yes ; then
3978 _def_png
='#define HAVE_PNG 1'
3980 _vosrc
="$_vosrc vo_png.c"
3981 _vomodules
="png $_vomodules"
3984 _def_png
='#undef HAVE_PNG'
3985 _novomodules
="png $_novomodules"
3989 echocheck
"JPEG support"
3990 if test "$_jpg" = auto
; then
3997 #include <jpeglib.h>
4002 if cc_check
-ljpeg $_ld_lm ; then
4003 if "$TMPO" >> "$TMPLOG" ; then
4010 if test "$_jpg" = yes ; then
4011 _def_jpg
='#define HAVE_JPEG 1'
4012 _vosrc
="$_vosrc vo_jpeg.c"
4013 _vomodules
="jpeg $_vomodules"
4017 _def_jpg
='#undef HAVE_JPEG'
4018 _novomodules
="jpeg $_novomodules"
4024 echocheck
"PNM support"
4025 if test "$_pnm" = yes; then
4026 _def_pnm
="#define HAVE_PNM"
4027 _vosrc
="$_vosrc vo_pnm.c"
4028 _vomodules
="pnm $_vomodules"
4030 _def_pnm
="#undef HAVE_PNM"
4031 _novomodules
="pnm $_novomodules"
4037 echocheck
"md5sum support"
4038 if test "$_md5sum" = yes; then
4039 _def_md5sum
="#define HAVE_MD5SUM"
4040 _vosrc
="$_vosrc vo_md5sum.c md5sum.c"
4041 _vomodules
="md5sum $_vomodules"
4043 _def_md5sum
="#undef HAVE_MD5SUM"
4044 _novomodules
="md5sum $_novomodules"
4050 echocheck
"GIF support"
4051 # This is to appease people who want to force gif support.
4052 # If it is forced to yes, then we still do checks to determine
4053 # which gif library to use.
4054 if test "$_gif" = yes ; then
4059 if test "$_gif" = auto
; then
4062 #include <gif_lib.h>
4067 if cc_check
-lungif && "$TMPO" >> "$TMPLOG" ; then
4070 elif cc_check
-lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
4072 _ld_gif
="-lungif $_ld_x11"
4073 elif cc_check
-lgif && "$TMPO" >> "$TMPLOG" ; then
4076 elif cc_check
-lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
4078 _ld_gif
="-lgif $_ld_x11"
4082 # If no library was found, and the user wants support forced,
4083 # then we force it on with libgif, as this is the safest
4084 # assumption IMHO. (libungif & libregif both create symbolic
4085 # links to libgif. We also assume that no x11 support is needed,
4086 # because if you are forcing this, then you _should_ know what
4087 # you are doing. [ Besides, package maintainers should never
4088 # have compiled x11 deps into libungif in the first place. ] )
4091 if test "$_force_gif" = yes && test "$_gif" = no
; then
4096 if test "$_gif" = yes ; then
4097 _def_gif
='#define HAVE_GIF 1'
4098 _vosrc
="$_vosrc vo_gif89a.c"
4099 _codecmodules
="gif $_codecmodules"
4100 _vomodules
="gif89a $_vomodules"
4102 _gif
="yes (old version, some encoding functions disabled)"
4103 _def_gif_4
='#undef HAVE_GIF_4'
4107 #include <gif_lib.h>
4108 void catch() { exit(1); }
4110 signal(SIGSEGV, catch); // catch segfault
4111 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4112 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4116 if cc_check
"$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4117 _def_gif_4
='#define HAVE_GIF_4 1'
4121 _def_gif
='#undef HAVE_GIF'
4122 _def_gif_4
='#undef HAVE_GIF_4'
4123 _novomodules
="gif89a $_novomodules"
4124 _nocodecmodules
="gif $_nocodecmodules"
4130 case "$_gif" in yes*)
4131 echocheck
"broken giflib workaround"
4132 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4135 #include <gif_lib.h>
4138 printf("UserData is at address %p\n", gif.UserData);
4142 if cc_check
"$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4143 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4152 echocheck
"VESA support"
4153 if test "$_vesa" = auto
; then
4154 if x86
&& linux
; then
4158 int main(void) { return 0; }
4160 cc_check
&& _vesa
=yes
4163 if test "$_vesa" = yes ; then
4164 _def_vesa
='#define HAVE_VESA 1'
4165 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c"
4166 _vomodules
="vesa $_vomodules"
4169 _def_vesa
='#undef HAVE_VESA'
4170 echores
"no (not supported on this OS/architecture)"
4171 _novomodules
="vesa $_novomodules"
4180 if test -z "$_sdlconfig" ; then
4181 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4182 _sdlconfig
="sdl-config"
4183 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4184 _sdlconfig
="sdl11-config"
4189 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4192 int main(int argc, char *argv[]) { return 0; }
4195 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4196 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4197 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4198 if test "$_sdlversion" -gt 116 ; then
4199 if test "$_sdlversion" -lt 121 ; then
4200 _def_sdlbuggy
='#define BUGGY_SDL'
4202 _def_sdlbuggy
='#undef BUGGY_SDL'
4211 if test "$_sdl" = yes ; then
4212 _def_sdl
='#define HAVE_SDL 1'
4214 _ld_sdl
=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4215 _inc_sdl
=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4217 _ld_sdl
=`$_sdlconfig --libs | sed s/-mwindows//`
4218 _inc_sdl
=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4220 _ld_sdl
=`$_sdlconfig --libs`
4221 _inc_sdl
=`$_sdlconfig --cflags`
4223 _vosrc
="$_vosrc vo_sdl.c"
4224 _vomodules
="sdl $_vomodules"
4225 _aosrc
="$_aosrc ao_sdl.c"
4226 _aomodules
="sdl $_aomodules"
4227 echores
"yes (using $_sdlconfig)"
4229 _def_sdl
='#undef HAVE_SDL'
4230 _novomodules
="sdl $_novomodules"
4231 _noaomodules
="sdl $_noaomodules"
4235 echocheck
"Windows waveout"
4236 if test "$_win32waveout" = auto
; then
4238 #include <windows.h>
4239 #include <mmsystem.h>
4240 int main(void) { return 0; }
4243 cc_check
-lwinmm && _win32waveout
=yes
4245 if test "$_win32waveout" = yes ; then
4246 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4247 _ld_win32libs
="-lwinmm $_ld_win32libs"
4248 _aosrc
="$_aosrc ao_win32.c"
4249 _aomodules
="win32 $_aomodules"
4251 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4252 _noaomodules
="win32 $_noaomodules"
4254 echores
"$_win32waveout"
4257 if test "$_directx" = auto
; then
4259 #include <windows.h>
4262 int main(void) { return 0; }
4265 cc_check
-lgdi32 && _directx
=yes
4267 if test "$_directx" = yes ; then
4268 _def_directx
='#define HAVE_DIRECTX 1'
4269 _ld_win32libs
="-lgdi32 $_ld_win32libs"
4270 _vosrc
="$_vosrc vo_directx.c"
4271 _vomodules
="directx $_vomodules"
4272 _aosrc
="$_aosrc ao_dsound.c"
4273 _aomodules
="dsound $_aomodules"
4275 _def_directx
='#undef HAVE_DIRECTX'
4276 _novomodules
="directx $_novomodules"
4277 _noaomodules
="dsound $_noaomodules"
4282 if test "$_nas" = auto ||
test "$_nas" = yes ; then
4284 #include <audio/audiolib.h>
4285 int main(void) { return 0; }
4288 cc_check
-laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas
=yes
4290 if test "$_nas" = yes ; then
4291 _def_nas
='#define HAVE_NAS 1'
4292 _ld_nas
="-laudio -lXt $_ld_x11"
4293 _aosrc
="$_aosrc ao_nas.c"
4294 _aomodules
="nas $_aomodules"
4296 _noaomodules
="nas $_noaomodules"
4297 _def_nas
='#undef HAVE_NAS'
4302 if test "$_dxr2" = auto
; then
4304 for _inc_dxr2
in "$_inc_dxr2" \
4305 "-I/usr/local/include/dxr2" \
4306 "-I/usr/include/dxr2"; do
4308 #include <dxr2ioctl.h>
4309 int main(void) { return 0; }
4311 cc_check
$_inc_dxr2 && _dxr2
=yes && break
4314 if test "$_dxr2" = yes; then
4315 _def_dxr2
='#define HAVE_DXR2 1'
4316 _vosrc
="$_vosrc vo_dxr2.c"
4317 _aosrc
="$_aosrc ao_dxr2.c"
4318 _aomodules
="dxr2 $_aomodules"
4319 _vomodules
="dxr2 $_vomodules"
4320 echores
"yes (using $_inc_dxr2)"
4322 _def_dxr2
='#undef HAVE_DXR2'
4323 _noaomodules
="dxr2 $_noaomodules"
4324 _novomodules
="dxr2 $_novomodules"
4330 if test "$_dxr3" = auto
; then
4332 #include <linux/em8300.h>
4333 int main(void) { return 0; }
4336 cc_check
&& _dxr3
=yes
4338 if test "$_dxr3" = yes ; then
4339 _def_dxr3
='#define HAVE_DXR3 1'
4340 _vosrc
="$_vosrc vo_dxr3.c"
4341 _vomodules
="dxr3 $_vomodules"
4343 _def_dxr3
='#undef HAVE_DXR3'
4344 _novomodules
="dxr3 $_novomodules"
4345 if test "$_mp1e" = auto
; then
4346 # we don't need mp1e
4353 if test "$_mmx" = no
; then
4354 # mp1e REQUIRES mmx!
4357 if test "$_mp1e" != no
; then
4359 _def_mp1e
='#define USE_MP1E'
4360 _ld_mp1e
='libmp1e/libmp1e.a'
4361 _dep_mp1e
='libmp1e/libmp1e.a'
4364 _def_mp1e
='#undef USE_MP1E'
4372 if test "$_fame" = auto
; then
4374 test "$_dxr2" = yes && _fame
=auto
4375 test "$_dxr3" = yes && _fame
=auto
4376 test "$_dvb" = yes && _fame
=auto
4378 if test "$_fame" = auto
; then
4380 if test -d libfame
&& test -f libfame
/fame.h
; then
4381 # disable fame on cygwin as no sense to port - atmos
4385 echores
"no (no fame dir)"
4391 _def_fame
='#undef USE_LIBFAME'
4392 if test "$_fame" = yes ; then
4393 _def_fame
='#define USE_LIBFAME 1'
4394 _ld_fame
='libfame/libfame.a'
4403 echocheck
"OSS Audio"
4404 if test "$_ossaudio" = auto
; then
4406 #include <sys/ioctl.h>
4408 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4411 cc_check
&& _ossaudio
=yes
4413 if test "$_ossaudio" = yes ; then
4414 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4415 _aosrc
="$_aosrc ao_oss.c"
4416 _aomodules
="oss $_aomodules"
4417 if test "$_linux_devfs" = yes; then
4418 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4419 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4422 #include <sys/ioctl.h>
4424 #ifdef OPEN_SOUND_SYSTEM
4425 int main(void) { return 0; }
4427 #error Not the real thing
4431 cc_check
&& _real_ossaudio
=yes
4432 if test "$_real_ossaudio" = yes; then
4433 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4434 elif netbsd || openbsd
; then
4435 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4436 _ld_arch
="$_ld_arch -lossaudio"
4438 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4440 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4443 _def_ossaudio
='#undef USE_OSS_AUDIO'
4444 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4445 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4446 _noaomodules
="oss $_noaomodules"
4448 echores
"$_ossaudio"
4452 if test "$_arts" = auto
; then
4454 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4458 int main(void) { return 0; }
4460 cc_check
`artsc-config --libs` `artsc-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _arts
=yes
4465 if test "$_arts" = yes ; then
4466 _def_arts
='#define USE_ARTS 1'
4467 _aosrc
="$_aosrc ao_arts.c"
4468 _aomodules
="arts $_aomodules"
4469 _ld_arts
=`artsc-config --libs`
4470 _inc_arts
=`artsc-config --cflags`
4472 _noaomodules
="arts $_noaomodules"
4478 if test "$_esd" = auto
; then
4480 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4484 int main(void) { return 0; }
4486 cc_check
`esd-config --libs` `esd-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _esd
=yes
4492 if test "$_esd" = yes ; then
4493 _def_esd
='#define USE_ESD 1'
4494 _aosrc
="$_aosrc ao_esd.c"
4495 _aomodules
="esd $_aomodules"
4496 _ld_esd
=`esd-config --libs`
4497 _inc_esd
=`esd-config --cflags`
4499 echocheck
"esd_get_latency()"
4502 int main(void) { return esd_get_latency(0); }
4504 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4505 echores
"$_esd_latency"
4507 _def_esd
='#undef USE_ESD'
4508 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4509 _noaomodules
="esd $_noaomodules"
4513 if test "$_polyp" = auto
; then
4515 if ( pkg-config
--exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ) >> "$TMPLOG" 2>&1 ; then
4518 #include <polyp/polyplib.h>
4519 #include <polyp/mainloop.h>
4520 #include <polyp/polyplib-error.h>
4521 int main(void) { return 0; }
4523 cc_check
`pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _polyp
=yes
4529 if test "$_polyp" = yes ; then
4530 _def_polyp
='#define USE_POLYP 1'
4531 _aosrc
="$_aosrc ao_polyp.c"
4532 _aomodules
="polyp $_aomodules"
4533 _ld_polyp
=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
4534 _inc_polyp
=`pkg-config --cflags polyplib polyplib-error polyplib-mainloop`
4536 _def_polyp
='#undef USE_POLYP'
4537 _noaomodules
="polyp $_noaomodules"
4542 if test "$_jack" = auto
; then
4544 if ( ( pkg-config
--modversion jack
) > /dev
/null
2>&1 ) &&
4545 ( jackd
--version |
grep version |
awk '{ print $3 }' ) >> "$TMPLOG" 2>&1 ; then
4548 #include <jack/jack.h>
4549 int main(void) { JACK_Init(); return 0; }
4551 # This test only checks the minor version number.
4552 if ( ( test `bio2jack-config --version | cut -d '.' -f 2` -ge 3 ) ) >/dev
/null
2>&1 ; then
4553 if test -z "$_bio2jackdir" ; then
4554 cc_check
-lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack
=yes
4556 cc_check
-L "$_bio2jackdir" -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack
=yes
4562 if test "$_jack" = yes ; then
4563 _def_jack
='#define USE_JACK 1'
4564 _aosrc
="$_aosrc ao_jack.c"
4565 _aomodules
="jack $_aomodules"
4566 if test -z "$_bio2jackdir" ; then
4567 _ld_jack
="-lbio2jack `pkg-config --libs jack`"
4569 _ld_jack
="-L \"$_bio2jackdir\" -lbio2jack `pkg-config --libs jack`"
4571 _inc_jack
=`pkg-config --cflags jack`
4573 _noaomodules
="jack $_noaomodules"
4578 echocheck
"ALSA audio"
4579 if test "$_alsa" != no
; then
4582 #include <sys/asoundlib.h>
4583 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==5)); }
4585 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.5.x'
4588 #include <sys/asoundlib.h>
4589 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4591 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-sys'
4593 #include <alsa/asoundlib.h>
4594 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4596 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-alsa'
4599 #include <sys/asoundlib.h>
4600 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4602 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-sys'
4604 #include <alsa/asoundlib.h>
4605 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4607 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-alsa'
4609 _def_alsa5
='#undef HAVE_ALSA5'
4610 _def_alsa9
='#undef HAVE_ALSA9'
4611 _def_alsa1x
='#undef HAVE_ALSA1X'
4612 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
4613 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
4614 if test "$_alsaver" ; then
4615 if test "$_alsaver" = '0.5.x' ; then
4616 _aosrc
="$_aosrc ao_alsa5.c"
4617 _aomodules
="alsa5 $_aomodules"
4618 _def_alsa5
='#define HAVE_ALSA5 1'
4619 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4620 echores
"yes (using alsa 0.5.x and sys/asoundlib.h)"
4621 elif test "$_alsaver" = '0.9.x-sys' ; then
4622 _aosrc
="$_aosrc ao_alsa.c"
4623 _aomodules
="alsa $_aomodules"
4624 _def_alsa9
='#define HAVE_ALSA9 1'
4625 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4626 echores
"yes (using alsa 0.9.x and sys/asoundlib.h)"
4627 elif test "$_alsaver" = '0.9.x-alsa' ; then
4628 _aosrc
="$_aosrc ao_alsa.c"
4629 _aomodules
="alsa $_aomodules"
4630 _def_alsa9
='#define HAVE_ALSA9 1'
4631 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4632 echores
"yes (using alsa 0.9.x and alsa/asoundlib.h)"
4633 elif test "$_alsaver" = '1.0.x-sys' ; then
4634 _aosrc
="$_aosrc ao_alsa.c"
4635 _aomodules
="alsa $_aomodules"
4636 _def_alsa1x
="#define HAVE_ALSA1X 1"
4637 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4638 echores
"yes (using alsa 1.0.x and sys/asoundlib.h)"
4639 elif test "$_alsaver" = '1.0.x-alsa' ; then
4640 _aosrc
="$_aosrc ao_alsa.c"
4641 _aomodules
="alsa $_aomodules"
4642 _def_alsa1x
="#define HAVE_ALSA1X 1"
4643 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4644 echores
"yes (using alsa 1.0.x and alsa/asoundlib.h)"
4646 _ld_alsa
="-lasound $_ld_dl $_ld_pthread"
4648 _noaomodules
="alsa $_noaomodules"
4653 echocheck
"Sun audio"
4654 if test "$_sunaudio" = auto
; then
4656 #include <sys/types.h>
4657 #include <sys/audioio.h>
4658 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4661 cc_check
&& _sunaudio
=yes
4663 if test "$_sunaudio" = yes ; then
4664 _def_sunaudio
='#define USE_SUN_AUDIO 1'
4665 _aosrc
="$_aosrc ao_sun.c"
4666 _aomodules
="sun $_aomodules"
4668 _def_sunaudio
='#undef USE_SUN_AUDIO'
4669 _noaomodules
="sun $_noaomodules"
4671 echores
"$_sunaudio"
4674 echocheck
"Sun mediaLib"
4675 if test "$_mlib" = auto
; then
4677 test -z "$_mlibdir" && _mlibdir
=/opt
/SUNWmlib
4680 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
4682 cc_check
-I${_mlibdir}/include
-L${_mlibdir}/lib
-lmlib && _mlib
=yes
4684 if test "$_mlib" = yes ; then
4685 _def_mlib
='#define HAVE_MLIB 1'
4686 _inc_mlib
=" -I${_mlibdir}/include "
4687 _ld_mlib
=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
4689 _def_mlib
='#undef HAVE_MLIB'
4694 echocheck
"SGI audio"
4695 if test "$_sgiaudio" = auto
; then
4696 # check for SGI audio
4698 #include <dmedia/audio.h>
4699 int main(void) { return 0; }
4702 cc_check
&& _sgiaudio
=yes
4704 if test "$_sgiaudio" = "yes" ; then
4705 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
4706 _ld_sgiaudio
='-laudio'
4707 _aosrc
="$_aosrc ao_sgi.c"
4708 _aomodules
="sgi $_aomodules"
4710 _def_sgiaudio
='#undef USE_SGI_AUDIO'
4711 _noaomodules
="sgi $_noaomodules"
4713 echores
"$_sgiaudio"
4716 echocheck
"VCD support"
4717 if linux || bsdos || freebsd || netbsd || sunos || darwin
; then
4718 _inputmodules
="vcd $_inputmodules"
4719 _def_vcd
='#define HAVE_VCD 1'
4722 _def_vcd
='#undef HAVE_VCD'
4723 _noinputmodules
="vcd $_noinputmodules"
4724 echores
"not supported on this OS"
4727 echocheck
"DVD support (libmpdvdkit)"
4728 if test "$_dvdkit" = auto
; then
4730 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
; then
4731 test -f "./libmpdvdkit2/Makefile" && _dvdkit
=yes
4732 test -f "./libmpdvdkit/Makefile" && _dvdkit
=yes
4735 if test "$_dvdkit" = yes ; then
4736 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
4737 if test -f "./libmpdvdkit2/Makefile" ; then
4738 _inputmodules
="mpdvdkit2 $_inputmodules"
4739 _dvdread
=libmpdvdkit2
4743 _inputmodules
="mpdvdkit $_inputmodules"
4744 _dvdread
=libmpdvdkit
4747 _noinputmodules
="mpdvdkit $_noinputmodules"
4749 _def_dvd_linux
='#undef HAVE_LINUX_DVD_STRUCT'
4750 _def_dvd_bsd
='#undef HAVE_BSD_DVD_STRUCT'
4751 _dev_dvd_openbsd
='#undef HAVE_OPENBSD_DVD_STRUCT'
4752 _def_dvd_darwin
='#undef DARWIN_DVD_IOCTL'
4753 if linux || netbsd || openbsd || bsdos
; then
4754 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
4756 _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
4760 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
4763 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
4768 _noinputmodules
="mpdvdkit $_noinputmodules"
4770 if test "$_dvdkit" = yes ||
test "$_dvdkit2" = yes; then
4776 echocheck
"DVD support (libdvdread)"
4777 if test "$_dvdread" = auto
; then
4779 #include <inttypes.h>
4780 #include <dvdread/dvd_reader.h>
4781 #include <dvdread/ifo_types.h>
4782 #include <dvdread/ifo_read.h>
4783 #include <dvdread/nav_read.h>
4784 int main(void) { return 0; }
4787 if test "$_dl" = yes; then
4789 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
4793 _def_mpdvdkit
="#undef USE_MPDVDKIT"
4797 _def_dvdread
='#define USE_DVDREAD 1'
4798 _ld_dvdread
='-ldvdread'
4799 _inputmodules
="dvdread $_inputmodules"
4803 _def_dvdread
='#undef USE_DVDREAD'
4804 _noinputmodules
="dvdread $_noinputmodules"
4809 _def_dvdread
='#define USE_DVDREAD 1'
4810 _ld_dvdread
='-Llibmpdvdkit -lmpdvdkit'
4811 _noinputmodules
="dvdread $_noinputmodules"
4812 _def_mpdvdkit
="#define USE_MPDVDKIT 1"
4813 echores
"disabled by libmpdvdkit"
4817 _def_dvdread
='#define USE_DVDREAD 1'
4818 _ld_dvdread
='-Llibmpdvdkit2 -lmpdvdkit'
4819 _noinputmodules
="dvdread $_noinputmodules"
4820 _def_mpdvdkit
="#define USE_MPDVDKIT 2"
4821 echores
"disabled by libmpdvdkit2"
4825 # dvdnav disabled, it does not work
4826 # echocheck "DVD support (libdvdnav)"
4827 # if test "$_dvdnav" = yes ; then
4829 # #include <dvdnav.h>
4830 # int main(void) { dvdnav_t *dvd=0; return 0; }
4833 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
4834 # if test -z "$_dvdnavconfig" ; then
4835 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
4836 # _dvdnavconfig="dvdnav-config"
4839 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
4841 # test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
4842 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
4844 # if test "$_dvdnav" = yes ; then
4846 # _def_dvdnav='#define USE_DVDNAV 1'
4847 # if test -n "$_legal_dvdnavdir" ; then
4848 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
4849 # elif test -n "$_dvdnavconfig" ; then
4850 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
4852 # _ld_css="$_ld_css -ldvdnav"
4854 # if test -n "$_dvdnavconfig" ; then
4855 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
4856 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
4858 # if test -n "$_dvdnavdir" ; then
4859 # _inc_extra="$_inc_extra -I$_dvdnavdir"
4861 # _inputmodules="dvdnav $_inputmodules"
4864 # _def_dvdnav='#undef USE_DVDNAV'
4865 # _noinputmodules="dvdnav $_noinputmodules"
4869 echocheck
"cdparanoia"
4870 if test "$_cdparanoia" = auto
; then
4872 #include <cdda_interface.h>
4873 #include <cdda_paranoia.h>
4874 // This need a better test. How ?
4875 int main(void) { return 1; }
4878 if cc_check
$_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4881 for I
in /usr
/include
/cdda
/usr
/local
/include
/cdda
; do
4882 if cc_check
-I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4883 _cdparanoia
=yes; _inc_cdparanoia
="-I$I"; break
4888 if test "$_cdparanoia" = yes ; then
4889 _def_cdparanoia
='#define HAVE_CDDA'
4890 _inputmodules
="cdda $_inputmodules"
4891 _ld_cdparanoia
="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
4892 openbsd
&& _ld_cdparanoia
="$_ld_cdparanoia -lutil"
4894 _def_cdparanoia
='#undef HAVE_CDDA'
4895 _noinputmodules
="cdda $_noinputmodules"
4897 echores
"$_cdparanoia"
4900 echocheck
"freetype >= 2.0.9"
4902 # freetype depends on iconv
4903 if test "$_iconv" = no
; then
4904 _freetype
="no (iconv support needed)"
4907 if test "$_freetype" = auto
; then
4908 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
4911 #include <ft2build.h>
4912 #include FT_FREETYPE_H
4913 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
4914 #error "Need FreeType 2.0.9 or newer"
4919 FT_Int major=-1,minor=-1,patch=-1;
4920 int err=FT_Init_FreeType(&library);
4922 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
4925 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
4926 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
4927 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
4928 (int)major,(int)minor,(int)patch );
4929 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
4930 printf("Library and header version mismatch! Fix it in your distribution!\n");
4937 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype
=yes
4942 if test "$_freetype" = yes ; then
4943 _def_freetype
='#define HAVE_FREETYPE'
4944 _inc_freetype
=`$_freetypeconfig --cflags`
4945 _ld_freetype
=`$_freetypeconfig --libs`
4947 _def_freetype
='#undef HAVE_FREETYPE'
4949 echores
"$_freetype"
4951 if test "$_freetype" = no
; then
4954 echocheck
"fontconfig"
4955 if test "$_fontconfig" = auto
; then
4956 if ( pkg-config
--modversion fontconfig
) > /dev
/null
2>&1 ; then
4959 #include <fontconfig/fontconfig.h>
4964 printf("Couldn't initialize fontconfig lib\n");
4972 cc_check
`pkg-config --cflags --libs fontconfig` && ( $TMPO >> "$TMPLOG" ) && _fontconfig
=yes
4977 if test "$_fontconfig" = yes ; then
4978 _def_fontconfig
='#define HAVE_FONTCONFIG'
4979 _inc_fontconfig
=`pkg-config --cflags fontconfig`
4980 _ld_fontconfig
=`pkg-config --libs fontconfig`
4982 _def_fontconfig
='#undef HAVE_FONTCONFIG'
4984 echores
"$_fontconfig"
4986 echocheck
"fribidi with charsets"
4987 if test "$_fribidi" = yes ; then
4988 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
4991 #include <fribidi/fribidi.h>
4994 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHARSET_UTF8) {
4995 printf("Fribidi headers are not consistents with the library!\n");
5002 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _fribidi
=yes
5007 if test "$_fribidi" = yes ; then
5008 _def_fribidi
='#define USE_FRIBIDI'
5009 _inc_fribidi
=`$_fribidiconfig --cflags`
5010 _ld_fribidi
=`$_fribidiconfig --libs`
5012 _def_fribidi
='#undef USE_FRIBIDI'
5018 if test "$_enca" = auto
; then
5025 langs = enca_get_languages(&langcnt);
5030 cc_check
-lenca && _enca
=yes
5032 if test "$_enca" = yes ; then
5033 _def_enca
='#define HAVE_ENCA 1'
5036 _def_enca
='#undef HAVE_ENCA'
5044 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5047 cc_check
-lz && _zlib
=yes
5048 if test "$_zlib" = yes ; then
5049 _def_zlib
='#define HAVE_ZLIB 1'
5052 _def_zlib
='#undef HAVE_ZLIB'
5058 if test "$_rtc" = auto
; then
5060 #include <sys/ioctl.h>
5062 #include <linux/rtc.h>
5065 #define RTC_PIE_ON RTCIO_PIE_ON
5067 int main(void) { return RTC_PIE_ON; }
5070 cc_check
&& _rtc
=yes
5072 if test "$_rtc" = yes ; then
5073 _def_rtc
='#define HAVE_RTC 1'
5075 _def_rtc
='#undef HAVE_RTC'
5080 echocheck
"external liblzo support"
5081 if test "$_liblzo" = auto
; then
5085 int main(void) { lzo_init();return 0; }
5087 cc_check
-llzo && _liblzo
=yes
5089 if test "$_liblzo" = yes ; then
5090 _def_liblzo
='#define USE_LIBLZO 1'
5092 _codecmodules
="liblzo $_codecmodules"
5094 _def_liblzo
='#undef USE_LIBLZO'
5095 _nocodecmodules
="liblzo $_nocodecmodules"
5100 echocheck
"mad support"
5101 if test "$_mad" = auto
; then
5105 int main(void) { return 0; }
5107 cc_check
$_madlibdir -lmad && _mad
=yes
5109 if test "$_mad" = yes ; then
5110 _def_mad
='#define USE_LIBMAD 1'
5112 _codecmodules
="libmad $_codecmodules"
5114 _def_mad
='#undef USE_LIBMAD'
5115 _nocodecmodules
="libmad $_nocodecmodules"
5120 if test "$_toolame" = auto
; then
5122 #include <toolame.h>
5123 int main(void) { toolame_init(); return 0; }
5126 _toolame_extraflags
=""
5127 _toolame_lib
="-ltoolame"
5128 if test -n "$_toolamedir"; then
5129 _toolame_extraflags
="-I$_toolamedir -L$_toolamedir"
5131 cc_check
$_toolame_extraflags $_toolame_lib $_ld_lm && _toolame
=yes
5133 if test "$_toolame" = yes ; then
5134 _def_toolame
='#define HAVE_TOOLAME 1'
5135 _codecmodules
="$_codecmodules toolame"
5137 _def_toolame
='#undef HAVE_TOOLAME'
5139 _nocodecmodules
="toolame $_nocodecmodules"
5141 if test -z "$_toolamedir" ; then
5144 echores
"$_toolame (using $_toolamedir)"
5147 echocheck
"OggVorbis support"
5148 if test "$_tremor_internal" = yes; then
5150 elif test "$_vorbis" = auto
; then
5153 #include <vorbis/codec.h>
5154 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5156 cc_check
-lvorbis -logg $_ld_lm && _vorbis
=yes
5158 if test "$_vorbis" = yes ; then
5159 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5160 if test "$_tremor_internal" = yes ; then
5161 # do not set _ld_vorbis as it is resolved separately
5162 # mp3lame support for vorbis is deprecated so don't care
5163 _def_tremor
='#define TREMOR 1'
5164 if test "$_tremor_low" = yes ; then
5165 _tremor_flags
='-D_LOW_ACCURACY_'
5169 _codecmodules
="tremor(internal) $_codecmodules"
5170 elif test "$_tremor" = yes ; then
5171 _def_tremor
='#define TREMOR 1'
5172 _ld_vorbis
='-lvorbisidec'
5173 _codecmodules
="tremor $_codecmodules"
5175 _def_tremor
='#undef TREMOR'
5176 _ld_vorbis
='-lvorbis -logg'
5177 _codecmodules
="libvorbis $_codecmodules"
5180 _def_vorbis
='#undef HAVE_OGGVORBIS'
5181 _def_tremor
='#undef TREMOR'
5182 _nocodecmodules
="libvorbis $_nocodecmodules"
5184 if test "$_vorbis" = yes -a "$_tremor_internal" = yes -a "$_tremor_low" = yes ; then
5185 echores
"$_vorbis (internal low accuracy Tremor)"
5186 elif test "$_vorbis" = yes -a "$_tremor_internal" = yes ; then
5187 echores
"$_vorbis (internal Tremor)"
5188 elif test "$_vorbis" = yes -a "$_tremor" = yes ; then
5189 echores
"$_vorbis (Tremor)"
5194 echocheck
"OggTheora support (only the CVS version!)"
5195 if test "$_theora" = auto
; then
5198 #include <theora/theora.h>
5202 /* theora is in flux, make sure that all interface routines and
5203 * datatypes exist and work the way we expect it, so we don't break
5213 theora_info_init (&inf);
5214 theora_comment_init (&tc);
5218 /* we don't want to execute this kind of nonsense; just for making sure
5219 * that compilation works... */
5220 memset(&op, 0, sizeof(op));
5221 r = theora_decode_header (&inf, &tc, &op);
5222 r = theora_decode_init (&st, &inf);
5223 t = theora_granule_time (&st, op.granulepos);
5224 r = theora_decode_packetin (&st, &op);
5225 r = theora_decode_YUVout (&st, &yuv);
5231 cc_check
-ltheora -logg $_ld_lm && _theora
=yes
5233 if test "$_theora" = yes ; then
5234 _def_theora
='#define HAVE_OGGTHEORA 1'
5235 _codecmodules
="libtheora $_codecmodules"
5236 _ld_theora
="-ltheora -logg"
5238 _def_theora
='#undef HAVE_OGGTHEORA'
5239 _nocodecmodules
="libtheora $_nocodecmodules"
5243 echocheck
"mp3lib support"
5244 if test "$_mp3lib" = yes ; then
5245 _def_mp3lib
='#define USE_MP3LIB 1'
5246 _codecmodules
="mp3lib $_codecmodules"
5248 _def_mp3lib
='#undef USE_MP3LIB'
5249 _nocodecmodules
="mp3lib $_nocodecmodules"
5253 echocheck
"liba52 support"
5254 if test "$_liba52" = yes ; then
5255 _def_liba52
='#define USE_LIBA52 1'
5256 _codecmodules
="liba52 $_codecmodules"
5258 _def_liba52
='#undef USE_LIBA52'
5259 _nocodecmodules
="liba52 $_nocodecmodules"
5263 echocheck
"libdts support"
5264 if test "$_libdts" = auto
; then
5267 #include <inttypes.h>
5269 int main(void) { dts_init (0); return 0; }
5271 cc_check
$_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts
=yes
5273 if test "$_libdts" = yes ; then
5274 _def_libdts
='#define CONFIG_DTS 1'
5275 _ld_libdts
="$_ld_libdts -ldts $_ld_lm"
5276 _codecmodules
="libdts $_codecmodules"
5278 _def_libdts
='#undef CONFIG_DTS'
5279 _nocodecmodules
="libdts $_nocodecmodules"
5283 echocheck
"libmpeg2 support"
5284 if test "$_libmpeg2" = yes ; then
5285 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5286 _codecmodules
="libmpeg2 $_codecmodules"
5288 _def_libmpeg2
='#undef USE_LIBMPEG2'
5289 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5291 echores
"$_libmpeg2"
5294 echocheck
"Matroska support"
5295 if test "$_matroska_internal" = yes ; then
5296 _inputmodules
="matroska $_inputmodules"
5297 _def_matroska
='#define HAVE_MATROSKA 1'
5299 _noinputmodules
="matroska $_noinputmodules"
5300 _def_matroska
='#undef HAVE_MATROSKA'
5302 echores
"$_matroska_internal"
5305 echocheck
"internal FAAD2 (AAC) support"
5306 _inc_faad
="-I`pwd`/libfaad2"
5307 if test "$_faad_internal" = auto
; then
5308 # the faad check needs a config.h file
5309 if not
test -f "config.h" ; then
5312 # internal faad: check if our dear gcc is able to compile it...
5313 cp "`pwd`/libfaad2/cfft.c" $TMPC
5314 if ( cc_check
-c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer $_inc_faad ); then
5317 _faad_internal
="no (broken gcc)"
5320 if test "$_faad_internal" = yes ; then
5321 _def_faad_internal
="#define USE_INTERNAL_FAAD 1"
5324 _def_faad_internal
="#undef USE_INTERNAL_FAAD"
5327 echores
"$_faad_internal"
5330 echocheck
"external FAAD2 (AAC) support"
5331 if test "$_faad_external" != no
; then
5333 _inc_faad
="$_inc_extra"
5334 # external faad: check if it's really faad2 :)
5335 if test "$_faad_external" = auto
; then
5339 #ifndef FAAD_MIN_STREAMSIZE
5340 #error Too old version
5342 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5344 cc_check
$_inc_faad $_ld_faad $_ld_lm && _faad_external
=yes
5346 echores
"$_faad_external"
5351 if test "$_faad_external" = yes; then
5352 _def_faad
='#define HAVE_FAAD 1'
5353 _codecmodules
="faad2(external) $_codecmodules"
5354 elif test "$_faad_internal" = yes; then
5355 _def_faad
='#define HAVE_FAAD 1'
5356 _codecmodules
="faad2(internal) $_codecmodules"
5358 _def_faad
='#undef HAVE_FAAD'
5359 _nocodecmodules
="faad2 $_nocodecmodules"
5364 echocheck
"LADSPA plugin support"
5365 if test "$_ladspa" = auto
; then
5370 const LADSPA_Descriptor *ld = NULL;
5375 cc_check
&& _ladspa
=yes
5377 if test "$_ladspa" = yes; then
5378 _def_ladspa
="#define HAVE_LADSPA"
5379 _afsrc
="$_afsrc af_ladspa.c"
5380 _afmodules
="ladspa $_afmodules"
5382 _def_ladspa
="#undef HAVE_LADSPA"
5383 _noafmodules
="ladspa $_noafmodules"
5388 if test "$_win32" = auto
; then
5392 _win32
=no
# x86 arch only
5396 if test "$_win32" != no
; then
5397 if test -z "$_win32libdir" ; then
5398 for I
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs
/usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5399 if test -d "$I" ; then
5407 echocheck
"Win32 codec DLL support"
5408 if test "$_win32" = auto
; then
5410 test -n "$_win32libdir" && _win32
=yes
5412 if test "$_win32" = yes ; then
5413 _def_win32
='#define USE_WIN32DLL 1'
5414 echores
"yes (using $_win32libdir)"
5416 _def_win32
='#undef USE_WIN32DLL'
5417 _nocodecmodules
="win32 $_nocodecmodules"
5422 if test "$_win32" != no
; then
5423 _def_win32_loader
='#undef WIN32_LOADER'
5424 echocheck
"Win32 loader support"
5425 _ld_win32
='loader/libloader.a'
5426 _dep_win32
='loader/libloader.a'
5427 _codecmodules
="win32 $_codecmodules"
5429 x86
&& _ld_win32
="$_ld_win32 -li386"
5432 _def_win32_loader
='#define WIN32_LOADER 1'
5435 _ld_win32libs
="$_ld_win32libs -ladvapi32 -lole32"
5436 echores
"no (using native windows)"
5440 echocheck
"DirectShow"
5443 if test "$_dshow" != no
; then
5445 # check if compiler supports C++ and C++-libs are installed correctly
5446 cat > "$TMPCPP" << EOF
5450 public: int myreturn(void);
5452 int myclass::myreturn(void) { ret = 0; return ret ; }
5453 int main(void) { myclass myobject; return myobject.myreturn(); }
5455 echo "------------------------------------------------" >> "$TMPLOG"
5456 cat "$TMPCPP" >> "$TMPLOG"
5457 if ( $_cc "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
5459 echores
"yes (C++ is ok)"
5464 Your C++ runtime environment is broken.
5466 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5467 Are the C++ libraries correctly installed?
5468 Check for libstdc++ and in (/etc/)ld.so.conf.
5470 If you do not need DirectShow support, you can also use:
5471 ./configure --disable-dshow <your-normal-configure-options>
5472 to disable building the C++ based DirectShow code.
5475 die
"$_cc's C++ is broken"
5483 if test "$_dshow" = yes ; then
5484 _def_dshow
='#define USE_DIRECTSHOW 1'
5485 _ld_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5486 _dep_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5487 _codecmodules
="dshow/dmo $_codecmodules"
5489 _def_dshow
='#undef USE_DIRECTSHOW'
5490 _nocodecmodules
="dshow/dmo $_nocodecmodules"
5494 echocheck
"XAnim DLL"
5495 if test "$_xanim" = auto
; then
5497 if test "$_dl" = yes ; then
5498 if test -z "$_xanimlibdir" ; then
5499 for I
in "$_libdir/codecs" /usr
/local
/lib
/xanim
/mods
/usr
/lib
/xanim
/mods
/usr
/lib
/xanim
$XANIM_MOD_DIR ; do
5500 if test -d "$I" ; then
5506 test "$_xanimlibdir" && _xanim
=yes
5507 if test "$_xanim" = yes ; then
5508 echores
"yes (using $_xanimlibdir)"
5510 echores
"no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5513 echores
"no (dynamic loader support needed)"
5516 echores
"$_xanim (using $_xanimlibdir)"
5518 if test "$_xanim" = yes ; then
5519 _def_xanim
='#define USE_XANIM 1'
5520 _def_xanim_path
="#define XACODEC_PATH \"$_xanimlibdir\""
5521 _codecmodules
="xanim $_codecmodules"
5523 _def_xanim
='#undef USE_XANIM'
5524 _def_xanim_path
='#undef XACODEC_PATH'
5525 _nocodecmodules
="xanim $_nocodecmodules"
5528 echocheck
"RealPlayer DLL"
5529 if test "$_real" = auto
; then
5531 if test "$_dl" = yes ||
test "$_win32" = yes ; then
5532 # if test "$_dl" = yes ; then
5533 if linux || freebsd || netbsd || win32 || darwin
; then
5536 echores
"no (tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin)"
5538 if test "$_real" = yes ; then
5539 if test -z "$_reallibdir" ; then
5540 for I
in "$_libdir/codecs" "$_libdir/real" /usr
/lib
/real \
5541 /usr
/lib
/RealPlayer
{9,8,}/Codecs
/usr
/local
/RealPlayer
{9,8,}/Codecs \
5542 /usr
/local
/lib
/RealPlayer
{9,8,}/Codecs
/opt
/RealPlayer
{9,8,}/{Real
/,}Codecs \
5543 {~
,}/Applications
/RealOne\ Player.app
/Contents
/MacOS
/Library
/Codecs \
5545 if test -d "$I" ; then
5551 test "$_reallibdir" || _real
=no
5552 if test "$_real" = yes ; then
5553 echores
"yes (using $_reallibdir)"
5555 echores
"no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5559 echores
"no (dynamic loader support needed)"
5562 echores
"$_real (using $_reallibdir)"
5564 if test "$_real" = yes ; then
5565 _def_real
='#define USE_REALCODECS 1'
5566 _def_real_path
="#define REALCODEC_PATH \"$_reallibdir\""
5567 _codecmodules
="real $_codecmodules"
5569 _def_real
='#undef USE_REALCODECS'
5570 _def_real_path
="#undef REALCODEC_PATH"
5571 _nocodecmodules
="real $_nocodecmodules"
5575 echocheck
"LIVE.COM Streaming Media libraries"
5576 if test "$_live" = auto
&& test "$_network" = yes ; then
5580 #include <liveMedia.hh>
5581 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
5582 #error Please upgrade to version 2004.07.19 or later of the "LIVE.COM Streaming Media" libraries - available from <www.live.com/liveMedia/>
5588 if test -z "$_livelibdir" ; then
5589 if cc_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
5592 for I
in $_libdir/live
/usr
/lib
/live
/usr
/local
/live
/usr
/local
/lib
/live
; do
5593 if test -d "$I" ; then
5601 if test "$_live_dist" = no
&& test "$_livelibdir" && cc_check
-I$_livelibdir/liveMedia
/include
/ \
5602 -I$_livelibdir/UsageEnvironment
/include
-I$_livelibdir/groupsock
/include
; then
5609 if test "$_live" = yes && test "$_network" = yes ; then
5610 echores
"yes (using $_livelibdir)"
5611 _def_live
='#define STREAMING_LIVE_DOT_COM 1'
5612 _live_libs_def
="# LIVE.COM Streaming Media libraries:
5613 LIVE_LIB_DIR = $_livelibdir
5614 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
5615 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
5616 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
5617 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
5618 LIVE_LIBS += -lstdc++
5619 LIVE_INCLUDES = -I\$(LIVE_LIB_DIR)/liveMedia/include
5620 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/UsageEnvironment/include
5621 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/BasicUsageEnvironment/include
5622 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/groupsock/include"
5623 _ld_live
='$(LIVE_LIBS)'
5624 _inputmodules
="live.com $_inputmodules"
5625 elif test "$_live_dist" = yes && test "$_network" = yes ; then
5626 echores
"yes (using distribution version)"
5628 _def_live
='#define STREAMING_LIVE_DOT_COM 1'
5629 _live_libs_def
="# LIVE.COM Streaming Media libraries:
5630 LIVE_LIB_DIR = $_livelibdir
5631 LIVE_LIBS = -lliveMedia
5632 LIVE_LIBS += -lgroupsock
5633 LIVE_LIBS += -lUsageEnvironment
5634 LIVE_LIBS += -lBasicUsageEnvironment
5635 LIVE_LIBS += -lstdc++
5636 LIVE_INCLUDES = -I/usr/include/liveMedia
5637 LIVE_INCLUDES += -I/usr/include/UsageEnvironment
5638 LIVE_INCLUDES += -I/usr/include/BasicUsageEnvironment
5639 LIVE_INCLUDES += -I/usr/include/groupsock"
5640 _ld_live
='$(LIVE_LIBS)'
5641 _inputmodules
="live.com $_inputmodules"
5644 _def_live
='#undef STREAMING_LIVE_DOT_COM'
5645 _noinputmodules
="live.com $_noinputmodules"
5649 echocheck
"FFmpeg libavcodec (static)"
5650 if test "$_libavcodec" = auto
; then
5651 # Note: static linking is preferred to dynamic linking
5653 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
5654 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
5658 echores
"no (old ffmpeg version, use CVS !)"
5661 echores
"no (see DOCS/HTML/$_doc_lang/codecs.html)"
5664 echores
"$_libavcodec"
5667 echocheck
"FFmpeg libavformat (static)"
5668 if test "$_libavformat" = auto
; then
5669 # Note: static linking is preferred to dynamic linking
5671 if test -d libavformat
&& test -f libavformat
/utils.c
; then
5678 echores
"$_libavformat"
5681 _def_haveffpostprocess
='no'
5682 if test -d libavcodec
&& test -f libavcodec
/libpostproc
/postprocess.h
; then
5683 _def_haveffpostprocess
='yes'
5686 if test "$_libavcodec" != yes ; then
5687 echocheck
"FFmpeg libavcodec (dynamic)"
5688 if test "$_libavcodecso" = auto
; then
5690 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
5692 #define FF_POSTPROCESS 1
5693 #include <ffmpeg/avcodec.h>
5695 avcodec_find_encoder_by_name("");
5699 if cc_check
-lavcodec $_ld_lm ; then
5701 echores
"yes (using libavcodec.so)"
5703 echores
"no (libavcodec.so is broken/obsolete)"
5706 echores
"$_libavcodecso"
5710 _def_libavcodec
='#undef USE_LIBAVCODEC'
5711 _def_libavcodecso
='#undef USE_LIBAVCODEC_SO'
5712 _def_ffpostprocess
='#undef FF_POSTPROCESS'
5713 if test "$_libavcodec" = yes ; then
5714 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5715 _ld_libavcodec
='libavcodec/libavcodec.a'
5716 _dep_libavcodec
='libavcodec/libavcodec.a'
5717 _def_ffpostprocess
='#define FF_POSTPROCESS 1'
5718 _codecmodules
="libavcodec $_codecmodules"
5719 elif test "$_libavcodecso" = yes ; then
5720 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5721 _def_libavcodecso
='#define USE_LIBAVCODEC_SO 1'
5722 _ld_libavcodec
='-lavcodec'
5723 _codecmodules
="libavcodec.so $_codecmodules"
5725 _nocodecmodules
="libavcodec $_nocodecmodules"
5728 _def_libavformat
='#undef USE_LIBAVFORMAT'
5729 _def_libavformat_win32
='#undef CONFIG_WIN32'
5730 if test "$_libavformat" = yes ; then
5731 _def_libavformat
='#define USE_LIBAVFORMAT 1'
5732 _ld_libavformat
='libavformat/libavformat.a'
5733 _dep_libavformat
='libavformat/libavformat.a'
5735 _def_libavformat_win32
='#define CONFIG_WIN32 1'
5739 echocheck
"amr narrowband"
5741 if test "$_amr_nb" = auto
; then
5742 if test -f libavcodec
/amr_float
/sp_dec.c
; then
5743 if test "$_libavcodec" = yes ; then
5747 _echomsg
"libavcodec (static) is required by amr_nb, sorry"
5753 if test "$_amr_nb" = yes ; then
5754 _def_amr_nb
='#define AMR_NB 1'
5756 _def_amr_nb
='#undef AMR_NB'
5758 echores
"$_amr_nb $_echomsg"
5760 echocheck
"amr narrowband, fixed point"
5762 if test "$_amr_nb_fixed" = auto
; then
5763 if test -f libavcodec
/amr
/dtx_dec.c
; then
5764 if test "$_libavcodec" = yes ; then
5765 if test "$_amr_nb" = no
; then
5769 _echomsg
="(disabled by amr_nb)"
5773 _echomsg
"libavcodec (static) is required by amr_nb-fixed, sorry"
5779 if test "$_amr_nb_fixed" = yes ; then
5780 _def_amr_nb
='#define AMR_NB 1'
5781 _def_amr_nb_fixed
='#define AMR_NB_FIXED 1'
5784 _def_amr_nb_fixed
='#undef AMR_NB_FIXED'
5786 echores
"$_amr_nb_fixed $_echomsg"
5788 if test "$_amr_nb" = yes ; then
5789 _codecmodules
="amr_nb $_codecmodules"
5791 _nocodecmodules
="amr_nb $_nocodecmodules"
5794 echocheck
"amr wideband"
5796 if test "$_amr_wb" = auto
; then
5797 if test -f libavcodec
/amrwb_float
/dec_dtx.c
; then
5798 if test "$_libavcodec" = yes ; then
5802 _echomsg
="libavcodec (static) is required by amr_wb, sorry"
5808 if test "$_amr_wb" = yes ; then
5809 _def_amr_wb
='#define AMR_WB 1'
5810 _codecmodules
="amr_wb $_codecmodules"
5812 _def_amr_wb
='#undef AMR_WB'
5813 _nocodecmodules
="amr_wb $_nocodecmodules"
5815 echores
"$_amr_wb $_echomsg"
5817 echocheck
"libdv-0.9.5+"
5818 if test "$_libdv" = auto
; then
5821 #include <libdv/dv.h>
5822 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
5824 cc_check
-ldv $_ld_lm && _libdv
=yes
5826 if test "$_libdv" = yes ; then
5827 _def_libdv
='#define HAVE_LIBDV095 1'
5829 _codecmodules
="libdv $_codecmodules"
5831 _def_libdv
='#undef HAVE_LIBDV095'
5832 _nocodecmodules
="libdv $_nocodecmodules"
5837 if test "$_zr" = auto
; then
5838 #36067's seem to identify themselves as 36057PQC's, so the line
5839 #below should work for 36067's and 36057's.
5840 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
5846 if test "$_zr" = yes ; then
5847 if test "$_libavcodec" = yes ; then
5848 _def_zr
='#define HAVE_ZR 1'
5849 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
5850 _vomodules
="zr zr2 $_vomodules"
5853 echores
"libavcodec (static) is required by zr, sorry"
5854 _novomodules
="zr $_novomodules"
5855 _def_zr
='#undef HAVE_ZR'
5858 _def_zr
='#undef HAVE_ZR'
5859 _novomodules
="zr zr2 $_novomodules"
5864 if test "$_bl" = yes ; then
5865 _def_bl
='#define HAVE_BL 1'
5866 _vosrc
="$_vosrc vo_bl.c"
5867 _vomodules
="bl $_vomodules"
5869 _def_bl
='#undef HAVE_BL'
5870 _novomodules
="bl $_novomodules"
5877 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
5879 _ld_xvid
="$_ld_xvid -lxvidcore $_ld_lm"
5880 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid ; then
5882 _def_xvid3
='#define HAVE_XVID3 1'
5883 _def_xvid4
='#undef HAVE_XVID4'
5884 _codecmodules
="xvid $_codecmodules"
5888 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
5890 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid ; then
5892 _def_xvid3
='#undef HAVE_XVID3'
5893 _def_xvid4
='#define HAVE_XVID4 1'
5894 _codecmodules
="xvid $_codecmodules"
5898 _def_xvid3
='#undef HAVE_XVID3'
5899 _def_xvid4
='#undef HAVE_XVID4'
5900 _nocodecmodules
="xvid $_nocodecmodules"
5906 _def_decore_xvid
='#undef DECORE_XVID'
5907 _def_encore_xvid
='#undef ENCORE_XVID'
5908 if test "$_xvid" = yes ; then
5909 echocheck
"DivX4 compatibility in XviD"
5912 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
5914 cc_check
$_ld_lm "$_ld_xvid" && _xvidcompat
=yes
5915 echores
"$_xvidcompat"
5920 #include <inttypes.h>
5923 #error We do not support old versions of x264. Get the latest from SVN.
5925 int main(void) { x264_encoder_open((void*)0); return 0; }
5927 _ld_x264
="$_ld_x264 -lx264 $_ld_lm"
5928 if test "$_x264" != no
&& cc_check
$_inc_x264 $_ld_x264 ; then
5930 _def_x264
='#define HAVE_X264 1'
5931 _codecmodules
="x264 $_codecmodules"
5935 _def_x264
='#undef HAVE_X264'
5936 _nocodecmodules
="x264 $_nocodecmodules"
5940 echocheck
"DivX4linux/DivX5linux/OpenDivX decore"
5941 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
5944 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
5946 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
5948 _ld_decore
='-ldivxdecore'
5949 _def_decore
='#define NEW_DECORE 1'
5950 _def_divx
='#define USE_DIVX'
5951 _def_divx5
='#undef DECORE_DIVX5'
5952 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5953 _codecmodules
="divx4linux $_codecmodules"
5954 echores
"DivX4linux (with libdivxdecore.so)"
5956 # if test "$_divx4linux" != no ; then
5958 # OdivxPP disabled because of:
5959 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
5962 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
5964 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
5966 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
5967 _ld_decore
='-ldivxdecore'
5968 _def_decore
='#define NEW_DECORE 1'
5969 _def_divx
='#define USE_DIVX'
5970 _def_divx5
='#define DECORE_DIVX5 1'
5971 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
5972 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5973 _codecmodules
="divx5linux $_codecmodules"
5974 _nocodecmodules
="divx4linux $_nocodecmodules"
5975 echores
"DivX5linux (with libdivxdecore.so)"
5976 elif test "$_opendivx" != no
; then
5978 _ld_decore
='opendivx/libdecore.a'
5979 _def_decore
='#undef NEW_DECORE'
5980 _def_divx
='#define USE_DIVX'
5981 _def_divx5
='#undef DECORE_DIVX5'
5982 _def_odivx_postprocess
='#define HAVE_ODIVX_POSTPROCESS 1'
5983 _codecmodules
="opendivx $_codecmodules"
5984 _nocodecmodules
="divx5linux $_nocodecmodules"
5986 elif test "$_xvidcompat" = yes ; then
5989 _def_decore
='#define NEW_DECORE 1'
5990 _def_divx
='#define USE_DIVX 1'
5991 _def_divx5
='#undef DECORE_DIVX5'
5992 _def_decore_xvid
='#define DECORE_XVID 1'
5993 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5994 _nocodecmodules
="opendivx divx5linux divx4linux $_nocodecmodules"
5995 echores
"XviD compat."
5999 _def_decore
='#undef NEW_DECORE'
6000 _def_divx
='#undef USE_DIVX'
6001 _def_divx5
='#undef DECORE_DIVX5'
6002 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6003 _nocodecmodules
="opendivx $_nocodecmodules"
6009 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
6010 if test "$_mencoder" != no
; then
6012 echocheck
"libmp3lame (for mencoder)"
6015 #include <lame/lame.h>
6016 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; }
6018 # Note: libmp3lame usually depends on vorbis
6019 cc_check
-lmp3lame $_ld_vorbis $_ld_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame
=yes
6020 if test "$_mp3lame" = yes ; then
6021 _def_mp3lame
="#define HAVE_MP3LAME `$TMPO`"
6022 _def_cfg_mp3lame
="#define CONFIG_MP3LAME `$TMPO`"
6023 _ld_mp3lame
="-lmp3lame $_ld_vorbis"
6025 _def_mp3lame
='#undef HAVE_MP3LAME'
6026 _def_cfg_mp3lame
='#undef CONFIG_MP3LAME'
6031 echocheck
"DivX4linux encore (for mencoder)"
6033 #include <encore2.h>
6034 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
6036 if test "$_divx4linux" != no
&& cc_check
-ldivxencore $_ld_lm ; then
6037 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6038 _ld_encore
='-ldivxencore'
6039 echores
"DivX4linux (with libdivxencore.so)"
6040 elif test "$_xvidcompat" = yes ; then
6041 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6043 _def_encore_xvid
='#define ENCORE_XVID 1'
6044 echores
"XviD compat."
6046 _def_encore
='#undef HAVE_DIVX4ENCORE'
6052 echocheck
"mencoder"
6053 _mencoder_flag
='#undef HAVE_MENCODER'
6054 if test "$_mencoder" = yes ; then
6055 _mencoder_flag
='#define HAVE_MENCODER'
6057 echores
"$_mencoder"
6059 echocheck
"fastmemcpy"
6060 # fastmemcpy check is done earlier with tests of CPU & binutils features
6061 if test "$_fastmemcpy" = yes ; then
6062 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6064 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6066 echores
"$_fastmemcpy"
6068 echocheck
"UniquE RAR File Library"
6069 if test "$_unrarlib" = yes ; then
6070 _def_unrarlib
='#define USE_UNRARLIB 1'
6072 _def_unrarlib
='#undef USE_UNRARLIB'
6074 echores
"$_unrarlib"
6076 echocheck
"TV interface"
6077 if test "$_tv" = yes ; then
6078 _def_tv
='#define USE_TV 1'
6079 _inputmodules
="tv $_inputmodules"
6081 _noinputmodules
="tv $_noinputmodules"
6082 _def_tv
='#undef USE_TV'
6086 echocheck
"EDL support"
6087 if test "$_edl" = yes ; then
6088 _def_edl
='#define USE_EDL'
6089 _inputmodules
="edl $_inputmodules"
6091 _noinputmodules
="edl $_noinputmodules"
6092 _def_edl
='#undef USE_EDL'
6096 echocheck
"*BSD BrookTree 848 TV interface"
6097 if test "$_tv_bsdbt848" = auto
; then
6099 if test "$_tv" = yes ; then
6101 #include <sys/types.h>
6102 #if defined(__NetBSD__)
6103 #include <dev/ic/bt8xx.h>
6105 #include <machine/ioctl_bt848.h>
6107 int main(void) { return 0; }
6109 cc_check
&& _tv_bsdbt848
=yes
6112 if test "$_tv_bsdbt848" = yes ; then
6113 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6114 _inputmodules
="tv-bsdbt848 $_inputmodules"
6116 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6117 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6119 echores
"$_tv_bsdbt848"
6121 echocheck
"Video 4 Linux TV interface"
6122 if test "$_tv_v4l" = auto
; then
6124 if test "$_tv" = yes && linux
; then
6125 for I
in /dev
/video
/dev
/video?
; do
6126 if test -c $I ; then
6129 #include <linux/videodev.h>
6130 int main(void) { return 0; }
6132 cc_check
&& _tv_v4l
=yes
6138 if test "$_tv_v4l" = yes ; then
6139 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6140 _inputmodules
="tv-v4l $_inputmodules"
6142 _noinputmodules
="tv-v4l $_noinputmodules"
6143 _def_tv_v4l
='#undef HAVE_TV_V4L'
6148 echocheck
"Video 4 Linux 2 TV interface"
6149 if test "$_tv_v4l2" = auto
; then
6151 if test "$_tv" = yes && linux
; then
6152 for I
in /dev
/video
/dev
/video?
; do
6153 if test -c $I ; then
6160 if test "$_tv_v4l2" = yes ; then
6161 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6162 _inputmodules
="tv-v4l2 $_inputmodules"
6164 _noinputmodules
="tv-v4l2 $_noinputmodules"
6165 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6170 echocheck
"audio select()"
6171 if test "$_select" = no
; then
6172 _def_select
='#undef HAVE_AUDIO_SELECT'
6173 elif test "$_select" = yes ; then
6174 _def_select
='#define HAVE_AUDIO_SELECT 1'
6180 # FIXME network check
6181 if test "$_network" != no
; then
6182 _def_network
='#define MPLAYER_NETWORK 1'
6183 _ld_network
="$_ld_sock"
6184 _inputmodules
="network $_inputmodules"
6186 _noinputmodules
="network $_noinputmodules"
6187 _def_network
='#undef MPLAYER_NETWORK'
6193 if (not beos
) && (test "$_ftp" != no
) ; then
6194 _def_ftp
='#define HAVE_FTP 1'
6195 _inputmodules
="ftp $_inputmodules"
6197 _noinputmodules
="ftp $_noinputmodules"
6198 _def_ftp
='#undef HAVE_FTP'
6202 echocheck
"vstream client"
6203 if test "$_vstream" = auto
; then
6206 #include <vstream-client.h>
6207 void vstream_error(const char *format, ... ) {}
6208 int main(void) { vstream_start(); return 0; }
6210 cc_check
-lvstream-client && _vstream
=yes
6212 if test "$_vstream" = yes ; then
6213 _def_vstream
='#define HAVE_VSTREAM 1'
6214 _inputmodules
="vstream $_inputmodules"
6215 _ld_vstream
='-lvstream-client'
6217 _noinputmodules
="vstream $_noinputmodules"
6218 _def_vstream
='#undef HAVE_VSTREAM'
6223 echocheck
"byte order"
6224 if test "$_big_endian" = auto
; then
6226 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6227 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6229 char* s = (char*)ascii_name;
6234 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6240 echo -n "failed to autodetect byte order, defaulting to "
6243 if test "$_big_endian" = yes ; then
6244 _byte_order
='big-endian'
6245 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6247 _byte_order
='little-endian'
6248 _def_words_endian
='#undef WORDS_BIGENDIAN'
6250 echores
"$_byte_order"
6252 echocheck
"shared postprocess lib"
6253 echores
"$_shared_pp"
6255 echocheck
"OSD menu"
6256 if test "$_menu" = yes ; then
6257 _def_menu
='#define HAVE_MENU 1'
6259 _def_menu
='#undef HAVE_MENU'
6263 # Check to see if they want QTX codecs enabled
6264 echocheck
"QTX codecs"
6265 if test "$_qtx" = auto
; then
6268 if test "$_qtx" = yes ; then
6269 _def_qtx
='#define USE_QTX_CODECS 1'
6270 _codecmodules
="qtx $_codecmodules"
6272 _def_qtx
='#undef USE_QTX_CODECS'
6273 _nocodecmodules
="qtx $_nocodecmodules"
6278 echocheck
"Subtitles sorting"
6279 if test "$_sortsub" = yes ; then
6280 _def_sortsub
='#define USE_SORTSUB 1'
6282 _def_sortsub
='#undef USE_SORTSUB'
6287 echocheck
"XMMS inputplugin support"
6288 if test "$_xmms" = yes ; then
6290 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6291 if test -z "$_xmmsplugindir" ; then
6292 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6294 if test -z "$_xmmslibdir" ; then
6295 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6298 if test -z "$_xmmsplugindir" ; then
6299 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6301 if test -z "$_xmmslibdir" ; then
6302 _xmmslibdir
=/usr
/lib
6306 _def_xmms
='#define HAVE_XMMS 1'
6308 _xmms_lib
="${_xmmslibdir}/libxmms.dylib"
6310 _xmms_lib
="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6313 _def_xmms
='#undef HAVE_XMMS'
6318 if test "$_inet6" = auto
; then
6320 #include <sys/types.h>
6321 #include <sys/socket.h>
6322 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6329 if test "$_inet6" = yes ; then
6330 _def_inet6
='#define HAVE_AF_INET6 1'
6332 _def_inet6
='#undef HAVE_AF_INET6'
6337 echocheck
"gethostbyname2"
6338 if test "$_gethostbyname2" = auto
; then
6340 #include <sys/types.h>
6341 #include <sys/socket.h>
6343 int main(void) { gethostbyname2("", AF_INET); }
6351 if test "$_gethostbyname2" = yes ; then
6352 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6354 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6356 echores
"$_gethostbyname2"
6358 # --------------- GUI specific tests begin -------------------
6361 if test "$_gui" = yes ; then
6363 # Required libraries
6364 test "$_png" != yes && die
"PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6365 test "$_x11" != yes && die
"X11 support required for GUI compilation"
6367 echocheck
"XShape extension"
6369 if test "$_x11" = yes ; then
6371 #include <X11/Xlib.h>
6372 #include <X11/Xproto.h>
6373 #include <X11/Xutil.h>
6374 #include <X11/extensions/shape.h>
6377 char *name = ":0.0";
6380 int eventbase, errorbase;
6381 if (getenv("DISPLAY"))
6382 name=getenv("DISPLAY");
6383 wsDisplay=XOpenDisplay(name);
6384 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6386 XCloseDisplay(wsDisplay);
6390 cc_check
$_inc_x11 $_ld_x11 && _xshape
=yes
6392 if test "$_xshape" = yes ; then
6393 _def_xshape
='#define HAVE_XSHAPE 1'
6395 die
"The GUI requires the X11 extension XShape (which was not found)."
6401 echocheck
"GTK version"
6402 if test -z "$_gtkconfig" ; then
6403 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
6404 _gtkconfig
="gtk-config"
6405 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
6406 _gtkconfig
="gtk12-config"
6408 die
"The GUI requires GTK devel packages (which were not found)."
6411 _gtk
=`$_gtkconfig --version 2>&1`
6412 _inc_gtk
=`$_gtkconfig --cflags 2>&1`
6413 _ld_gtk
=`$_gtkconfig --libs 2>&1`
6414 echores
"$_gtk (using $_gtkconfig)"
6417 echocheck
"glib version"
6418 if test -z "$_glibconfig" ; then
6419 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
6420 _glibconfig
="glib-config"
6421 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
6422 _glibconfig
="glib12-config"
6424 die
"The GUI requires GLib devel packages (which were not found)"
6427 _glib
=`$_glibconfig --version 2>&1`
6428 _inc_glib
=`$_glibconfig --cflags 2>&1`
6429 _ld_glib
=`$_glibconfig --libs 2>&1`
6430 echores
"$_glib (using $_glibconfig)"
6432 _def_gui
='#define HAVE_NEW_GUI 1'
6433 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6435 echo "Creating Gui/config.mak"
6436 cat > Gui
/config.mak
<< EOF
6437 # -------- Generated by configure -----------
6441 GLIBINC = $_inc_glib
6442 GLIBLIBS = $_ld_glib
6447 _def_gui
='#undef HAVE_NEW_GUI'
6449 # --------------- GUI specific tests end -------------------
6453 #############################################################################
6455 # Checking for CFLAGS
6457 if test "$_profile" != "" ||
test "$_debug" != "" ; then
6458 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6459 if test "$_cc_major" -ge "3" ; then
6460 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6463 elif test -z "$CFLAGS" ; then
6464 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6465 # always compile with '-g' if .developer:
6466 if test -f ".developer" ; then
6468 if (test "$_crash_debug" = auto
) && (not mingw32
) ; then
6476 MPlayer compilation will use the CFLAGS set by you, but:
6478 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
6480 It is strongly recommended to let MPlayer choose the correct CFLAGS!
6481 To do so, execute 'CFLAGS= ./configure <options>'
6486 echocheck
"automatic gdb attach"
6487 if test "$_crash_debug" = yes ; then
6488 _def_crash_debug
='#define CRASH_DEBUG 1'
6490 _def_crash_debug
='#undef CRASH_DEBUG'
6493 echores
"$_crash_debug"
6496 CFLAGS
="$CFLAGS -DSYS_DARWIN"
6497 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
6498 CFLAGS
="$CFLAGS -no-cpp-precomp"
6501 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
6502 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
6505 # use flag for HPUX missing setenv()
6506 CFLAGS
="$CFLAGS -DHPUX"
6510 CFLAGS
="$CFLAGS -D_REENTRANT"
6512 # FIXME bsd needs this so maybe other OS'es
6513 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
6515 # 64 bit file offsets?
6516 if test "$_largefiles" = yes || freebsd
; then
6517 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6518 if test "$_dvdread" = yes ; then
6519 # dvdread support requires this (for off64_t)
6520 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
6524 echocheck
"compiler support for -fno-PIC"
6527 int main(void) { return 0; }
6529 if cc_check
-fno-PIC ; then
6530 CFLAGS
="-fno-PIC $CFLAGS"
6536 echores
"only used for x86"
6539 echocheck
"ftello()"
6540 # if we don't have ftello use the osdep/ compatibility module
6543 #include <sys/types.h>
6544 int main (void) { ftello(stdin); return 0; }
6547 cc_check
&& _ftello
=yes
6548 if test "$_ftello" = yes ; then
6549 _def_ftello
='#define HAVE_FTELLO 1'
6551 _def_ftello
='#undef HAVE_FTELLO'
6555 # Determine OS dependent libs
6557 _def_confwin32
='#define WIN32'
6558 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
6559 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
6560 CFLAGS
="$CFLAGS -D__CYGWIN__"
6564 _confwin32
='TARGET_WIN32 = yes'
6566 _confwin32
='TARGET_WIN32 = no'
6569 # Dynamic linking flags
6570 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6572 bsd
&& _ld_dl_dynamic
='-rdynamic'
6573 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
; then
6574 _ld_dl_dynamic
='-rdynamic'
6577 _ld_arch
="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6578 bsdos
&& _ld_arch
="$_ld_arch -ldvd"
6580 x86
&& _ld_arch
="$_ld_arch -li386"
6583 _def_debug
='#undef MP_DEBUG'
6584 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
6586 _def_linux
='#undef TARGET_LINUX'
6587 linux
&& _def_linux
='#define TARGET_LINUX 1'
6589 # TODO cleanup the VIDIX stuff here
6590 _def_vidix
='#define CONFIG_VIDIX 1'
6591 test "$_vidix" = no
&& _def_vidix
='#undef CONFIG_VIDIX'
6592 if test "$_vidix" = yes; then
6593 _vosrc
="$_vosrc vo_cvidix.c"
6594 _vomodules
="cvidix $_vomodules"
6596 _novomodules
="cvidix $_novomodules"
6598 if test "$_vidix" = yes && (win32
); then
6599 _vosrc
="$_vosrc vo_winvidix.c"
6600 _vomodules
="winvidix $_vomodules"
6601 _ld_win32libs
="-lgdi32 $_ld_win32libs"
6603 _novomodules
="winvidix $_novomodules"
6605 if test "$_vidix" = yes && test "$_x11" = yes; then
6606 _vosrc
="$_vosrc vo_xvidix.c"
6607 _vomodules
="xvidix $_vomodules"
6609 _novomodules
="xvidix $_novomodules"
6611 echo Checking
for VIDIX ...
"$_vidix"
6613 _def_joystick
='#undef HAVE_JOYSTICK'
6614 if test "$_joystick" = yes ; then
6616 # TODO add some check
6617 _def_joystick
='#define HAVE_JOYSTICK 1'
6619 _joystick
="no (unsupported under $system_name)"
6622 echo Checking
for joystick ...
"$_joystick"
6625 if test "$_lirc" = auto
; then
6627 if test -c /dev
/lirc
-o -c /dev
/lirc
/0 ; then
6629 #include <lirc/lirc_client.h>
6630 int main(void) { return 0; }
6632 cc_check
-llirc_client && _lirc
=yes
6635 if test "$_lirc" = yes ; then
6636 _def_lirc
='#define HAVE_LIRC 1'
6637 _ld_lirc
='-llirc_client'
6639 _def_lirc
='#undef HAVE_LIRC'
6644 if test "$_lircc" = auto
; then
6647 #include <lirc/lircc.h>
6648 int main(void) { return 0; }
6650 cc_check
-llircc && _lircc
=yes
6652 if test "$_lircc" = yes ; then
6653 _def_lircc
='#define HAVE_LIRCC 1'
6656 _def_lircc
='#undef HAVE_LIRCC'
6660 #############################################################################
6661 echo "Creating config.mak"
6662 cat > config.mak
<< EOF
6663 # -------- Generated by configure -----------
6666 MAN_LANG = $MAN_LANG
6667 TARGET_OS = $system_name
6669 prefix = \$(DESTDIR)$_prefix
6670 BINDIR = \$(DESTDIR)$_bindir
6671 DATADIR = \$(DESTDIR)$_datadir
6672 MANDIR = \$(DESTDIR)$_mandir
6673 CONFDIR = \$(DESTDIR)$_confdir
6674 LIBDIR = \$(DESTDIR)$_libdir
6681 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
6682 EXTRA_INC = $_inc_extra $_inc_gtk
6683 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
6684 STRIPBINARIES = $_stripbinaries
6686 HELP_FILE = $_mp_help
6689 PRG_MENCODER = $_prg_mencoder
6693 MPLAYER_NETWORK = $_network
6694 STREAMING_LIVE_DOT_COM = $_live
6695 MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
6698 SHARED_PP = $_shared_pp
6701 CONFIG_MP3LAME = $_mp3lame
6703 I18NLIBS = $_i18n_libs
6704 MATROSKA = $_matroska_internal
6706 OPENDIVX = $_opendivx
6710 LIBMPEG2 = $_libmpeg2
6711 TREMOR = $_tremor_internal
6712 TREMOR_FLAGS = $_tremor_flags
6714 UNRARLIB = $_unrarlib
6715 HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
6720 EXTRA_LIB = $_ld_extra
6721 Z_LIB = $_ld_static $_ld_zlib
6723 WIN32_LIB = $_ld_win32libs
6724 STATIC_LIB = $_ld_static
6725 ENCA_LIB = $_ld_enca
6726 HAVE_PTHREADS = $_pthreads
6732 HAVE_XVMC_ACCEL = $_xvmc
6742 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
6744 MLIB_LIB = $_ld_mlib
6745 MLIB_INC = $_inc_mlib
6746 DXR2_INC = $_inc_dxr2
6752 SVGA_LIB = $_ld_svga
6754 CACA_INC = $_inc_caca
6755 CACA_LIB = $_ld_caca
6758 ALSA_LIB = $_ld_alsa
6760 ARTS_LIB = $_ld_arts
6761 ARTS_INC = $_inc_arts
6764 POLYP_LIB = $_ld_polyp
6765 POLYP_INC = $_inc_polyp
6766 JACK_LIB = $_ld_jack
6767 JACK_INC = $_inc_jack
6768 SGIAUDIO_LIB = $_ld_sgiaudio
6770 # input/demuxer/codecs
6771 TERMCAP_LIB = $_ld_termcap
6772 LIRC_LIB = $_ld_lirc
6773 LIRCC_LIB = $_ld_lircc
6774 DVDREAD_LIB = $_ld_dvdread
6779 W32_DEP = $_dep_win32
6780 W32_LIB = $_ld_win32
6781 DS_DEP = $_dep_dshow
6783 AV_DEP = $_dep_libavcodec $_dep_libavformat
6784 AV_LIB = $_ld_libavcodec $_ld_libavformat
6785 CONFIG_LIBAVFORMAT = $_libavformat
6788 FAME_LIB = $_ld_fame
6789 MP1E_DEP = $_dep_mp1e
6790 MP1E_LIB = $_ld_mp1e
6791 ARCH_LIB = $_ld_arch $_ld_iconv
6793 XVID_INC = $_inc_xvid
6794 XVID_LIB = $_ld_xvid
6796 X264_INC = $_inc_x264
6797 X264_LIB = $_ld_x264
6798 CONFIG_DTS = $_libdts
6799 DTS_INC = $_inc_libdts
6800 DTS_LIB = $_ld_libdts
6801 DECORE_LIB = $_ld_decore $_ld_mp3lame
6802 MENCODER = $_mencoder
6803 ENCORE_LIB = $_ld_encore $_ld_mp3lame
6804 DIRECTFB_INC = $_inc_directfb
6805 DIRECTFB_LIB = $_ld_directfb
6806 CDPARANOIA_INC = $_inc_cdparanoia
6807 CDPARANOIA_LIB = $_ld_cdparanoia
6808 FREETYPE_INC = $_inc_freetype
6809 FREETYPE_LIB = $_ld_freetype
6810 FONTCONFIG_INC = $_inc_fontconfig
6811 FONTCONFIG_LIB = $_ld_fontconfig
6812 FRIBIDI_INC = $_inc_fribidi
6813 FRIBIDI_LIB = $_ld_fribidi
6814 LIBLZO_LIB= $_ld_liblzo
6816 VORBIS_LIB = $_ld_vorbis $_ld_libdv
6817 THEORA_LIB = $_ld_theora
6818 FAAD_LIB = $_ld_faad
6819 INTERNAL_FAAD = $_faad_internal
6820 SMBSUPPORT_LIB = $_ld_smb
6821 XMMS_PLUGINS = $_xmms
6822 XMMS_LIB = $_xmms_lib
6824 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
6825 MACOSX_FRAMEWORKS = $_macosx_frameworks
6827 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
6828 TOOLAME_LIB=$_toolame_lib
6830 AMR_NB_FIXED=$_amr_nb_fixed
6833 # --- Some stuff for autoconfigure ----
6838 TARGET_MMX2 = $_mmx2
6839 TARGET_3DNOW = $_3dnow
6840 TARGET_3DNOWEX = $_3dnowex
6842 TARGET_ALTIVEC = $_altivec
6846 GTKLIB = $_ld_static $_ld_gtk
6847 GLIBLIB = $_ld_static $_ld_glib
6848 GTK_LIBS = $_ld_static $_ld_gui
6854 #############################################################################
6855 echo "Creating config.h"
6856 cat > config.h
<< EOF
6857 /* -------- This file has been automatically generated by configure ---------
6858 Note: Any changes in it will be lost when you run configure again. */
6860 /* Protect against multiple inclusion */
6861 #ifndef MPLAYER_CONFIG_H
6862 #define MPLAYER_CONFIG_H 1
6864 /* use GNU internationalization */
6867 /* Runtime CPU detection */
6868 $_def_runtime_cpudetection
6870 /* Dynamic a/v plugins */
6871 $_def_dynamic_plugins
6873 /* "restrict" keyword */
6874 $_def_restrict_keyword
6876 /* __builtin_expect branch prediction hint */
6877 $_def_builtin_expect
6879 /* attribute(used) as needed by some compilers */
6880 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
6881 # define attribute_used __attribute__((used))
6883 # define attribute_used
6886 #define PREFIX "$_prefix"
6891 /* enable/disable SIGHANDLER */
6894 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
6897 /* Toggles debugging informations */
6900 /* Indicates that Ogle's libdvdread is available for DVD playback */
6903 /* Indicates that dvdread is from libmpdvdkit */
6906 /* Additional options for libmpdvdkit*/
6920 /* Common data directory (for fonts, etc) */
6921 #define MPLAYER_DATADIR "$_datadir"
6922 #define MPLAYER_CONFDIR "$_confdir"
6923 #define MPLAYER_LIBDIR "$_libdir"
6925 /* Define this to compile stream-caching support, it can be enabled via
6926 -cache <kilobytes> */
6927 #define USE_STREAM_CACHE 1
6929 /* Define to include support for XviD/Divx4Linux/OpenDivx */
6932 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
6933 /* You have to change DECORE_LIBS in config.mak, too! */
6936 /* Define if you are using DivX5Linux Decore library */
6939 /* Define if you are using XviD library */
6945 /* Define if you are using the X.264 library */
6948 /* Define to include support for libdv-0.9.5 */
6951 /* If build mencoder */
6954 /* Indicates if XviD/Divx4linux encore is available
6955 Note: for mencoder */
6958 /* Indicates if libmp3lame is available
6959 Note: for mencoder */
6963 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
6966 /* Define this to enable avg. byte/sec-based AVI sync method by default:
6967 (use -bps or -nobps commandline option for run-time method selection)
6968 -bps gives better sync for vbr mp3 audio, it is now default */
6969 #define AVI_SYNC_BPS 1
6971 /* Undefine this if you do not want to select mono audio (left or right)
6972 with a stereo MPEG layer 2/3 audio stream. The command line option
6973 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
6974 right-only), with 0 being the default.
6976 #define USE_FAKE_MONO 1
6978 /* Undefine this if your sound card driver has no working select().
6979 If you have kernel Oops, player hangups, or just no audio, you should
6980 try to recompile MPlayer with this option disabled! */
6983 /* define this to use iconv(3) function to codepage conversions */
6986 /* define this to use nl_langinfo function */
6989 /* define this to use RTC (/dev/rtc) for video timers */
6992 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
6993 #define MAX_OUTBURST 65536
6995 /* set up audio OUTBURST. Do not change this! */
6996 #define OUTBURST 512
6998 /* Define this if your system has the header file for the OSS sound interface */
7001 /* Define this if your system has the header file for the OSS sound interface
7002 * in /usr/include */
7005 /* Define this if your system has the sysinfo header */
7008 /* Define this if your system has ftello() */
7012 /* Need these for FILE and off_t an config.h is usually before other includes*/
7014 #include <sys/types.h>
7015 off_t ftello(FILE *);
7018 /* Define this if your system has the "malloc.h" header file */
7021 /* memalign is mapped to malloc if unsupported */
7023 #ifndef HAVE_MEMALIGN
7024 # define memalign(a,b) malloc(b)
7025 #define MEMALIGN_HACK 1
7028 /* Define this if your system has the "alloca.h" header file */
7031 /* Define this if your system has the "sys/mman.h" header file */
7033 $_def_mman_has_map_failed
7035 /* Define this if you have the elf dynamic linker -ldl library */
7038 /* Define this if you have the kstat kernel statistics library */
7041 /* Define this if you have zlib */
7044 #define CONFIG_ZLIB 1
7047 /* Define this if you have shm support */
7050 /* Define this if your system has scandir & alphasort */
7053 /* Define this if your system has strsep */
7056 /* Define this if your system has strlcpy */
7058 #ifndef HAVE_STRLCPY
7059 unsigned int strlcpy (char *dest, char *src, unsigned int size);
7062 /* Define this if your system has strlcat */
7064 #ifndef HAVE_STRLCAT
7065 unsigned int strlcat (char *dest, char *src, unsigned int size);
7068 /* Define this if your system has fseeko */
7071 /* Need these for FILE and off_t an config.h is usually before other includes*/
7073 #include <sys/types.h>
7074 int fseeko(FILE *, off_t, int);
7079 /* Define this if your system has vsscanf */
7082 /* Define this if your system has swab */
7085 /* Define this if your system has no posix select */
7086 $_def_no_posix_select
7088 /* Define this if your system has gettimeofday */
7091 /* Define this if your system has glob */
7094 /* Define this if your system has pthreads */
7097 /* Define this if you enabled thread support for libavcodec */
7100 /* LIRC (remote control, see www.lirc.org) support: */
7104 * LIRCCD (LIRC client daemon)
7105 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7109 /* DVD navigation support using libdvdnav */
7111 $_def_dvdnav_version
7113 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7114 #define MPEG12_POSTPROC 1
7116 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7119 /* Define to include support for OpenDivx postprocessing */
7120 $_def_odivx_postprocess
7122 /* Win32 DLL support */
7124 #define WIN32_PATH "$_win32libdir"
7126 /* DirectShow support */
7129 /* Mac OS X specific features */
7131 $_def_macosx_finder_support
7133 /* Build our Win32-loader */
7136 /* ffmpeg's libavcodec support (requires libavcodec source) */
7140 /* ffmpeg's libavformat support (requires libavformat source) */
7142 $_def_libavformat_win32
7145 #define CONFIG_RISKY 1
7147 /* Use libavcodec's decoders */
7148 #define CONFIG_DECODERS 1
7149 /* Use libavcodec's encoders */
7150 #define CONFIG_ENCODERS 1
7152 #define CONFIG_MPEGAUDIO_HP 1
7154 /* Use amr codecs from libavcodec (requires amr sources) */
7159 /* Use codec libs included in mplayer CVS / source dist: */
7165 /* Use libfame encoder filter */
7168 /* XAnim DLL support */
7170 /* Default search path */
7173 /* RealPlayer DLL support */
7175 /* Default search path */
7178 /* LIVE.COM Streaming Media library support */
7181 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
7184 /* Use unrarlib for Vobsubs */
7187 /* gui support, please do not edit this option */
7190 /* Audio output drivers */
7192 $_def_ossaudio_devdsp
7193 $_def_ossaudio_devmixer
7202 $_def_sys_asoundlib_h
7203 $_def_alsa_asoundlib_h
7209 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7211 #undef FAST_OSD_TABLE
7213 /* Enable TV Interface support */
7216 /* Enable EDL support */
7219 /* Enable Video 4 Linux TV interface support */
7222 /* Enable Video 4 Linux 2 TV interface support */
7225 /* Enable *BSD BrookTree TV interface support */
7228 /* Define if your processor stores words with the most significant
7229 byte first (like Motorola and SPARC, unlike Intel and VAX). */
7234 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
7235 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
7241 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
7246 /* only gcc3 can compile mvi instructions */
7247 $_def_gcc_mvi_support
7249 /* Define this for Cygwin build for win32 */
7252 /* Define this to any prefered value from 386 up to infinity with step 100 */
7253 #define __CPU__ $iproc
7262 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
7263 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7265 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7266 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7267 #elif defined(WIN32)
7268 #define DEFAULT_CDROM_DEVICE "D:"
7269 #define DEFAULT_DVD_DEVICE "D:"
7270 #elif defined(SYS_DARWIN)
7271 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
7272 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
7273 #elif defined(__OpenBSD__)
7274 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
7275 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7277 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7278 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7282 /*----------------------------------------------------------------------------
7284 ** NOTE: Instead of modifying these definitions here, use the
7285 ** --enable/--disable options of the ./configure script!
7286 ** See ./configure --help for details.
7288 *---------------------------------------------------------------------------*/
7290 /* C99 lrintf function available */
7293 /* yes, we have inttypes.h */
7294 #define HAVE_INTTYPES_H 1
7296 /* int_fastXY_t emulation */
7299 /* nanosleep support */
7305 /* termcap flag for getch2.c */
7308 /* termios flag for getch2.c */
7313 /* enable PNG support */
7316 /* enable JPEG support */
7319 /* enable PNM support */
7322 /* enable md5sum support */
7325 /* enable GIF support */
7330 /* enable FreeType support */
7333 /* enable Fontconfig support */
7336 /* enable FriBiDi usage */
7339 /* enable ENCA usage */
7342 /* liblzo support */
7345 /* libmad support */
7348 /* enable OggVorbis support */
7351 /* enable Tremor as vorbis decoder */
7354 /* enable OggTheora support */
7357 /* enable Matroska support */
7360 /* enable FAAD (AAC) support */
7364 /* enable LADSPA plugin support */
7367 /* enable network */
7370 /* enable ftp support */
7373 /* enable vstream support */
7376 /* enable winsock2 instead of Unix functions*/
7379 /* define this to use inet_aton() instead of inet_pton() */
7382 /* enables / disables cdparanoia support */
7385 /* enables / disables VIDIX usage */
7388 /* enables / disables new input joystick support */
7391 /* enables / disables QTX codecs */
7394 /* enables / disables osd menu */
7397 /* enables / disables subtitles sorting */
7400 /* XMMS input plugin support */
7402 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7404 /* enables inet6 support */
7407 /* do we have gethostbyname2? */
7408 $_def_gethostbyname2
7410 /* Extension defines */
7411 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
7412 $_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
7413 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
7414 $_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
7415 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
7416 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
7417 $_def_altivec // only define if you have Altivec (G4)
7419 $_def_altivec_h // enables usage of altivec.h
7422 $_def_mlib // Sun mediaLib, available only on solaris
7423 $_def_vis // only define if you have VIS ( ultrasparc )
7425 /* libmpeg2 uses a different feature test macro for mediaLib */
7427 #define LIBMPEG2_MLIB 1
7431 #define SCREEN_SIZE_X 1
7432 #define SCREEN_SIZE_Y 1
7444 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
7452 $_def_directfb_version
7474 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
7475 #define X11_FULLSCREEN 1
7478 #endif /* MPLAYER_CONFIG_H */
7481 #############################################################################
7483 echo "Creating libvo/config.mak"
7484 _voobj
=`echo $_vosrc | sed -e 's/\.c/\.o/g'`
7485 cat > libvo
/config.mak
<< EOF
7486 include ../config.mak
7487 OPTIONAL_SRCS = $_vosrc
7488 OPTIONAL_OBJS = $_voobj
7491 #############################################################################
7493 echo "Creating libao2/config.mak"
7494 _aoobj
=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
7495 cat > libao
2/config.mak
<< EOF
7496 include ../config.mak
7497 OPTIONAL_SRCS = $_aosrc
7498 OPTIONAL_OBJS = $_aoobj
7501 #############################################################################
7503 echo "Creating libaf/config.mak"
7504 _afobj
=`echo $_afsrc | sed -e 's/\.c/\.o/g'`
7505 cat > libaf
/config.mak
<< EOF
7506 include ../config.mak
7507 OPTIONAL_SRCS = $_afsrc
7508 OPTIONAL_OBJS = $_afobj
7511 #############################################################################
7515 Config files successfully generated by ./configure !
7517 Install prefix: $_prefix
7518 Data directory: $_datadir
7519 Config direct.: $_confdir
7521 Byte order: $_byte_order
7522 Optimizing for: $_optimizing
7525 Messages/GUI: $_language
7528 echo -n " Manual pages: $MAN_LANG"
7529 test "$LANGUAGES" = en
&& echo -n " (no localization selected, use --language=all)"
7534 Enabled optional drivers:
7535 Input: $_inputmodules
7536 Codecs: $_codecmodules
7537 Audio output: $_aomodules
7538 Video output: $_vomodules
7539 Audio filters: $_afmodules
7540 Disabled optional drivers:
7541 Input: $_noinputmodules
7542 Codecs: $_nocodecmodules
7543 Audio output: $_noaomodules
7544 Video output: $_novomodules
7545 Audio filters: $_noafmodules
7547 'config.h' and 'config.mak' contain your configuration options.
7548 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7549 compile *** DO NOT REPORT BUGS if you tweak these files ***
7551 'make' will now compile MPlayer and 'make install' will install it.
7552 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7557 if test "$_mtrr" = yes ; then
7558 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
7562 if test "$_sdl" = "outdated" ; then
7564 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
7565 support has therefore been disabled.
7567 Please upgrade to a more recent version (version 1.1.8 and above are known to
7568 work). You may get this library from: http://www.libsdl.org
7570 You need to rerun ./configure and recompile after updating SDL. If you are
7571 only interested in the libSDL audio drivers, then an older version might work.
7573 Use --enable-sdl to force usage of libSDL.
7579 if test "$_win32" = no
; then
7580 if test "$_win32libdir" ; then
7581 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
7583 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
7586 Create it and copy the DLL files there! You can download the codecs from our
7587 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
7593 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7594 operating system ($system_name). You may encounter a few files that cannot
7595 be played due to missing open source video/audio codec support.
7603 Check $TMPLOG if you wonder why an autodetection failed (check whether
7604 the development headers/packages are installed).
7606 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
7610 if test "$_vidix" = no
; then
7612 You've disabled VIDIX. Although it would be better to PORT it instead.
7613 Have a look at the documentation for supported cards!
7619 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"