3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: Check the Subversion log.
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, here is a simple skeleton:
24 # echocheck "$feature"
25 # if test "$_feature" = auto; then
27 # #include <feature.h>
28 # int main(void) { return 0; }
31 # cc_check && _feature=yes
33 # if test "$_feature" = yes ; then
34 # def_feature='#define CONFIG_FEATURE 1'
36 # def_feature='#undef CONFIG_FEATURE'
40 # Furthermore you need to add the variable _feature to the list of default
41 # settings and set it to one of yes/no/auto. Also add appropriate
42 # --enable-feature/--disable-feature command line options.
43 # The results of the check should be written to config.h and config.mak
44 # at the end of this script. The variable names used for this should be
45 # uniform, i.e. if the option is named 'feature':
47 # _feature : should have a value of yes/no/auto
48 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
49 # _ld_feature : '-L/path/dir -lfeature' GCC options
51 #############################################################################
53 # Prevent locale nonsense from breaking basic text processing utils
56 # Store the configure line that was used
59 # Prefer these macros to full length text !
60 # These macros only return an error code - NO display is done
65 cat "$source" >> "$TMPLOG"
67 echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
69 $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
77 compile_check
$TMPC $@
81 compile_check
$TMPCPP $@
-lstdc++
86 int main(void) { return 0; }
88 compile_check
$TMPC $@
94 int main(void) { $2; return 0; }
98 compile_check
$TMPC $@
104 int main(void) { return 0; }
107 compile_check
$TMPC $@
110 # this is a special check only to be
111 # used for broken headers that do not
112 # include all dependencies
113 header_check_broken
() {
117 int main(void) { return 0; }
121 compile_check
$TMPC $@
126 cat "$TMPS" >> "$TMPLOG"
128 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
130 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
138 "$TMPEXE" >> "$TMPLOG" 2>&1
141 # Display error message, flushes tempfile, exit
146 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
147 echo "Check \"$TMPLOG\" if you do not understand why it failed."
151 # OS test booleans functions
153 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
155 aix
() { issystem
"AIX"; }
156 amigaos
() { issystem
"AmigaOS"; }
157 beos
() { issystem
"BEOS"; }
158 bsdos
() { issystem
"BSD/OS"; }
159 cygwin
() { issystem
"CYGWIN"; }
160 darwin
() { issystem
"Darwin"; }
161 dragonfly
() { issystem
"DragonFly"; }
162 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
163 gnu
() { issystem
"GNU"; }
164 hpux
() { issystem
"HP-UX"; }
165 irix
() { issystem
"IRIX"; }
166 linux
() { issystem
"Linux"; }
167 mingw32
() { issystem
"MINGW32"; }
168 morphos
() { issystem
"MorphOS"; }
169 netbsd
() { issystem
"NetBSD"; }
170 openbsd
() { issystem
"OpenBSD"; }
171 os2
() { issystem
"OS/2"; }
172 qnx
() { issystem
"QNX"; }
173 sunos
() { issystem
"SunOS"; }
174 win32
() { cygwin || mingw32
; }
176 # arch test boolean functions
177 # x86/x86pc is used by QNX
180 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
187 x86_64|amd64
) return 0 ;;
198 ppc|ppc64|powerpc|powerpc64
) return 0;;
217 # Use this before starting a check
219 echo "============ Checking for $@ ============" >> "$TMPLOG"
220 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
223 # Use this to echo the results of a check
225 if test "$res_comment" ; then
226 res_comment
="($res_comment)"
228 echo "Result is: $@ $res_comment" >> "$TMPLOG"
229 echo "##########################################" >> "$TMPLOG"
231 echo "$@ $res_comment"
234 #############################################################################
236 # Check how echo works in this /bin/sh
238 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
239 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
243 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
244 man_lang_all
=$
(echo DOCS
/man
/??
/mplayer
.1 DOCS
/man
/??_??
/mplayer
.1 |
sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
245 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
249 Usage: $0 [OPTIONS]...
252 -h, --help display this help and exit
254 Installation directories:
255 --prefix=DIR prefix directory for installation [/usr/local]
256 --bindir=DIR directory for installing binaries [PREFIX/bin]
257 --datadir=DIR directory for installing machine independent
258 data files (skins, etc) [PREFIX/share/mplayer]
259 --mandir=DIR directory for installing man pages [PREFIX/share/man]
260 --confdir=DIR directory for installing configuration files
262 --localedir=DIR directory for locale tree [PREFIX/share/locale]
263 --libdir=DIR directory for object code libraries [PREFIX/lib]
264 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
267 --disable-mplayer disable MPlayer compilation [enable]
268 --disable-largefiles disable support for files > 2GB [enable]
269 --enable-termcap use termcap database for key codes [autodetect]
270 --enable-termios use termios database for key codes [autodetect]
271 --disable-iconv disable iconv for encoding conversion [autodetect]
272 --disable-langinfo do not use langinfo [autodetect]
273 --enable-lirc enable LIRC (remote control) support [autodetect]
274 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
275 --enable-joystick enable joystick support [disable]
276 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
277 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
278 --disable-vm disable X video mode extensions [autodetect]
279 --disable-xf86keysym disable support for multimedia keys [autodetect]
280 --enable-radio enable radio interface [disable]
281 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
282 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
283 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
284 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
285 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
286 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
287 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
288 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
289 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
290 --disable-networking disable networking [enable]
291 --enable-winsock2_h enable winsock2_h [autodetect]
292 --enable-smb enable Samba (SMB) input [autodetect]
293 --enable-live enable LIVE555 Streaming Media [autodetect]
294 --enable-nemesi enable Nemesi Streaming Media [autodetect]
295 --disable-vcd disable VCD support [autodetect]
296 --disable-bluray disable Blu-ray support [autodetect]
297 --disable-dvdnav disable libdvdnav [autodetect]
298 --disable-dvdread disable libdvdread [autodetect]
299 --disable-dvdread-internal disable internal libdvdread [autodetect]
300 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
301 --disable-cdparanoia disable cdparanoia [autodetect]
302 --disable-cddb disable cddb [autodetect]
303 --disable-bitmap-font disable bitmap font support [enable]
304 --disable-freetype disable FreeType 2 font rendering [autodetect]
305 --disable-fontconfig disable fontconfig font lookup [autodetect]
306 --disable-unrarexec disable using of UnRAR executable [enabled]
307 --enable-menu enable OSD menu (not DVD menu) [disabled]
308 --disable-sortsub disable subtitle sorting [enabled]
309 --enable-fribidi enable the FriBiDi libs [autodetect]
310 --disable-enca disable ENCA charset oracle library [autodetect]
311 --disable-maemo disable maemo specific features [autodetect]
312 --enable-macosx-finder enable Mac OS X Finder invocation parameter
314 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
315 --disable-inet6 disable IPv6 support [autodetect]
316 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
317 --disable-ftp disable FTP support [enabled]
318 --disable-vstream disable TiVo vstream client support [autodetect]
319 --disable-pthreads disable Posix threads support [autodetect]
320 --disable-w32threads disable Win32 threads support [autodetect]
321 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
322 --enable-rpath enable runtime linker path for extra libs [disabled]
325 --enable-gif enable GIF support [autodetect]
326 --enable-png enable PNG input/output support [autodetect]
327 --enable-mng enable MNG input support [autodetect]
328 --enable-jpeg enable JPEG input/output support [autodetect]
329 --enable-libcdio enable libcdio support [autodetect]
330 --enable-liblzo enable liblzo support [autodetect]
331 --disable-win32dll disable Win32 DLL support [autodetect]
332 --disable-qtx disable QuickTime codecs support [enabled]
333 --disable-xanim disable XAnim codecs support [enabled]
334 --disable-real disable RealPlayer codecs support [enabled]
335 --disable-xvid disable Xvid [autodetect]
336 --disable-x264 disable x264 [autodetect]
337 --disable-libnut disable libnut [autodetect]
338 --disable-ffmpeg_a disable static FFmpeg [autodetect]
339 --disable-ffmpeg_so disable shared FFmpeg [autodetect]
340 --disable-tremor-internal disable internal Tremor [enabled]
341 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
342 --enable-tremor enable external Tremor [autodetect]
343 --disable-libvorbis disable libvorbis support [autodetect]
344 --disable-speex disable Speex support [autodetect]
345 --enable-theora enable OggTheora libraries [autodetect]
346 --enable-faad enable external FAAD2 (AAC) [autodetect]
347 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
348 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
349 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
350 --disable-ladspa disable LADSPA plugin support [autodetect]
351 --disable-libbs2b disable libbs2b audio filter support [autodetect]
352 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
353 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
354 --disable-mad disable libmad (MPEG audio) support [autodetect]
355 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
356 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
357 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
358 --enable-xmms enable XMMS input plugin support [disabled]
359 --enable-libdca enable libdca support [autodetect]
360 --disable-mp3lib disable builtin mp3lib [autodetect]
361 --disable-liba52 disable liba52 [autodetect]
362 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
363 --disable-musepack disable musepack support [autodetect]
366 --disable-vidix disable VIDIX [for x86 *nix]
367 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
368 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
369 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
370 --disable-vidix-pcidb disable VIDIX PCI device name database
371 --enable-dhahelper enable VIDIX dhahelper support
372 --enable-svgalib_helper enable VIDIX svgalib_helper support
373 --enable-gl enable OpenGL video output [autodetect]
374 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
375 --enable-dga2 enable DGA 2 support [autodetect]
376 --enable-dga1 enable DGA 1 support [autodetect]
377 --enable-vesa enable VESA video output [autodetect]
378 --enable-svga enable SVGAlib video output [autodetect]
379 --enable-sdl enable SDL video output [autodetect]
380 --enable-kva enable KVA video output [autodetect]
381 --enable-aa enable AAlib video output [autodetect]
382 --enable-caca enable CACA video output [autodetect]
383 --enable-ggi enable GGI video output [autodetect]
384 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
385 --enable-direct3d enable Direct3D video output [autodetect]
386 --enable-directx enable DirectX video output [autodetect]
387 --enable-dxr2 enable DXR2 video output [autodetect]
388 --enable-dxr3 enable DXR3/H+ video output [autodetect]
389 --enable-ivtv enable IVTV TV-Out video output [autodetect]
390 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
391 --enable-dvb enable DVB video output [autodetect]
392 --enable-mga enable mga_vid video output [autodetect]
393 --enable-xmga enable mga_vid X11 video output [autodetect]
394 --enable-xv enable Xv video output [autodetect]
395 --enable-xvmc enable XvMC acceleration [disable]
396 --enable-vdpau enable VDPAU acceleration [autodetect]
397 --enable-vm enable XF86VidMode support [autodetect]
398 --enable-xinerama enable Xinerama support [autodetect]
399 --enable-x11 enable X11 video output [autodetect]
400 --enable-xshape enable XShape support [autodetect]
401 --disable-xss disable screensaver support via xss [autodetect]
402 --enable-fbdev enable FBDev video output [autodetect]
403 --enable-mlib enable mediaLib video output (Solaris) [disable]
404 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
405 --enable-tdfxfb enable tdfxfb video output [disable]
406 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
407 --enable-wii enable Nintendo Wii/GameCube video output [disable]
408 --enable-directfb enable DirectFB video output [autodetect]
409 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
410 --enable-bl enable Blinkenlights video output [disable]
411 --enable-tdfxvid enable tdfx_vid video output [disable]
412 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
413 --disable-tga disable Targa video output [enable]
414 --disable-pnm disable PNM video output [enable]
415 --disable-md5sum disable md5sum video output [enable]
416 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
417 --disable-corevideo disable CoreVideo video output [autodetect]
418 --disable-quartz disable Quartz video output [autodetect]
421 --disable-alsa disable ALSA audio output [autodetect]
422 --disable-ossaudio disable OSS audio output [autodetect]
423 --disable-arts disable aRts audio output [autodetect]
424 --disable-esd disable esd audio output [autodetect]
425 --disable-pulse disable Pulseaudio audio output [autodetect]
426 --disable-jack disable JACK audio output [autodetect]
427 --enable-openal enable OpenAL audio output [disable]
428 --disable-nas disable NAS audio output [autodetect]
429 --disable-sgiaudio disable SGI audio output [autodetect]
430 --disable-sunaudio disable Sun audio output [autodetect]
431 --disable-kai disable KAI audio output [autodetect]
432 --disable-dart disable DART audio output [autodetect]
433 --disable-win32waveout disable Windows waveout audio output [autodetect]
434 --disable-coreaudio disable CoreAudio audio output [autodetect]
435 --disable-select disable using select() on the audio device [enable]
438 --enable-translation enable support for translated output [disable]
439 --charset=charset convert the console messages to this character set
440 --language-doc=lang language to use for the documentation [en]
441 --language-man=lang language to use for the man pages [en]
442 --language-msg=lang extra languages for program messages [all]
443 --language=lang default language to use [en]
444 Specific options override --language. You can pass a list of languages separated
445 by whitespace or commas instead of a single language. Nonexisting translations
446 will be dropped from each list. All translations available in the list will be
447 installed. The value "all" will activate all translations. The LINGUAS
448 environment variable is honored. In all cases the fallback is English.
449 The program always supports English-language output; additional message
450 languages are only installed if --enable-translation is also specified.
451 Available values for --language-doc are: all $doc_lang_all
452 Available values for --language-man are: all $man_lang_all
453 Available values for --language-msg are: all $msg_lang_all
455 Miscellaneous options:
456 --enable-runtime-cpudetection enable runtime CPU detection [disable]
457 --enable-cross-compile enable cross-compilation [autodetect]
458 --cc=COMPILER C compiler to build MPlayer [gcc]
459 --host-cc=COMPILER C compiler for tools needed while building [gcc]
460 --as=ASSEMBLER assembler to build MPlayer [as]
461 --nm=NM nm tool to build MPlayer [nm]
462 --yasm=YASM Yasm assembler to build MPlayer [yasm]
463 --ar=AR librarian to build MPlayer [ar]
464 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
465 --windres=WINDRES windres to build MPlayer [windres]
466 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
467 --enable-static build a statically linked binary
468 --with-install=PATH path to a custom install program
471 --enable-mmx enable MMX [autodetect]
472 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
473 --enable-3dnow enable 3DNow! [autodetect]
474 --enable-3dnowext enable extended 3DNow! [autodetect]
475 --enable-sse enable SSE [autodetect]
476 --enable-sse2 enable SSE2 [autodetect]
477 --enable-ssse3 enable SSSE3 [autodetect]
478 --enable-shm enable shm [autodetect]
479 --enable-altivec enable AltiVec (PowerPC) [autodetect]
480 --enable-armv5te enable DSP extensions (ARM) [autodetect]
481 --enable-armv6 enable ARMv6 (ARM) [autodetect]
482 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
483 --enable-armvfp enable ARM VFP (ARM) [autodetect]
484 --enable-neon enable NEON (ARM) [autodetect]
485 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
486 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
487 --enable-big-endian force byte order to big-endian [autodetect]
488 --enable-debug[=1-3] compile-in debugging information [disable]
489 --enable-profile compile-in profiling information [disable]
490 --disable-sighandler disable sighandler for crashes [enable]
491 --enable-crash-debug enable automatic gdb attach on crash [disable]
492 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
493 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
495 Use these options if autodetection fails:
496 --extra-cflags=FLAGS extra CFLAGS
497 --extra-ldflags=FLAGS extra LDFLAGS
498 --extra-libs=FLAGS extra linker flags
499 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
500 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
502 --with-freetype-config=PATH path to freetype-config
503 --with-glib-config=PATH path to glib*-config
504 --with-gtk-config=PATH path to gtk*-config
505 --with-sdl-config=PATH path to sdl*-config
506 --with-dvdnav-config=PATH path to dvdnav-config
507 --with-dvdread-config=PATH path to dvdread-config
509 This configure script is NOT autoconf-based, even though its output is similar.
510 It will try to autodetect all configuration options. If you --enable an option
511 it will be forcefully turned on, skipping autodetection. This can break
512 compilation, so you need to know what you are doing.
517 # GOTCHA: the variables below defines the default behavior for autodetection
518 # and have - unless stated otherwise - at least 2 states : yes no
519 # If autodetection is available then the third state is: auto
543 test "$CC" && _cc
="$CC"
547 _runtime_cpudetection
=no
560 _xvmc
=no
#auto when complete
627 _dvdnavconfig
=dvdnav-config
628 _dvdreadconfig
=dvdread-config
630 _dvdread_internal
=auto
631 _libdvdcss_internal
=auto
642 _mlib
=no
#broken, thus disabled
715 _freetypeconfig
='freetype-config'
730 def_dos_paths
="#define HAVE_DOS_PATHS 0"
731 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
732 def_priority
="#undef CONFIG_PRIORITY"
733 def_pthread_cache
="#undef PTHREAD_CACHE"
741 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
744 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
747 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
750 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
753 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
756 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
759 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
762 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
766 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
769 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
773 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
775 --with-freetype-config=*)
776 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
779 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
781 --with-glib-config=*)
782 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
784 --with-dvdnav-config=*)
785 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
787 --with-dvdread-config=*)
788 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
792 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
795 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
798 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
800 --extra-libs-mplayer=*)
801 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
805 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
808 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
811 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
814 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
817 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
820 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
823 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
826 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
829 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
832 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
835 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
838 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
841 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
844 language
=$
(echo $ac_option | cut
-d '=' -f 2)
863 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
868 --enable-translation) _translation
=yes ;;
869 --disable-translation) _translation
=no
;;
870 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
871 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
872 --enable-cross-compile) _cross_compile
=yes ;;
873 --disable-cross-compile) _cross_compile
=no
;;
874 --enable-mplayer) _mplayer
=yes ;;
875 --disable-mplayer) _mplayer
=no
;;
876 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
877 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
878 --enable-x11) _x11
=yes ;;
879 --disable-x11) _x11
=no
;;
880 --enable-xshape) _xshape
=yes ;;
881 --disable-xshape) _xshape
=no
;;
882 --enable-xss) _xss
=yes ;;
883 --disable-xss) _xss
=no
;;
884 --enable-xv) _xv
=yes ;;
885 --disable-xv) _xv
=no
;;
886 --enable-xvmc) _xvmc
=yes ;;
887 --disable-xvmc) _xvmc
=no
;;
888 --enable-vdpau) _vdpau
=yes ;;
889 --disable-vdpau) _vdpau
=no
;;
890 --enable-sdl) _sdl
=yes ;;
891 --disable-sdl) _sdl
=no
;;
892 --enable-kva) _kva
=yes ;;
893 --disable-kva) _kva
=no
;;
894 --enable-direct3d) _direct3d
=yes ;;
895 --disable-direct3d) _direct3d
=no
;;
896 --enable-directx) _directx
=yes ;;
897 --disable-directx) _directx
=no
;;
898 --enable-win32waveout) _win32waveout
=yes ;;
899 --disable-win32waveout) _win32waveout
=no
;;
900 --enable-nas) _nas
=yes ;;
901 --disable-nas) _nas
=no
;;
902 --enable-png) _png
=yes ;;
903 --disable-png) _png
=no
;;
904 --enable-mng) _mng
=yes ;;
905 --disable-mng) _mng
=no
;;
906 --enable-jpeg) _jpeg
=yes ;;
907 --disable-jpeg) _jpeg
=no
;;
908 --enable-pnm) _pnm
=yes ;;
909 --disable-pnm) _pnm
=no
;;
910 --enable-md5sum) _md5sum
=yes ;;
911 --disable-md5sum) _md5sum
=no
;;
912 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
913 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
914 --enable-gif) _gif
=yes ;;
915 --disable-gif) _gif
=no
;;
916 --enable-gl) _gl
=yes ;;
917 --disable-gl) _gl
=no
;;
918 --enable-matrixview) matrixview
=yes ;;
919 --disable-matrixview) matrixview
=no
;;
920 --enable-ggi) _ggi
=yes ;;
921 --disable-ggi) _ggi
=no
;;
922 --enable-ggiwmh) _ggiwmh
=yes ;;
923 --disable-ggiwmh) _ggiwmh
=no
;;
924 --enable-aa) _aa
=yes ;;
925 --disable-aa) _aa
=no
;;
926 --enable-caca) _caca
=yes ;;
927 --disable-caca) _caca
=no
;;
928 --enable-svga) _svga
=yes ;;
929 --disable-svga) _svga
=no
;;
930 --enable-vesa) _vesa
=yes ;;
931 --disable-vesa) _vesa
=no
;;
932 --enable-fbdev) _fbdev
=yes ;;
933 --disable-fbdev) _fbdev
=no
;;
934 --enable-dvb) _dvb
=yes ;;
935 --disable-dvb) _dvb
=no
;;
936 --enable-dxr2) _dxr2
=yes ;;
937 --disable-dxr2) _dxr2
=no
;;
938 --enable-dxr3) _dxr3
=yes ;;
939 --disable-dxr3) _dxr3
=no
;;
940 --enable-ivtv) _ivtv
=yes ;;
941 --disable-ivtv) _ivtv
=no
;;
942 --enable-v4l2) _v4l2
=yes ;;
943 --disable-v4l2) _v4l2
=no
;;
944 --enable-iconv) _iconv
=yes ;;
945 --disable-iconv) _iconv
=no
;;
946 --enable-langinfo) _langinfo
=yes ;;
947 --disable-langinfo) _langinfo
=no
;;
948 --enable-rtc) _rtc
=yes ;;
949 --disable-rtc) _rtc
=no
;;
950 --enable-libdv) _libdv
=yes ;;
951 --disable-libdv) _libdv
=no
;;
952 --enable-ossaudio) _ossaudio
=yes ;;
953 --disable-ossaudio) _ossaudio
=no
;;
954 --enable-arts) _arts
=yes ;;
955 --disable-arts) _arts
=no
;;
956 --enable-esd) _esd
=yes ;;
957 --disable-esd) _esd
=no
;;
958 --enable-pulse) _pulse
=yes ;;
959 --disable-pulse) _pulse
=no
;;
960 --enable-jack) _jack
=yes ;;
961 --disable-jack) _jack
=no
;;
962 --enable-openal) _openal
=yes ;;
963 --disable-openal) _openal
=no
;;
964 --enable-kai) _kai
=yes ;;
965 --disable-kai) _kai
=no
;;
966 --enable-dart) _dart
=yes ;;
967 --disable-dart) _dart
=no
;;
968 --enable-mad) _mad
=yes ;;
969 --disable-mad) _mad
=no
;;
970 --enable-mp3lame) _mp3lame
=yes ;;
971 --disable-mp3lame) _mp3lame
=no
;;
972 --enable-toolame) _toolame
=yes ;;
973 --disable-toolame) _toolame
=no
;;
974 --enable-twolame) _twolame
=yes ;;
975 --disable-twolame) _twolame
=no
;;
976 --enable-libcdio) _libcdio
=yes ;;
977 --disable-libcdio) _libcdio
=no
;;
978 --enable-liblzo) _liblzo
=yes ;;
979 --disable-liblzo) _liblzo
=no
;;
980 --enable-libvorbis) _libvorbis
=yes ;;
981 --disable-libvorbis) _libvorbis
=no
;;
982 --enable-speex) _speex
=yes ;;
983 --disable-speex) _speex
=no
;;
984 --enable-tremor) _tremor
=yes ;;
985 --disable-tremor) _tremor
=no
;;
986 --enable-tremor-internal) _tremor_internal
=yes ;;
987 --disable-tremor-internal) _tremor_internal
=no
;;
988 --enable-tremor-low) _tremor_low
=yes ;;
989 --disable-tremor-low) _tremor_low
=no
;;
990 --enable-theora) _theora
=yes ;;
991 --disable-theora) _theora
=no
;;
992 --enable-mpg123) _mpg123
=yes ;;
993 --disable-mpg123) _mpg123
=no
;;
994 --enable-mp3lib) _mp3lib
=yes ;;
995 --disable-mp3lib) _mp3lib
=no
;;
996 --enable-liba52) _liba52
=yes ;;
997 --disable-liba52) _liba52
=no
;;
998 --enable-libdca) _libdca
=yes ;;
999 --disable-libdca) _libdca
=no
;;
1000 --enable-libmpeg2) _libmpeg2
=yes ;;
1001 --disable-libmpeg2) _libmpeg2
=no
;;
1002 --enable-musepack) _musepack
=yes ;;
1003 --disable-musepack) _musepack
=no
;;
1004 --enable-faad) _faad
=yes ;;
1005 --disable-faad) _faad
=no
;;
1006 --enable-faad-internal) _faad_internal
=yes ;;
1007 --disable-faad-internal) _faad_internal
=no
;;
1008 --enable-faad-fixed) _faad_fixed
=yes ;;
1009 --disable-faad-fixed) _faad_fixed
=no
;;
1010 --enable-faac) _faac
=yes ;;
1011 --disable-faac) _faac
=no
;;
1012 --enable-ladspa) _ladspa
=yes ;;
1013 --disable-ladspa) _ladspa
=no
;;
1014 --enable-libbs2b) _libbs2b
=yes ;;
1015 --disable-libbs2b) _libbs2b
=no
;;
1016 --enable-xmms) _xmms
=yes ;;
1017 --disable-xmms) _xmms
=no
;;
1018 --enable-vcd) _vcd
=yes ;;
1019 --disable-vcd) _vcd
=no
;;
1020 --enable-bluray) _bluray
=yes ;;
1021 --disable-bluray) _bluray
=no
;;
1022 --enable-dvdread) _dvdread
=yes ;;
1023 --disable-dvdread) _dvdread
=no
;;
1024 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1025 --disable-dvdread-internal) _dvdread_internal
=no
;;
1026 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1027 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1028 --enable-dvdnav) _dvdnav
=yes ;;
1029 --disable-dvdnav) _dvdnav
=no
;;
1030 --enable-xanim) _xanim
=yes ;;
1031 --disable-xanim) _xanim
=no
;;
1032 --enable-real) _real
=yes ;;
1033 --disable-real) _real
=no
;;
1034 --enable-live) _live
=yes ;;
1035 --disable-live) _live
=no
;;
1036 --enable-nemesi) _nemesi
=yes ;;
1037 --disable-nemesi) _nemesi
=no
;;
1038 --enable-xinerama) _xinerama
=yes ;;
1039 --disable-xinerama) _xinerama
=no
;;
1040 --enable-mga) _mga
=yes ;;
1041 --disable-mga) _mga
=no
;;
1042 --enable-xmga) _xmga
=yes ;;
1043 --disable-xmga) _xmga
=no
;;
1044 --enable-vm) _vm
=yes ;;
1045 --disable-vm) _vm
=no
;;
1046 --enable-xf86keysym) _xf86keysym
=yes ;;
1047 --disable-xf86keysym) _xf86keysym
=no
;;
1048 --enable-mlib) _mlib
=yes ;;
1049 --disable-mlib) _mlib
=no
;;
1050 --enable-sunaudio) _sunaudio
=yes ;;
1051 --disable-sunaudio) _sunaudio
=no
;;
1052 --enable-sgiaudio) _sgiaudio
=yes ;;
1053 --disable-sgiaudio) _sgiaudio
=no
;;
1054 --enable-alsa) _alsa
=yes ;;
1055 --disable-alsa) _alsa
=no
;;
1056 --enable-tv) _tv
=yes ;;
1057 --disable-tv) _tv
=no
;;
1058 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1059 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1060 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1061 --disable-tv-v4l1) _tv_v4l1
=no
;;
1062 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1063 --disable-tv-v4l2) _tv_v4l2
=no
;;
1064 --enable-tv-dshow) _tv_dshow
=yes ;;
1065 --disable-tv-dshow) _tv_dshow
=no
;;
1066 --enable-radio) _radio
=yes ;;
1067 --enable-radio-capture) _radio_capture
=yes ;;
1068 --disable-radio-capture) _radio_capture
=no
;;
1069 --disable-radio) _radio
=no
;;
1070 --enable-radio-v4l) _radio_v4l
=yes ;;
1071 --disable-radio-v4l) _radio_v4l
=no
;;
1072 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1073 --disable-radio-v4l2) _radio_v4l2
=no
;;
1074 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1075 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1076 --enable-pvr) _pvr
=yes ;;
1077 --disable-pvr) _pvr
=no
;;
1078 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1079 --disable-fastmemcpy) _fastmemcpy
=no
;;
1080 --enable-networking) networking
=yes ;;
1081 --disable-networking) networking
=no
;;
1082 --enable-winsock2_h) _winsock2_h
=yes ;;
1083 --disable-winsock2_h) _winsock2_h
=no
;;
1084 --enable-smb) _smb
=yes ;;
1085 --disable-smb) _smb
=no
;;
1086 --enable-vidix) _vidix
=yes ;;
1087 --disable-vidix) _vidix
=no
;;
1088 --with-vidix-drivers=*)
1089 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1091 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1092 --enable-dhahelper) _dhahelper
=yes ;;
1093 --disable-dhahelper) _dhahelper
=no
;;
1094 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1095 --disable-svgalib_helper) _svgalib_helper
=no
;;
1096 --enable-joystick) _joystick
=yes ;;
1097 --disable-joystick) _joystick
=no
;;
1098 --enable-xvid) _xvid
=yes ;;
1099 --disable-xvid) _xvid
=no
;;
1100 --enable-x264) _x264
=yes ;;
1101 --disable-x264) _x264
=no
;;
1102 --enable-libnut) _libnut
=yes ;;
1103 --disable-libnut) _libnut
=no
;;
1104 --enable-ffmpeg) ffmpeg
=yes ;;
1105 --disable-ffmpeg) ffmpeg
=no
;;
1106 --ffmpeg-source-dir=*)
1107 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1109 --enable-lirc) _lirc
=yes ;;
1110 --disable-lirc) _lirc
=no
;;
1111 --enable-lircc) _lircc
=yes ;;
1112 --disable-lircc) _lircc
=no
;;
1113 --enable-apple-remote) _apple_remote
=yes ;;
1114 --disable-apple-remote) _apple_remote
=no
;;
1115 --enable-apple-ir) _apple_ir
=yes ;;
1116 --disable-apple-ir) _apple_ir
=no
;;
1117 --enable-gui) _gui
=yes ;;
1118 --disable-gui) _gui
=no
;;
1119 --enable-gtk1) _gtk1
=yes ;;
1120 --disable-gtk1) _gtk1
=no
;;
1121 --enable-termcap) _termcap
=yes ;;
1122 --disable-termcap) _termcap
=no
;;
1123 --enable-termios) _termios
=yes ;;
1124 --disable-termios) _termios
=no
;;
1125 --enable-3dfx) _3dfx
=yes ;;
1126 --disable-3dfx) _3dfx
=no
;;
1127 --enable-s3fb) _s3fb
=yes ;;
1128 --disable-s3fb) _s3fb
=no
;;
1129 --enable-wii) _wii
=yes ;;
1130 --disable-wii) _wii
=no
;;
1131 --enable-tdfxfb) _tdfxfb
=yes ;;
1132 --disable-tdfxfb) _tdfxfb
=no
;;
1133 --disable-tdfxvid) _tdfxvid
=no
;;
1134 --enable-tdfxvid) _tdfxvid
=yes ;;
1135 --disable-xvr100) _xvr100
=no
;;
1136 --enable-xvr100) _xvr100
=yes ;;
1137 --disable-tga) _tga
=no
;;
1138 --enable-tga) _tga
=yes ;;
1139 --enable-directfb) _directfb
=yes ;;
1140 --disable-directfb) _directfb
=no
;;
1141 --enable-zr) _zr
=yes ;;
1142 --disable-zr) _zr
=no
;;
1143 --enable-bl) _bl
=yes ;;
1144 --disable-bl) _bl
=no
;;
1145 --enable-mtrr) _mtrr
=yes ;;
1146 --disable-mtrr) _mtrr
=no
;;
1147 --enable-largefiles) _largefiles
=yes ;;
1148 --disable-largefiles) _largefiles
=no
;;
1149 --enable-shm) _shm
=yes ;;
1150 --disable-shm) _shm
=no
;;
1151 --enable-select) _select
=yes ;;
1152 --disable-select) _select
=no
;;
1153 --enable-cdparanoia) _cdparanoia
=yes ;;
1154 --disable-cdparanoia) _cdparanoia
=no
;;
1155 --enable-cddb) _cddb
=yes ;;
1156 --disable-cddb) _cddb
=no
;;
1157 --enable-big-endian) _big_endian
=yes ;;
1158 --disable-big-endian) _big_endian
=no
;;
1159 --enable-bitmap-font) _bitmap_font
=yes ;;
1160 --disable-bitmap-font) _bitmap_font
=no
;;
1161 --enable-freetype) _freetype
=yes ;;
1162 --disable-freetype) _freetype
=no
;;
1163 --enable-fontconfig) _fontconfig
=yes ;;
1164 --disable-fontconfig) _fontconfig
=no
;;
1165 --enable-unrarexec) _unrar_exec
=yes ;;
1166 --disable-unrarexec) _unrar_exec
=no
;;
1167 --enable-ftp) _ftp
=yes ;;
1168 --disable-ftp) _ftp
=no
;;
1169 --enable-vstream) _vstream
=yes ;;
1170 --disable-vstream) _vstream
=no
;;
1171 --enable-pthreads) _pthreads
=yes ;;
1172 --disable-pthreads) _pthreads
=no
;;
1173 --enable-w32threads) _w32threads
=yes ;;
1174 --disable-w32threads) _w32threads
=no
;;
1175 --enable-ass) _ass
=yes ;;
1176 --disable-ass) _ass
=no
;;
1177 --enable-rpath) _rpath
=yes ;;
1178 --disable-rpath) _rpath
=no
;;
1180 --enable-fribidi) _fribidi
=yes ;;
1181 --disable-fribidi) _fribidi
=no
;;
1183 --enable-enca) _enca
=yes ;;
1184 --disable-enca) _enca
=no
;;
1186 --enable-inet6) _inet6
=yes ;;
1187 --disable-inet6) _inet6
=no
;;
1189 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1190 --disable-gethostbyname2) _gethostbyname2
=no
;;
1192 --enable-dga1) _dga1
=yes ;;
1193 --disable-dga1) _dga1
=no
;;
1194 --enable-dga2) _dga2
=yes ;;
1195 --disable-dga2) _dga2
=no
;;
1197 --enable-menu) _menu
=yes ;;
1198 --disable-menu) _menu
=no
;;
1200 --enable-qtx) _qtx
=yes ;;
1201 --disable-qtx) _qtx
=no
;;
1203 --enable-coreaudio) _coreaudio
=yes ;;
1204 --disable-coreaudio) _coreaudio
=no
;;
1205 --enable-corevideo) _corevideo
=yes ;;
1206 --disable-corevideo) _corevideo
=no
;;
1207 --enable-quartz) _quartz
=yes ;;
1208 --disable-quartz) _quartz
=no
;;
1209 --enable-macosx-finder) _macosx_finder
=yes ;;
1210 --disable-macosx-finder) _macosx_finder
=no
;;
1211 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1212 --disable-macosx-bundle) _macosx_bundle
=no
;;
1214 --enable-maemo) _maemo
=yes ;;
1215 --disable-maemo) _maemo
=no
;;
1217 --enable-sortsub) _sortsub
=yes ;;
1218 --disable-sortsub) _sortsub
=no
;;
1220 --enable-crash-debug) _crash_debug
=yes ;;
1221 --disable-crash-debug) _crash_debug
=no
;;
1222 --enable-sighandler) _sighandler
=yes ;;
1223 --disable-sighandler) _sighandler
=no
;;
1224 --enable-win32dll) _win32dll
=yes ;;
1225 --disable-win32dll) _win32dll
=no
;;
1227 --enable-sse) _sse
=yes ;;
1228 --disable-sse) _sse
=no
;;
1229 --enable-sse2) _sse2
=yes ;;
1230 --disable-sse2) _sse2
=no
;;
1231 --enable-ssse3) _ssse3
=yes ;;
1232 --disable-ssse3) _ssse3
=no
;;
1233 --enable-mmxext) _mmxext
=yes ;;
1234 --disable-mmxext) _mmxext
=no
;;
1235 --enable-3dnow) _3dnow
=yes ;;
1236 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1237 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1238 --disable-3dnowext) _3dnowext
=no
;;
1239 --enable-cmov) _cmov
=yes ;;
1240 --disable-cmov) _cmov
=no
;;
1241 --enable-fast-cmov) _fast_cmov
=yes ;;
1242 --disable-fast-cmov) _fast_cmov
=no
;;
1243 --enable-fast-clz) _fast_clz
=yes ;;
1244 --disable-fast-clz) _fast_clz
=no
;;
1245 --enable-altivec) _altivec
=yes ;;
1246 --disable-altivec) _altivec
=no
;;
1247 --enable-armv5te) _armv5te
=yes ;;
1248 --disable-armv5te) _armv5te
=no
;;
1249 --enable-armv6) _armv6
=yes ;;
1250 --disable-armv6) _armv6
=no
;;
1251 --enable-armv6t2) _armv6t2
=yes ;;
1252 --disable-armv6t2) _armv6t2
=no
;;
1253 --enable-armvfp) _armvfp
=yes ;;
1254 --disable-armvfp) _armvfp
=no
;;
1255 --enable-neon) neon
=yes ;;
1256 --disable-neon) neon
=no
;;
1257 --enable-iwmmxt) _iwmmxt
=yes ;;
1258 --disable-iwmmxt) _iwmmxt
=no
;;
1259 --enable-mmx) _mmx
=yes ;;
1260 --disable-mmx) # 3Dnow! and MMX2 require MMX
1261 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1264 echo "Unknown parameter: $ac_option"
1271 if test "$_gui" = yes ; then
1272 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1273 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1276 # Atmos: moved this here, to be correct, if --prefix is specified
1277 test -z "$_bindir" && _bindir
="$_prefix/bin"
1278 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1279 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1280 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1281 test -z "$_libdir" && _libdir
="$_prefix/lib"
1282 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1284 # Determine our OS name and CPU architecture
1285 if test -z "$_target" ; then
1287 system_name
=$
(uname
-s 2>&1)
1288 case "$system_name" in
1289 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1303 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1313 system_name
="$system_name-UNKNOWN"
1318 # host's CPU/instruction set
1319 host_arch
=$
(uname
-p 2>&1)
1320 case "$host_arch" in
1321 i386|sparc|ppc|alpha|arm|mips|vax
)
1323 powerpc
) # Darwin returns 'powerpc'
1326 *) # uname -p on Linux returns 'unknown' for the processor type,
1327 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1329 # Maybe uname -m (machine hardware name) returns something we
1332 # x86/x86pc is used by QNX
1333 case "$(uname -m 2>&1)" in
1334 x86_64|amd64|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
;;
1335 ia64
) host_arch
=ia64
;;
1336 macppc|ppc
) host_arch
=ppc
;;
1337 ppc64
) host_arch
=ppc64
;;
1338 alpha
) host_arch
=alpha
;;
1339 sparc
) host_arch
=sparc
;;
1340 sparc64
) host_arch
=sparc64
;;
1341 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1342 arm
*|zaurus|cats
) host_arch
=arm
;;
1343 sh3|sh4|sh4a
) host_arch
=sh
;;
1344 s390
) host_arch
=s390
;;
1345 s390x
) host_arch
=s390x
;;
1346 *mips
*) host_arch
=mips
;;
1347 vax
) host_arch
=vax
;;
1348 xtensa
*) host_arch
=xtensa
;;
1349 *) host_arch
=UNKNOWN
;;
1353 else # if test -z "$_target"
1354 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1355 case "$(echo $system_name | tr A-Z a-z)" in
1356 linux
) system_name
=Linux
;;
1357 freebsd
) system_name
=FreeBSD
;;
1358 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1359 netbsd
) system_name
=NetBSD
;;
1360 bsd
/os
) system_name
=BSD
/OS
;;
1361 openbsd
) system_name
=OpenBSD
;;
1362 dragonfly
) system_name
=DragonFly
;;
1363 sunos
) system_name
=SunOS
;;
1364 qnx
) system_name
=QNX
;;
1365 morphos
) system_name
=MorphOS
;;
1366 amigaos
) system_name
=AmigaOS
;;
1367 mingw32
*) system_name
=MINGW32
;;
1369 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1370 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1371 if test $
(echo $host_arch) != "x86_64" ; then
1372 host_arch
=$
(echo $host_arch |
tr '_' '-')
1376 extra_cflags
="-I. $extra_cflags"
1377 _timer
=timer-linux.c
1380 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1381 extra_cflags
="$extra_cflags -I/usr/local/include"
1384 if netbsd || dragonfly
; then
1385 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1386 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1390 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1391 if test "$(basename $_cc)" != "clang" ; then
1392 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1394 _timer
=timer-darwin.c
1398 extra_ldflags
="$extra_ldflags -lC"
1409 extra_cflags
="$extra_cflags -fno-common"
1410 # -lwinmm is always needed for osdep/timer-win2.c
1411 extra_ldflags
="$extra_ldflags -lwinmm"
1415 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1416 def_priority
="#define CONFIG_PRIORITY 1"
1428 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1429 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1433 extra_ldflags
="$extra_ldflags -lph"
1441 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1442 def_priority
="#define CONFIG_PRIORITY 1"
1445 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1446 test "$tmpdir" && break
1449 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1450 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1453 TMPC
="$mplayer_tmpdir/tmp.c"
1454 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1455 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1456 TMPH
="$mplayer_tmpdir/tmp.h"
1457 TMPS
="$mplayer_tmpdir/tmp.S"
1460 echo configuration
: $configuration > "$TMPLOG"
1464 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1465 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1469 # Checking CC version...
1470 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1471 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1472 echocheck
"$_cc version"
1474 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1475 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1476 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1477 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1478 # TODO verify older icc/ecc compatibility
1481 cc_version
="v. ?.??, bad"
1485 cc_version
="$cc_version, ok"
1488 cc_version
="$cc_version, bad"
1492 echores
"$cc_version"
1494 for _cc
in "$_cc" gcc cc
; do
1495 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1496 if test "$cc_name_tmp" = "gcc"; then
1497 cc_name
=$cc_name_tmp
1498 echocheck
"$_cc version"
1500 cc_version
=$
($_cc -dumpversion 2>&1)
1506 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1507 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1508 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1511 echores
"$cc_version"
1514 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1515 if test "$cc_name_tmp" = "clang"; then
1516 echocheck
"$_cc version"
1518 cc_version
=$
($_cc -dumpversion 2>&1)
1519 res_comment
="experimental support only"
1520 echores
"clang $cc_version"
1523 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1524 if test "$cc_name_tmp" = "Sun C"; then
1525 echocheck
"$_cc version"
1527 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1528 res_comment
="experimental support only"
1529 echores
"Sun C $cc_version"
1534 test "$cc_fail" = yes && die
"unsupported compiler version"
1536 if test -z "$_target" && x86
; then
1539 int test[(int)sizeof(char *)-7];
1543 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1546 echo "Detected operating system: $system_name"
1547 echo "Detected host architecture: $host_arch"
1550 test "$_host_cc" || _host_cc
=$_cc
1553 echocheck
"cross compilation"
1554 if test $_cross_compile = auto
; then
1556 cflag_check
"" && "$TMPEXE" && _cross_compile
=no
1558 echores
$_cross_compile
1560 if test $_cross_compile = yes; then
1568 # now that we know what compiler should be used for compilation, try to find
1569 # out which assembler is used by the $_cc compiler
1570 if test "$_as" = auto
; then
1571 _as
=$
($_cc -print-prog-name=as
)
1572 test -z "$_as" && _as
=as
1575 if test "$_nm" = auto
; then
1576 _nm
=$
($_cc -print-prog-name=nm
)
1577 test -z "$_nm" && _nm
=nm
1580 # XXX: this should be ok..
1583 if test "$_runtime_cpudetection" = no
; then
1585 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1586 # FIXME: Remove the cygwin check once AMD CPUs are supported
1587 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1588 # Linux with /proc mounted, extract CPU information from it
1589 _cpuinfo
="cat /proc/cpuinfo"
1590 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1591 # FreeBSD with Linux emulation /proc mounted,
1592 # extract CPU information from it
1593 # Don't use it on x86 though, it never reports 3Dnow
1594 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1595 elif darwin
&& ! x86
; then
1596 # use hostinfo on Darwin
1599 # use 'lsattr' on AIX
1600 _cpuinfo
="lsattr -E -l proc0 -a type"
1602 # all other OSes try to extract CPU information from a small helper
1603 # program cpuinfo instead
1604 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1605 _cpuinfo
="./cpuinfo$_exesuf"
1609 # gather more CPU information
1610 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1611 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1612 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1613 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1614 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1616 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1618 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1619 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1621 for ext
in $pparam ; do
1622 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1625 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1626 test $_sse = kernel_check
&& _mmxext
=kernel_check
1628 echocheck
"CPU vendor"
1629 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1631 echocheck
"CPU type"
1635 fi # test "$_runtime_cpudetection" = no
1637 if x86
&& test "$_runtime_cpudetection" = no
; then
1639 if test "$1" = kernel_check
; then
1640 echocheck
"kernel support of $2"
1644 static void catch(int sig) { exit(1); }
1646 signal(SIGILL, catch);
1647 __asm__ volatile ("$3":::"memory"); return 0;
1651 if cc_check
&& tmp_run
; then
1654 _optimizing
="$_optimizing $2"
1659 echo "It seems that your kernel does not correctly support $2."
1660 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1667 extcheck
$_mmx "mmx" "emms"
1668 extcheck
$_mmxext "mmxext" "sfence"
1669 extcheck
$_3dnow "3dnow" "femms"
1670 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1671 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1672 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1673 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1674 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1676 echocheck
"mtrr support"
1677 if test "$_mtrr" = kernel_check
; then
1679 _optimizing
="$_optimizing mtrr"
1683 if test "$_gcc3_ext" != ""; then
1684 # if we had to disable sse/sse2 because the active kernel does not
1685 # support this instruction set extension, we also have to tell
1686 # gcc3 to not generate sse/sse2 instructions for normal C code
1687 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1693 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1694 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1695 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1696 subarch_all
='X86_32 X86_64 PPC64'
1697 case "$host_arch" in
1698 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1701 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1706 if test "$_runtime_cpudetection" = no
; then
1710 3) proc
=i386 iproc
=386 ;;
1711 4) proc
=i486 iproc
=486 ;;
1712 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1713 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1714 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1716 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1718 elif test "$pmodel" -ge 8; then
1720 elif test "$pmodel" -ge 6; then
1727 # It's a bit difficult to determine the correct type of Family 6
1728 # AMD CPUs just from their signature. Instead, we check directly
1729 # whether it supports SSE.
1730 if test "$_sse" = yes; then
1731 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1734 # Again, gcc treats athlon and athlon-tbird similarly.
1739 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1740 # caught and remedied in the optimization tests below.
1744 *) proc
=amdfam10 iproc
=686
1745 test $_fast_clz = "auto" && _fast_clz
=yes
1751 3) proc
=i386 iproc
=386 ;;
1752 4) proc
=i486 iproc
=486 ;;
1754 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1755 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1761 if test "$pmodel" -ge 15; then
1763 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1765 elif test "$pmodel" -ge 7; then
1767 elif test "$pmodel" -ge 3; then
1772 test $_fast_clz = "auto" && _fast_clz
=yes
1775 # A nocona in 32-bit mode has no more capabilities than a prescott.
1776 if test "$pmodel" -ge 3; then
1780 test $_fast_clz = "auto" && _fast_clz
=yes
1782 test $_fast_cmov = "auto" && _fast_cmov
=no
1784 *) proc
=prescott iproc
=686 ;;
1790 if test "$pmodel" -ge 8; then
1792 elif test "$pmodel" -ge 4; then
1799 if test "$pmodel" -ge 9; then
1806 *) proc
=i686 iproc
=i686
;;
1811 3) proc
=i386 iproc
=386 ;;
1812 4) proc
=i486 iproc
=486 ;;
1813 *) proc
=i586 iproc
=586 ;;
1817 proc
=i586 iproc
=586 ;;
1819 test $_fast_clz = "auto" && _fast_clz
=no
1820 fi # test "$_runtime_cpudetection" = no
1823 # check that gcc supports our CPU, if not, fall back to earlier ones
1824 # LGB: check -mcpu and -march swithing step by step with enabling
1825 # to fall back till 386.
1827 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1829 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1835 echocheck
"GCC & CPU optimization abilities"
1836 if test "$_runtime_cpudetection" = no
; then
1837 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1838 cflag_check
-march=native
&& proc
=native
1840 if test "$proc" = "amdfam10"; then
1841 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1843 if test "$proc" = "k8"; then
1844 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1846 if test "$proc" = "athlon-xp"; then
1847 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1849 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1850 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1852 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1853 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1854 if cflag_check
-march=i586
$cpuopt=i686
; then
1861 if test "$proc" = "prescott" ; then
1862 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1864 if test "$proc" = "core2" ; then
1865 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1867 if test "$proc" = "pentium4" ||
test "$proc" = "pentium-m" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon" ||
test "$proc" = "c3-2" ||
test "$proc" = "geode"; then
1868 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1870 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1871 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1873 if test "$proc" = "i586"; then
1874 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1876 if test "$proc" = "i486" ; then
1877 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1879 if test "$proc" = "i386" ; then
1880 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1882 if test "$proc" = "error" ; then
1883 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1887 elif test "$proc" = "i586-i686"; then
1888 _march
="-march=i586"
1889 _mcpu
="$cpuopt=i686"
1892 _march
="-march=$proc"
1893 _mcpu
="$cpuopt=$proc"
1896 else # if test "$_runtime_cpudetection" = no
1897 _mcpu
="$cpuopt=generic"
1898 # at least i486 required, for bswap instruction
1899 _march
="-march=i486"
1900 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1901 cflag_check
$_mcpu || _mcpu
=""
1902 cflag_check
$_march $_mcpu || _march
=""
1905 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1906 ## autodetected mcpu/march parameters
1907 if test "$_target" ; then
1908 # TODO: it may be a good idea to check GCC and fall back in all cases
1909 if test "$host_arch" = "i586-i686"; then
1910 _march
="-march=i586"
1911 _mcpu
="$cpuopt=i686"
1913 _march
="-march=$host_arch"
1914 _mcpu
="$cpuopt=$host_arch"
1922 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1923 i686|athlon
*|pentium
*) iproc
=686 ;;
1928 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1933 test $_fast_clz = "auto" && _fast_clz
=yes
1940 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1947 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1948 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1951 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1952 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1957 if test "$_runtime_cpudetection" = no
; then
1962 test $_fast_clz = "auto" && _fast_clz
=no
1971 # 64-bit prescotts exist, but as far as GCC is concerned they
1972 # have the same capabilities as a nocona.
1974 test $_fast_cmov = "auto" && _fast_cmov
=no
1975 test $_fast_clz = "auto" && _fast_clz
=no
1982 fi # test "$_runtime_cpudetection" = no
1984 echocheck
"GCC & CPU optimization abilities"
1985 # This is a stripped-down version of the i386 fallback.
1986 if test "$_runtime_cpudetection" = no
; then
1987 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1988 cflag_check
-march=native
&& proc
=native
1990 # --- AMD processors ---
1991 if test "$proc" = "amdfam10"; then
1992 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1994 if test "$proc" = "k8"; then
1995 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1997 # This will fail if gcc version < 3.3, which is ok because earlier
1998 # versions don't really support 64-bit on amd64.
1999 # Is this a valid assumption? -Corey
2000 if test "$proc" = "athlon-xp"; then
2001 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
2003 # --- Intel processors ---
2004 if test "$proc" = "core2"; then
2005 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2007 if test "$proc" = "x86-64"; then
2008 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
2010 if test "$proc" = "nocona"; then
2011 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2013 if test "$proc" = "pentium4"; then
2014 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
2017 _march
="-march=$proc"
2018 _mcpu
="$cpuopt=$proc"
2019 if test "$proc" = "error" ; then
2020 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2024 else # if test "$_runtime_cpudetection" = no
2025 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2026 _march
="-march=x86-64"
2027 _mcpu
="$cpuopt=generic"
2028 cflag_check
$_mcpu || _mcpu
="x86-64"
2029 cflag_check
$_mcpu || _mcpu
=""
2030 cflag_check
$_march $_mcpu || _march
=""
2034 test $_fast_cmov = "auto" && _fast_cmov
=yes
2035 test $_fast_clz = "auto" && _fast_clz
=yes
2043 if test "$host_arch" = "sparc64" ; then
2046 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2048 echocheck
"CPU type"
2050 case "$(echo $karch)" in
2055 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2074 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2076 test $_fast_clz = "auto" && _fast_clz
=yes
2084 ppc|ppc64|powerpc|powerpc64
)
2086 def_dcbzl
='#define HAVE_DCBZL 0'
2087 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2090 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2092 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2094 echocheck
"CPU type"
2095 case $system_name in
2097 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2098 if test -n "$($_cpuinfo | grep altivec)"; then
2099 test $_altivec = auto
&& _altivec
=yes
2103 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2104 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2105 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2106 test $_altivec = auto
&& _altivec
=yes
2110 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2112 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2115 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2116 test $_altivec = auto
&& _altivec
=yes
2122 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2125 if test "$_altivec" = yes; then
2126 echores
"$proc altivec"
2132 echocheck
"GCC & CPU optimization abilities"
2134 if test -n "$proc"; then
2136 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2137 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2138 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2139 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2140 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2141 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2142 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2143 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2144 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2147 # gcc 3.1(.1) and up supports 7400 and 7450
2148 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2150 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2151 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2155 # gcc 3.2 and up supports 970
2156 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2158 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2159 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2163 # gcc 3.3 and up supports POWER4
2164 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2166 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2170 # gcc 3.4 and up supports 440*
2171 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2173 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2174 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2178 # gcc 4.0 and up supports POWER5
2179 if test "$_cc_major" -ge "4"; then
2181 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2187 if test -n "$_mcpu"; then
2188 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2189 echores
"$_optimizing"
2194 test $_fast_clz = "auto" && _fast_clz
=yes
2201 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2203 echocheck
"CPU type"
2206 unsigned long ver, mask;
2207 __asm__ ("implver %0" : "=r" (ver));
2208 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2209 printf("%ld-%x\n", ver, ~mask);
2213 $_cc -o "$TMPEXE" "$TMPC"
2214 case $
("$TMPEXE") in
2216 0-0) proc
="ev4"; _mvi
="0";;
2217 1-0) proc
="ev5"; _mvi
="0";;
2218 1-1) proc
="ev56"; _mvi
="0";;
2219 1-101) proc
="pca56"; _mvi
="1";;
2220 2-303) proc
="ev6"; _mvi
="1";;
2221 2-307) proc
="ev67"; _mvi
="1";;
2222 2-1307) proc
="ev68"; _mvi
="1";;
2226 echocheck
"GCC & CPU optimization abilities"
2227 if test "$proc" = "ev68" ; then
2228 cc_check
-mcpu=$proc || proc
=ev67
2230 if test "$proc" = "ev67" ; then
2231 cc_check
-mcpu=$proc || proc
=ev6
2236 test $_fast_clz = "auto" && _fast_clz
=yes
2246 echocheck
"CPU type"
2247 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2248 case "$(echo $proc)" in
2249 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2250 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2251 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2252 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2253 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2254 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2256 # gcc < 3.x does not support -mtune.
2257 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2263 test $_fast_clz = "auto" && _fast_clz
=yes
2297 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2298 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2299 die
"unsupported architecture $host_arch"
2301 esac # case "$host_arch" in
2303 if test "$_runtime_cpudetection" = yes ; then
2305 test "$_cmov" != no
&& _cmov
=yes
2307 test "$_mmx" != no
&& _mmx
=yes
2308 test "$_3dnow" != no
&& _3dnow
=yes
2309 test "$_3dnowext" != no
&& _3dnowext
=yes
2310 test "$_mmxext" != no
&& _mmxext
=yes
2311 test "$_sse" != no
&& _sse
=yes
2312 test "$_sse2" != no
&& _sse2
=yes
2313 test "$_ssse3" != no
&& _ssse3
=yes
2314 test "$_mtrr" != no
&& _mtrr
=yes
2323 echocheck
"byte order"
2324 if test "$_big_endian" = auto
; then
2326 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2327 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2328 int main(void) { return (long)ascii_name; }
2331 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2337 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2340 if test "$_big_endian" = yes ; then
2341 _byte_order
='big-endian'
2342 def_words_endian
='#define WORDS_BIGENDIAN 1'
2343 def_bigendian
='#define HAVE_BIGENDIAN 1'
2345 _byte_order
='little-endian'
2346 def_words_endian
='#undef WORDS_BIGENDIAN'
2347 def_bigendian
='#define HAVE_BIGENDIAN 0'
2349 echores
"$_byte_order"
2352 echocheck
"extern symbol prefix"
2356 cc_check
-c || die
"Symbol mangling check failed."
2357 sym
=$
($_nm -P -g $TMPEXE)
2358 extern_prefix
=${sym%%ff_extern*}
2359 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2360 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2361 echores
$extern_prefix
2364 echocheck
"assembler support of -pipe option"
2365 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2366 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2369 echocheck
"compiler support of named assembler arguments"
2371 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2372 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2373 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2375 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2377 echores
$_named_asm_args
2380 if darwin
&& test "$cc_vendor" = "gnu" ; then
2381 echocheck
"GCC support of -mstackrealign"
2382 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2383 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2384 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2385 # wrong code with this flag, but this can be worked around by adding
2386 # -fno-unit-at-a-time as described in the blog post at
2387 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2389 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2390 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2392 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2393 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2394 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2395 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2396 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2399 # Checking for CFLAGS
2401 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2402 CFLAGS
="-O2 $_march $_mcpu $_pipe $_debug $_profile"
2403 WARNFLAGS
="-W -Wall"
2405 elif test -z "$CFLAGS" ; then
2406 if test "$cc_vendor" = "intel" ; then
2407 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2408 WARNFLAGS
="-wd167 -wd556 -wd144"
2409 elif test "$cc_vendor" = "sun" ; then
2410 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2411 elif test "$cc_vendor" = "clang"; then
2412 CFLAGS
="-O2 $_march $_pipe"
2413 elif test "$cc_vendor" != "gnu" ; then
2414 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2416 CFLAGS
="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2417 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2418 extra_ldflags
="$extra_ldflags -ffast-math"
2424 if test "$cc_vendor" = "gnu" ; then
2425 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2426 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2427 # that's the only variable specific to C now, and this option is not valid
2429 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2430 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2431 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2432 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2433 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2435 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2438 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2439 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2442 if test -n "$LDFLAGS" ; then
2443 extra_ldflags
="$extra_ldflags $LDFLAGS"
2445 elif test "$cc_vendor" = "intel" ; then
2446 extra_ldflags
="$extra_ldflags -i-static"
2448 if test -n "$CPPFLAGS" ; then
2449 extra_cflags
="$extra_cflags $CPPFLAGS"
2456 # Checking assembler (_as) compatibility...
2457 # Added workaround for older as that reads from stdin by default - atmos
2458 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2459 echocheck
"assembler ($_as $as_version)"
2461 _pref_as_version
='2.9.1'
2463 if test "$_mmx" = yes ; then
2464 echo 'emms' >> $TMPS
2466 if test "$_3dnow" = yes ; then
2467 _pref_as_version
='2.10.1'
2468 echo 'femms' >> $TMPS
2470 if test "$_3dnowext" = yes ; then
2471 _pref_as_version
='2.10.1'
2472 echo 'pswapd %mm0, %mm0' >> $TMPS
2474 if test "$_mmxext" = yes ; then
2475 _pref_as_version
='2.10.1'
2476 echo 'movntq %mm0, (%eax)' >> $TMPS
2478 if test "$_sse" = yes ; then
2479 _pref_as_version
='2.10.1'
2480 echo 'xorps %xmm0, %xmm0' >> $TMPS
2482 #if test "$_sse2" = yes ; then
2483 # _pref_as_version='2.11'
2484 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2486 if test "$_cmov" = yes ; then
2487 _pref_as_version
='2.10.1'
2488 echo 'cmovb %eax, %ebx' >> $TMPS
2490 if test "$_ssse3" = yes ; then
2491 _pref_as_version
='2.16.92'
2492 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2494 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2496 if test "$as_verc_fail" != yes ; then
2499 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2501 die
"obsolete binutils version"
2506 echocheck
".align is a power of two"
2507 if test "$_asmalign_pot" = auto
; then
2510 int main(void) { __asm__ (".align 3"); return 0; }
2512 cc_check
&& _asmalign_pot
=yes
2514 if test "$_asmalign_pot" = "yes" ; then
2515 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2517 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2519 echores
$_asmalign_pot
2526 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2527 #error PIC not enabled
2532 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2537 echocheck
"10 assembler operands"
2539 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2545 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2550 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2551 echores
$ten_operands
2553 echocheck
"ebx availability"
2555 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2562 // just adding ebx to clobber list seems unreliable with some
2563 // compilers, e.g. Haiku's gcc 2.95
2565 // and the above check does not work for OSX 64 bit...
2566 __asm__ volatile("":::"%ebx");
2570 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2571 echores
$ebx_available
2575 if test -z "$YASMFLAGS" ; then
2577 x86_64
&& objformat
="macho64" || objformat
="macho"
2583 # currently tested for Linux x86, x86_64
2584 YASMFLAGS
="-f $objformat"
2585 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2586 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2587 case "$objformat" in
2588 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2589 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2595 echo "pabsw xmm0, xmm0" > $TMPS
2596 yasm_check || _yasm
=""
2597 if test $_yasm ; then
2598 def_yasm
='#define HAVE_YASM 1'
2602 def_yasm
='#define HAVE_YASM 0'
2608 def_bswap
='#define HAVE_BSWAP 0'
2609 echo 'bswap %eax' > $TMPS
2610 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2615 #FIXME: This should happen before the check for CFLAGS..
2616 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2617 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2619 # check if AltiVec is supported by the compiler, and how to enable it
2620 echocheck
"GCC AltiVec flags"
2621 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2622 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2623 # check if <altivec.h> should be included
2624 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2625 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2626 inc_altivec_h
='#include <altivec.h>'
2628 if $
(cflag_check
-faltivec) ; then
2629 _altivec_gcc_flags
="-faltivec"
2632 _altivec_gcc_flags
="none, AltiVec disabled"
2636 echores
"$_altivec_gcc_flags"
2638 # check if the compiler supports braces for vector declarations
2641 int main(void) { (vector int) {1}; return 0; }
2643 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2645 # Disable runtime cpudetection if we cannot generate AltiVec code or
2646 # AltiVec is disabled by the user.
2647 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2648 && _runtime_cpudetection
=no
2650 # Show that we are optimizing for AltiVec (if enabled and supported).
2651 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2652 && _optimizing
="$_optimizing altivec"
2654 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2655 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2659 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2661 echocheck
"XFORM ASM support"
2663 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2665 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2666 echores
"$xform_asm"
2670 echocheck
"ARM pld instruction"
2672 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2678 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2679 if test $_armv5te = "auto" ; then
2681 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2684 cc_check
&& _armv5te
=yes
2688 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2690 echocheck
"ARMv6 (SIMD instructions)"
2691 if test $_armv6 = "auto" ; then
2693 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2696 cc_check
&& _armv6
=yes
2700 echocheck
"ARMv6t2 (SIMD instructions)"
2701 if test $_armv6t2 = "auto" ; then
2703 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2706 cc_check
&& _armv6t2
=yes
2711 if test $_armvfp = "auto" ; then
2713 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2716 cc_check
&& _armvfp
=yes
2720 echocheck
"ARM NEON"
2721 if test $neon = "auto" ; then
2723 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2726 cc_check
&& neon
=yes
2730 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2731 if test $_iwmmxt = "auto" ; then
2733 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2736 cc_check
&& _iwmmxt
=yes
2741 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2742 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2743 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2744 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2745 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2746 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2747 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2748 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2749 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2750 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2751 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2752 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2753 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2754 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2755 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2756 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2757 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2758 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2759 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2760 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2761 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2763 # Checking kernel version...
2764 if x86_32
&& linux
; then
2766 kernel_version
=$
(uname
-r 2>&1)
2767 echocheck
"$system_name kernel version"
2768 case "$kernel_version" in
2769 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2770 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2771 _k_verc_problem
=yes;;
2773 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2776 if test "$_k_verc_fail" ; then
2777 echores
"$kernel_version, fail"
2778 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2779 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2780 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2781 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2782 echo "2.2.x you must upgrade it to get SSE support!"
2783 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2785 echores
"$kernel_version, ok"
2789 ######################
2790 # MAIN TESTS GO HERE #
2791 ######################
2795 if cflag_check
-lposix ; then
2796 extra_ldflags
="$extra_ldflags -lposix"
2803 if cflag_check
-lm ; then
2812 echocheck
"langinfo"
2813 if test "$_langinfo" = auto
; then
2815 function_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2817 if test "$_langinfo" = yes ; then
2818 def_langinfo
='#define HAVE_LANGINFO 1'
2820 def_langinfo
='#undef HAVE_LANGINFO'
2822 echores
"$_langinfo"
2825 echocheck
"translation support"
2826 if test "$_translation" = yes; then
2827 def_translation
="#define CONFIG_TRANSLATION 1"
2829 def_translation
="#undef CONFIG_TRANSLATION"
2831 echores
"$_translation"
2833 echocheck
"language"
2834 # Set preferred languages, "all" uses English as main language.
2835 test -z "$language" && language
=$LINGUAS
2836 test -z "$language_doc" && language_doc
=$language
2837 test -z "$language_man" && language_man
=$language
2838 test -z "$language_msg" && language_msg
="all"
2839 language_doc
=$
(echo $language_doc |
tr , " ")
2840 language_man
=$
(echo $language_man |
tr , " ")
2841 language_msg
=$
(echo $language_msg |
tr , " ")
2843 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2844 test "$language_man" = "all" && language_man
=$man_lang_all
2845 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2847 if test "$_translation" != yes ; then
2851 # Prune non-existing translations from language lists.
2852 # Set message translation to the first available language.
2853 # Fall back on English.
2854 for lang
in $language_doc ; do
2855 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2857 language_doc
=$tmp_language_doc
2858 test -z "$language_doc" && language_doc
=en
2860 for lang
in $language_man ; do
2861 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2863 language_man
=$tmp_language_man
2864 test -z "$language_man" && language_man
=en
2866 for lang
in $language_msg ; do
2867 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2869 language_msg
=$tmp_language_msg
2871 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2874 echocheck
"enable sighandler"
2875 if test "$_sighandler" = yes ; then
2876 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2878 def_sighandler
='#undef CONFIG_SIGHANDLER'
2880 echores
"$_sighandler"
2882 echocheck
"runtime cpudetection"
2883 if test "$_runtime_cpudetection" = yes ; then
2884 _optimizing
="Runtime CPU-Detection enabled"
2885 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2887 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2889 echores
"$_runtime_cpudetection"
2892 echocheck
"restrict keyword"
2893 for restrict_keyword
in restrict __restrict __restrict__
; do
2894 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2896 def_restrict_keyword
=$restrict_keyword
2900 if [ -n "$def_restrict_keyword" ]; then
2901 echores
"$def_restrict_keyword"
2905 # Avoid infinite recursion loop ("#define restrict restrict")
2906 if [ "$def_restrict_keyword" != "restrict" ]; then
2907 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2909 def_restrict_keyword
=""
2913 echocheck
"__builtin_expect"
2914 # GCC branch prediction hint
2916 static int foo(int a) {
2917 a = __builtin_expect(a, 10);
2918 return a == 10 ? 0 : 1;
2920 int main(void) { return foo(10) && foo(0); }
2923 cc_check
&& _builtin_expect
=yes
2924 if test "$_builtin_expect" = yes ; then
2925 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2927 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2929 echores
"$_builtin_expect"
2934 function_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2935 if test "$_kstat" = yes ; then
2936 def_kstat
="#define HAVE_LIBKSTAT 1"
2937 extra_ldflags
="$extra_ldflags -lkstat"
2939 def_kstat
="#undef HAVE_LIBKSTAT"
2945 # required for nanosleep on some systems
2947 function_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2948 if test "$_posix4" = yes ; then
2949 extra_ldflags
="$extra_ldflags -lposix4"
2953 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2956 function_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2957 if eval test "x\$_$func" = "xyes"; then
2958 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2961 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2970 int main(void) { char a; mkstemp(&a); return 0; }
2973 cc_check
&& _mkstemp
=yes
2974 if test "$_mkstemp" = yes ; then
2975 def_mkstemp
='#define HAVE_MKSTEMP 1'
2977 def_mkstemp
='#undef HAVE_MKSTEMP'
2982 echocheck
"nanosleep"
2984 function_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2985 if test "$_nanosleep" = yes ; then
2986 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2988 def_nanosleep
='#undef HAVE_NANOSLEEP'
2990 echores
"$_nanosleep"
2994 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2995 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2998 #include <sys/socket.h>
2999 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
3002 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3003 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3005 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3006 if test $_winsock2_h = auto
; then
3008 function_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3010 test "$_ld_sock" && res_comment
="using $_ld_sock"
3014 if test $_winsock2_h = yes ; then
3016 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3018 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3022 echocheck
"arpa/inet.h"
3024 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3025 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
3026 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3027 echores
"$arpa_inet_h"
3030 echocheck
"inet_pton()"
3031 def_inet_pton
='#define HAVE_INET_PTON 0'
3034 #include <sys/types.h>
3035 #include <sys/socket.h>
3036 #include <arpa/inet.h>
3037 int main(void) { inet_pton(0, 0, 0); return 0; }
3039 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3040 cc_check
$_ld_tmp && inet_pton
=yes && break
3042 if test $inet_pton = yes ; then
3043 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3044 def_inet_pton
='#define HAVE_INET_PTON 1'
3046 echores
"$inet_pton"
3049 echocheck
"inet_aton()"
3050 def_inet_aton
='#define HAVE_INET_ATON 0'
3053 #include <sys/types.h>
3054 #include <sys/socket.h>
3055 #include <arpa/inet.h>
3056 int main(void) { inet_aton(0, 0); return 0; }
3058 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3059 cc_check
$_ld_tmp && inet_aton
=yes && break
3061 if test $inet_aton = yes ; then
3062 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3063 def_inet_aton
='#define HAVE_INET_ATON 1'
3065 echores
"$inet_aton"
3068 echocheck
"socklen_t"
3070 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3073 int main(void) { socklen_t v = 0; return v; }
3075 cc_check
&& _socklen_t
=yes && break
3077 if test "$_socklen_t" = yes ; then
3078 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3080 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3082 echores
"$_socklen_t"
3085 echocheck
"closesocket()"
3087 function_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
3088 if test "$_closesocket" = yes ; then
3089 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3091 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3093 echores
"$_closesocket"
3096 echocheck
"networking"
3097 test $_winsock2_h = no
&& test $inet_pton = no
&&
3098 test $inet_aton = no
&& networking
=no
3099 if test "$networking" = yes ; then
3100 def_network
='#define CONFIG_NETWORK 1'
3101 def_networking
='#define CONFIG_NETWORKING 1'
3102 extra_ldflags
="$extra_ldflags $_ld_sock"
3103 inputmodules
="networking $inputmodules"
3105 noinputmodules
="networking $noinputmodules"
3106 def_network
='#undef CONFIG_NETWORK'
3107 def_networking
='#undef CONFIG_NETWORKING'
3110 echores
"$networking"
3114 if test "$_inet6" = auto
; then
3116 #include <sys/types.h>
3117 #if !defined(_WIN32) || defined(__CYGWIN__)
3118 #include <sys/socket.h>
3119 #include <netinet/in.h>
3121 #include <ws2tcpip.h>
3123 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3126 if cc_check
$_ld_sock ; then
3130 if test "$_inet6" = yes ; then
3131 def_inet6
='#define HAVE_AF_INET6 1'
3133 def_inet6
='#undef HAVE_AF_INET6'
3138 echocheck
"gethostbyname2"
3139 if test "$_gethostbyname2" = auto
; then
3141 #include <sys/types.h>
3142 #include <sys/socket.h>
3144 int main(void) { gethostbyname2("", AF_INET); return 0; }
3151 if test "$_gethostbyname2" = yes ; then
3152 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3154 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3156 echores
"$_gethostbyname2"
3159 echocheck
"inttypes.h (required)"
3161 header_check inttypes.h
&& _inttypes
=yes
3162 echores
"$_inttypes"
3164 if test "$_inttypes" = no
; then
3165 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3166 header_check sys
/bitypes.h
&& _inttypes
=yes
3167 if test "$_inttypes" = yes ; then
3168 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."
3170 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3175 echocheck
"int_fastXY_t in inttypes.h"
3177 #include <inttypes.h>
3179 volatile int_fast16_t v= 0;
3183 cc_check
&& _fast_inttypes
=yes
3184 if test "$_fast_inttypes" = no
; then
3186 typedef signed char int_fast8_t;
3187 typedef signed int int_fast16_t;
3188 typedef signed int int_fast32_t;
3189 typedef signed long long int_fast64_t;
3190 typedef unsigned char uint_fast8_t;
3191 typedef unsigned int uint_fast16_t;
3192 typedef unsigned int uint_fast32_t;
3193 typedef unsigned long long uint_fast64_t;'
3195 echores
"$_fast_inttypes"
3198 echocheck
"malloc.h"
3200 header_check malloc.h
&& _malloc
=yes
3201 if test "$_malloc" = yes ; then
3202 def_malloc_h
='#define HAVE_MALLOC_H 1'
3204 def_malloc_h
='#define HAVE_MALLOC_H 0'
3209 echocheck
"memalign()"
3210 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3211 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3213 function_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3214 if test "$_memalign" = yes ; then
3215 def_memalign
='#define HAVE_MEMALIGN 1'
3217 def_memalign
='#define HAVE_MEMALIGN 0'
3218 def_map_memalign
='#define memalign(a,b) malloc(b)'
3219 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3221 echores
"$_memalign"
3224 echocheck
"posix_memalign()"
3226 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3228 #define _XOPEN_SOURCE 600
3230 int main(void) { posix_memalign(NULL, 0, 0); }
3232 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3233 echores
"$posix_memalign"
3236 echocheck
"alloca.h"
3238 function_check alloca.h
'alloca(0)' && _alloca
=yes
3240 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3242 def_alloca_h
='#undef HAVE_ALLOCA_H'
3247 echocheck
"fastmemcpy"
3248 if test "$_fastmemcpy" = yes ; then
3249 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3251 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3253 echores
"$_fastmemcpy"
3258 function_check sys
/mman.h
"mmap(0, 0, 0, 0, 0, 0)" && _mman
=yes
3259 if test "$_mman" = yes ; then
3260 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3262 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3263 os2
&& _need_mmap
=yes
3268 #include <sys/mman.h>
3269 int main(void) { void *p = MAP_FAILED; return 0; }
3271 _mman_has_map_failed
=no
3272 cc_check
&& _mman_has_map_failed
=yes
3273 if test "$_mman_has_map_failed" = yes ; then
3274 def_mman_has_map_failed
=''
3276 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3279 echocheck
"dynamic loader"
3281 for _ld_tmp
in "" "-ldl"; do
3282 function_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3284 if test "$_dl" = yes ; then
3285 def_dl
='#define HAVE_LIBDL 1'
3287 def_dl
='#undef HAVE_LIBDL'
3292 echocheck
"dynamic a/v plugins support"
3293 if test "$_dl" = no
; then
3296 if test "$_dynamic_plugins" = yes ; then
3297 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3299 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3301 echores
"$_dynamic_plugins"
3304 def_threads
='#define HAVE_THREADS 0'
3308 THREAD_CFLAGS
=-D_REENTRANT
3309 elif freebsd || netbsd || openbsd || bsdos
; then
3310 THREAD_CFLAGS
=-D_THREAD_SAFE
3312 if test "$_pthreads" = auto
; then
3314 #include <pthread.h>
3315 static void *func(void *arg) { return arg; }
3316 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3320 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3321 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3322 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3326 if test "$_pthreads" = yes ; then
3327 test $_ld_pthread && res_comment
="using $_ld_pthread"
3328 def_pthreads
='#define HAVE_PTHREADS 1'
3329 def_threads
='#define HAVE_THREADS 1'
3330 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3332 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3333 def_pthreads
='#undef HAVE_PTHREADS'
3334 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3335 mingw32 || _win32dll
=no
3337 echores
"$_pthreads"
3340 if test "$_pthreads" = yes ; then
3341 def_pthread_cache
="#define PTHREAD_CACHE 1"
3344 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3348 echocheck
"w32threads"
3349 if test "$_pthreads" = yes ; then
3350 res_comment
="using pthread instead"
3353 if test "$_w32threads" = auto
; then
3355 mingw32
&& _w32threads
=yes
3357 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3358 echores
"$_w32threads"
3362 if test "$_rpath" = yes ; then
3363 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3364 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3371 if test "$_iconv" = auto
; then
3376 #define INBUFSIZE 1024
3377 #define OUTBUFSIZE 4096
3379 char inbuffer[INBUFSIZE];
3380 char outbuffer[OUTBUFSIZE];
3385 char *tocode="UTF-8";
3386 char *fromcode="cp1250";
3387 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3388 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3389 char *iptr=inbuffer;
3390 char *optr=outbuffer;
3391 size_t inleft=numread;
3392 size_t outleft=OUTBUFSIZE;
3393 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3395 write(1, outbuffer, OUTBUFSIZE - outleft);
3398 if (iconv_close(icdsc) == -1)
3405 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3406 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3410 if test "$_iconv" = yes ; then
3411 def_iconv
='#define CONFIG_ICONV 1'
3413 def_iconv
='#undef CONFIG_ICONV'
3418 echocheck
"soundcard.h"
3420 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3421 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3422 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3423 header_check
$_soundcard_header && _soundcard_h
=yes &&
3424 res_comment
="$_soundcard_header" && break
3427 if test "$_soundcard_h" = yes ; then
3428 if test $_soundcard_header = "sys/soundcard.h"; then
3429 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3431 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3434 echores
"$_soundcard_h"
3437 echocheck
"sys/dvdio.h"
3439 # FreeBSD 8.1 has broken dvdio.h
3440 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3441 if test "$_dvdio" = yes ; then
3442 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3444 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3449 echocheck
"sys/cdio.h"
3451 # at least OpenSolaris has a broken cdio.h
3452 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3453 if test "$_cdio" = yes ; then
3454 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3456 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3461 echocheck
"linux/cdrom.h"
3463 header_check linux
/cdrom.h
&& _cdrom
=yes
3464 if test "$_cdrom" = yes ; then
3465 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3467 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3474 header_check dvd.h
&& _dvd
=yes
3475 if test "$_dvd" = yes ; then
3476 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3478 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3484 echocheck
"BSDI dvd.h"
3486 header_check dvd.h
&& _bsdi_dvd
=yes
3487 if test "$_bsdi_dvd" = yes ; then
3488 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3490 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3492 echores
"$_bsdi_dvd"
3497 # also used by AIX, but AIX does not support VCD and/or libdvdread
3498 echocheck
"HP-UX SCSI header"
3500 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3501 if test "$_hpux_scsi_h" = yes ; then
3502 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3504 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3506 echores
"$_hpux_scsi_h"
3511 echocheck
"userspace SCSI headers (Solaris)"
3513 header_check sys
/scsi
/scsi_types.h
&&
3514 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3516 if test "$_sol_scsi_h" = yes ; then
3517 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3519 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3521 echores
"$_sol_scsi_h"
3526 if test "$_termcap" = auto
; then
3530 int main(void) { tgetent(NULL, NULL); return 0; }
3533 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3534 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3535 && _termcap
=yes && break
3538 if test "$_termcap" = yes ; then
3539 def_termcap
='#define HAVE_TERMCAP 1'
3540 test $_ld_tmp && res_comment
="using $_ld_tmp"
3542 def_termcap
='#undef HAVE_TERMCAP'
3548 def_termios
='#undef HAVE_TERMIOS'
3549 def_termios_h
='#undef HAVE_TERMIOS_H'
3550 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3551 if test "$_termios" = auto
; then
3553 for _termios_header
in "termios.h" "sys/termios.h"; do
3554 header_check
$_termios_header && _termios
=yes &&
3555 res_comment
="using $_termios_header" && break
3559 if test "$_termios" = yes ; then
3560 def_termios
='#define HAVE_TERMIOS 1'
3561 if test "$_termios_header" = "termios.h" ; then
3562 def_termios_h
='#define HAVE_TERMIOS_H 1'
3564 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3571 if test "$_shm" = auto
; then
3573 #include <sys/types.h>
3574 #include <sys/shm.h>
3575 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3578 cc_check
&& _shm
=yes
3580 if test "$_shm" = yes ; then
3581 def_shm
='#define HAVE_SHM 1'
3583 def_shm
='#undef HAVE_SHM'
3588 echocheck
"strsep()"
3591 int main(void) { char *s = "Hello, world!"; strsep(&s, ","); return 0; }
3594 cc_check
&& _strsep
=yes
3595 if test "$_strsep" = yes ; then
3596 def_strsep
='#define HAVE_STRSEP 1'
3599 def_strsep
='#undef HAVE_STRSEP'
3605 echocheck
"vsscanf()"
3607 #define _ISOC99_SOURCE
3610 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3613 cc_check
&& _vsscanf
=yes
3614 if test "$_vsscanf" = yes ; then
3615 def_vsscanf
='#define HAVE_VSSCANF 1'
3618 def_vsscanf
='#undef HAVE_VSSCANF'
3626 #define _XOPEN_SOURCE 600
3628 int main(void) { swab(NULL, NULL, 0); return 0; }
3631 cc_check
&& _swab
=yes
3632 if test "$_swab" = yes ; then
3633 def_swab
='#define HAVE_SWAB 1'
3636 def_swab
='#undef HAVE_SWAB'
3641 echocheck
"POSIX select()"
3645 #include <sys/types.h>
3647 #include <sys/time.h>
3649 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3652 def_posix_select
='#undef HAVE_POSIX_SELECT'
3653 #select() of kLIBC (OS/2) supports socket only
3654 ! os2
&& cc_check
&& _posix_select
=yes \
3655 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3656 echores
"$_posix_select"
3659 echocheck
"audio select()"
3660 if test "$_select" = no
; then
3661 def_select
='#undef HAVE_AUDIO_SELECT'
3662 elif test "$_select" = yes ; then
3663 def_select
='#define HAVE_AUDIO_SELECT 1'
3668 echocheck
"gettimeofday()"
3670 #include <sys/time.h>
3671 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3674 cc_check
&& _gettimeofday
=yes
3675 if test "$_gettimeofday" = yes ; then
3676 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3677 _need_gettimeofday
=no
3679 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3680 _need_gettimeofday
=yes
3682 echores
"$_gettimeofday"
3689 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3692 cc_check
&& _glob
=yes
3693 if test "$_glob" = yes ; then
3694 def_glob
='#define HAVE_GLOB 1'
3697 def_glob
='#undef HAVE_GLOB'
3703 echocheck
"setenv()"
3705 function_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3706 if test "$_setenv" = yes ; then
3707 def_setenv
='#define HAVE_SETENV 1'
3710 def_setenv
='#undef HAVE_SETENV'
3716 echocheck
"setmode()"
3718 def_setmode
='#define HAVE_SETMODE 0'
3719 function_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3724 echocheck
"sysi86()"
3726 function_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3727 if test "$_sysi86" = yes ; then
3728 def_sysi86
='#define HAVE_SYSI86 1'
3730 #include <sys/sysi86.h>
3731 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3733 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3735 def_sysi86
='#undef HAVE_SYSI86'
3741 echocheck
"sys/sysinfo.h"
3743 #include <sys/sysinfo.h>
3745 struct sysinfo s_info;
3751 cc_check
&& _sys_sysinfo
=yes
3752 if test "$_sys_sysinfo" = yes ; then
3753 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3755 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3757 echores
"$_sys_sysinfo"
3762 echocheck
"Mac OS X Finder Support"
3763 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3764 if test "$_macosx_finder" = yes ; then
3765 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3766 extra_ldflags
="$extra_ldflags -framework Carbon"
3768 echores
"$_macosx_finder"
3770 echocheck
"Mac OS X Bundle file locations"
3771 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3772 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3773 if test "$_macosx_bundle" = yes ; then
3774 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3775 extra_ldflags
="$extra_ldflags -framework Carbon"
3777 echores
"$_macosx_bundle"
3779 echocheck
"Apple Remote"
3780 if test "$_apple_remote" = auto
; then
3784 #include <IOKit/IOCFPlugIn.h>
3786 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3787 CFMutableDictionaryRef hidMatchDictionary;
3788 IOReturn ioReturnValue;
3790 // Set up a matching dictionary to search the I/O Registry by class.
3791 // name for all HID class devices
3792 hidMatchDictionary = IOServiceMatching("AppleIRController");
3794 // Now search I/O Registry for matching devices.
3795 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3796 hidMatchDictionary, &hidObjectIterator);
3798 // If search is unsuccessful, return nonzero.
3799 if (ioReturnValue != kIOReturnSuccess ||
3800 !IOIteratorIsValid(hidObjectIterator)) {
3806 cc_check
-framework IOKit
&& _apple_remote
=yes
3808 if test "$_apple_remote" = yes ; then
3809 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3810 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3812 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3814 echores
"$_apple_remote"
3820 echocheck
"Apple IR"
3821 if test "$_apple_ir" = auto
; then
3824 #include <linux/types.h>
3825 #include <linux/input.h>
3827 struct input_event ev;
3832 cc_check
&& _apple_ir
=yes
3834 if test "$_apple_ir" = yes ; then
3835 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3837 def_apple_ir
='#undef CONFIG_APPLE_IR'
3839 echores
"$_apple_ir"
3842 echocheck
"pkg-config"
3843 _pkg_config
=pkg-config
3844 if $
($_pkg_config --version > /dev
/null
2>&1); then
3845 if test "$_ld_static"; then
3846 _pkg_config
="$_pkg_config --static"
3855 echocheck
"Samba support (libsmbclient)"
3856 if test "$_smb" = yes; then
3857 extra_ldflags
="$extra_ldflags -lsmbclient"
3859 if test "$_smb" = auto
; then
3861 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3862 function_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3863 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3867 if test "$_smb" = yes; then
3868 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3869 inputmodules
="smb $inputmodules"
3871 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3872 noinputmodules
="smb $noinputmodules"
3883 if test "$_tdfxfb" = yes ; then
3884 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3885 vomodules
="tdfxfb $vomodules"
3887 def_tdfxfb
='#undef CONFIG_TDFXFB'
3888 novomodules
="tdfxfb $novomodules"
3893 if test "$_s3fb" = yes ; then
3894 def_s3fb
='#define CONFIG_S3FB 1'
3895 vomodules
="s3fb $vomodules"
3897 def_s3fb
='#undef CONFIG_S3FB'
3898 novomodules
="s3fb $novomodules"
3903 if test "$_wii" = yes ; then
3904 def_wii
='#define CONFIG_WII 1'
3905 vomodules
="wii $vomodules"
3907 def_wii
='#undef CONFIG_WII'
3908 novomodules
="wii $novomodules"
3913 if test "$_tdfxvid" = yes ; then
3914 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3915 vomodules
="tdfx_vid $vomodules"
3917 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3918 novomodules
="tdfx_vid $novomodules"
3923 if test "$_xvr100" = auto
; then
3926 #include <sys/fbio.h>
3927 #include <sys/visual_io.h>
3929 struct vis_identifier ident;
3930 struct fbgattr attr;
3931 ioctl(0, VIS_GETIDENTIFIER, &ident);
3932 ioctl(0, FBIOGATTR, &attr);
3937 cc_check
&& _xvr100
=yes
3939 if test "$_xvr100" = yes ; then
3940 def_xvr100
='#define CONFIG_XVR100 1'
3941 vomodules
="xvr100 $vomodules"
3943 def_tdfxvid
='#undef CONFIG_XVR100'
3944 novomodules
="xvr100 $novomodules"
3949 if test "$_tga" = yes ; then
3950 def_tga
='#define CONFIG_TGA 1'
3951 vomodules
="tga $vomodules"
3953 def_tga
='#undef CONFIG_TGA'
3954 novomodules
="tga $novomodules"
3959 echocheck
"md5sum support"
3960 if test "$_md5sum" = yes; then
3961 def_md5sum
="#define CONFIG_MD5SUM 1"
3962 vomodules
="md5sum $vomodules"
3964 def_md5sum
="#undef CONFIG_MD5SUM"
3965 novomodules
="md5sum $novomodules"
3970 echocheck
"yuv4mpeg support"
3971 if test "$_yuv4mpeg" = yes; then
3972 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3973 vomodules
="yuv4mpeg $vomodules"
3975 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3976 novomodules
="yuv4mpeg $novomodules"
3978 echores
"$_yuv4mpeg"
3982 if test "$_bl" = yes ; then
3983 def_bl
='#define CONFIG_BL 1'
3984 vomodules
="bl $vomodules"
3986 def_bl
='#undef CONFIG_BL'
3987 novomodules
="bl $novomodules"
3992 echocheck
"DirectFB"
3993 if test "$_directfb" = auto
; then
3995 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3996 function_check directfb.h
"DirectFBInit(0, 0)" $_inc_tmp -ldirectfb &&
3997 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
4002 expr $1 \
* 65536 + $2 \
* 256 + $3
4005 if test "$_directfb" = yes; then
4007 #include <directfb_version.h>
4009 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4012 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4013 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4014 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4015 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4016 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4017 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4018 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4019 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4020 res_comment
="$_directfb_version"
4021 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4023 def_directfb_version
='#undef DIRECTFBVERSION'
4025 res_comment
="version >=0.9.13 required"
4029 res_comment
="failed to get version"
4032 echores
"$_directfb"
4034 if test "$_directfb" = yes ; then
4035 def_directfb
='#define CONFIG_DIRECTFB 1'
4036 vomodules
="directfb $vomodules"
4037 libs_mplayer
="$libs_mplayer -ldirectfb"
4039 def_directfb
='#undef CONFIG_DIRECTFB'
4040 novomodules
="directfb $novomodules"
4042 if test "$_dfbmga" = yes; then
4043 vomodules
="dfbmga $vomodules"
4044 def_dfbmga
='#define CONFIG_DFBMGA 1'
4046 novomodules
="dfbmga $novomodules"
4047 def_dfbmga
='#undef CONFIG_DFBMGA'
4051 echocheck
"X11 headers presence"
4053 res_comment
="check if the dev(el) packages are installed"
4054 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4055 if test -f "$I/X11/Xlib.h" ; then
4061 if test $_cross_compile = no
; then
4062 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4063 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4064 if test -f "$I/X11/Xlib.h" ; then
4065 extra_cflags
="$extra_cflags -I$I"
4067 res_comment
="using $I"
4072 echores
"$_x11_headers"
4076 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4078 #include <X11/Xlib.h>
4079 #include <X11/Xutil.h>
4080 int main(void) { XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return 0; }
4082 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4083 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4086 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4088 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4090 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4091 && _x11
=yes && break
4094 if test "$_x11" = yes ; then
4095 def_x11
='#define CONFIG_X11 1'
4096 vomodules
="x11 xover $vomodules"
4099 def_x11
='#undef CONFIG_X11'
4100 novomodules
="x11 $novomodules"
4101 res_comment
="check if the dev(el) packages are installed"
4102 # disable stuff that depends on X
4103 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4107 echocheck
"Xss screensaver extensions"
4108 if test "$_xss" = auto
; then
4110 #include <X11/Xlib.h>
4111 #include <X11/extensions/scrnsaver.h>
4112 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4115 cc_check
-lXss && _xss
=yes
4117 if test "$_xss" = yes ; then
4118 def_xss
='#define CONFIG_XSS 1'
4119 libs_mplayer
="$libs_mplayer -lXss"
4121 def_xss
='#undef CONFIG_XSS'
4128 if test "$_x11" = yes ; then
4130 #include <X11/Xmd.h>
4131 #include <X11/Xlib.h>
4132 #include <X11/Xutil.h>
4133 #include <X11/Xatom.h>
4134 #include <X11/extensions/dpms.h>
4135 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
4137 cc_check
-lXdpms && _xdpms3
=yes
4139 #include <X11/Xlib.h>
4140 #include <X11/extensions/dpms.h>
4141 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
4143 cc_check
-lXext && _xdpms4
=yes
4145 if test "$_xdpms4" = yes ; then
4146 def_xdpms
='#define CONFIG_XDPMS 1'
4147 res_comment
="using Xdpms 4"
4149 elif test "$_xdpms3" = yes ; then
4150 def_xdpms
='#define CONFIG_XDPMS 1'
4151 libs_mplayer
="$libs_mplayer -lXdpms"
4152 res_comment
="using Xdpms 3"
4155 def_xdpms
='#undef CONFIG_XDPMS'
4161 if test "$_xv" = auto
; then
4163 #include <X11/Xlib.h>
4164 #include <X11/extensions/Xvlib.h>
4166 XvGetPortAttribute(0, 0, 0, 0);
4167 XvQueryPortAttributes(0, 0, 0);
4171 cc_check
-lXv && _xv
=yes
4174 if test "$_xv" = yes ; then
4175 def_xv
='#define CONFIG_XV 1'
4176 libs_mplayer
="$libs_mplayer -lXv"
4177 vomodules
="xv $vomodules"
4179 def_xv
='#undef CONFIG_XV'
4180 novomodules
="xv $novomodules"
4186 if test "$_xv" = yes && test "$_xvmc" != no
; then
4189 #include <X11/Xlib.h>
4190 #include <X11/extensions/Xvlib.h>
4191 #include <X11/extensions/XvMClib.h>
4193 XvMCQueryExtension(0, 0, 0);
4194 XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
4197 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4198 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4201 if test "$_xvmc" = yes ; then
4202 def_xvmc
='#define CONFIG_XVMC 1'
4203 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4204 vomodules
="xvmc $vomodules"
4205 res_comment
="using $_xvmclib"
4207 def_xvmc
='#define CONFIG_XVMC 0'
4208 novomodules
="xvmc $novomodules"
4214 if test "$_vdpau" = auto
; then
4216 if test "$_dl" = yes ; then
4218 #include <vdpau/vdpau_x11.h>
4220 vdp_device_create_x11(0, 0, 0, 0);
4221 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4223 cc_check
-lvdpau && _vdpau
=yes
4226 if test "$_vdpau" = yes ; then
4227 def_vdpau
='#define CONFIG_VDPAU 1'
4228 libs_mplayer
="$libs_mplayer -lvdpau"
4229 vomodules
="vdpau $vomodules"
4231 def_vdpau
='#define CONFIG_VDPAU 0'
4232 novomodules
="vdpau $novomodules"
4237 echocheck
"Xinerama"
4238 if test "$_xinerama" = auto
; then
4240 #include <X11/Xlib.h>
4241 #include <X11/extensions/Xinerama.h>
4242 int main(void) { XineramaIsActive(0); return 0; }
4245 cc_check
-lXinerama && _xinerama
=yes
4248 if test "$_xinerama" = yes ; then
4249 def_xinerama
='#define CONFIG_XINERAMA 1'
4250 libs_mplayer
="$libs_mplayer -lXinerama"
4252 def_xinerama
='#undef CONFIG_XINERAMA'
4254 echores
"$_xinerama"
4257 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4258 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4259 # named 'X extensions' or something similar.
4260 # This check may be useful for future mplayer versions (to change resolution)
4261 # If you run into problems, remove '-lXxf86vm'.
4263 if test "$_vm" = auto
; then
4265 #include <X11/Xlib.h>
4266 #include <X11/extensions/xf86vmode.h>
4267 int main(void) { XF86VidModeQueryExtension(0, 0, 0); return 0; }
4270 cc_check
-lXxf86vm && _vm
=yes
4272 if test "$_vm" = yes ; then
4273 def_vm
='#define CONFIG_XF86VM 1'
4274 libs_mplayer
="$libs_mplayer -lXxf86vm"
4276 def_vm
='#undef CONFIG_XF86VM'
4280 # Check for the presence of special keycodes, like audio control buttons
4281 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4282 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4283 # have these new keycodes.
4284 echocheck
"XF86keysym"
4285 if test "$_xf86keysym" = auto
; then
4288 #include <X11/Xlib.h>
4289 #include <X11/XF86keysym.h>
4290 int main(void) { return XF86XK_AudioPause; }
4292 cc_check
&& _xf86keysym
=yes
4294 if test "$_xf86keysym" = yes ; then
4295 def_xf86keysym
='#define CONFIG_XF86XK 1'
4297 def_xf86keysym
='#undef CONFIG_XF86XK'
4299 echores
"$_xf86keysym"
4302 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4304 #include <X11/Xlib.h>
4305 #include <X11/extensions/xf86dga.h>
4306 int main(void) { XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4309 cc_check
-lXxf86dga && _dga2
=yes
4311 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4313 #include <X11/Xlib.h>
4314 #include <X11/extensions/xf86dga.h>
4315 int main(void) { XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4318 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4322 def_dga
='#undef CONFIG_DGA'
4323 def_dga1
='#undef CONFIG_DGA1'
4324 def_dga2
='#undef CONFIG_DGA2'
4325 if test "$_dga1" = yes ; then
4327 def_dga1
='#define CONFIG_DGA1 1'
4328 res_comment
="using DGA 1.0"
4329 elif test "$_dga2" = yes ; then
4331 def_dga2
='#define CONFIG_DGA2 1'
4332 res_comment
="using DGA 2.0"
4334 if test "$_dga" = yes ; then
4335 def_dga
='#define CONFIG_DGA 1'
4336 libs_mplayer
="$libs_mplayer -lXxf86dga"
4337 vomodules
="dga $vomodules"
4339 novomodules
="dga $novomodules"
4345 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4346 def_3dfx
='#define CONFIG_3DFX 1'
4347 vomodules
="3dfx $vomodules"
4349 def_3dfx
='#undef CONFIG_3DFX'
4350 novomodules
="3dfx $novomodules"
4356 def_vidix
='#undef CONFIG_VIDIX'
4357 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4358 _vidix_drv_cyberblade
=no
4359 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4361 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4362 _vidix_drv_mach64
=no
4363 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4365 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4366 _vidix_drv_mga_crtc2
=no
4367 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4368 _vidix_drv_nvidia
=no
4369 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4371 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4373 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4374 _vidix_drv_radeon
=no
4375 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4376 _vidix_drv_rage128
=no
4377 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4379 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4380 _vidix_drv_sh_veu
=no
4381 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4383 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4384 _vidix_drv_unichrome
=no
4385 if test "$_vidix" = auto
; then
4387 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4389 x86_64
&& ! linux
&& _vidix
=no
4390 (ppc || alpha
) && linux
&& _vidix
=yes
4394 if test "$_vidix" = yes ; then
4395 def_vidix
='#define CONFIG_VIDIX 1'
4396 vomodules
="cvidix $vomodules"
4397 # FIXME: ivtv driver temporarily disabled until we have a proper test
4398 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4399 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4401 # some vidix drivers are architecture and os specific, discard them elsewhere
4402 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4403 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4405 for driver
in $_vidix_drivers ; do
4406 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4407 eval _vidix_drv_
${driver}=yes
4408 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4411 echocheck
"VIDIX PCI device name database"
4412 echores
"$_vidix_pcidb"
4413 if test "$_vidix_pcidb" = yes ; then
4419 echocheck
"VIDIX dhahelper support"
4420 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4421 echores
"$_dhahelper"
4423 echocheck
"VIDIX svgalib_helper support"
4424 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4425 echores
"$_svgalib_helper"
4428 novomodules
="cvidix $novomodules"
4431 if test "$_vidix" = yes && win32
; then
4433 vomodules
="winvidix $vomodules"
4434 libs_mplayer
="$libs_mplayer -lgdi32"
4436 novomodules
="winvidix $novomodules"
4438 if test "$_vidix" = yes && test "$_x11" = yes; then
4440 vomodules
="xvidix $vomodules"
4442 novomodules
="xvidix $novomodules"
4446 if test "$_ggi" = auto
; then
4448 function_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4450 if test "$_ggi" = yes ; then
4451 def_ggi
='#define CONFIG_GGI 1'
4452 libs_mplayer
="$libs_mplayer -lggi"
4453 vomodules
="ggi $vomodules"
4455 def_ggi
='#undef CONFIG_GGI'
4456 novomodules
="ggi $novomodules"
4460 echocheck
"GGI extension: libggiwmh"
4461 if test "$_ggiwmh" = auto
; then
4464 #include <ggi/wmh.h>
4465 int main(void) { ggiWmhInit(); return 0; }
4467 function_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4469 # needed to get right output on obscure combination
4470 # like --disable-ggi --enable-ggiwmh
4471 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4472 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4473 libs_mplayer
="$libs_mplayer -lggiwmh"
4476 def_ggiwmh
='#undef CONFIG_GGIWMH'
4482 if test "$_aa" = auto
; then
4489 c = aa_autoinit(&aa_defparams);
4490 p = aa_getrenderparams();
4491 aa_autoinitkbd(c,0);
4495 for _ld_tmp
in "-laa" ; do
4496 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4499 if test "$_aa" = yes ; then
4500 def_aa
='#define CONFIG_AA 1'
4502 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4504 vomodules
="aa $vomodules"
4506 def_aa
='#undef CONFIG_AA'
4507 novomodules
="aa $novomodules"
4513 if test "$_caca" = auto
; then
4515 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4518 #ifdef CACA_API_VERSION_1
4521 int main(void) { caca_init(); return 0; }
4523 cc_check $
(caca-config
--libs) && _caca
=yes
4526 if test "$_caca" = yes ; then
4527 def_caca
='#define CONFIG_CACA 1'
4528 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4529 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4530 vomodules
="caca $vomodules"
4532 def_caca
='#undef CONFIG_CACA'
4533 novomodules
="caca $novomodules"
4539 if test "$_svga" = auto
; then
4541 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4543 if test "$_svga" = yes ; then
4544 def_svga
='#define CONFIG_SVGALIB 1'
4545 libs_mplayer
="$libs_mplayer -lvga"
4546 vomodules
="svga $vomodules"
4548 def_svga
='#undef CONFIG_SVGALIB'
4549 novomodules
="svga $novomodules"
4555 if test "$_fbdev" = auto
; then
4559 if test "$_fbdev" = yes ; then
4560 def_fbdev
='#define CONFIG_FBDEV 1'
4561 vomodules
="fbdev $vomodules"
4563 def_fbdev
='#undef CONFIG_FBDEV'
4564 novomodules
="fbdev $novomodules"
4571 if test "$_dvb" = auto
; then
4575 #include <sys/ioctl.h>
4579 #include <linux/dvb/dmx.h>
4580 #include <linux/dvb/frontend.h>
4581 #include <linux/dvb/video.h>
4582 #include <linux/dvb/audio.h>
4583 int main(void) {return 0;}
4585 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4586 cc_check
$_inc_tmp && _dvb
=yes && \
4587 extra_cflags
="$extra_cflags $_inc_tmp" && break
4591 if test "$_dvb" = yes ; then
4593 inputmodules
="dvb $inputmodules"
4594 def_dvb
='#define CONFIG_DVB 1'
4595 def_dvbin
='#define CONFIG_DVBIN 1'
4596 aomodules
="mpegpes(dvb) $aomodules"
4597 vomodules
="mpegpes(dvb) $vomodules"
4600 noinputmodules
="dvb $noinputmodules"
4601 def_dvb
='#undef CONFIG_DVB'
4602 def_dvbin
='#undef CONFIG_DVBIN '
4603 aomodules
="mpegpes(file) $aomodules"
4604 vomodules
="mpegpes(file) $vomodules"
4610 echocheck
"QuickTime"
4611 if test "$quicktime" = auto
; then
4613 #include <QuickTime/QuickTime.h>
4615 ImageDescription *desc;
4622 cc_check
-framework QuickTime
&& quicktime
=yes
4624 if test "$quicktime" = yes ; then
4625 extra_ldflags
="$extra_ldflags -framework QuickTime"
4626 def_quicktime
='#define CONFIG_QUICKTIME 1'
4628 def_quicktime
='#undef CONFIG_QUICKTIME'
4634 if test "$_quartz" = auto
; then
4636 function_check Carbon
/Carbon.h
'CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false)' -framework Carbon
&& _quartz
=yes
4638 if test "$_quartz" = yes ; then
4639 libs_mplayer
="$libs_mplayer -framework Carbon"
4640 def_quartz
='#define CONFIG_QUARTZ 1'
4641 vomodules
="quartz $vomodules"
4643 def_quartz
='#undef CONFIG_QUARTZ'
4644 novomodules
="quartz $novomodules"
4648 echocheck
"CoreVideo"
4649 if test "$_corevideo" = auto
; then
4651 #include <Carbon/Carbon.h>
4652 #include <CoreServices/CoreServices.h>
4653 #include <OpenGL/OpenGL.h>
4654 #include <QuartzCore/CoreVideo.h>
4655 int main(void) { return 0; }
4658 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4660 if test "$_corevideo" = yes ; then
4661 vomodules
="corevideo $vomodules"
4662 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4663 def_corevideo
='#define CONFIG_COREVIDEO 1'
4665 novomodules
="corevideo $novomodules"
4666 def_corevideo
='#undef CONFIG_COREVIDEO'
4668 echores
"$_corevideo"
4673 echocheck
"PNG support"
4674 if test "$_png" = auto
; then
4677 # Don't check for -lpng on irix since it has its own libpng
4678 # incompatible with the GNU libpng
4679 res_comment
="disabled on irix (not GNU libpng)"
4685 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4686 printf("libpng: %s\n", png_libpng_ver);
4687 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4690 cc_check
-lpng -lz $_ld_lm && _png
=yes
4694 if test "$_png" = yes ; then
4695 def_png
='#define CONFIG_PNG 1'
4696 extra_ldflags
="$extra_ldflags -lpng -lz"
4698 def_png
='#undef CONFIG_PNG'
4701 echocheck
"MNG support"
4702 if test "$_mng" = auto
; then
4707 const char * p_ver = mng_version_text();
4708 return !p_ver || p_ver[0] == 0;
4711 if cc_check
-lmng -lz $_ld_lm ; then
4716 if test "$_mng" = yes ; then
4717 def_mng
='#define CONFIG_MNG 1'
4718 extra_ldflags
="$extra_ldflags -lmng -lz"
4720 def_mng
='#undef CONFIG_MNG'
4723 echocheck
"JPEG support"
4724 if test "$_jpeg" = auto
; then
4731 #include <jpeglib.h>
4732 int main(void) { return 0; }
4734 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
4738 if test "$_jpeg" = yes ; then
4739 def_jpeg
='#define CONFIG_JPEG 1'
4740 vomodules
="jpeg $vomodules"
4741 extra_ldflags
="$extra_ldflags -ljpeg"
4743 def_jpeg
='#undef CONFIG_JPEG'
4744 novomodules
="jpeg $novomodules"
4749 echocheck
"PNM support"
4750 if test "$_pnm" = yes; then
4751 def_pnm
="#define CONFIG_PNM 1"
4752 vomodules
="pnm $vomodules"
4754 def_pnm
="#undef CONFIG_PNM"
4755 novomodules
="pnm $novomodules"
4761 echocheck
"GIF support"
4762 # This is to appease people who want to force gif support.
4763 # If it is forced to yes, then we still do checks to determine
4764 # which gif library to use.
4765 if test "$_gif" = yes ; then
4770 if test "$_gif" = auto
; then
4772 for _ld_gif
in "-lungif" "-lgif" ; do
4773 function_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4777 # If no library was found, and the user wants support forced,
4778 # then we force it on with libgif, as this is the safest
4779 # assumption IMHO. (libungif & libregif both create symbolic
4780 # links to libgif. We also assume that no x11 support is needed,
4781 # because if you are forcing this, then you _should_ know what
4782 # you are doing. [ Besides, package maintainers should never
4783 # have compiled x11 deps into libungif in the first place. ] )
4786 if test "$_force_gif" = yes && test "$_gif" = no
; then
4791 if test "$_gif" = yes ; then
4792 def_gif
='#define CONFIG_GIF 1'
4793 codecmodules
="gif $codecmodules"
4794 vomodules
="gif89a $vomodules"
4795 res_comment
="old version, some encoding functions disabled"
4796 def_gif_4
='#undef CONFIG_GIF_4'
4797 extra_ldflags
="$extra_ldflags $_ld_gif"
4803 #include <gif_lib.h>
4804 static void catch(int sig) { exit(1); }
4806 signal(SIGSEGV, catch); // catch segfault
4807 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4808 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4812 if cc_check
"$_ld_gif" ; then
4813 def_gif_4
='#define CONFIG_GIF_4 1'
4817 def_gif
='#undef CONFIG_GIF'
4818 def_gif_4
='#undef CONFIG_GIF_4'
4819 novomodules
="gif89a $novomodules"
4820 nocodecmodules
="gif $nocodecmodules"
4825 case "$_gif" in yes*)
4826 echocheck
"broken giflib workaround"
4827 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4831 #include <gif_lib.h>
4833 GifFileType gif = {.UserData = NULL};
4834 printf("UserData is at address %p\n", gif.UserData);
4838 if cc_check
"$_ld_gif" ; then
4839 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4848 echocheck
"VESA support"
4849 if test "$_vesa" = auto
; then
4851 function_check vbe.h
'vbeVersion()' -lvbe -llrmi && _vesa
=yes
4853 if test "$_vesa" = yes ; then
4854 def_vesa
='#define CONFIG_VESA 1'
4855 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4856 vomodules
="vesa $vomodules"
4858 def_vesa
='#undef CONFIG_VESA'
4859 novomodules
="vesa $novomodules"
4871 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4872 if test -z "$_sdlconfig" ; then
4873 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4874 _sdlconfig
="sdl-config"
4875 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4876 _sdlconfig
="sdl11-config"
4881 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4883 #ifdef CONFIG_SDL_SDL_H
4884 #include <SDL/SDL.h>
4889 // we allow SDL hacking our main() only on OSX
4892 int main(int argc, char *argv[]) {
4893 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4898 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4899 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4901 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4905 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4906 res_comment
="using $_sdlconfig"
4908 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4909 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4911 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4912 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4914 _inc_tmp
="$($_sdlconfig --cflags)"
4915 _ld_tmp
="$($_sdlconfig --libs)"
4917 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4919 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4920 # HACK for BeOS/Haiku SDL
4921 _ld_tmp
="$_ld_tmp -lstdc++"
4926 if test "$_sdl" = yes ; then
4927 def_sdl
='#define CONFIG_SDL 1'
4928 extra_cflags
="$extra_cflags $_inc_tmp"
4929 libs_mplayer
="$libs_mplayer $_ld_tmp"
4930 vomodules
="sdl $vomodules"
4931 aomodules
="sdl $aomodules"
4933 def_sdl
='#undef CONFIG_SDL'
4934 novomodules
="sdl $novomodules"
4935 noaomodules
="sdl $noaomodules"
4940 # make sure this stays below CoreVideo to avoid issues due to namespace
4941 # conflicts between -lGL and -framework OpenGL
4943 #Note: this test is run even with --enable-gl since we autodetect linker flags
4944 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
4947 #include <windows.h>
4949 #elif defined(GL_SDL)
4951 #ifdef CONFIG_SDL_SDL_H
4952 #include <SDL/SDL.h>
4957 // we allow SDL hacking our main() only on OSX
4962 #include <X11/Xlib.h>
4965 int main(int argc, char *argv[]) {
4968 wglCreateContext(dc);
4969 #elif defined(GL_SDL)
4970 SDL_GL_SwapBuffers();
4972 glXCreateContext(NULL, NULL, NULL, True);
4979 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4980 if cc_check
$_ld_tmp $_ld_lm ; then
4983 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4987 if cc_check
-DGL_WIN32 -lopengl32 ; then
4990 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4992 # last so it can reuse any linker etc. flags detected before
4993 if test "$_sdl" = yes ; then
4994 if cc_check
-DGL_SDL ||
4995 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4998 elif cc_check
-DGL_SDL -lGL ||
4999 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
5002 libs_mplayer
="$libs_mplayer -lGL"
5008 if test "$_gl" = yes ; then
5009 def_gl
='#define CONFIG_GL 1'
5010 res_comment
="backends:"
5011 if test "$_gl_win32" = yes ; then
5012 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5013 res_comment
="$res_comment win32"
5015 if test "$_gl_x11" = yes ; then
5016 def_gl_x11
='#define CONFIG_GL_X11 1'
5017 res_comment
="$res_comment x11"
5019 if test "$_gl_sdl" = yes ; then
5020 def_gl_sdl
='#define CONFIG_GL_SDL 1'
5021 res_comment
="$res_comment sdl"
5023 vomodules
="opengl $vomodules"
5025 def_gl
='#undef CONFIG_GL'
5026 def_gl_win32
='#undef CONFIG_GL_WIN32'
5027 def_gl_x11
='#undef CONFIG_GL_X11'
5028 def_gl_sdl
='#undef CONFIG_GL_SDL'
5029 novomodules
="opengl $novomodules"
5034 echocheck
"MatrixView"
5035 if test "$_gl" = no
; then
5038 if test "$matrixview" = yes ; then
5039 vomodules
="matrixview $vomodules"
5040 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5042 novomodules
="matrixview $novomodules"
5043 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5045 echores
"$matrixview"
5049 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5050 if test "$_kva" = auto
; then
5054 int main(void) { return 0; }
5057 cc_check
-lkva && _kva
=yes
5059 if test "$_kva" = yes ; then
5060 def_kva
='#define CONFIG_KVA 1'
5061 libs_mplayer
="$libs_mplayer -lkva"
5062 vomodules
="kva $vomodules"
5064 def_kva
='#undef CONFIG_KVA'
5065 novomodules
="kva $novomodules"
5073 echocheck
"Windows waveout"
5074 if test "$_win32waveout" = auto
; then
5076 #include <windows.h>
5077 #include <mmsystem.h>
5078 int main(void) { return 0; }
5081 cc_check
-lwinmm && _win32waveout
=yes
5083 if test "$_win32waveout" = yes ; then
5084 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5085 libs_mplayer
="$libs_mplayer -lwinmm"
5086 aomodules
="win32 $aomodules"
5088 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5089 noaomodules
="win32 $noaomodules"
5091 echores
"$_win32waveout"
5093 echocheck
"Direct3D"
5094 if test "$_direct3d" = auto
; then
5096 #include <windows.h>
5098 int main(void) { return 0; }
5101 cc_check
&& _direct3d
=yes
5103 if test "$_direct3d" = yes ; then
5104 def_direct3d
='#define CONFIG_DIRECT3D 1'
5105 vomodules
="direct3d $vomodules"
5107 def_direct3d
='#undef CONFIG_DIRECT3D'
5108 novomodules
="direct3d $novomodules"
5110 echores
"$_direct3d"
5113 if test "$_directx" = auto
; then
5115 #include <windows.h>
5118 int main(void) { return 0; }
5121 cc_check
-lgdi32 && _directx
=yes
5123 if test "$_directx" = yes ; then
5124 def_directx
='#define CONFIG_DIRECTX 1'
5125 libs_mplayer
="$libs_mplayer -lgdi32"
5126 vomodules
="directx $vomodules"
5127 aomodules
="dsound $aomodules"
5129 def_directx
='#undef CONFIG_DIRECTX'
5130 novomodules
="directx $novomodules"
5131 noaomodules
="dsound $noaomodules"
5139 if test "$_dxr2" = auto
; then
5141 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5142 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
5143 extra_cflags
="$extra_cflags $_inc_tmp" && break
5146 if test "$_dxr2" = yes; then
5147 def_dxr2
='#define CONFIG_DXR2 1'
5148 aomodules
="dxr2 $aomodules"
5149 vomodules
="dxr2 $vomodules"
5151 def_dxr2
='#undef CONFIG_DXR2'
5152 noaomodules
="dxr2 $noaomodules"
5153 novomodules
="dxr2 $novomodules"
5158 if test "$_dxr3" = auto
; then
5160 header_check linux
/em8300.h
&& _dxr3
=yes
5162 if test "$_dxr3" = yes ; then
5163 def_dxr3
='#define CONFIG_DXR3 1'
5164 vomodules
="dxr3 $vomodules"
5166 def_dxr3
='#undef CONFIG_DXR3'
5167 novomodules
="dxr3 $novomodules"
5172 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5173 if test "$_ivtv" = auto
; then
5176 #include <inttypes.h>
5177 #include <linux/types.h>
5178 #include <linux/videodev2.h>
5179 #include <linux/ivtv.h>
5180 #include <sys/ioctl.h>
5182 struct ivtv_cfg_stop_decode sd;
5183 struct ivtv_cfg_start_decode sd1;
5184 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5185 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5189 cc_check
&& _ivtv
=yes
5191 if test "$_ivtv" = yes ; then
5192 def_ivtv
='#define CONFIG_IVTV 1'
5193 vomodules
="ivtv $vomodules"
5194 aomodules
="ivtv $aomodules"
5196 def_ivtv
='#undef CONFIG_IVTV'
5197 novomodules
="ivtv $novomodules"
5198 noaomodules
="ivtv $noaomodules"
5203 echocheck
"V4L2 MPEG Decoder"
5204 if test "$_v4l2" = auto
; then
5207 #include <inttypes.h>
5208 #include <linux/types.h>
5209 #include <linux/videodev2.h>
5210 #include <linux/version.h>
5212 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5213 #error kernel headers too old, need 2.6.22
5215 struct v4l2_ext_controls ctrls;
5216 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5221 cc_check
&& _v4l2
=yes
5223 if test "$_v4l2" = yes ; then
5224 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5225 vomodules
="v4l2 $vomodules"
5226 aomodules
="v4l2 $aomodules"
5228 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5229 novomodules
="v4l2 $novomodules"
5230 noaomodules
="v4l2 $noaomodules"
5241 echocheck
"OSS Audio"
5242 if test "$_ossaudio" = auto
; then
5244 #include <sys/ioctl.h>
5245 #include <$_soundcard_header>
5246 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5249 cc_check
&& _ossaudio
=yes
5251 if test "$_ossaudio" = yes ; then
5252 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5253 aomodules
="oss $aomodules"
5255 #include <sys/ioctl.h>
5256 #include <$_soundcard_header>
5257 #ifdef OPEN_SOUND_SYSTEM
5258 int main(void) { return 0; }
5260 #error Not the real thing
5264 cc_check
&& _real_ossaudio
=yes
5265 if test "$_real_ossaudio" = yes; then
5266 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5267 # Check for OSS4 headers (override default headers)
5268 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5269 if test -f /etc
/oss.conf
; then
5271 _ossinc
="$OSSLIBDIR/include"
5272 if test -f "$_ossinc/sys/soundcard.h"; then
5273 extra_cflags
="-I$_ossinc $extra_cflags"
5276 elif netbsd || openbsd
; then
5277 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5278 extra_ldflags
="$extra_ldflags -lossaudio"
5280 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5282 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5284 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5285 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5286 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5287 noaomodules
="oss $noaomodules"
5289 echores
"$_ossaudio"
5293 if test "$_arts" = auto
; then
5295 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5296 function_check artsc.h
"arts_init()" $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5301 if test "$_arts" = yes ; then
5302 def_arts
='#define CONFIG_ARTS 1'
5303 aomodules
="arts $aomodules"
5304 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5305 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5307 noaomodules
="arts $noaomodules"
5313 if test "$_esd" = auto
; then
5315 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5319 int main(void) { int fd = esd_open_sound("test"); return fd; }
5321 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5327 if test "$_esd" = yes ; then
5328 def_esd
='#define CONFIG_ESD 1'
5329 aomodules
="esd $aomodules"
5330 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5331 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5333 echocheck
"esd_get_latency()"
5336 int main(void) { return esd_get_latency(0); }
5338 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5339 echores
"$_esd_latency"
5341 def_esd
='#undef CONFIG_ESD'
5342 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5343 noaomodules
="esd $noaomodules"
5348 if test "$_nas" = auto
; then
5350 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5352 if test "$_nas" = yes ; then
5353 def_nas
='#define CONFIG_NAS 1'
5354 libs_mplayer
="$libs_mplayer -laudio -lXt"
5355 aomodules
="nas $aomodules"
5357 noaomodules
="nas $noaomodules"
5358 def_nas
='#undef CONFIG_NAS'
5364 if test "$_pulse" = auto
; then
5366 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5367 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5373 if test "$_pulse" = yes ; then
5374 def_pulse
='#define CONFIG_PULSE 1'
5375 aomodules
="pulse $aomodules"
5376 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5377 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5379 def_pulse
='#undef CONFIG_PULSE'
5380 noaomodules
="pulse $noaomodules"
5385 if test "$_jack" = auto
; then
5387 if function_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
5388 libs_mplayer
="$libs_mplayer -ljack"
5389 elif function_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5390 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5391 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5397 if test "$_jack" = yes ; then
5398 def_jack
='#define CONFIG_JACK 1'
5399 aomodules
="jack $aomodules"
5401 noaomodules
="jack $noaomodules"
5406 if test "$_openal" = auto
; then
5410 #include <OpenAL/al.h>
5415 alSourceQueueBuffers(0, 0, 0);
5416 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5420 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5421 cc_check
$I && _openal
=yes && break
5422 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5424 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5426 if test "$_openal" = yes ; then
5427 def_openal
='#define CONFIG_OPENAL 1'
5428 aomodules
="openal $aomodules"
5430 noaomodules
="openal $noaomodules"
5434 echocheck
"ALSA audio"
5435 if test "$_alloca" != yes ; then
5437 res_comment
="alloca missing"
5439 if test "$_alsa" != no
; then
5442 #include <sys/asoundlib.h>
5443 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5444 #error "alsa version != 0.5.x"
5446 int main(void) { return 0; }
5448 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5451 #include <sys/asoundlib.h>
5452 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5453 #error "alsa version != 0.9.x"
5455 int main(void) { return 0; }
5457 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5459 #include <alsa/asoundlib.h>
5460 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5461 #error "alsa version != 0.9.x"
5463 int main(void) { return 0; }
5465 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5468 #include <sys/asoundlib.h>
5469 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5470 #error "alsa version != 1.0.x"
5472 int main(void) { return 0; }
5474 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5476 #include <alsa/asoundlib.h>
5477 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5478 #error "alsa version != 1.0.x"
5480 int main(void) { return 0; }
5482 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5484 def_alsa
='#undef CONFIG_ALSA'
5485 def_alsa5
='#undef CONFIG_ALSA5'
5486 def_alsa9
='#undef CONFIG_ALSA9'
5487 def_alsa1x
='#undef CONFIG_ALSA1X'
5488 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5489 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5490 if test "$_alsaver" ; then
5492 if test "$_alsaver" = '0.5.x' ; then
5494 aomodules
="alsa5 $aomodules"
5495 def_alsa5
='#define CONFIG_ALSA5 1'
5496 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5497 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5498 elif test "$_alsaver" = '0.9.x-sys' ; then
5500 aomodules
="alsa $aomodules"
5501 def_alsa
='#define CONFIG_ALSA 1'
5502 def_alsa9
='#define CONFIG_ALSA9 1'
5503 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5504 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5505 elif test "$_alsaver" = '0.9.x-alsa' ; then
5507 aomodules
="alsa $aomodules"
5508 def_alsa
='#define CONFIG_ALSA 1'
5509 def_alsa9
='#define CONFIG_ALSA9 1'
5510 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5511 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5512 elif test "$_alsaver" = '1.0.x-sys' ; then
5514 aomodules
="alsa $aomodules"
5515 def_alsa
='#define CONFIG_ALSA 1'
5516 def_alsa1x
="#define CONFIG_ALSA1X 1"
5517 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5518 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5519 elif test "$_alsaver" = '1.0.x-alsa' ; then
5521 aomodules
="alsa $aomodules"
5522 def_alsa
='#define CONFIG_ALSA 1'
5523 def_alsa1x
="#define CONFIG_ALSA1X 1"
5524 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5525 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5528 res_comment
="unknown version"
5530 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5532 noaomodules
="alsa $noaomodules"
5537 echocheck
"Sun audio"
5538 if test "$_sunaudio" = auto
; then
5540 #include <sys/types.h>
5541 #include <sys/audioio.h>
5542 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5545 cc_check
&& _sunaudio
=yes
5547 if test "$_sunaudio" = yes ; then
5548 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5549 aomodules
="sun $aomodules"
5551 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5552 noaomodules
="sun $noaomodules"
5554 echores
"$_sunaudio"
5557 def_mlib
='#define CONFIG_MLIB 0'
5559 echocheck
"Sun mediaLib"
5560 if test "$_mlib" = auto
; then
5562 cc_check mlib.h
"mlib_VideoColorYUV2ABGR420(0, 0, 0, 0, 0, 0, 0, 0, 0)" -lmlib &&
5563 _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5570 echocheck
"CoreAudio"
5571 if test "$_coreaudio" = auto
; then
5573 #include <CoreAudio/CoreAudio.h>
5574 #include <AudioToolbox/AudioToolbox.h>
5575 #include <AudioUnit/AudioUnit.h>
5576 int main(void) { return 0; }
5579 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5581 if test "$_coreaudio" = yes ; then
5582 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5583 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5584 aomodules
="coreaudio $aomodules"
5586 def_coreaudio
='#undef CONFIG_COREAUDIO'
5587 noaomodules
="coreaudio $noaomodules"
5594 echocheck
"SGI audio"
5595 if test "$_sgiaudio" = auto
; then
5597 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5599 if test "$_sgiaudio" = "yes" ; then
5600 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5601 libs_mplayer
="$libs_mplayer -laudio"
5602 aomodules
="sgi $aomodules"
5604 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5605 noaomodules
="sgi $noaomodules"
5607 echores
"$_sgiaudio"
5612 echocheck
"KAI (UNIAUD/DART)"
5613 if test "$_kai" = auto
; then
5617 int main(void) { return 0; }
5620 cc_check
-lkai && _kai
=yes
5622 if test "$_kai" = yes ; then
5623 def_kai
='#define CONFIG_KAI 1'
5624 libs_mplayer
="$libs_mplayer -lkai"
5625 aomodules
="kai $aomodules"
5627 def_kai
='#undef CONFIG_KAI'
5628 noaomodules
="kai $noaomodules"
5633 if test "$_dart" = auto
; then
5637 int main(void) { return 0; }
5640 cc_check
-ldart && _dart
=yes
5642 if test "$_dart" = yes ; then
5643 def_dart
='#define CONFIG_DART 1'
5644 libs_mplayer
="$libs_mplayer -ldart"
5645 aomodules
="dart $aomodules"
5647 def_dart
='#undef CONFIG_DART'
5648 noaomodules
="dart $noaomodules"
5654 # set default CD/DVD devices
5655 if win32 || os2
; then
5656 default_cdrom_device
="D:"
5658 default_cdrom_device
="/dev/disk1"
5659 elif dragonfly
; then
5660 default_cdrom_device
="/dev/cd0"
5662 default_cdrom_device
="/dev/acd0"
5664 default_cdrom_device
="/dev/rcd0c"
5666 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5667 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5668 # file system and the volfs service.
5669 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5671 default_cdrom_device
="a1ide.device:2"
5673 default_cdrom_device
="/dev/cdrom"
5676 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5677 default_dvd_device
=$default_cdrom_device
5679 default_dvd_device
="/dev/rdiskN"
5681 default_dvd_device
="/dev/dvd"
5685 echocheck
"VCD support"
5686 if test "$_vcd" = auto
; then
5688 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5691 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5694 if test "$_vcd" = yes; then
5695 inputmodules
="vcd $inputmodules"
5696 def_vcd
='#define CONFIG_VCD 1'
5698 def_vcd
='#undef CONFIG_VCD'
5699 noinputmodules
="vcd $noinputmodules"
5700 res_comment
="not supported on this OS"
5706 echocheck
"Blu-ray support"
5707 if test "$_bluray" = auto
; then
5712 #include <libbluray/bluray.h>
5714 BLURAY_TITLE_INFO *i = bd_get_title_info(NULL, 0);
5718 compile_check
$TMPC -lbluray && _bluray
=yes
5720 if test "$_bluray" = yes ; then
5721 def_bluray
='#define CONFIG_LIBBLURAY 1'
5722 extra_ldflags
="$extra_ldflags -lbluray"
5723 inputmodules
="bluray $inputmodules"
5725 def_bluray
='#undef CONFIG_LIBBLURAY'
5726 noinputmodules
="bluray $noinputmodules"
5731 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5732 _dvdread_internal
=no
5734 if test "$_dvdread_internal" = auto
; then
5735 _dvdread_internal
=no
5737 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5738 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5739 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5740 || darwin || win32 || os2
; then
5741 _dvdread_internal
=yes
5743 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5745 elif test "$_dvdread" = auto
; then
5747 if test "$_dl" = yes; then
5749 #include <inttypes.h>
5750 #include <dvdread/dvd_reader.h>
5751 #include <dvdread/ifo_types.h>
5752 #include <dvdread/ifo_read.h>
5753 #include <dvdread/nav_read.h>
5754 int main(void) { return 0; }
5756 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
5757 _dvdreadlibs
=$
($_dvdreadconfig --libs)
5758 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5759 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5761 extra_cflags
="$extra_cflags $_dvdreadcflags"
5762 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5763 res_comment
="external"
5768 if test "$_dvdread_internal" = yes; then
5769 def_dvdread
='#define CONFIG_DVDREAD 1'
5770 inputmodules
="dvdread(internal) $inputmodules"
5772 res_comment
="internal"
5773 elif test "$_dvdread" = yes; then
5774 def_dvdread
='#define CONFIG_DVDREAD 1'
5776 extra_ldflags
="$extra_ldflags -ldvdread"
5777 inputmodules
="dvdread(external) $inputmodules"
5778 res_comment
="external"
5780 def_dvdread
='#undef CONFIG_DVDREAD'
5781 noinputmodules
="dvdread $noinputmodules"
5786 echocheck
"internal libdvdcss"
5787 if test "$_libdvdcss_internal" = auto
; then
5788 _libdvdcss_internal
=no
5789 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5790 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5792 if test "$_libdvdcss_internal" = yes ; then
5793 if linux || netbsd || openbsd || bsdos
; then
5794 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5795 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5796 elif freebsd || dragonfly
; then
5797 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5799 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5800 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5802 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5804 cflags_libdvdcss
="-DSYS_BEOS"
5806 cflags_libdvdcss
="-DSYS_OS2"
5808 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5809 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5810 inputmodules
="libdvdcss(internal) $inputmodules"
5813 noinputmodules
="libdvdcss(internal) $noinputmodules"
5815 echores
"$_libdvdcss_internal"
5818 echocheck
"cdparanoia"
5819 if test "$_cdparanoia" = auto
; then
5821 #include <cdda_interface.h>
5822 #include <cdda_paranoia.h>
5823 // This need a better test. How ?
5824 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5827 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5828 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5829 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5832 if test "$_cdparanoia" = yes ; then
5834 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5835 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5837 echores
"$_cdparanoia"
5841 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5844 #include <cdio/version.h>
5845 #include <cdio/cdda.h>
5846 #include <cdio/paranoia.h>
5848 void *test = cdda_verbose_set;
5849 printf("%s\n", CDIO_VERSION);
5850 return test == (void *)1;
5854 for _ld_tmp
in "" "-lwinmm" ; do
5855 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5856 cc_check
$_ld_tmp $_ld_lm \
5857 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5859 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5860 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5861 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5862 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5863 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5866 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5868 def_libcdio
='#define CONFIG_LIBCDIO 1'
5869 def_havelibcdio
='yes'
5871 if test "$_cdparanoia" = yes ; then
5872 res_comment
="using cdparanoia"
5874 def_libcdio
='#undef CONFIG_LIBCDIO'
5875 def_havelibcdio
='no'
5879 if test "$_cdda" = yes ; then
5880 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5881 def_cdparanoia
='#define CONFIG_CDDA 1'
5882 inputmodules
="cdda $inputmodules"
5884 def_cdparanoia
='#undef CONFIG_CDDA'
5885 noinputmodules
="cdda $noinputmodules"
5888 if test "$_cddb" = yes ; then
5889 def_cddb
='#define CONFIG_CDDB 1'
5890 inputmodules
="cddb $inputmodules"
5893 def_cddb
='#undef CONFIG_CDDB'
5894 noinputmodules
="cddb $noinputmodules"
5897 echocheck
"bitmap font support"
5898 if test "$_bitmap_font" = yes ; then
5899 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5901 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5903 echores
"$_bitmap_font"
5906 echocheck
"freetype >= 2.0.9"
5908 # freetype depends on iconv
5909 if test "$_iconv" = no
; then
5911 res_comment
="iconv support needed"
5914 if test "$_freetype" = auto
; then
5915 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5918 #include <ft2build.h>
5919 #include FT_FREETYPE_H
5920 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5921 #error "Need FreeType 2.0.9 or newer"
5925 FT_Init_FreeType(&library);
5930 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
5935 if test "$_freetype" = yes ; then
5936 def_freetype
='#define CONFIG_FREETYPE 1'
5937 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
5938 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
5940 def_freetype
='#undef CONFIG_FREETYPE'
5942 echores
"$_freetype"
5944 if test "$_freetype" = no
; then
5946 res_comment
="FreeType support needed"
5948 echocheck
"fontconfig"
5949 if test "$_fontconfig" = auto
; then
5953 #include <fontconfig/fontconfig.h>
5954 #if FC_VERSION < 20402
5955 #error At least version 2.4.2 of fontconfig required
5959 if (err == FcFalse) {
5960 printf("Couldn't initialize fontconfig lib\n");
5967 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
5968 _ld_tmp
="-lfontconfig $_ld_tmp"
5969 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5971 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5972 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
5973 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
5974 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5975 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5978 if test "$_fontconfig" = yes ; then
5979 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5981 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5983 echores
"$_fontconfig"
5986 echocheck
"SSA/ASS support"
5987 if test "$_ass" = auto
-o "$_ass" = yes ; then
5988 if $_pkg_config libass
; then
5990 def_ass
='#define CONFIG_ASS 1'
5991 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
5992 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
5995 def_ass
='#undef CONFIG_ASS'
5998 def_ass
='#undef CONFIG_ASS'
6003 echocheck
"fribidi with charsets"
6006 if test "$_fribidi" = auto
; then
6009 /* workaround for fribidi 0.10.4 and below */
6010 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6011 #include <fribidi/fribidi.h>
6013 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
6021 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6022 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
6023 test "$_fribidi" = no
; then
6024 _inc_tmp
="$($_pkg_config --cflags)"
6025 _ld_tmp
="$($_pkg_config --libs)"
6026 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6029 if test "$_fribidi" = yes ; then
6030 def_fribidi
='#define CONFIG_FRIBIDI 1'
6031 extra_cflags
="$extra_cflags $_inc_tmp"
6032 extra_ldflags
="$extra_ldflags $_ld_tmp"
6034 def_fribidi
='#undef CONFIG_FRIBIDI'
6040 if test "$_enca" = auto
; then
6042 #include <sys/types.h>
6047 langs = enca_get_languages(&langcnt);
6052 cc_check
-lenca $_ld_lm && _enca
=yes
6054 if test "$_enca" = yes ; then
6055 def_enca
='#define CONFIG_ENCA 1'
6056 extra_ldflags
="$extra_ldflags -lenca"
6058 def_enca
='#undef CONFIG_ENCA'
6065 function_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
6066 if test "$_zlib" = yes ; then
6067 def_zlib
='#define CONFIG_ZLIB 1'
6068 extra_ldflags
="$extra_ldflags -lz"
6070 def_zlib
='#define CONFIG_ZLIB 0'
6077 def_bzlib
='#define CONFIG_BZLIB 0'
6078 function_check bzlib.h
'BZ2_bzlibVersion()' -lbz2 && bzlib
=yes
6079 if test "$bzlib" = yes ; then
6080 def_bzlib
='#define CONFIG_BZLIB 1'
6081 extra_ldflags
="$extra_ldflags -lbz2"
6087 if test "$_rtc" = auto
; then
6089 #include <sys/ioctl.h>
6091 #include <linux/rtc.h>
6094 #define RTC_PIE_ON RTCIO_PIE_ON
6096 int main(void) { return RTC_PIE_ON; }
6099 cc_check
&& _rtc
=yes
6102 if test "$_rtc" = yes ; then
6103 def_rtc
='#define HAVE_RTC 1'
6105 def_rtc
='#undef HAVE_RTC'
6110 echocheck
"liblzo2 support"
6111 if test "$_liblzo" = auto
; then
6113 function_check lzo
/lzo1x.h
'lzo_init()' -llzo2 && _liblzo
=yes
6115 if test "$_liblzo" = yes ; then
6116 def_liblzo
='#define CONFIG_LIBLZO 1'
6117 extra_ldflags
="$extra_ldflags -llzo2"
6118 codecmodules
="liblzo $codecmodules"
6120 def_liblzo
='#undef CONFIG_LIBLZO'
6121 nocodecmodules
="liblzo $nocodecmodules"
6126 echocheck
"mad support"
6127 if test "$_mad" = auto
; then
6129 header_check mad.h
-lmad && _mad
=yes
6131 if test "$_mad" = yes ; then
6132 def_mad
='#define CONFIG_LIBMAD 1'
6133 extra_ldflags
="$extra_ldflags -lmad"
6134 codecmodules
="libmad $codecmodules"
6136 def_mad
='#undef CONFIG_LIBMAD'
6137 nocodecmodules
="libmad $nocodecmodules"
6142 if test "$_twolame" = auto
; then
6144 function_check twolame.h
'twolame_init()' -ltwolame $_ld_lm && _twolame
=yes
6146 if test "$_twolame" = yes ; then
6147 def_twolame
='#define CONFIG_TWOLAME 1'
6148 libs_mencoder
="$libs_mencoder -ltwolame"
6149 codecmodules
="twolame $codecmodules"
6151 def_twolame
='#undef CONFIG_TWOLAME'
6152 nocodecmodules
="twolame $nocodecmodules"
6157 if test "$_toolame" = auto
; then
6159 if test "$_twolame" = yes ; then
6160 res_comment
="disabled by twolame"
6162 function_check toolame.h
'toolame_init()' -ltoolame $_ld_lm && _toolame
=yes
6165 if test "$_toolame" = yes ; then
6166 def_toolame
='#define CONFIG_TOOLAME 1'
6167 libs_mencoder
="$libs_mencoder -ltoolame"
6168 codecmodules
="toolame $codecmodules"
6170 def_toolame
='#undef CONFIG_TOOLAME'
6171 nocodecmodules
="toolame $nocodecmodules"
6173 if test "$_toolamedir" ; then
6174 res_comment
="using $_toolamedir"
6178 echocheck
"OggVorbis support"
6179 if test "$_tremor_internal" = yes; then
6181 elif test "$_tremor" = auto
; then
6183 function_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6185 if test "$_libvorbis" = auto
; then
6187 function_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes
6189 if test "$_tremor_internal" = yes ; then
6191 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6192 def_tremor
='#define CONFIG_TREMOR 1'
6193 codecmodules
="tremor(internal) $codecmodules"
6194 res_comment
="internal Tremor"
6195 if test "$_tremor_low" = yes ; then
6196 cflags_tremor_low
="-D_LOW_ACCURACY_"
6197 res_comment
="internal low accuracy Tremor"
6199 elif test "$_tremor" = yes ; then
6201 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6202 def_tremor
='#define CONFIG_TREMOR 1'
6203 codecmodules
="tremor(external) $codecmodules"
6204 res_comment
="external Tremor"
6205 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6206 elif test "$_libvorbis" = yes ; then
6208 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6209 codecmodules
="libvorbis $codecmodules"
6210 res_comment
="libvorbis"
6211 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6214 nocodecmodules
="libvorbis $nocodecmodules"
6218 echocheck
"libspeex (version >= 1.1 required)"
6219 if test "$_speex" = auto
; then
6223 #include <speex/speex.h>
6224 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
6226 cc_check
-lspeex $_ld_lm && _speex
=yes
6228 if test "$_speex" = yes ; then
6229 def_speex
='#define CONFIG_SPEEX 1'
6230 extra_ldflags
="$extra_ldflags -lspeex"
6231 codecmodules
="speex $codecmodules"
6233 def_speex
='#undef CONFIG_SPEEX'
6234 nocodecmodules
="speex $nocodecmodules"
6238 echocheck
"OggTheora support"
6239 if test "$_theora" = auto
; then
6242 #include <theora/theora.h>
6245 /* Theora is in flux, make sure that all interface routines and datatypes
6246 * exist and work the way we expect it, so we don't break MPlayer. */
6255 theora_info_init(&inf);
6256 theora_comment_init(&tc);
6260 /* we don't want to execute this kind of nonsense; just for making sure
6261 * that compilation works... */
6262 memset(&op, 0, sizeof(op));
6263 r = theora_decode_header(&inf, &tc, &op);
6264 r = theora_decode_init(&st, &inf);
6265 t = theora_granule_time(&st, op.granulepos);
6266 r = theora_decode_packetin(&st, &op);
6267 r = theora_decode_YUVout(&st, &yuv);
6273 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6274 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6275 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6276 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6277 if test _theora
= no
; then
6278 _ld_theora
="-ltheora -logg"
6279 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6281 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6282 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6283 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6284 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6285 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6286 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6287 if test _theora
= no
; then
6288 _ld_theora
="-ltheora -logg"
6289 cc_check tremor
/bitwise.c
$_ld_theora &&
6290 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6294 if test "$_theora" = yes ; then
6295 def_theora
='#define CONFIG_OGGTHEORA 1'
6296 codecmodules
="libtheora $codecmodules"
6297 # when --enable-theora is forced, we'd better provide a probably sane
6298 # $_ld_theora than nothing
6299 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6301 def_theora
='#undef CONFIG_OGGTHEORA'
6302 nocodecmodules
="libtheora $nocodecmodules"
6306 echocheck
"mp3lib support"
6307 if test "$_mp3lib" = auto
; then
6308 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6310 if test "$_mp3lib" = yes ; then
6311 def_mp3lib
='#define CONFIG_MP3LIB 1'
6312 codecmodules
="mp3lib(internal) $codecmodules"
6314 def_mp3lib
='#undef CONFIG_MP3LIB'
6315 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6319 # Any version of libmpg123 shall be fine.
6320 echocheck
"mpg123 support"
6321 def_mpg123
='#undef CONFIG_MPG123'
6322 if test "$_mpg123" = auto
; then
6324 function_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
6326 if test "$_mpg123" = yes ; then
6327 def_mpg123
='#define CONFIG_MPG123 1'
6328 codecmodules
="mpg123 $codecmodules"
6330 nocodecmodules
="mpg123 $nocodecmodules"
6334 echocheck
"liba52 support"
6335 def_liba52
='#undef CONFIG_LIBA52'
6336 if test "$_liba52" = auto
; then
6339 #include <inttypes.h>
6340 #include <a52dec/a52.h>
6341 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6343 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6345 if test "$_liba52" = yes ; then
6346 def_liba52
='#define CONFIG_LIBA52 1'
6347 codecmodules
="liba52 $codecmodules"
6349 nocodecmodules
="liba52 $nocodecmodules"
6353 echocheck
"internal libmpeg2 support"
6354 if test "$_libmpeg2" = auto
; then
6356 if alpha
&& test cc_vendor
=gnu
; then
6358 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6360 res_comment
="broken gcc"
6365 if test "$_libmpeg2" = yes ; then
6366 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6367 codecmodules
="libmpeg2(internal) $codecmodules"
6369 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6370 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6372 echores
"$_libmpeg2"
6374 echocheck
"libdca support"
6375 if test "$_libdca" = auto
; then
6378 #include <inttypes.h>
6380 int main(void) { dts_init(0); return 0; }
6382 for _ld_dca
in -ldca -ldts ; do
6383 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6384 && _libdca
=yes && break
6387 if test "$_libdca" = yes ; then
6388 def_libdca
='#define CONFIG_LIBDCA 1'
6389 codecmodules
="libdca $codecmodules"
6391 def_libdca
='#undef CONFIG_LIBDCA'
6392 nocodecmodules
="libdca $nocodecmodules"
6396 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6397 if test "$_musepack" = auto
; then
6401 #include <mpcdec/mpcdec.h>
6403 mpc_streaminfo info;
6404 mpc_decoder decoder;
6405 mpc_decoder_set_streaminfo(&decoder, &info);
6406 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6410 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6412 if test "$_musepack" = yes ; then
6413 def_musepack
='#define CONFIG_MUSEPACK 1'
6414 extra_ldflags
="$extra_ldflags -lmpcdec"
6415 codecmodules
="musepack $codecmodules"
6417 def_musepack
='#undef CONFIG_MUSEPACK'
6418 nocodecmodules
="musepack $nocodecmodules"
6420 echores
"$_musepack"
6423 echocheck
"FAAC support"
6424 if test "$_faac" = auto
; then
6426 #include <inttypes.h>
6428 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6431 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6432 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6435 if test "$_faac" = yes ; then
6436 def_faac
="#define CONFIG_FAAC 1"
6437 codecmodules
="faac $codecmodules"
6439 def_faac
="#undef CONFIG_FAAC"
6440 nocodecmodules
="faac $nocodecmodules"
6445 echocheck
"FAAD2 support"
6446 if test "$_faad_internal" = auto
; then
6447 if x86_32
&& test cc_vendor
=gnu
; then
6449 3.1*|
3.2) # ICE/insn with these versions
6451 res_comment
="broken gcc"
6463 if test "$_faad" = auto
; then
6466 #ifndef FAAD_MIN_STREAMSIZE
6467 #error Too old version
6469 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6470 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6472 cc_check
-lfaad $_ld_lm && _faad
=yes
6475 def_faad
='#undef CONFIG_FAAD'
6476 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6477 if test "$_faad_internal" = yes ; then
6478 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6479 res_comment
="internal floating-point"
6480 if test "$_faad_fixed" = yes ; then
6481 # The FIXED_POINT implementation of FAAD2 improves performance
6482 # on some platforms, especially for SBR files.
6483 cflags_faad_fixed
="-DFIXED_POINT"
6484 res_comment
="internal fixed-point"
6486 elif test "$_faad" = yes ; then
6487 extra_ldflags
="$extra_ldflags -lfaad"
6490 if test "$_faad" = yes ; then
6491 def_faad
='#define CONFIG_FAAD 1'
6492 if test "$_faad_internal" = yes ; then
6493 codecmodules
="faad2(internal) $codecmodules"
6495 codecmodules
="faad2 $codecmodules"
6499 nocodecmodules
="faad2 $nocodecmodules"
6504 echocheck
"LADSPA plugin support"
6505 if test "$_ladspa" = auto
; then
6509 LADSPA_Descriptor ld = {0};
6514 cc_check
&& _ladspa
=yes
6516 if test "$_ladspa" = yes; then
6517 def_ladspa
="#define CONFIG_LADSPA 1"
6519 def_ladspa
="#undef CONFIG_LADSPA"
6524 echocheck
"libbs2b audio filter support"
6525 if test "$_libbs2b" = auto
; then
6528 #if BS2B_VERSION_MAJOR < 3
6529 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6539 if $_pkg_config --exists libbs2b
; then
6540 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6541 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6542 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6543 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6545 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6546 -I/usr
/local
/include
/bs2b
; do
6547 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6548 extra_ldflags
="$extra_ldflags -lbs2b"
6549 extra_cflags
="$extra_cflags $_inc_tmp"
6556 def_libbs2b
="#undef CONFIG_LIBBS2B"
6557 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6561 if test -z "$_codecsdir" ; then
6562 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6563 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6564 if test -d "$dir" ; then
6570 # Fall back on default directory.
6571 if test -z "$_codecsdir" ; then
6572 _codecsdir
="$_libdir/codecs"
6573 mingw32 || os2
&& _codecsdir
="codecs"
6577 echocheck
"Win32 codecs"
6578 if test "$_win32dll" = auto
; then
6580 if x86_32
&& ! qnx
; then
6584 if test "$_win32dll" = yes ; then
6585 def_win32dll
='#define CONFIG_WIN32DLL 1'
6587 def_win32_loader
='#define WIN32_LOADER 1'
6588 _win32_emulation
=yes
6590 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6591 res_comment
="using native windows"
6593 codecmodules
="win32 $codecmodules"
6595 def_win32dll
='#undef CONFIG_WIN32DLL'
6596 def_win32_loader
='#undef WIN32_LOADER'
6597 nocodecmodules
="win32 $nocodecmodules"
6599 echores
"$_win32dll"
6602 echocheck
"XAnim codecs"
6603 if test "$_xanim" = auto
; then
6605 res_comment
="dynamic loader support needed"
6606 if test "$_dl" = yes ; then
6610 if test "$_xanim" = yes ; then
6611 def_xanim
='#define CONFIG_XANIM 1'
6612 codecmodules
="xanim $codecmodules"
6614 def_xanim
='#undef CONFIG_XANIM'
6615 nocodecmodules
="xanim $nocodecmodules"
6620 echocheck
"RealPlayer codecs"
6621 if test "$_real" = auto
; then
6623 res_comment
="dynamic loader support needed"
6624 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6625 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6629 if test "$_real" = yes ; then
6630 def_real
='#define CONFIG_REALCODECS 1'
6631 codecmodules
="real $codecmodules"
6633 def_real
='#undef CONFIG_REALCODECS'
6634 nocodecmodules
="real $nocodecmodules"
6639 echocheck
"QuickTime codecs"
6641 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6642 if test "$_qtx" = auto
; then
6643 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6645 if test "$_qtx" = yes ; then
6646 def_qtx
='#define CONFIG_QTX_CODECS 1'
6647 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6648 codecmodules
="qtx $codecmodules"
6649 darwin || win32 || _qtx_emulation
=yes
6651 def_qtx
='#undef CONFIG_QTX_CODECS'
6652 nocodecmodules
="qtx $nocodecmodules"
6656 echocheck
"Nemesi Streaming Media libraries"
6657 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
6659 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6660 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6661 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6665 if test "$_nemesi" = yes; then
6667 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6668 inputmodules
="nemesi $inputmodules"
6670 _native_rtsp
="$networking"
6672 def_nemesi
='#undef CONFIG_LIBNEMESI'
6673 noinputmodules
="nemesi $noinputmodules"
6677 echocheck
"LIVE555 Streaming Media libraries"
6678 if test "$_live" = auto
&& test "$networking" = yes ; then
6679 cat > $TMPCPP << EOF
6680 #include <liveMedia.hh>
6681 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6682 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6684 int main(void) { return 0; }
6688 for I
in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6689 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6690 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6691 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6692 $_livelibdir/groupsock/libgroupsock.a \
6693 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6694 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6695 $extra_ldflags -lstdc++" \
6696 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6697 -I$_livelibdir/UsageEnvironment/include \
6698 -I$_livelibdir/BasicUsageEnvironment/include \
6699 -I$_livelibdir/groupsock/include" && \
6702 if test "$_live" != yes ; then
6703 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6704 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6709 if test "$_live" = yes && test "$networking" = yes; then
6710 test $_livelibdir && res_comment
="using $_livelibdir"
6711 def_live
='#define CONFIG_LIVE555 1'
6712 inputmodules
="live555 $inputmodules"
6713 elif test "$_live_dist" = yes && test "$networking" = yes; then
6714 res_comment
="using distribution version"
6716 def_live
='#define CONFIG_LIVE555 1'
6717 extra_ldflags
="$extra_ldflags $ld_tmp"
6718 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6719 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6720 inputmodules
="live555 $inputmodules"
6723 def_live
='#undef CONFIG_LIVE555'
6724 noinputmodules
="live555 $noinputmodules"
6730 all_ffmpeg_libs
="libavutil libavcodec libavformat libswscale libpostproc"
6731 echocheck
"FFmpeg ($all_ffmpeg_libs)"
6732 if test "$ffmpeg" = auto
; then
6734 if $_pkg_config --exists $all_ffmpeg_libs ; then
6735 inc_ffmpeg
=$
($_pkg_config --cflags $all_ffmpeg_libs)
6736 _ld_tmp
=$
($_pkg_config --libs $all_ffmpeg_libs)
6737 extra_ldflags
="$extra_ldflags $_ld_tmp"
6738 extra_cflags
="$extra_cflags $inc_ffmpeg"
6740 elif header_check libavcore
/avutil.h
-lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
6741 extra_ldflags
="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
6746 if test "$ffmpeg" = yes; then
6747 def_ffmpeg
='#define CONFIG_FFMPEG 1'
6748 codecmodules
="ffmpeg $codecmodules"
6750 def_ffmpeg
='#undef CONFIG_FFMPEG'
6751 nocodecmodules
="ffmpeg $nocodecmodules"
6755 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
6756 if ! test -z "$_ffmpeg_source" ; then
6757 test "$ffmpeg" = yes && def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
6762 echocheck
"libdv-0.9.5+"
6763 if test "$_libdv" = auto
; then
6765 function_check libdv
/dv.h
"dv_encoder_new(1, 1, 1)" -ldv $_ld_pthread $_ld_lm && _libdv
=yes
6767 if test "$_libdv" = yes ; then
6768 def_libdv
='#define CONFIG_LIBDV095 1'
6769 extra_ldflags
="$extra_ldflags -ldv"
6770 codecmodules
="libdv $codecmodules"
6772 def_libdv
='#undef CONFIG_LIBDV095'
6773 nocodecmodules
="libdv $nocodecmodules"
6779 if test "$_xvid" = auto
; then
6781 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6782 function_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6783 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6787 if test "$_xvid" = yes ; then
6788 def_xvid
='#define CONFIG_XVID4 1'
6789 codecmodules
="xvid $codecmodules"
6791 def_xvid
='#undef CONFIG_XVID4'
6792 nocodecmodules
="xvid $nocodecmodules"
6797 if test "$_x264" = auto
; then
6799 #include <inttypes.h>
6802 #error We do not support old versions of x264. Get the latest from git.
6804 int main(void) { x264_encoder_open((void*)0); return 0; }
6807 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6808 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
6812 if test "$_x264" = yes ; then
6813 def_x264
='#define CONFIG_X264 1'
6814 codecmodules
="x264 $codecmodules"
6816 def_x264
='#undef CONFIG_X264'
6817 nocodecmodules
="x264 $nocodecmodules"
6822 if test "$_libnut" = auto
; then
6825 nut_context_tt * nut;
6826 int main(void) { nut_error(0); return 0; }
6829 cc_check
-lnut && _libnut
=yes
6832 if test "$_libnut" = yes ; then
6833 def_libnut
='#define CONFIG_LIBNUT 1'
6834 extra_ldflags
="$extra_ldflags -lnut"
6836 def_libnut
='#undef CONFIG_LIBNUT'
6840 # These VO checks must be done after the FFmpeg one
6841 echocheck
"/dev/mga_vid"
6842 if test "$_mga" = auto
; then
6844 test -c /dev
/mga_vid
&& _mga
=yes
6846 if test "$_mga" = yes ; then
6847 def_mga
='#define CONFIG_MGA 1'
6848 vomodules
="mga $vomodules"
6850 def_mga
='#undef CONFIG_MGA'
6851 novomodules
="mga $novomodules"
6857 if test "$_xmga" = auto
; then
6859 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
6861 if test "$_xmga" = yes ; then
6862 def_xmga
='#define CONFIG_XMGA 1'
6863 vomodules
="xmga $vomodules"
6865 def_xmga
='#undef CONFIG_XMGA'
6866 novomodules
="xmga $novomodules"
6871 if test "$_zr" = auto
; then
6872 #36067's seem to identify themselves as 36057PQC's, so the line
6873 #below should work for 36067's and 36057's.
6874 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
6880 if test "$_zr" = yes ; then
6881 if test "$ffmpeg_internals" = yes ; then
6882 def_zr
='#define CONFIG_ZR 1'
6883 vomodules
="zr zr2 $vomodules"
6885 res_comment
="FFmpeg internal headers are required by zr, sorry"
6886 novomodules
="zr $novomodules"
6887 def_zr
='#undef CONFIG_ZR'
6890 def_zr
='#undef CONFIG_ZR'
6891 novomodules
="zr zr2 $novomodules"
6895 # mencoder requires (optional) those libs: libmp3lame
6896 if test "$_mencoder" != no
; then
6898 echocheck
"libmp3lame"
6899 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
6900 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
6901 if test "$_mp3lame" = auto
; then
6904 #include <lame/lame.h>
6905 int main(void) { lame_version_t lv; lame_init();
6906 get_lame_version_numerical(&lv);
6909 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
6911 if test "$_mp3lame" = yes ; then
6912 def_mp3lame
="#define CONFIG_MP3LAME 1"
6913 _ld_mp3lame
=-lmp3lame
6914 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
6915 function_check lame
/lame.h
'lame_set_preset(NULL, STANDARD_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
6916 function_check lame
/lame.h
'lame_set_preset(NULL, MEDIUM_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
6918 def_mp3lame
='#undef CONFIG_MP3LAME'
6922 fi # test "$_mencoder" != no
6924 echocheck
"mencoder"
6925 if test "$_mencoder" = yes ; then
6926 def_muxers
='#define CONFIG_MUXERS 1'
6928 def_muxers
='#define CONFIG_MUXERS 0'
6930 echores
"$_mencoder"
6933 echocheck
"UnRAR executable"
6934 if test "$_unrar_exec" = auto
; then
6936 mingw32
&& _unrar_exec
="no"
6938 if test "$_unrar_exec" = yes ; then
6939 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
6941 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
6943 echores
"$_unrar_exec"
6945 echocheck
"TV interface"
6946 if test "$_tv" = yes ; then
6947 def_tv
='#define CONFIG_TV 1'
6948 inputmodules
="tv $inputmodules"
6950 noinputmodules
="tv $noinputmodules"
6951 def_tv
='#undef CONFIG_TV'
6956 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
6957 echocheck
"*BSD BT848 bt8xx header"
6959 for file in "machine/ioctl_bt848.h" \
6960 "dev/bktr/ioctl_bt848.h" \
6961 "dev/video/bktr/ioctl_bt848.h" \
6962 "dev/ic/bt8xx.h" ; do
6964 #include <sys/types.h>
6965 #include <sys/ioctl.h>
6967 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6971 _ioctl_bt848_h_name
="$file"
6975 if test "$_ioctl_bt848_h" = yes ; then
6976 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6977 res_comment
="using $_ioctl_bt848_h_name"
6979 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6981 echores
"$_ioctl_bt848_h"
6983 echocheck
"*BSD ioctl_meteor.h"
6985 for file in "machine/ioctl_meteor.h" \
6986 "dev/bktr/ioctl_meteor.h" \
6987 "dev/video/bktr/ioctl_meteor.h" ; do
6989 #include <sys/types.h>
6991 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
6995 _ioctl_meteor_h_name
="$file"
6999 if test "$_ioctl_meteor_h" = yes ; then
7000 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7001 res_comment
="using $_ioctl_meteor_h_name"
7003 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7005 echores
"$_ioctl_meteor_h"
7007 echocheck
"*BSD BrookTree 848 TV interface"
7008 if test "$_tv_bsdbt848" = auto
; then
7010 if test "$_tv" = yes ; then
7012 #include <sys/types.h>
7013 $def_ioctl_meteor_h_name
7014 $def_ioctl_bt848_h_name
7015 #ifdef IOCTL_METEOR_H_NAME
7016 #include IOCTL_METEOR_H_NAME
7018 #ifdef IOCTL_BT848_H_NAME
7019 #include IOCTL_BT848_H_NAME
7022 ioctl(0, METEORSINPUT, 0);
7023 ioctl(0, TVTUNER_GETFREQ, 0);
7027 cc_check
&& _tv_bsdbt848
=yes
7030 if test "$_tv_bsdbt848" = yes ; then
7031 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7032 inputmodules
="tv-bsdbt848 $inputmodules"
7034 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7035 noinputmodules
="tv-bsdbt848 $noinputmodules"
7037 echores
"$_tv_bsdbt848"
7038 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7041 echocheck
"DirectShow TV interface"
7042 if test "$_tv_dshow" = auto
; then
7044 if test "$_tv" = yes && win32
; then
7049 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7053 cc_check
-lole32 -luuid && _tv_dshow
=yes
7056 if test "$_tv_dshow" = yes ; then
7057 inputmodules
="tv-dshow $inputmodules"
7058 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7059 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7061 noinputmodules
="tv-dshow $noinputmodules"
7062 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7064 echores
"$_tv_dshow"
7067 echocheck
"Video 4 Linux TV interface"
7068 if test "$_tv_v4l1" = auto
; then
7070 if test "$_tv" = yes && linux
; then
7071 header_check linux
/videodev.h
&& _tv_v4l1
=yes
7074 if test "$_tv_v4l1" = yes ; then
7077 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7078 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7079 inputmodules
="tv-v4l $inputmodules"
7081 noinputmodules
="tv-v4l1 $noinputmodules"
7082 def_tv_v4l
='#undef CONFIG_TV_V4L'
7087 echocheck
"Video 4 Linux 2 TV interface"
7088 if test "$_tv_v4l2" = auto
; then
7090 if test "$_tv" = yes && linux
; then
7091 header_check linux
/videodev2.h
&& _tv_v4l2
=yes
7094 if test "$_tv_v4l2" = yes ; then
7097 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7098 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7099 inputmodules
="tv-v4l2 $inputmodules"
7101 noinputmodules
="tv-v4l2 $noinputmodules"
7102 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7107 echocheck
"Radio interface"
7108 if test "$_radio" = yes ; then
7109 def_radio
='#define CONFIG_RADIO 1'
7110 inputmodules
="radio $inputmodules"
7111 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7114 if test "$_radio_capture" = yes ; then
7116 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7118 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7121 noinputmodules
="radio $noinputmodules"
7122 def_radio
='#undef CONFIG_RADIO'
7123 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7127 echocheck
"Capture for Radio interface"
7128 echores
"$_radio_capture"
7130 echocheck
"Video 4 Linux 2 Radio interface"
7131 if test "$_radio_v4l2" = auto
; then
7133 if test "$_radio" = yes && linux
; then
7134 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
7137 if test "$_radio_v4l2" = yes ; then
7138 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7140 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7142 echores
"$_radio_v4l2"
7144 echocheck
"Video 4 Linux Radio interface"
7145 if test "$_radio_v4l" = auto
; then
7147 if test "$_radio" = yes && linux
; then
7148 header_check linux
/videodev.h
&& _radio_v4l
=yes
7151 if test "$_radio_v4l" = yes ; then
7152 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7154 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7156 echores
"$_radio_v4l"
7158 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7159 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7160 echocheck
"*BSD BrookTree 848 Radio interface"
7163 #include <sys/types.h>
7164 $def_ioctl_bt848_h_name
7165 #ifdef IOCTL_BT848_H_NAME
7166 #include IOCTL_BT848_H_NAME
7168 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7170 cc_check
&& _radio_bsdbt848
=yes
7171 echores
"$_radio_bsdbt848"
7172 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7174 if test "$_radio_bsdbt848" = yes ; then
7175 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7177 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7180 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7181 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7182 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7185 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7186 if test "$_pvr" = auto
; then
7188 if test "$_tv_v4l2" = yes && linux
; then
7190 #include <linux/videodev2.h>
7191 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7193 cc_check
&& _pvr
=yes
7196 if test "$_pvr" = yes ; then
7197 def_pvr
='#define CONFIG_PVR 1'
7198 inputmodules
="pvr $inputmodules"
7200 noinputmodules
="pvr $noinputmodules"
7201 def_pvr
='#undef CONFIG_PVR'
7207 if ! beos
&& test "$_ftp" = yes ; then
7208 def_ftp
='#define CONFIG_FTP 1'
7209 inputmodules
="ftp $inputmodules"
7211 noinputmodules
="ftp $noinputmodules"
7212 def_ftp
='#undef CONFIG_FTP'
7216 echocheck
"vstream client"
7217 if test "$_vstream" = auto
; then
7220 #include <vstream-client.h>
7221 void vstream_error(const char *format, ... ) {}
7222 int main(void) { vstream_start(); return 0; }
7224 cc_check
-lvstream-client && _vstream
=yes
7226 if test "$_vstream" = yes ; then
7227 def_vstream
='#define CONFIG_VSTREAM 1'
7228 inputmodules
="vstream $inputmodules"
7229 extra_ldflags
="$extra_ldflags -lvstream-client"
7231 noinputmodules
="vstream $noinputmodules"
7232 def_vstream
='#undef CONFIG_VSTREAM'
7237 echocheck
"OSD menu"
7238 if test "$_menu" = yes ; then
7239 def_menu
='#define CONFIG_MENU 1'
7240 test $_dvbin = "yes" && _menu_dvbin
=yes
7242 def_menu
='#undef CONFIG_MENU'
7248 echocheck
"Subtitles sorting"
7249 if test "$_sortsub" = yes ; then
7250 def_sortsub
='#define CONFIG_SORTSUB 1'
7252 def_sortsub
='#undef CONFIG_SORTSUB'
7257 echocheck
"XMMS inputplugin support"
7258 if test "$_xmms" = yes ; then
7259 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7260 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
7261 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
7263 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7264 _xmmslibdir
=/usr
/lib
7267 def_xmms
='#define CONFIG_XMMS 1'
7269 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
7271 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7274 def_xmms
='#undef CONFIG_XMMS'
7278 if test "$_charset" != "noconv" ; then
7279 def_charset
="#define MSG_CHARSET \"$_charset\""
7281 def_charset
="#undef MSG_CHARSET"
7285 #############################################################################
7287 echocheck
"automatic gdb attach"
7288 if test "$_crash_debug" = yes ; then
7289 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
7291 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
7294 echores
"$_crash_debug"
7296 echocheck
"compiler support for noexecstack"
7297 if cflag_check
-Wl,-z,noexecstack
; then
7298 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
7304 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
7305 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
7306 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
7313 # Dynamic linking flags
7314 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7316 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
7317 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
7318 _ld_dl_dynamic
='-rdynamic'
7321 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7322 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
7323 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
7325 def_debug
='#undef MP_DEBUG'
7326 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
7329 echocheck
"joystick"
7330 def_joystick
='#undef CONFIG_JOYSTICK'
7331 if test "$_joystick" = yes ; then
7333 # TODO add some check
7334 def_joystick
='#define CONFIG_JOYSTICK 1'
7337 res_comment
="unsupported under $system_name"
7340 echores
"$_joystick"
7343 if test "$_lirc" = auto
; then
7345 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
7347 if test "$_lirc" = yes ; then
7348 def_lirc
='#define CONFIG_LIRC 1'
7349 libs_mplayer
="$libs_mplayer -llirc_client"
7351 def_lirc
='#undef CONFIG_LIRC'
7356 if test "$_lircc" = auto
; then
7358 header_check lirc
/lircc.h
-llircc && _lircc
=yes
7360 if test "$_lircc" = yes ; then
7361 def_lircc
='#define CONFIG_LIRCC 1'
7362 libs_mplayer
="$libs_mplayer -llircc"
7364 def_lircc
='#undef CONFIG_LIRCC'
7369 # Detect maemo development platform libraries availability (http://www.maemo.org),
7370 # they are used when run on Nokia 770|8x0
7371 echocheck
"maemo (Nokia 770|8x0)"
7372 if test "$_maemo" = auto
; then
7374 function_check libosso.h
'osso_initialize('', '', 0, NULL)' $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
7376 if test "$_maemo" = yes ; then
7377 def_maemo
='#define CONFIG_MAEMO 1'
7378 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7379 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7381 def_maemo
='#undef CONFIG_MAEMO'
7386 #############################################################################
7388 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7389 # the OMF format needs to come after the 'extern symbol prefix' check, which
7392 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7395 # linker paths should be the same for mencoder and mplayer
7397 for I
in $libs_mplayer ; do
7398 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
7399 if test -z "$_tmp" ; then
7400 extra_ldflags
="$extra_ldflags $I"
7402 _ld_tmp
="$_ld_tmp $I"
7405 libs_mplayer
=$_ld_tmp
7408 #############################################################################
7409 # 64 bit file offsets?
7410 if test "$_largefiles" = yes || freebsd
; then
7411 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7412 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7413 # dvdread support requires this (for off64_t)
7414 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7418 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
7420 # This must be the last test to be performed. Any other tests following it
7421 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7422 # against libdvdread (to permit MPlayer to use its own copy of the library).
7423 # So any compilation using the flags added here but not linking against
7424 # libdvdread can fail.
7425 echocheck
"DVD support (libdvdnav)"
7426 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7430 if test "$_dvdnav" = auto
; then
7431 if test "$_dvdread_internal" = yes ; then
7434 res_comment
="internal"
7436 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7439 if test "$_dvdnav" = auto
; then
7441 #include <inttypes.h>
7442 #include <dvdnav/dvdnav.h>
7443 int main(void) { dvdnav_t *dvd=0; return 0; }
7446 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7447 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7448 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7450 if test "$_dvdnav" = yes ; then
7452 def_dvdnav
='#define CONFIG_DVDNAV 1'
7453 if test "$dvdnav_internal" = yes ; then
7454 cflags_libdvdnav
="-Ilibdvdnav"
7455 inputmodules
="dvdnav(internal) $inputmodules"
7457 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7458 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7459 inputmodules
="dvdnav $inputmodules"
7462 def_dvdnav
='#undef CONFIG_DVDNAV'
7463 noinputmodules
="dvdnav $noinputmodules"
7467 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7468 # Read dvdnav comment above.
7471 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7472 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7474 for part
in $list; do
7475 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7476 echo "${nprefix}_$part = yes"
7481 #############################################################################
7482 echo "Creating config.mak"
7483 cat > config.mak
<< EOF
7484 # -------- Generated by configure -----------
7486 # Ensure that locale settings do not interfere with shell commands.
7489 CONFIGURATION = $configuration
7492 DOC_LANGS = $language_doc
7493 DOC_LANG_ALL = $doc_lang_all
7494 MAN_LANGS = $language_man
7495 MAN_LANG_ALL = $man_lang_all
7496 MSG_LANGS = $language_msg
7497 MSG_LANG_ALL = $msg_lang_all
7499 prefix = \$(DESTDIR)$_prefix
7500 BINDIR = \$(DESTDIR)$_bindir
7501 DATADIR = \$(DESTDIR)$_datadir
7502 LIBDIR = \$(DESTDIR)$_libdir
7503 MANDIR = \$(DESTDIR)$_mandir
7504 CONFDIR = \$(DESTDIR)$_confdir
7505 LOCALEDIR = \$(DESTDIR)$_localedir
7513 INSTALLSTRIP = $_install_strip
7516 CFLAGS = $WARNFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
7517 CXXFLAGS = $WARNFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
7518 DEPFLAGS = $DEPFLAGS
7520 CFLAGS_DHAHELPER = $cflags_dhahelper
7521 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7522 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7523 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7524 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7525 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7526 CFLAGS_STACKREALIGN = $cflags_stackrealign
7527 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7528 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7530 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7531 EXTRALIBS_MPLAYER = $libs_mplayer
7532 EXTRALIBS_MENCODER = $libs_mencoder
7541 $(mak_enable "$arch_all" "$arch" ARCH)
7542 $(mak_enable "$subarch_all" "$subarch" ARCH)
7543 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7545 MENCODER = $_mencoder
7548 NEED_GETTIMEOFDAY = $_need_gettimeofday
7549 NEED_GLOB = $_need_glob
7550 NEED_MMAP = $_need_mmap
7551 NEED_SETENV = $_need_setenv
7552 NEED_SHMEM = $_need_shmem
7553 NEED_STRSEP = $_need_strsep
7554 NEED_SWAB = $_need_swab
7555 NEED_VSSCANF = $_need_vsscanf
7563 APPLE_IR = $_apple_ir
7564 APPLE_REMOTE = $_apple_remote
7566 AUDIO_INPUT = $_audio_input
7567 BITMAP_FONT = $_bitmap_font
7572 COREAUDIO = $_coreaudio
7573 COREVIDEO = $_corevideo
7577 DIRECT3D = $_direct3d
7578 DIRECTFB = $_directfb
7582 DVDNAV_INTERNAL = $dvdnav_internal
7584 DVDREAD_INTERNAL = $_dvdread_internal
7590 FAAD_INTERNAL = $_faad_internal
7591 FASTMEMCPY = $_fastmemcpy
7593 FREETYPE = $_freetype
7598 GL_WIN32 = $_gl_win32
7601 MATRIXVIEW = $matrixview
7602 HAVE_POSIX_SELECT = $_posix_select
7603 HAVE_SYS_MMAN_H = $_mman
7606 JOYSTICK = $_joystick
7613 LIBBLURAY = $_bluray
7617 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7621 LIBMENU_DVBIN = $_menu_dvbin
7622 LIBMPEG2 = $_libmpeg2
7623 LIBNEMESI = $_nemesi
7625 LIBSMBCLIENT = $_smb
7626 LIBTHEORA = $_theora
7629 MACOSX_FINDER = $_macosx_finder
7636 MUSEPACK = $_musepack
7638 NATIVE_RTSP = $_native_rtsp
7639 NETWORKING = $networking
7642 PE_EXECUTABLE = $_pe_executable
7645 PRIORITY = $_priority
7649 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7650 QTX_EMULATION = $_qtx_emulation
7653 RADIO_CAPTURE=$_radio_capture
7654 REAL_CODECS = $_real
7658 STREAM_CACHE = $_stream_cache
7659 SGIAUDIO = $_sgiaudio
7660 SUNAUDIO = $_sunaudio
7666 TREMOR_INTERNAL = $_tremor_internal
7668 TV_BSDBT848 = $_tv_bsdbt848
7669 TV_DSHOW = $_tv_dshow
7674 UNRAR_EXEC = $_unrar_exec
7680 VIDIX_PCIDB = $_vidix_pcidb_val
7681 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7682 VIDIX_IVTV=$_vidix_drv_ivtv
7683 VIDIX_MACH64=$_vidix_drv_mach64
7684 VIDIX_MGA=$_vidix_drv_mga
7685 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7686 VIDIX_NVIDIA=$_vidix_drv_nvidia
7687 VIDIX_PM2=$_vidix_drv_pm2
7688 VIDIX_PM3=$_vidix_drv_pm3
7689 VIDIX_RADEON=$_vidix_drv_radeon
7690 VIDIX_RAGE128=$_vidix_drv_rage128
7691 VIDIX_S3=$_vidix_drv_s3
7692 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7693 VIDIX_SIS=$_vidix_drv_sis
7694 VIDIX_UNICHROME=$_vidix_drv_unichrome
7698 WIN32DLL = $_win32dll
7699 WIN32WAVEOUT = $_win32waveout
7700 WIN32_EMULATION = $_win32_emulation
7701 WINVIDIX = $winvidix
7704 XANIM_CODECS = $_xanim
7706 XMMS_PLUGINS = $_xmms
7712 YUV4MPEG = $_yuv4mpeg
7717 FFMPEG_INTERNALS = $ffmpeg_internals
7718 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7722 YASMFLAGS = $YASMFLAGS
7724 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
7728 CONFIG_H264DSP = yes
7733 CONFIG_BZLIB = $bzlib
7734 CONFIG_ENCODERS = yes
7736 CONFIG_MLIB = $_mlib
7737 CONFIG_MUXERS = $_mencoder
7738 CONFIG_VDPAU = $_vdpau
7739 CONFIG_XVMC = $_xvmc
7740 CONFIG_ZLIB = $_zlib
7742 HAVE_PTHREADS = $_pthreads
7744 HAVE_W32THREADS = $_w32threads
7745 HAVE_YASM = $have_yasm
7749 #############################################################################
7751 ff_config_enable
() {
7752 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7753 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7755 test -z "$_nprefix" && _nprefix
='CONFIG'
7756 for part
in $list; do
7757 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7758 echo "#define ${_nprefix}_$part 1"
7760 echo "#define ${_nprefix}_$part 0"
7765 echo "Creating config.h"
7767 /*----------------------------------------------------------------------------
7768 ** This file has been automatically generated by configure any changes in it
7769 ** will be lost when you run configure again.
7770 ** Instead of modifying definitions here, use the --enable/--disable options
7771 ** of the configure script! See ./configure --help for details.
7772 *---------------------------------------------------------------------------*/
7774 #ifndef MPLAYER_CONFIG_H
7775 #define MPLAYER_CONFIG_H
7777 /* Undefine this if you do not want to select mono audio (left or right)
7778 with a stereo MPEG layer 2/3 audio stream. The command line option
7779 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7780 right-only), with 0 being the default.
7782 #define CONFIG_FAKE_MONO 1
7784 /* set up audio OUTBURST. Do not change this! */
7785 #define OUTBURST 512
7787 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7789 #undef FAST_OSD_TABLE
7791 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
7792 #define MPEG12_POSTPROC 1
7793 #define ATTRIBUTE_ALIGNED_MAX 16
7797 #define CONFIGURATION "$configuration"
7799 #define MPLAYER_DATADIR "$_datadir"
7800 #define MPLAYER_CONFDIR "$_confdir"
7801 #define MPLAYER_LIBDIR "$_libdir"
7802 #define MPLAYER_LOCALEDIR "$_localedir"
7806 /* definitions needed by included libraries */
7807 #define HAVE_INTTYPES_H 1
7808 /* libmpeg2 + FFmpeg */
7811 #define HAVE_ERRNO_H 1
7812 /* libdvdcss + libdvdread */
7813 #define HAVE_LIMITS_H 1
7814 /* libdvdcss + libfaad2 */
7815 #define HAVE_UNISTD_H 1
7816 /* libfaad2 + libdvdread */
7817 #define STDC_HEADERS 1
7818 #define HAVE_MEMCPY 1
7820 #define HAVE_STRING_H 1
7821 #define HAVE_STRINGS_H 1
7822 #define HAVE_SYS_STAT_H 1
7823 #define HAVE_SYS_TYPES_H 1
7825 #define READ_CACHE_TRACE 0
7827 #define HAVE_DLFCN_H 1
7831 /* system headers */
7833 $def_alsa_asoundlib_h
7837 $def_mman_has_map_failed
7839 $def_sys_asoundlib_h
7840 $def_sys_soundcard_h
7847 /* system functions */
7870 /* system-specific features */
7885 $def_restrict_keyword
7890 /* configurable options */
7894 $def_dynamic_plugins
7897 $def_runtime_cpudetection
7905 #define __CPU__ $iproc
7909 $(ff_config_enable "$arch_all" "$arch" "ARCH")
7910 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
7911 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
7914 /* Blu-ray/DVD/VCD/CD */
7915 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
7916 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
7937 /* codec libraries */
7949 $def_mp3lame_preset_medium
7974 #define BINARY_CODECS_PATH "$_codecsdir"
7975 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7978 /* Audio output drivers */
7994 $def_ossaudio_devdsp
7995 $def_ossaudio_devmixer
8008 $def_ioctl_bt848_h_name
8009 $def_ioctl_meteor_h_name
8062 $def_directfb_version
8099 $def_vidix_drv_cyberblade
8101 $def_vidix_drv_mach64
8103 $def_vidix_drv_mga_crtc2
8104 $def_vidix_drv_nvidia
8106 $def_vidix_drv_radeon
8107 $def_vidix_drv_rage128
8109 $def_vidix_drv_sh_veu
8111 $def_vidix_drv_unichrome
8130 $def_ffmpeg_internals
8132 #define CONFIG_DECODERS 1
8133 #define CONFIG_ENCODERS 1
8134 #define CONFIG_DEMUXERS 1
8162 #define CONFIG_FASTDIV 0
8163 #define CONFIG_FFSERVER 0
8164 #define CONFIG_GPL 1
8165 #define CONFIG_GRAY 0
8166 #define CONFIG_HARDCODED_TABLES 0
8167 #define CONFIG_LIBVORBIS 0
8168 #define CONFIG_POWERPC_PERF 0
8169 #define CONFIG_SMALL 0
8170 #define CONFIG_SWSCALE_ALPHA 1
8172 #define HAVE_ATTRIBUTE_PACKED 1
8173 #define HAVE_GETHRTIME 0
8174 #define HAVE_INLINE_ASM 1
8175 #define HAVE_LDBRX 0
8176 #define HAVE_POLL_H 1
8177 #define HAVE_PPC4XX 0
8178 #define HAVE_VFP_ARGS 1
8179 #define HAVE_VIRTUALALLOC 0
8181 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
8182 #define CONFIG_AANDCT 1
8183 #define CONFIG_DCT 1
8184 #define CONFIG_DWT 1
8185 #define CONFIG_FFT 1
8186 #define CONFIG_GOLOMB 1
8187 #define CONFIG_H264DSP 1
8188 #define CONFIG_LPC 1
8189 #define CONFIG_MDCT 1
8190 #define CONFIG_RDFT 1
8192 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8194 #define HAVE_EBP_AVAILABLE 1
8196 #define HAVE_EBP_AVAILABLE 0
8199 #endif /* MPLAYER_CONFIG_H */
8202 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8203 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
8205 #############################################################################
8207 .
/version.sh
`$_cc -dumpversion`
8211 Config files successfully generated by ./configure $configuration !
8213 Install prefix: $_prefix
8214 Data directory: $_datadir
8215 Config direct.: $_confdir
8217 Byte order: $_byte_order
8218 Optimizing for: $_optimizing
8221 Messages (in addition to English): $language_msg
8222 Manual pages: $language_man
8223 Documentation: $language_doc
8225 Enabled optional drivers:
8226 Input: $inputmodules
8227 Codecs: $codecmodules
8228 Audio output: $aomodules
8229 Video output: $vomodules
8231 Disabled optional drivers:
8232 Input: $noinputmodules
8233 Codecs: $nocodecmodules
8234 Audio output: $noaomodules
8235 Video output: $novomodules
8237 'config.h' and 'config.mak' contain your configuration options.
8238 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8239 compile *** DO NOT REPORT BUGS if you tweak these files ***
8241 'make' will now compile MPlayer and 'make install' will install it.
8242 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8247 if test "$_mtrr" = yes ; then
8248 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)"
8254 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8255 operating system ($system_name). You may encounter a few files that cannot
8256 be played due to missing open source video/audio codec support.
8263 Check $TMPLOG if you wonder why an autodetection failed (make sure
8264 development headers/packages are installed).
8266 NOTE: The --enable-* parameters unconditionally force options on, completely
8267 skipping autodetection. This behavior is unlike what you may be used to from
8268 autoconf-based configure scripts that can decide to override you. This greater
8269 level of control comes at a price. You may have to provide the correct compiler
8270 and linker flags yourself.
8271 If you used one of these options (except --enable-menu and similar ones that
8272 turn on internal features) and experience a compilation or linking failure,
8273 make sure you have passed the necessary compiler/linker flags to configure.
8275 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
8279 if test "$warn_cflags" = yes; then
8282 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
8285 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8287 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8288 To do so, execute 'CFLAGS= ./configure <options>'
8294 rm -rf "$mplayer_tmpdir"