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 echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
67 $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
84 cat "$TMPS" >> "$TMPLOG"
86 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
88 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
96 "$TMPEXE" >> "$TMPLOG" 2>&1
99 # Display error message, flushes tempfile, exit
104 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
105 echo "Check \"$TMPLOG\" if you do not understand why it failed."
109 # OS test booleans functions
111 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
113 aix
() { issystem
"AIX"; }
114 amigaos
() { issystem
"AmigaOS"; }
115 beos
() { issystem
"BEOS"; }
116 bsdos
() { issystem
"BSD/OS"; }
117 cygwin
() { issystem
"CYGWIN"; }
118 darwin
() { issystem
"Darwin"; }
119 dragonfly
() { issystem
"DragonFly"; }
120 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
121 gnu
() { issystem
"GNU"; }
122 hpux
() { issystem
"HP-UX"; }
123 irix
() { issystem
"IRIX"; }
124 linux
() { issystem
"Linux"; }
125 mingw32
() { issystem
"MINGW32"; }
126 morphos
() { issystem
"MorphOS"; }
127 netbsd
() { issystem
"NetBSD"; }
128 openbsd
() { issystem
"OpenBSD"; }
129 os2
() { issystem
"OS/2"; }
130 qnx
() { issystem
"QNX"; }
131 sunos
() { issystem
"SunOS"; }
132 win32
() { cygwin || mingw32
; }
134 # arch test boolean functions
135 # x86/x86pc is used by QNX
138 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
145 x86_64|amd64
) return 0 ;;
156 ppc|ppc64|powerpc|powerpc64
) return 0;;
175 # Use this before starting a check
177 echo "============ Checking for $@ ============" >> "$TMPLOG"
178 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
181 # Use this to echo the results of a check
183 if test "$_res_comment" ; then
184 _res_comment
="($_res_comment)"
186 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
187 echo "##########################################" >> "$TMPLOG"
189 echo "$@ $_res_comment"
192 #############################################################################
194 # Check how echo works in this /bin/sh
196 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
197 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
200 msg_lang_all
=$
(echo help
/help_mp-??.h help
/help_mp-??_??.h |
sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g")
201 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")
202 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
206 Usage: $0 [OPTIONS]...
209 -h, --help display this help and exit
211 Installation directories:
212 --prefix=DIR prefix directory for installation [/usr/local]
213 --bindir=DIR directory for installing binaries [PREFIX/bin]
214 --datadir=DIR directory for installing machine independent
215 data files (skins, etc) [PREFIX/share/mplayer]
216 --mandir=DIR directory for installing man pages [PREFIX/share/man]
217 --confdir=DIR directory for installing configuration files
219 --libdir=DIR directory for object code libraries [PREFIX/lib]
220 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
221 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
222 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
223 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
226 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
227 --disable-mplayer disable MPlayer compilation [enable]
228 --disable-largefiles disable support for files > 2GB [enable]
229 --enable-linux-devfs set default devices to devfs [disable]
230 --enable-termcap use termcap database for key codes [autodetect]
231 --enable-termios use termios database for key codes [autodetect]
232 --disable-iconv disable iconv for encoding conversion [autodetect]
233 --disable-langinfo do not use langinfo [autodetect]
234 --enable-lirc enable LIRC (remote control) support [autodetect]
235 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
236 --enable-joystick enable joystick support [disable]
237 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
238 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
239 --disable-vm disable X video mode extensions [autodetect]
240 --disable-xf86keysym disable support for multimedia keys [autodetect]
241 --enable-radio enable radio interface [disable]
242 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
243 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
244 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
245 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
246 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
247 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
248 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
249 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
250 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
251 --disable-network disable networking [enable]
252 --enable-winsock2_h enable winsock2_h [autodetect]
253 --enable-smb enable Samba (SMB) input [autodetect]
254 --enable-live enable LIVE555 Streaming Media [autodetect]
255 --enable-nemesi enable Nemesi Streaming Media [autodetect]
256 --disable-vcd disable VCD support [autodetect]
257 --disable-dvdnav disable libdvdnav [autodetect]
258 --disable-dvdread disable libdvdread [autodetect]
259 --disable-dvdread-internal disable internal libdvdread [autodetect]
260 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
261 --disable-cdparanoia disable cdparanoia [autodetect]
262 --disable-cddb disable cddb [autodetect]
263 --disable-bitmap-font disable bitmap font support [enable]
264 --disable-freetype disable FreeType 2 font rendering [autodetect]
265 --disable-fontconfig disable fontconfig font lookup [autodetect]
266 --disable-unrarexec disable using of UnRAR executable [enabled]
267 --enable-menu enable OSD menu (not DVD menu) [disabled]
268 --disable-sortsub disable subtitle sorting [enabled]
269 --enable-fribidi enable the FriBiDi libs [autodetect]
270 --disable-enca disable ENCA charset oracle library [autodetect]
271 --disable-maemo disable maemo specific features [autodetect]
272 --enable-macosx-finder enable Mac OS X Finder invocation parameter
274 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
275 --disable-inet6 disable IPv6 support [autodetect]
276 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
277 --disable-ftp disable FTP support [enabled]
278 --disable-vstream disable TiVo vstream client support [autodetect]
279 --disable-pthreads disable Posix threads support [autodetect]
280 --disable-w32threads disable Win32 threads support [autodetect]
281 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
282 --enable-rpath enable runtime linker path for extra libs [disabled]
285 --enable-gif enable GIF support [autodetect]
286 --enable-png enable PNG input/output support [autodetect]
287 --enable-mng enable MNG input support [autodetect]
288 --enable-jpeg enable JPEG input/output support [autodetect]
289 --enable-libcdio enable libcdio support [autodetect]
290 --enable-liblzo enable liblzo support [autodetect]
291 --disable-win32dll disable Win32 DLL support [enabled]
292 --disable-qtx disable QuickTime codecs support [enabled]
293 --disable-xanim disable XAnim codecs support [enabled]
294 --disable-real disable RealPlayer codecs support [enabled]
295 --disable-xvid disable Xvid [autodetect]
296 --disable-x264 disable x264 [autodetect]
297 --disable-libnut disable libnut [autodetect]
298 --disable-libavutil disable libavutil [autodetect]
299 --disable-libavcodec disable libavcodec [autodetect]
300 --disable-libavformat disable libavformat [autodetect]
301 --disable-libpostproc disable libpostproc [autodetect]
302 --disable-libswscale disable libswscale [autodetect]
303 --disable-tremor-internal disable internal Tremor [enabled]
304 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
305 --enable-tremor enable external Tremor [autodetect]
306 --disable-libvorbis disable libvorbis support [autodetect]
307 --disable-speex disable Speex support [autodetect]
308 --enable-theora enable OggTheora libraries [autodetect]
309 --enable-faad enable external FAAD2 (AAC) [autodetect]
310 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
311 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
312 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
313 --disable-ladspa disable LADSPA plugin support [autodetect]
314 --disable-libbs2b disable libbs2b audio filter support [autodetect]
315 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
316 --disable-mad disable libmad (MPEG audio) support [autodetect]
317 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
318 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
319 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
320 --enable-xmms enable XMMS input plugin support [disabled]
321 --enable-libdca enable libdca support [autodetect]
322 --disable-mp3lib disable builtin mp3lib [autodetect]
323 --disable-liba52 disable liba52 [autodetect]
324 --enable-liba52-internal enable builtin liba52 [disabled]
325 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
326 --disable-musepack disable musepack support [autodetect]
329 --disable-vidix disable VIDIX [for x86 *nix]
330 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
331 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
332 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
333 --disable-vidix-pcidb disable VIDIX PCI device name database
334 --enable-dhahelper enable VIDIX dhahelper support
335 --enable-svgalib_helper enable VIDIX svgalib_helper support
336 --enable-gl enable OpenGL video output [autodetect]
337 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
338 --enable-dga2 enable DGA 2 support [autodetect]
339 --enable-dga1 enable DGA 1 support [autodetect]
340 --enable-vesa enable VESA video output [autodetect]
341 --enable-svga enable SVGAlib video output [autodetect]
342 --enable-sdl enable SDL video output [autodetect]
343 --enable-kva enable KVA video output [autodetect]
344 --enable-aa enable AAlib video output [autodetect]
345 --enable-caca enable CACA video output [autodetect]
346 --enable-ggi enable GGI video output [autodetect]
347 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
348 --enable-direct3d enable Direct3D video output [autodetect]
349 --enable-directx enable DirectX video output [autodetect]
350 --enable-dxr2 enable DXR2 video output [autodetect]
351 --enable-dxr3 enable DXR3/H+ video output [autodetect]
352 --enable-ivtv enable IVTV TV-Out video output [autodetect]
353 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
354 --enable-dvb enable DVB video output [autodetect]
355 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
356 --enable-mga enable mga_vid video output [autodetect]
357 --enable-xmga enable mga_vid X11 video output [autodetect]
358 --enable-xv enable Xv video output [autodetect]
359 --enable-xvmc enable XvMC acceleration [disable]
360 --enable-vdpau enable VDPAU acceleration [autodetect]
361 --enable-vm enable XF86VidMode support [autodetect]
362 --enable-xinerama enable Xinerama support [autodetect]
363 --enable-x11 enable X11 video output [autodetect]
364 --enable-xshape enable XShape support [autodetect]
365 --disable-xss disable screensaver support via xss [autodetect]
366 --enable-fbdev enable FBDev video output [autodetect]
367 --enable-mlib enable mediaLib video output (Solaris) [disable]
368 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
369 --enable-tdfxfb enable tdfxfb video output [disable]
370 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
371 --enable-wii enable Nintendo Wii/GameCube video output [disable]
372 --enable-directfb enable DirectFB video output [autodetect]
373 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
374 --enable-bl enable Blinkenlights video output [disable]
375 --enable-tdfxvid enable tdfx_vid video output [disable]
376 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
377 --disable-tga disable Targa video output [enable]
378 --disable-pnm disable PNM video output [enable]
379 --disable-md5sum disable md5sum video output [enable]
380 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
381 --disable-corevideo disable CoreVideo video output [autodetect]
382 --disable-quartz disable Quartz video output [autodetect]
385 --disable-alsa disable ALSA audio output [autodetect]
386 --disable-ossaudio disable OSS audio output [autodetect]
387 --disable-arts disable aRts audio output [autodetect]
388 --disable-esd disable esd audio output [autodetect]
389 --disable-pulse disable Pulseaudio audio output [autodetect]
390 --disable-jack disable JACK audio output [autodetect]
391 --enable-openal enable OpenAL audio output [disable]
392 --disable-nas disable NAS audio output [autodetect]
393 --disable-sgiaudio disable SGI audio output [autodetect]
394 --disable-sunaudio disable Sun audio output [autodetect]
395 --disable-dart disable DART audio output [autodetect]
396 --disable-win32waveout disable Windows waveout audio output [autodetect]
397 --disable-coreaudio disable CoreAudio audio output [autodetect]
398 --disable-select disable using select() on the audio device [enable]
401 --charset=charset convert the console messages to this character set
402 --language-doc=lang language to use for the documentation [en]
403 --language-man=lang language to use for the man pages [en]
404 --language-msg=lang language to use for the messages [en]
405 --language=lang default language to use [en]
406 Specific options override --language. You can pass a list of languages separated
407 by whitespace or commas instead of a single language. Nonexisting translations
408 will be dropped from each list. All documentation and man page translations
409 available in the list will be installed, for the messages the first available
410 translation will be used. The value "all" will activate all translations. The
411 LINGUAS environment variable is honored. In all cases the fallback is English.
412 Available values are: all $msg_lang_all
414 Miscellaneous options:
415 --enable-runtime-cpudetection enable runtime CPU detection [disable]
416 --enable-cross-compile enable cross-compilation [autodetect]
417 --cc=COMPILER C compiler to build MPlayer [gcc]
418 --host-cc=COMPILER C compiler for tools needed while building [gcc]
419 --as=ASSEMBLER assembler to build MPlayer [as]
420 --nm=NM nm tool to build MPlayer [nm]
421 --yasm=YASM Yasm assembler to build MPlayer [yasm]
422 --ar=AR librarian to build MPlayer [ar]
423 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
424 --windres=WINDRES windres to build MPlayer [windres]
425 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
426 --enable-static build a statically linked binary
427 --with-install=PATH path to a custom install program
430 --enable-mmx enable MMX [autodetect]
431 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
432 --enable-3dnow enable 3DNow! [autodetect]
433 --enable-3dnowext enable extended 3DNow! [autodetect]
434 --enable-sse enable SSE [autodetect]
435 --enable-sse2 enable SSE2 [autodetect]
436 --enable-ssse3 enable SSSE3 [autodetect]
437 --enable-shm enable shm [autodetect]
438 --enable-altivec enable AltiVec (PowerPC) [autodetect]
439 --enable-armv5te enable DSP extensions (ARM) [autodetect]
440 --enable-armv6 enable ARMv6 (ARM) [autodetect]
441 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
442 --enable-armvfp enable ARM VFP (ARM) [autodetect]
443 --enable-neon enable NEON (ARM) [autodetect]
444 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
445 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
446 --enable-big-endian force byte order to big-endian [autodetect]
447 --enable-debug[=1-3] compile-in debugging information [disable]
448 --enable-profile compile-in profiling information [disable]
449 --disable-sighandler disable sighandler for crashes [enable]
450 --enable-crash-debug enable automatic gdb attach on crash [disable]
451 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
452 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
454 Use these options if autodetection fails:
455 --extra-cflags=FLAGS extra CFLAGS
456 --extra-ldflags=FLAGS extra LDFLAGS
457 --extra-libs=FLAGS extra linker flags
458 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
459 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
460 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
462 --with-freetype-config=PATH path to freetype-config
463 --with-fribidi-config=PATH path to fribidi-config
464 --with-glib-config=PATH path to glib*-config
465 --with-gtk-config=PATH path to gtk*-config
466 --with-sdl-config=PATH path to sdl*-config
467 --with-dvdnav-config=PATH path to dvdnav-config
468 --with-dvdread-config=PATH path to dvdread-config
470 This configure script is NOT autoconf-based, even though its output is similar.
471 It will try to autodetect all configuration options. If you --enable an option
472 it will be forcefully turned on, skipping autodetection. This can break
473 compilation, so you need to know what you are doing.
478 # GOTCHA: the variables below defines the default behavior for autodetection
479 # and have - unless stated otherwise - at least 2 states : yes no
480 # If autodetection is available then the third state is: auto
503 test "$CC" && _cc
="$CC"
507 _runtime_cpudetection
=no
515 _libavcodec_internals
=no
516 _libswscale_internals
=no
525 _xvmc
=no
#auto when complete
591 _dvdnavconfig
=dvdnav-config
592 _dvdreadconfig
=dvdread-config
594 _dvdread_internal
=auto
595 _libdvdcss_internal
=auto
606 _mlib
=no
#broken, thus disabled
679 _freetypeconfig
='freetype-config'
681 _fribidiconfig
='fribidi-config'
695 def_dos_paths
="#define HAVE_DOS_PATHS 0"
696 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
697 def_priority
="#undef CONFIG_PRIORITY"
698 def_pthread_cache
="#undef PTHREAD_CACHE"
706 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
709 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
712 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
715 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
718 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
721 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
724 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
727 _win32codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
730 _xanimcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
733 _realcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
737 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
740 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
744 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
746 --with-freetype-config=*)
747 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
749 --with-fribidi-config=*)
750 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
753 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
755 --with-glib-config=*)
756 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
758 --with-dvdnav-config=*)
759 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
761 --with-dvdread-config=*)
762 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
766 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
769 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
772 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
774 --extra-libs-mplayer=*)
775 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
777 --extra-libs-mencoder=*)
778 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
782 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
785 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
788 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
791 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
794 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
803 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
806 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
812 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
815 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
818 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
821 language
=$
(echo $ac_option | cut
-d '=' -f 2)
840 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
845 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
846 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
847 --enable-cross-compile) _cross_compile
=yes ;;
848 --disable-cross-compile) _cross_compile
=no
;;
849 --enable-mencoder) _mencoder
=yes ;;
850 --disable-mencoder) _mencoder
=no
;;
851 --enable-mplayer) _mplayer
=yes ;;
852 --disable-mplayer) _mplayer
=no
;;
853 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
854 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
855 --enable-x11) _x11
=yes ;;
856 --disable-x11) _x11
=no
;;
857 --enable-xshape) _xshape
=yes ;;
858 --disable-xshape) _xshape
=no
;;
859 --enable-xss) _xss
=yes ;;
860 --disable-xss) _xss
=no
;;
861 --enable-xv) _xv
=yes ;;
862 --disable-xv) _xv
=no
;;
863 --enable-xvmc) _xvmc
=yes ;;
864 --disable-xvmc) _xvmc
=no
;;
865 --enable-vdpau) _vdpau
=yes ;;
866 --disable-vdpau) _vdpau
=no
;;
867 --enable-sdl) _sdl
=yes ;;
868 --disable-sdl) _sdl
=no
;;
869 --enable-kva) _kva
=yes ;;
870 --disable-kva) _kva
=no
;;
871 --enable-direct3d) _direct3d
=yes ;;
872 --disable-direct3d) _direct3d
=no
;;
873 --enable-directx) _directx
=yes ;;
874 --disable-directx) _directx
=no
;;
875 --enable-win32waveout) _win32waveout
=yes ;;
876 --disable-win32waveout) _win32waveout
=no
;;
877 --enable-nas) _nas
=yes ;;
878 --disable-nas) _nas
=no
;;
879 --enable-png) _png
=yes ;;
880 --disable-png) _png
=no
;;
881 --enable-mng) _mng
=yes ;;
882 --disable-mng) _mng
=no
;;
883 --enable-jpeg) _jpeg
=yes ;;
884 --disable-jpeg) _jpeg
=no
;;
885 --enable-pnm) _pnm
=yes ;;
886 --disable-pnm) _pnm
=no
;;
887 --enable-md5sum) _md5sum
=yes ;;
888 --disable-md5sum) _md5sum
=no
;;
889 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
890 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
891 --enable-gif) _gif
=yes ;;
892 --disable-gif) _gif
=no
;;
893 --enable-gl) _gl
=yes ;;
894 --disable-gl) _gl
=no
;;
895 --enable-matrixview) matrixview
=yes ;;
896 --disable-matrixview) matrixview
=no
;;
897 --enable-ggi) _ggi
=yes ;;
898 --disable-ggi) _ggi
=no
;;
899 --enable-ggiwmh) _ggiwmh
=yes ;;
900 --disable-ggiwmh) _ggiwmh
=no
;;
901 --enable-aa) _aa
=yes ;;
902 --disable-aa) _aa
=no
;;
903 --enable-caca) _caca
=yes ;;
904 --disable-caca) _caca
=no
;;
905 --enable-svga) _svga
=yes ;;
906 --disable-svga) _svga
=no
;;
907 --enable-vesa) _vesa
=yes ;;
908 --disable-vesa) _vesa
=no
;;
909 --enable-fbdev) _fbdev
=yes ;;
910 --disable-fbdev) _fbdev
=no
;;
911 --enable-dvb) _dvb
=yes ;;
912 --disable-dvb) _dvb
=no
;;
913 --enable-dvbhead) _dvbhead
=yes ;;
914 --disable-dvbhead) _dvbhead
=no
;;
915 --enable-dxr2) _dxr2
=yes ;;
916 --disable-dxr2) _dxr2
=no
;;
917 --enable-dxr3) _dxr3
=yes ;;
918 --disable-dxr3) _dxr3
=no
;;
919 --enable-ivtv) _ivtv
=yes ;;
920 --disable-ivtv) _ivtv
=no
;;
921 --enable-v4l2) _v4l2
=yes ;;
922 --disable-v4l2) _v4l2
=no
;;
923 --enable-iconv) _iconv
=yes ;;
924 --disable-iconv) _iconv
=no
;;
925 --enable-langinfo) _langinfo
=yes ;;
926 --disable-langinfo) _langinfo
=no
;;
927 --enable-rtc) _rtc
=yes ;;
928 --disable-rtc) _rtc
=no
;;
929 --enable-libdv) _libdv
=yes ;;
930 --disable-libdv) _libdv
=no
;;
931 --enable-ossaudio) _ossaudio
=yes ;;
932 --disable-ossaudio) _ossaudio
=no
;;
933 --enable-arts) _arts
=yes ;;
934 --disable-arts) _arts
=no
;;
935 --enable-esd) _esd
=yes ;;
936 --disable-esd) _esd
=no
;;
937 --enable-pulse) _pulse
=yes ;;
938 --disable-pulse) _pulse
=no
;;
939 --enable-jack) _jack
=yes ;;
940 --disable-jack) _jack
=no
;;
941 --enable-openal) _openal
=yes ;;
942 --disable-openal) _openal
=no
;;
943 --enable-dart) _dart
=yes ;;
944 --disable-dart) _dart
=no
;;
945 --enable-mad) _mad
=yes ;;
946 --disable-mad) _mad
=no
;;
947 --enable-mp3lame) _mp3lame
=yes ;;
948 --disable-mp3lame) _mp3lame
=no
;;
949 --enable-toolame) _toolame
=yes ;;
950 --disable-toolame) _toolame
=no
;;
951 --enable-twolame) _twolame
=yes ;;
952 --disable-twolame) _twolame
=no
;;
953 --enable-libcdio) _libcdio
=yes ;;
954 --disable-libcdio) _libcdio
=no
;;
955 --enable-liblzo) _liblzo
=yes ;;
956 --disable-liblzo) _liblzo
=no
;;
957 --enable-libvorbis) _libvorbis
=yes ;;
958 --disable-libvorbis) _libvorbis
=no
;;
959 --enable-speex) _speex
=yes ;;
960 --disable-speex) _speex
=no
;;
961 --enable-tremor) _tremor
=yes ;;
962 --disable-tremor) _tremor
=no
;;
963 --enable-tremor-internal) _tremor_internal
=yes ;;
964 --disable-tremor-internal) _tremor_internal
=no
;;
965 --enable-tremor-low) _tremor_low
=yes ;;
966 --disable-tremor-low) _tremor_low
=no
;;
967 --enable-theora) _theora
=yes ;;
968 --disable-theora) _theora
=no
;;
969 --enable-mp3lib) _mp3lib
=yes ;;
970 --disable-mp3lib) _mp3lib
=no
;;
971 --enable-liba52-internal) _liba52_internal
=yes ;;
972 --disable-liba52-internal) _liba52_internal
=no
;;
973 --enable-liba52) _liba52
=yes ;;
974 --disable-liba52) _liba52
=no
;;
975 --enable-libdca) _libdca
=yes ;;
976 --disable-libdca) _libdca
=no
;;
977 --enable-libmpeg2) _libmpeg2
=yes ;;
978 --disable-libmpeg2) _libmpeg2
=no
;;
979 --enable-musepack) _musepack
=yes ;;
980 --disable-musepack) _musepack
=no
;;
981 --enable-faad) _faad
=yes ;;
982 --disable-faad) _faad
=no
;;
983 --enable-faad-internal) _faad_internal
=yes ;;
984 --disable-faad-internal) _faad_internal
=no
;;
985 --enable-faad-fixed) _faad_fixed
=yes ;;
986 --disable-faad-fixed) _faad_fixed
=no
;;
987 --enable-faac) _faac
=yes ;;
988 --disable-faac) _faac
=no
;;
989 --enable-ladspa) _ladspa
=yes ;;
990 --disable-ladspa) _ladspa
=no
;;
991 --enable-libbs2b) _libbs2b
=yes ;;
992 --disable-libbs2b) _libbs2b
=no
;;
993 --enable-xmms) _xmms
=yes ;;
994 --disable-xmms) _xmms
=no
;;
995 --enable-vcd) _vcd
=yes ;;
996 --disable-vcd) _vcd
=no
;;
997 --enable-dvdread) _dvdread
=yes ;;
998 --disable-dvdread) _dvdread
=no
;;
999 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1000 --disable-dvdread-internal) _dvdread_internal
=no
;;
1001 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1002 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1003 --enable-dvdnav) _dvdnav
=yes ;;
1004 --disable-dvdnav) _dvdnav
=no
;;
1005 --enable-xanim) _xanim
=yes ;;
1006 --disable-xanim) _xanim
=no
;;
1007 --enable-real) _real
=yes ;;
1008 --disable-real) _real
=no
;;
1009 --enable-live) _live
=yes ;;
1010 --disable-live) _live
=no
;;
1011 --enable-nemesi) _nemesi
=yes ;;
1012 --disable-nemesi) _nemesi
=no
;;
1013 --enable-xinerama) _xinerama
=yes ;;
1014 --disable-xinerama) _xinerama
=no
;;
1015 --enable-mga) _mga
=yes ;;
1016 --disable-mga) _mga
=no
;;
1017 --enable-xmga) _xmga
=yes ;;
1018 --disable-xmga) _xmga
=no
;;
1019 --enable-vm) _vm
=yes ;;
1020 --disable-vm) _vm
=no
;;
1021 --enable-xf86keysym) _xf86keysym
=yes ;;
1022 --disable-xf86keysym) _xf86keysym
=no
;;
1023 --enable-mlib) _mlib
=yes ;;
1024 --disable-mlib) _mlib
=no
;;
1025 --enable-sunaudio) _sunaudio
=yes ;;
1026 --disable-sunaudio) _sunaudio
=no
;;
1027 --enable-sgiaudio) _sgiaudio
=yes ;;
1028 --disable-sgiaudio) _sgiaudio
=no
;;
1029 --enable-alsa) _alsa
=yes ;;
1030 --disable-alsa) _alsa
=no
;;
1031 --enable-tv) _tv
=yes ;;
1032 --disable-tv) _tv
=no
;;
1033 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1034 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1035 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1036 --disable-tv-v4l1) _tv_v4l1
=no
;;
1037 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1038 --disable-tv-v4l2) _tv_v4l2
=no
;;
1039 --enable-tv-dshow) _tv_dshow
=yes ;;
1040 --disable-tv-dshow) _tv_dshow
=no
;;
1041 --enable-radio) _radio
=yes ;;
1042 --enable-radio-capture) _radio_capture
=yes ;;
1043 --disable-radio-capture) _radio_capture
=no
;;
1044 --disable-radio) _radio
=no
;;
1045 --enable-radio-v4l) _radio_v4l
=yes ;;
1046 --disable-radio-v4l) _radio_v4l
=no
;;
1047 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1048 --disable-radio-v4l2) _radio_v4l2
=no
;;
1049 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1050 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1051 --enable-pvr) _pvr
=yes ;;
1052 --disable-pvr) _pvr
=no
;;
1053 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1054 --disable-fastmemcpy) _fastmemcpy
=no
;;
1055 --enable-network) _network
=yes ;;
1056 --disable-network) _network
=no
;;
1057 --enable-winsock2_h) _winsock2_h
=yes ;;
1058 --disable-winsock2_h) _winsock2_h
=no
;;
1059 --enable-smb) _smb
=yes ;;
1060 --disable-smb) _smb
=no
;;
1061 --enable-vidix) _vidix
=yes ;;
1062 --disable-vidix) _vidix
=no
;;
1063 --with-vidix-drivers=*)
1064 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1066 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1067 --enable-dhahelper) _dhahelper
=yes ;;
1068 --disable-dhahelper) _dhahelper
=no
;;
1069 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1070 --disable-svgalib_helper) _svgalib_helper
=no
;;
1071 --enable-joystick) _joystick
=yes ;;
1072 --disable-joystick) _joystick
=no
;;
1073 --enable-xvid) _xvid
=yes ;;
1074 --disable-xvid) _xvid
=no
;;
1075 --enable-x264) _x264
=yes ;;
1076 --disable-x264) _x264
=no
;;
1077 --enable-libnut) _libnut
=yes ;;
1078 --disable-libnut) _libnut
=no
;;
1079 --enable-libavutil) _libavutil
=yes ;;
1080 --disable-libavutil) _libavutil
=no
;;
1081 --enable-libavcodec) _libavcodec
=yes ;;
1082 --disable-libavcodec) _libavcodec
=no
;;
1083 --enable-libavformat) _libavformat
=yes ;;
1084 --disable-libavformat) _libavformat
=no
;;
1085 --enable-libpostproc) _libpostproc
=yes ;;
1086 --disable-libpostproc) _libpostproc
=no
;;
1087 --enable-libswscale) _libswscale
=yes ;;
1088 --disable-libswscale) _libswscale
=no
;;
1089 --ffmpeg-source-dir=*)
1090 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1092 --enable-lirc) _lirc
=yes ;;
1093 --disable-lirc) _lirc
=no
;;
1094 --enable-lircc) _lircc
=yes ;;
1095 --disable-lircc) _lircc
=no
;;
1096 --enable-apple-remote) _apple_remote
=yes ;;
1097 --disable-apple-remote) _apple_remote
=no
;;
1098 --enable-apple-ir) _apple_ir
=yes ;;
1099 --disable-apple-ir) _apple_ir
=no
;;
1100 --enable-gui) _gui
=yes ;;
1101 --disable-gui) _gui
=no
;;
1102 --enable-gtk1) _gtk1
=yes ;;
1103 --disable-gtk1) _gtk1
=no
;;
1104 --enable-termcap) _termcap
=yes ;;
1105 --disable-termcap) _termcap
=no
;;
1106 --enable-termios) _termios
=yes ;;
1107 --disable-termios) _termios
=no
;;
1108 --enable-3dfx) _3dfx
=yes ;;
1109 --disable-3dfx) _3dfx
=no
;;
1110 --enable-s3fb) _s3fb
=yes ;;
1111 --disable-s3fb) _s3fb
=no
;;
1112 --enable-wii) _wii
=yes ;;
1113 --disable-wii) _wii
=no
;;
1114 --enable-tdfxfb) _tdfxfb
=yes ;;
1115 --disable-tdfxfb) _tdfxfb
=no
;;
1116 --disable-tdfxvid) _tdfxvid
=no
;;
1117 --enable-tdfxvid) _tdfxvid
=yes ;;
1118 --disable-xvr100) _xvr100
=no
;;
1119 --enable-xvr100) _xvr100
=yes ;;
1120 --disable-tga) _tga
=no
;;
1121 --enable-tga) _tga
=yes ;;
1122 --enable-directfb) _directfb
=yes ;;
1123 --disable-directfb) _directfb
=no
;;
1124 --enable-zr) _zr
=yes ;;
1125 --disable-zr) _zr
=no
;;
1126 --enable-bl) _bl
=yes ;;
1127 --disable-bl) _bl
=no
;;
1128 --enable-mtrr) _mtrr
=yes ;;
1129 --disable-mtrr) _mtrr
=no
;;
1130 --enable-largefiles) _largefiles
=yes ;;
1131 --disable-largefiles) _largefiles
=no
;;
1132 --enable-shm) _shm
=yes ;;
1133 --disable-shm) _shm
=no
;;
1134 --enable-select) _select
=yes ;;
1135 --disable-select) _select
=no
;;
1136 --enable-linux-devfs) _linux_devfs
=yes ;;
1137 --disable-linux-devfs) _linux_devfs
=no
;;
1138 --enable-cdparanoia) _cdparanoia
=yes ;;
1139 --disable-cdparanoia) _cdparanoia
=no
;;
1140 --enable-cddb) _cddb
=yes ;;
1141 --disable-cddb) _cddb
=no
;;
1142 --enable-big-endian) _big_endian
=yes ;;
1143 --disable-big-endian) _big_endian
=no
;;
1144 --enable-bitmap-font) _bitmap_font
=yes ;;
1145 --disable-bitmap-font) _bitmap_font
=no
;;
1146 --enable-freetype) _freetype
=yes ;;
1147 --disable-freetype) _freetype
=no
;;
1148 --enable-fontconfig) _fontconfig
=yes ;;
1149 --disable-fontconfig) _fontconfig
=no
;;
1150 --enable-unrarexec) _unrar_exec
=yes ;;
1151 --disable-unrarexec) _unrar_exec
=no
;;
1152 --enable-ftp) _ftp
=yes ;;
1153 --disable-ftp) _ftp
=no
;;
1154 --enable-vstream) _vstream
=yes ;;
1155 --disable-vstream) _vstream
=no
;;
1156 --enable-pthreads) _pthreads
=yes ;;
1157 --disable-pthreads) _pthreads
=no
;;
1158 --enable-w32threads) _w32threads
=yes ;;
1159 --disable-w32threads) _w32threads
=no
;;
1160 --enable-ass) _ass
=yes ;;
1161 --disable-ass) _ass
=no
;;
1162 --enable-rpath) _rpath
=yes ;;
1163 --disable-rpath) _rpath
=no
;;
1165 --enable-fribidi) _fribidi
=yes ;;
1166 --disable-fribidi) _fribidi
=no
;;
1168 --enable-enca) _enca
=yes ;;
1169 --disable-enca) _enca
=no
;;
1171 --enable-inet6) _inet6
=yes ;;
1172 --disable-inet6) _inet6
=no
;;
1174 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1175 --disable-gethostbyname2) _gethostbyname2
=no
;;
1177 --enable-dga1) _dga1
=yes ;;
1178 --disable-dga1) _dga1
=no
;;
1179 --enable-dga2) _dga2
=yes ;;
1180 --disable-dga2) _dga2
=no
;;
1182 --enable-menu) _menu
=yes ;;
1183 --disable-menu) _menu
=no
;;
1185 --enable-qtx) _qtx
=yes ;;
1186 --disable-qtx) _qtx
=no
;;
1188 --enable-coreaudio) _coreaudio
=yes ;;
1189 --disable-coreaudio) _coreaudio
=no
;;
1190 --enable-corevideo) _corevideo
=yes ;;
1191 --disable-corevideo) _corevideo
=no
;;
1192 --enable-quartz) _quartz
=yes ;;
1193 --disable-quartz) _quartz
=no
;;
1194 --enable-macosx-finder) _macosx_finder
=yes ;;
1195 --disable-macosx-finder) _macosx_finder
=no
;;
1196 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1197 --disable-macosx-bundle) _macosx_bundle
=no
;;
1199 --enable-maemo) _maemo
=yes ;;
1200 --disable-maemo) _maemo
=no
;;
1202 --enable-sortsub) _sortsub
=yes ;;
1203 --disable-sortsub) _sortsub
=no
;;
1205 --enable-crash-debug) _crash_debug
=yes ;;
1206 --disable-crash-debug) _crash_debug
=no
;;
1207 --enable-sighandler) _sighandler
=yes ;;
1208 --disable-sighandler) _sighandler
=no
;;
1209 --enable-win32dll) _win32dll
=yes ;;
1210 --disable-win32dll) _win32dll
=no
;;
1212 --enable-sse) _sse
=yes ;;
1213 --disable-sse) _sse
=no
;;
1214 --enable-sse2) _sse2
=yes ;;
1215 --disable-sse2) _sse2
=no
;;
1216 --enable-ssse3) _ssse3
=yes ;;
1217 --disable-ssse3) _ssse3
=no
;;
1218 --enable-mmxext) _mmxext
=yes ;;
1219 --disable-mmxext) _mmxext
=no
;;
1220 --enable-3dnow) _3dnow
=yes ;;
1221 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1222 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1223 --disable-3dnowext) _3dnowext
=no
;;
1224 --enable-cmov) _cmov
=yes ;;
1225 --disable-cmov) _cmov
=no
;;
1226 --enable-fast-cmov) _fast_cmov
=yes ;;
1227 --disable-fast-cmov) _fast_cmov
=no
;;
1228 --enable-altivec) _altivec
=yes ;;
1229 --disable-altivec) _altivec
=no
;;
1230 --enable-armv5te) _armv5te
=yes ;;
1231 --disable-armv5te) _armv5te
=no
;;
1232 --enable-armv6) _armv6
=yes ;;
1233 --disable-armv6) _armv6
=no
;;
1234 --enable-armv6t2) _armv6t2
=yes ;;
1235 --disable-armv6t2) _armv6t2
=no
;;
1236 --enable-armvfp) _armvfp
=yes ;;
1237 --disable-armvfp) _armvfp
=no
;;
1238 --enable-neon) neon
=yes ;;
1239 --disable-neon) neon
=no
;;
1240 --enable-iwmmxt) _iwmmxt
=yes ;;
1241 --disable-iwmmxt) _iwmmxt
=no
;;
1242 --enable-mmx) _mmx
=yes ;;
1243 --disable-mmx) # 3Dnow! and MMX2 require MMX
1244 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1247 echo "Unknown parameter: $ac_option"
1254 if test "$_gui" = yes ; then
1255 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1256 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1259 # Atmos: moved this here, to be correct, if --prefix is specified
1260 test -z "$_bindir" && _bindir
="$_prefix/bin"
1261 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1262 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1263 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1264 test -z "$_libdir" && _libdir
="$_prefix/lib"
1266 # Determine our OS name and CPU architecture
1267 if test -z "$_target" ; then
1269 system_name
=$
(uname
-s 2>&1)
1270 case "$system_name" in
1271 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1285 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1295 system_name
="$system_name-UNKNOWN"
1300 # host's CPU/instruction set
1301 host_arch
=$
(uname
-p 2>&1)
1302 case "$host_arch" in
1303 i386|sparc|ppc|alpha|arm|mips|vax
)
1305 powerpc
) # Darwin returns 'powerpc'
1308 *) # uname -p on Linux returns 'unknown' for the processor type,
1309 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1311 # Maybe uname -m (machine hardware name) returns something we
1314 # x86/x86pc is used by QNX
1315 case "$(uname -m 2>&1)" in
1316 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
;;
1317 ia64
) host_arch
=ia64
;;
1318 macppc|ppc
) host_arch
=ppc
;;
1319 ppc64
) host_arch
=ppc64
;;
1320 alpha
) host_arch
=alpha
;;
1321 sparc
) host_arch
=sparc
;;
1322 sparc64
) host_arch
=sparc64
;;
1323 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1324 arm
*|zaurus|cats
) host_arch
=arm
;;
1325 sh3|sh4|sh4a
) host_arch
=sh
;;
1326 s390
) host_arch
=s390
;;
1327 s390x
) host_arch
=s390x
;;
1328 *mips
*) host_arch
=mips
;;
1329 vax
) host_arch
=vax
;;
1330 xtensa
*) host_arch
=xtensa
;;
1331 *) host_arch
=UNKNOWN
;;
1335 else # if test -z "$_target"
1336 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1337 case "$(echo $system_name | tr A-Z a-z)" in
1338 linux
) system_name
=Linux
;;
1339 freebsd
) system_name
=FreeBSD
;;
1340 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1341 netbsd
) system_name
=NetBSD
;;
1342 bsd
/os
) system_name
=BSD
/OS
;;
1343 openbsd
) system_name
=OpenBSD
;;
1344 dragonfly
) system_name
=DragonFly
;;
1345 sunos
) system_name
=SunOS
;;
1346 qnx
) system_name
=QNX
;;
1347 morphos
) system_name
=MorphOS
;;
1348 amigaos
) system_name
=AmigaOS
;;
1349 mingw32
*) system_name
=MINGW32
;;
1351 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1352 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1353 if test $
(echo $host_arch) != "x86_64" ; then
1354 host_arch
=$
(echo $host_arch |
tr '_' '-')
1358 extra_cflags
="-I. $extra_cflags"
1359 _timer
=timer-linux.c
1362 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1363 extra_cflags
="$extra_cflags -I/usr/local/include"
1366 if netbsd || dragonfly
; then
1367 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1368 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1372 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1373 _timer
=timer-darwin.c
1377 extra_ldflags
="$extra_ldflags -lC"
1388 extra_cflags
="$extra_cflags -fno-common"
1389 # -lwinmm is always needed for osdep/timer-win2.c
1390 extra_ldflags
="$extra_ldflags -lwinmm"
1394 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1395 def_priority
="#define CONFIG_PRIORITY 1"
1407 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1408 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1412 extra_ldflags
="$extra_ldflags -lph"
1420 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1421 def_priority
="#define CONFIG_PRIORITY 1"
1424 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1429 TMPLOG
="configure.log"
1430 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1431 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1432 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1433 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1434 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1437 echo configuration
: $_configuration > "$TMPLOG"
1441 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1442 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1446 # Checking CC version...
1447 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1448 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1449 echocheck
"$_cc version"
1451 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1452 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1453 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1454 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1455 # TODO verify older icc/ecc compatibility
1458 cc_version
="v. ?.??, bad"
1462 cc_version
="$cc_version, ok"
1465 cc_version
="$cc_version, bad"
1469 echores
"$cc_version"
1471 for _cc
in "$_cc" gcc cc
; do
1472 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1473 if test "$cc_name_tmp" = "gcc"; then
1474 cc_name
=$cc_name_tmp
1475 echocheck
"$_cc version"
1477 cc_version
=$
($_cc -dumpversion 2>&1)
1483 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1484 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1485 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1488 echores
"$cc_version"
1491 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1492 if test "$cc_name_tmp" = "Sun C"; then
1493 echocheck
"$_cc version"
1495 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1496 _res_comment
="experimental support only"
1497 echores
"Sun C $cc_version"
1502 test "$cc_fail" = yes && die
"unsupported compiler version"
1504 if test -z "$_target" && x86
; then
1507 int test[(int)sizeof(char *)-7];
1511 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1514 echo "Detected operating system: $system_name"
1515 echo "Detected host architecture: $host_arch"
1518 test "$_host_cc" || _host_cc
=$_cc
1521 echocheck
"cross compilation"
1522 if test $_cross_compile = auto
; then
1524 int main(void) { return 0; }
1527 cc_check
&& "$TMPEXE" && _cross_compile
=no
1529 echores
$_cross_compile
1531 if test $_cross_compile = yes; then
1539 # now that we know what compiler should be used for compilation, try to find
1540 # out which assembler is used by the $_cc compiler
1541 if test "$_as" = auto
; then
1542 _as
=$
($_cc -print-prog-name=as
)
1543 test -z "$_as" && _as
=as
1546 if test "$_nm" = auto
; then
1547 _nm
=$
($_cc -print-prog-name=nm
)
1548 test -z "$_nm" && _nm
=nm
1551 # XXX: this should be ok..
1554 if test "$_runtime_cpudetection" = no
; then
1556 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1557 # FIXME: Remove the cygwin check once AMD CPUs are supported
1558 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1559 # Linux with /proc mounted, extract CPU information from it
1560 _cpuinfo
="cat /proc/cpuinfo"
1561 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1562 # FreeBSD with Linux emulation /proc mounted,
1563 # extract CPU information from it
1564 # Don't use it on x86 though, it never reports 3Dnow
1565 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1566 elif darwin
&& ! x86
; then
1567 # use hostinfo on Darwin
1570 # use 'lsattr' on AIX
1571 _cpuinfo
="lsattr -E -l proc0 -a type"
1573 # all other OSes try to extract CPU information from a small helper
1574 # program cpuinfo instead
1575 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1576 _cpuinfo
="./cpuinfo$_exesuf"
1580 # gather more CPU information
1581 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1582 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1583 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1584 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1585 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1587 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1589 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1590 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1592 for ext
in $pparam ; do
1593 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1596 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1597 test $_sse = kernel_check
&& _mmxext
=kernel_check
1599 echocheck
"CPU vendor"
1600 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1602 echocheck
"CPU type"
1606 fi # test "$_runtime_cpudetection" = no
1608 if x86
&& test "$_runtime_cpudetection" = no
; then
1610 if test "$1" = kernel_check
; then
1611 echocheck
"kernel support of $2"
1615 void catch() { exit(1); }
1617 signal(SIGILL, catch);
1618 __asm__ volatile ("$3":::"memory"); return 0;
1622 if cc_check
&& tmp_run
; then
1625 _optimizing
="$_optimizing $2"
1630 echo "It seems that your kernel does not correctly support $2."
1631 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1638 extcheck
$_mmx "mmx" "emms"
1639 extcheck
$_mmxext "mmxext" "sfence"
1640 extcheck
$_3dnow "3dnow" "femms"
1641 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1642 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1643 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1644 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1645 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1647 echocheck
"mtrr support"
1648 if test "$_mtrr" = kernel_check
; then
1650 _optimizing
="$_optimizing mtrr"
1654 if test "$_gcc3_ext" != ""; then
1655 # if we had to disable sse/sse2 because the active kernel does not
1656 # support this instruction set extension, we also have to tell
1657 # gcc3 to not generate sse/sse2 instructions for normal C code
1659 int main(void) { return 0; }
1661 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1667 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1668 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1669 _arch_all
='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC PPC64 ALPHA MIPS SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
1670 case "$host_arch" in
1671 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1673 _target_arch
="ARCH_X86 = yes"
1674 _target_subarch
="ARCH_X86_32 = yes"
1675 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1680 if test "$_runtime_cpudetection" = no
; then
1684 3) proc
=i386 iproc
=386 ;;
1685 4) proc
=i486 iproc
=486 ;;
1686 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1687 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1688 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1690 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1692 elif test "$pmodel" -ge 8; then
1694 elif test "$pmodel" -ge 6; then
1701 # It's a bit difficult to determine the correct type of Family 6
1702 # AMD CPUs just from their signature. Instead, we check directly
1703 # whether it supports SSE.
1704 if test "$_sse" = yes; then
1705 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1708 # Again, gcc treats athlon and athlon-tbird similarly.
1713 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1714 # caught and remedied in the optimization tests below.
1718 *) proc
=k8 iproc
=686 ;;
1723 3) proc
=i386 iproc
=386 ;;
1724 4) proc
=i486 iproc
=486 ;;
1726 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1727 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1733 if test "$pmodel" -ge 15; then
1735 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1737 elif test "$pmodel" -ge 7; then
1739 elif test "$pmodel" -ge 3; then
1746 # A nocona in 32-bit mode has no more capabilities than a prescott.
1747 if test "$pmodel" -ge 3; then
1752 test $_fast_cmov = "auto" && _fast_cmov
=no
1754 *) proc
=prescott iproc
=686 ;;
1760 if test "$pmodel" -ge 8; then
1762 elif test "$pmodel" -ge 4; then
1769 if test "$pmodel" -ge 9; then
1776 *) proc
=i686 iproc
=i686
;;
1781 3) proc
=i386 iproc
=386 ;;
1782 4) proc
=i486 iproc
=486 ;;
1783 *) proc
=i586 iproc
=586 ;;
1787 proc
=i586 iproc
=586 ;;
1789 fi # test "$_runtime_cpudetection" = no
1792 # check that gcc supports our CPU, if not, fall back to earlier ones
1793 # LGB: check -mcpu and -march swithing step by step with enabling
1794 # to fall back till 386.
1796 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1798 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1804 echocheck
"GCC & CPU optimization abilities"
1806 int main(void) { return 0; }
1808 if test "$_runtime_cpudetection" = no
; then
1809 cc_check
-march=native
&& proc
=native
1810 if test "$proc" = "k8"; then
1811 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1813 if test "$proc" = "athlon-xp"; then
1814 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1816 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1817 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1819 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1820 if ! cc_check
-march=$proc $cpuopt=$proc; then
1821 if cc_check
-march=i586
$cpuopt=i686
; then
1828 if test "$proc" = "prescott" ; then
1829 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1831 if test "$proc" = "core2" ; then
1832 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1834 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
1835 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1837 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1838 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1840 if test "$proc" = "i586"; then
1841 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1843 if test "$proc" = "i486" ; then
1844 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1846 if test "$proc" = "i386" ; then
1847 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1849 if test "$proc" = "error" ; then
1850 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1854 elif test "$proc" = "i586-i686"; then
1855 _march
="-march=i586"
1856 _mcpu
="$cpuopt=i686"
1859 _march
="-march=$proc"
1860 _mcpu
="$cpuopt=$proc"
1863 else # if test "$_runtime_cpudetection" = no
1864 _mcpu
="$cpuopt=generic"
1865 # at least i486 required, for bswap instruction
1866 _march
="-march=i486"
1867 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1868 cc_check
$_mcpu || _mcpu
=""
1869 cc_check
$_march $_mcpu || _march
=""
1872 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1873 ## autodetected mcpu/march parameters
1874 if test "$_target" ; then
1875 # TODO: it may be a good idea to check GCC and fall back in all cases
1876 if test "$host_arch" = "i586-i686"; then
1877 _march
="-march=i586"
1878 _mcpu
="$cpuopt=i686"
1880 _march
="-march=$host_arch"
1881 _mcpu
="$cpuopt=$host_arch"
1889 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1890 i686|athlon
*|pentium
*) iproc
=686 ;;
1895 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1906 _target_arch
='ARCH_IA64 = yes'
1907 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1913 _target_subarch
='ARCH_X86_64 = yes'
1914 _target_arch
="ARCH_X86 = yes"
1915 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1916 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1919 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1920 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1925 if test "$_runtime_cpudetection" = no
; then
1933 # 64-bit prescotts exist, but as far as GCC is concerned they
1934 # have the same capabilities as a nocona.
1936 test $_fast_cmov = "auto" && _fast_cmov
=no
1943 fi # test "$_runtime_cpudetection" = no
1945 echocheck
"GCC & CPU optimization abilities"
1947 int main(void) { return 0; }
1949 # This is a stripped-down version of the i386 fallback.
1950 if test "$_runtime_cpudetection" = no
; then
1951 cc_check
-march=native
&& proc
=native
1952 # --- AMD processors ---
1953 if test "$proc" = "k8"; then
1954 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1956 # This will fail if gcc version < 3.3, which is ok because earlier
1957 # versions don't really support 64-bit on amd64.
1958 # Is this a valid assumption? -Corey
1959 if test "$proc" = "athlon-xp"; then
1960 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1962 # --- Intel processors ---
1963 if test "$proc" = "core2"; then
1964 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1966 if test "$proc" = "x86-64"; then
1967 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1969 if test "$proc" = "nocona"; then
1970 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1972 if test "$proc" = "pentium4"; then
1973 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1976 _march
="-march=$proc"
1977 _mcpu
="$cpuopt=$proc"
1978 if test "$proc" = "error" ; then
1979 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1983 else # if test "$_runtime_cpudetection" = no
1984 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1985 _march
="-march=x86-64"
1986 _mcpu
="$cpuopt=generic"
1987 cc_check
$_mcpu || _mcpu
="x86-64"
1988 cc_check
$_mcpu || _mcpu
=""
1989 cc_check
$_march $_mcpu || _march
=""
1993 test $_fast_cmov = "auto" && _fast_cmov
=yes
2000 _target_arch
='ARCH_SPARC = yes'
2002 if test "$host_arch" = "sparc64" ; then
2005 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2007 echocheck
"CPU type"
2009 case "$(echo $karch)" in
2014 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2026 arm|armv4l|armv5tel
)
2028 _target_arch
='ARCH_ARM = yes'
2034 _target_arch
='ARCH_AVR32 = yes'
2035 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2041 _target_arch
='ARCH_SH4 = yes'
2045 ppc|ppc64|powerpc|powerpc64
)
2047 def_dcbzl
='#define HAVE_DCBZL 0'
2048 _target_arch
='ARCH_PPC = yes'
2049 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2052 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2054 _target_subarch
='ARCH_PPC64 = yes'
2055 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2057 echocheck
"CPU type"
2058 case $system_name in
2060 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2061 if test -n "$($_cpuinfo | grep altivec)"; then
2062 test $_altivec = auto
&& _altivec
=yes
2066 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2067 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2068 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2069 test $_altivec = auto
&& _altivec
=yes
2073 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2075 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2078 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2079 test $_altivec = auto
&& _altivec
=yes
2085 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2088 if test "$_altivec" = yes; then
2089 echores
"$proc altivec"
2095 echocheck
"GCC & CPU optimization abilities"
2097 if test -n "$proc"; then
2099 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2100 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2101 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2102 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2103 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2104 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2105 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2106 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2107 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2110 # gcc 3.1(.1) and up supports 7400 and 7450
2111 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2113 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2114 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2118 # gcc 3.2 and up supports 970
2119 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2121 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2122 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2126 # gcc 3.3 and up supports POWER4
2127 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2129 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2133 # gcc 3.4 and up supports 440*
2134 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2136 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2137 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2141 # gcc 4.0 and up supports POWER5
2142 if test "$_cc_major" -ge "4"; then
2144 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2150 if test -n "$_mcpu"; then
2151 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2152 echores
"$_optimizing"
2161 _target_arch
='ARCH_ALPHA = yes'
2163 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2165 echocheck
"CPU type"
2168 unsigned long ver, mask;
2169 __asm__ ("implver %0" : "=r" (ver));
2170 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2171 printf("%ld-%x\n", ver, ~mask);
2175 $_cc -o "$TMPEXE" "$TMPC"
2176 case $
("$TMPEXE") in
2178 0-0) proc
="ev4"; _mvi
="0";;
2179 1-0) proc
="ev5"; _mvi
="0";;
2180 1-1) proc
="ev56"; _mvi
="0";;
2181 1-101) proc
="pca56"; _mvi
="1";;
2182 2-303) proc
="ev6"; _mvi
="1";;
2183 2-307) proc
="ev67"; _mvi
="1";;
2184 2-1307) proc
="ev68"; _mvi
="1";;
2188 echocheck
"GCC & CPU optimization abilities"
2189 if test "$proc" = "ev68" ; then
2190 cc_check
-mcpu=$proc || proc
=ev67
2192 if test "$proc" = "ev67" ; then
2193 cc_check
-mcpu=$proc || proc
=ev6
2203 _target_arch
='ARCH_SGI_MIPS = yes'
2207 echocheck
"CPU type"
2208 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2209 case "$(echo $proc)" in
2210 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2211 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2212 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2213 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2214 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2215 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2217 # gcc < 3.x does not support -mtune.
2218 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2228 _target_arch
='ARCH_PA_RISC = yes'
2234 _target_arch
='ARCH_S390 = yes'
2240 _target_arch
='ARCH_S390X = yes'
2246 _target_arch
='ARCH_VAX = yes'
2252 _target_arch
='ARCH_XTENSA = yes'
2258 _target_arch
='ARCH_GENERIC = yes'
2262 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2263 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2264 die
"unsupported architecture $host_arch"
2266 esac # case "$host_arch" in
2268 if test "$_runtime_cpudetection" = yes ; then
2270 test "$_cmov" != no
&& _cmov
=yes
2272 test "$_mmx" != no
&& _mmx
=yes
2273 test "$_3dnow" != no
&& _3dnow
=yes
2274 test "$_3dnowext" != no
&& _3dnowext
=yes
2275 test "$_mmxext" != no
&& _mmxext
=yes
2276 test "$_sse" != no
&& _sse
=yes
2277 test "$_sse2" != no
&& _sse2
=yes
2278 test "$_ssse3" != no
&& _ssse3
=yes
2279 test "$_mtrr" != no
&& _mtrr
=yes
2288 echocheck
"byte order"
2289 if test "$_big_endian" = auto
; then
2291 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2292 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2293 int main(void) { return (int)ascii_name; }
2296 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2302 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2305 if test "$_big_endian" = yes ; then
2306 _byte_order
='big-endian'
2307 def_words_endian
='#define WORDS_BIGENDIAN 1'
2308 def_bigendian
='#define HAVE_BIGENDIAN 1'
2310 _byte_order
='little-endian'
2311 def_words_endian
='#undef WORDS_BIGENDIAN'
2312 def_bigendian
='#define HAVE_BIGENDIAN 0'
2314 echores
"$_byte_order"
2317 echocheck
"extern symbol prefix"
2321 cc_check
-c || die
"Symbol mangling check failed."
2322 sym
=$
($_nm -P -g $TMPEXE)
2323 extern_prefix
=${sym%%ff_extern*}
2324 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2325 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2326 echores
$extern_prefix
2329 echocheck
"assembler support of -pipe option"
2331 int main(void) { return 0; }
2333 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2334 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2337 echocheck
"compiler support of named assembler arguments"
2339 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2340 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2341 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2343 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2345 echores
$_named_asm_args
2348 if darwin
&& test "$cc_vendor" = "gnu" ; then
2349 echocheck
"GCC support of -mstackrealign"
2350 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2351 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2352 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2353 # wrong code with this flag, but this can be worked around by adding
2354 # -fno-unit-at-a-time as described in the blog post at
2355 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2357 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2358 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2360 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2361 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2362 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2363 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2364 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2367 # Checking for CFLAGS
2369 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2370 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2372 elif test -z "$CFLAGS" ; then
2373 if test "$cc_vendor" = "intel" ; then
2374 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2375 elif test "$cc_vendor" = "sun" ; then
2376 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2377 elif test "$cc_vendor" != "gnu" ; then
2378 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2380 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2381 extra_ldflags
="$extra_ldflags -ffast-math"
2388 int main(void) { return 0; }
2390 if test "$cc_vendor" = "gnu" ; then
2391 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2392 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2393 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2394 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2396 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2399 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2402 if test -n "$LDFLAGS" ; then
2403 extra_ldflags
="$extra_ldflags $LDFLAGS"
2405 elif test "$cc_vendor" = "intel" ; then
2406 extra_ldflags
="$extra_ldflags -i-static"
2408 if test -n "$CPPFLAGS" ; then
2409 extra_cflags
="$extra_cflags $CPPFLAGS"
2416 # Checking assembler (_as) compatibility...
2417 # Added workaround for older as that reads from stdin by default - atmos
2418 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2419 echocheck
"assembler ($_as $as_version)"
2421 _pref_as_version
='2.9.1'
2423 if test "$_mmx" = yes ; then
2424 echo 'emms' >> $TMPS
2426 if test "$_3dnow" = yes ; then
2427 _pref_as_version
='2.10.1'
2428 echo 'femms' >> $TMPS
2430 if test "$_3dnowext" = yes ; then
2431 _pref_as_version
='2.10.1'
2432 echo 'pswapd %mm0, %mm0' >> $TMPS
2434 if test "$_mmxext" = yes ; then
2435 _pref_as_version
='2.10.1'
2436 echo 'movntq %mm0, (%eax)' >> $TMPS
2438 if test "$_sse" = yes ; then
2439 _pref_as_version
='2.10.1'
2440 echo 'xorps %xmm0, %xmm0' >> $TMPS
2442 #if test "$_sse2" = yes ; then
2443 # _pref_as_version='2.11'
2444 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2446 if test "$_cmov" = yes ; then
2447 _pref_as_version
='2.10.1'
2448 echo 'cmovb %eax, %ebx' >> $TMPS
2450 if test "$_ssse3" = yes ; then
2451 _pref_as_version
='2.16.92'
2452 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2454 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2456 if test "$as_verc_fail" != yes ; then
2459 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2461 die
"obsolete binutils version"
2466 echocheck
".align is a power of two"
2467 if test "$_asmalign_pot" = auto
; then
2470 int main(void) { __asm__ (".align 3"); return 0; }
2472 cc_check
&& _asmalign_pot
=yes
2474 if test "$_asmalign_pot" = "yes" ; then
2475 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2477 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2479 echores
$_asmalign_pot
2482 echocheck
"10 assembler operands"
2484 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2490 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2495 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2496 echores
$ten_operands
2498 echocheck
"ebx availability"
2500 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2507 // just adding ebx to clobber list seems unreliable with some
2508 // compilers, e.g. Haiku's gcc 2.95
2510 // and the above check does not work for OSX 64 bit...
2511 __asm__ volatile("":::"%ebx");
2515 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2516 echores
$ebx_available
2522 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2523 #error PIC not enabled
2528 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2532 if test -z "$YASMFLAGS" ; then
2534 x86_64
&& objformat
="macho64" || objformat
="macho"
2540 # currently tested for Linux x86, x86_64
2541 YASMFLAGS
="-f $objformat"
2542 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2543 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2544 case "$objformat" in
2545 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2546 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2552 echo "pabsw xmm0, xmm0" > $TMPS
2553 yasm_check || _yasm
=""
2554 if test $_yasm ; then
2555 test "$_mmx" = "yes" && fft_mmx
="yes"
2556 def_yasm
='#define HAVE_YASM 1'
2560 def_yasm
='#define HAVE_YASM 0'
2567 def_bswap
='#define HAVE_BSWAP 0'
2568 echo 'bswap %eax' > $TMPS
2569 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2574 #FIXME: This should happen before the check for CFLAGS..
2575 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2576 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2578 # check if AltiVec is supported by the compiler, and how to enable it
2579 echocheck
"GCC AltiVec flags"
2581 int main(void) { return 0; }
2583 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2584 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2585 # check if <altivec.h> should be included
2587 #include <altivec.h>
2588 int main(void) { return 0; }
2590 if $
(cc_check
$_altivec_gcc_flags) ; then
2591 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2592 inc_altivec_h
='#include <altivec.h>'
2595 int main(void) { return 0; }
2597 if $
(cc_check
-faltivec) ; then
2598 _altivec_gcc_flags
="-faltivec"
2601 _altivec_gcc_flags
="none, AltiVec disabled"
2605 echores
"$_altivec_gcc_flags"
2607 # check if the compiler supports braces for vector declarations
2610 int main(void) { (vector int) {1}; return 0; }
2612 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2614 # Disable runtime cpudetection if we cannot generate AltiVec code or
2615 # AltiVec is disabled by the user.
2616 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2617 && _runtime_cpudetection
=no
2619 # Show that we are optimizing for AltiVec (if enabled and supported).
2620 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2621 && _optimizing
="$_optimizing altivec"
2623 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2624 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2628 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2630 echocheck
"XFORM ASM support"
2632 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2634 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2635 echores
"$xform_asm"
2639 echocheck
"ARM pld instruction"
2641 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2647 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2648 if test $_armv5te = "auto" ; then
2650 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2653 cc_check
&& _armv5te
=yes
2657 echocheck
"ARMv6 (SIMD instructions)"
2658 if test $_armv6 = "auto" ; then
2660 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2663 cc_check
&& _armv6
=yes
2667 echocheck
"ARMv6t2 (SIMD instructions)"
2668 if test $_armv6t2 = "auto" ; then
2670 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2673 cc_check
&& _armv6t2
=yes
2678 if test $_armvfp = "auto" ; then
2680 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2683 cc_check
&& _armvfp
=yes
2687 echocheck
"ARM NEON"
2688 if test $neon = "auto" ; then
2690 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2693 cc_check
&& neon
=yes
2697 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2698 if test $_iwmmxt = "auto" ; then
2700 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2703 cc_check
&& _iwmmxt
=yes
2708 _cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2709 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2710 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2711 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2712 test "$_3dnow" = yes && _cpuexts
="AMD3DNOW $_cpuexts"
2713 test "$_3dnowext" = yes && _cpuexts
="AMD3DNOWEXT $_cpuexts"
2714 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2715 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2716 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2717 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2718 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2719 test "$pld" = yes && _cpuexts
="PLD $_cpuexts"
2720 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2721 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2722 test "$_armv6t2" = yes && _cpuexts
="ARMV6T2 $_cpuexts"
2723 test "$_armvfp" = yes && _cpuexts
="ARMVFP $_cpuexts"
2724 test "$neon" = yes && _cpuexts
="NEON $_cpuexts"
2725 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2726 test "$_vis" = yes && _cpuexts
="VIS $_cpuexts"
2727 test "$_mvi" = yes && _cpuexts
="MVI $_cpuexts"
2729 # Checking kernel version...
2730 if x86_32
&& linux
; then
2732 kernel_version
=$
(uname
-r 2>&1)
2733 echocheck
"$system_name kernel version"
2734 case "$kernel_version" in
2735 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2736 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2737 _k_verc_problem
=yes;;
2739 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2742 if test "$_k_verc_fail" ; then
2743 echores
"$kernel_version, fail"
2744 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2745 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2746 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2747 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2748 echo "2.2.x you must upgrade it to get SSE support!"
2749 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2751 echores
"$kernel_version, ok"
2755 ######################
2756 # MAIN TESTS GO HERE #
2757 ######################
2762 int main(void) { return 0; }
2764 if cc_check
-lposix ; then
2765 extra_ldflags
="$extra_ldflags -lposix"
2773 int main(void) { return 0; }
2775 if cc_check
-lm ; then
2784 echocheck
"langinfo"
2785 if test "$_langinfo" = auto
; then
2787 #include <langinfo.h>
2788 int main(void) { nl_langinfo(CODESET); return 0; }
2791 cc_check
&& _langinfo
=yes
2793 if test "$_langinfo" = yes ; then
2794 def_langinfo
='#define HAVE_LANGINFO 1'
2796 def_langinfo
='#undef HAVE_LANGINFO'
2798 echores
"$_langinfo"
2801 echocheck
"language"
2802 # Set preferred languages, "all" uses English as main language.
2803 test -z "$language" && language
=$LINGUAS
2804 test -z "$language_doc" && language_doc
=$language
2805 test -z "$language_man" && language_man
=$language
2806 test -z "$language_msg" && language_msg
=$language
2807 language_doc
=$
(echo $language_doc |
tr , " ")
2808 language_man
=$
(echo $language_man |
tr , " ")
2809 language_msg
=$
(echo $language_msg |
tr , " ")
2811 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2812 test "$language_man" = "all" && language_man
=$man_lang_all
2813 test "$language_msg" = "all" && language_msg
=en
2815 # Prune non-existing translations from language lists.
2816 # Set message translation to the first available language.
2817 # Fall back on English.
2818 for lang
in $language_doc ; do
2819 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2821 language_doc
=$tmp_language_doc
2822 test -z "$language_doc" && language_doc
=en
2824 for lang
in $language_man ; do
2825 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2827 language_man
=$tmp_language_man
2828 test -z "$language_man" && language_man
=en
2830 for lang
in $language_msg ; do
2831 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2833 language_msg
=$tmp_language_msg
2834 test -z "$language_msg" && language_msg
=en
2835 _mp_help
="help/help_mp-${language_msg}.h"
2836 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2839 echocheck
"enable sighandler"
2840 if test "$_sighandler" = yes ; then
2841 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2843 def_sighandler
='#undef CONFIG_SIGHANDLER'
2845 echores
"$_sighandler"
2847 echocheck
"runtime cpudetection"
2848 if test "$_runtime_cpudetection" = yes ; then
2849 _optimizing
="Runtime CPU-Detection enabled"
2850 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2852 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2854 echores
"$_runtime_cpudetection"
2857 echocheck
"restrict keyword"
2858 for restrict_keyword
in restrict __restrict __restrict__
; do
2859 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2861 def_restrict_keyword
=$restrict_keyword
2865 if [ -n "$def_restrict_keyword" ]; then
2866 echores
"$def_restrict_keyword"
2870 # Avoid infinite recursion loop ("#define restrict restrict")
2871 if [ "$def_restrict_keyword" != "restrict" ]; then
2872 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2874 def_restrict_keyword
=""
2878 echocheck
"__builtin_expect"
2879 # GCC branch prediction hint
2882 a = __builtin_expect(a, 10);
2883 return a == 10 ? 0 : 1;
2885 int main(void) { return foo(10) && foo(0); }
2888 cc_check
&& _builtin_expect
=yes
2889 if test "$_builtin_expect" = yes ; then
2890 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2892 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2894 echores
"$_builtin_expect"
2900 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2903 cc_check
-lkstat && _kstat
=yes
2904 if test "$_kstat" = yes ; then
2905 def_kstat
="#define HAVE_LIBKSTAT 1"
2906 extra_ldflags
="$extra_ldflags -lkstat"
2908 def_kstat
="#undef HAVE_LIBKSTAT"
2914 # required for nanosleep on some systems
2917 int main(void) { (void) nanosleep(0, 0); return 0; }
2920 cc_check
-lposix4 && _posix4
=yes
2921 if test "$_posix4" = yes ; then
2922 extra_ldflags
="$extra_ldflags -lposix4"
2926 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2930 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
2933 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2934 if eval test "x\$_$func" = "xyes"; then
2935 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2938 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2947 int main(void) { char a; mkstemp(&a); return 0; }
2950 cc_check
&& _mkstemp
=yes
2951 if test "$_mkstemp" = yes ; then
2952 def_mkstemp
='#define HAVE_MKSTEMP 1'
2954 def_mkstemp
='#undef HAVE_MKSTEMP'
2959 echocheck
"nanosleep"
2960 # also check for nanosleep
2963 int main(void) { (void) nanosleep(0, 0); return 0; }
2966 cc_check
&& _nanosleep
=yes
2967 if test "$_nanosleep" = yes ; then
2968 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2970 def_nanosleep
='#undef HAVE_NANOSLEEP'
2972 echores
"$_nanosleep"
2976 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2977 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2980 #include <sys/socket.h>
2981 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2984 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2985 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2987 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2988 if test $_winsock2_h = auto
; then
2991 #include <winsock2.h>
2992 int main(void) { (void) gethostbyname(0); return 0; }
2994 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2996 test "$_ld_sock" && _res_comment
="using $_ld_sock"
3000 if test $_winsock2_h = yes ; then
3002 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3004 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3008 echocheck
"arpa/inet.h"
3010 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3012 #include <arpa/inet.h>
3013 int main(void) { return 0; }
3015 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3016 echores
"$arpa_inet_h"
3019 echocheck
"inet_pton()"
3020 def_inet_pton
='#define HAVE_INET_PTON 0'
3023 #include <sys/types.h>
3024 #include <sys/socket.h>
3025 #include <arpa/inet.h>
3026 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3028 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3029 cc_check
$_ld_tmp && inet_pton
=yes && break
3031 if test $inet_pton = yes ; then
3032 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3033 def_inet_pton
='#define HAVE_INET_PTON 1'
3035 echores
"$inet_pton"
3038 echocheck
"inet_aton()"
3039 def_inet_aton
='#define HAVE_INET_ATON 0'
3042 #include <sys/types.h>
3043 #include <sys/socket.h>
3044 #include <arpa/inet.h>
3045 int main(void) { (void) inet_aton(0, 0); return 0; }
3047 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3048 cc_check
$_ld_tmp && inet_aton
=yes && break
3050 if test $inet_aton = yes ; then
3051 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3052 def_inet_aton
='#define HAVE_INET_ATON 1'
3054 echores
"$inet_aton"
3057 echocheck
"socklen_t"
3059 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3062 int main(void) { socklen_t v = 0; return v; }
3064 cc_check
&& _socklen_t
=yes && break
3066 if test "$_socklen_t" = yes ; then
3067 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3069 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3071 echores
"$_socklen_t"
3074 echocheck
"closesocket()"
3077 #include <winsock2.h>
3078 int main(void) { closesocket(~0); return 0; }
3080 cc_check
$_ld_sock && _closesocket
=yes
3081 if test "$_closesocket" = yes ; then
3082 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3084 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3086 echores
"$_closesocket"
3090 test $_winsock2_h = no
&& test $inet_pton = no
&&
3091 test $inet_aton = no
&& _network
=no
3092 if test "$_network" = yes ; then
3093 def_network
='#define CONFIG_NETWORK 1'
3094 extra_ldflags
="$extra_ldflags $_ld_sock"
3095 _inputmodules
="network $_inputmodules"
3097 _noinputmodules
="network $_noinputmodules"
3098 def_network
='#undef CONFIG_NETWORK'
3105 if test "$_inet6" = auto
; then
3107 #include <sys/types.h>
3108 #if !defined(_WIN32) || defined(__CYGWIN__)
3109 #include <sys/socket.h>
3110 #include <netinet/in.h>
3112 #include <ws2tcpip.h>
3114 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3117 if cc_check
$_ld_sock ; then
3121 if test "$_inet6" = yes ; then
3122 def_inet6
='#define HAVE_AF_INET6 1'
3124 def_inet6
='#undef HAVE_AF_INET6'
3129 echocheck
"gethostbyname2"
3130 if test "$_gethostbyname2" = auto
; then
3132 #include <sys/types.h>
3133 #include <sys/socket.h>
3135 int main(void) { gethostbyname2("", AF_INET); return 0; }
3142 if test "$_gethostbyname2" = yes ; then
3143 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3145 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3147 echores
"$_gethostbyname2"
3150 echocheck
"inttypes.h (required)"
3152 #include <inttypes.h>
3153 int main(void) { return 0; }
3156 cc_check
&& _inttypes
=yes
3157 echores
"$_inttypes"
3159 if test "$_inttypes" = no
; then
3160 echocheck
"bitypes.h (inttypes.h predecessor)"
3162 #include <sys/bitypes.h>
3163 int main(void) { return 0; }
3165 cc_check
&& _inttypes
=yes
3166 if test "$_inttypes" = yes ; then
3167 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."
3169 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3174 echocheck
"int_fastXY_t in inttypes.h"
3176 #include <inttypes.h>
3178 volatile int_fast16_t v= 0;
3182 cc_check
&& _fast_inttypes
=yes
3183 if test "$_fast_inttypes" = no
; then
3185 typedef signed char int_fast8_t;
3186 typedef signed int int_fast16_t;
3187 typedef signed int int_fast32_t;
3188 typedef signed long long int_fast64_t;
3189 typedef unsigned char uint_fast8_t;
3190 typedef unsigned int uint_fast16_t;
3191 typedef unsigned int uint_fast32_t;
3192 typedef unsigned long long uint_fast64_t;'
3194 echores
"$_fast_inttypes"
3197 echocheck
"malloc.h"
3200 int main(void) { (void) malloc(0); return 0; }
3203 cc_check
&& _malloc
=yes
3204 if test "$_malloc" = yes ; then
3205 def_malloc_h
='#define HAVE_MALLOC_H 1'
3207 def_malloc_h
='#define HAVE_MALLOC_H 0'
3209 # malloc.h emits a warning in FreeBSD and OpenBSD
3210 freebsd || openbsd || dragonfly
&& def_malloc_h
='#define HAVE_MALLOC_H 0'
3214 echocheck
"memalign()"
3215 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3216 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3219 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3222 cc_check
&& _memalign
=yes
3223 if test "$_memalign" = yes ; then
3224 def_memalign
='#define HAVE_MEMALIGN 1'
3226 def_memalign
='#define HAVE_MEMALIGN 0'
3227 def_map_memalign
='#define memalign(a,b) malloc(b)'
3228 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3230 echores
"$_memalign"
3233 echocheck
"posix_memalign()"
3235 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3237 #define _XOPEN_SOURCE 600
3239 int main(void) { posix_memalign(NULL, 0, 0); }
3241 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3242 echores
"$posix_memalign"
3245 echocheck
"alloca.h"
3248 int main(void) { (void) alloca(0); return 0; }
3251 cc_check
&& _alloca
=yes
3253 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3255 def_alloca_h
='#undef HAVE_ALLOCA_H'
3260 echocheck
"fastmemcpy"
3261 if test "$_fastmemcpy" = yes ; then
3262 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3264 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3266 echores
"$_fastmemcpy"
3271 #include <sys/types.h>
3272 #include <sys/mman.h>
3273 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3276 cc_check
&& _mman
=yes
3277 if test "$_mman" = yes ; then
3278 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3280 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3281 os2
&& _need_mmap
=yes
3286 #include <sys/types.h>
3287 #include <sys/mman.h>
3288 int main(void) { void *p = MAP_FAILED; return 0; }
3290 _mman_has_map_failed
=no
3291 cc_check
&& _mman_has_map_failed
=yes
3292 if test "$_mman_has_map_failed" = yes ; then
3293 def_mman_has_map_failed
=''
3295 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3298 echocheck
"dynamic loader"
3302 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3305 for _ld_tmp
in "" "-ldl" ; do
3306 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3308 if test "$_dl" = yes ; then
3309 def_dl
='#define HAVE_LIBDL 1'
3311 def_dl
='#undef HAVE_LIBDL'
3316 echocheck
"dynamic a/v plugins support"
3317 if test "$_dl" = no
; then
3320 if test "$_dynamic_plugins" = yes ; then
3321 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3323 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3325 echores
"$_dynamic_plugins"
3328 def_threads
='#define HAVE_THREADS 0'
3332 THREAD_CFLAGS
=-D_REENTRANT
3333 elif freebsd || netbsd || openbsd || bsdos
; then
3334 THREAD_CFLAGS
=-D_THREAD_SAFE
3336 if test "$_pthreads" = auto
; then
3338 #include <pthread.h>
3339 void* func(void *arg) { return arg; }
3340 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3344 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3345 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3346 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3350 if test "$_pthreads" = yes ; then
3351 test $_ld_pthread && _res_comment
="using $_ld_pthread"
3352 def_pthreads
='#define HAVE_PTHREADS 1'
3353 def_threads
='#define HAVE_THREADS 1'
3354 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3356 _res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3357 def_pthreads
='#undef HAVE_PTHREADS'
3358 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3359 mingw32 || _win32dll
=no
3361 echores
"$_pthreads"
3364 if test "$_pthreads" = yes ; then
3365 def_pthread_cache
="#define PTHREAD_CACHE 1"
3368 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3372 echocheck
"w32threads"
3373 if test "$_pthreads" = yes ; then
3374 _res_comment
="using pthread instead"
3377 if test "$_w32threads" = auto
; then
3379 mingw32
&& _w32threads
=yes
3381 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3382 echores
"$_w32threads"
3386 if test "$_rpath" = yes ; then
3387 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3388 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3395 if test "$_iconv" = auto
; then
3400 #define INBUFSIZE 1024
3401 #define OUTBUFSIZE 4096
3403 char inbuffer[INBUFSIZE];
3404 char outbuffer[OUTBUFSIZE];
3409 char *tocode="UTF-8";
3410 char *fromcode="cp1250";
3411 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3412 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3413 char *iptr=inbuffer;
3414 char *optr=outbuffer;
3415 size_t inleft=numread;
3416 size_t outleft=OUTBUFSIZE;
3417 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3419 write(1, outbuffer, OUTBUFSIZE - outleft);
3422 if (iconv_close(icdsc) == -1)
3429 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3430 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3434 if test "$_iconv" = yes ; then
3435 def_iconv
='#define CONFIG_ICONV 1'
3437 def_iconv
='#undef CONFIG_ICONV'
3442 echocheck
"soundcard.h"
3444 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3445 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3446 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3448 #include <$_soundcard_header>
3449 int main(void) { return 0; }
3451 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3454 if test "$_soundcard_h" = yes ; then
3455 if test $_soundcard_header = "sys/soundcard.h"; then
3456 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3458 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3461 echores
"$_soundcard_h"
3464 echocheck
"sys/dvdio.h"
3467 #include <sys/dvdio.h>
3468 int main(void) { return 0; }
3471 cc_check
&& _dvdio
=yes
3472 if test "$_dvdio" = yes ; then
3473 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3475 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3480 echocheck
"sys/cdio.h"
3483 #include <sys/cdio.h>
3484 int main(void) { return 0; }
3487 cc_check
&& _cdio
=yes
3488 if test "$_cdio" = yes ; then
3489 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3491 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3496 echocheck
"linux/cdrom.h"
3498 #include <sys/types.h>
3499 #include <linux/cdrom.h>
3500 int main(void) { return 0; }
3503 cc_check
&& _cdrom
=yes
3504 if test "$_cdrom" = yes ; then
3505 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3507 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3515 int main(void) { return 0; }
3518 cc_check
&& _dvd
=yes
3519 if test "$_dvd" = yes ; then
3520 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3522 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3528 echocheck
"BSDI dvd.h"
3531 int main(void) { return 0; }
3534 cc_check
&& _bsdi_dvd
=yes
3535 if test "$_bsdi_dvd" = yes ; then
3536 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3538 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3540 echores
"$_bsdi_dvd"
3545 # also used by AIX, but AIX does not support VCD and/or libdvdread
3546 echocheck
"HP-UX SCSI header"
3548 #include <sys/scsi.h>
3549 int main(void) { return 0; }
3552 cc_check
&& _hpux_scsi_h
=yes
3553 if test "$_hpux_scsi_h" = yes ; then
3554 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3556 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3558 echores
"$_hpux_scsi_h"
3563 echocheck
"userspace SCSI headers (Solaris)"
3566 #include <stropts.h>
3567 #include <sys/scsi/scsi_types.h>
3568 #include <sys/scsi/impl/uscsi.h>
3569 int main(void) { return 0; }
3572 cc_check
&& _sol_scsi_h
=yes
3573 if test "$_sol_scsi_h" = yes ; then
3574 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3576 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3578 echores
"$_sol_scsi_h"
3583 if test "$_termcap" = auto
; then
3587 int main(void) { tgetent(NULL, NULL); return 0; }
3590 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3591 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3592 && _termcap
=yes && break
3595 if test "$_termcap" = yes ; then
3596 def_termcap
='#define HAVE_TERMCAP 1'
3597 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3599 def_termcap
='#undef HAVE_TERMCAP'
3605 def_termios
='#undef HAVE_TERMIOS'
3606 def_termios_h
='#undef HAVE_TERMIOS_H'
3607 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3608 if test "$_termios" = auto
; then
3610 for _termios_header
in "sys/termios.h" "termios.h"; do
3612 #include <$_termios_header>
3613 int main(void) { return 0; }
3615 cc_check
&& _termios
=yes && _res_comment
="using $_termios_header" && break
3619 if test "$_termios" = yes ; then
3620 def_termios
='#define HAVE_TERMIOS 1'
3621 if test "$_termios_header" = "termios.h" ; then
3622 def_termios_h
='#define HAVE_TERMIOS_H 1'
3624 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3631 if test "$_shm" = auto
; then
3633 #include <sys/types.h>
3634 #include <sys/shm.h>
3635 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3638 cc_check
&& _shm
=yes
3640 if test "$_shm" = yes ; then
3641 def_shm
='#define HAVE_SHM 1'
3643 def_shm
='#undef HAVE_SHM'
3648 echocheck
"strsep()"
3651 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3654 cc_check
&& _strsep
=yes
3655 if test "$_strsep" = yes ; then
3656 def_strsep
='#define HAVE_STRSEP 1'
3659 def_strsep
='#undef HAVE_STRSEP'
3665 echocheck
"vsscanf()"
3667 #define _ISOC99_SOURCE
3670 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3673 cc_check
&& _vsscanf
=yes
3674 if test "$_vsscanf" = yes ; then
3675 def_vsscanf
='#define HAVE_VSSCANF 1'
3678 def_vsscanf
='#undef HAVE_VSSCANF'
3686 #define _XOPEN_SOURCE 600
3688 int main(void) { swab(0, 0, 0); return 0; }
3691 cc_check
&& _swab
=yes
3692 if test "$_swab" = yes ; then
3693 def_swab
='#define HAVE_SWAB 1'
3696 def_swab
='#undef HAVE_SWAB'
3701 echocheck
"POSIX select()"
3705 #include <sys/types.h>
3707 #include <sys/time.h>
3709 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3712 def_posix_select
='#undef HAVE_POSIX_SELECT'
3713 #select() of kLIBC (OS/2) supports socket only
3714 ! os2
&& cc_check
&& _posix_select
=yes \
3715 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3716 echores
"$_posix_select"
3719 echocheck
"audio select()"
3720 if test "$_select" = no
; then
3721 def_select
='#undef HAVE_AUDIO_SELECT'
3722 elif test "$_select" = yes ; then
3723 def_select
='#define HAVE_AUDIO_SELECT 1'
3728 echocheck
"gettimeofday()"
3731 #include <sys/time.h>
3732 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3735 cc_check
&& _gettimeofday
=yes
3736 if test "$_gettimeofday" = yes ; then
3737 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3738 _need_gettimeofday
=no
3740 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3741 _need_gettimeofday
=yes
3743 echores
"$_gettimeofday"
3750 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3753 cc_check
&& _glob
=yes
3754 if test "$_glob" = yes ; then
3755 def_glob
='#define HAVE_GLOB 1'
3758 def_glob
='#undef HAVE_GLOB'
3764 echocheck
"setenv()"
3767 int main(void) { setenv("","",0); return 0; }
3770 cc_check
&& _setenv
=yes
3771 if test "$_setenv" = yes ; then
3772 def_setenv
='#define HAVE_SETENV 1'
3775 def_setenv
='#undef HAVE_SETENV'
3782 echocheck
"sysi86()"
3784 #include <sys/sysi86.h>
3785 int main(void) { sysi86(0); return 0; }
3788 cc_check
&& _sysi86
=yes
3789 if test "$_sysi86" = yes ; then
3790 def_sysi86
='#define HAVE_SYSI86 1'
3792 #include <sys/sysi86.h>
3793 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3795 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3797 def_sysi86
='#undef HAVE_SYSI86'
3803 echocheck
"sys/sysinfo.h"
3805 #include <sys/sysinfo.h>
3807 struct sysinfo s_info;
3813 cc_check
&& _sys_sysinfo
=yes
3814 if test "$_sys_sysinfo" = yes ; then
3815 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3817 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3819 echores
"$_sys_sysinfo"
3824 echocheck
"Mac OS X Finder Support"
3825 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3826 if test "$_macosx_finder" = yes ; then
3827 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3828 extra_ldflags
="$extra_ldflags -framework Carbon"
3830 echores
"$_macosx_finder"
3832 echocheck
"Mac OS X Bundle file locations"
3833 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3834 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3835 if test "$_macosx_bundle" = yes ; then
3836 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3837 extra_ldflags
="$extra_ldflags -framework Carbon"
3839 echores
"$_macosx_bundle"
3841 echocheck
"Apple Remote"
3842 if test "$_apple_remote" = auto
; then
3846 #include <IOKit/IOCFPlugIn.h>
3848 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3849 CFMutableDictionaryRef hidMatchDictionary;
3850 IOReturn ioReturnValue;
3852 // Set up a matching dictionary to search the I/O Registry by class.
3853 // name for all HID class devices
3854 hidMatchDictionary = IOServiceMatching("AppleIRController");
3856 // Now search I/O Registry for matching devices.
3857 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3858 hidMatchDictionary, &hidObjectIterator);
3860 // If search is unsuccessful, return nonzero.
3861 if (ioReturnValue != kIOReturnSuccess ||
3862 !IOIteratorIsValid(hidObjectIterator)) {
3868 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
3870 if test "$_apple_remote" = yes ; then
3871 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3872 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3874 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3876 echores
"$_apple_remote"
3882 echocheck
"Apple IR"
3883 if test "$_apple_ir" = auto
; then
3886 #include <linux/types.h>
3887 #include <linux/input.h>
3889 struct input_event ev;
3894 cc_check
&& _apple_ir
=yes
3896 if test "$_apple_ir" = yes ; then
3897 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3899 def_apple_ir
='#undef CONFIG_APPLE_IR'
3901 echores
"$_apple_ir"
3904 echocheck
"pkg-config"
3905 _pkg_config
=pkg-config
3906 if $
($_pkg_config --version > /dev
/null
2>&1); then
3907 if test "$_ld_static"; then
3908 _pkg_config
="$_pkg_config --static"
3917 echocheck
"Samba support (libsmbclient)"
3918 if test "$_smb" = yes; then
3919 extra_ldflags
="$extra_ldflags -lsmbclient"
3921 if test "$_smb" = auto
; then
3924 #include <libsmbclient.h>
3925 int main(void) { smbc_opendir("smb://"); return 0; }
3927 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3928 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3933 if test "$_smb" = yes; then
3934 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3935 _inputmodules
="smb $_inputmodules"
3937 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3938 _noinputmodules
="smb $_noinputmodules"
3949 if test "$_tdfxfb" = yes ; then
3950 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3951 _vomodules
="tdfxfb $_vomodules"
3953 def_tdfxfb
='#undef CONFIG_TDFXFB'
3954 _novomodules
="tdfxfb $_novomodules"
3959 if test "$_s3fb" = yes ; then
3960 def_s3fb
='#define CONFIG_S3FB 1'
3961 _vomodules
="s3fb $_vomodules"
3963 def_s3fb
='#undef CONFIG_S3FB'
3964 _novomodules
="s3fb $_novomodules"
3969 if test "$_wii" = yes ; then
3970 def_wii
='#define CONFIG_WII 1'
3971 _vomodules
="wii $_vomodules"
3973 def_wii
='#undef CONFIG_WII'
3974 _novomodules
="wii $_novomodules"
3979 if test "$_tdfxvid" = yes ; then
3980 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3981 _vomodules
="tdfx_vid $_vomodules"
3983 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3984 _novomodules
="tdfx_vid $_novomodules"
3989 if test "$_xvr100" = auto
; then
3992 #include <sys/fbio.h>
3993 #include <sys/visual_io.h>
3995 struct vis_identifier ident;
3996 struct fbgattr attr;
3997 ioctl(0, VIS_GETIDENTIFIER, &ident);
3998 ioctl(0, FBIOGATTR, &attr);
4003 cc_check
&& _xvr100
=yes
4005 if test "$_xvr100" = yes ; then
4006 def_xvr100
='#define CONFIG_XVR100 1'
4007 _vomodules
="xvr100 $_vomodules"
4009 def_tdfxvid
='#undef CONFIG_XVR100'
4010 _novomodules
="xvr100 $_novomodules"
4015 if test "$_tga" = yes ; then
4016 def_tga
='#define CONFIG_TGA 1'
4017 _vomodules
="tga $_vomodules"
4019 def_tga
='#undef CONFIG_TGA'
4020 _novomodules
="tga $_novomodules"
4025 echocheck
"md5sum support"
4026 if test "$_md5sum" = yes; then
4027 def_md5sum
="#define CONFIG_MD5SUM 1"
4028 _vomodules
="md5sum $_vomodules"
4030 def_md5sum
="#undef CONFIG_MD5SUM"
4031 _novomodules
="md5sum $_novomodules"
4036 echocheck
"yuv4mpeg support"
4037 if test "$_yuv4mpeg" = yes; then
4038 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4039 _vomodules
="yuv4mpeg $_vomodules"
4041 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4042 _novomodules
="yuv4mpeg $_novomodules"
4044 echores
"$_yuv4mpeg"
4048 if test "$_bl" = yes ; then
4049 def_bl
='#define CONFIG_BL 1'
4050 _vomodules
="bl $_vomodules"
4052 def_bl
='#undef CONFIG_BL'
4053 _novomodules
="bl $_novomodules"
4058 echocheck
"DirectFB"
4059 if test "$_directfb" = auto
; then
4062 #include <directfb.h>
4063 int main(void) { DirectFBInit(0, 0); return 0; }
4065 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4066 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4067 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4068 extra_cflags
="$extra_cflags $_inc_tmp" && break
4073 expr $1 \
* 65536 + $2 \
* 256 + $3
4076 if test "$_directfb" = yes; then
4078 #include <directfb_version.h>
4080 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4083 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4084 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4085 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4086 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4087 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4088 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4089 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4090 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4091 _res_comment
="$_directfb_version"
4092 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4094 def_directfb_version
='#undef DIRECTFBVERSION'
4096 _res_comment
="version >=0.9.13 required"
4100 _res_comment
="failed to get version"
4103 echores
"$_directfb"
4105 if test "$_directfb" = yes ; then
4106 def_directfb
='#define CONFIG_DIRECTFB 1'
4107 _vomodules
="directfb $_vomodules"
4108 libs_mplayer
="$libs_mplayer -ldirectfb"
4110 def_directfb
='#undef CONFIG_DIRECTFB'
4111 _novomodules
="directfb $_novomodules"
4113 if test "$_dfbmga" = yes; then
4114 _vomodules
="dfbmga $_vomodules"
4115 def_dfbmga
='#define CONFIG_DFBMGA 1'
4117 _novomodules
="dfbmga $_novomodules"
4118 def_dfbmga
='#undef CONFIG_DFBMGA'
4122 echocheck
"X11 headers presence"
4124 _res_comment
="check if the dev(el) packages are installed"
4125 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4126 if test -f "$I/X11/Xlib.h" ; then
4132 if test $_cross_compile = no
; then
4133 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4134 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4135 if test -f "$I/X11/Xlib.h" ; then
4136 extra_cflags
="$extra_cflags -I$I"
4138 _res_comment
="using $I"
4143 echores
"$_x11_headers"
4147 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4149 #include <X11/Xlib.h>
4150 #include <X11/Xutil.h>
4151 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4153 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4154 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4157 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4159 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4161 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4162 && _x11
=yes && break
4165 if test "$_x11" = yes ; then
4166 def_x11
='#define CONFIG_X11 1'
4167 _vomodules
="x11 xover $_vomodules"
4170 def_x11
='#undef CONFIG_X11'
4171 _novomodules
="x11 $_novomodules"
4172 _res_comment
="check if the dev(el) packages are installed"
4173 # disable stuff that depends on X
4174 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4178 echocheck
"Xss screensaver extensions"
4179 if test "$_xss" = auto
; then
4181 #include <X11/Xlib.h>
4182 #include <X11/extensions/scrnsaver.h>
4183 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4186 cc_check
-lXss && _xss
=yes
4188 if test "$_xss" = yes ; then
4189 def_xss
='#define CONFIG_XSS 1'
4190 libs_mplayer
="$libs_mplayer -lXss"
4192 def_xss
='#undef CONFIG_XSS'
4199 if test "$_x11" = yes ; then
4201 #include <X11/Xmd.h>
4202 #include <X11/Xlib.h>
4203 #include <X11/Xutil.h>
4204 #include <X11/Xatom.h>
4205 #include <X11/extensions/dpms.h>
4206 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4208 cc_check
-lXdpms && _xdpms3
=yes
4210 #include <X11/Xlib.h>
4211 #include <X11/extensions/dpms.h>
4212 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4214 cc_check
-lXext && _xdpms4
=yes
4216 if test "$_xdpms4" = yes ; then
4217 def_xdpms
='#define CONFIG_XDPMS 1'
4218 _res_comment
="using Xdpms 4"
4220 elif test "$_xdpms3" = yes ; then
4221 def_xdpms
='#define CONFIG_XDPMS 1'
4222 libs_mplayer
="$libs_mplayer -lXdpms"
4223 _res_comment
="using Xdpms 3"
4226 def_xdpms
='#undef CONFIG_XDPMS'
4232 if test "$_xv" = auto
; then
4234 #include <X11/Xlib.h>
4235 #include <X11/extensions/Xvlib.h>
4237 (void) XvGetPortAttribute(0, 0, 0, 0);
4238 (void) XvQueryPortAttributes(0, 0, 0);
4242 cc_check
-lXv && _xv
=yes
4245 if test "$_xv" = yes ; then
4246 def_xv
='#define CONFIG_XV 1'
4247 libs_mplayer
="$libs_mplayer -lXv"
4248 _vomodules
="xv $_vomodules"
4250 def_xv
='#undef CONFIG_XV'
4251 _novomodules
="xv $_novomodules"
4257 if test "$_xv" = yes && test "$_xvmc" != no
; then
4260 #include <X11/Xlib.h>
4261 #include <X11/extensions/Xvlib.h>
4262 #include <X11/extensions/XvMClib.h>
4264 (void) XvMCQueryExtension(0,0,0);
4265 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4268 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4269 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4272 if test "$_xvmc" = yes ; then
4273 def_xvmc
='#define CONFIG_XVMC 1'
4274 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4275 _vomodules
="xvmc $_vomodules"
4276 _res_comment
="using $_xvmclib"
4278 def_xvmc
='#define CONFIG_XVMC 0'
4279 _novomodules
="xvmc $_novomodules"
4285 if test "$_vdpau" = auto
; then
4287 if test "$_dl" = yes ; then
4289 #include <vdpau/vdpau_x11.h>
4290 int main(void) {return VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE;}
4292 cc_check
&& _vdpau
=yes
4295 if test "$_vdpau" = yes ; then
4296 def_vdpau
='#define CONFIG_VDPAU 1'
4297 _vomodules
="vdpau $_vomodules"
4299 def_vdpau
='#define CONFIG_VDPAU 0'
4300 _novomodules
="vdpau $_novomodules"
4305 echocheck
"Xinerama"
4306 if test "$_xinerama" = auto
; then
4308 #include <X11/Xlib.h>
4309 #include <X11/extensions/Xinerama.h>
4310 int main(void) { (void) XineramaIsActive(0); return 0; }
4313 cc_check
-lXinerama && _xinerama
=yes
4316 if test "$_xinerama" = yes ; then
4317 def_xinerama
='#define CONFIG_XINERAMA 1'
4318 libs_mplayer
="$libs_mplayer -lXinerama"
4320 def_xinerama
='#undef CONFIG_XINERAMA'
4322 echores
"$_xinerama"
4325 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4326 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4327 # named 'X extensions' or something similar.
4328 # This check may be useful for future mplayer versions (to change resolution)
4329 # If you run into problems, remove '-lXxf86vm'.
4331 if test "$_vm" = auto
; then
4333 #include <X11/Xlib.h>
4334 #include <X11/extensions/xf86vmode.h>
4335 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4338 cc_check
-lXxf86vm && _vm
=yes
4340 if test "$_vm" = yes ; then
4341 def_vm
='#define CONFIG_XF86VM 1'
4342 libs_mplayer
="$libs_mplayer -lXxf86vm"
4344 def_vm
='#undef CONFIG_XF86VM'
4348 # Check for the presence of special keycodes, like audio control buttons
4349 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4350 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4351 # have these new keycodes.
4352 echocheck
"XF86keysym"
4353 if test "$_xf86keysym" = auto
; then
4356 #include <X11/Xlib.h>
4357 #include <X11/XF86keysym.h>
4358 int main(void) { return XF86XK_AudioPause; }
4360 cc_check
&& _xf86keysym
=yes
4362 if test "$_xf86keysym" = yes ; then
4363 def_xf86keysym
='#define CONFIG_XF86XK 1'
4365 def_xf86keysym
='#undef CONFIG_XF86XK'
4367 echores
"$_xf86keysym"
4370 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4372 #include <X11/Xlib.h>
4373 #include <X11/extensions/xf86dga.h>
4374 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4377 cc_check
-lXxf86dga && _dga2
=yes
4379 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4381 #include <X11/Xlib.h>
4382 #include <X11/extensions/xf86dga.h>
4383 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4386 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4390 def_dga
='#undef CONFIG_DGA'
4391 def_dga1
='#undef CONFIG_DGA1'
4392 def_dga2
='#undef CONFIG_DGA2'
4393 if test "$_dga1" = yes ; then
4395 def_dga1
='#define CONFIG_DGA1 1'
4396 _res_comment
="using DGA 1.0"
4397 elif test "$_dga2" = yes ; then
4399 def_dga2
='#define CONFIG_DGA2 1'
4400 _res_comment
="using DGA 2.0"
4402 if test "$_dga" = yes ; then
4403 def_dga
='#define CONFIG_DGA 1'
4404 libs_mplayer
="$libs_mplayer -lXxf86dga"
4405 _vomodules
="dga $_vomodules"
4407 _novomodules
="dga $_novomodules"
4413 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4414 def_3dfx
='#define CONFIG_3DFX 1'
4415 _vomodules
="3dfx $_vomodules"
4417 def_3dfx
='#undef CONFIG_3DFX'
4418 _novomodules
="3dfx $_novomodules"
4424 def_vidix
='#undef CONFIG_VIDIX'
4425 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4426 _vidix_drv_cyberblade
=no
4427 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4429 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4430 _vidix_drv_mach64
=no
4431 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4433 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4434 _vidix_drv_mga_crtc2
=no
4435 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4436 _vidix_drv_nvidia
=no
4437 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4439 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4441 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4442 _vidix_drv_radeon
=no
4443 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4444 _vidix_drv_rage128
=no
4445 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4447 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4448 _vidix_drv_sh_veu
=no
4449 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4451 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4452 _vidix_drv_unichrome
=no
4453 if test "$_vidix" = auto
; then
4455 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4457 x86_64
&& win32
&& _vidix
=no
4458 (ppc || alpha
) && linux
&& _vidix
=yes
4462 if test "$_vidix" = yes ; then
4463 def_vidix
='#define CONFIG_VIDIX 1'
4464 _vomodules
="cvidix $_vomodules"
4465 # FIXME: ivtv driver temporarily disabled until we have a proper test
4466 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4467 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4469 # some vidix drivers are architecture and os specific, discard them elsewhere
4470 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4471 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4473 for driver
in $_vidix_drivers ; do
4474 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4475 eval _vidix_drv_
${driver}=yes
4476 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4479 echocheck
"VIDIX PCI device name database"
4480 echores
"$_vidix_pcidb"
4481 if test "$_vidix_pcidb" = yes ; then
4487 echocheck
"VIDIX dhahelper support"
4488 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4489 echores
"$_dhahelper"
4491 echocheck
"VIDIX svgalib_helper support"
4492 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4493 echores
"$_svgalib_helper"
4496 _novomodules
="cvidix $_novomodules"
4499 if test "$_vidix" = yes && win32
; then
4501 _vomodules
="winvidix $_vomodules"
4502 libs_mplayer
="$libs_mplayer -lgdi32"
4504 _novomodules
="winvidix $_novomodules"
4506 if test "$_vidix" = yes && test "$_x11" = yes; then
4508 _vomodules
="xvidix $_vomodules"
4510 _novomodules
="xvidix $_novomodules"
4514 if test "$_ggi" = auto
; then
4516 #include <ggi/ggi.h>
4517 int main(void) { ggiInit(); return 0; }
4520 cc_check
-lggi && _ggi
=yes
4522 if test "$_ggi" = yes ; then
4523 def_ggi
='#define CONFIG_GGI 1'
4524 libs_mplayer
="$libs_mplayer -lggi"
4525 _vomodules
="ggi $_vomodules"
4527 def_ggi
='#undef CONFIG_GGI'
4528 _novomodules
="ggi $_novomodules"
4532 echocheck
"GGI extension: libggiwmh"
4533 if test "$_ggiwmh" = auto
; then
4536 #include <ggi/ggi.h>
4537 #include <ggi/wmh.h>
4538 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4540 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4542 # needed to get right output on obscure combination
4543 # like --disable-ggi --enable-ggiwmh
4544 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4545 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4546 libs_mplayer
="$libs_mplayer -lggiwmh"
4549 def_ggiwmh
='#undef CONFIG_GGIWMH'
4555 if test "$_aa" = auto
; then
4558 extern struct aa_hardware_params aa_defparams;
4559 extern struct aa_renderparams aa_defrenderparams;
4563 (void) aa_init(0, 0, 0);
4564 c = aa_autoinit(&aa_defparams);
4565 p = aa_getrenderparams();
4566 aa_autoinitkbd(c,0);
4570 for _ld_tmp
in "-laa" ; do
4571 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4574 if test "$_aa" = yes ; then
4575 def_aa
='#define CONFIG_AA 1'
4577 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4579 _vomodules
="aa $_vomodules"
4581 def_aa
='#undef CONFIG_AA'
4582 _novomodules
="aa $_novomodules"
4588 if test "$_caca" = auto
; then
4590 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4593 #ifdef CACA_API_VERSION_1
4596 int main(void) { (void) caca_init(); return 0; }
4598 cc_check $
(caca-config
--libs) && _caca
=yes
4601 if test "$_caca" = yes ; then
4602 def_caca
='#define CONFIG_CACA 1'
4603 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4604 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4605 _vomodules
="caca $_vomodules"
4607 def_caca
='#undef CONFIG_CACA'
4608 _novomodules
="caca $_novomodules"
4614 if test "$_svga" = auto
; then
4617 int main(void) { return 0; }
4620 cc_check
-lvga $_ld_lm && _svga
=yes
4622 if test "$_svga" = yes ; then
4623 def_svga
='#define CONFIG_SVGALIB 1'
4624 libs_mplayer
="$libs_mplayer -lvga"
4625 _vomodules
="svga $_vomodules"
4627 def_svga
='#undef CONFIG_SVGALIB'
4628 _novomodules
="svga $_novomodules"
4634 if test "$_fbdev" = auto
; then
4638 if test "$_fbdev" = yes ; then
4639 def_fbdev
='#define CONFIG_FBDEV 1'
4640 _vomodules
="fbdev $_vomodules"
4642 def_fbdev
='#undef CONFIG_FBDEV'
4643 _novomodules
="fbdev $_novomodules"
4650 if test "$_dvb" = auto
; then
4654 #include <sys/ioctl.h>
4658 #include <ost/dmx.h>
4659 #include <ost/frontend.h>
4660 #include <ost/sec.h>
4661 #include <ost/video.h>
4662 #include <ost/audio.h>
4663 int main(void) {return 0;}
4665 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4666 cc_check
$_inc_tmp && _dvb
=yes && \
4667 extra_cflags
="$extra_cflags $_inc_tmp" && break
4671 if test "$_dvb" = yes ; then
4672 def_dvb
='#define CONFIG_DVB 1'
4673 def_dvbin
='#define CONFIG_DVBIN 1'
4674 _aomodules
="mpegpes(dvb) $_aomodules"
4675 _vomodules
="mpegpes(dvb) $_vomodules"
4678 echocheck
"DVB HEAD"
4679 if test "$_dvbhead" = auto
; then
4684 #include <sys/ioctl.h>
4688 #include <linux/dvb/dmx.h>
4689 #include <linux/dvb/frontend.h>
4690 #include <linux/dvb/video.h>
4691 #include <linux/dvb/audio.h>
4692 int main(void) {return 0;}
4694 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4695 cc_check
$_inc_tmp && _dvbhead
=yes && \
4696 extra_cflags
="$extra_cflags $_inc_tmp" && break
4700 if test "$_dvbhead" = yes ; then
4701 def_dvb
='#define CONFIG_DVB 1'
4702 def_dvb_head
='#define CONFIG_DVB_HEAD 1'
4703 def_dvbin
='#define CONFIG_DVBIN 1'
4704 _aomodules
="mpegpes(dvb) $_aomodules"
4705 _vomodules
="mpegpes(dvb) $_vomodules"
4708 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4709 def_dvb
='#undef CONFIG_DVB'
4710 def_dvb_head
='#undef CONFIG_DVB_HEAD'
4711 def_dvbin
='#undef CONFIG_DVBIN '
4712 _aomodules
="mpegpes(file) $_aomodules"
4713 _vomodules
="mpegpes(file) $_vomodules"
4716 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4718 _inputmodules
="dvb $_inputmodules"
4721 _noinputmodules
="dvb $_noinputmodules"
4727 echocheck
"QuickTime"
4728 if test "$quicktime" = auto
; then
4730 #include <QuickTime/QuickTime.h>
4732 ImageDescription *desc;
4739 cc_check
-framework QuickTime
&& quicktime
=yes
4741 if test "$quicktime" = yes ; then
4742 extra_ldflags
="$extra_ldflags -framework QuickTime"
4743 def_quicktime
='#define CONFIG_QUICKTIME 1'
4745 def_quicktime
='#undef CONFIG_QUICKTIME'
4751 if test "$_quartz" = auto
; then
4753 #include <Carbon/Carbon.h>
4755 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
4760 cc_check
-framework Carbon
&& _quartz
=yes
4762 if test "$_quartz" = yes ; then
4763 libs_mplayer
="$libs_mplayer -framework Carbon"
4764 def_quartz
='#define CONFIG_QUARTZ 1'
4765 _vomodules
="quartz $_vomodules"
4767 def_quartz
='#undef CONFIG_QUARTZ'
4768 _novomodules
="quartz $_novomodules"
4772 echocheck
"CoreVideo"
4773 if test "$_corevideo" = auto
; then
4775 #include <Carbon/Carbon.h>
4776 #include <CoreServices/CoreServices.h>
4777 #include <OpenGL/OpenGL.h>
4778 #include <QuartzCore/CoreVideo.h>
4779 int main(void) { return 0; }
4782 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4784 if test "$_corevideo" = yes ; then
4785 _vomodules
="corevideo $_vomodules"
4786 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4787 def_corevideo
='#define CONFIG_COREVIDEO 1'
4789 _novomodules
="corevideo $_novomodules"
4790 def_corevideo
='#undef CONFIG_COREVIDEO'
4792 echores
"$_corevideo"
4797 # make sure this stays below CoreVideo to avoid issues due to namespace
4798 # conflicts between -lGL and -framework OpenGL
4800 #Note: this test is run even with --enable-gl since we autodetect linker flags
4801 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4804 #include <windows.h>
4808 #include <X11/Xlib.h>
4814 wglCreateContext(dc);
4816 glXCreateContext(NULL, NULL, NULL, True);
4823 for _ld_tmp
in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4824 if cc_check
$_ld_tmp $_ld_lm ; then
4827 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4831 if cc_check
-DGL_WIN32 -lopengl32 ; then
4834 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4839 if test "$_gl" = yes ; then
4840 def_gl
='#define CONFIG_GL 1'
4841 _res_comment
="backends:"
4842 if test "$_gl_win32" = yes ; then
4843 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4844 _res_comment
="$_res_comment win32"
4846 if test "$_gl_x11" = yes ; then
4847 def_gl_x11
='#define CONFIG_GL_X11 1'
4848 _res_comment
="$_res_comment x11"
4850 _vomodules
="opengl $_vomodules"
4852 def_gl
='#undef CONFIG_GL'
4853 def_gl_win32
='#undef CONFIG_GL_WIN32'
4854 def_gl_x11
='#undef CONFIG_GL_X11'
4855 _novomodules
="opengl $_novomodules"
4860 echocheck
"MatrixView"
4861 if test "$_gl" = no
; then
4864 if test "$matrixview" = yes ; then
4865 _vomodules
="matrixview $_vomodules"
4866 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4868 _novomodules
="matrixview $_novomodules"
4869 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4871 echores
"$matrixview"
4874 echocheck
"PNG support"
4875 if test "$_png" = auto
; then
4878 # Don't check for -lpng on irix since it has its own libpng
4879 # incompatible with the GNU libpng
4880 _res_comment
="disabled on irix (not GNU libpng)"
4886 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4887 printf("libpng: %s\n", png_libpng_ver);
4888 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4891 cc_check
-lpng -lz $_ld_lm && _png
=yes
4895 if test "$_png" = yes ; then
4896 def_png
='#define CONFIG_PNG 1'
4897 extra_ldflags
="$extra_ldflags -lpng -lz"
4899 def_png
='#undef CONFIG_PNG'
4902 echocheck
"MNG support"
4903 if test "$_mng" = auto
; then
4908 const char * p_ver = mng_version_text();
4909 return !p_ver || p_ver[0] == 0;
4912 if cc_check
-lmng -lz $_ld_lm ; then
4917 if test "$_mng" = yes ; then
4918 def_mng
='#define CONFIG_MNG 1'
4919 extra_ldflags
="$extra_ldflags -lmng -lz"
4921 def_mng
='#undef CONFIG_MNG'
4924 echocheck
"JPEG support"
4925 if test "$_jpeg" = auto
; then
4932 #include <jpeglib.h>
4933 int main(void) { return 0; }
4935 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
4939 if test "$_jpeg" = yes ; then
4940 def_jpeg
='#define CONFIG_JPEG 1'
4941 _vomodules
="jpeg $_vomodules"
4942 extra_ldflags
="$extra_ldflags -ljpeg"
4944 def_jpeg
='#undef CONFIG_JPEG'
4945 _novomodules
="jpeg $_novomodules"
4950 echocheck
"PNM support"
4951 if test "$_pnm" = yes; then
4952 def_pnm
="#define CONFIG_PNM 1"
4953 _vomodules
="pnm $_vomodules"
4955 def_pnm
="#undef CONFIG_PNM"
4956 _novomodules
="pnm $_novomodules"
4962 echocheck
"GIF support"
4963 # This is to appease people who want to force gif support.
4964 # If it is forced to yes, then we still do checks to determine
4965 # which gif library to use.
4966 if test "$_gif" = yes ; then
4971 if test "$_gif" = auto
; then
4974 #include <gif_lib.h>
4975 int main(void) { return 0; }
4977 for _ld_gif
in "-lungif" "-lgif" ; do
4978 cc_check
$_ld_gif && _gif
=yes && break
4982 # If no library was found, and the user wants support forced,
4983 # then we force it on with libgif, as this is the safest
4984 # assumption IMHO. (libungif & libregif both create symbolic
4985 # links to libgif. We also assume that no x11 support is needed,
4986 # because if you are forcing this, then you _should_ know what
4987 # you are doing. [ Besides, package maintainers should never
4988 # have compiled x11 deps into libungif in the first place. ] )
4991 if test "$_force_gif" = yes && test "$_gif" = no
; then
4996 if test "$_gif" = yes ; then
4997 def_gif
='#define CONFIG_GIF 1'
4998 _codecmodules
="gif $_codecmodules"
4999 _vomodules
="gif89a $_vomodules"
5000 _res_comment
="old version, some encoding functions disabled"
5001 def_gif_4
='#undef CONFIG_GIF_4'
5002 extra_ldflags
="$extra_ldflags $_ld_gif"
5006 #include <gif_lib.h>
5007 void catch() { exit(1); }
5009 signal(SIGSEGV, catch); // catch segfault
5010 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5011 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5015 if cc_check
"$_ld_gif" ; then
5016 def_gif_4
='#define CONFIG_GIF_4 1'
5020 def_gif
='#undef CONFIG_GIF'
5021 def_gif_4
='#undef CONFIG_GIF_4'
5022 _novomodules
="gif89a $_novomodules"
5023 _nocodecmodules
="gif $_nocodecmodules"
5028 case "$_gif" in yes*)
5029 echocheck
"broken giflib workaround"
5030 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5033 #include <gif_lib.h>
5036 printf("UserData is at address %p\n", gif.UserData);
5040 if cc_check
"$_ld_gif" ; then
5041 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5050 echocheck
"VESA support"
5051 if test "$_vesa" = auto
; then
5054 int main(void) { vbeVersion(); return 0; }
5057 cc_check
-lvbe -llrmi && _vesa
=yes
5059 if test "$_vesa" = yes ; then
5060 def_vesa
='#define CONFIG_VESA 1'
5061 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5062 _vomodules
="vesa $_vomodules"
5064 def_vesa
='#undef CONFIG_VESA'
5065 _novomodules
="vesa $_novomodules"
5077 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5078 if test -z "$_sdlconfig" ; then
5079 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5080 _sdlconfig
="sdl-config"
5081 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5082 _sdlconfig
="sdl11-config"
5087 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5089 #ifdef CONFIG_SDL_SDL_H
5090 #include <SDL/SDL.h>
5095 // we allow SDL hacking our main() only on OSX
5098 int main(int argc, char *argv[]) {
5099 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5104 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" ; do
5105 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5107 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5111 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5112 _res_comment
="using $_sdlconfig"
5114 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5115 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5117 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5118 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5120 _inc_tmp
="$($_sdlconfig --cflags)"
5121 _ld_tmp
="$($_sdlconfig --libs)"
5123 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5124 _sdlversion
=$
($_sdlconfig --version |
sed 's/[^0-9]//g')
5125 if test "$_sdlversion" -gt 116 ; then
5126 if test "$_sdlversion" -lt 121 ; then
5127 def_sdlbuggy
='#define BUGGY_SDL'
5129 def_sdlbuggy
='#undef BUGGY_SDL'
5136 if test "$_sdl" = yes ; then
5137 def_sdl
='#define CONFIG_SDL 1'
5138 extra_cflags
="$extra_cflags $_inc_tmp"
5139 libs_mplayer
="$libs_mplayer $_ld_tmp"
5140 _vomodules
="sdl $_vomodules"
5141 _aomodules
="sdl $_aomodules"
5143 def_sdl
='#undef CONFIG_SDL'
5144 _novomodules
="sdl $_novomodules"
5145 _noaomodules
="sdl $_noaomodules"
5151 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5152 if test "$_kva" = auto
; then
5156 int main( void ) { return 0; }
5159 cc_check
-lkva && _kva
=yes
5161 if test "$_kva" = yes ; then
5162 def_kva
='#define CONFIG_KVA 1'
5163 libs_mplayer
="$libs_mplayer -lkva"
5164 _vomodules
="kva $_vomodules"
5166 def_kva
='#undef CONFIG_KVA'
5167 _novomodules
="kva $_novomodules"
5175 echocheck
"Windows waveout"
5176 if test "$_win32waveout" = auto
; then
5178 #include <windows.h>
5179 #include <mmsystem.h>
5180 int main(void) { return 0; }
5183 cc_check
-lwinmm && _win32waveout
=yes
5185 if test "$_win32waveout" = yes ; then
5186 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5187 libs_mplayer
="$libs_mplayer -lwinmm"
5188 _aomodules
="win32 $_aomodules"
5190 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5191 _noaomodules
="win32 $_noaomodules"
5193 echores
"$_win32waveout"
5195 echocheck
"Direct3D"
5196 if test "$_direct3d" = auto
; then
5198 #include <windows.h>
5200 int main(void) { return 0; }
5203 cc_check
&& _direct3d
=yes
5205 if test "$_direct3d" = yes ; then
5206 def_direct3d
='#define CONFIG_DIRECT3D 1'
5207 _vomodules
="direct3d $_vomodules"
5209 def_direct3d
='#undef CONFIG_DIRECT3D'
5210 _novomodules
="direct3d $_novomodules"
5212 echores
"$_direct3d"
5215 if test "$_directx" = auto
; then
5217 #include <windows.h>
5220 int main(void) { return 0; }
5223 cc_check
-lgdi32 && _directx
=yes
5225 if test "$_directx" = yes ; then
5226 def_directx
='#define CONFIG_DIRECTX 1'
5227 libs_mplayer
="$libs_mplayer -lgdi32"
5228 _vomodules
="directx $_vomodules"
5229 _aomodules
="dsound $_aomodules"
5231 def_directx
='#undef CONFIG_DIRECTX'
5232 _novomodules
="directx $_novomodules"
5233 _noaomodules
="dsound $_noaomodules"
5241 if test "$_dxr2" = auto
; then
5244 #include <dxr2ioctl.h>
5245 int main(void) { return 0; }
5247 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5248 cc_check
$_inc_tmp && _dxr2
=yes && \
5249 extra_cflags
="$extra_cflags $_inc_tmp" && break
5252 if test "$_dxr2" = yes; then
5253 def_dxr2
='#define CONFIG_DXR2 1'
5254 _aomodules
="dxr2 $_aomodules"
5255 _vomodules
="dxr2 $_vomodules"
5257 def_dxr2
='#undef CONFIG_DXR2'
5258 _noaomodules
="dxr2 $_noaomodules"
5259 _novomodules
="dxr2 $_novomodules"
5264 if test "$_dxr3" = auto
; then
5266 #include <linux/em8300.h>
5267 int main(void) { return 0; }
5270 cc_check
&& _dxr3
=yes
5272 if test "$_dxr3" = yes ; then
5273 def_dxr3
='#define CONFIG_DXR3 1'
5274 _vomodules
="dxr3 $_vomodules"
5276 def_dxr3
='#undef CONFIG_DXR3'
5277 _novomodules
="dxr3 $_novomodules"
5282 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5283 if test "$_ivtv" = auto
; then
5286 #include <inttypes.h>
5287 #include <linux/types.h>
5288 #include <linux/videodev2.h>
5289 #include <linux/ivtv.h>
5290 #include <sys/ioctl.h>
5292 struct ivtv_cfg_stop_decode sd;
5293 struct ivtv_cfg_start_decode sd1;
5294 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5295 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5299 cc_check
&& _ivtv
=yes
5301 if test "$_ivtv" = yes ; then
5302 def_ivtv
='#define CONFIG_IVTV 1'
5303 _vomodules
="ivtv $_vomodules"
5304 _aomodules
="ivtv $_aomodules"
5306 def_ivtv
='#undef CONFIG_IVTV'
5307 _novomodules
="ivtv $_novomodules"
5308 _noaomodules
="ivtv $_noaomodules"
5313 echocheck
"V4L2 MPEG Decoder"
5314 if test "$_v4l2" = auto
; then
5317 #include <inttypes.h>
5318 #include <linux/types.h>
5319 #include <linux/videodev2.h>
5320 #include <linux/version.h>
5322 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5323 #error kernel headers too old, need 2.6.22
5325 struct v4l2_ext_controls ctrls;
5326 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5331 cc_check
&& _v4l2
=yes
5333 if test "$_v4l2" = yes ; then
5334 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5335 _vomodules
="v4l2 $_vomodules"
5336 _aomodules
="v4l2 $_aomodules"
5338 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5339 _novomodules
="v4l2 $_novomodules"
5340 _noaomodules
="v4l2 $_noaomodules"
5351 echocheck
"OSS Audio"
5352 if test "$_ossaudio" = auto
; then
5354 #include <sys/ioctl.h>
5355 #include <$_soundcard_header>
5356 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5359 cc_check
&& _ossaudio
=yes
5361 if test "$_ossaudio" = yes ; then
5362 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5363 _aomodules
="oss $_aomodules"
5364 if test "$_linux_devfs" = yes; then
5365 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5366 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5369 #include <sys/ioctl.h>
5370 #include <$_soundcard_header>
5371 #ifdef OPEN_SOUND_SYSTEM
5372 int main(void) { return 0; }
5374 #error Not the real thing
5378 cc_check
&& _real_ossaudio
=yes
5379 if test "$_real_ossaudio" = yes; then
5380 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5381 # Check for OSS4 headers (override default headers)
5382 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5383 if test -f /etc
/oss.conf
; then
5385 _ossinc
="$OSSLIBDIR/include"
5386 if test -f "$_ossinc/sys/soundcard.h"; then
5387 extra_cflags
="-I$_ossinc $extra_cflags"
5390 elif netbsd || openbsd
; then
5391 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5392 extra_ldflags
="$extra_ldflags -lossaudio"
5394 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5396 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5399 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5400 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5401 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5402 _noaomodules
="oss $_noaomodules"
5404 echores
"$_ossaudio"
5408 if test "$_arts" = auto
; then
5410 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5414 int main(void) { return 0; }
5416 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5421 if test "$_arts" = yes ; then
5422 def_arts
='#define CONFIG_ARTS 1'
5423 _aomodules
="arts $_aomodules"
5424 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5425 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5427 _noaomodules
="arts $_noaomodules"
5433 if test "$_esd" = auto
; then
5435 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5439 int main(void) { int fd = esd_open_sound("test"); return fd; }
5441 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5447 if test "$_esd" = yes ; then
5448 def_esd
='#define CONFIG_ESD 1'
5449 _aomodules
="esd $_aomodules"
5450 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5451 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5453 echocheck
"esd_get_latency()"
5456 int main(void) { return esd_get_latency(0); }
5458 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5459 echores
"$_esd_latency"
5461 def_esd
='#undef CONFIG_ESD'
5462 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5463 _noaomodules
="esd $_noaomodules"
5468 if test "$_nas" = auto
; then
5470 #include <audio/audiolib.h>
5471 int main(void) { return 0; }
5474 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5476 if test "$_nas" = yes ; then
5477 def_nas
='#define CONFIG_NAS 1'
5478 libs_mplayer
="$libs_mplayer -laudio -lXt"
5479 _aomodules
="nas $_aomodules"
5481 _noaomodules
="nas $_noaomodules"
5482 def_nas
='#undef CONFIG_NAS'
5488 if test "$_pulse" = auto
; then
5490 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5493 #include <pulse/pulseaudio.h>
5494 int main(void) { return 0; }
5496 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5502 if test "$_pulse" = yes ; then
5503 def_pulse
='#define CONFIG_PULSE 1'
5504 _aomodules
="pulse $_aomodules"
5505 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5506 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5508 def_pulse
='#undef CONFIG_PULSE'
5509 _noaomodules
="pulse $_noaomodules"
5514 if test "$_jack" = auto
; then
5518 #include <jack/jack.h>
5519 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5521 if cc_check
-ljack ; then
5522 libs_mplayer
="$libs_mplayer -ljack"
5523 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5524 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5525 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5531 if test "$_jack" = yes ; then
5532 def_jack
='#define CONFIG_JACK 1'
5533 _aomodules
="jack $_aomodules"
5535 _noaomodules
="jack $_noaomodules"
5540 if test "$_openal" = auto
; then
5544 #include <OpenAL/al.h>
5549 alSourceQueueBuffers(0, 0, 0);
5550 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5554 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5555 cc_check
$I && _openal
=yes && break
5556 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5558 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5560 if test "$_openal" = yes ; then
5561 def_openal
='#define CONFIG_OPENAL 1'
5562 _aomodules
="openal $_aomodules"
5564 _noaomodules
="openal $_noaomodules"
5568 echocheck
"ALSA audio"
5569 if test "$_alloca" != yes ; then
5571 _res_comment
="alloca missing"
5573 if test "$_alsa" != no
; then
5576 #include <sys/time.h>
5577 #include <sys/asoundlib.h>
5578 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5579 #error "alsa version != 0.5.x"
5581 int main(void) { return 0; }
5583 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5586 #include <sys/time.h>
5587 #include <sys/asoundlib.h>
5588 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5589 #error "alsa version != 0.9.x"
5591 int main(void) { return 0; }
5593 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5595 #include <sys/time.h>
5596 #include <alsa/asoundlib.h>
5597 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5598 #error "alsa version != 0.9.x"
5600 int main(void) { return 0; }
5602 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5605 #include <sys/time.h>
5606 #include <sys/asoundlib.h>
5607 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5608 #error "alsa version != 1.0.x"
5610 int main(void) { return 0; }
5612 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5614 #include <sys/time.h>
5615 #include <alsa/asoundlib.h>
5616 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5617 #error "alsa version != 1.0.x"
5619 int main(void) { return 0; }
5621 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5623 def_alsa
='#undef CONFIG_ALSA'
5624 def_alsa5
='#undef CONFIG_ALSA5'
5625 def_alsa9
='#undef CONFIG_ALSA9'
5626 def_alsa1x
='#undef CONFIG_ALSA1X'
5627 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5628 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5629 if test "$_alsaver" ; then
5631 if test "$_alsaver" = '0.5.x' ; then
5633 _aomodules
="alsa5 $_aomodules"
5634 def_alsa5
='#define CONFIG_ALSA5 1'
5635 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5636 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5637 elif test "$_alsaver" = '0.9.x-sys' ; then
5639 _aomodules
="alsa $_aomodules"
5640 def_alsa
='#define CONFIG_ALSA 1'
5641 def_alsa9
='#define CONFIG_ALSA9 1'
5642 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5643 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5644 elif test "$_alsaver" = '0.9.x-alsa' ; then
5646 _aomodules
="alsa $_aomodules"
5647 def_alsa
='#define CONFIG_ALSA 1'
5648 def_alsa9
='#define CONFIG_ALSA9 1'
5649 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5650 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5651 elif test "$_alsaver" = '1.0.x-sys' ; then
5653 _aomodules
="alsa $_aomodules"
5654 def_alsa
='#define CONFIG_ALSA 1'
5655 def_alsa1x
="#define CONFIG_ALSA1X 1"
5656 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5657 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5658 elif test "$_alsaver" = '1.0.x-alsa' ; then
5660 _aomodules
="alsa $_aomodules"
5661 def_alsa
='#define CONFIG_ALSA 1'
5662 def_alsa1x
="#define CONFIG_ALSA1X 1"
5663 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5664 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5667 _res_comment
="unknown version"
5669 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5671 _noaomodules
="alsa $_noaomodules"
5676 echocheck
"Sun audio"
5677 if test "$_sunaudio" = auto
; then
5679 #include <sys/types.h>
5680 #include <sys/audioio.h>
5681 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5684 cc_check
&& _sunaudio
=yes
5686 if test "$_sunaudio" = yes ; then
5687 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5688 _aomodules
="sun $_aomodules"
5690 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5691 _noaomodules
="sun $_noaomodules"
5693 echores
"$_sunaudio"
5696 def_mlib
='#define CONFIG_MLIB 0'
5698 echocheck
"Sun mediaLib"
5699 if test "$_mlib" = auto
; then
5703 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5705 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5712 echocheck
"CoreAudio"
5713 if test "$_coreaudio" = auto
; then
5715 #include <CoreAudio/CoreAudio.h>
5716 #include <AudioToolbox/AudioToolbox.h>
5717 #include <AudioUnit/AudioUnit.h>
5718 int main(void) { return 0; }
5721 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5723 if test "$_coreaudio" = yes ; then
5724 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5725 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5726 _aomodules
="coreaudio $_aomodules"
5728 def_coreaudio
='#undef CONFIG_COREAUDIO'
5729 _noaomodules
="coreaudio $_noaomodules"
5736 echocheck
"SGI audio"
5737 if test "$_sgiaudio" = auto
; then
5738 # check for SGI audio
5740 #include <dmedia/audio.h>
5741 int main(void) { return 0; }
5744 cc_check
&& _sgiaudio
=yes
5746 if test "$_sgiaudio" = "yes" ; then
5747 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5748 libs_mplayer
="$libs_mplayer -laudio"
5749 _aomodules
="sgi $_aomodules"
5751 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5752 _noaomodules
="sgi $_noaomodules"
5754 echores
"$_sgiaudio"
5760 if test "$_dart" = auto
; then
5764 int main( void ) { return 0; }
5767 cc_check
-ldart && _dart
=yes
5769 if test "$_dart" = yes ; then
5770 def_dart
='#define CONFIG_DART 1'
5771 libs_mplayer
="$libs_mplayer -ldart"
5772 _aomodules
="dart $_aomodules"
5774 def_dart
='#undef CONFIG_DART'
5775 _noaomodules
="dart $_noaomodules"
5781 # set default CD/DVD devices
5782 if win32 || os2
; then
5783 default_cdrom_device
="D:"
5785 default_cdrom_device
="/dev/disk1"
5786 elif dragonfly
; then
5787 default_cdrom_device
="/dev/cd0"
5789 default_cdrom_device
="/dev/acd0"
5791 default_cdrom_device
="/dev/rcd0a"
5793 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5794 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5795 # file system and the volfs service.
5796 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5798 default_cdrom_device
="a1ide.device:2"
5800 default_cdrom_device
="/dev/cdrom"
5803 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5804 default_dvd_device
=$default_cdrom_device
5806 default_dvd_device
="/dev/rdiskN"
5808 default_dvd_device
="/dev/dvd"
5812 echocheck
"VCD support"
5813 if test "$_vcd" = auto
; then
5815 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos
; then
5819 #include <ddk/ntddcdrm.h>
5820 int main(void) { return 0; }
5822 cc_check
&& _vcd
=yes
5825 if test "$_vcd" = yes; then
5826 _inputmodules
="vcd $_inputmodules"
5827 def_vcd
='#define CONFIG_VCD 1'
5829 def_vcd
='#undef CONFIG_VCD'
5830 _noinputmodules
="vcd $_noinputmodules"
5831 _res_comment
="not supported on this OS"
5838 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5839 _dvdread_internal
=no
5841 if test "$_dvdread_internal" = auto
; then
5842 _dvdread_internal
=no
5844 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5845 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5846 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5847 || darwin || win32 || os2
; then
5848 _dvdread_internal
=yes
5850 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5852 elif test "$_dvdread" = auto
; then
5854 if test "$_dl" = yes; then
5856 #include <inttypes.h>
5857 #include <dvdread/dvd_reader.h>
5858 #include <dvdread/ifo_types.h>
5859 #include <dvdread/ifo_read.h>
5860 #include <dvdread/nav_read.h>
5861 int main(void) { return 0; }
5863 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
5864 _dvdreadlibs
=$
($_dvdreadconfig --libs)
5865 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5866 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5868 extra_cflags
="$extra_cflags $_dvdreadcflags"
5869 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5870 _res_comment
="external"
5875 if test "$_dvdread_internal" = yes; then
5876 def_dvdread
='#define CONFIG_DVDREAD 1'
5877 _inputmodules
="dvdread(internal) $_inputmodules"
5879 _res_comment
="internal"
5880 elif test "$_dvdread" = yes; then
5881 def_dvdread
='#define CONFIG_DVDREAD 1'
5883 extra_ldflags
="$extra_ldflags -ldvdread"
5884 _inputmodules
="dvdread(external) $_inputmodules"
5885 _res_comment
="external"
5887 def_dvdread
='#undef CONFIG_DVDREAD'
5888 _noinputmodules
="dvdread $_noinputmodules"
5893 echocheck
"internal libdvdcss"
5894 if test "$_libdvdcss_internal" = auto
; then
5895 _libdvdcss_internal
=no
5896 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5897 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5899 if test "$_libdvdcss_internal" = yes ; then
5900 if linux || netbsd || openbsd || bsdos
; then
5901 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5902 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5903 elif freebsd || dragonfly
; then
5904 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5906 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5907 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5909 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5911 cflags_libdvdcss
="-DSYS_BEOS"
5913 cflags_libdvdcss
="-DSYS_OS2"
5915 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5916 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5917 _inputmodules
="libdvdcss(internal) $_inputmodules"
5920 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5922 echores
"$_libdvdcss_internal"
5925 echocheck
"cdparanoia"
5926 if test "$_cdparanoia" = auto
; then
5928 #include <cdda_interface.h>
5929 #include <cdda_paranoia.h>
5930 // This need a better test. How ?
5931 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5934 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5935 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5936 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5939 if test "$_cdparanoia" = yes ; then
5941 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5942 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5944 echores
"$_cdparanoia"
5948 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5951 #include <cdio/version.h>
5952 #include <cdio/cdda.h>
5953 #include <cdio/paranoia.h>
5955 void *test = cdda_verbose_set;
5956 printf("%s\n", CDIO_VERSION);
5957 return test == (void *)1;
5961 for _ld_tmp
in "" "-lwinmm" ; do
5962 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5963 cc_check
$_ld_tmp $_ld_lm \
5964 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5966 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5967 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5968 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5969 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5970 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5973 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5975 def_libcdio
='#define CONFIG_LIBCDIO 1'
5976 def_havelibcdio
='yes'
5978 if test "$_cdparanoia" = yes ; then
5979 _res_comment
="using cdparanoia"
5981 def_libcdio
='#undef CONFIG_LIBCDIO'
5982 def_havelibcdio
='no'
5986 if test "$_cdda" = yes ; then
5987 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
5988 def_cdparanoia
='#define CONFIG_CDDA 1'
5989 _inputmodules
="cdda $_inputmodules"
5991 def_cdparanoia
='#undef CONFIG_CDDA'
5992 _noinputmodules
="cdda $_noinputmodules"
5995 if test "$_cddb" = yes ; then
5996 def_cddb
='#define CONFIG_CDDB 1'
5997 _inputmodules
="cddb $_inputmodules"
6000 def_cddb
='#undef CONFIG_CDDB'
6001 _noinputmodules
="cddb $_noinputmodules"
6004 echocheck
"bitmap font support"
6005 if test "$_bitmap_font" = yes ; then
6006 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6008 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6010 echores
"$_bitmap_font"
6013 echocheck
"freetype >= 2.0.9"
6015 # freetype depends on iconv
6016 if test "$_iconv" = no
; then
6018 _res_comment
="iconv support needed"
6021 if test "$_freetype" = auto
; then
6022 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6025 #include <ft2build.h>
6026 #include FT_FREETYPE_H
6027 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6028 #error "Need FreeType 2.0.9 or newer"
6032 FT_Int major=-1,minor=-1,patch=-1;
6033 int err=FT_Init_FreeType(&library);
6038 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6043 if test "$_freetype" = yes ; then
6044 def_freetype
='#define CONFIG_FREETYPE 1'
6045 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6046 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6048 def_freetype
='#undef CONFIG_FREETYPE'
6050 echores
"$_freetype"
6052 if test "$_freetype" = no
; then
6054 _res_comment
="FreeType support needed"
6056 echocheck
"fontconfig"
6057 if test "$_fontconfig" = auto
; then
6061 #include <fontconfig/fontconfig.h>
6064 if (err == FcFalse) {
6065 printf("Couldn't initialize fontconfig lib\n");
6072 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6073 _ld_tmp
="-lfontconfig $_ld_tmp"
6074 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6076 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6077 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6078 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6079 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6080 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6083 if test "$_fontconfig" = yes ; then
6084 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6086 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6088 echores
"$_fontconfig"
6091 echocheck
"SSA/ASS support"
6092 if test "$_ass" = auto
-o "$_ass" = yes ; then
6093 if $_pkg_config libass
; then
6095 def_ass
='#define CONFIG_ASS 1'
6096 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
6097 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
6100 def_ass
='#undef CONFIG_ASS'
6103 def_ass
='#undef CONFIG_ASS'
6108 echocheck
"fribidi with charsets"
6111 if test "$_fribidi" = auto
; then
6115 /* workaround for fribidi 0.10.4 and below */
6116 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6117 #include <fribidi/fribidi.h>
6119 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6120 printf("Fribidi headers are not consistents with the library!\n");
6129 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6130 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6131 test "$_fribidi" = no
; then
6132 _inc_tmp
="$($_fribidiconfig --cflags)"
6133 _ld_tmp
="$($_fribidiconfig --libs)"
6134 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6137 if test "$_fribidi" = yes ; then
6138 def_fribidi
='#define CONFIG_FRIBIDI 1'
6139 extra_cflags
="$extra_cflags $_inc_tmp"
6140 extra_ldflags
="$extra_ldflags $_ld_tmp"
6142 def_fribidi
='#undef CONFIG_FRIBIDI'
6148 if test "$_enca" = auto
; then
6150 #include <sys/types.h>
6155 langs = enca_get_languages(&langcnt);
6160 cc_check
-lenca $_ld_lm && _enca
=yes
6162 if test "$_enca" = yes ; then
6163 def_enca
='#define CONFIG_ENCA 1'
6164 extra_ldflags
="$extra_ldflags -lenca"
6166 def_enca
='#undef CONFIG_ENCA'
6174 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6177 cc_check
-lz && _zlib
=yes
6178 if test "$_zlib" = yes ; then
6179 def_zlib
='#define CONFIG_ZLIB 1'
6180 extra_ldflags
="$extra_ldflags -lz"
6182 def_zlib
='#define CONFIG_ZLIB 0'
6189 def_bzlib
='#define CONFIG_BZLIB 0'
6192 int main(void) { BZ2_bzlibVersion(); return 0; }
6194 cc_check
-lbz2 && bzlib
=yes
6195 if test "$bzlib" = yes ; then
6196 def_bzlib
='#define CONFIG_BZLIB 1'
6197 extra_ldflags
="$extra_ldflags -lbz2"
6203 if test "$_rtc" = auto
; then
6205 #include <sys/ioctl.h>
6207 #include <linux/rtc.h>
6210 #define RTC_PIE_ON RTCIO_PIE_ON
6212 int main(void) { return RTC_PIE_ON; }
6215 cc_check
&& _rtc
=yes
6218 if test "$_rtc" = yes ; then
6219 def_rtc
='#define HAVE_RTC 1'
6221 def_rtc
='#undef HAVE_RTC'
6226 echocheck
"liblzo2 support"
6227 if test "$_liblzo" = auto
; then
6230 #include <lzo/lzo1x.h>
6231 int main(void) { lzo_init();return 0; }
6233 cc_check
-llzo2 && _liblzo
=yes
6235 if test "$_liblzo" = yes ; then
6236 def_liblzo
='#define CONFIG_LIBLZO 1'
6237 extra_ldflags
="$extra_ldflags -llzo2"
6238 _codecmodules
="liblzo $_codecmodules"
6240 def_liblzo
='#undef CONFIG_LIBLZO'
6241 _nocodecmodules
="liblzo $_nocodecmodules"
6246 echocheck
"mad support"
6247 if test "$_mad" = auto
; then
6251 int main(void) { return 0; }
6253 cc_check
-lmad && _mad
=yes
6255 if test "$_mad" = yes ; then
6256 def_mad
='#define CONFIG_LIBMAD 1'
6257 extra_ldflags
="$extra_ldflags -lmad"
6258 _codecmodules
="libmad $_codecmodules"
6260 def_mad
='#undef CONFIG_LIBMAD'
6261 _nocodecmodules
="libmad $_nocodecmodules"
6266 if test "$_twolame" = auto
; then
6268 #include <twolame.h>
6269 int main(void) { twolame_init(); return 0; }
6272 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6274 if test "$_twolame" = yes ; then
6275 def_twolame
='#define CONFIG_TWOLAME 1'
6276 libs_mencoder
="$libs_mencoder -ltwolame"
6277 _codecmodules
="twolame $_codecmodules"
6279 def_twolame
='#undef CONFIG_TWOLAME'
6280 _nocodecmodules
="twolame $_nocodecmodules"
6285 if test "$_toolame" = auto
; then
6287 if test "$_twolame" = yes ; then
6288 _res_comment
="disabled by twolame"
6291 #include <toolame.h>
6292 int main(void) { toolame_init(); return 0; }
6294 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6297 if test "$_toolame" = yes ; then
6298 def_toolame
='#define CONFIG_TOOLAME 1'
6299 libs_mencoder
="$libs_mencoder -ltoolame"
6300 _codecmodules
="toolame $_codecmodules"
6302 def_toolame
='#undef CONFIG_TOOLAME'
6303 _nocodecmodules
="toolame $_nocodecmodules"
6305 if test "$_toolamedir" ; then
6306 _res_comment
="using $_toolamedir"
6310 echocheck
"OggVorbis support"
6311 if test "$_tremor_internal" = yes; then
6313 elif test "$_tremor" = auto
; then
6316 #include <tremor/ivorbiscodec.h>
6317 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6319 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6321 if test "$_libvorbis" = auto
; then
6324 #include <vorbis/codec.h>
6325 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6327 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6329 if test "$_tremor_internal" = yes ; then
6331 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6332 def_tremor
='#define CONFIG_TREMOR 1'
6333 _codecmodules
="tremor(internal) $_codecmodules"
6334 _res_comment
="internal Tremor"
6335 if test "$_tremor_low" = yes ; then
6336 cflags_tremor_low
="-D_LOW_ACCURACY_"
6337 _res_comment
="internal low accuracy Tremor"
6339 elif test "$_tremor" = yes ; then
6341 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6342 def_tremor
='#define CONFIG_TREMOR 1'
6343 _codecmodules
="tremor(external) $_codecmodules"
6344 _res_comment
="external Tremor"
6345 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6346 elif test "$_libvorbis" = yes ; then
6348 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6349 _codecmodules
="libvorbis $_codecmodules"
6350 _res_comment
="libvorbis"
6351 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6354 _nocodecmodules
="libvorbis $_nocodecmodules"
6358 echocheck
"libspeex (version >= 1.1 required)"
6359 if test "$_speex" = auto
; then
6362 #include <speex/speex.h>
6363 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6365 cc_check
-lspeex $_ld_lm && _speex
=yes
6367 if test "$_speex" = yes ; then
6368 def_speex
='#define CONFIG_SPEEX 1'
6369 extra_ldflags
="$extra_ldflags -lspeex"
6370 _codecmodules
="speex $_codecmodules"
6372 def_speex
='#undef CONFIG_SPEEX'
6373 _nocodecmodules
="speex $_nocodecmodules"
6377 echocheck
"OggTheora support"
6378 if test "$_theora" = auto
; then
6381 #include <theora/theora.h>
6384 /* Theora is in flux, make sure that all interface routines and datatypes
6385 * exist and work the way we expect it, so we don't break MPlayer. */
6394 theora_info_init(&inf);
6395 theora_comment_init(&tc);
6399 /* we don't want to execute this kind of nonsense; just for making sure
6400 * that compilation works... */
6401 memset(&op, 0, sizeof(op));
6402 r = theora_decode_header(&inf, &tc, &op);
6403 r = theora_decode_init(&st, &inf);
6404 t = theora_granule_time(&st, op.granulepos);
6405 r = theora_decode_packetin(&st, &op);
6406 r = theora_decode_YUVout(&st, &yuv);
6412 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6413 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6414 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6415 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6416 if test _theora
= no
; then
6417 _ld_theora
="-ltheora -logg"
6418 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6420 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6421 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6422 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6423 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6424 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6425 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6426 if test _theora
= no
; then
6427 _ld_theora
="-ltheora -logg"
6428 cc_check tremor
/bitwise.c
$_ld_theora &&
6429 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6433 if test "$_theora" = yes ; then
6434 def_theora
='#define CONFIG_OGGTHEORA 1'
6435 _codecmodules
="libtheora $_codecmodules"
6436 # when --enable-theora is forced, we'd better provide a probably sane
6437 # $_ld_theora than nothing
6438 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6440 def_theora
='#undef CONFIG_OGGTHEORA'
6441 _nocodecmodules
="libtheora $_nocodecmodules"
6445 echocheck
"internal mp3lib support"
6446 if test "$_mp3lib" = auto
; then
6447 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6449 if test "$_mp3lib" = yes ; then
6450 def_mp3lib
='#define CONFIG_MP3LIB 1'
6451 _codecmodules
="mp3lib(internal) $_codecmodules"
6453 def_mp3lib
='#undef CONFIG_MP3LIB'
6454 _nocodecmodules
="mp3lib(internal) $_nocodecmodules"
6458 echocheck
"liba52 support"
6459 if test "$_liba52_internal" = auto
; then
6460 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _liba52_internal
=no || _liba52_internal
=yes
6462 def_liba52
='#undef CONFIG_LIBA52'
6463 def_liba52_internal
="#undef CONFIG_LIBA52_INTERNAL"
6464 if test "$_liba52_internal" = yes ; then
6466 def_liba52_internal
="#define CONFIG_LIBA52_INTERNAL 1"
6467 _res_comment
="internal"
6468 elif test "$_liba52_internal" = no
&& test "$_liba52" = auto
; then
6471 #include <inttypes.h>
6472 #include <a52dec/a52.h>
6473 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6475 cc_check
-la52 && _liba52
=yes && _res_comment
="external" && extra_ldflags
="$extra_ldflags -la52"
6477 if test "$_liba52" = yes ; then
6478 def_liba52
='#define CONFIG_LIBA52 1'
6479 _codecmodules
="liba52($_res_comment) $_codecmodules"
6481 _nocodecmodules
="liba52 $_nocodecmodules"
6485 echocheck
"internal libmpeg2 support"
6486 if test "$_libmpeg2" = auto
; then
6488 if alpha
&& test cc_vendor
=gnu
; then
6490 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6492 _res_comment
="broken gcc"
6497 if test "$_libmpeg2" = yes ; then
6498 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6499 _codecmodules
="libmpeg2(internal) $_codecmodules"
6501 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6502 _nocodecmodules
="libmpeg2(internal) $_nocodecmodules"
6504 echores
"$_libmpeg2"
6506 echocheck
"libdca support"
6507 if test "$_libdca" = auto
; then
6510 #include <inttypes.h>
6512 int main(void) { dts_init(0); return 0; }
6514 for _ld_dca
in -ldca -ldts ; do
6515 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6516 && _libdca
=yes && break
6519 if test "$_libdca" = yes ; then
6520 def_libdca
='#define CONFIG_LIBDCA 1'
6521 _codecmodules
="libdca $_codecmodules"
6523 def_libdca
='#undef CONFIG_LIBDCA'
6524 _nocodecmodules
="libdca $_nocodecmodules"
6528 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6529 if test "$_musepack" = auto
; then
6533 #include <mpcdec/mpcdec.h>
6535 mpc_streaminfo info;
6536 mpc_decoder decoder;
6537 mpc_decoder_set_streaminfo(&decoder, &info);
6538 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6542 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6544 if test "$_musepack" = yes ; then
6545 def_musepack
='#define CONFIG_MUSEPACK 1'
6546 extra_ldflags
="$extra_ldflags -lmpcdec"
6547 _codecmodules
="musepack $_codecmodules"
6549 def_musepack
='#undef CONFIG_MUSEPACK'
6550 _nocodecmodules
="musepack $_nocodecmodules"
6552 echores
"$_musepack"
6555 echocheck
"FAAC support"
6556 if test "$_faac" = auto
; then
6558 #include <inttypes.h>
6560 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6563 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6564 cc_check
-O2 $_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6567 if test "$_faac" = yes ; then
6568 def_faac
="#define CONFIG_FAAC 1"
6569 _codecmodules
="faac $_codecmodules"
6571 def_faac
="#undef CONFIG_FAAC"
6572 _nocodecmodules
="faac $_nocodecmodules"
6577 echocheck
"FAAD2 support"
6578 if test "$_faad_internal" = auto
; then
6579 if x86_32
&& test cc_vendor
=gnu
; then
6581 3.1*|
3.2) # ICE/insn with these versions
6583 _res_comment
="broken gcc"
6595 if test "$_faad" = auto
; then
6598 #ifndef FAAD_MIN_STREAMSIZE
6599 #error Too old version
6601 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6602 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6604 cc_check
-lfaad $_ld_lm && _faad
=yes
6607 def_faad
='#undef CONFIG_FAAD'
6608 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6609 if test "$_faad_internal" = yes ; then
6610 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6611 _res_comment
="internal floating-point"
6612 if test "$_faad_fixed" = yes ; then
6613 # The FIXED_POINT implementation of FAAD2 improves performance
6614 # on some platforms, especially for SBR files.
6615 cflags_faad_fixed
="-DFIXED_POINT"
6616 _res_comment
="internal fixed-point"
6618 elif test "$_faad" = yes ; then
6619 extra_ldflags
="$extra_ldflags -lfaad"
6622 if test "$_faad" = yes ; then
6623 def_faad
='#define CONFIG_FAAD 1'
6624 if test "$_faad_internal" = yes ; then
6625 _codecmodules
="faad2(internal) $_codecmodules"
6627 _codecmodules
="faad2 $_codecmodules"
6631 _nocodecmodules
="faad2 $_nocodecmodules"
6636 echocheck
"LADSPA plugin support"
6637 if test "$_ladspa" = auto
; then
6642 const LADSPA_Descriptor *ld = NULL;
6647 cc_check
&& _ladspa
=yes
6649 if test "$_ladspa" = yes; then
6650 def_ladspa
="#define CONFIG_LADSPA 1"
6652 def_ladspa
="#undef CONFIG_LADSPA"
6657 echocheck
"libbs2b audio filter support"
6658 if test "$_libbs2b" = auto
; then
6661 #if BS2B_VERSION_MAJOR < 3
6662 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6672 if $_pkg_config --exists libbs2b
; then
6673 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6674 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6675 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6676 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6678 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6679 -I/usr
/local
/include
/bs2b
; do
6680 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6681 extra_ldflags
="$extra_ldflags -lbs2b"
6682 extra_cflags
="$extra_cflags $_inc_tmp"
6689 def_libbs2b
="#undef CONFIG_LIBBS2B"
6690 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6694 if test -z "$_codecsdir" ; then
6695 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6696 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6697 if test -d "$dir" ; then
6703 # Fall back on default directory.
6704 if test -z "$_codecsdir" ; then
6705 _codecsdir
="$_libdir/codecs"
6706 mingw32
&& _codecsdir
="codecs"
6707 os2
&& _codecsdir
="codecs"
6711 echocheck
"Win32 codecs"
6712 if test "$_win32dll" = auto
; then
6714 if x86_32
&& ! qnx
; then
6718 if test "$_win32dll" = yes ; then
6719 def_win32dll
='#define CONFIG_WIN32DLL 1'
6720 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6721 _res_comment
="using $_win32codecsdir"
6723 def_win32_loader
='#define WIN32_LOADER 1'
6724 _win32_emulation
=yes
6726 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6727 _res_comment
="using native windows"
6729 _codecmodules
="win32 $_codecmodules"
6731 def_win32dll
='#undef CONFIG_WIN32DLL'
6732 def_win32_loader
='#undef WIN32_LOADER'
6733 _nocodecmodules
="win32 $_nocodecmodules"
6735 echores
"$_win32dll"
6738 echocheck
"XAnim codecs"
6739 if test "$_xanim" = auto
; then
6741 _res_comment
="dynamic loader support needed"
6742 if test "$_dl" = yes ; then
6746 if test "$_xanim" = yes ; then
6747 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6748 def_xanim
='#define CONFIG_XANIM 1'
6749 def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6750 _codecmodules
="xanim $_codecmodules"
6751 _res_comment
="using $_xanimcodecsdir"
6753 def_xanim
='#undef CONFIG_XANIM'
6754 def_xanim_path
='#undef XACODEC_PATH'
6755 _nocodecmodules
="xanim $_nocodecmodules"
6760 echocheck
"RealPlayer codecs"
6761 if test "$_real" = auto
; then
6763 _res_comment
="dynamic loader support needed"
6764 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6765 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
6769 if test "$_real" = yes ; then
6770 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6771 def_real
='#define CONFIG_REALCODECS 1'
6772 def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6773 _codecmodules
="real $_codecmodules"
6774 _res_comment
="using $_realcodecsdir"
6776 def_real
='#undef CONFIG_REALCODECS'
6777 def_real_path
="#undef REALCODEC_PATH"
6778 _nocodecmodules
="real $_nocodecmodules"
6783 echocheck
"QuickTime codecs"
6785 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6786 if test "$_qtx" = auto
; then
6787 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6789 if test "$_qtx" = yes ; then
6790 def_qtx
='#define CONFIG_QTX_CODECS 1'
6791 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6792 _codecmodules
="qtx $_codecmodules"
6793 darwin || win32 || _qtx_emulation
=yes
6795 def_qtx
='#undef CONFIG_QTX_CODECS'
6796 _nocodecmodules
="qtx $_nocodecmodules"
6800 echocheck
"Nemesi Streaming Media libraries"
6801 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
6803 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6804 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6805 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6809 if test "$_nemesi" = yes; then
6811 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6812 _inputmodules
="nemesi $_inputmodules"
6814 _native_rtsp
="$_network"
6816 def_nemesi
='#undef CONFIG_LIBNEMESI'
6817 _noinputmodules
="nemesi $_noinputmodules"
6821 echocheck
"LIVE555 Streaming Media libraries"
6822 if test "$_live" = auto
&& test "$_network" = yes ; then
6823 cat > $TMPCPP << EOF
6824 #include <liveMedia.hh>
6825 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6826 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6828 int main(void) { return 0; }
6832 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
6833 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6834 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6835 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6836 $_livelibdir/groupsock/libgroupsock.a \
6837 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6838 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6839 $extra_ldflags -lstdc++" \
6840 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6841 -I$_livelibdir/UsageEnvironment/include \
6842 -I$_livelibdir/BasicUsageEnvironment/include \
6843 -I$_livelibdir/groupsock/include" && \
6846 if test "$_live" != yes ; then
6847 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6848 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6853 if test "$_live" = yes && test "$_network" = yes; then
6854 test $_livelibdir && _res_comment
="using $_livelibdir"
6855 def_live
='#define CONFIG_LIVE555 1'
6856 _inputmodules
="live555 $_inputmodules"
6857 elif test "$_live_dist" = yes && test "$_network" = yes; then
6858 _res_comment
="using distribution version"
6860 def_live
='#define CONFIG_LIVE555 1'
6861 extra_ldflags
="$extra_ldflags $ld_tmp"
6862 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6863 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6864 _inputmodules
="live555 $_inputmodules"
6867 def_live
='#undef CONFIG_LIVE555'
6868 _noinputmodules
="live555 $_noinputmodules"
6873 echocheck
"FFmpeg libavutil"
6874 if test "$_libavutil" = auto
; then
6877 #include <libavutil/common.h>
6878 int main(void) { av_gcd(1,1); return 0; }
6880 if $_pkg_config --exists libavutil
; then
6881 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
6882 _ld_tmp
=$
($_pkg_config --libs libavutil
)
6883 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" extra_cflags
="$extra_cflags $_inc_libavutil" \
6885 elif cc_check
-lavutil $_ld_lm ; then
6886 extra_ldflags
="$extra_ldflags -lavutil"
6890 def_libavutil
='#undef CONFIG_LIBAVUTIL'
6891 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
6892 # libavutil is not available, but it is mandatory ...
6893 if test "$_libavutil" = no
; then
6894 die
"You need libavutil, MPlayer will not compile without!"
6896 echores
"$_libavutil"
6898 echocheck
"FFmpeg libavcodec"
6899 if test "$_libavcodec" = auto
; then
6902 #include <libavcodec/avcodec.h>
6903 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6905 if $_pkg_config --exists libavcodec
; then
6906 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
6907 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
6908 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libavcodec" \
6910 elif cc_check
-lavcodec $_ld_lm ; then
6911 extra_ldflags
="$extra_ldflags -lavcodec"
6915 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
6916 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
6917 if test "$_libavcodec" = yes ; then
6918 _codecmodules
="libavcodec $_codecmodules"
6920 _nocodecmodules
="libavcodec $_nocodecmodules"
6922 echores
"$_libavcodec"
6924 echocheck
"FFmpeg libavformat"
6925 if test "$_libavformat" = auto
; then
6928 #include <libavformat/avformat.h>
6929 #include <libavcodec/opt.h>
6930 int main(void) { av_alloc_format_context(); return 0; }
6932 if $_pkg_config --exists libavformat
; then
6933 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
6934 _ld_tmp
=$
($_pkg_config --libs libavformat
)
6935 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libavformat" \
6937 elif cc_check
$_ld_lm -lavformat ; then
6938 extra_ldflags
="$extra_ldflags -lavformat"
6942 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
6943 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
6944 echores
"$_libavformat"
6946 echocheck
"FFmpeg libpostproc"
6947 if test "$_libpostproc" = auto
; then
6950 #include <inttypes.h>
6951 #include <libpostproc/postprocess.h>
6952 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6954 if $_pkg_config --exists libpostproc
; then
6955 _inc_libpostproc
=$
($_pkg_config --cflags libpostproc
)
6956 _ld_tmp
=$
($_pkg_config --libs libpostproc
)
6957 cc_check
$_inc_libpostproc $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_libpostproc" \
6959 elif cc_check
-lpostproc $_ld_lm ; then
6960 extra_ldflags
="$extra_ldflags -lpostproc"
6964 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
6965 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
6966 echores
"$_libpostproc"
6968 echocheck
"FFmpeg libswscale"
6969 if test "$_libswscale" = auto
; then
6972 #include <libswscale/swscale.h>
6973 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
6975 if $_pkg_config --exists libswscale
; then
6976 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
6977 _ld_tmp
=$
($_pkg_config --libs libswscale
)
6978 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" extra_cflags
="$extra_cflags $_inc_libswscale" \
6980 elif cc_check
-lswscale ; then
6981 extra_ldflags
="$extra_ldflags -lswscale"
6985 def_libswscale
='#undef CONFIG_LIBSWSCALE'
6986 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
6987 echores
"$_libswscale"
6989 def_libswscale_internals
="#undef CONFIG_LIBSWSCALE_INTERNALS"
6990 if ! test -z "$_ffmpeg_source" ; then
6991 test "$_libswscale" = yes && def_libswscale_internals
="#define CONFIG_LIBSWSCALE_INTERNALS 1" && _libswscale_internals
=yes
6994 def_libavcodec_internals
="#undef CONFIG_LIBAVCODEC_INTERNALS"
6995 if ! test -z "$_ffmpeg_source" ; then
6996 test "$_libavcodec" = yes && def_libavcodec_internals
="#define CONFIG_LIBAVCODEC_INTERNALS 1" && _libavcodec_internals
=yes
6999 echocheck
"libdv-0.9.5+"
7000 if test "$_libdv" = auto
; then
7003 #include <libdv/dv.h>
7004 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7006 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7008 if test "$_libdv" = yes ; then
7009 def_libdv
='#define CONFIG_LIBDV095 1'
7010 extra_ldflags
="$extra_ldflags -ldv"
7011 _codecmodules
="libdv $_codecmodules"
7013 def_libdv
='#undef CONFIG_LIBDV095'
7014 _nocodecmodules
="libdv $_nocodecmodules"
7020 if test "$_xvid" = auto
; then
7024 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7026 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7027 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7031 if test "$_xvid" = yes ; then
7032 def_xvid
='#define CONFIG_XVID4 1'
7033 _codecmodules
="xvid $_codecmodules"
7035 def_xvid
='#undef CONFIG_XVID4'
7036 _nocodecmodules
="xvid $_nocodecmodules"
7041 if test "$_x264" = auto
; then
7043 #include <inttypes.h>
7046 #error We do not support old versions of x264. Get the latest from git.
7048 int main(void) { x264_encoder_open((void*)0); return 0; }
7051 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7052 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7056 if test "$_x264" = yes ; then
7057 def_x264
='#define CONFIG_X264 1'
7058 _codecmodules
="x264 $_codecmodules"
7060 def_x264
='#undef CONFIG_X264'
7061 _nocodecmodules
="x264 $_nocodecmodules"
7066 if test "$_libnut" = auto
; then
7070 #include <inttypes.h>
7072 nut_context_tt * nut;
7073 int main(void) { (void)nut_error(0); return 0; }
7076 cc_check
-lnut && _libnut
=yes
7079 if test "$_libnut" = yes ; then
7080 def_libnut
='#define CONFIG_LIBNUT 1'
7081 extra_ldflags
="$extra_ldflags -lnut"
7083 def_libnut
='#undef CONFIG_LIBNUT'
7087 # These VO checks must be done after libavcodec/libswscale one
7088 echocheck
"/dev/mga_vid"
7089 if test "$_mga" = auto
; then
7091 test -c /dev
/mga_vid
&& _mga
=yes
7093 if test "$_mga" = yes ; then
7094 if test "$_libswscale_internals" = yes ; then
7095 def_mga
='#define CONFIG_MGA 1'
7096 _vomodules
="mga $_vomodules"
7098 _res_comment
="libswscale internal headers are required by mga, sorry"
7099 def_mga
='#undef CONFIG_MGA'
7100 _novomodules
="mga $_novomodules"
7103 def_mga
='#undef CONFIG_MGA'
7104 _novomodules
="mga $_novomodules"
7110 if test "$_xmga" = auto
; then
7112 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
7114 if test "$_xmga" = yes ; then
7115 if test "$_libswscale_internals" = yes ; then
7116 def_xmga
='#define CONFIG_XMGA 1'
7117 _vomodules
="xmga $_vomodules"
7119 _res_comment
="libswscale internal headers are required by mga, sorry"
7120 def_xmga
='#undef CONFIG_XMGA'
7121 _novomodules
="xmga $_novomodules"
7124 def_xmga
='#undef CONFIG_XMGA'
7125 _novomodules
="xmga $_novomodules"
7130 if test "$_zr" = auto
; then
7131 #36067's seem to identify themselves as 36057PQC's, so the line
7132 #below should work for 36067's and 36057's.
7133 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7139 if test "$_zr" = yes ; then
7140 if test "$_libavcodec_internals" = yes ; then
7141 def_zr
='#define CONFIG_ZR 1'
7142 _vomodules
="zr zr2 $_vomodules"
7144 _res_comment
="libavcodec internal headers are required by zr, sorry"
7145 _novomodules
="zr $_novomodules"
7146 def_zr
='#undef CONFIG_ZR'
7149 def_zr
='#undef CONFIG_ZR'
7150 _novomodules
="zr zr2 $_novomodules"
7154 # mencoder requires (optional) those libs: libmp3lame
7155 if test "$_mencoder" != no
; then
7157 echocheck
"libmp3lame"
7158 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7159 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7160 if test "$_mp3lame" = auto
; then
7163 #include <lame/lame.h>
7164 int main(void) { lame_version_t lv; (void) lame_init();
7165 get_lame_version_numerical(&lv);
7168 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7170 if test "$_mp3lame" = yes ; then
7171 def_mp3lame
="#define CONFIG_MP3LAME 1"
7172 _ld_mp3lame
=-lmp3lame
7173 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7175 #include <lame/lame.h>
7176 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7178 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7180 #include <lame/lame.h>
7181 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7183 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7185 def_mp3lame
='#undef CONFIG_MP3LAME'
7189 fi # test "$_mencoder" != no
7191 echocheck
"mencoder"
7192 if test "$_mencoder" = yes ; then
7193 def_muxers
='#define CONFIG_MUXERS 1'
7195 def_muxers
='#define CONFIG_MUXERS 0'
7197 echores
"$_mencoder"
7200 echocheck
"UnRAR executable"
7201 if test "$_unrar_exec" = auto
; then
7203 mingw32
&& _unrar_exec
="no"
7205 if test "$_unrar_exec" = yes ; then
7206 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7208 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7210 echores
"$_unrar_exec"
7212 echocheck
"TV interface"
7213 if test "$_tv" = yes ; then
7214 def_tv
='#define CONFIG_TV 1'
7215 _inputmodules
="tv $_inputmodules"
7217 _noinputmodules
="tv $_noinputmodules"
7218 def_tv
='#undef CONFIG_TV'
7223 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7224 echocheck
"*BSD BT848 bt8xx header"
7226 for file in "machine/ioctl_bt848.h" \
7227 "dev/bktr/ioctl_bt848.h" \
7228 "dev/video/bktr/ioctl_bt848.h" \
7229 "dev/ic/bt8xx.h" ; do
7231 #include <sys/types.h>
7232 #include <sys/ioctl.h>
7234 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7238 _ioctl_bt848_h_name
="$file"
7242 if test "$_ioctl_bt848_h" = yes ; then
7243 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7244 _res_comment
="using $_ioctl_bt848_h_name"
7246 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7248 echores
"$_ioctl_bt848_h"
7250 echocheck
"*BSD ioctl_meteor.h"
7252 for file in "machine/ioctl_meteor.h" \
7253 "dev/bktr/ioctl_meteor.h" \
7254 "dev/video/bktr/ioctl_meteor.h" ; do
7256 #include <sys/types.h>
7258 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7262 _ioctl_meteor_h_name
="$file"
7266 if test "$_ioctl_meteor_h" = yes ; then
7267 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7268 _res_comment
="using $_ioctl_meteor_h_name"
7270 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7272 echores
"$_ioctl_meteor_h"
7274 echocheck
"*BSD BrookTree 848 TV interface"
7275 if test "$_tv_bsdbt848" = auto
; then
7277 if test "$_tv" = yes ; then
7279 #include <sys/types.h>
7280 $def_ioctl_meteor_h_name
7281 $def_ioctl_bt848_h_name
7282 #ifdef IOCTL_METEOR_H_NAME
7283 #include IOCTL_METEOR_H_NAME
7285 #ifdef IOCTL_BT848_H_NAME
7286 #include IOCTL_BT848_H_NAME
7289 ioctl(0, METEORSINPUT, 0);
7290 ioctl(0, TVTUNER_GETFREQ, 0);
7294 cc_check
&& _tv_bsdbt848
=yes
7297 if test "$_tv_bsdbt848" = yes ; then
7298 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7299 _inputmodules
="tv-bsdbt848 $_inputmodules"
7301 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7302 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7304 echores
"$_tv_bsdbt848"
7305 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7308 echocheck
"DirectShow TV interface"
7309 if test "$_tv_dshow" = auto
; then
7311 if test "$_tv" = yes && win32
; then
7316 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7320 cc_check
-lole32 -luuid && _tv_dshow
=yes
7323 if test "$_tv_dshow" = yes ; then
7324 _inputmodules
="tv-dshow $_inputmodules"
7325 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7326 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7328 _noinputmodules
="tv-dshow $_noinputmodules"
7329 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7331 echores
"$_tv_dshow"
7334 echocheck
"Video 4 Linux TV interface"
7335 if test "$_tv_v4l1" = auto
; then
7337 if test "$_tv" = yes && linux
; then
7340 #include <linux/videodev.h>
7341 int main(void) { return 0; }
7343 cc_check
&& _tv_v4l1
=yes
7346 if test "$_tv_v4l1" = yes ; then
7349 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7350 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7351 _inputmodules
="tv-v4l $_inputmodules"
7353 _noinputmodules
="tv-v4l1 $_noinputmodules"
7354 def_tv_v4l
='#undef CONFIG_TV_V4L'
7359 echocheck
"Video 4 Linux 2 TV interface"
7360 if test "$_tv_v4l2" = auto
; then
7362 if test "$_tv" = yes && linux
; then
7365 #include <linux/types.h>
7366 #include <linux/videodev2.h>
7367 int main(void) { return 0; }
7369 cc_check
&& _tv_v4l2
=yes
7372 if test "$_tv_v4l2" = yes ; then
7375 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7376 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7377 _inputmodules
="tv-v4l2 $_inputmodules"
7379 _noinputmodules
="tv-v4l2 $_noinputmodules"
7380 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7385 echocheck
"Radio interface"
7386 if test "$_radio" = yes ; then
7387 def_radio
='#define CONFIG_RADIO 1'
7388 _inputmodules
="radio $_inputmodules"
7389 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7392 if test "$_radio_capture" = yes ; then
7394 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7396 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7399 _noinputmodules
="radio $_noinputmodules"
7400 def_radio
='#undef CONFIG_RADIO'
7401 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7405 echocheck
"Capture for Radio interface"
7406 echores
"$_radio_capture"
7408 echocheck
"Video 4 Linux 2 Radio interface"
7409 if test "$_radio_v4l2" = auto
; then
7411 if test "$_radio" = yes && linux
; then
7414 #include <linux/types.h>
7415 #include <linux/videodev2.h>
7416 int main(void) { return 0; }
7418 cc_check
&& _radio_v4l2
=yes
7421 if test "$_radio_v4l2" = yes ; then
7422 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7424 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7426 echores
"$_radio_v4l2"
7428 echocheck
"Video 4 Linux Radio interface"
7429 if test "$_radio_v4l" = auto
; then
7431 if test "$_radio" = yes && linux
; then
7434 #include <linux/videodev.h>
7435 int main(void) { return 0; }
7437 cc_check
&& _radio_v4l
=yes
7440 if test "$_radio_v4l" = yes ; then
7441 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7443 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7445 echores
"$_radio_v4l"
7447 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7448 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7449 echocheck
"*BSD BrookTree 848 Radio interface"
7452 #include <sys/types.h>
7453 $def_ioctl_bt848_h_name
7454 #ifdef IOCTL_BT848_H_NAME
7455 #include IOCTL_BT848_H_NAME
7457 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7459 cc_check
&& _radio_bsdbt848
=yes
7460 echores
"$_radio_bsdbt848"
7461 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7463 if test "$_radio_bsdbt848" = yes ; then
7464 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7466 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7469 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7470 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7471 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7474 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7475 if test "$_pvr" = auto
; then
7477 if test "$_tv_v4l2" = yes && linux
; then
7480 #include <inttypes.h>
7481 #include <linux/types.h>
7482 #include <linux/videodev2.h>
7483 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7485 cc_check
&& _pvr
=yes
7488 if test "$_pvr" = yes ; then
7489 def_pvr
='#define CONFIG_PVR 1'
7490 _inputmodules
="pvr $_inputmodules"
7492 _noinputmodules
="pvr $_noinputmodules"
7493 def_pvr
='#undef CONFIG_PVR'
7499 if ! beos
&& test "$_ftp" = yes ; then
7500 def_ftp
='#define CONFIG_FTP 1'
7501 _inputmodules
="ftp $_inputmodules"
7503 _noinputmodules
="ftp $_noinputmodules"
7504 def_ftp
='#undef CONFIG_FTP'
7508 echocheck
"vstream client"
7509 if test "$_vstream" = auto
; then
7512 #include <vstream-client.h>
7513 void vstream_error(const char *format, ... ) {}
7514 int main(void) { vstream_start(); return 0; }
7516 cc_check
-lvstream-client && _vstream
=yes
7518 if test "$_vstream" = yes ; then
7519 def_vstream
='#define CONFIG_VSTREAM 1'
7520 _inputmodules
="vstream $_inputmodules"
7521 extra_ldflags
="$extra_ldflags -lvstream-client"
7523 _noinputmodules
="vstream $_noinputmodules"
7524 def_vstream
='#undef CONFIG_VSTREAM'
7529 echocheck
"OSD menu"
7530 if test "$_menu" = yes ; then
7531 def_menu
='#define CONFIG_MENU 1'
7532 test $_dvbin = "yes" && _menu_dvbin
=yes
7534 def_menu
='#undef CONFIG_MENU'
7540 echocheck
"Subtitles sorting"
7541 if test "$_sortsub" = yes ; then
7542 def_sortsub
='#define CONFIG_SORTSUB 1'
7544 def_sortsub
='#undef CONFIG_SORTSUB'
7549 echocheck
"XMMS inputplugin support"
7550 if test "$_xmms" = yes ; then
7551 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7552 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
7553 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
7555 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7556 _xmmslibdir
=/usr
/lib
7559 def_xmms
='#define CONFIG_XMMS 1'
7561 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
7563 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7566 def_xmms
='#undef CONFIG_XMMS'
7570 if test "$_charset" != "noconv" ; then
7571 def_charset
="#define MSG_CHARSET \"$_charset\""
7573 def_charset
="#undef MSG_CHARSET"
7577 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
7578 echocheck
"iconv program"
7579 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7580 if test "$?" -ne 0 ; then
7582 echo "No working iconv program found, use "
7583 echo "--charset=UTF-8 to continue anyway."
7584 echo "If you also have problems with iconv library functions use --charset=noconv."
7591 #############################################################################
7593 echocheck
"automatic gdb attach"
7594 if test "$_crash_debug" = yes ; then
7595 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
7597 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
7600 echores
"$_crash_debug"
7602 echocheck
"compiler support for noexecstack"
7604 int main(void) { return 0; }
7606 if cc_check
-Wl,-z,noexecstack
; then
7607 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
7614 # Dynamic linking flags
7615 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7617 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
7618 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
7619 _ld_dl_dynamic
='-rdynamic'
7622 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7623 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
7624 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
7626 def_debug
='#undef MP_DEBUG'
7627 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
7630 echocheck
"joystick"
7631 def_joystick
='#undef CONFIG_JOYSTICK'
7632 if test "$_joystick" = yes ; then
7634 # TODO add some check
7635 def_joystick
='#define CONFIG_JOYSTICK 1'
7638 _res_comment
="unsupported under $system_name"
7641 echores
"$_joystick"
7644 if test "$_lirc" = auto
; then
7647 #include <lirc/lirc_client.h>
7648 int main(void) { return 0; }
7650 cc_check
-llirc_client && _lirc
=yes
7652 if test "$_lirc" = yes ; then
7653 def_lirc
='#define CONFIG_LIRC 1'
7654 libs_mplayer
="$libs_mplayer -llirc_client"
7656 def_lirc
='#undef CONFIG_LIRC'
7661 if test "$_lircc" = auto
; then
7664 #include <lirc/lircc.h>
7665 int main(void) { return 0; }
7667 cc_check
-llircc && _lircc
=yes
7669 if test "$_lircc" = yes ; then
7670 def_lircc
='#define CONFIG_LIRCC 1'
7671 libs_mplayer
="$libs_mplayer -llircc"
7673 def_lircc
='#undef CONFIG_LIRCC'
7678 # Detect maemo development platform libraries availability (http://www.maemo.org),
7679 # they are used when run on Nokia 770|8x0
7680 echocheck
"maemo (Nokia 770|8x0)"
7681 if test "$_maemo" = auto
; then
7684 #include <libosso.h>
7685 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7687 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
7689 if test "$_maemo" = yes ; then
7690 def_maemo
='#define CONFIG_MAEMO 1'
7691 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7692 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7694 def_maemo
='#undef CONFIG_MAEMO'
7699 #############################################################################
7701 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7702 # the OMF format needs to come after the 'extern symbol prefix' check, which
7705 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7708 # linker paths should be the same for mencoder and mplayer
7710 for I
in $libs_mplayer ; do
7711 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
7712 if test -z "$_tmp" ; then
7713 extra_ldflags
="$extra_ldflags $I"
7715 _ld_tmp
="$_ld_tmp $I"
7718 libs_mplayer
=$_ld_tmp
7721 #############################################################################
7722 # 64 bit file offsets?
7723 if test "$_largefiles" = yes || freebsd
; then
7724 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7725 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7726 # dvdread support requires this (for off64_t)
7727 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7731 CXXFLAGS
=" $CFLAGS -Iffmpeg -D__STDC_LIMIT_MACROS"
7733 # This must be the last test to be performed. Any other tests following it
7734 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7735 # against libdvdread (to permit MPlayer to use its own copy of the library).
7736 # So any compilation using the flags added here but not linking against
7737 # libdvdread can fail.
7738 echocheck
"DVD support (libdvdnav)"
7739 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7743 if test "$_dvdnav" = auto
; then
7744 if test "$_dvdread_internal" = yes ; then
7747 _res_comment
="internal"
7749 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7752 if test "$_dvdnav" = auto
; then
7754 #include <inttypes.h>
7755 #include <dvdnav/dvdnav.h>
7756 int main(void) { dvdnav_t *dvd=0; return 0; }
7759 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7760 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7761 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7763 if test "$_dvdnav" = yes ; then
7765 def_dvdnav
='#define CONFIG_DVDNAV 1'
7766 if test "$dvdnav_internal" = yes ; then
7767 cflags_libdvdnav
="-Ilibdvdnav"
7768 _inputmodules
="dvdnav(internal) $_inputmodules"
7770 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7771 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7772 _inputmodules
="dvdnav $_inputmodules"
7775 def_dvdnav
='#undef CONFIG_DVDNAV'
7776 _noinputmodules
="dvdnav $_noinputmodules"
7780 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7781 # Read dvdnav comment above.
7783 #############################################################################
7784 echo "Creating config.mak"
7785 cat > config.mak
<< EOF
7786 # -------- Generated by configure -----------
7788 # Ensure that locale settings do not interfere with shell commands.
7791 CONFIGURATION = $_configuration
7794 DOC_LANGS = $language_doc
7795 DOC_LANG_ALL = $doc_lang_all
7796 MAN_LANGS = $language_man
7797 MAN_LANG_ALL = $man_lang_all
7799 prefix = \$(DESTDIR)$_prefix
7800 BINDIR = \$(DESTDIR)$_bindir
7801 DATADIR = \$(DESTDIR)$_datadir
7802 LIBDIR = \$(DESTDIR)$_libdir
7803 MANDIR = \$(DESTDIR)$_mandir
7804 CONFDIR = \$(DESTDIR)$_confdir
7813 INSTALLSTRIP = $_install_strip
7817 CFLAGS = $CFLAGS $extra_cflags
7818 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
7819 CFLAGS_DHAHELPER = $cflags_dhahelper
7820 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7821 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7822 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7823 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7824 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7825 CFLAGS_STACKREALIGN = $cflags_stackrealign
7826 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7827 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7828 YASMFLAGS = $YASMFLAGS
7830 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7831 EXTRALIBS_MPLAYER = $libs_mplayer
7832 EXTRALIBS_MENCODER = $libs_mencoder
7834 MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
7835 MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.hh,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
7838 HELP_FILE = $_mp_help
7846 $(echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/')
7848 MENCODER = $_mencoder
7851 NEED_GETTIMEOFDAY = $_need_gettimeofday
7852 NEED_GLOB = $_need_glob
7853 NEED_MMAP = $_need_mmap
7854 NEED_SETENV = $_need_setenv
7855 NEED_SHMEM = $_need_shmem
7856 NEED_STRSEP = $_need_strsep
7857 NEED_SWAB = $_need_swab
7858 NEED_VSSCANF = $_need_vsscanf
7866 APPLE_IR = $_apple_ir
7867 APPLE_REMOTE = $_apple_remote
7869 AUDIO_INPUT = $_audio_input
7870 BITMAP_FONT = $_bitmap_font
7875 COREAUDIO = $_coreaudio
7876 COREVIDEO = $_corevideo
7880 DIRECT3D = $_direct3d
7881 DIRECTFB = $_directfb
7885 DVDNAV_INTERNAL = $dvdnav_internal
7887 DVDREAD_INTERNAL = $_dvdread_internal
7893 FAAD_INTERNAL = $_faad_internal
7894 FASTMEMCPY = $_fastmemcpy
7896 FREETYPE = $_freetype
7901 GL_WIN32 = $_gl_win32
7903 MATRIXVIEW = $matrixview
7904 HAVE_POSIX_SELECT = $_posix_select
7905 HAVE_SYS_MMAN_H = $_mman
7908 JOYSTICK = $_joystick
7913 LIBA52_INTERNAL = $_liba52_internal
7918 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7922 LIBMENU_DVBIN = $_menu_dvbin
7923 LIBMPEG2 = $_libmpeg2
7924 LIBNEMESI = $_nemesi
7926 LIBSMBCLIENT = $_smb
7927 LIBTHEORA = $_theora
7930 MACOSX_BUNDLE = $_macosx_bundle
7931 MACOSX_FINDER = $_macosx_finder
7937 MUSEPACK = $_musepack
7939 NATIVE_RTSP = $_native_rtsp
7943 PE_EXECUTABLE = $_pe_executable
7946 PRIORITY = $_priority
7950 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7951 QTX_EMULATION = $_qtx_emulation
7954 RADIO_CAPTURE=$_radio_capture
7955 REAL_CODECS = $_real
7959 STREAM_CACHE = $_stream_cache
7960 SGIAUDIO = $_sgiaudio
7961 SUNAUDIO = $_sunaudio
7967 TREMOR_INTERNAL = $_tremor_internal
7969 TV_BSDBT848 = $_tv_bsdbt848
7970 TV_DSHOW = $_tv_dshow
7975 UNRAR_EXEC = $_unrar_exec
7981 VIDIX_PCIDB = $_vidix_pcidb_val
7982 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7983 VIDIX_IVTV=$_vidix_drv_ivtv
7984 VIDIX_MACH64=$_vidix_drv_mach64
7985 VIDIX_MGA=$_vidix_drv_mga
7986 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7987 VIDIX_NVIDIA=$_vidix_drv_nvidia
7988 VIDIX_PM2=$_vidix_drv_pm2
7989 VIDIX_PM3=$_vidix_drv_pm3
7990 VIDIX_RADEON=$_vidix_drv_radeon
7991 VIDIX_RAGE128=$_vidix_drv_rage128
7992 VIDIX_S3=$_vidix_drv_s3
7993 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7994 VIDIX_SIS=$_vidix_drv_sis
7995 VIDIX_UNICHROME=$_vidix_drv_unichrome
7999 WIN32DLL = $_win32dll
8000 WIN32WAVEOUT = $_win32waveout
8001 WIN32_EMULATION = $_win32_emulation
8002 WINVIDIX = $winvidix
8005 XANIM_CODECS = $_xanim
8007 XMMS_PLUGINS = $_xmms
8013 YUV4MPEG = $_yuv4mpeg
8017 LIBAVUTIL = $_libavutil
8018 LIBAVCODEC = $_libavcodec
8019 LIBAVFORMAT = $_libavformat
8020 LIBPOSTPROC = $_libpostproc
8021 LIBSWSCALE = $_libswscale
8022 LIBAVCODEC_INTERNALS = $_libavcodec_internals
8023 LIBSWSCALE_INTERNALS = $_libswscale_internals
8024 FFMPEG_SOURCE_PATH = $_ffmpeg_source
8026 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8029 CONFIG_FFT_MMX=$fft_mmx
8038 CONFIG_MLIB = $_mlib
8039 CONFIG_MUXERS=$_mencoder
8040 CONFIG_VDPAU=$_vdpau
8044 HAVE_PTHREADS = $_pthreads
8046 HAVE_W32THREADS = $_w32threads
8047 HAVE_YASM = $_have_yasm
8051 #############################################################################
8053 ff_config_enable
() {
8055 test -z "$_nprefix" && _nprefix
='CONFIG'
8057 if $
(echo $2 |
grep -q -E "(^| )$part($| )"); then
8058 echo "#define ${_nprefix}_$part 1"
8060 echo "#define ${_nprefix}_$part 0"
8065 echo "Creating config.h"
8067 /*----------------------------------------------------------------------------
8068 ** This file has been automatically generated by configure any changes in it
8069 ** will be lost when you run configure again.
8070 ** Instead of modifying definitions here, use the --enable/--disable options
8071 ** of the configure script! See ./configure --help for details.
8072 *---------------------------------------------------------------------------*/
8074 #ifndef MPLAYER_CONFIG_H
8075 #define MPLAYER_CONFIG_H
8077 /* Undefine this if you do not want to select mono audio (left or right)
8078 with a stereo MPEG layer 2/3 audio stream. The command line option
8079 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8080 right-only), with 0 being the default.
8082 #define CONFIG_FAKE_MONO 1
8084 /* set up audio OUTBURST. Do not change this! */
8085 #define OUTBURST 512
8087 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8089 #undef FAST_OSD_TABLE
8091 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8092 #define MPEG12_POSTPROC 1
8093 #define ATTRIBUTE_ALIGNED_MAX 16
8097 #define CONFIGURATION "$_configuration"
8099 #define MPLAYER_DATADIR "$_datadir"
8100 #define MPLAYER_CONFDIR "$_confdir"
8101 #define MPLAYER_LIBDIR "$_libdir"
8103 /* definitions needed by included libraries */
8104 #define HAVE_INTTYPES_H 1
8105 /* libmpeg2 + FFmpeg */
8108 #define HAVE_ERRNO_H 1
8109 /* libdvdcss + libdvdread */
8110 #define HAVE_LIMITS_H 1
8111 /* libdvdcss + libfaad2 */
8112 #define HAVE_UNISTD_H 1
8113 /* libfaad2 + libdvdread */
8114 #define STDC_HEADERS 1
8115 #define HAVE_MEMCPY 1
8117 #define HAVE_STRING_H 1
8118 #define HAVE_STRINGS_H 1
8119 #define HAVE_SYS_STAT_H 1
8120 #define HAVE_SYS_TYPES_H 1
8122 #define READ_CACHE_TRACE 0
8124 #define HAVE_DLFCN_H 1
8128 /* system headers */
8130 $def_alsa_asoundlib_h
8134 $def_mman_has_map_failed
8136 $def_sys_asoundlib_h
8137 $def_sys_soundcard_h
8144 /* system functions */
8175 /* system-specific features */
8189 $def_restrict_keyword
8194 /* configurable options */
8198 $def_dynamic_plugins
8201 $def_runtime_cpudetection
8209 #define __CPU__ $iproc
8212 $(ff_config_enable "$_arch_all" "$_arch" "ARCH")
8213 $(ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE")
8217 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8218 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8238 /* codec libraries */
8243 $def_liba52_internal
8251 $def_mp3lame_preset_medium
8274 #define WIN32_PATH "$_win32codecsdir"
8278 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8281 /* Audio output drivers */
8296 $def_ossaudio_devdsp
8297 $def_ossaudio_devmixer
8310 $def_ioctl_bt848_h_name
8311 $def_ioctl_meteor_h_name
8364 $def_directfb_version
8402 $def_vidix_drv_cyberblade
8404 $def_vidix_drv_mach64
8406 $def_vidix_drv_mga_crtc2
8407 $def_vidix_drv_nvidia
8409 $def_vidix_drv_radeon
8410 $def_vidix_drv_rage128
8412 $def_vidix_drv_sh_veu
8414 $def_vidix_drv_unichrome
8437 $def_libavcodec_internals
8438 $def_libswscale_internals
8440 #define CONFIG_DECODERS 1
8441 #define CONFIG_ENCODERS 1
8442 #define CONFIG_DEMUXERS 1
8462 #define CONFIG_FASTDIV 0
8463 #define CONFIG_FFSERVER 0
8464 #define CONFIG_GPL 1
8465 #define CONFIG_GRAY 0
8466 #define CONFIG_HARDCODED_TABLES 0
8467 #define CONFIG_LIBVORBIS 0
8468 #define CONFIG_POWERPC_PERF 0
8469 #define CONFIG_SMALL 0
8470 #define CONFIG_SWSCALE 1
8471 #define CONFIG_SWSCALE_ALPHA 1
8473 #define HAVE_ATTRIBUTE_PACKED 1
8474 #define HAVE_FAST_CLZ 0
8475 #define HAVE_GETHRTIME 0
8476 #define HAVE_INLINE_ASM 1
8477 #define HAVE_LDBRX 0
8478 #define HAVE_POLL_H 1
8479 #define HAVE_PPC4XX 0
8480 #define HAVE_VIRTUALALLOC 0
8482 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
8483 #define CONFIG_AANDCT 1
8484 #define CONFIG_FFT 1
8485 #define CONFIG_GOLOMB 1
8486 #define CONFIG_LPC 1
8487 #define CONFIG_MDCT 1
8488 #define CONFIG_RDFT 1
8490 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8493 #define HAVE_EBP_AVAILABLE 1
8495 #define HAVE_EBP_AVAILABLE 0
8498 #define CONFIG_H263_VAAPI_HWACCEL 0
8499 #define CONFIG_MPEG2_VAAPI_HWACCEL 0
8500 #define CONFIG_MPEG4_VAAPI_HWACCEL 0
8501 #define CONFIG_H264_VAAPI_HWACCEL 0
8502 #define CONFIG_VC1_VAAPI_HWACCEL 0
8503 #define CONFIG_WMV3_VAAPI_HWACCEL 0
8505 #endif /* MPLAYER_CONFIG_H */
8508 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8509 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
8511 #############################################################################
8513 .
/version.sh
`$_cc -dumpversion`
8517 Config files successfully generated by ./configure $_configuration !
8519 Install prefix: $_prefix
8520 Data directory: $_datadir
8521 Config direct.: $_confdir
8523 Byte order: $_byte_order
8524 Optimizing for: $_optimizing
8527 Messages: $language_msg
8528 Manual pages: $language_man
8529 Documentation: $language_doc
8531 Enabled optional drivers:
8532 Input: $_inputmodules
8533 Codecs: $_codecmodules
8534 Audio output: $_aomodules
8535 Video output: $_vomodules
8537 Disabled optional drivers:
8538 Input: $_noinputmodules
8539 Codecs: $_nocodecmodules
8540 Audio output: $_noaomodules
8541 Video output: $_novomodules
8543 'config.h' and 'config.mak' contain your configuration options.
8544 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8545 compile *** DO NOT REPORT BUGS if you tweak these files ***
8547 'make' will now compile MPlayer and 'make install' will install it.
8548 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8553 if test "$_mtrr" = yes ; then
8554 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
8560 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8561 operating system ($system_name). You may encounter a few files that cannot
8562 be played due to missing open source video/audio codec support.
8569 Check $TMPLOG if you wonder why an autodetection failed (make sure
8570 development headers/packages are installed).
8572 NOTE: The --enable-* parameters unconditionally force options on, completely
8573 skipping autodetection. This behavior is unlike what you may be used to from
8574 autoconf-based configure scripts that can decide to override you. This greater
8575 level of control comes at a price. You may have to provide the correct compiler
8576 and linker flags yourself.
8577 If you used one of these options (except --enable-menu and similar ones that
8578 turn on internal features) and experience a compilation or linking failure,
8579 make sure you have passed the necessary compiler/linker flags to configure.
8581 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
8585 if test "$_warn_CFLAGS" = yes; then
8588 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
8591 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8593 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8594 To do so, execute 'CFLAGS= ./configure <options>'
8600 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"