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 $source $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
69 $_cc $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++
87 int main(void) { $2; }
90 compile_check
$TMPC $@
96 int main(void) { return 0; }
99 compile_check
$TMPC $@
104 cat "$TMPS" >> "$TMPLOG"
106 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
108 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
116 "$TMPEXE" >> "$TMPLOG" 2>&1
119 # Display error message, flushes tempfile, exit
124 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
125 echo "Check \"$TMPLOG\" if you do not understand why it failed."
129 # OS test booleans functions
131 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
133 aix
() { issystem
"AIX"; }
134 amigaos
() { issystem
"AmigaOS"; }
135 beos
() { issystem
"BEOS"; }
136 bsdos
() { issystem
"BSD/OS"; }
137 cygwin
() { issystem
"CYGWIN"; }
138 darwin
() { issystem
"Darwin"; }
139 dragonfly
() { issystem
"DragonFly"; }
140 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
141 gnu
() { issystem
"GNU"; }
142 hpux
() { issystem
"HP-UX"; }
143 irix
() { issystem
"IRIX"; }
144 linux
() { issystem
"Linux"; }
145 mingw32
() { issystem
"MINGW32"; }
146 morphos
() { issystem
"MorphOS"; }
147 netbsd
() { issystem
"NetBSD"; }
148 openbsd
() { issystem
"OpenBSD"; }
149 os2
() { issystem
"OS/2"; }
150 qnx
() { issystem
"QNX"; }
151 sunos
() { issystem
"SunOS"; }
152 win32
() { cygwin || mingw32
; }
154 # arch test boolean functions
155 # x86/x86pc is used by QNX
158 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
165 x86_64|amd64
) return 0 ;;
176 ppc|ppc64|powerpc|powerpc64
) return 0;;
195 # Use this before starting a check
197 echo "============ Checking for $@ ============" >> "$TMPLOG"
198 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
201 # Use this to echo the results of a check
203 if test "$res_comment" ; then
204 res_comment
="($res_comment)"
206 echo "Result is: $@ $res_comment" >> "$TMPLOG"
207 echo "##########################################" >> "$TMPLOG"
209 echo "$@ $res_comment"
212 #############################################################################
214 # Check how echo works in this /bin/sh
216 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
217 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
221 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
222 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")
223 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
227 Usage: $0 [OPTIONS]...
230 -h, --help display this help and exit
232 Installation directories:
233 --prefix=DIR prefix directory for installation [/usr/local]
234 --bindir=DIR directory for installing binaries [PREFIX/bin]
235 --datadir=DIR directory for installing machine independent
236 data files (skins, etc) [PREFIX/share/mplayer]
237 --mandir=DIR directory for installing man pages [PREFIX/share/man]
238 --confdir=DIR directory for installing configuration files
240 --localedir=DIR directory for locale tree [PREFIX/share/locale]
241 --libdir=DIR directory for object code libraries [PREFIX/lib]
242 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
245 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
246 --disable-mplayer disable MPlayer compilation [enable]
247 --disable-largefiles disable support for files > 2GB [enable]
248 --enable-termcap use termcap database for key codes [autodetect]
249 --enable-termios use termios database for key codes [autodetect]
250 --disable-iconv disable iconv for encoding conversion [autodetect]
251 --disable-langinfo do not use langinfo [autodetect]
252 --enable-lirc enable LIRC (remote control) support [autodetect]
253 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
254 --enable-joystick enable joystick support [disable]
255 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
256 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
257 --disable-vm disable X video mode extensions [autodetect]
258 --disable-xf86keysym disable support for multimedia keys [autodetect]
259 --enable-radio enable radio interface [disable]
260 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
261 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
262 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
263 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
264 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
265 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
266 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
267 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
268 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
269 --disable-network disable networking [enable]
270 --enable-winsock2_h enable winsock2_h [autodetect]
271 --enable-smb enable Samba (SMB) input [autodetect]
272 --enable-live enable LIVE555 Streaming Media [autodetect]
273 --enable-nemesi enable Nemesi Streaming Media [autodetect]
274 --disable-vcd disable VCD support [autodetect]
275 --disable-dvdnav disable libdvdnav [autodetect]
276 --disable-dvdread disable libdvdread [autodetect]
277 --disable-dvdread-internal disable internal libdvdread [autodetect]
278 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
279 --disable-cdparanoia disable cdparanoia [autodetect]
280 --disable-cddb disable cddb [autodetect]
281 --disable-bitmap-font disable bitmap font support [enable]
282 --disable-freetype disable FreeType 2 font rendering [autodetect]
283 --disable-fontconfig disable fontconfig font lookup [autodetect]
284 --disable-unrarexec disable using of UnRAR executable [enabled]
285 --enable-menu enable OSD menu (not DVD menu) [disabled]
286 --disable-sortsub disable subtitle sorting [enabled]
287 --enable-fribidi enable the FriBiDi libs [autodetect]
288 --disable-enca disable ENCA charset oracle library [autodetect]
289 --disable-maemo disable maemo specific features [autodetect]
290 --enable-macosx-finder enable Mac OS X Finder invocation parameter
292 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
293 --disable-inet6 disable IPv6 support [autodetect]
294 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
295 --disable-ftp disable FTP support [enabled]
296 --disable-vstream disable TiVo vstream client support [autodetect]
297 --disable-pthreads disable Posix threads support [autodetect]
298 --disable-w32threads disable Win32 threads support [autodetect]
299 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
300 --enable-rpath enable runtime linker path for extra libs [disabled]
303 --enable-gif enable GIF support [autodetect]
304 --enable-png enable PNG input/output support [autodetect]
305 --enable-mng enable MNG input support [autodetect]
306 --enable-jpeg enable JPEG input/output support [autodetect]
307 --enable-libcdio enable libcdio support [autodetect]
308 --enable-liblzo enable liblzo support [autodetect]
309 --disable-win32dll disable Win32 DLL support [autodetect]
310 --disable-qtx disable QuickTime codecs support [enabled]
311 --disable-xanim disable XAnim codecs support [enabled]
312 --disable-real disable RealPlayer codecs support [enabled]
313 --disable-xvid disable Xvid [autodetect]
314 --disable-x264 disable x264 [autodetect]
315 --disable-libnut disable libnut [autodetect]
316 --disable-libavutil disable libavutil [autodetect]
317 --disable-libavcodec disable libavcodec [autodetect]
318 --disable-libavformat disable libavformat [autodetect]
319 --disable-libpostproc disable libpostproc [autodetect]
320 --disable-libswscale disable libswscale [autodetect]
321 --disable-tremor-internal disable internal Tremor [enabled]
322 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
323 --enable-tremor enable external Tremor [autodetect]
324 --disable-libvorbis disable libvorbis support [autodetect]
325 --disable-speex disable Speex support [autodetect]
326 --enable-theora enable OggTheora libraries [autodetect]
327 --enable-faad enable external FAAD2 (AAC) [autodetect]
328 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
329 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
330 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
331 --disable-ladspa disable LADSPA plugin support [autodetect]
332 --disable-libbs2b disable libbs2b audio filter support [autodetect]
333 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
334 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
335 --disable-mad disable libmad (MPEG audio) support [autodetect]
336 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
337 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
338 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
339 --enable-xmms enable XMMS input plugin support [disabled]
340 --enable-libdca enable libdca support [autodetect]
341 --disable-mp3lib disable builtin mp3lib [autodetect]
342 --disable-liba52 disable liba52 [autodetect]
343 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
344 --disable-musepack disable musepack support [autodetect]
347 --disable-vidix disable VIDIX [for x86 *nix]
348 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
349 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
350 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
351 --disable-vidix-pcidb disable VIDIX PCI device name database
352 --enable-dhahelper enable VIDIX dhahelper support
353 --enable-svgalib_helper enable VIDIX svgalib_helper support
354 --enable-gl enable OpenGL video output [autodetect]
355 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
356 --enable-dga2 enable DGA 2 support [autodetect]
357 --enable-dga1 enable DGA 1 support [autodetect]
358 --enable-vesa enable VESA video output [autodetect]
359 --enable-svga enable SVGAlib video output [autodetect]
360 --enable-sdl enable SDL video output [autodetect]
361 --enable-kva enable KVA video output [autodetect]
362 --enable-aa enable AAlib video output [autodetect]
363 --enable-caca enable CACA video output [autodetect]
364 --enable-ggi enable GGI video output [autodetect]
365 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
366 --enable-direct3d enable Direct3D video output [autodetect]
367 --enable-directx enable DirectX video output [autodetect]
368 --enable-dxr2 enable DXR2 video output [autodetect]
369 --enable-dxr3 enable DXR3/H+ video output [autodetect]
370 --enable-ivtv enable IVTV TV-Out video output [autodetect]
371 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
372 --enable-dvb enable DVB video output [autodetect]
373 --enable-mga enable mga_vid video output [autodetect]
374 --enable-xmga enable mga_vid X11 video output [autodetect]
375 --enable-xv enable Xv video output [autodetect]
376 --enable-xvmc enable XvMC acceleration [disable]
377 --enable-vdpau enable VDPAU acceleration [autodetect]
378 --enable-vm enable XF86VidMode support [autodetect]
379 --enable-xinerama enable Xinerama support [autodetect]
380 --enable-x11 enable X11 video output [autodetect]
381 --enable-xshape enable XShape support [autodetect]
382 --disable-xss disable screensaver support via xss [autodetect]
383 --enable-fbdev enable FBDev video output [autodetect]
384 --enable-mlib enable mediaLib video output (Solaris) [disable]
385 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
386 --enable-tdfxfb enable tdfxfb video output [disable]
387 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
388 --enable-wii enable Nintendo Wii/GameCube video output [disable]
389 --enable-directfb enable DirectFB video output [autodetect]
390 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
391 --enable-bl enable Blinkenlights video output [disable]
392 --enable-tdfxvid enable tdfx_vid video output [disable]
393 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
394 --disable-tga disable Targa video output [enable]
395 --disable-pnm disable PNM video output [enable]
396 --disable-md5sum disable md5sum video output [enable]
397 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
398 --disable-corevideo disable CoreVideo video output [autodetect]
399 --disable-quartz disable Quartz video output [autodetect]
402 --disable-alsa disable ALSA audio output [autodetect]
403 --disable-ossaudio disable OSS audio output [autodetect]
404 --disable-arts disable aRts audio output [autodetect]
405 --disable-esd disable esd audio output [autodetect]
406 --disable-pulse disable Pulseaudio audio output [autodetect]
407 --disable-jack disable JACK audio output [autodetect]
408 --enable-openal enable OpenAL audio output [disable]
409 --disable-nas disable NAS audio output [autodetect]
410 --disable-sgiaudio disable SGI audio output [autodetect]
411 --disable-sunaudio disable Sun audio output [autodetect]
412 --disable-kai disable KAI audio output [autodetect]
413 --disable-dart disable DART audio output [autodetect]
414 --disable-win32waveout disable Windows waveout audio output [autodetect]
415 --disable-coreaudio disable CoreAudio audio output [autodetect]
416 --disable-select disable using select() on the audio device [enable]
419 --enable-translation enable support for translated output [disable]
420 --charset=charset convert the console messages to this character set
421 --language-doc=lang language to use for the documentation [en]
422 --language-man=lang language to use for the man pages [en]
423 --language-msg=lang extra languages for program messages [all]
424 --language=lang default language to use [en]
425 Specific options override --language. You can pass a list of languages separated
426 by whitespace or commas instead of a single language. Nonexisting translations
427 will be dropped from each list. All translations available in the list will be
428 installed. The value "all" will activate all translations. The LINGUAS
429 environment variable is honored. In all cases the fallback is English.
430 The program always supports English-language output; additional message
431 languages are only installed if --enable-translation is also specified.
432 Available values for --language-doc are: all $doc_lang_all
433 Available values for --language-man are: all $man_lang_all
434 Available values for --language-msg are: all $msg_lang_all
436 Miscellaneous options:
437 --enable-runtime-cpudetection enable runtime CPU detection [disable]
438 --enable-cross-compile enable cross-compilation [autodetect]
439 --cc=COMPILER C compiler to build MPlayer [gcc]
440 --host-cc=COMPILER C compiler for tools needed while building [gcc]
441 --as=ASSEMBLER assembler to build MPlayer [as]
442 --nm=NM nm tool to build MPlayer [nm]
443 --yasm=YASM Yasm assembler to build MPlayer [yasm]
444 --ar=AR librarian to build MPlayer [ar]
445 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
446 --windres=WINDRES windres to build MPlayer [windres]
447 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
448 --enable-static build a statically linked binary
449 --with-install=PATH path to a custom install program
452 --enable-mmx enable MMX [autodetect]
453 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
454 --enable-3dnow enable 3DNow! [autodetect]
455 --enable-3dnowext enable extended 3DNow! [autodetect]
456 --enable-sse enable SSE [autodetect]
457 --enable-sse2 enable SSE2 [autodetect]
458 --enable-ssse3 enable SSSE3 [autodetect]
459 --enable-shm enable shm [autodetect]
460 --enable-altivec enable AltiVec (PowerPC) [autodetect]
461 --enable-armv5te enable DSP extensions (ARM) [autodetect]
462 --enable-armv6 enable ARMv6 (ARM) [autodetect]
463 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
464 --enable-armvfp enable ARM VFP (ARM) [autodetect]
465 --enable-neon enable NEON (ARM) [autodetect]
466 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
467 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
468 --enable-big-endian force byte order to big-endian [autodetect]
469 --enable-debug[=1-3] compile-in debugging information [disable]
470 --enable-profile compile-in profiling information [disable]
471 --disable-sighandler disable sighandler for crashes [enable]
472 --enable-crash-debug enable automatic gdb attach on crash [disable]
473 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
474 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
476 Use these options if autodetection fails:
477 --extra-cflags=FLAGS extra CFLAGS
478 --extra-ldflags=FLAGS extra LDFLAGS
479 --extra-libs=FLAGS extra linker flags
480 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
481 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
482 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
484 --with-freetype-config=PATH path to freetype-config
485 --with-glib-config=PATH path to glib*-config
486 --with-gtk-config=PATH path to gtk*-config
487 --with-sdl-config=PATH path to sdl*-config
488 --with-dvdnav-config=PATH path to dvdnav-config
489 --with-dvdread-config=PATH path to dvdread-config
491 This configure script is NOT autoconf-based, even though its output is similar.
492 It will try to autodetect all configuration options. If you --enable an option
493 it will be forcefully turned on, skipping autodetection. This can break
494 compilation, so you need to know what you are doing.
499 # GOTCHA: the variables below defines the default behavior for autodetection
500 # and have - unless stated otherwise - at least 2 states : yes no
501 # If autodetection is available then the third state is: auto
525 test "$CC" && _cc
="$CC"
529 _runtime_cpudetection
=no
537 _libavcodec_internals
=no
538 _libswscale_internals
=no
547 _xvmc
=no
#auto when complete
613 _dvdnavconfig
=dvdnav-config
614 _dvdreadconfig
=dvdread-config
616 _dvdread_internal
=auto
617 _libdvdcss_internal
=auto
628 _mlib
=no
#broken, thus disabled
701 _freetypeconfig
='freetype-config'
716 def_dos_paths
="#define HAVE_DOS_PATHS 0"
717 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
718 def_priority
="#undef CONFIG_PRIORITY"
719 def_pthread_cache
="#undef PTHREAD_CACHE"
727 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
730 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
733 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
736 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
739 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
742 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
745 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
748 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
752 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
755 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
759 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
761 --with-freetype-config=*)
762 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
765 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
767 --with-glib-config=*)
768 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
770 --with-dvdnav-config=*)
771 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
773 --with-dvdread-config=*)
774 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
778 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
781 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
784 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
786 --extra-libs-mplayer=*)
787 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
789 --extra-libs-mencoder=*)
790 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
794 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
803 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
806 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
812 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
815 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
818 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
821 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
824 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
827 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
830 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
833 language
=$
(echo $ac_option | cut
-d '=' -f 2)
852 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
857 --enable-translation) _translation
=yes ;;
858 --disable-translation) _translation
=no
;;
859 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
860 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
861 --enable-cross-compile) _cross_compile
=yes ;;
862 --disable-cross-compile) _cross_compile
=no
;;
863 --enable-mencoder) _mencoder
=yes ;;
864 --disable-mencoder) _mencoder
=no
;;
865 --enable-mplayer) _mplayer
=yes ;;
866 --disable-mplayer) _mplayer
=no
;;
867 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
868 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
869 --enable-x11) _x11
=yes ;;
870 --disable-x11) _x11
=no
;;
871 --enable-xshape) _xshape
=yes ;;
872 --disable-xshape) _xshape
=no
;;
873 --enable-xss) _xss
=yes ;;
874 --disable-xss) _xss
=no
;;
875 --enable-xv) _xv
=yes ;;
876 --disable-xv) _xv
=no
;;
877 --enable-xvmc) _xvmc
=yes ;;
878 --disable-xvmc) _xvmc
=no
;;
879 --enable-vdpau) _vdpau
=yes ;;
880 --disable-vdpau) _vdpau
=no
;;
881 --enable-sdl) _sdl
=yes ;;
882 --disable-sdl) _sdl
=no
;;
883 --enable-kva) _kva
=yes ;;
884 --disable-kva) _kva
=no
;;
885 --enable-direct3d) _direct3d
=yes ;;
886 --disable-direct3d) _direct3d
=no
;;
887 --enable-directx) _directx
=yes ;;
888 --disable-directx) _directx
=no
;;
889 --enable-win32waveout) _win32waveout
=yes ;;
890 --disable-win32waveout) _win32waveout
=no
;;
891 --enable-nas) _nas
=yes ;;
892 --disable-nas) _nas
=no
;;
893 --enable-png) _png
=yes ;;
894 --disable-png) _png
=no
;;
895 --enable-mng) _mng
=yes ;;
896 --disable-mng) _mng
=no
;;
897 --enable-jpeg) _jpeg
=yes ;;
898 --disable-jpeg) _jpeg
=no
;;
899 --enable-pnm) _pnm
=yes ;;
900 --disable-pnm) _pnm
=no
;;
901 --enable-md5sum) _md5sum
=yes ;;
902 --disable-md5sum) _md5sum
=no
;;
903 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
904 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
905 --enable-gif) _gif
=yes ;;
906 --disable-gif) _gif
=no
;;
907 --enable-gl) _gl
=yes ;;
908 --disable-gl) _gl
=no
;;
909 --enable-matrixview) matrixview
=yes ;;
910 --disable-matrixview) matrixview
=no
;;
911 --enable-ggi) _ggi
=yes ;;
912 --disable-ggi) _ggi
=no
;;
913 --enable-ggiwmh) _ggiwmh
=yes ;;
914 --disable-ggiwmh) _ggiwmh
=no
;;
915 --enable-aa) _aa
=yes ;;
916 --disable-aa) _aa
=no
;;
917 --enable-caca) _caca
=yes ;;
918 --disable-caca) _caca
=no
;;
919 --enable-svga) _svga
=yes ;;
920 --disable-svga) _svga
=no
;;
921 --enable-vesa) _vesa
=yes ;;
922 --disable-vesa) _vesa
=no
;;
923 --enable-fbdev) _fbdev
=yes ;;
924 --disable-fbdev) _fbdev
=no
;;
925 --enable-dvb) _dvb
=yes ;;
926 --disable-dvb) _dvb
=no
;;
927 --enable-dxr2) _dxr2
=yes ;;
928 --disable-dxr2) _dxr2
=no
;;
929 --enable-dxr3) _dxr3
=yes ;;
930 --disable-dxr3) _dxr3
=no
;;
931 --enable-ivtv) _ivtv
=yes ;;
932 --disable-ivtv) _ivtv
=no
;;
933 --enable-v4l2) _v4l2
=yes ;;
934 --disable-v4l2) _v4l2
=no
;;
935 --enable-iconv) _iconv
=yes ;;
936 --disable-iconv) _iconv
=no
;;
937 --enable-langinfo) _langinfo
=yes ;;
938 --disable-langinfo) _langinfo
=no
;;
939 --enable-rtc) _rtc
=yes ;;
940 --disable-rtc) _rtc
=no
;;
941 --enable-libdv) _libdv
=yes ;;
942 --disable-libdv) _libdv
=no
;;
943 --enable-ossaudio) _ossaudio
=yes ;;
944 --disable-ossaudio) _ossaudio
=no
;;
945 --enable-arts) _arts
=yes ;;
946 --disable-arts) _arts
=no
;;
947 --enable-esd) _esd
=yes ;;
948 --disable-esd) _esd
=no
;;
949 --enable-pulse) _pulse
=yes ;;
950 --disable-pulse) _pulse
=no
;;
951 --enable-jack) _jack
=yes ;;
952 --disable-jack) _jack
=no
;;
953 --enable-openal) _openal
=yes ;;
954 --disable-openal) _openal
=no
;;
955 --enable-kai) _kai
=yes ;;
956 --disable-kai) _kai
=no
;;
957 --enable-dart) _dart
=yes ;;
958 --disable-dart) _dart
=no
;;
959 --enable-mad) _mad
=yes ;;
960 --disable-mad) _mad
=no
;;
961 --enable-mp3lame) _mp3lame
=yes ;;
962 --disable-mp3lame) _mp3lame
=no
;;
963 --enable-toolame) _toolame
=yes ;;
964 --disable-toolame) _toolame
=no
;;
965 --enable-twolame) _twolame
=yes ;;
966 --disable-twolame) _twolame
=no
;;
967 --enable-libcdio) _libcdio
=yes ;;
968 --disable-libcdio) _libcdio
=no
;;
969 --enable-liblzo) _liblzo
=yes ;;
970 --disable-liblzo) _liblzo
=no
;;
971 --enable-libvorbis) _libvorbis
=yes ;;
972 --disable-libvorbis) _libvorbis
=no
;;
973 --enable-speex) _speex
=yes ;;
974 --disable-speex) _speex
=no
;;
975 --enable-tremor) _tremor
=yes ;;
976 --disable-tremor) _tremor
=no
;;
977 --enable-tremor-internal) _tremor_internal
=yes ;;
978 --disable-tremor-internal) _tremor_internal
=no
;;
979 --enable-tremor-low) _tremor_low
=yes ;;
980 --disable-tremor-low) _tremor_low
=no
;;
981 --enable-theora) _theora
=yes ;;
982 --disable-theora) _theora
=no
;;
983 --enable-mpg123) _mpg123
=yes ;;
984 --disable-mpg123) _mpg123
=no
;;
985 --enable-mp3lib) _mp3lib
=yes ;;
986 --disable-mp3lib) _mp3lib
=no
;;
987 --enable-liba52) _liba52
=yes ;;
988 --disable-liba52) _liba52
=no
;;
989 --enable-libdca) _libdca
=yes ;;
990 --disable-libdca) _libdca
=no
;;
991 --enable-libmpeg2) _libmpeg2
=yes ;;
992 --disable-libmpeg2) _libmpeg2
=no
;;
993 --enable-musepack) _musepack
=yes ;;
994 --disable-musepack) _musepack
=no
;;
995 --enable-faad) _faad
=yes ;;
996 --disable-faad) _faad
=no
;;
997 --enable-faad-internal) _faad_internal
=yes ;;
998 --disable-faad-internal) _faad_internal
=no
;;
999 --enable-faad-fixed) _faad_fixed
=yes ;;
1000 --disable-faad-fixed) _faad_fixed
=no
;;
1001 --enable-faac) _faac
=yes ;;
1002 --disable-faac) _faac
=no
;;
1003 --enable-ladspa) _ladspa
=yes ;;
1004 --disable-ladspa) _ladspa
=no
;;
1005 --enable-libbs2b) _libbs2b
=yes ;;
1006 --disable-libbs2b) _libbs2b
=no
;;
1007 --enable-xmms) _xmms
=yes ;;
1008 --disable-xmms) _xmms
=no
;;
1009 --enable-vcd) _vcd
=yes ;;
1010 --disable-vcd) _vcd
=no
;;
1011 --enable-dvdread) _dvdread
=yes ;;
1012 --disable-dvdread) _dvdread
=no
;;
1013 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1014 --disable-dvdread-internal) _dvdread_internal
=no
;;
1015 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1016 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1017 --enable-dvdnav) _dvdnav
=yes ;;
1018 --disable-dvdnav) _dvdnav
=no
;;
1019 --enable-xanim) _xanim
=yes ;;
1020 --disable-xanim) _xanim
=no
;;
1021 --enable-real) _real
=yes ;;
1022 --disable-real) _real
=no
;;
1023 --enable-live) _live
=yes ;;
1024 --disable-live) _live
=no
;;
1025 --enable-nemesi) _nemesi
=yes ;;
1026 --disable-nemesi) _nemesi
=no
;;
1027 --enable-xinerama) _xinerama
=yes ;;
1028 --disable-xinerama) _xinerama
=no
;;
1029 --enable-mga) _mga
=yes ;;
1030 --disable-mga) _mga
=no
;;
1031 --enable-xmga) _xmga
=yes ;;
1032 --disable-xmga) _xmga
=no
;;
1033 --enable-vm) _vm
=yes ;;
1034 --disable-vm) _vm
=no
;;
1035 --enable-xf86keysym) _xf86keysym
=yes ;;
1036 --disable-xf86keysym) _xf86keysym
=no
;;
1037 --enable-mlib) _mlib
=yes ;;
1038 --disable-mlib) _mlib
=no
;;
1039 --enable-sunaudio) _sunaudio
=yes ;;
1040 --disable-sunaudio) _sunaudio
=no
;;
1041 --enable-sgiaudio) _sgiaudio
=yes ;;
1042 --disable-sgiaudio) _sgiaudio
=no
;;
1043 --enable-alsa) _alsa
=yes ;;
1044 --disable-alsa) _alsa
=no
;;
1045 --enable-tv) _tv
=yes ;;
1046 --disable-tv) _tv
=no
;;
1047 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1048 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1049 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1050 --disable-tv-v4l1) _tv_v4l1
=no
;;
1051 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1052 --disable-tv-v4l2) _tv_v4l2
=no
;;
1053 --enable-tv-dshow) _tv_dshow
=yes ;;
1054 --disable-tv-dshow) _tv_dshow
=no
;;
1055 --enable-radio) _radio
=yes ;;
1056 --enable-radio-capture) _radio_capture
=yes ;;
1057 --disable-radio-capture) _radio_capture
=no
;;
1058 --disable-radio) _radio
=no
;;
1059 --enable-radio-v4l) _radio_v4l
=yes ;;
1060 --disable-radio-v4l) _radio_v4l
=no
;;
1061 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1062 --disable-radio-v4l2) _radio_v4l2
=no
;;
1063 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1064 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1065 --enable-pvr) _pvr
=yes ;;
1066 --disable-pvr) _pvr
=no
;;
1067 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1068 --disable-fastmemcpy) _fastmemcpy
=no
;;
1069 --enable-network) _network
=yes ;;
1070 --disable-network) _network
=no
;;
1071 --enable-winsock2_h) _winsock2_h
=yes ;;
1072 --disable-winsock2_h) _winsock2_h
=no
;;
1073 --enable-smb) _smb
=yes ;;
1074 --disable-smb) _smb
=no
;;
1075 --enable-vidix) _vidix
=yes ;;
1076 --disable-vidix) _vidix
=no
;;
1077 --with-vidix-drivers=*)
1078 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1080 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1081 --enable-dhahelper) _dhahelper
=yes ;;
1082 --disable-dhahelper) _dhahelper
=no
;;
1083 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1084 --disable-svgalib_helper) _svgalib_helper
=no
;;
1085 --enable-joystick) _joystick
=yes ;;
1086 --disable-joystick) _joystick
=no
;;
1087 --enable-xvid) _xvid
=yes ;;
1088 --disable-xvid) _xvid
=no
;;
1089 --enable-x264) _x264
=yes ;;
1090 --disable-x264) _x264
=no
;;
1091 --enable-libnut) _libnut
=yes ;;
1092 --disable-libnut) _libnut
=no
;;
1093 --enable-libavutil) _libavutil
=yes ;;
1094 --disable-libavutil) _libavutil
=no
;;
1095 --enable-libavcodec) _libavcodec
=yes ;;
1096 --disable-libavcodec) _libavcodec
=no
;;
1097 --enable-libavformat) _libavformat
=yes ;;
1098 --disable-libavformat) _libavformat
=no
;;
1099 --enable-libpostproc) _libpostproc
=yes ;;
1100 --disable-libpostproc) _libpostproc
=no
;;
1101 --enable-libswscale) _libswscale
=yes ;;
1102 --disable-libswscale) _libswscale
=no
;;
1103 --ffmpeg-source-dir=*)
1104 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1106 --enable-lirc) _lirc
=yes ;;
1107 --disable-lirc) _lirc
=no
;;
1108 --enable-lircc) _lircc
=yes ;;
1109 --disable-lircc) _lircc
=no
;;
1110 --enable-apple-remote) _apple_remote
=yes ;;
1111 --disable-apple-remote) _apple_remote
=no
;;
1112 --enable-apple-ir) _apple_ir
=yes ;;
1113 --disable-apple-ir) _apple_ir
=no
;;
1114 --enable-gui) _gui
=yes ;;
1115 --disable-gui) _gui
=no
;;
1116 --enable-gtk1) _gtk1
=yes ;;
1117 --disable-gtk1) _gtk1
=no
;;
1118 --enable-termcap) _termcap
=yes ;;
1119 --disable-termcap) _termcap
=no
;;
1120 --enable-termios) _termios
=yes ;;
1121 --disable-termios) _termios
=no
;;
1122 --enable-3dfx) _3dfx
=yes ;;
1123 --disable-3dfx) _3dfx
=no
;;
1124 --enable-s3fb) _s3fb
=yes ;;
1125 --disable-s3fb) _s3fb
=no
;;
1126 --enable-wii) _wii
=yes ;;
1127 --disable-wii) _wii
=no
;;
1128 --enable-tdfxfb) _tdfxfb
=yes ;;
1129 --disable-tdfxfb) _tdfxfb
=no
;;
1130 --disable-tdfxvid) _tdfxvid
=no
;;
1131 --enable-tdfxvid) _tdfxvid
=yes ;;
1132 --disable-xvr100) _xvr100
=no
;;
1133 --enable-xvr100) _xvr100
=yes ;;
1134 --disable-tga) _tga
=no
;;
1135 --enable-tga) _tga
=yes ;;
1136 --enable-directfb) _directfb
=yes ;;
1137 --disable-directfb) _directfb
=no
;;
1138 --enable-zr) _zr
=yes ;;
1139 --disable-zr) _zr
=no
;;
1140 --enable-bl) _bl
=yes ;;
1141 --disable-bl) _bl
=no
;;
1142 --enable-mtrr) _mtrr
=yes ;;
1143 --disable-mtrr) _mtrr
=no
;;
1144 --enable-largefiles) _largefiles
=yes ;;
1145 --disable-largefiles) _largefiles
=no
;;
1146 --enable-shm) _shm
=yes ;;
1147 --disable-shm) _shm
=no
;;
1148 --enable-select) _select
=yes ;;
1149 --disable-select) _select
=no
;;
1150 --enable-cdparanoia) _cdparanoia
=yes ;;
1151 --disable-cdparanoia) _cdparanoia
=no
;;
1152 --enable-cddb) _cddb
=yes ;;
1153 --disable-cddb) _cddb
=no
;;
1154 --enable-big-endian) _big_endian
=yes ;;
1155 --disable-big-endian) _big_endian
=no
;;
1156 --enable-bitmap-font) _bitmap_font
=yes ;;
1157 --disable-bitmap-font) _bitmap_font
=no
;;
1158 --enable-freetype) _freetype
=yes ;;
1159 --disable-freetype) _freetype
=no
;;
1160 --enable-fontconfig) _fontconfig
=yes ;;
1161 --disable-fontconfig) _fontconfig
=no
;;
1162 --enable-unrarexec) _unrar_exec
=yes ;;
1163 --disable-unrarexec) _unrar_exec
=no
;;
1164 --enable-ftp) _ftp
=yes ;;
1165 --disable-ftp) _ftp
=no
;;
1166 --enable-vstream) _vstream
=yes ;;
1167 --disable-vstream) _vstream
=no
;;
1168 --enable-pthreads) _pthreads
=yes ;;
1169 --disable-pthreads) _pthreads
=no
;;
1170 --enable-w32threads) _w32threads
=yes ;;
1171 --disable-w32threads) _w32threads
=no
;;
1172 --enable-ass) _ass
=yes ;;
1173 --disable-ass) _ass
=no
;;
1174 --enable-rpath) _rpath
=yes ;;
1175 --disable-rpath) _rpath
=no
;;
1177 --enable-fribidi) _fribidi
=yes ;;
1178 --disable-fribidi) _fribidi
=no
;;
1180 --enable-enca) _enca
=yes ;;
1181 --disable-enca) _enca
=no
;;
1183 --enable-inet6) _inet6
=yes ;;
1184 --disable-inet6) _inet6
=no
;;
1186 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1187 --disable-gethostbyname2) _gethostbyname2
=no
;;
1189 --enable-dga1) _dga1
=yes ;;
1190 --disable-dga1) _dga1
=no
;;
1191 --enable-dga2) _dga2
=yes ;;
1192 --disable-dga2) _dga2
=no
;;
1194 --enable-menu) _menu
=yes ;;
1195 --disable-menu) _menu
=no
;;
1197 --enable-qtx) _qtx
=yes ;;
1198 --disable-qtx) _qtx
=no
;;
1200 --enable-coreaudio) _coreaudio
=yes ;;
1201 --disable-coreaudio) _coreaudio
=no
;;
1202 --enable-corevideo) _corevideo
=yes ;;
1203 --disable-corevideo) _corevideo
=no
;;
1204 --enable-quartz) _quartz
=yes ;;
1205 --disable-quartz) _quartz
=no
;;
1206 --enable-macosx-finder) _macosx_finder
=yes ;;
1207 --disable-macosx-finder) _macosx_finder
=no
;;
1208 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1209 --disable-macosx-bundle) _macosx_bundle
=no
;;
1211 --enable-maemo) _maemo
=yes ;;
1212 --disable-maemo) _maemo
=no
;;
1214 --enable-sortsub) _sortsub
=yes ;;
1215 --disable-sortsub) _sortsub
=no
;;
1217 --enable-crash-debug) _crash_debug
=yes ;;
1218 --disable-crash-debug) _crash_debug
=no
;;
1219 --enable-sighandler) _sighandler
=yes ;;
1220 --disable-sighandler) _sighandler
=no
;;
1221 --enable-win32dll) _win32dll
=yes ;;
1222 --disable-win32dll) _win32dll
=no
;;
1224 --enable-sse) _sse
=yes ;;
1225 --disable-sse) _sse
=no
;;
1226 --enable-sse2) _sse2
=yes ;;
1227 --disable-sse2) _sse2
=no
;;
1228 --enable-ssse3) _ssse3
=yes ;;
1229 --disable-ssse3) _ssse3
=no
;;
1230 --enable-mmxext) _mmxext
=yes ;;
1231 --disable-mmxext) _mmxext
=no
;;
1232 --enable-3dnow) _3dnow
=yes ;;
1233 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1234 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1235 --disable-3dnowext) _3dnowext
=no
;;
1236 --enable-cmov) _cmov
=yes ;;
1237 --disable-cmov) _cmov
=no
;;
1238 --enable-fast-cmov) _fast_cmov
=yes ;;
1239 --disable-fast-cmov) _fast_cmov
=no
;;
1240 --enable-fast-clz) _fast_clz
=yes ;;
1241 --disable-fast-clz) _fast_clz
=no
;;
1242 --enable-altivec) _altivec
=yes ;;
1243 --disable-altivec) _altivec
=no
;;
1244 --enable-armv5te) _armv5te
=yes ;;
1245 --disable-armv5te) _armv5te
=no
;;
1246 --enable-armv6) _armv6
=yes ;;
1247 --disable-armv6) _armv6
=no
;;
1248 --enable-armv6t2) _armv6t2
=yes ;;
1249 --disable-armv6t2) _armv6t2
=no
;;
1250 --enable-armvfp) _armvfp
=yes ;;
1251 --disable-armvfp) _armvfp
=no
;;
1252 --enable-neon) neon
=yes ;;
1253 --disable-neon) neon
=no
;;
1254 --enable-iwmmxt) _iwmmxt
=yes ;;
1255 --disable-iwmmxt) _iwmmxt
=no
;;
1256 --enable-mmx) _mmx
=yes ;;
1257 --disable-mmx) # 3Dnow! and MMX2 require MMX
1258 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1261 echo "Unknown parameter: $ac_option"
1268 if test "$_gui" = yes ; then
1269 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1270 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1273 # Atmos: moved this here, to be correct, if --prefix is specified
1274 test -z "$_bindir" && _bindir
="$_prefix/bin"
1275 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1276 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1277 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1278 test -z "$_libdir" && _libdir
="$_prefix/lib"
1279 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1281 # Determine our OS name and CPU architecture
1282 if test -z "$_target" ; then
1284 system_name
=$
(uname
-s 2>&1)
1285 case "$system_name" in
1286 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1300 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1310 system_name
="$system_name-UNKNOWN"
1315 # host's CPU/instruction set
1316 host_arch
=$
(uname
-p 2>&1)
1317 case "$host_arch" in
1318 i386|sparc|ppc|alpha|arm|mips|vax
)
1320 powerpc
) # Darwin returns 'powerpc'
1323 *) # uname -p on Linux returns 'unknown' for the processor type,
1324 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1326 # Maybe uname -m (machine hardware name) returns something we
1329 # x86/x86pc is used by QNX
1330 case "$(uname -m 2>&1)" in
1331 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
;;
1332 ia64
) host_arch
=ia64
;;
1333 macppc|ppc
) host_arch
=ppc
;;
1334 ppc64
) host_arch
=ppc64
;;
1335 alpha
) host_arch
=alpha
;;
1336 sparc
) host_arch
=sparc
;;
1337 sparc64
) host_arch
=sparc64
;;
1338 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1339 arm
*|zaurus|cats
) host_arch
=arm
;;
1340 sh3|sh4|sh4a
) host_arch
=sh
;;
1341 s390
) host_arch
=s390
;;
1342 s390x
) host_arch
=s390x
;;
1343 *mips
*) host_arch
=mips
;;
1344 vax
) host_arch
=vax
;;
1345 xtensa
*) host_arch
=xtensa
;;
1346 *) host_arch
=UNKNOWN
;;
1350 else # if test -z "$_target"
1351 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1352 case "$(echo $system_name | tr A-Z a-z)" in
1353 linux
) system_name
=Linux
;;
1354 freebsd
) system_name
=FreeBSD
;;
1355 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1356 netbsd
) system_name
=NetBSD
;;
1357 bsd
/os
) system_name
=BSD
/OS
;;
1358 openbsd
) system_name
=OpenBSD
;;
1359 dragonfly
) system_name
=DragonFly
;;
1360 sunos
) system_name
=SunOS
;;
1361 qnx
) system_name
=QNX
;;
1362 morphos
) system_name
=MorphOS
;;
1363 amigaos
) system_name
=AmigaOS
;;
1364 mingw32
*) system_name
=MINGW32
;;
1366 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1367 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1368 if test $
(echo $host_arch) != "x86_64" ; then
1369 host_arch
=$
(echo $host_arch |
tr '_' '-')
1373 extra_cflags
="-I. $extra_cflags"
1374 _timer
=timer-linux.c
1377 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1378 extra_cflags
="$extra_cflags -I/usr/local/include"
1381 if netbsd || dragonfly
; then
1382 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1383 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1387 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1388 _timer
=timer-darwin.c
1392 extra_ldflags
="$extra_ldflags -lC"
1403 extra_cflags
="$extra_cflags -fno-common"
1404 # -lwinmm is always needed for osdep/timer-win2.c
1405 extra_ldflags
="$extra_ldflags -lwinmm"
1409 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1410 def_priority
="#define CONFIG_PRIORITY 1"
1422 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1423 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1427 extra_ldflags
="$extra_ldflags -lph"
1435 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1436 def_priority
="#define CONFIG_PRIORITY 1"
1439 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1440 test "$tmpdir" && break
1443 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1444 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1447 TMPC
="$mplayer_tmpdir/tmp.c"
1448 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1449 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1450 TMPH
="$mplayer_tmpdir/tmp.h"
1451 TMPS
="$mplayer_tmpdir/tmp.S"
1454 echo configuration
: $configuration > "$TMPLOG"
1458 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1459 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1463 # Checking CC version...
1464 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1465 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1466 echocheck
"$_cc version"
1468 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1469 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1470 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1471 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1472 # TODO verify older icc/ecc compatibility
1475 cc_version
="v. ?.??, bad"
1479 cc_version
="$cc_version, ok"
1482 cc_version
="$cc_version, bad"
1486 echores
"$cc_version"
1488 for _cc
in "$_cc" gcc cc
; do
1489 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1490 if test "$cc_name_tmp" = "gcc"; then
1491 cc_name
=$cc_name_tmp
1492 echocheck
"$_cc version"
1494 cc_version
=$
($_cc -dumpversion 2>&1)
1500 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1501 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1502 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1505 echores
"$cc_version"
1508 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1509 if test "$cc_name_tmp" = "clang"; then
1510 echocheck
"$_cc version"
1512 cc_version
=$
($_cc -dumpversion 2>&1)
1513 res_comment
="experimental support only"
1514 echores
"clang $cc_version"
1517 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1518 if test "$cc_name_tmp" = "Sun C"; then
1519 echocheck
"$_cc version"
1521 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1522 res_comment
="experimental support only"
1523 echores
"Sun C $cc_version"
1528 test "$cc_fail" = yes && die
"unsupported compiler version"
1530 if test -z "$_target" && x86
; then
1533 int test[(int)sizeof(char *)-7];
1537 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1540 echo "Detected operating system: $system_name"
1541 echo "Detected host architecture: $host_arch"
1544 test "$_host_cc" || _host_cc
=$_cc
1547 echocheck
"cross compilation"
1548 if test $_cross_compile = auto
; then
1550 int main(void) { return 0; }
1553 cc_check
&& "$TMPEXE" && _cross_compile
=no
1555 echores
$_cross_compile
1557 if test $_cross_compile = yes; then
1565 # now that we know what compiler should be used for compilation, try to find
1566 # out which assembler is used by the $_cc compiler
1567 if test "$_as" = auto
; then
1568 _as
=$
($_cc -print-prog-name=as
)
1569 test -z "$_as" && _as
=as
1572 if test "$_nm" = auto
; then
1573 _nm
=$
($_cc -print-prog-name=nm
)
1574 test -z "$_nm" && _nm
=nm
1577 # XXX: this should be ok..
1580 if test "$_runtime_cpudetection" = no
; then
1582 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1583 # FIXME: Remove the cygwin check once AMD CPUs are supported
1584 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1585 # Linux with /proc mounted, extract CPU information from it
1586 _cpuinfo
="cat /proc/cpuinfo"
1587 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1588 # FreeBSD with Linux emulation /proc mounted,
1589 # extract CPU information from it
1590 # Don't use it on x86 though, it never reports 3Dnow
1591 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1592 elif darwin
&& ! x86
; then
1593 # use hostinfo on Darwin
1596 # use 'lsattr' on AIX
1597 _cpuinfo
="lsattr -E -l proc0 -a type"
1599 # all other OSes try to extract CPU information from a small helper
1600 # program cpuinfo instead
1601 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1602 _cpuinfo
="./cpuinfo$_exesuf"
1606 # gather more CPU information
1607 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1608 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1609 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1610 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1611 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1613 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1615 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1616 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1618 for ext
in $pparam ; do
1619 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1622 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1623 test $_sse = kernel_check
&& _mmxext
=kernel_check
1625 echocheck
"CPU vendor"
1626 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1628 echocheck
"CPU type"
1632 fi # test "$_runtime_cpudetection" = no
1634 if x86
&& test "$_runtime_cpudetection" = no
; then
1636 if test "$1" = kernel_check
; then
1637 echocheck
"kernel support of $2"
1641 void catch(void) { exit(1); }
1643 signal(SIGILL, catch);
1644 __asm__ volatile ("$3":::"memory"); return 0;
1648 if cc_check
&& tmp_run
; then
1651 _optimizing
="$_optimizing $2"
1656 echo "It seems that your kernel does not correctly support $2."
1657 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1664 extcheck
$_mmx "mmx" "emms"
1665 extcheck
$_mmxext "mmxext" "sfence"
1666 extcheck
$_3dnow "3dnow" "femms"
1667 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1668 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1669 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1670 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1671 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1673 echocheck
"mtrr support"
1674 if test "$_mtrr" = kernel_check
; then
1676 _optimizing
="$_optimizing mtrr"
1680 if test "$_gcc3_ext" != ""; then
1681 # if we had to disable sse/sse2 because the active kernel does not
1682 # support this instruction set extension, we also have to tell
1683 # gcc3 to not generate sse/sse2 instructions for normal C code
1685 int main(void) { return 0; }
1687 cc_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"
1837 int main(void) { return 0; }
1839 if test "$_runtime_cpudetection" = no
; then
1840 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1841 cc_check
-march=native
&& proc
=native
1843 if test "$proc" = "amdfam10"; then
1844 cc_check
-march=$proc $cpuopt=$proc || proc
=k8
1846 if test "$proc" = "k8"; then
1847 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1849 if test "$proc" = "athlon-xp"; then
1850 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1852 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1853 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1855 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1856 if ! cc_check
-march=$proc $cpuopt=$proc; then
1857 if cc_check
-march=i586
$cpuopt=i686
; then
1864 if test "$proc" = "prescott" ; then
1865 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1867 if test "$proc" = "core2" ; then
1868 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1870 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
1871 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1873 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1874 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1876 if test "$proc" = "i586"; then
1877 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1879 if test "$proc" = "i486" ; then
1880 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1882 if test "$proc" = "i386" ; then
1883 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1885 if test "$proc" = "error" ; then
1886 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1890 elif test "$proc" = "i586-i686"; then
1891 _march
="-march=i586"
1892 _mcpu
="$cpuopt=i686"
1895 _march
="-march=$proc"
1896 _mcpu
="$cpuopt=$proc"
1899 else # if test "$_runtime_cpudetection" = no
1900 _mcpu
="$cpuopt=generic"
1901 # at least i486 required, for bswap instruction
1902 _march
="-march=i486"
1903 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1904 cc_check
$_mcpu || _mcpu
=""
1905 cc_check
$_march $_mcpu || _march
=""
1908 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1909 ## autodetected mcpu/march parameters
1910 if test "$_target" ; then
1911 # TODO: it may be a good idea to check GCC and fall back in all cases
1912 if test "$host_arch" = "i586-i686"; then
1913 _march
="-march=i586"
1914 _mcpu
="$cpuopt=i686"
1916 _march
="-march=$host_arch"
1917 _mcpu
="$cpuopt=$host_arch"
1925 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1926 i686|athlon
*|pentium
*) iproc
=686 ;;
1931 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1936 test $_fast_clz = "auto" && _fast_clz
=yes
1943 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1950 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1951 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1954 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1955 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1960 if test "$_runtime_cpudetection" = no
; then
1965 test $_fast_clz = "auto" && _fast_clz
=no
1974 # 64-bit prescotts exist, but as far as GCC is concerned they
1975 # have the same capabilities as a nocona.
1977 test $_fast_cmov = "auto" && _fast_cmov
=no
1978 test $_fast_clz = "auto" && _fast_clz
=no
1985 fi # test "$_runtime_cpudetection" = no
1987 echocheck
"GCC & CPU optimization abilities"
1989 int main(void) { return 0; }
1991 # This is a stripped-down version of the i386 fallback.
1992 if test "$_runtime_cpudetection" = no
; then
1993 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1994 cc_check
-march=native
&& proc
=native
1996 # --- AMD processors ---
1997 if test "$proc" = "amdfam10"; then
1998 cc_check
-march=$proc $cpuopt=$proc || proc
=k8
2000 if test "$proc" = "k8"; then
2001 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2003 # This will fail if gcc version < 3.3, which is ok because earlier
2004 # versions don't really support 64-bit on amd64.
2005 # Is this a valid assumption? -Corey
2006 if test "$proc" = "athlon-xp"; then
2007 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2009 # --- Intel processors ---
2010 if test "$proc" = "core2"; then
2011 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2013 if test "$proc" = "x86-64"; then
2014 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2016 if test "$proc" = "nocona"; then
2017 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2019 if test "$proc" = "pentium4"; then
2020 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2023 _march
="-march=$proc"
2024 _mcpu
="$cpuopt=$proc"
2025 if test "$proc" = "error" ; then
2026 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2030 else # if test "$_runtime_cpudetection" = no
2031 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2032 _march
="-march=x86-64"
2033 _mcpu
="$cpuopt=generic"
2034 cc_check
$_mcpu || _mcpu
="x86-64"
2035 cc_check
$_mcpu || _mcpu
=""
2036 cc_check
$_march $_mcpu || _march
=""
2040 test $_fast_cmov = "auto" && _fast_cmov
=yes
2041 test $_fast_clz = "auto" && _fast_clz
=yes
2049 if test "$host_arch" = "sparc64" ; then
2052 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2054 echocheck
"CPU type"
2056 case "$(echo $karch)" in
2061 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2080 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2082 test $_fast_clz = "auto" && _fast_clz
=yes
2090 ppc|ppc64|powerpc|powerpc64
)
2092 def_dcbzl
='#define HAVE_DCBZL 0'
2093 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2096 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2098 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2100 echocheck
"CPU type"
2101 case $system_name in
2103 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2104 if test -n "$($_cpuinfo | grep altivec)"; then
2105 test $_altivec = auto
&& _altivec
=yes
2109 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2110 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2111 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2112 test $_altivec = auto
&& _altivec
=yes
2116 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2118 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2121 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2122 test $_altivec = auto
&& _altivec
=yes
2128 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2131 if test "$_altivec" = yes; then
2132 echores
"$proc altivec"
2138 echocheck
"GCC & CPU optimization abilities"
2140 if test -n "$proc"; then
2142 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2143 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2144 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2145 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2146 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2147 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2148 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2149 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2150 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2153 # gcc 3.1(.1) and up supports 7400 and 7450
2154 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2156 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2157 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2161 # gcc 3.2 and up supports 970
2162 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2164 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2165 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2169 # gcc 3.3 and up supports POWER4
2170 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2172 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2176 # gcc 3.4 and up supports 440*
2177 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2179 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2180 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2184 # gcc 4.0 and up supports POWER5
2185 if test "$_cc_major" -ge "4"; then
2187 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2193 if test -n "$_mcpu"; then
2194 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2195 echores
"$_optimizing"
2200 test $_fast_clz = "auto" && _fast_clz
=yes
2207 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2209 echocheck
"CPU type"
2212 unsigned long ver, mask;
2213 __asm__ ("implver %0" : "=r" (ver));
2214 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2215 printf("%ld-%x\n", ver, ~mask);
2219 $_cc -o "$TMPEXE" "$TMPC"
2220 case $
("$TMPEXE") in
2222 0-0) proc
="ev4"; _mvi
="0";;
2223 1-0) proc
="ev5"; _mvi
="0";;
2224 1-1) proc
="ev56"; _mvi
="0";;
2225 1-101) proc
="pca56"; _mvi
="1";;
2226 2-303) proc
="ev6"; _mvi
="1";;
2227 2-307) proc
="ev67"; _mvi
="1";;
2228 2-1307) proc
="ev68"; _mvi
="1";;
2232 echocheck
"GCC & CPU optimization abilities"
2233 if test "$proc" = "ev68" ; then
2234 cc_check
-mcpu=$proc || proc
=ev67
2236 if test "$proc" = "ev67" ; then
2237 cc_check
-mcpu=$proc || proc
=ev6
2242 test $_fast_clz = "auto" && _fast_clz
=yes
2252 echocheck
"CPU type"
2253 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2254 case "$(echo $proc)" in
2255 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2256 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2257 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2258 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2259 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2260 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2262 # gcc < 3.x does not support -mtune.
2263 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2269 test $_fast_clz = "auto" && _fast_clz
=yes
2303 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2304 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2305 die
"unsupported architecture $host_arch"
2307 esac # case "$host_arch" in
2309 if test "$_runtime_cpudetection" = yes ; then
2311 test "$_cmov" != no
&& _cmov
=yes
2313 test "$_mmx" != no
&& _mmx
=yes
2314 test "$_3dnow" != no
&& _3dnow
=yes
2315 test "$_3dnowext" != no
&& _3dnowext
=yes
2316 test "$_mmxext" != no
&& _mmxext
=yes
2317 test "$_sse" != no
&& _sse
=yes
2318 test "$_sse2" != no
&& _sse2
=yes
2319 test "$_ssse3" != no
&& _ssse3
=yes
2320 test "$_mtrr" != no
&& _mtrr
=yes
2329 echocheck
"byte order"
2330 if test "$_big_endian" = auto
; then
2332 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2333 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2334 int main(void) { return (int)ascii_name; }
2337 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2343 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2346 if test "$_big_endian" = yes ; then
2347 _byte_order
='big-endian'
2348 def_words_endian
='#define WORDS_BIGENDIAN 1'
2349 def_bigendian
='#define HAVE_BIGENDIAN 1'
2351 _byte_order
='little-endian'
2352 def_words_endian
='#undef WORDS_BIGENDIAN'
2353 def_bigendian
='#define HAVE_BIGENDIAN 0'
2355 echores
"$_byte_order"
2358 echocheck
"extern symbol prefix"
2362 cc_check
-c || die
"Symbol mangling check failed."
2363 sym
=$
($_nm -P -g $TMPEXE)
2364 extern_prefix
=${sym%%ff_extern*}
2365 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2366 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2367 echores
$extern_prefix
2370 echocheck
"assembler support of -pipe option"
2372 int main(void) { return 0; }
2374 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2375 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2378 echocheck
"compiler support of named assembler arguments"
2380 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2381 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2382 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2384 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2386 echores
$_named_asm_args
2389 if darwin
&& test "$cc_vendor" = "gnu" ; then
2390 echocheck
"GCC support of -mstackrealign"
2391 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2392 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2393 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2394 # wrong code with this flag, but this can be worked around by adding
2395 # -fno-unit-at-a-time as described in the blog post at
2396 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2398 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2399 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2401 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2402 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2403 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2404 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2405 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2408 # Checking for CFLAGS
2410 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2411 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2413 elif test -z "$CFLAGS" ; then
2414 if test "$cc_vendor" = "intel" ; then
2415 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2416 elif test "$cc_vendor" = "sun" ; then
2417 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2418 elif test "$cc_vendor" != "gnu" ; then
2419 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2421 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2422 extra_ldflags
="$extra_ldflags -ffast-math"
2429 int main(void) { return 0; }
2431 if test "$cc_vendor" = "gnu" ; then
2432 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2433 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2434 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2435 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2436 cc_check
-Wmissing-prototypes && CFLAGS
="-Wmissing-prototypes $CFLAGS"
2437 cc_check
-Wstrict-prototypes && CFLAGS
="-Wstrict-prototypes $CFLAGS"
2439 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2442 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2443 cc_check
-MD -MP && CFLAGS
="-MD -MP $CFLAGS"
2446 if test -n "$LDFLAGS" ; then
2447 extra_ldflags
="$extra_ldflags $LDFLAGS"
2449 elif test "$cc_vendor" = "intel" ; then
2450 extra_ldflags
="$extra_ldflags -i-static"
2452 if test -n "$CPPFLAGS" ; then
2453 extra_cflags
="$extra_cflags $CPPFLAGS"
2460 # Checking assembler (_as) compatibility...
2461 # Added workaround for older as that reads from stdin by default - atmos
2462 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2463 echocheck
"assembler ($_as $as_version)"
2465 _pref_as_version
='2.9.1'
2467 if test "$_mmx" = yes ; then
2468 echo 'emms' >> $TMPS
2470 if test "$_3dnow" = yes ; then
2471 _pref_as_version
='2.10.1'
2472 echo 'femms' >> $TMPS
2474 if test "$_3dnowext" = yes ; then
2475 _pref_as_version
='2.10.1'
2476 echo 'pswapd %mm0, %mm0' >> $TMPS
2478 if test "$_mmxext" = yes ; then
2479 _pref_as_version
='2.10.1'
2480 echo 'movntq %mm0, (%eax)' >> $TMPS
2482 if test "$_sse" = yes ; then
2483 _pref_as_version
='2.10.1'
2484 echo 'xorps %xmm0, %xmm0' >> $TMPS
2486 #if test "$_sse2" = yes ; then
2487 # _pref_as_version='2.11'
2488 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2490 if test "$_cmov" = yes ; then
2491 _pref_as_version
='2.10.1'
2492 echo 'cmovb %eax, %ebx' >> $TMPS
2494 if test "$_ssse3" = yes ; then
2495 _pref_as_version
='2.16.92'
2496 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2498 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2500 if test "$as_verc_fail" != yes ; then
2503 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2505 die
"obsolete binutils version"
2510 echocheck
".align is a power of two"
2511 if test "$_asmalign_pot" = auto
; then
2514 int main(void) { __asm__ (".align 3"); return 0; }
2516 cc_check
&& _asmalign_pot
=yes
2518 if test "$_asmalign_pot" = "yes" ; then
2519 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2521 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2523 echores
$_asmalign_pot
2526 echocheck
"10 assembler operands"
2528 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2534 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2539 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2540 echores
$ten_operands
2542 echocheck
"ebx availability"
2544 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2551 // just adding ebx to clobber list seems unreliable with some
2552 // compilers, e.g. Haiku's gcc 2.95
2554 // and the above check does not work for OSX 64 bit...
2555 __asm__ volatile("":::"%ebx");
2559 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2560 echores
$ebx_available
2566 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2567 #error PIC not enabled
2572 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2576 if test -z "$YASMFLAGS" ; then
2578 x86_64
&& objformat
="macho64" || objformat
="macho"
2584 # currently tested for Linux x86, x86_64
2585 YASMFLAGS
="-f $objformat"
2586 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2587 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2588 case "$objformat" in
2589 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2590 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2596 echo "pabsw xmm0, xmm0" > $TMPS
2597 yasm_check || _yasm
=""
2598 if test $_yasm ; then
2599 def_yasm
='#define HAVE_YASM 1'
2603 def_yasm
='#define HAVE_YASM 0'
2609 def_bswap
='#define HAVE_BSWAP 0'
2610 echo 'bswap %eax' > $TMPS
2611 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2616 #FIXME: This should happen before the check for CFLAGS..
2617 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2618 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2620 # check if AltiVec is supported by the compiler, and how to enable it
2621 echocheck
"GCC AltiVec flags"
2623 int main(void) { return 0; }
2625 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2626 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2627 # check if <altivec.h> should be included
2628 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2629 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2630 inc_altivec_h
='#include <altivec.h>'
2633 int main(void) { return 0; }
2635 if $
(cc_check
-faltivec) ; then
2636 _altivec_gcc_flags
="-faltivec"
2639 _altivec_gcc_flags
="none, AltiVec disabled"
2643 echores
"$_altivec_gcc_flags"
2645 # check if the compiler supports braces for vector declarations
2648 int main(void) { (vector int) {1}; return 0; }
2650 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2652 # Disable runtime cpudetection if we cannot generate AltiVec code or
2653 # AltiVec is disabled by the user.
2654 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2655 && _runtime_cpudetection
=no
2657 # Show that we are optimizing for AltiVec (if enabled and supported).
2658 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2659 && _optimizing
="$_optimizing altivec"
2661 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2662 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2666 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2668 echocheck
"XFORM ASM support"
2670 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2672 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2673 echores
"$xform_asm"
2677 echocheck
"ARM pld instruction"
2679 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2685 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2686 if test $_armv5te = "auto" ; then
2688 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2691 cc_check
&& _armv5te
=yes
2695 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2697 echocheck
"ARMv6 (SIMD instructions)"
2698 if test $_armv6 = "auto" ; then
2700 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2703 cc_check
&& _armv6
=yes
2707 echocheck
"ARMv6t2 (SIMD instructions)"
2708 if test $_armv6t2 = "auto" ; then
2710 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2713 cc_check
&& _armv6t2
=yes
2718 if test $_armvfp = "auto" ; then
2720 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2723 cc_check
&& _armvfp
=yes
2727 echocheck
"ARM NEON"
2728 if test $neon = "auto" ; then
2730 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2733 cc_check
&& neon
=yes
2737 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2738 if test $_iwmmxt = "auto" ; then
2740 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2743 cc_check
&& _iwmmxt
=yes
2748 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'
2749 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2750 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2751 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2752 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2753 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2754 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2755 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2756 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2757 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2758 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2759 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2760 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2761 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2762 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2763 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2764 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2765 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2766 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2767 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2768 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2770 # Checking kernel version...
2771 if x86_32
&& linux
; then
2773 kernel_version
=$
(uname
-r 2>&1)
2774 echocheck
"$system_name kernel version"
2775 case "$kernel_version" in
2776 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2777 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2778 _k_verc_problem
=yes;;
2780 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2783 if test "$_k_verc_fail" ; then
2784 echores
"$kernel_version, fail"
2785 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2786 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2787 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2788 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2789 echo "2.2.x you must upgrade it to get SSE support!"
2790 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2792 echores
"$kernel_version, ok"
2796 ######################
2797 # MAIN TESTS GO HERE #
2798 ######################
2803 int main(void) { return 0; }
2805 if cc_check
-lposix ; then
2806 extra_ldflags
="$extra_ldflags -lposix"
2814 int main(void) { return 0; }
2816 if cc_check
-lm ; then
2825 echocheck
"langinfo"
2826 if test "$_langinfo" = auto
; then
2828 #include <langinfo.h>
2829 int main(void) { nl_langinfo(CODESET); return 0; }
2832 cc_check
&& _langinfo
=yes
2834 if test "$_langinfo" = yes ; then
2835 def_langinfo
='#define HAVE_LANGINFO 1'
2837 def_langinfo
='#undef HAVE_LANGINFO'
2839 echores
"$_langinfo"
2842 echocheck
"translation support"
2843 if test "$_translation" = yes; then
2844 def_translation
="#define CONFIG_TRANSLATION 1"
2846 def_translation
="#undef CONFIG_TRANSLATION"
2848 echores
"$_translation"
2850 echocheck
"language"
2851 # Set preferred languages, "all" uses English as main language.
2852 test -z "$language" && language
=$LINGUAS
2853 test -z "$language_doc" && language_doc
=$language
2854 test -z "$language_man" && language_man
=$language
2855 test -z "$language_msg" && language_msg
="all"
2856 language_doc
=$
(echo $language_doc |
tr , " ")
2857 language_man
=$
(echo $language_man |
tr , " ")
2858 language_msg
=$
(echo $language_msg |
tr , " ")
2860 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2861 test "$language_man" = "all" && language_man
=$man_lang_all
2862 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2864 if test "$_translation" != yes ; then
2868 # Prune non-existing translations from language lists.
2869 # Set message translation to the first available language.
2870 # Fall back on English.
2871 for lang
in $language_doc ; do
2872 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2874 language_doc
=$tmp_language_doc
2875 test -z "$language_doc" && language_doc
=en
2877 for lang
in $language_man ; do
2878 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2880 language_man
=$tmp_language_man
2881 test -z "$language_man" && language_man
=en
2883 for lang
in $language_msg ; do
2884 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2886 language_msg
=$tmp_language_msg
2888 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2891 echocheck
"enable sighandler"
2892 if test "$_sighandler" = yes ; then
2893 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2895 def_sighandler
='#undef CONFIG_SIGHANDLER'
2897 echores
"$_sighandler"
2899 echocheck
"runtime cpudetection"
2900 if test "$_runtime_cpudetection" = yes ; then
2901 _optimizing
="Runtime CPU-Detection enabled"
2902 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2904 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2906 echores
"$_runtime_cpudetection"
2909 echocheck
"restrict keyword"
2910 for restrict_keyword
in restrict __restrict __restrict__
; do
2911 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2913 def_restrict_keyword
=$restrict_keyword
2917 if [ -n "$def_restrict_keyword" ]; then
2918 echores
"$def_restrict_keyword"
2922 # Avoid infinite recursion loop ("#define restrict restrict")
2923 if [ "$def_restrict_keyword" != "restrict" ]; then
2924 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2926 def_restrict_keyword
=""
2930 echocheck
"__builtin_expect"
2931 # GCC branch prediction hint
2934 a = __builtin_expect(a, 10);
2935 return a == 10 ? 0 : 1;
2937 int main(void) { return foo(10) && foo(0); }
2940 cc_check
&& _builtin_expect
=yes
2941 if test "$_builtin_expect" = yes ; then
2942 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2944 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2946 echores
"$_builtin_expect"
2952 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2955 cc_check
-lkstat && _kstat
=yes
2956 if test "$_kstat" = yes ; then
2957 def_kstat
="#define HAVE_LIBKSTAT 1"
2958 extra_ldflags
="$extra_ldflags -lkstat"
2960 def_kstat
="#undef HAVE_LIBKSTAT"
2966 # required for nanosleep on some systems
2969 int main(void) { (void) nanosleep(0, 0); return 0; }
2972 cc_check
-lposix4 && _posix4
=yes
2973 if test "$_posix4" = yes ; then
2974 extra_ldflags
="$extra_ldflags -lposix4"
2978 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2982 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
2985 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2986 if eval test "x\$_$func" = "xyes"; then
2987 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2990 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2999 int main(void) { char a; mkstemp(&a); return 0; }
3002 cc_check
&& _mkstemp
=yes
3003 if test "$_mkstemp" = yes ; then
3004 def_mkstemp
='#define HAVE_MKSTEMP 1'
3006 def_mkstemp
='#undef HAVE_MKSTEMP'
3011 echocheck
"nanosleep"
3012 # also check for nanosleep
3015 int main(void) { (void) nanosleep(0, 0); return 0; }
3018 cc_check
&& _nanosleep
=yes
3019 if test "$_nanosleep" = yes ; then
3020 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3022 def_nanosleep
='#undef HAVE_NANOSLEEP'
3024 echores
"$_nanosleep"
3028 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3029 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3032 #include <sys/socket.h>
3033 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3036 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3037 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3039 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3040 if test $_winsock2_h = auto
; then
3043 #include <winsock2.h>
3044 int main(void) { (void) gethostbyname(0); return 0; }
3046 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3048 test "$_ld_sock" && res_comment
="using $_ld_sock"
3052 if test $_winsock2_h = yes ; then
3054 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3056 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3060 echocheck
"arpa/inet.h"
3062 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3063 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
3064 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3065 echores
"$arpa_inet_h"
3068 echocheck
"inet_pton()"
3069 def_inet_pton
='#define HAVE_INET_PTON 0'
3072 #include <sys/types.h>
3073 #include <sys/socket.h>
3074 #include <arpa/inet.h>
3075 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3077 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3078 cc_check
$_ld_tmp && inet_pton
=yes && break
3080 if test $inet_pton = yes ; then
3081 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3082 def_inet_pton
='#define HAVE_INET_PTON 1'
3084 echores
"$inet_pton"
3087 echocheck
"inet_aton()"
3088 def_inet_aton
='#define HAVE_INET_ATON 0'
3091 #include <sys/types.h>
3092 #include <sys/socket.h>
3093 #include <arpa/inet.h>
3094 int main(void) { (void) inet_aton(0, 0); return 0; }
3096 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3097 cc_check
$_ld_tmp && inet_aton
=yes && break
3099 if test $inet_aton = yes ; then
3100 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3101 def_inet_aton
='#define HAVE_INET_ATON 1'
3103 echores
"$inet_aton"
3106 echocheck
"socklen_t"
3108 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3111 int main(void) { socklen_t v = 0; return v; }
3113 cc_check
&& _socklen_t
=yes && break
3115 if test "$_socklen_t" = yes ; then
3116 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3118 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3120 echores
"$_socklen_t"
3123 echocheck
"closesocket()"
3126 #include <winsock2.h>
3127 int main(void) { closesocket(~0); return 0; }
3129 cc_check
$_ld_sock && _closesocket
=yes
3130 if test "$_closesocket" = yes ; then
3131 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3133 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3135 echores
"$_closesocket"
3139 test $_winsock2_h = no
&& test $inet_pton = no
&&
3140 test $inet_aton = no
&& _network
=no
3141 if test "$_network" = yes ; then
3142 def_network
='#define CONFIG_NETWORK 1'
3143 extra_ldflags
="$extra_ldflags $_ld_sock"
3144 inputmodules
="network $inputmodules"
3146 noinputmodules
="network $noinputmodules"
3147 def_network
='#undef CONFIG_NETWORK'
3154 if test "$_inet6" = auto
; then
3156 #include <sys/types.h>
3157 #if !defined(_WIN32) || defined(__CYGWIN__)
3158 #include <sys/socket.h>
3159 #include <netinet/in.h>
3161 #include <ws2tcpip.h>
3163 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3166 if cc_check
$_ld_sock ; then
3170 if test "$_inet6" = yes ; then
3171 def_inet6
='#define HAVE_AF_INET6 1'
3173 def_inet6
='#undef HAVE_AF_INET6'
3178 echocheck
"gethostbyname2"
3179 if test "$_gethostbyname2" = auto
; then
3181 #include <sys/types.h>
3182 #include <sys/socket.h>
3184 int main(void) { gethostbyname2("", AF_INET); return 0; }
3191 if test "$_gethostbyname2" = yes ; then
3192 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3194 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3196 echores
"$_gethostbyname2"
3199 echocheck
"inttypes.h (required)"
3201 header_check inttypes.h
&& _inttypes
=yes
3202 echores
"$_inttypes"
3204 if test "$_inttypes" = no
; then
3205 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3206 header_check sys
/bitypes.h
&& _inttypes
=yes
3207 if test "$_inttypes" = yes ; then
3208 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."
3210 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3215 echocheck
"int_fastXY_t in inttypes.h"
3217 #include <inttypes.h>
3219 volatile int_fast16_t v= 0;
3223 cc_check
&& _fast_inttypes
=yes
3224 if test "$_fast_inttypes" = no
; then
3226 typedef signed char int_fast8_t;
3227 typedef signed int int_fast16_t;
3228 typedef signed int int_fast32_t;
3229 typedef signed long long int_fast64_t;
3230 typedef unsigned char uint_fast8_t;
3231 typedef unsigned int uint_fast16_t;
3232 typedef unsigned int uint_fast32_t;
3233 typedef unsigned long long uint_fast64_t;'
3235 echores
"$_fast_inttypes"
3238 echocheck
"malloc.h"
3240 header_check malloc.h
&& _malloc
=yes
3241 if test "$_malloc" = yes ; then
3242 def_malloc_h
='#define HAVE_MALLOC_H 1'
3244 def_malloc_h
='#define HAVE_MALLOC_H 0'
3249 echocheck
"memalign()"
3250 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3251 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3254 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3257 cc_check
&& _memalign
=yes
3258 if test "$_memalign" = yes ; then
3259 def_memalign
='#define HAVE_MEMALIGN 1'
3261 def_memalign
='#define HAVE_MEMALIGN 0'
3262 def_map_memalign
='#define memalign(a,b) malloc(b)'
3263 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3265 echores
"$_memalign"
3268 echocheck
"posix_memalign()"
3270 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3272 #define _XOPEN_SOURCE 600
3274 int main(void) { posix_memalign(NULL, 0, 0); }
3276 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3277 echores
"$posix_memalign"
3280 echocheck
"alloca.h"
3283 int main(void) { (void) alloca(0); return 0; }
3286 cc_check
&& _alloca
=yes
3288 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3290 def_alloca_h
='#undef HAVE_ALLOCA_H'
3295 echocheck
"fastmemcpy"
3296 if test "$_fastmemcpy" = yes ; then
3297 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3299 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3301 echores
"$_fastmemcpy"
3306 #include <sys/types.h>
3307 #include <sys/mman.h>
3308 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3311 cc_check
&& _mman
=yes
3312 if test "$_mman" = yes ; then
3313 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3315 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3316 os2
&& _need_mmap
=yes
3321 #include <sys/types.h>
3322 #include <sys/mman.h>
3323 int main(void) { void *p = MAP_FAILED; return 0; }
3325 _mman_has_map_failed
=no
3326 cc_check
&& _mman_has_map_failed
=yes
3327 if test "$_mman_has_map_failed" = yes ; then
3328 def_mman_has_map_failed
=''
3330 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3333 echocheck
"dynamic loader"
3337 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3340 for _ld_tmp
in "" "-ldl" ; do
3341 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3343 if test "$_dl" = yes ; then
3344 def_dl
='#define HAVE_LIBDL 1'
3346 def_dl
='#undef HAVE_LIBDL'
3351 echocheck
"dynamic a/v plugins support"
3352 if test "$_dl" = no
; then
3355 if test "$_dynamic_plugins" = yes ; then
3356 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3358 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3360 echores
"$_dynamic_plugins"
3363 def_threads
='#define HAVE_THREADS 0'
3367 THREAD_CFLAGS
=-D_REENTRANT
3368 elif freebsd || netbsd || openbsd || bsdos
; then
3369 THREAD_CFLAGS
=-D_THREAD_SAFE
3371 if test "$_pthreads" = auto
; then
3373 #include <pthread.h>
3374 void* func(void *arg) { return arg; }
3375 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3379 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3380 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3381 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3385 if test "$_pthreads" = yes ; then
3386 test $_ld_pthread && res_comment
="using $_ld_pthread"
3387 def_pthreads
='#define HAVE_PTHREADS 1'
3388 def_threads
='#define HAVE_THREADS 1'
3389 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3391 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3392 def_pthreads
='#undef HAVE_PTHREADS'
3393 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3394 mingw32 || _win32dll
=no
3396 echores
"$_pthreads"
3399 if test "$_pthreads" = yes ; then
3400 def_pthread_cache
="#define PTHREAD_CACHE 1"
3403 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3407 echocheck
"w32threads"
3408 if test "$_pthreads" = yes ; then
3409 res_comment
="using pthread instead"
3412 if test "$_w32threads" = auto
; then
3414 mingw32
&& _w32threads
=yes
3416 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3417 echores
"$_w32threads"
3421 if test "$_rpath" = yes ; then
3422 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3423 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3430 if test "$_iconv" = auto
; then
3435 #define INBUFSIZE 1024
3436 #define OUTBUFSIZE 4096
3438 char inbuffer[INBUFSIZE];
3439 char outbuffer[OUTBUFSIZE];
3444 char *tocode="UTF-8";
3445 char *fromcode="cp1250";
3446 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3447 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3448 char *iptr=inbuffer;
3449 char *optr=outbuffer;
3450 size_t inleft=numread;
3451 size_t outleft=OUTBUFSIZE;
3452 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3454 write(1, outbuffer, OUTBUFSIZE - outleft);
3457 if (iconv_close(icdsc) == -1)
3464 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3465 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3469 if test "$_iconv" = yes ; then
3470 def_iconv
='#define CONFIG_ICONV 1'
3472 def_iconv
='#undef CONFIG_ICONV'
3477 echocheck
"soundcard.h"
3479 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3480 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3481 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3482 header_check
$_soundcard_header && _soundcard_h
=yes &&
3483 res_comment
="$_soundcard_header" && break
3486 if test "$_soundcard_h" = yes ; then
3487 if test $_soundcard_header = "sys/soundcard.h"; then
3488 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3490 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3493 echores
"$_soundcard_h"
3496 echocheck
"sys/dvdio.h"
3498 header_check sys
/dvdio.h
&& _dvdio
=yes
3499 if test "$_dvdio" = yes ; then
3500 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3502 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3507 echocheck
"sys/cdio.h"
3509 header_check sys
/cdio.h
&& _cdio
=yes
3510 if test "$_cdio" = yes ; then
3511 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3513 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3518 echocheck
"linux/cdrom.h"
3520 header_check linux
/cdrom.h
&& _cdrom
=yes
3521 if test "$_cdrom" = yes ; then
3522 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3524 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3531 header_check dvd.h
&& _dvd
=yes
3532 if test "$_dvd" = yes ; then
3533 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3535 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3541 echocheck
"BSDI dvd.h"
3543 header_check dvd.h
&& _bsdi_dvd
=yes
3544 if test "$_bsdi_dvd" = yes ; then
3545 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3547 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3549 echores
"$_bsdi_dvd"
3554 # also used by AIX, but AIX does not support VCD and/or libdvdread
3555 echocheck
"HP-UX SCSI header"
3557 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3558 if test "$_hpux_scsi_h" = yes ; then
3559 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3561 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3563 echores
"$_hpux_scsi_h"
3568 echocheck
"userspace SCSI headers (Solaris)"
3570 header_check sys
/scsi
/scsi_types.h
&& header_check sys
/scsi
/impl
/uscsi.h
&&
3572 if test "$_sol_scsi_h" = yes ; then
3573 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3575 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3577 echores
"$_sol_scsi_h"
3582 if test "$_termcap" = auto
; then
3586 int main(void) { tgetent(NULL, NULL); return 0; }
3589 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3590 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3591 && _termcap
=yes && break
3594 if test "$_termcap" = yes ; then
3595 def_termcap
='#define HAVE_TERMCAP 1'
3596 test $_ld_tmp && res_comment
="using $_ld_tmp"
3598 def_termcap
='#undef HAVE_TERMCAP'
3604 def_termios
='#undef HAVE_TERMIOS'
3605 def_termios_h
='#undef HAVE_TERMIOS_H'
3606 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3607 if test "$_termios" = auto
; then
3609 for _termios_header
in "termios.h" "sys/termios.h"; do
3610 header_check
$_termios_header && _termios
=yes &&
3611 res_comment
="using $_termios_header" && break
3615 if test "$_termios" = yes ; then
3616 def_termios
='#define HAVE_TERMIOS 1'
3617 if test "$_termios_header" = "termios.h" ; then
3618 def_termios_h
='#define HAVE_TERMIOS_H 1'
3620 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3627 if test "$_shm" = auto
; then
3629 #include <sys/types.h>
3630 #include <sys/shm.h>
3631 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3634 cc_check
&& _shm
=yes
3636 if test "$_shm" = yes ; then
3637 def_shm
='#define HAVE_SHM 1'
3639 def_shm
='#undef HAVE_SHM'
3644 echocheck
"strsep()"
3647 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3650 cc_check
&& _strsep
=yes
3651 if test "$_strsep" = yes ; then
3652 def_strsep
='#define HAVE_STRSEP 1'
3655 def_strsep
='#undef HAVE_STRSEP'
3661 echocheck
"vsscanf()"
3663 #define _ISOC99_SOURCE
3666 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3669 cc_check
&& _vsscanf
=yes
3670 if test "$_vsscanf" = yes ; then
3671 def_vsscanf
='#define HAVE_VSSCANF 1'
3674 def_vsscanf
='#undef HAVE_VSSCANF'
3682 #define _XOPEN_SOURCE 600
3684 int main(void) { swab(0, 0, 0); return 0; }
3687 cc_check
&& _swab
=yes
3688 if test "$_swab" = yes ; then
3689 def_swab
='#define HAVE_SWAB 1'
3692 def_swab
='#undef HAVE_SWAB'
3697 echocheck
"POSIX select()"
3701 #include <sys/types.h>
3703 #include <sys/time.h>
3705 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3708 def_posix_select
='#undef HAVE_POSIX_SELECT'
3709 #select() of kLIBC (OS/2) supports socket only
3710 ! os2
&& cc_check
&& _posix_select
=yes \
3711 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3712 echores
"$_posix_select"
3715 echocheck
"audio select()"
3716 if test "$_select" = no
; then
3717 def_select
='#undef HAVE_AUDIO_SELECT'
3718 elif test "$_select" = yes ; then
3719 def_select
='#define HAVE_AUDIO_SELECT 1'
3724 echocheck
"gettimeofday()"
3726 #include <sys/time.h>
3727 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3730 cc_check
&& _gettimeofday
=yes
3731 if test "$_gettimeofday" = yes ; then
3732 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3733 _need_gettimeofday
=no
3735 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3736 _need_gettimeofday
=yes
3738 echores
"$_gettimeofday"
3745 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3748 cc_check
&& _glob
=yes
3749 if test "$_glob" = yes ; then
3750 def_glob
='#define HAVE_GLOB 1'
3753 def_glob
='#undef HAVE_GLOB'
3759 echocheck
"setenv()"
3762 int main(void) { setenv("","",0); return 0; }
3765 cc_check
&& _setenv
=yes
3766 if test "$_setenv" = yes ; then
3767 def_setenv
='#define HAVE_SETENV 1'
3770 def_setenv
='#undef HAVE_SETENV'
3776 echocheck
"setmode()"
3778 def_setmode
='#define HAVE_SETMODE 0'
3781 int main(void) { setmode(0, 0); return 0; }
3783 cc_check
&& _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3788 echocheck
"sysi86()"
3790 #include <sys/sysi86.h>
3791 int main(void) { sysi86(0); return 0; }
3794 cc_check
&& _sysi86
=yes
3795 if test "$_sysi86" = yes ; then
3796 def_sysi86
='#define HAVE_SYSI86 1'
3798 #include <sys/sysi86.h>
3799 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3801 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3803 def_sysi86
='#undef HAVE_SYSI86'
3809 echocheck
"sys/sysinfo.h"
3811 #include <sys/sysinfo.h>
3813 struct sysinfo s_info;
3819 cc_check
&& _sys_sysinfo
=yes
3820 if test "$_sys_sysinfo" = yes ; then
3821 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3823 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3825 echores
"$_sys_sysinfo"
3830 echocheck
"Mac OS X Finder Support"
3831 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3832 if test "$_macosx_finder" = yes ; then
3833 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3834 extra_ldflags
="$extra_ldflags -framework Carbon"
3836 echores
"$_macosx_finder"
3838 echocheck
"Mac OS X Bundle file locations"
3839 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3840 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3841 if test "$_macosx_bundle" = yes ; then
3842 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3843 extra_ldflags
="$extra_ldflags -framework Carbon"
3845 echores
"$_macosx_bundle"
3847 echocheck
"Apple Remote"
3848 if test "$_apple_remote" = auto
; then
3852 #include <IOKit/IOCFPlugIn.h>
3854 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3855 CFMutableDictionaryRef hidMatchDictionary;
3856 IOReturn ioReturnValue;
3858 // Set up a matching dictionary to search the I/O Registry by class.
3859 // name for all HID class devices
3860 hidMatchDictionary = IOServiceMatching("AppleIRController");
3862 // Now search I/O Registry for matching devices.
3863 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3864 hidMatchDictionary, &hidObjectIterator);
3866 // If search is unsuccessful, return nonzero.
3867 if (ioReturnValue != kIOReturnSuccess ||
3868 !IOIteratorIsValid(hidObjectIterator)) {
3874 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
3876 if test "$_apple_remote" = yes ; then
3877 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3878 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3880 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3882 echores
"$_apple_remote"
3888 echocheck
"Apple IR"
3889 if test "$_apple_ir" = auto
; then
3892 #include <linux/types.h>
3893 #include <linux/input.h>
3895 struct input_event ev;
3900 cc_check
&& _apple_ir
=yes
3902 if test "$_apple_ir" = yes ; then
3903 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3905 def_apple_ir
='#undef CONFIG_APPLE_IR'
3907 echores
"$_apple_ir"
3910 echocheck
"pkg-config"
3911 _pkg_config
=pkg-config
3912 if $
($_pkg_config --version > /dev
/null
2>&1); then
3913 if test "$_ld_static"; then
3914 _pkg_config
="$_pkg_config --static"
3923 echocheck
"Samba support (libsmbclient)"
3924 if test "$_smb" = yes; then
3925 extra_ldflags
="$extra_ldflags -lsmbclient"
3927 if test "$_smb" = auto
; then
3930 #include <libsmbclient.h>
3931 int main(void) { smbc_opendir("smb://"); return 0; }
3933 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3934 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3939 if test "$_smb" = yes; then
3940 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3941 inputmodules
="smb $inputmodules"
3943 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3944 noinputmodules
="smb $noinputmodules"
3955 if test "$_tdfxfb" = yes ; then
3956 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3957 vomodules
="tdfxfb $vomodules"
3959 def_tdfxfb
='#undef CONFIG_TDFXFB'
3960 novomodules
="tdfxfb $novomodules"
3965 if test "$_s3fb" = yes ; then
3966 def_s3fb
='#define CONFIG_S3FB 1'
3967 vomodules
="s3fb $vomodules"
3969 def_s3fb
='#undef CONFIG_S3FB'
3970 novomodules
="s3fb $novomodules"
3975 if test "$_wii" = yes ; then
3976 def_wii
='#define CONFIG_WII 1'
3977 vomodules
="wii $vomodules"
3979 def_wii
='#undef CONFIG_WII'
3980 novomodules
="wii $novomodules"
3985 if test "$_tdfxvid" = yes ; then
3986 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3987 vomodules
="tdfx_vid $vomodules"
3989 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3990 novomodules
="tdfx_vid $novomodules"
3995 if test "$_xvr100" = auto
; then
3998 #include <sys/fbio.h>
3999 #include <sys/visual_io.h>
4001 struct vis_identifier ident;
4002 struct fbgattr attr;
4003 ioctl(0, VIS_GETIDENTIFIER, &ident);
4004 ioctl(0, FBIOGATTR, &attr);
4009 cc_check
&& _xvr100
=yes
4011 if test "$_xvr100" = yes ; then
4012 def_xvr100
='#define CONFIG_XVR100 1'
4013 vomodules
="xvr100 $vomodules"
4015 def_tdfxvid
='#undef CONFIG_XVR100'
4016 novomodules
="xvr100 $novomodules"
4021 if test "$_tga" = yes ; then
4022 def_tga
='#define CONFIG_TGA 1'
4023 vomodules
="tga $vomodules"
4025 def_tga
='#undef CONFIG_TGA'
4026 novomodules
="tga $novomodules"
4031 echocheck
"md5sum support"
4032 if test "$_md5sum" = yes; then
4033 def_md5sum
="#define CONFIG_MD5SUM 1"
4034 vomodules
="md5sum $vomodules"
4036 def_md5sum
="#undef CONFIG_MD5SUM"
4037 novomodules
="md5sum $novomodules"
4042 echocheck
"yuv4mpeg support"
4043 if test "$_yuv4mpeg" = yes; then
4044 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4045 vomodules
="yuv4mpeg $vomodules"
4047 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4048 novomodules
="yuv4mpeg $novomodules"
4050 echores
"$_yuv4mpeg"
4054 if test "$_bl" = yes ; then
4055 def_bl
='#define CONFIG_BL 1'
4056 vomodules
="bl $vomodules"
4058 def_bl
='#undef CONFIG_BL'
4059 novomodules
="bl $novomodules"
4064 echocheck
"DirectFB"
4065 if test "$_directfb" = auto
; then
4068 #include <directfb.h>
4069 int main(void) { DirectFBInit(0, 0); return 0; }
4071 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4072 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4073 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4074 extra_cflags
="$extra_cflags $_inc_tmp" && break
4079 expr $1 \
* 65536 + $2 \
* 256 + $3
4082 if test "$_directfb" = yes; then
4084 #include <directfb_version.h>
4086 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4089 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4090 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4091 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4092 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4093 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4094 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4095 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4096 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4097 res_comment
="$_directfb_version"
4098 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4100 def_directfb_version
='#undef DIRECTFBVERSION'
4102 res_comment
="version >=0.9.13 required"
4106 res_comment
="failed to get version"
4109 echores
"$_directfb"
4111 if test "$_directfb" = yes ; then
4112 def_directfb
='#define CONFIG_DIRECTFB 1'
4113 vomodules
="directfb $vomodules"
4114 libs_mplayer
="$libs_mplayer -ldirectfb"
4116 def_directfb
='#undef CONFIG_DIRECTFB'
4117 novomodules
="directfb $novomodules"
4119 if test "$_dfbmga" = yes; then
4120 vomodules
="dfbmga $vomodules"
4121 def_dfbmga
='#define CONFIG_DFBMGA 1'
4123 novomodules
="dfbmga $novomodules"
4124 def_dfbmga
='#undef CONFIG_DFBMGA'
4128 echocheck
"X11 headers presence"
4130 res_comment
="check if the dev(el) packages are installed"
4131 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4132 if test -f "$I/X11/Xlib.h" ; then
4138 if test $_cross_compile = no
; then
4139 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4140 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4141 if test -f "$I/X11/Xlib.h" ; then
4142 extra_cflags
="$extra_cflags -I$I"
4144 res_comment
="using $I"
4149 echores
"$_x11_headers"
4153 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4155 #include <X11/Xlib.h>
4156 #include <X11/Xutil.h>
4157 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4159 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4160 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4163 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4165 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4167 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4168 && _x11
=yes && break
4171 if test "$_x11" = yes ; then
4172 def_x11
='#define CONFIG_X11 1'
4173 vomodules
="x11 xover $vomodules"
4176 def_x11
='#undef CONFIG_X11'
4177 novomodules
="x11 $novomodules"
4178 res_comment
="check if the dev(el) packages are installed"
4179 # disable stuff that depends on X
4180 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4184 echocheck
"Xss screensaver extensions"
4185 if test "$_xss" = auto
; then
4187 #include <X11/Xlib.h>
4188 #include <X11/extensions/scrnsaver.h>
4189 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4192 cc_check
-lXss && _xss
=yes
4194 if test "$_xss" = yes ; then
4195 def_xss
='#define CONFIG_XSS 1'
4196 libs_mplayer
="$libs_mplayer -lXss"
4198 def_xss
='#undef CONFIG_XSS'
4205 if test "$_x11" = yes ; then
4207 #include <X11/Xmd.h>
4208 #include <X11/Xlib.h>
4209 #include <X11/Xutil.h>
4210 #include <X11/Xatom.h>
4211 #include <X11/extensions/dpms.h>
4212 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4214 cc_check
-lXdpms && _xdpms3
=yes
4216 #include <X11/Xlib.h>
4217 #include <X11/extensions/dpms.h>
4218 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4220 cc_check
-lXext && _xdpms4
=yes
4222 if test "$_xdpms4" = yes ; then
4223 def_xdpms
='#define CONFIG_XDPMS 1'
4224 res_comment
="using Xdpms 4"
4226 elif test "$_xdpms3" = yes ; then
4227 def_xdpms
='#define CONFIG_XDPMS 1'
4228 libs_mplayer
="$libs_mplayer -lXdpms"
4229 res_comment
="using Xdpms 3"
4232 def_xdpms
='#undef CONFIG_XDPMS'
4238 if test "$_xv" = auto
; then
4240 #include <X11/Xlib.h>
4241 #include <X11/extensions/Xvlib.h>
4243 (void) XvGetPortAttribute(0, 0, 0, 0);
4244 (void) XvQueryPortAttributes(0, 0, 0);
4248 cc_check
-lXv && _xv
=yes
4251 if test "$_xv" = yes ; then
4252 def_xv
='#define CONFIG_XV 1'
4253 libs_mplayer
="$libs_mplayer -lXv"
4254 vomodules
="xv $vomodules"
4256 def_xv
='#undef CONFIG_XV'
4257 novomodules
="xv $novomodules"
4263 if test "$_xv" = yes && test "$_xvmc" != no
; then
4266 #include <X11/Xlib.h>
4267 #include <X11/extensions/Xvlib.h>
4268 #include <X11/extensions/XvMClib.h>
4270 (void) XvMCQueryExtension(0,0,0);
4271 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4274 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4275 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4278 if test "$_xvmc" = yes ; then
4279 def_xvmc
='#define CONFIG_XVMC 1'
4280 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4281 vomodules
="xvmc $vomodules"
4282 res_comment
="using $_xvmclib"
4284 def_xvmc
='#define CONFIG_XVMC 0'
4285 novomodules
="xvmc $novomodules"
4291 if test "$_vdpau" = auto
; then
4293 if test "$_dl" = yes ; then
4295 #include <vdpau/vdpau_x11.h>
4297 (void) vdp_device_create_x11(0, 0, 0, 0);
4298 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4300 cc_check
-lvdpau && _vdpau
=yes
4303 if test "$_vdpau" = yes ; then
4304 def_vdpau
='#define CONFIG_VDPAU 1'
4305 libs_mplayer
="$libs_mplayer -lvdpau"
4306 vomodules
="vdpau $vomodules"
4308 def_vdpau
='#define CONFIG_VDPAU 0'
4309 novomodules
="vdpau $novomodules"
4314 echocheck
"Xinerama"
4315 if test "$_xinerama" = auto
; then
4317 #include <X11/Xlib.h>
4318 #include <X11/extensions/Xinerama.h>
4319 int main(void) { (void) XineramaIsActive(0); return 0; }
4322 cc_check
-lXinerama && _xinerama
=yes
4325 if test "$_xinerama" = yes ; then
4326 def_xinerama
='#define CONFIG_XINERAMA 1'
4327 libs_mplayer
="$libs_mplayer -lXinerama"
4329 def_xinerama
='#undef CONFIG_XINERAMA'
4331 echores
"$_xinerama"
4334 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4335 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4336 # named 'X extensions' or something similar.
4337 # This check may be useful for future mplayer versions (to change resolution)
4338 # If you run into problems, remove '-lXxf86vm'.
4340 if test "$_vm" = auto
; then
4342 #include <X11/Xlib.h>
4343 #include <X11/extensions/xf86vmode.h>
4344 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4347 cc_check
-lXxf86vm && _vm
=yes
4349 if test "$_vm" = yes ; then
4350 def_vm
='#define CONFIG_XF86VM 1'
4351 libs_mplayer
="$libs_mplayer -lXxf86vm"
4353 def_vm
='#undef CONFIG_XF86VM'
4357 # Check for the presence of special keycodes, like audio control buttons
4358 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4359 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4360 # have these new keycodes.
4361 echocheck
"XF86keysym"
4362 if test "$_xf86keysym" = auto
; then
4365 #include <X11/Xlib.h>
4366 #include <X11/XF86keysym.h>
4367 int main(void) { return XF86XK_AudioPause; }
4369 cc_check
&& _xf86keysym
=yes
4371 if test "$_xf86keysym" = yes ; then
4372 def_xf86keysym
='#define CONFIG_XF86XK 1'
4374 def_xf86keysym
='#undef CONFIG_XF86XK'
4376 echores
"$_xf86keysym"
4379 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4381 #include <X11/Xlib.h>
4382 #include <X11/extensions/xf86dga.h>
4383 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4386 cc_check
-lXxf86dga && _dga2
=yes
4388 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4390 #include <X11/Xlib.h>
4391 #include <X11/extensions/xf86dga.h>
4392 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4395 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4399 def_dga
='#undef CONFIG_DGA'
4400 def_dga1
='#undef CONFIG_DGA1'
4401 def_dga2
='#undef CONFIG_DGA2'
4402 if test "$_dga1" = yes ; then
4404 def_dga1
='#define CONFIG_DGA1 1'
4405 res_comment
="using DGA 1.0"
4406 elif test "$_dga2" = yes ; then
4408 def_dga2
='#define CONFIG_DGA2 1'
4409 res_comment
="using DGA 2.0"
4411 if test "$_dga" = yes ; then
4412 def_dga
='#define CONFIG_DGA 1'
4413 libs_mplayer
="$libs_mplayer -lXxf86dga"
4414 vomodules
="dga $vomodules"
4416 novomodules
="dga $novomodules"
4422 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4423 def_3dfx
='#define CONFIG_3DFX 1'
4424 vomodules
="3dfx $vomodules"
4426 def_3dfx
='#undef CONFIG_3DFX'
4427 novomodules
="3dfx $novomodules"
4433 def_vidix
='#undef CONFIG_VIDIX'
4434 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4435 _vidix_drv_cyberblade
=no
4436 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4438 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4439 _vidix_drv_mach64
=no
4440 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4442 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4443 _vidix_drv_mga_crtc2
=no
4444 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4445 _vidix_drv_nvidia
=no
4446 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4448 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4450 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4451 _vidix_drv_radeon
=no
4452 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4453 _vidix_drv_rage128
=no
4454 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4456 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4457 _vidix_drv_sh_veu
=no
4458 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4460 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4461 _vidix_drv_unichrome
=no
4462 if test "$_vidix" = auto
; then
4464 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4466 x86_64
&& ! linux
&& _vidix
=no
4467 (ppc || alpha
) && linux
&& _vidix
=yes
4471 if test "$_vidix" = yes ; then
4472 def_vidix
='#define CONFIG_VIDIX 1'
4473 vomodules
="cvidix $vomodules"
4474 # FIXME: ivtv driver temporarily disabled until we have a proper test
4475 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4476 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4478 # some vidix drivers are architecture and os specific, discard them elsewhere
4479 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4480 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4482 for driver
in $_vidix_drivers ; do
4483 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4484 eval _vidix_drv_
${driver}=yes
4485 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4488 echocheck
"VIDIX PCI device name database"
4489 echores
"$_vidix_pcidb"
4490 if test "$_vidix_pcidb" = yes ; then
4496 echocheck
"VIDIX dhahelper support"
4497 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4498 echores
"$_dhahelper"
4500 echocheck
"VIDIX svgalib_helper support"
4501 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4502 echores
"$_svgalib_helper"
4505 novomodules
="cvidix $novomodules"
4508 if test "$_vidix" = yes && win32
; then
4510 vomodules
="winvidix $vomodules"
4511 libs_mplayer
="$libs_mplayer -lgdi32"
4513 novomodules
="winvidix $novomodules"
4515 if test "$_vidix" = yes && test "$_x11" = yes; then
4517 vomodules
="xvidix $vomodules"
4519 novomodules
="xvidix $novomodules"
4523 if test "$_ggi" = auto
; then
4525 #include <ggi/ggi.h>
4526 int main(void) { ggiInit(); return 0; }
4529 cc_check
-lggi && _ggi
=yes
4531 if test "$_ggi" = yes ; then
4532 def_ggi
='#define CONFIG_GGI 1'
4533 libs_mplayer
="$libs_mplayer -lggi"
4534 vomodules
="ggi $vomodules"
4536 def_ggi
='#undef CONFIG_GGI'
4537 novomodules
="ggi $novomodules"
4541 echocheck
"GGI extension: libggiwmh"
4542 if test "$_ggiwmh" = auto
; then
4545 #include <ggi/ggi.h>
4546 #include <ggi/wmh.h>
4547 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4549 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4551 # needed to get right output on obscure combination
4552 # like --disable-ggi --enable-ggiwmh
4553 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4554 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4555 libs_mplayer
="$libs_mplayer -lggiwmh"
4558 def_ggiwmh
='#undef CONFIG_GGIWMH'
4564 if test "$_aa" = auto
; then
4567 extern struct aa_hardware_params aa_defparams;
4568 extern struct aa_renderparams aa_defrenderparams;
4572 (void) aa_init(0, 0, 0);
4573 c = aa_autoinit(&aa_defparams);
4574 p = aa_getrenderparams();
4575 aa_autoinitkbd(c,0);
4579 for _ld_tmp
in "-laa" ; do
4580 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4583 if test "$_aa" = yes ; then
4584 def_aa
='#define CONFIG_AA 1'
4586 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4588 vomodules
="aa $vomodules"
4590 def_aa
='#undef CONFIG_AA'
4591 novomodules
="aa $novomodules"
4597 if test "$_caca" = auto
; then
4599 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4602 #ifdef CACA_API_VERSION_1
4605 int main(void) { (void) caca_init(); return 0; }
4607 cc_check $
(caca-config
--libs) && _caca
=yes
4610 if test "$_caca" = yes ; then
4611 def_caca
='#define CONFIG_CACA 1'
4612 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4613 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4614 vomodules
="caca $vomodules"
4616 def_caca
='#undef CONFIG_CACA'
4617 novomodules
="caca $novomodules"
4623 if test "$_svga" = auto
; then
4625 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4627 if test "$_svga" = yes ; then
4628 def_svga
='#define CONFIG_SVGALIB 1'
4629 libs_mplayer
="$libs_mplayer -lvga"
4630 vomodules
="svga $vomodules"
4632 def_svga
='#undef CONFIG_SVGALIB'
4633 novomodules
="svga $novomodules"
4639 if test "$_fbdev" = auto
; then
4643 if test "$_fbdev" = yes ; then
4644 def_fbdev
='#define CONFIG_FBDEV 1'
4645 vomodules
="fbdev $vomodules"
4647 def_fbdev
='#undef CONFIG_FBDEV'
4648 novomodules
="fbdev $novomodules"
4655 if test "$_dvb" = auto
; then
4659 #include <sys/ioctl.h>
4663 #include <linux/dvb/dmx.h>
4664 #include <linux/dvb/frontend.h>
4665 #include <linux/dvb/video.h>
4666 #include <linux/dvb/audio.h>
4667 int main(void) {return 0;}
4669 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4670 cc_check
$_inc_tmp && _dvb
=yes && \
4671 extra_cflags
="$extra_cflags $_inc_tmp" && break
4675 if test "$_dvb" = yes ; then
4677 inputmodules
="dvb $inputmodules"
4678 def_dvb
='#define CONFIG_DVB 1'
4679 def_dvbin
='#define CONFIG_DVBIN 1'
4680 aomodules
="mpegpes(dvb) $aomodules"
4681 vomodules
="mpegpes(dvb) $vomodules"
4684 noinputmodules
="dvb $noinputmodules"
4685 def_dvb
='#undef CONFIG_DVB'
4686 def_dvbin
='#undef CONFIG_DVBIN '
4687 aomodules
="mpegpes(file) $aomodules"
4688 vomodules
="mpegpes(file) $vomodules"
4694 echocheck
"QuickTime"
4695 if test "$quicktime" = auto
; then
4697 #include <QuickTime/QuickTime.h>
4699 ImageDescription *desc;
4706 cc_check
-framework QuickTime
&& quicktime
=yes
4708 if test "$quicktime" = yes ; then
4709 extra_ldflags
="$extra_ldflags -framework QuickTime"
4710 def_quicktime
='#define CONFIG_QUICKTIME 1'
4712 def_quicktime
='#undef CONFIG_QUICKTIME'
4718 if test "$_quartz" = auto
; then
4720 #include <Carbon/Carbon.h>
4722 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
4727 cc_check
-framework Carbon
&& _quartz
=yes
4729 if test "$_quartz" = yes ; then
4730 libs_mplayer
="$libs_mplayer -framework Carbon"
4731 def_quartz
='#define CONFIG_QUARTZ 1'
4732 vomodules
="quartz $vomodules"
4734 def_quartz
='#undef CONFIG_QUARTZ'
4735 novomodules
="quartz $novomodules"
4739 echocheck
"CoreVideo"
4740 if test "$_corevideo" = auto
; then
4742 #include <Carbon/Carbon.h>
4743 #include <CoreServices/CoreServices.h>
4744 #include <OpenGL/OpenGL.h>
4745 #include <QuartzCore/CoreVideo.h>
4746 int main(void) { return 0; }
4749 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4751 if test "$_corevideo" = yes ; then
4752 vomodules
="corevideo $vomodules"
4753 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4754 def_corevideo
='#define CONFIG_COREVIDEO 1'
4756 novomodules
="corevideo $novomodules"
4757 def_corevideo
='#undef CONFIG_COREVIDEO'
4759 echores
"$_corevideo"
4764 echocheck
"PNG support"
4765 if test "$_png" = auto
; then
4768 # Don't check for -lpng on irix since it has its own libpng
4769 # incompatible with the GNU libpng
4770 res_comment
="disabled on irix (not GNU libpng)"
4776 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4777 printf("libpng: %s\n", png_libpng_ver);
4778 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4781 cc_check
-lpng -lz $_ld_lm && _png
=yes
4785 if test "$_png" = yes ; then
4786 def_png
='#define CONFIG_PNG 1'
4787 extra_ldflags
="$extra_ldflags -lpng -lz"
4789 def_png
='#undef CONFIG_PNG'
4792 echocheck
"MNG support"
4793 if test "$_mng" = auto
; then
4798 const char * p_ver = mng_version_text();
4799 return !p_ver || p_ver[0] == 0;
4802 if cc_check
-lmng -lz $_ld_lm ; then
4807 if test "$_mng" = yes ; then
4808 def_mng
='#define CONFIG_MNG 1'
4809 extra_ldflags
="$extra_ldflags -lmng -lz"
4811 def_mng
='#undef CONFIG_MNG'
4814 echocheck
"JPEG support"
4815 if test "$_jpeg" = auto
; then
4822 #include <jpeglib.h>
4823 int main(void) { return 0; }
4825 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
4829 if test "$_jpeg" = yes ; then
4830 def_jpeg
='#define CONFIG_JPEG 1'
4831 vomodules
="jpeg $vomodules"
4832 extra_ldflags
="$extra_ldflags -ljpeg"
4834 def_jpeg
='#undef CONFIG_JPEG'
4835 novomodules
="jpeg $novomodules"
4840 echocheck
"PNM support"
4841 if test "$_pnm" = yes; then
4842 def_pnm
="#define CONFIG_PNM 1"
4843 vomodules
="pnm $vomodules"
4845 def_pnm
="#undef CONFIG_PNM"
4846 novomodules
="pnm $novomodules"
4852 echocheck
"GIF support"
4853 # This is to appease people who want to force gif support.
4854 # If it is forced to yes, then we still do checks to determine
4855 # which gif library to use.
4856 if test "$_gif" = yes ; then
4861 if test "$_gif" = auto
; then
4864 #include <gif_lib.h>
4865 int main(void) { QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0); return 0; }
4867 for _ld_gif
in "-lungif" "-lgif" ; do
4868 cc_check
$_ld_gif && _gif
=yes && break
4872 # If no library was found, and the user wants support forced,
4873 # then we force it on with libgif, as this is the safest
4874 # assumption IMHO. (libungif & libregif both create symbolic
4875 # links to libgif. We also assume that no x11 support is needed,
4876 # because if you are forcing this, then you _should_ know what
4877 # you are doing. [ Besides, package maintainers should never
4878 # have compiled x11 deps into libungif in the first place. ] )
4881 if test "$_force_gif" = yes && test "$_gif" = no
; then
4886 if test "$_gif" = yes ; then
4887 def_gif
='#define CONFIG_GIF 1'
4888 codecmodules
="gif $codecmodules"
4889 vomodules
="gif89a $vomodules"
4890 res_comment
="old version, some encoding functions disabled"
4891 def_gif_4
='#undef CONFIG_GIF_4'
4892 extra_ldflags
="$extra_ldflags $_ld_gif"
4896 #include <gif_lib.h>
4897 void catch(void) { exit(1); }
4899 signal(SIGSEGV, catch); // catch segfault
4900 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4901 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4905 if cc_check
"$_ld_gif" ; then
4906 def_gif_4
='#define CONFIG_GIF_4 1'
4910 def_gif
='#undef CONFIG_GIF'
4911 def_gif_4
='#undef CONFIG_GIF_4'
4912 novomodules
="gif89a $novomodules"
4913 nocodecmodules
="gif $nocodecmodules"
4918 case "$_gif" in yes*)
4919 echocheck
"broken giflib workaround"
4920 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4923 #include <gif_lib.h>
4926 printf("UserData is at address %p\n", gif.UserData);
4930 if cc_check
"$_ld_gif" ; then
4931 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4940 echocheck
"VESA support"
4941 if test "$_vesa" = auto
; then
4944 int main(void) { vbeVersion(); return 0; }
4947 cc_check
-lvbe -llrmi && _vesa
=yes
4949 if test "$_vesa" = yes ; then
4950 def_vesa
='#define CONFIG_VESA 1'
4951 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4952 vomodules
="vesa $vomodules"
4954 def_vesa
='#undef CONFIG_VESA'
4955 novomodules
="vesa $novomodules"
4967 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4968 if test -z "$_sdlconfig" ; then
4969 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4970 _sdlconfig
="sdl-config"
4971 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4972 _sdlconfig
="sdl11-config"
4977 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4979 #ifdef CONFIG_SDL_SDL_H
4980 #include <SDL/SDL.h>
4985 // we allow SDL hacking our main() only on OSX
4988 int main(int argc, char *argv[]) {
4989 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4994 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4995 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4997 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5001 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5002 res_comment
="using $_sdlconfig"
5004 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5005 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5007 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5008 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5010 _inc_tmp
="$($_sdlconfig --cflags)"
5011 _ld_tmp
="$($_sdlconfig --libs)"
5013 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5018 if test "$_sdl" = yes ; then
5019 def_sdl
='#define CONFIG_SDL 1'
5020 extra_cflags
="$extra_cflags $_inc_tmp"
5021 libs_mplayer
="$libs_mplayer $_ld_tmp"
5022 vomodules
="sdl $vomodules"
5023 aomodules
="sdl $aomodules"
5025 def_sdl
='#undef CONFIG_SDL'
5026 novomodules
="sdl $novomodules"
5027 noaomodules
="sdl $noaomodules"
5032 # make sure this stays below CoreVideo to avoid issues due to namespace
5033 # conflicts between -lGL and -framework OpenGL
5035 #Note: this test is run even with --enable-gl since we autodetect linker flags
5036 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
5039 #include <windows.h>
5041 #elif defined(GL_SDL)
5043 #ifdef CONFIG_SDL_SDL_H
5044 #include <SDL/SDL.h>
5049 // we allow SDL hacking our main() only on OSX
5054 #include <X11/Xlib.h>
5057 int main(int argc, char *argv[]) {
5060 wglCreateContext(dc);
5061 #elif defined(GL_SDL)
5062 SDL_GL_SwapBuffers();
5064 glXCreateContext(NULL, NULL, NULL, True);
5071 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5072 if cc_check
$_ld_tmp $_ld_lm ; then
5075 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5079 if cc_check
-DGL_WIN32 -lopengl32 ; then
5082 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5084 # last so it can reuse any linker etc. flags detected before
5085 if test "$_sdl" = yes ; then
5086 if cc_check
-DGL_SDL ||
5087 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
5090 elif cc_check
-DGL_SDL -lGL ||
5091 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
5094 libs_mplayer
="$libs_mplayer -lGL"
5100 if test "$_gl" = yes ; then
5101 def_gl
='#define CONFIG_GL 1'
5102 res_comment
="backends:"
5103 if test "$_gl_win32" = yes ; then
5104 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5105 res_comment
="$res_comment win32"
5107 if test "$_gl_x11" = yes ; then
5108 def_gl_x11
='#define CONFIG_GL_X11 1'
5109 res_comment
="$res_comment x11"
5111 if test "$_gl_sdl" = yes ; then
5112 def_gl_sdl
='#define CONFIG_GL_SDL 1'
5113 res_comment
="$res_comment sdl"
5115 vomodules
="opengl $vomodules"
5117 def_gl
='#undef CONFIG_GL'
5118 def_gl_win32
='#undef CONFIG_GL_WIN32'
5119 def_gl_x11
='#undef CONFIG_GL_X11'
5120 def_gl_sdl
='#undef CONFIG_GL_SDL'
5121 novomodules
="opengl $novomodules"
5126 echocheck
"MatrixView"
5127 if test "$_gl" = no
; then
5130 if test "$matrixview" = yes ; then
5131 vomodules
="matrixview $vomodules"
5132 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5134 novomodules
="matrixview $novomodules"
5135 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5137 echores
"$matrixview"
5141 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5142 if test "$_kva" = auto
; then
5146 int main(void) { return 0; }
5149 cc_check
-lkva && _kva
=yes
5151 if test "$_kva" = yes ; then
5152 def_kva
='#define CONFIG_KVA 1'
5153 libs_mplayer
="$libs_mplayer -lkva"
5154 vomodules
="kva $vomodules"
5156 def_kva
='#undef CONFIG_KVA'
5157 novomodules
="kva $novomodules"
5165 echocheck
"Windows waveout"
5166 if test "$_win32waveout" = auto
; then
5168 #include <windows.h>
5169 #include <mmsystem.h>
5170 int main(void) { return 0; }
5173 cc_check
-lwinmm && _win32waveout
=yes
5175 if test "$_win32waveout" = yes ; then
5176 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5177 libs_mplayer
="$libs_mplayer -lwinmm"
5178 aomodules
="win32 $aomodules"
5180 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5181 noaomodules
="win32 $noaomodules"
5183 echores
"$_win32waveout"
5185 echocheck
"Direct3D"
5186 if test "$_direct3d" = auto
; then
5188 #include <windows.h>
5190 int main(void) { return 0; }
5193 cc_check
&& _direct3d
=yes
5195 if test "$_direct3d" = yes ; then
5196 def_direct3d
='#define CONFIG_DIRECT3D 1'
5197 vomodules
="direct3d $vomodules"
5199 def_direct3d
='#undef CONFIG_DIRECT3D'
5200 novomodules
="direct3d $novomodules"
5202 echores
"$_direct3d"
5205 if test "$_directx" = auto
; then
5207 #include <windows.h>
5210 int main(void) { return 0; }
5213 cc_check
-lgdi32 && _directx
=yes
5215 if test "$_directx" = yes ; then
5216 def_directx
='#define CONFIG_DIRECTX 1'
5217 libs_mplayer
="$libs_mplayer -lgdi32"
5218 vomodules
="directx $vomodules"
5219 aomodules
="dsound $aomodules"
5221 def_directx
='#undef CONFIG_DIRECTX'
5222 novomodules
="directx $novomodules"
5223 noaomodules
="dsound $noaomodules"
5231 if test "$_dxr2" = auto
; then
5233 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5234 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
5235 extra_cflags
="$extra_cflags $_inc_tmp" && break
5238 if test "$_dxr2" = yes; then
5239 def_dxr2
='#define CONFIG_DXR2 1'
5240 aomodules
="dxr2 $aomodules"
5241 vomodules
="dxr2 $vomodules"
5243 def_dxr2
='#undef CONFIG_DXR2'
5244 noaomodules
="dxr2 $noaomodules"
5245 novomodules
="dxr2 $novomodules"
5250 if test "$_dxr3" = auto
; then
5252 header_check linux
/em8300.h
&& _dxr3
=yes
5254 if test "$_dxr3" = yes ; then
5255 def_dxr3
='#define CONFIG_DXR3 1'
5256 vomodules
="dxr3 $vomodules"
5258 def_dxr3
='#undef CONFIG_DXR3'
5259 novomodules
="dxr3 $novomodules"
5264 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5265 if test "$_ivtv" = auto
; then
5268 #include <inttypes.h>
5269 #include <linux/types.h>
5270 #include <linux/videodev2.h>
5271 #include <linux/ivtv.h>
5272 #include <sys/ioctl.h>
5274 struct ivtv_cfg_stop_decode sd;
5275 struct ivtv_cfg_start_decode sd1;
5276 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5277 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5281 cc_check
&& _ivtv
=yes
5283 if test "$_ivtv" = yes ; then
5284 def_ivtv
='#define CONFIG_IVTV 1'
5285 vomodules
="ivtv $vomodules"
5286 aomodules
="ivtv $aomodules"
5288 def_ivtv
='#undef CONFIG_IVTV'
5289 novomodules
="ivtv $novomodules"
5290 noaomodules
="ivtv $noaomodules"
5295 echocheck
"V4L2 MPEG Decoder"
5296 if test "$_v4l2" = auto
; then
5299 #include <inttypes.h>
5300 #include <linux/types.h>
5301 #include <linux/videodev2.h>
5302 #include <linux/version.h>
5304 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5305 #error kernel headers too old, need 2.6.22
5307 struct v4l2_ext_controls ctrls;
5308 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5313 cc_check
&& _v4l2
=yes
5315 if test "$_v4l2" = yes ; then
5316 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5317 vomodules
="v4l2 $vomodules"
5318 aomodules
="v4l2 $aomodules"
5320 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5321 novomodules
="v4l2 $novomodules"
5322 noaomodules
="v4l2 $noaomodules"
5333 echocheck
"OSS Audio"
5334 if test "$_ossaudio" = auto
; then
5336 #include <sys/ioctl.h>
5337 #include <$_soundcard_header>
5338 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5341 cc_check
&& _ossaudio
=yes
5343 if test "$_ossaudio" = yes ; then
5344 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5345 aomodules
="oss $aomodules"
5347 #include <sys/ioctl.h>
5348 #include <$_soundcard_header>
5349 #ifdef OPEN_SOUND_SYSTEM
5350 int main(void) { return 0; }
5352 #error Not the real thing
5356 cc_check
&& _real_ossaudio
=yes
5357 if test "$_real_ossaudio" = yes; then
5358 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5359 # Check for OSS4 headers (override default headers)
5360 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5361 if test -f /etc
/oss.conf
; then
5363 _ossinc
="$OSSLIBDIR/include"
5364 if test -f "$_ossinc/sys/soundcard.h"; then
5365 extra_cflags
="-I$_ossinc $extra_cflags"
5368 elif netbsd || openbsd
; then
5369 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5370 extra_ldflags
="$extra_ldflags -lossaudio"
5372 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5374 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5376 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5377 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5378 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5379 noaomodules
="oss $noaomodules"
5381 echores
"$_ossaudio"
5385 if test "$_arts" = auto
; then
5387 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5388 header_check artsc.h $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5393 if test "$_arts" = yes ; then
5394 def_arts
='#define CONFIG_ARTS 1'
5395 aomodules
="arts $aomodules"
5396 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5397 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5399 noaomodules
="arts $noaomodules"
5405 if test "$_esd" = auto
; then
5407 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5411 int main(void) { int fd = esd_open_sound("test"); return fd; }
5413 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5419 if test "$_esd" = yes ; then
5420 def_esd
='#define CONFIG_ESD 1'
5421 aomodules
="esd $aomodules"
5422 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5423 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5425 echocheck
"esd_get_latency()"
5428 int main(void) { return esd_get_latency(0); }
5430 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5431 echores
"$_esd_latency"
5433 def_esd
='#undef CONFIG_ESD'
5434 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5435 noaomodules
="esd $noaomodules"
5440 if test "$_nas" = auto
; then
5442 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5444 if test "$_nas" = yes ; then
5445 def_nas
='#define CONFIG_NAS 1'
5446 libs_mplayer
="$libs_mplayer -laudio -lXt"
5447 aomodules
="nas $aomodules"
5449 noaomodules
="nas $noaomodules"
5450 def_nas
='#undef CONFIG_NAS'
5456 if test "$_pulse" = auto
; then
5458 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5459 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5465 if test "$_pulse" = yes ; then
5466 def_pulse
='#define CONFIG_PULSE 1'
5467 aomodules
="pulse $aomodules"
5468 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5469 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5471 def_pulse
='#undef CONFIG_PULSE'
5472 noaomodules
="pulse $noaomodules"
5477 if test "$_jack" = auto
; then
5481 #include <jack/jack.h>
5482 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5484 if cc_check
-ljack ; then
5485 libs_mplayer
="$libs_mplayer -ljack"
5486 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5487 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5488 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5494 if test "$_jack" = yes ; then
5495 def_jack
='#define CONFIG_JACK 1'
5496 aomodules
="jack $aomodules"
5498 noaomodules
="jack $noaomodules"
5503 if test "$_openal" = auto
; then
5507 #include <OpenAL/al.h>
5512 alSourceQueueBuffers(0, 0, 0);
5513 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5517 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5518 cc_check
$I && _openal
=yes && break
5519 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5521 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5523 if test "$_openal" = yes ; then
5524 def_openal
='#define CONFIG_OPENAL 1'
5525 aomodules
="openal $aomodules"
5527 noaomodules
="openal $noaomodules"
5531 echocheck
"ALSA audio"
5532 if test "$_alloca" != yes ; then
5534 res_comment
="alloca missing"
5536 if test "$_alsa" != no
; then
5539 #include <sys/asoundlib.h>
5540 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5541 #error "alsa version != 0.5.x"
5543 int main(void) { return 0; }
5545 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5548 #include <sys/asoundlib.h>
5549 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5550 #error "alsa version != 0.9.x"
5552 int main(void) { return 0; }
5554 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5556 #include <alsa/asoundlib.h>
5557 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5558 #error "alsa version != 0.9.x"
5560 int main(void) { return 0; }
5562 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5565 #include <sys/asoundlib.h>
5566 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5567 #error "alsa version != 1.0.x"
5569 int main(void) { return 0; }
5571 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5573 #include <alsa/asoundlib.h>
5574 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5575 #error "alsa version != 1.0.x"
5577 int main(void) { return 0; }
5579 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5581 def_alsa
='#undef CONFIG_ALSA'
5582 def_alsa5
='#undef CONFIG_ALSA5'
5583 def_alsa9
='#undef CONFIG_ALSA9'
5584 def_alsa1x
='#undef CONFIG_ALSA1X'
5585 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5586 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5587 if test "$_alsaver" ; then
5589 if test "$_alsaver" = '0.5.x' ; then
5591 aomodules
="alsa5 $aomodules"
5592 def_alsa5
='#define CONFIG_ALSA5 1'
5593 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5594 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5595 elif test "$_alsaver" = '0.9.x-sys' ; then
5597 aomodules
="alsa $aomodules"
5598 def_alsa
='#define CONFIG_ALSA 1'
5599 def_alsa9
='#define CONFIG_ALSA9 1'
5600 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5601 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5602 elif test "$_alsaver" = '0.9.x-alsa' ; then
5604 aomodules
="alsa $aomodules"
5605 def_alsa
='#define CONFIG_ALSA 1'
5606 def_alsa9
='#define CONFIG_ALSA9 1'
5607 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5608 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5609 elif test "$_alsaver" = '1.0.x-sys' ; then
5611 aomodules
="alsa $aomodules"
5612 def_alsa
='#define CONFIG_ALSA 1'
5613 def_alsa1x
="#define CONFIG_ALSA1X 1"
5614 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5615 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5616 elif test "$_alsaver" = '1.0.x-alsa' ; then
5618 aomodules
="alsa $aomodules"
5619 def_alsa
='#define CONFIG_ALSA 1'
5620 def_alsa1x
="#define CONFIG_ALSA1X 1"
5621 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5622 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5625 res_comment
="unknown version"
5627 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5629 noaomodules
="alsa $noaomodules"
5634 echocheck
"Sun audio"
5635 if test "$_sunaudio" = auto
; then
5637 #include <sys/types.h>
5638 #include <sys/audioio.h>
5639 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5642 cc_check
&& _sunaudio
=yes
5644 if test "$_sunaudio" = yes ; then
5645 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5646 aomodules
="sun $aomodules"
5648 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5649 noaomodules
="sun $noaomodules"
5651 echores
"$_sunaudio"
5654 def_mlib
='#define CONFIG_MLIB 0'
5656 echocheck
"Sun mediaLib"
5657 if test "$_mlib" = auto
; then
5661 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5663 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5670 echocheck
"CoreAudio"
5671 if test "$_coreaudio" = auto
; then
5673 #include <CoreAudio/CoreAudio.h>
5674 #include <AudioToolbox/AudioToolbox.h>
5675 #include <AudioUnit/AudioUnit.h>
5676 int main(void) { return 0; }
5679 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5681 if test "$_coreaudio" = yes ; then
5682 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5683 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5684 aomodules
="coreaudio $aomodules"
5686 def_coreaudio
='#undef CONFIG_COREAUDIO'
5687 noaomodules
="coreaudio $noaomodules"
5694 echocheck
"SGI audio"
5695 if test "$_sgiaudio" = auto
; then
5697 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5699 if test "$_sgiaudio" = "yes" ; then
5700 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5701 libs_mplayer
="$libs_mplayer -laudio"
5702 aomodules
="sgi $aomodules"
5704 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5705 noaomodules
="sgi $noaomodules"
5707 echores
"$_sgiaudio"
5712 echocheck
"KAI (UNIAUD/DART)"
5713 if test "$_kai" = auto
; then
5717 int main(void) { return 0; }
5720 cc_check
-lkai && _kai
=yes
5722 if test "$_kai" = yes ; then
5723 def_kai
='#define CONFIG_KAI 1'
5724 libs_mplayer
="$libs_mplayer -lkai"
5725 aomodules
="kai $aomodules"
5727 def_kai
='#undef CONFIG_KAI'
5728 noaomodules
="kai $noaomodules"
5733 if test "$_dart" = auto
; then
5737 int main(void) { return 0; }
5740 cc_check
-ldart && _dart
=yes
5742 if test "$_dart" = yes ; then
5743 def_dart
='#define CONFIG_DART 1'
5744 libs_mplayer
="$libs_mplayer -ldart"
5745 aomodules
="dart $aomodules"
5747 def_dart
='#undef CONFIG_DART'
5748 noaomodules
="dart $noaomodules"
5754 # set default CD/DVD devices
5755 if win32 || os2
; then
5756 default_cdrom_device
="D:"
5758 default_cdrom_device
="/dev/disk1"
5759 elif dragonfly
; then
5760 default_cdrom_device
="/dev/cd0"
5762 default_cdrom_device
="/dev/acd0"
5764 default_cdrom_device
="/dev/rcd0a"
5766 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5767 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5768 # file system and the volfs service.
5769 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5771 default_cdrom_device
="a1ide.device:2"
5773 default_cdrom_device
="/dev/cdrom"
5776 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5777 default_dvd_device
=$default_cdrom_device
5779 default_dvd_device
="/dev/rdiskN"
5781 default_dvd_device
="/dev/dvd"
5785 echocheck
"VCD support"
5786 if test "$_vcd" = auto
; then
5788 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5791 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5794 if test "$_vcd" = yes; then
5795 inputmodules
="vcd $inputmodules"
5796 def_vcd
='#define CONFIG_VCD 1'
5798 def_vcd
='#undef CONFIG_VCD'
5799 noinputmodules
="vcd $noinputmodules"
5800 res_comment
="not supported on this OS"
5807 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5808 _dvdread_internal
=no
5810 if test "$_dvdread_internal" = auto
; then
5811 _dvdread_internal
=no
5813 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5814 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5815 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5816 || darwin || win32 || os2
; then
5817 _dvdread_internal
=yes
5819 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5821 elif test "$_dvdread" = auto
; then
5823 if test "$_dl" = yes; then
5825 #include <inttypes.h>
5826 #include <dvdread/dvd_reader.h>
5827 #include <dvdread/ifo_types.h>
5828 #include <dvdread/ifo_read.h>
5829 #include <dvdread/nav_read.h>
5830 int main(void) { return 0; }
5832 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
5833 _dvdreadlibs
=$
($_dvdreadconfig --libs)
5834 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5835 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5837 extra_cflags
="$extra_cflags $_dvdreadcflags"
5838 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5839 res_comment
="external"
5844 if test "$_dvdread_internal" = yes; then
5845 def_dvdread
='#define CONFIG_DVDREAD 1'
5846 inputmodules
="dvdread(internal) $inputmodules"
5848 res_comment
="internal"
5849 elif test "$_dvdread" = yes; then
5850 def_dvdread
='#define CONFIG_DVDREAD 1'
5852 extra_ldflags
="$extra_ldflags -ldvdread"
5853 inputmodules
="dvdread(external) $inputmodules"
5854 res_comment
="external"
5856 def_dvdread
='#undef CONFIG_DVDREAD'
5857 noinputmodules
="dvdread $noinputmodules"
5862 echocheck
"internal libdvdcss"
5863 if test "$_libdvdcss_internal" = auto
; then
5864 _libdvdcss_internal
=no
5865 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5866 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5868 if test "$_libdvdcss_internal" = yes ; then
5869 if linux || netbsd || openbsd || bsdos
; then
5870 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5871 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5872 elif freebsd || dragonfly
; then
5873 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5875 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5876 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5878 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5880 cflags_libdvdcss
="-DSYS_BEOS"
5882 cflags_libdvdcss
="-DSYS_OS2"
5884 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5885 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5886 inputmodules
="libdvdcss(internal) $inputmodules"
5889 noinputmodules
="libdvdcss(internal) $noinputmodules"
5891 echores
"$_libdvdcss_internal"
5894 echocheck
"cdparanoia"
5895 if test "$_cdparanoia" = auto
; then
5897 #include <cdda_interface.h>
5898 #include <cdda_paranoia.h>
5899 // This need a better test. How ?
5900 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5903 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5904 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5905 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5908 if test "$_cdparanoia" = yes ; then
5910 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5911 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5913 echores
"$_cdparanoia"
5917 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5920 #include <cdio/version.h>
5921 #include <cdio/cdda.h>
5922 #include <cdio/paranoia.h>
5924 void *test = cdda_verbose_set;
5925 printf("%s\n", CDIO_VERSION);
5926 return test == (void *)1;
5930 for _ld_tmp
in "" "-lwinmm" ; do
5931 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5932 cc_check
$_ld_tmp $_ld_lm \
5933 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5935 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5936 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5937 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5938 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5939 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5942 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5944 def_libcdio
='#define CONFIG_LIBCDIO 1'
5945 def_havelibcdio
='yes'
5947 if test "$_cdparanoia" = yes ; then
5948 res_comment
="using cdparanoia"
5950 def_libcdio
='#undef CONFIG_LIBCDIO'
5951 def_havelibcdio
='no'
5955 if test "$_cdda" = yes ; then
5956 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
5957 def_cdparanoia
='#define CONFIG_CDDA 1'
5958 inputmodules
="cdda $inputmodules"
5960 def_cdparanoia
='#undef CONFIG_CDDA'
5961 noinputmodules
="cdda $noinputmodules"
5964 if test "$_cddb" = yes ; then
5965 def_cddb
='#define CONFIG_CDDB 1'
5966 inputmodules
="cddb $inputmodules"
5969 def_cddb
='#undef CONFIG_CDDB'
5970 noinputmodules
="cddb $noinputmodules"
5973 echocheck
"bitmap font support"
5974 if test "$_bitmap_font" = yes ; then
5975 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5977 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5979 echores
"$_bitmap_font"
5982 echocheck
"freetype >= 2.0.9"
5984 # freetype depends on iconv
5985 if test "$_iconv" = no
; then
5987 res_comment
="iconv support needed"
5990 if test "$_freetype" = auto
; then
5991 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5994 #include <ft2build.h>
5995 #include FT_FREETYPE_H
5996 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5997 #error "Need FreeType 2.0.9 or newer"
6001 FT_Int major=-1,minor=-1,patch=-1;
6002 int err=FT_Init_FreeType(&library);
6007 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6012 if test "$_freetype" = yes ; then
6013 def_freetype
='#define CONFIG_FREETYPE 1'
6014 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6015 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6017 def_freetype
='#undef CONFIG_FREETYPE'
6019 echores
"$_freetype"
6021 if test "$_freetype" = no
; then
6023 res_comment
="FreeType support needed"
6025 echocheck
"fontconfig"
6026 if test "$_fontconfig" = auto
; then
6030 #include <fontconfig/fontconfig.h>
6031 #if FC_VERSION < 20402
6032 #error At least version 2.4.2 of fontconfig required
6036 if (err == FcFalse) {
6037 printf("Couldn't initialize fontconfig lib\n");
6044 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6045 _ld_tmp
="-lfontconfig $_ld_tmp"
6046 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6048 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6049 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6050 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6051 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6052 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6055 if test "$_fontconfig" = yes ; then
6056 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6058 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6060 echores
"$_fontconfig"
6063 echocheck
"SSA/ASS support"
6064 if test "$_ass" = auto
-o "$_ass" = yes ; then
6065 if $_pkg_config libass
; then
6067 def_ass
='#define CONFIG_ASS 1'
6068 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
6069 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
6072 def_ass
='#undef CONFIG_ASS'
6075 def_ass
='#undef CONFIG_ASS'
6080 echocheck
"fribidi with charsets"
6083 if test "$_fribidi" = auto
; then
6086 /* workaround for fribidi 0.10.4 and below */
6087 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6088 #include <fribidi/fribidi.h>
6090 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
6098 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6099 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
6100 test "$_fribidi" = no
; then
6101 _inc_tmp
="$($_pkg_config --cflags)"
6102 _ld_tmp
="$($_pkg_config --libs)"
6103 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6106 if test "$_fribidi" = yes ; then
6107 def_fribidi
='#define CONFIG_FRIBIDI 1'
6108 extra_cflags
="$extra_cflags $_inc_tmp"
6109 extra_ldflags
="$extra_ldflags $_ld_tmp"
6111 def_fribidi
='#undef CONFIG_FRIBIDI'
6117 if test "$_enca" = auto
; then
6119 #include <sys/types.h>
6124 langs = enca_get_languages(&langcnt);
6129 cc_check
-lenca $_ld_lm && _enca
=yes
6131 if test "$_enca" = yes ; then
6132 def_enca
='#define CONFIG_ENCA 1'
6133 extra_ldflags
="$extra_ldflags -lenca"
6135 def_enca
='#undef CONFIG_ENCA'
6143 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6146 cc_check
-lz && _zlib
=yes
6147 if test "$_zlib" = yes ; then
6148 def_zlib
='#define CONFIG_ZLIB 1'
6149 extra_ldflags
="$extra_ldflags -lz"
6151 def_zlib
='#define CONFIG_ZLIB 0'
6158 def_bzlib
='#define CONFIG_BZLIB 0'
6161 int main(void) { BZ2_bzlibVersion(); return 0; }
6163 cc_check
-lbz2 && bzlib
=yes
6164 if test "$bzlib" = yes ; then
6165 def_bzlib
='#define CONFIG_BZLIB 1'
6166 extra_ldflags
="$extra_ldflags -lbz2"
6172 if test "$_rtc" = auto
; then
6174 #include <sys/ioctl.h>
6176 #include <linux/rtc.h>
6179 #define RTC_PIE_ON RTCIO_PIE_ON
6181 int main(void) { return RTC_PIE_ON; }
6184 cc_check
&& _rtc
=yes
6187 if test "$_rtc" = yes ; then
6188 def_rtc
='#define HAVE_RTC 1'
6190 def_rtc
='#undef HAVE_RTC'
6195 echocheck
"liblzo2 support"
6196 if test "$_liblzo" = auto
; then
6199 #include <lzo/lzo1x.h>
6200 int main(void) { lzo_init(); return 0; }
6202 cc_check
-llzo2 && _liblzo
=yes
6204 if test "$_liblzo" = yes ; then
6205 def_liblzo
='#define CONFIG_LIBLZO 1'
6206 extra_ldflags
="$extra_ldflags -llzo2"
6207 codecmodules
="liblzo $codecmodules"
6209 def_liblzo
='#undef CONFIG_LIBLZO'
6210 nocodecmodules
="liblzo $nocodecmodules"
6215 echocheck
"mad support"
6216 if test "$_mad" = auto
; then
6218 header_check mad.h
-lmad && _mad
=yes
6220 if test "$_mad" = yes ; then
6221 def_mad
='#define CONFIG_LIBMAD 1'
6222 extra_ldflags
="$extra_ldflags -lmad"
6223 codecmodules
="libmad $codecmodules"
6225 def_mad
='#undef CONFIG_LIBMAD'
6226 nocodecmodules
="libmad $nocodecmodules"
6231 if test "$_twolame" = auto
; then
6233 #include <twolame.h>
6234 int main(void) { twolame_init(); return 0; }
6237 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6239 if test "$_twolame" = yes ; then
6240 def_twolame
='#define CONFIG_TWOLAME 1'
6241 libs_mencoder
="$libs_mencoder -ltwolame"
6242 codecmodules
="twolame $codecmodules"
6244 def_twolame
='#undef CONFIG_TWOLAME'
6245 nocodecmodules
="twolame $nocodecmodules"
6250 if test "$_toolame" = auto
; then
6252 if test "$_twolame" = yes ; then
6253 res_comment
="disabled by twolame"
6256 #include <toolame.h>
6257 int main(void) { toolame_init(); return 0; }
6259 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6262 if test "$_toolame" = yes ; then
6263 def_toolame
='#define CONFIG_TOOLAME 1'
6264 libs_mencoder
="$libs_mencoder -ltoolame"
6265 codecmodules
="toolame $codecmodules"
6267 def_toolame
='#undef CONFIG_TOOLAME'
6268 nocodecmodules
="toolame $nocodecmodules"
6270 if test "$_toolamedir" ; then
6271 res_comment
="using $_toolamedir"
6275 echocheck
"OggVorbis support"
6276 if test "$_tremor_internal" = yes; then
6278 elif test "$_tremor" = auto
; then
6281 #include <tremor/ivorbiscodec.h>
6282 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6284 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6286 if test "$_libvorbis" = auto
; then
6289 #include <vorbis/codec.h>
6290 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6292 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6294 if test "$_tremor_internal" = yes ; then
6296 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6297 def_tremor
='#define CONFIG_TREMOR 1'
6298 codecmodules
="tremor(internal) $codecmodules"
6299 res_comment
="internal Tremor"
6300 if test "$_tremor_low" = yes ; then
6301 cflags_tremor_low
="-D_LOW_ACCURACY_"
6302 res_comment
="internal low accuracy Tremor"
6304 elif test "$_tremor" = yes ; then
6306 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6307 def_tremor
='#define CONFIG_TREMOR 1'
6308 codecmodules
="tremor(external) $codecmodules"
6309 res_comment
="external Tremor"
6310 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6311 elif test "$_libvorbis" = yes ; then
6313 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6314 codecmodules
="libvorbis $codecmodules"
6315 res_comment
="libvorbis"
6316 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6319 nocodecmodules
="libvorbis $nocodecmodules"
6323 echocheck
"libspeex (version >= 1.1 required)"
6324 if test "$_speex" = auto
; then
6327 #include <speex/speex.h>
6328 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6330 cc_check
-lspeex $_ld_lm && _speex
=yes
6332 if test "$_speex" = yes ; then
6333 def_speex
='#define CONFIG_SPEEX 1'
6334 extra_ldflags
="$extra_ldflags -lspeex"
6335 codecmodules
="speex $codecmodules"
6337 def_speex
='#undef CONFIG_SPEEX'
6338 nocodecmodules
="speex $nocodecmodules"
6342 echocheck
"OggTheora support"
6343 if test "$_theora" = auto
; then
6346 #include <theora/theora.h>
6349 /* Theora is in flux, make sure that all interface routines and datatypes
6350 * exist and work the way we expect it, so we don't break MPlayer. */
6359 theora_info_init(&inf);
6360 theora_comment_init(&tc);
6364 /* we don't want to execute this kind of nonsense; just for making sure
6365 * that compilation works... */
6366 memset(&op, 0, sizeof(op));
6367 r = theora_decode_header(&inf, &tc, &op);
6368 r = theora_decode_init(&st, &inf);
6369 t = theora_granule_time(&st, op.granulepos);
6370 r = theora_decode_packetin(&st, &op);
6371 r = theora_decode_YUVout(&st, &yuv);
6377 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6378 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6379 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6380 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6381 if test _theora
= no
; then
6382 _ld_theora
="-ltheora -logg"
6383 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6385 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6386 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6387 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6388 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6389 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6390 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6391 if test _theora
= no
; then
6392 _ld_theora
="-ltheora -logg"
6393 cc_check tremor
/bitwise.c
$_ld_theora &&
6394 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6398 if test "$_theora" = yes ; then
6399 def_theora
='#define CONFIG_OGGTHEORA 1'
6400 codecmodules
="libtheora $codecmodules"
6401 # when --enable-theora is forced, we'd better provide a probably sane
6402 # $_ld_theora than nothing
6403 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6405 def_theora
='#undef CONFIG_OGGTHEORA'
6406 nocodecmodules
="libtheora $nocodecmodules"
6410 echocheck
"mp3lib support"
6411 if test "$_mp3lib" = auto
; then
6412 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6414 if test "$_mp3lib" = yes ; then
6415 def_mp3lib
='#define CONFIG_MP3LIB 1'
6416 codecmodules
="mp3lib(internal) $codecmodules"
6418 def_mp3lib
='#undef CONFIG_MP3LIB'
6419 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6423 # Any version of libmpg123 shall be fine.
6424 echocheck
"mpg123 support"
6425 def_mpg123
='#undef CONFIG_MPG123'
6426 if test "$_mpg123" = auto
; then
6430 int main(void){ mpg123_init(); return 0; }
6432 cc_check
-lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
6434 if test "$_mpg123" = yes ; then
6435 def_mpg123
='#define CONFIG_MPG123 1'
6436 codecmodules
="mpg123 $codecmodules"
6438 nocodecmodules
="mpg123 $nocodecmodules"
6442 echocheck
"liba52 support"
6443 def_liba52
='#undef CONFIG_LIBA52'
6444 if test "$_liba52" = auto
; then
6447 #include <inttypes.h>
6448 #include <a52dec/a52.h>
6449 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6451 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6453 if test "$_liba52" = yes ; then
6454 def_liba52
='#define CONFIG_LIBA52 1'
6455 codecmodules
="liba52 $codecmodules"
6457 nocodecmodules
="liba52 $nocodecmodules"
6461 echocheck
"internal libmpeg2 support"
6462 if test "$_libmpeg2" = auto
; then
6464 if alpha
&& test cc_vendor
=gnu
; then
6466 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6468 res_comment
="broken gcc"
6473 if test "$_libmpeg2" = yes ; then
6474 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6475 codecmodules
="libmpeg2(internal) $codecmodules"
6477 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6478 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6480 echores
"$_libmpeg2"
6482 echocheck
"libdca support"
6483 if test "$_libdca" = auto
; then
6486 #include <inttypes.h>
6488 int main(void) { dts_init(0); return 0; }
6490 for _ld_dca
in -ldca -ldts ; do
6491 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6492 && _libdca
=yes && break
6495 if test "$_libdca" = yes ; then
6496 def_libdca
='#define CONFIG_LIBDCA 1'
6497 codecmodules
="libdca $codecmodules"
6499 def_libdca
='#undef CONFIG_LIBDCA'
6500 nocodecmodules
="libdca $nocodecmodules"
6504 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6505 if test "$_musepack" = auto
; then
6509 #include <mpcdec/mpcdec.h>
6511 mpc_streaminfo info;
6512 mpc_decoder decoder;
6513 mpc_decoder_set_streaminfo(&decoder, &info);
6514 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6518 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6520 if test "$_musepack" = yes ; then
6521 def_musepack
='#define CONFIG_MUSEPACK 1'
6522 extra_ldflags
="$extra_ldflags -lmpcdec"
6523 codecmodules
="musepack $codecmodules"
6525 def_musepack
='#undef CONFIG_MUSEPACK'
6526 nocodecmodules
="musepack $nocodecmodules"
6528 echores
"$_musepack"
6531 echocheck
"FAAC support"
6532 if test "$_faac" = auto
; then
6534 #include <inttypes.h>
6536 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6539 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6540 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6543 if test "$_faac" = yes ; then
6544 def_faac
="#define CONFIG_FAAC 1"
6545 codecmodules
="faac $codecmodules"
6547 def_faac
="#undef CONFIG_FAAC"
6548 nocodecmodules
="faac $nocodecmodules"
6553 echocheck
"FAAD2 support"
6554 if test "$_faad_internal" = auto
; then
6555 if x86_32
&& test cc_vendor
=gnu
; then
6557 3.1*|
3.2) # ICE/insn with these versions
6559 res_comment
="broken gcc"
6571 if test "$_faad" = auto
; then
6574 #ifndef FAAD_MIN_STREAMSIZE
6575 #error Too old version
6577 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6578 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6580 cc_check
-lfaad $_ld_lm && _faad
=yes
6583 def_faad
='#undef CONFIG_FAAD'
6584 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6585 if test "$_faad_internal" = yes ; then
6586 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6587 res_comment
="internal floating-point"
6588 if test "$_faad_fixed" = yes ; then
6589 # The FIXED_POINT implementation of FAAD2 improves performance
6590 # on some platforms, especially for SBR files.
6591 cflags_faad_fixed
="-DFIXED_POINT"
6592 res_comment
="internal fixed-point"
6594 elif test "$_faad" = yes ; then
6595 extra_ldflags
="$extra_ldflags -lfaad"
6598 if test "$_faad" = yes ; then
6599 def_faad
='#define CONFIG_FAAD 1'
6600 if test "$_faad_internal" = yes ; then
6601 codecmodules
="faad2(internal) $codecmodules"
6603 codecmodules
="faad2 $codecmodules"
6607 nocodecmodules
="faad2 $nocodecmodules"
6612 echocheck
"LADSPA plugin support"
6613 if test "$_ladspa" = auto
; then
6617 const LADSPA_Descriptor *ld = NULL;
6622 cc_check
&& _ladspa
=yes
6624 if test "$_ladspa" = yes; then
6625 def_ladspa
="#define CONFIG_LADSPA 1"
6627 def_ladspa
="#undef CONFIG_LADSPA"
6632 echocheck
"libbs2b audio filter support"
6633 if test "$_libbs2b" = auto
; then
6636 #if BS2B_VERSION_MAJOR < 3
6637 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6647 if $_pkg_config --exists libbs2b
; then
6648 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6649 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6650 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6651 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6653 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6654 -I/usr
/local
/include
/bs2b
; do
6655 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6656 extra_ldflags
="$extra_ldflags -lbs2b"
6657 extra_cflags
="$extra_cflags $_inc_tmp"
6664 def_libbs2b
="#undef CONFIG_LIBBS2B"
6665 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6669 if test -z "$_codecsdir" ; then
6670 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6671 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6672 if test -d "$dir" ; then
6678 # Fall back on default directory.
6679 if test -z "$_codecsdir" ; then
6680 _codecsdir
="$_libdir/codecs"
6681 mingw32 || os2
&& _codecsdir
="codecs"
6685 echocheck
"Win32 codecs"
6686 if test "$_win32dll" = auto
; then
6688 if x86_32
&& ! qnx
; then
6692 if test "$_win32dll" = yes ; then
6693 def_win32dll
='#define CONFIG_WIN32DLL 1'
6695 def_win32_loader
='#define WIN32_LOADER 1'
6696 _win32_emulation
=yes
6698 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6699 res_comment
="using native windows"
6701 codecmodules
="win32 $codecmodules"
6703 def_win32dll
='#undef CONFIG_WIN32DLL'
6704 def_win32_loader
='#undef WIN32_LOADER'
6705 nocodecmodules
="win32 $nocodecmodules"
6707 echores
"$_win32dll"
6710 echocheck
"XAnim codecs"
6711 if test "$_xanim" = auto
; then
6713 res_comment
="dynamic loader support needed"
6714 if test "$_dl" = yes ; then
6718 if test "$_xanim" = yes ; then
6719 def_xanim
='#define CONFIG_XANIM 1'
6720 codecmodules
="xanim $codecmodules"
6722 def_xanim
='#undef CONFIG_XANIM'
6723 nocodecmodules
="xanim $nocodecmodules"
6728 echocheck
"RealPlayer codecs"
6729 if test "$_real" = auto
; then
6731 res_comment
="dynamic loader support needed"
6732 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6733 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6737 if test "$_real" = yes ; then
6738 def_real
='#define CONFIG_REALCODECS 1'
6739 codecmodules
="real $codecmodules"
6741 def_real
='#undef CONFIG_REALCODECS'
6742 nocodecmodules
="real $nocodecmodules"
6747 echocheck
"QuickTime codecs"
6749 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6750 if test "$_qtx" = auto
; then
6751 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6753 if test "$_qtx" = yes ; then
6754 def_qtx
='#define CONFIG_QTX_CODECS 1'
6755 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6756 codecmodules
="qtx $codecmodules"
6757 darwin || win32 || _qtx_emulation
=yes
6759 def_qtx
='#undef CONFIG_QTX_CODECS'
6760 nocodecmodules
="qtx $nocodecmodules"
6764 echocheck
"Nemesi Streaming Media libraries"
6765 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
6767 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6768 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6769 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6773 if test "$_nemesi" = yes; then
6775 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6776 inputmodules
="nemesi $inputmodules"
6778 _native_rtsp
="$_network"
6780 def_nemesi
='#undef CONFIG_LIBNEMESI'
6781 noinputmodules
="nemesi $noinputmodules"
6785 echocheck
"LIVE555 Streaming Media libraries"
6786 if test "$_live" = auto
&& test "$_network" = yes ; then
6787 cat > $TMPCPP << EOF
6788 #include <liveMedia.hh>
6789 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6790 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6792 int main(void) { return 0; }
6796 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
6797 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6798 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6799 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6800 $_livelibdir/groupsock/libgroupsock.a \
6801 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6802 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6803 $extra_ldflags -lstdc++" \
6804 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6805 -I$_livelibdir/UsageEnvironment/include \
6806 -I$_livelibdir/BasicUsageEnvironment/include \
6807 -I$_livelibdir/groupsock/include" && \
6810 if test "$_live" != yes ; then
6811 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6812 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6817 if test "$_live" = yes && test "$_network" = yes; then
6818 test $_livelibdir && res_comment
="using $_livelibdir"
6819 def_live
='#define CONFIG_LIVE555 1'
6820 inputmodules
="live555 $inputmodules"
6821 elif test "$_live_dist" = yes && test "$_network" = yes; then
6822 res_comment
="using distribution version"
6824 def_live
='#define CONFIG_LIVE555 1'
6825 extra_ldflags
="$extra_ldflags $ld_tmp"
6826 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6827 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6828 inputmodules
="live555 $inputmodules"
6831 def_live
='#undef CONFIG_LIVE555'
6832 noinputmodules
="live555 $noinputmodules"
6837 echocheck
"FFmpeg libavutil"
6838 if test "$_libavutil" = auto
; then
6841 #include <libavutil/common.h>
6842 int main(void) { av_clip(1, 1, 1); return 0; }
6844 if $_pkg_config --exists libavutil
; then
6845 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
6846 _ld_tmp
=$
($_pkg_config --libs libavutil
)
6847 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" extra_cflags
="$extra_cflags $_inc_libavutil" \
6849 elif cc_check
-lavutil $_ld_lm ; then
6850 extra_ldflags
="$extra_ldflags -lavutil"
6854 def_libavutil
='#undef CONFIG_LIBAVUTIL'
6855 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
6856 # libavutil is not available, but it is mandatory ...
6857 if test "$_libavutil" = no
; then
6858 die
"You need libavutil, MPlayer will not compile without!"
6860 echores
"$_libavutil"
6862 echocheck
"FFmpeg libavcodec"
6863 if test "$_libavcodec" = auto
; then
6866 #include <libavcodec/avcodec.h>
6867 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6869 if $_pkg_config --exists libavcodec
; then
6870 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
6871 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
6872 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libavcodec" \
6874 elif cc_check
-lavcodec $_ld_lm ; then
6875 extra_ldflags
="$extra_ldflags -lavcodec"
6879 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
6880 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
6881 if test "$_libavcodec" = yes ; then
6882 codecmodules
="libavcodec $codecmodules"
6884 nocodecmodules
="libavcodec $nocodecmodules"
6886 echores
"$_libavcodec"
6888 echocheck
"FFmpeg libavformat"
6889 if test "$_libavformat" = auto
; then
6892 #include <libavformat/avformat.h>
6893 int main(void) { av_alloc_format_context(); return 0; }
6895 if $_pkg_config --exists libavformat
; then
6896 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
6897 _ld_tmp
=$
($_pkg_config --libs libavformat
)
6898 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libavformat" \
6900 elif cc_check
$_ld_lm -lavformat ; then
6901 extra_ldflags
="$extra_ldflags -lavformat"
6905 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
6906 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
6907 echores
"$_libavformat"
6909 echocheck
"FFmpeg libpostproc"
6910 if test "$_libpostproc" = auto
; then
6913 #include <libpostproc/postprocess.h>
6914 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6916 if $_pkg_config --exists libpostproc
; then
6917 _inc_libpostproc
=$
($_pkg_config --cflags libpostproc
)
6918 _ld_tmp
=$
($_pkg_config --libs libpostproc
)
6919 cc_check
$_inc_libpostproc $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libpostproc" \
6921 elif cc_check
-lpostproc $_ld_lm ; then
6922 extra_ldflags
="$extra_ldflags -lpostproc"
6926 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
6927 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
6928 echores
"$_libpostproc"
6930 echocheck
"FFmpeg libswscale"
6931 if test "$_libswscale" = auto
; then
6934 #include <libswscale/swscale.h>
6935 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
6937 if $_pkg_config --exists libswscale
; then
6938 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
6939 _ld_tmp
=$
($_pkg_config --libs libswscale
)
6940 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" extra_cflags
="$extra_cflags $_inc_libswscale" \
6942 elif cc_check
-lswscale ; then
6943 extra_ldflags
="$extra_ldflags -lswscale"
6947 def_libswscale
='#undef CONFIG_LIBSWSCALE'
6948 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
6949 echores
"$_libswscale"
6951 def_libswscale_internals
="#undef CONFIG_LIBSWSCALE_INTERNALS"
6952 if ! test -z "$_ffmpeg_source" ; then
6953 test "$_libswscale" = yes && def_libswscale_internals
="#define CONFIG_LIBSWSCALE_INTERNALS 1" && _libswscale_internals
=yes
6956 def_libavcodec_internals
="#undef CONFIG_LIBAVCODEC_INTERNALS"
6957 if ! test -z "$_ffmpeg_source" ; then
6958 test "$_libavcodec" = yes && def_libavcodec_internals
="#define CONFIG_LIBAVCODEC_INTERNALS 1" && _libavcodec_internals
=yes
6961 echocheck
"libdv-0.9.5+"
6962 if test "$_libdv" = auto
; then
6965 #include <libdv/dv.h>
6966 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6968 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6970 if test "$_libdv" = yes ; then
6971 def_libdv
='#define CONFIG_LIBDV095 1'
6972 extra_ldflags
="$extra_ldflags -ldv"
6973 codecmodules
="libdv $codecmodules"
6975 def_libdv
='#undef CONFIG_LIBDV095'
6976 nocodecmodules
="libdv $nocodecmodules"
6982 if test "$_xvid" = auto
; then
6986 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6988 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6989 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6993 if test "$_xvid" = yes ; then
6994 def_xvid
='#define CONFIG_XVID4 1'
6995 codecmodules
="xvid $codecmodules"
6997 def_xvid
='#undef CONFIG_XVID4'
6998 nocodecmodules
="xvid $nocodecmodules"
7003 if test "$_x264" = auto
; then
7005 #include <inttypes.h>
7008 #error We do not support old versions of x264. Get the latest from git.
7010 int main(void) { x264_encoder_open((void*)0); return 0; }
7013 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7014 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7018 if test "$_x264" = yes ; then
7019 def_x264
='#define CONFIG_X264 1'
7020 codecmodules
="x264 $codecmodules"
7022 def_x264
='#undef CONFIG_X264'
7023 nocodecmodules
="x264 $nocodecmodules"
7028 if test "$_libnut" = auto
; then
7031 nut_context_tt * nut;
7032 int main(void) { (void)nut_error(0); return 0; }
7035 cc_check
-lnut && _libnut
=yes
7038 if test "$_libnut" = yes ; then
7039 def_libnut
='#define CONFIG_LIBNUT 1'
7040 extra_ldflags
="$extra_ldflags -lnut"
7042 def_libnut
='#undef CONFIG_LIBNUT'
7046 # These VO checks must be done after libavcodec/libswscale one
7047 echocheck
"/dev/mga_vid"
7048 if test "$_mga" = auto
; then
7050 test -c /dev
/mga_vid
&& _mga
=yes
7052 if test "$_mga" = yes ; then
7053 if test "$_libswscale_internals" = yes ; then
7054 def_mga
='#define CONFIG_MGA 1'
7055 vomodules
="mga $vomodules"
7057 res_comment
="libswscale internal headers are required by mga, sorry"
7059 def_mga
='#undef CONFIG_MGA'
7060 novomodules
="mga $novomodules"
7063 def_mga
='#undef CONFIG_MGA'
7064 novomodules
="mga $novomodules"
7070 if test "$_xmga" = auto
; then
7072 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
7074 if test "$_xmga" = yes ; then
7075 if test "$_libswscale_internals" = yes ; then
7076 def_xmga
='#define CONFIG_XMGA 1'
7077 vomodules
="xmga $vomodules"
7079 res_comment
="libswscale internal headers are required by xmga, sorry"
7081 def_xmga
='#undef CONFIG_XMGA'
7082 novomodules
="xmga $novomodules"
7085 def_xmga
='#undef CONFIG_XMGA'
7086 novomodules
="xmga $novomodules"
7091 if test "$_zr" = auto
; then
7092 #36067's seem to identify themselves as 36057PQC's, so the line
7093 #below should work for 36067's and 36057's.
7094 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7100 if test "$_zr" = yes ; then
7101 if test "$_libavcodec_internals" = yes ; then
7102 def_zr
='#define CONFIG_ZR 1'
7103 vomodules
="zr zr2 $vomodules"
7105 res_comment
="libavcodec internal headers are required by zr, sorry"
7106 novomodules
="zr $novomodules"
7107 def_zr
='#undef CONFIG_ZR'
7110 def_zr
='#undef CONFIG_ZR'
7111 novomodules
="zr zr2 $novomodules"
7115 # mencoder requires (optional) those libs: libmp3lame
7116 if test "$_mencoder" != no
; then
7118 echocheck
"libmp3lame"
7119 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7120 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7121 if test "$_mp3lame" = auto
; then
7124 #include <lame/lame.h>
7125 int main(void) { lame_version_t lv; (void) lame_init();
7126 get_lame_version_numerical(&lv);
7129 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7131 if test "$_mp3lame" = yes ; then
7132 def_mp3lame
="#define CONFIG_MP3LAME 1"
7133 _ld_mp3lame
=-lmp3lame
7134 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7136 #include <lame/lame.h>
7137 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7139 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7141 #include <lame/lame.h>
7142 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7144 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7146 def_mp3lame
='#undef CONFIG_MP3LAME'
7150 fi # test "$_mencoder" != no
7152 echocheck
"mencoder"
7153 if test "$_mencoder" = yes ; then
7154 def_muxers
='#define CONFIG_MUXERS 1'
7156 def_muxers
='#define CONFIG_MUXERS 0'
7158 echores
"$_mencoder"
7161 echocheck
"UnRAR executable"
7162 if test "$_unrar_exec" = auto
; then
7164 mingw32
&& _unrar_exec
="no"
7166 if test "$_unrar_exec" = yes ; then
7167 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7169 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7171 echores
"$_unrar_exec"
7173 echocheck
"TV interface"
7174 if test "$_tv" = yes ; then
7175 def_tv
='#define CONFIG_TV 1'
7176 inputmodules
="tv $inputmodules"
7178 noinputmodules
="tv $noinputmodules"
7179 def_tv
='#undef CONFIG_TV'
7184 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7185 echocheck
"*BSD BT848 bt8xx header"
7187 for file in "machine/ioctl_bt848.h" \
7188 "dev/bktr/ioctl_bt848.h" \
7189 "dev/video/bktr/ioctl_bt848.h" \
7190 "dev/ic/bt8xx.h" ; do
7192 #include <sys/types.h>
7193 #include <sys/ioctl.h>
7195 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7199 _ioctl_bt848_h_name
="$file"
7203 if test "$_ioctl_bt848_h" = yes ; then
7204 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7205 res_comment
="using $_ioctl_bt848_h_name"
7207 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7209 echores
"$_ioctl_bt848_h"
7211 echocheck
"*BSD ioctl_meteor.h"
7213 for file in "machine/ioctl_meteor.h" \
7214 "dev/bktr/ioctl_meteor.h" \
7215 "dev/video/bktr/ioctl_meteor.h" ; do
7217 #include <sys/types.h>
7219 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7223 _ioctl_meteor_h_name
="$file"
7227 if test "$_ioctl_meteor_h" = yes ; then
7228 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7229 res_comment
="using $_ioctl_meteor_h_name"
7231 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7233 echores
"$_ioctl_meteor_h"
7235 echocheck
"*BSD BrookTree 848 TV interface"
7236 if test "$_tv_bsdbt848" = auto
; then
7238 if test "$_tv" = yes ; then
7240 #include <sys/types.h>
7241 $def_ioctl_meteor_h_name
7242 $def_ioctl_bt848_h_name
7243 #ifdef IOCTL_METEOR_H_NAME
7244 #include IOCTL_METEOR_H_NAME
7246 #ifdef IOCTL_BT848_H_NAME
7247 #include IOCTL_BT848_H_NAME
7250 ioctl(0, METEORSINPUT, 0);
7251 ioctl(0, TVTUNER_GETFREQ, 0);
7255 cc_check
&& _tv_bsdbt848
=yes
7258 if test "$_tv_bsdbt848" = yes ; then
7259 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7260 inputmodules
="tv-bsdbt848 $inputmodules"
7262 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7263 noinputmodules
="tv-bsdbt848 $noinputmodules"
7265 echores
"$_tv_bsdbt848"
7266 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7269 echocheck
"DirectShow TV interface"
7270 if test "$_tv_dshow" = auto
; then
7272 if test "$_tv" = yes && win32
; then
7277 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7281 cc_check
-lole32 -luuid && _tv_dshow
=yes
7284 if test "$_tv_dshow" = yes ; then
7285 inputmodules
="tv-dshow $inputmodules"
7286 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7287 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7289 noinputmodules
="tv-dshow $noinputmodules"
7290 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7292 echores
"$_tv_dshow"
7295 echocheck
"Video 4 Linux TV interface"
7296 if test "$_tv_v4l1" = auto
; then
7298 if test "$_tv" = yes && linux
; then
7299 header_check linux
/videodev.h
&& _tv_v4l1
=yes
7302 if test "$_tv_v4l1" = yes ; then
7305 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7306 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7307 inputmodules
="tv-v4l $inputmodules"
7309 noinputmodules
="tv-v4l1 $noinputmodules"
7310 def_tv_v4l
='#undef CONFIG_TV_V4L'
7315 echocheck
"Video 4 Linux 2 TV interface"
7316 if test "$_tv_v4l2" = auto
; then
7318 if test "$_tv" = yes && linux
; then
7319 header_check linux
/videodev2.h
&& _tv_v4l2
=yes
7322 if test "$_tv_v4l2" = yes ; then
7325 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7326 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7327 inputmodules
="tv-v4l2 $inputmodules"
7329 noinputmodules
="tv-v4l2 $noinputmodules"
7330 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7335 echocheck
"Radio interface"
7336 if test "$_radio" = yes ; then
7337 def_radio
='#define CONFIG_RADIO 1'
7338 inputmodules
="radio $inputmodules"
7339 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7342 if test "$_radio_capture" = yes ; then
7344 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7346 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7349 noinputmodules
="radio $noinputmodules"
7350 def_radio
='#undef CONFIG_RADIO'
7351 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7355 echocheck
"Capture for Radio interface"
7356 echores
"$_radio_capture"
7358 echocheck
"Video 4 Linux 2 Radio interface"
7359 if test "$_radio_v4l2" = auto
; then
7361 if test "$_radio" = yes && linux
; then
7362 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
7365 if test "$_radio_v4l2" = yes ; then
7366 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7368 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7370 echores
"$_radio_v4l2"
7372 echocheck
"Video 4 Linux Radio interface"
7373 if test "$_radio_v4l" = auto
; then
7375 if test "$_radio" = yes && linux
; then
7376 header_check linux
/videodev.h
&& _radio_v4l
=yes
7379 if test "$_radio_v4l" = yes ; then
7380 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7382 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7384 echores
"$_radio_v4l"
7386 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7387 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7388 echocheck
"*BSD BrookTree 848 Radio interface"
7391 #include <sys/types.h>
7392 $def_ioctl_bt848_h_name
7393 #ifdef IOCTL_BT848_H_NAME
7394 #include IOCTL_BT848_H_NAME
7396 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7398 cc_check
&& _radio_bsdbt848
=yes
7399 echores
"$_radio_bsdbt848"
7400 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7402 if test "$_radio_bsdbt848" = yes ; then
7403 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7405 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7408 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7409 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7410 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7413 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7414 if test "$_pvr" = auto
; then
7416 if test "$_tv_v4l2" = yes && linux
; then
7418 #include <linux/videodev2.h>
7419 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7421 cc_check
&& _pvr
=yes
7424 if test "$_pvr" = yes ; then
7425 def_pvr
='#define CONFIG_PVR 1'
7426 inputmodules
="pvr $inputmodules"
7428 noinputmodules
="pvr $noinputmodules"
7429 def_pvr
='#undef CONFIG_PVR'
7435 if ! beos
&& test "$_ftp" = yes ; then
7436 def_ftp
='#define CONFIG_FTP 1'
7437 inputmodules
="ftp $inputmodules"
7439 noinputmodules
="ftp $noinputmodules"
7440 def_ftp
='#undef CONFIG_FTP'
7444 echocheck
"vstream client"
7445 if test "$_vstream" = auto
; then
7448 #include <vstream-client.h>
7449 void vstream_error(const char *format, ... ) {}
7450 int main(void) { vstream_start(); return 0; }
7452 cc_check
-lvstream-client && _vstream
=yes
7454 if test "$_vstream" = yes ; then
7455 def_vstream
='#define CONFIG_VSTREAM 1'
7456 inputmodules
="vstream $inputmodules"
7457 extra_ldflags
="$extra_ldflags -lvstream-client"
7459 noinputmodules
="vstream $noinputmodules"
7460 def_vstream
='#undef CONFIG_VSTREAM'
7465 echocheck
"OSD menu"
7466 if test "$_menu" = yes ; then
7467 def_menu
='#define CONFIG_MENU 1'
7468 test $_dvbin = "yes" && _menu_dvbin
=yes
7470 def_menu
='#undef CONFIG_MENU'
7476 echocheck
"Subtitles sorting"
7477 if test "$_sortsub" = yes ; then
7478 def_sortsub
='#define CONFIG_SORTSUB 1'
7480 def_sortsub
='#undef CONFIG_SORTSUB'
7485 echocheck
"XMMS inputplugin support"
7486 if test "$_xmms" = yes ; then
7487 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7488 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
7489 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
7491 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7492 _xmmslibdir
=/usr
/lib
7495 def_xmms
='#define CONFIG_XMMS 1'
7497 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
7499 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7502 def_xmms
='#undef CONFIG_XMMS'
7506 if test "$_charset" != "noconv" ; then
7507 def_charset
="#define MSG_CHARSET \"$_charset\""
7509 def_charset
="#undef MSG_CHARSET"
7513 #############################################################################
7515 echocheck
"automatic gdb attach"
7516 if test "$_crash_debug" = yes ; then
7517 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
7519 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
7522 echores
"$_crash_debug"
7524 echocheck
"compiler support for noexecstack"
7526 int main(void) { return 0; }
7528 if cc_check
-Wl,-z,noexecstack
; then
7529 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
7535 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
7536 if cc_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
7537 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
7544 # Dynamic linking flags
7545 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7547 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
7548 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
7549 _ld_dl_dynamic
='-rdynamic'
7552 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7553 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
7554 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
7556 def_debug
='#undef MP_DEBUG'
7557 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
7560 echocheck
"joystick"
7561 def_joystick
='#undef CONFIG_JOYSTICK'
7562 if test "$_joystick" = yes ; then
7564 # TODO add some check
7565 def_joystick
='#define CONFIG_JOYSTICK 1'
7568 res_comment
="unsupported under $system_name"
7571 echores
"$_joystick"
7574 if test "$_lirc" = auto
; then
7576 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
7578 if test "$_lirc" = yes ; then
7579 def_lirc
='#define CONFIG_LIRC 1'
7580 libs_mplayer
="$libs_mplayer -llirc_client"
7582 def_lirc
='#undef CONFIG_LIRC'
7587 if test "$_lircc" = auto
; then
7589 header_check lirc
/lircc.h
-llircc && _lircc
=yes
7591 if test "$_lircc" = yes ; then
7592 def_lircc
='#define CONFIG_LIRCC 1'
7593 libs_mplayer
="$libs_mplayer -llircc"
7595 def_lircc
='#undef CONFIG_LIRCC'
7600 # Detect maemo development platform libraries availability (http://www.maemo.org),
7601 # they are used when run on Nokia 770|8x0
7602 echocheck
"maemo (Nokia 770|8x0)"
7603 if test "$_maemo" = auto
; then
7606 #include <libosso.h>
7607 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7609 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
7611 if test "$_maemo" = yes ; then
7612 def_maemo
='#define CONFIG_MAEMO 1'
7613 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7614 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7616 def_maemo
='#undef CONFIG_MAEMO'
7621 #############################################################################
7623 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7624 # the OMF format needs to come after the 'extern symbol prefix' check, which
7627 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7630 # linker paths should be the same for mencoder and mplayer
7632 for I
in $libs_mplayer ; do
7633 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
7634 if test -z "$_tmp" ; then
7635 extra_ldflags
="$extra_ldflags $I"
7637 _ld_tmp
="$_ld_tmp $I"
7640 libs_mplayer
=$_ld_tmp
7643 #############################################################################
7644 # 64 bit file offsets?
7645 if test "$_largefiles" = yes || freebsd
; then
7646 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7647 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7648 # dvdread support requires this (for off64_t)
7649 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7653 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
7655 # This must be the last test to be performed. Any other tests following it
7656 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7657 # against libdvdread (to permit MPlayer to use its own copy of the library).
7658 # So any compilation using the flags added here but not linking against
7659 # libdvdread can fail.
7660 echocheck
"DVD support (libdvdnav)"
7661 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7665 if test "$_dvdnav" = auto
; then
7666 if test "$_dvdread_internal" = yes ; then
7669 res_comment
="internal"
7671 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7674 if test "$_dvdnav" = auto
; then
7676 #include <inttypes.h>
7677 #include <dvdnav/dvdnav.h>
7678 int main(void) { dvdnav_t *dvd=0; return 0; }
7681 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7682 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7683 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7685 if test "$_dvdnav" = yes ; then
7687 def_dvdnav
='#define CONFIG_DVDNAV 1'
7688 if test "$dvdnav_internal" = yes ; then
7689 cflags_libdvdnav
="-Ilibdvdnav"
7690 inputmodules
="dvdnav(internal) $inputmodules"
7692 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7693 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7694 inputmodules
="dvdnav $inputmodules"
7697 def_dvdnav
='#undef CONFIG_DVDNAV'
7698 noinputmodules
="dvdnav $noinputmodules"
7702 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7703 # Read dvdnav comment above.
7706 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7707 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7709 for part
in $list; do
7710 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7711 echo "${nprefix}_$part = yes"
7716 #############################################################################
7717 echo "Creating config.mak"
7718 cat > config.mak
<< EOF
7719 # -------- Generated by configure -----------
7721 # Ensure that locale settings do not interfere with shell commands.
7724 CONFIGURATION = $configuration
7727 DOC_LANGS = $language_doc
7728 DOC_LANG_ALL = $doc_lang_all
7729 MAN_LANGS = $language_man
7730 MAN_LANG_ALL = $man_lang_all
7731 MSG_LANGS = $language_msg
7732 MSG_LANG_ALL = $msg_lang_all
7734 prefix = \$(DESTDIR)$_prefix
7735 BINDIR = \$(DESTDIR)$_bindir
7736 DATADIR = \$(DESTDIR)$_datadir
7737 LIBDIR = \$(DESTDIR)$_libdir
7738 MANDIR = \$(DESTDIR)$_mandir
7739 CONFDIR = \$(DESTDIR)$_confdir
7740 LOCALEDIR = \$(DESTDIR)$_localedir
7748 INSTALLSTRIP = $_install_strip
7751 CFLAGS = $CFLAGS $extra_cflags
7752 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
7754 CFLAGS_DHAHELPER = $cflags_dhahelper
7755 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7756 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7757 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7758 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7759 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7760 CFLAGS_STACKREALIGN = $cflags_stackrealign
7761 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7762 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7764 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7765 EXTRALIBS_MPLAYER = $libs_mplayer
7766 EXTRALIBS_MENCODER = $libs_mencoder
7775 $(mak_enable "$arch_all" "$arch" ARCH)
7776 $(mak_enable "$subarch_all" "$subarch" ARCH)
7777 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7779 MENCODER = $_mencoder
7782 NEED_GETTIMEOFDAY = $_need_gettimeofday
7783 NEED_GLOB = $_need_glob
7784 NEED_MMAP = $_need_mmap
7785 NEED_SETENV = $_need_setenv
7786 NEED_SHMEM = $_need_shmem
7787 NEED_STRSEP = $_need_strsep
7788 NEED_SWAB = $_need_swab
7789 NEED_VSSCANF = $_need_vsscanf
7797 APPLE_IR = $_apple_ir
7798 APPLE_REMOTE = $_apple_remote
7800 AUDIO_INPUT = $_audio_input
7801 BITMAP_FONT = $_bitmap_font
7806 COREAUDIO = $_coreaudio
7807 COREVIDEO = $_corevideo
7811 DIRECT3D = $_direct3d
7812 DIRECTFB = $_directfb
7816 DVDNAV_INTERNAL = $dvdnav_internal
7818 DVDREAD_INTERNAL = $_dvdread_internal
7824 FAAD_INTERNAL = $_faad_internal
7825 FASTMEMCPY = $_fastmemcpy
7827 FREETYPE = $_freetype
7832 GL_WIN32 = $_gl_win32
7835 MATRIXVIEW = $matrixview
7836 HAVE_POSIX_SELECT = $_posix_select
7837 HAVE_SYS_MMAN_H = $_mman
7840 JOYSTICK = $_joystick
7850 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7854 LIBMENU_DVBIN = $_menu_dvbin
7855 LIBMPEG2 = $_libmpeg2
7856 LIBNEMESI = $_nemesi
7858 LIBSMBCLIENT = $_smb
7859 LIBTHEORA = $_theora
7862 MACOSX_FINDER = $_macosx_finder
7869 MUSEPACK = $_musepack
7871 NATIVE_RTSP = $_native_rtsp
7875 PE_EXECUTABLE = $_pe_executable
7878 PRIORITY = $_priority
7882 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7883 QTX_EMULATION = $_qtx_emulation
7886 RADIO_CAPTURE=$_radio_capture
7887 REAL_CODECS = $_real
7891 STREAM_CACHE = $_stream_cache
7892 SGIAUDIO = $_sgiaudio
7893 SUNAUDIO = $_sunaudio
7899 TREMOR_INTERNAL = $_tremor_internal
7901 TV_BSDBT848 = $_tv_bsdbt848
7902 TV_DSHOW = $_tv_dshow
7907 UNRAR_EXEC = $_unrar_exec
7913 VIDIX_PCIDB = $_vidix_pcidb_val
7914 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7915 VIDIX_IVTV=$_vidix_drv_ivtv
7916 VIDIX_MACH64=$_vidix_drv_mach64
7917 VIDIX_MGA=$_vidix_drv_mga
7918 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7919 VIDIX_NVIDIA=$_vidix_drv_nvidia
7920 VIDIX_PM2=$_vidix_drv_pm2
7921 VIDIX_PM3=$_vidix_drv_pm3
7922 VIDIX_RADEON=$_vidix_drv_radeon
7923 VIDIX_RAGE128=$_vidix_drv_rage128
7924 VIDIX_S3=$_vidix_drv_s3
7925 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7926 VIDIX_SIS=$_vidix_drv_sis
7927 VIDIX_UNICHROME=$_vidix_drv_unichrome
7931 WIN32DLL = $_win32dll
7932 WIN32WAVEOUT = $_win32waveout
7933 WIN32_EMULATION = $_win32_emulation
7934 WINVIDIX = $winvidix
7937 XANIM_CODECS = $_xanim
7939 XMMS_PLUGINS = $_xmms
7945 YUV4MPEG = $_yuv4mpeg
7949 LIBAVUTIL = $_libavutil
7950 LIBAVCODEC = $_libavcodec
7951 LIBAVFORMAT = $_libavformat
7952 LIBPOSTPROC = $_libpostproc
7953 LIBSWSCALE = $_libswscale
7954 LIBAVCODEC_INTERNALS = $_libavcodec_internals
7955 LIBSWSCALE_INTERNALS = $_libswscale_internals
7956 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7960 YASMFLAGS = $YASMFLAGS
7962 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
7966 CONFIG_H264DSP = yes
7971 CONFIG_BZLIB = $bzlib
7972 CONFIG_ENCODERS = yes
7974 CONFIG_MLIB = $_mlib
7975 CONFIG_MUXERS = $_mencoder
7976 CONFIG_VDPAU = $_vdpau
7977 CONFIG_XVMC = $_xvmc
7978 CONFIG_ZLIB = $_zlib
7980 HAVE_PTHREADS = $_pthreads
7982 HAVE_W32THREADS = $_w32threads
7983 HAVE_YASM = $have_yasm
7987 #############################################################################
7989 ff_config_enable
() {
7990 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7991 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7993 test -z "$_nprefix" && _nprefix
='CONFIG'
7994 for part
in $list; do
7995 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7996 echo "#define ${_nprefix}_$part 1"
7998 echo "#define ${_nprefix}_$part 0"
8003 echo "Creating config.h"
8005 /*----------------------------------------------------------------------------
8006 ** This file has been automatically generated by configure any changes in it
8007 ** will be lost when you run configure again.
8008 ** Instead of modifying definitions here, use the --enable/--disable options
8009 ** of the configure script! See ./configure --help for details.
8010 *---------------------------------------------------------------------------*/
8012 #ifndef MPLAYER_CONFIG_H
8013 #define MPLAYER_CONFIG_H
8015 /* Undefine this if you do not want to select mono audio (left or right)
8016 with a stereo MPEG layer 2/3 audio stream. The command line option
8017 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8018 right-only), with 0 being the default.
8020 #define CONFIG_FAKE_MONO 1
8022 /* set up audio OUTBURST. Do not change this! */
8023 #define OUTBURST 512
8025 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8027 #undef FAST_OSD_TABLE
8029 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8030 #define MPEG12_POSTPROC 1
8031 #define ATTRIBUTE_ALIGNED_MAX 16
8035 #define CONFIGURATION "$configuration"
8037 #define MPLAYER_DATADIR "$_datadir"
8038 #define MPLAYER_CONFDIR "$_confdir"
8039 #define MPLAYER_LIBDIR "$_libdir"
8040 #define MPLAYER_LOCALEDIR "$_localedir"
8044 /* definitions needed by included libraries */
8045 #define HAVE_INTTYPES_H 1
8046 /* libmpeg2 + FFmpeg */
8049 #define HAVE_ERRNO_H 1
8050 /* libdvdcss + libdvdread */
8051 #define HAVE_LIMITS_H 1
8052 /* libdvdcss + libfaad2 */
8053 #define HAVE_UNISTD_H 1
8054 /* libfaad2 + libdvdread */
8055 #define STDC_HEADERS 1
8056 #define HAVE_MEMCPY 1
8058 #define HAVE_STRING_H 1
8059 #define HAVE_STRINGS_H 1
8060 #define HAVE_SYS_STAT_H 1
8061 #define HAVE_SYS_TYPES_H 1
8063 #define READ_CACHE_TRACE 0
8065 #define HAVE_DLFCN_H 1
8069 /* system headers */
8071 $def_alsa_asoundlib_h
8075 $def_mman_has_map_failed
8077 $def_sys_asoundlib_h
8078 $def_sys_soundcard_h
8085 /* system functions */
8108 /* system-specific features */
8123 $def_restrict_keyword
8128 /* configurable options */
8132 $def_dynamic_plugins
8135 $def_runtime_cpudetection
8143 #define __CPU__ $iproc
8146 $(ff_config_enable "$arch_all" "$arch" "ARCH")
8147 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
8148 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
8152 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8153 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8173 /* codec libraries */
8185 $def_mp3lame_preset_medium
8210 #define BINARY_CODECS_PATH "$_codecsdir"
8211 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8214 /* Audio output drivers */
8230 $def_ossaudio_devdsp
8231 $def_ossaudio_devmixer
8244 $def_ioctl_bt848_h_name
8245 $def_ioctl_meteor_h_name
8298 $def_directfb_version
8335 $def_vidix_drv_cyberblade
8337 $def_vidix_drv_mach64
8339 $def_vidix_drv_mga_crtc2
8340 $def_vidix_drv_nvidia
8342 $def_vidix_drv_radeon
8343 $def_vidix_drv_rage128
8345 $def_vidix_drv_sh_veu
8347 $def_vidix_drv_unichrome
8370 $def_libavcodec_internals
8371 $def_libswscale_internals
8373 #define CONFIG_DECODERS 1
8374 #define CONFIG_ENCODERS 1
8375 #define CONFIG_DEMUXERS 1
8403 #define CONFIG_FASTDIV 0
8404 #define CONFIG_FFSERVER 0
8405 #define CONFIG_GPL 1
8406 #define CONFIG_GRAY 0
8407 #define CONFIG_HARDCODED_TABLES 0
8408 #define CONFIG_LIBVORBIS 0
8409 #define CONFIG_POWERPC_PERF 0
8410 #define CONFIG_SMALL 0
8411 #define CONFIG_SWSCALE_ALPHA 1
8413 #define HAVE_ATTRIBUTE_PACKED 1
8414 #define HAVE_GETHRTIME 0
8415 #define HAVE_INLINE_ASM 1
8416 #define HAVE_LDBRX 0
8417 #define HAVE_POLL_H 1
8418 #define HAVE_PPC4XX 0
8419 #define HAVE_VFP_ARGS 1
8420 #define HAVE_VIRTUALALLOC 0
8422 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
8423 #define CONFIG_AANDCT 1
8424 #define CONFIG_DCT 1
8425 #define CONFIG_DWT 1
8426 #define CONFIG_FFT 1
8427 #define CONFIG_GOLOMB 1
8428 #define CONFIG_H264DSP 1
8429 #define CONFIG_LPC 1
8430 #define CONFIG_MDCT 1
8431 #define CONFIG_RDFT 1
8433 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8436 #define HAVE_EBP_AVAILABLE 1
8438 #define HAVE_EBP_AVAILABLE 0
8441 #define CONFIG_H263_VAAPI_HWACCEL 0
8442 #define CONFIG_MPEG2_VAAPI_HWACCEL 0
8443 #define CONFIG_MPEG4_VAAPI_HWACCEL 0
8444 #define CONFIG_H264_VAAPI_HWACCEL 0
8445 #define CONFIG_VC1_VAAPI_HWACCEL 0
8446 #define CONFIG_WMV3_VAAPI_HWACCEL 0
8448 #endif /* MPLAYER_CONFIG_H */
8451 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8452 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
8454 #############################################################################
8456 .
/version.sh
`$_cc -dumpversion`
8460 Config files successfully generated by ./configure $configuration !
8462 Install prefix: $_prefix
8463 Data directory: $_datadir
8464 Config direct.: $_confdir
8466 Byte order: $_byte_order
8467 Optimizing for: $_optimizing
8470 Messages (in addition to English): $language_msg
8471 Manual pages: $language_man
8472 Documentation: $language_doc
8474 Enabled optional drivers:
8475 Input: $inputmodules
8476 Codecs: $codecmodules
8477 Audio output: $aomodules
8478 Video output: $vomodules
8480 Disabled optional drivers:
8481 Input: $noinputmodules
8482 Codecs: $nocodecmodules
8483 Audio output: $noaomodules
8484 Video output: $novomodules
8486 'config.h' and 'config.mak' contain your configuration options.
8487 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8488 compile *** DO NOT REPORT BUGS if you tweak these files ***
8490 'make' will now compile MPlayer and 'make install' will install it.
8491 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8496 if test "$_mtrr" = yes ; then
8497 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
8503 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8504 operating system ($system_name). You may encounter a few files that cannot
8505 be played due to missing open source video/audio codec support.
8512 Check $TMPLOG if you wonder why an autodetection failed (make sure
8513 development headers/packages are installed).
8515 NOTE: The --enable-* parameters unconditionally force options on, completely
8516 skipping autodetection. This behavior is unlike what you may be used to from
8517 autoconf-based configure scripts that can decide to override you. This greater
8518 level of control comes at a price. You may have to provide the correct compiler
8519 and linker flags yourself.
8520 If you used one of these options (except --enable-menu and similar ones that
8521 turn on internal features) and experience a compilation or linking failure,
8522 make sure you have passed the necessary compiler/linker flags to configure.
8524 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
8528 if test "$_warn_CFLAGS" = yes; then
8531 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
8534 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8536 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8537 To do so, execute 'CFLAGS= ./configure <options>'
8543 rm -rf "$mplayer_tmpdir"