2001-10-25 13:46:50 +02:00
#! /bin/sh
2001-06-04 10:07:57 +02:00
#
2001-11-17 04:53:05 +01:00
# Original version (C) 2000 Pontscho/fresh!mindworkz
# pontscho@makacs.poliod.hu
2001-05-30 22:23:20 +02:00
#
2001-11-17 04:53:05 +01:00
# History / Contributors: check the cvs log !
2001-07-04 12:45:20 +02:00
#
2001-11-17 04:53:05 +01:00
# Cleanups all over the place (c) 2001 pl
2001-05-22 09:45:35 +02:00
#
2001-04-18 00:04:44 +02:00
#
2006-04-27 16:26:57 +02:00
# This configure script is *not* autoconf-based and has different semantics.
# It attempts to autodetect all settings and options where possible. It is
# possible to override autodetection with the --enable-option/--disable-option
# command line parameters. --enable-option forces the option on skipping
# autodetection. Yes, this means that compilation may fail and yes, this is not
# how autoconf-based configure scripts behave.
#
# configure generates a series of configuration files:
# - config.h contains #defines that are used in the C code.
2006-07-12 19:28:14 +02:00
# - config.mak is included from the Makefiles.
2006-04-27 16:26:57 +02:00
#
# If you want to add a new check for $feature, here is a simple skeleton:
#
# echocheck "$feature"
# if "$_feature" = auto; then
# cat > $TMPC << EOF
# #include <feature.h>
# int main(void) { return 0; }
# EOF
# _feature=no
# cc_check && _feature=yes
# if test "$_feature" = yes ; then
# _def_feature='#define HAVE_FEATURE 1'
# else
# _def_feature='#undef HAVE_FEATURE'
# fi
# echores "$_feature"
#
# Furthermore you need to add the variable _feature to the list of default
# settings and set it to one of yes/no/auto. Also add appropriate
# --enable-feature/--disable-feature command line options.
# The results of the check should be written to config.h and config.mak
# at the end of this script. The variable names used for this should be
# uniform, i.e. if the option is named 'feature':
#
# _feature : should have a value of yes/no/auto
# _def_feature : '#define ... 1' or '#undef ...' for conditional compilation
# _ld_feature : '-L/path/dir -lfeature' GCC options
2001-03-24 22:37:25 +01:00
#
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
2005-05-09 23:39:17 +02:00
# Prevent locale nonsense from breaking basic text processing utils
LC_ALL=C
export LC_ALL
2006-11-28 19:29:24 +01:00
# Store the configure line that was used
_configuration="$*"
2001-11-17 04:53:05 +01:00
# Prefer these macros to full length text !
# These macros only return an error code - NO display is done
2005-10-18 23:30:43 +02:00
compile_check() {
2001-11-19 01:38:41 +01:00
echo >> "$TMPLOG"
2005-10-18 23:30:43 +02:00
cat "$1" >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
echo >> "$TMPLOG"
2007-08-14 16:52:22 +02:00
echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
rm -f "$TMPEXE"
$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
2001-11-19 01:38:41 +01:00
TMP="$?"
echo >> "$TMPLOG"
echo >> "$TMPLOG"
return "$TMP"
2001-10-13 18:53:37 +02:00
}
2005-10-18 23:30:43 +02:00
cc_check() {
compile_check $TMPC $@
}
cxx_check() {
compile_check $TMPCPP $@ -lstdc++
}
2005-10-18 23:44:14 +02:00
tmp_run() {
2007-08-14 16:52:22 +02:00
"$TMPEXE" >> "$TMPLOG" 2>&1
2005-10-18 23:44:14 +02:00
}
2001-11-17 04:53:05 +01:00
# Display error message, flushes tempfile, exit
2001-10-13 22:14:05 +02:00
die () {
2001-11-17 04:53:05 +01:00
echo
echo "Error: $@" >&2
echo >&2
2007-08-14 16:52:22 +02:00
rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
2003-01-18 06:41:41 +01:00
echo "Check \"$TMPLOG\" if you do not understand why it failed."
2001-11-17 04:53:05 +01:00
exit 1
2001-10-13 18:53:37 +02:00
}
2001-11-17 04:53:05 +01:00
# OS test booleans functions
2001-12-01 18:17:32 +01:00
issystem() {
test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
}
2008-03-27 12:19:11 +01:00
linux() { issystem "Linux" || issystem "uClinux" ; return "$?" ; }
sunos() { issystem "SunOS" ; return "$?" ; }
hpux() { issystem "HP-UX" ; return "$?" ; }
irix() { issystem "IRIX" ; return "$?" ; }
aix() { issystem "AIX" ; return "$?" ; }
cygwin() { issystem "CYGWIN" ; return "$?" ; }
freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; return "$?" ; }
netbsd() { issystem "NetBSD" ; return "$?" ; }
bsdos() { issystem "BSD/OS" ; return "$?" ; }
openbsd() { issystem "OpenBSD" ; return "$?" ; }
2008-03-27 03:04:03 +01:00
dragonfly() { issystem "DragonFly" ; return "$?" ; }
2008-03-27 12:19:11 +01:00
qnx() { issystem "QNX" ; return "$?" ; }
darwin() { issystem "Darwin" ; return "$?" ; }
gnu() { issystem "GNU" ; return "$?" ; }
mingw32() { issystem "MINGW32" ; return "$?" ; }
morphos() { issystem "MorphOS" ; return "$?" ; }
amigaos() { issystem "AmigaOS" ; return "$?" ; }
win32() { cygwin || mingw32 ; return "$?" ; }
beos() { issystem "BEOS" ; return "$?" ; }
os2() { issystem "OS/2" ; return "$?" ; }
2001-10-13 18:53:37 +02:00
2001-11-19 13:04:19 +01:00
# arch test boolean functions
2002-05-23 16:38:40 +02:00
# x86/x86pc is used by QNX
2006-12-24 01:08:57 +01:00
x86_32() {
2001-11-19 13:04:19 +01:00
case "$host_arch" in
2002-06-14 00:44:28 +02:00
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;;
2001-11-19 13:04:19 +01:00
*) return 1 ;;
esac
}
2005-09-05 01:02:30 +02:00
x86_64() {
case "$host_arch" in
x86_64|amd64) return 0 ;;
*) return 1 ;;
esac
}
2006-12-24 01:08:57 +01:00
x86() {
x86_32 || x86_64
}
2002-06-06 18:46:05 +02:00
ppc() {
case "$host_arch" in
2007-04-23 19:40:25 +02:00
ppc|powerpc) return 0;;
2002-06-06 18:46:05 +02:00
*) return 1;;
esac
2003-10-22 20:23:28 +02:00
}
alpha() {
case "$host_arch" in
alpha) return 0;;
*) return 1;;
esac
2002-06-06 18:46:05 +02:00
}
2006-10-08 15:49:16 +02:00
arm() {
case "$host_arch" in
arm) return 0;;
*) return 1;;
esac
}
2007-07-26 10:21:42 +02:00
sh3() {
case "$host_arch" in
sh3) return 0;;
*) return 1;;
esac
}
2001-11-17 04:53:05 +01:00
# Use this before starting a check
echocheck() {
echo "============ Checking for $@ ============" >> "$TMPLOG"
2002-02-05 23:57:17 +01:00
echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
2001-11-17 04:53:05 +01:00
}
# Use this to echo the results of a check
echores() {
2005-09-12 12:05:06 +02:00
if test "$_res_comment" ; then
_res_comment="($_res_comment)"
fi
echo "Result is: $@ $_res_comment" >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
echo "##########################################" >> "$TMPLOG"
echo "" >> "$TMPLOG"
2005-09-12 12:05:06 +02:00
echo "$@ $_res_comment"
_res_comment=""
2001-11-17 04:53:05 +01:00
}
#############################################################################
2001-02-24 21:28:24 +01:00
2001-06-05 20:40:44 +02:00
# Check how echo works in this /bin/sh
case `echo -n` in
2002-02-05 23:57:17 +01:00
-n) _echo_n= _echo_c='\c' ;; # SysV echo
*) _echo_n='-n ' _echo_c= ;; # BSD echo
2001-06-05 20:40:44 +02:00
esac
2004-08-05 02:14:16 +02:00
LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s:help/help_mp-\(..\).h:\1:g" | sed "s:help/help_mp-\(.....\).h:\1:g"`
2001-06-05 20:40:44 +02:00
2006-06-16 20:38:35 +02:00
show_help(){
cat << EOF
2001-11-17 04:53:05 +01:00
Usage: $0 [OPTIONS]...
2001-02-24 21:28:24 +01:00
2001-10-23 20:32:55 +02:00
Configuration:
-h, --help display this help and exit
Installation directories:
2006-11-06 01:09:07 +01:00
--prefix=DIR prefix directory for installation [/usr/local]
--bindir=DIR directory for installing binaries [PREFIX/bin]
--datadir=DIR directory for installing machine independent
data files (skins, etc) [PREFIX/share/mplayer]
2007-09-16 19:48:20 +02:00
--mandir=DIR directory for installing man pages [PREFIX/share/man]
2006-11-06 01:09:07 +01:00
--confdir=DIR directory for installing configuration files
2003-02-02 12:46:57 +01:00
[PREFIX/etc/mplayer]
2006-11-06 01:09:07 +01:00
--libdir=DIR directory for object code libraries [PREFIX/lib]
2006-10-31 15:47:34 +01:00
--codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
--win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
--xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
--realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
2001-10-23 20:32:55 +02:00
Optional features:
2006-11-06 01:09:07 +01:00
--disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
2006-11-20 17:14:01 +01:00
--disable-mplayer disable MPlayer compilation [enable]
2006-11-06 01:09:07 +01:00
--enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
--enable-gtk1 force using GTK 1.2 for the GUI [disable]
2007-12-14 23:02:48 +01:00
--disable-largefiles disable support for files > 2GB [enable]
2006-11-06 01:09:07 +01:00
--enable-linux-devfs set default devices to devfs [disable]
2001-11-17 10:57:54 +01:00
--enable-termcap use termcap database for key codes [autodetect]
2004-04-14 01:26:31 +02:00
--enable-termios use termios database for key codes [autodetect]
2006-11-06 01:09:07 +01:00
--disable-iconv disable iconv for encoding conversion [autodetect]
2004-06-26 11:54:02 +02:00
--disable-langinfo do not use langinfo [autodetect]
2001-11-17 12:26:26 +01:00
--enable-lirc enable LIRC (remote control) support [autodetect]
2003-05-30 20:23:55 +02:00
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
2002-09-09 21:23:06 +02:00
--enable-joystick enable joystick support [disable]
2007-08-14 16:29:22 +02:00
--enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
2008-05-18 13:53:00 +02:00
--enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
2006-11-06 01:09:07 +01:00
--disable-vm disable X video mode extensions [autodetect]
--disable-xf86keysym disable support for multimedia keys [autodetect]
--enable-radio enable radio interface [disable]
--enable-radio-capture enable radio capture (through PCI/line-in) [disable]
--disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
2006-11-18 07:53:33 +01:00
--disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
2006-11-06 01:09:07 +01:00
--disable-tv disable TV interface (TV/DVB grabbers) [enable]
--disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
--disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
2007-07-29 19:55:28 +02:00
--disable-tv-teletext disable TV teletext interface [autodetect]
2006-11-06 01:09:07 +01:00
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
2002-09-09 21:23:06 +02:00
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
2006-11-06 01:09:07 +01:00
--disable-network disable networking [enable]
--enable-winsock2 enable winsock2 [autodetect]
--enable-smb enable Samba (SMB) input [autodetect]
--enable-live enable LIVE555 Streaming Media [autodetect]
2007-09-19 23:38:22 +02:00
--enable-nemesi enable Nemesi Streaming Media [autodetect]
2006-11-06 01:09:07 +01:00
--disable-dvdnav disable libdvdnav [autodetect]
--disable-dvdread disable libdvdread [autodetect]
--disable-dvdread-internal disable internal libdvdread [autodetect]
2006-11-09 19:25:42 +01:00
--disable-libdvdcss-internal disable internal libdvdcss [autodetect]
2006-11-06 01:09:07 +01:00
--disable-cdparanoia disable cdparanoia [autodetect]
2006-12-04 21:20:32 +01:00
--disable-cddb disable cddb [autodetect]
2006-11-06 01:09:07 +01:00
--disable-bitmap-font disable bitmap font support [enable]
--disable-freetype disable FreeType 2 font rendering [autodetect]
--disable-fontconfig disable fontconfig font lookup [autodetect]
2007-12-14 09:16:39 +01:00
--disable-unrarexec disable using of UnRAR executable [enabled]
2006-11-06 01:09:07 +01:00
--enable-menu enable OSD menu (not DVD menu) [disabled]
--disable-sortsub disable subtitle sorting [enabled]
--enable-fribidi enable the FriBiDi libs [autodetect]
--disable-enca disable ENCA charset oracle library [autodetect]
--disable-macosx disable Mac OS X specific features [autodetect]
--disable-maemo disable maemo specific features [autodetect]
--enable-macosx-finder-support enable Mac OS X Finder invocation
parameter parsing [disabled]
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
--disable-inet6 disable IPv6 support [autodetect]
--disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
--disable-ftp disable FTP support [enabled]
--disable-vstream disable TiVo vstream client support [autodetect]
--disable-pthreads disable Posix threads support [autodetect]
2007-07-16 08:34:51 +02:00
--disable-w32threads disable Win32 threads support [autodetect]
2006-11-06 01:09:07 +01:00
--disable-ass disable internal SSA/ASS subtitle support [autodetect]
--enable-rpath enable runtime linker path for extra libs [disabled]
2003-10-27 02:06:35 +01:00
2002-09-09 21:23:06 +02:00
Codecs:
2006-11-06 01:09:07 +01:00
--enable-gif enable GIF support [autodetect]
--enable-png enable PNG input/output support [autodetect]
--enable-jpeg enable JPEG input/output support [autodetect]
--enable-libcdio enable external libcdio [autodetect]
--enable-liblzo enable external liblzo [autodetect]
2007-03-19 23:09:53 +01:00
--disable-win32dll disable Win32 DLL support [enabled]
2006-11-06 01:09:07 +01:00
--disable-qtx disable QuickTime codecs support [enabled]
--disable-xanim disable XAnim codecs support [enabled]
--disable-real disable RealPlayer codecs support [enabled]
2008-05-31 18:38:02 +02:00
--disable-xvid disable Xvid [autodetect]
--disable-xvid-lavc disable Xvid in libavcodec [autodetect]
2006-11-06 19:05:38 +01:00
--disable-x264 disable x264 [autodetect]
2008-05-09 00:50:17 +02:00
--disable-x264-lavc disable x264 in libavcodec [autodetect]
2007-07-13 19:08:37 +02:00
--disable-libnut disable libnut [autodetect]
2007-05-11 23:39:39 +02:00
--disable-libavutil_a disable static libavutil [autodetect]
2007-04-26 13:19:29 +02:00
--disable-libavcodec_a disable static libavcodec [autodetect]
--disable-libavformat_a disable static libavformat [autodetect]
--disable-libpostproc_a disable static libpostproc [autodetect]
2006-11-06 01:09:07 +01:00
--disable-libavutil_so disable shared libavutil [autodetect]
--disable-libavcodec_so disable shared libavcodec [autodetect]
--disable-libavformat_so disable shared libavformat [autodetect]
--disable-libpostproc_so disable shared libpostproc [autodetect]
2006-08-14 14:32:36 +02:00
--disable-libavcodec_mpegaudio_hp disable high precision audio decoding
in libavcodec [enabled]
2006-11-06 01:09:07 +01:00
--disable-tremor-internal disable internal Tremor [enabled]
--enable-tremor-low enable lower accuracy internal Tremor [disabled]
--enable-tremor-external enable external Tremor [autodetect]
--disable-libvorbis disable libvorbis support [autodetect]
--disable-speex disable Speex support [autodetect]
--enable-theora enable OggTheora libraries [autodetect]
--enable-faad-external enable external FAAD2 (AAC) [autodetect]
--disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
--enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
--disable-faac disable support for FAAC (AAC encoder) [autodetect]
2008-05-09 00:50:17 +02:00
--disable-faac-lavc disable support for FAAC in libavcodec [autodetect]
2006-11-06 01:09:07 +01:00
--disable-ladspa disable LADSPA plugin support [autodetect]
--disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
--disable-mad disable libmad (MPEG audio) support [autodetect]
2008-05-09 00:32:40 +02:00
--disable-mp3lame disable LAME MP3 encoding support [autodetect]
2008-05-09 00:50:17 +02:00
--disable-mp3lame-lavc disable LAME in libavcodec [autodetect]
2006-11-06 01:09:07 +01:00
--disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
--disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
--enable-xmms enable XMMS input plugin support [disabled]
2007-07-22 18:24:25 +02:00
--enable-libdca enable libdca support [autodetect]
2006-11-06 01:09:07 +01:00
--disable-mp3lib disable builtin mp3lib [enabled]
--disable-liba52 disable builtin liba52 [enabled]
2008-02-21 17:47:05 +01:00
--disable-libmpeg2 disable builtin libmpeg2 [autodetect]
2006-11-06 01:09:07 +01:00
--disable-musepack disable musepack support [autodetect]
2007-05-03 14:08:54 +02:00
--disable-libamr_nb disable libamr narrowband [autodetect]
--disable-libamr_wb disable libamr wideband [autodetect]
2006-07-11 16:47:07 +02:00
--disable-decoder=DECODER disable specified FFmpeg decoder
--enable-decoder=DECODER enable specified FFmpeg decoder
--disable-encoder=ENCODER disable specified FFmpeg encoder
--enable-encoder=ENCODER enable specified FFmpeg encoder
2006-07-11 11:23:20 +02:00
--disable-parser=PARSER disable specified FFmpeg parser
--enable-parser=PARSER enable specified FFmpeg parser
2006-07-11 11:59:38 +02:00
--disable-demuxer=DEMUXER disable specified FFmpeg demuxer
--enable-demuxer=DEMUXER enable specified FFmpeg demuxer
--disable-muxer=MUXER disable specified FFmpeg muxer
--enable-muxer=MUXER enable specified FFmpeg muxer
2006-11-06 01:09:07 +01:00
2002-09-09 21:23:06 +02:00
Video output:
2008-06-07 12:54:07 +02:00
--disable-vidix disable VIDIX [for x86 *nix]
2007-04-14 12:39:17 +02:00
--with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
2007-05-18 01:20:58 +02:00
Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
2008-02-29 21:01:28 +01:00
nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
2007-12-04 19:10:20 +01:00
--disable-vidix-pcidb disable VIDIX PCI device name database
2008-06-08 12:38:28 +02:00
--enable-dhahelper enable VIDIX dhahelper support
2008-06-07 16:32:06 +02:00
--enable-svgalib_helper enable VIDIX svgalib_helper support
2006-11-06 01:09:07 +01:00
--enable-gl enable OpenGL video output [autodetect]
2007-08-31 15:08:13 +02:00
--enable-dga2 enable DGA 2 support [autodetect]
--enable-dga1 enable DGA 1 support [autodetect]
2006-11-06 01:09:07 +01:00
--enable-vesa enable VESA video output [autodetect]
--enable-svga enable SVGAlib video output [autodetect]
--enable-sdl enable SDL video output [autodetect]
--enable-aa enable AAlib video output [autodetect]
--enable-caca enable CACA video output [autodetect]
--enable-ggi enable GGI video output [autodetect]
--enable-ggiwmh enable GGI libggiwmh extension [autodetect]
--enable-directx enable DirectX video output [autodetect]
--enable-dxr2 enable DXR2 video output [autodetect]
--enable-dxr3 enable DXR3/H+ video output [autodetect]
--enable-ivtv enable IVTV TV-Out video output [autodetect]
2007-07-29 21:20:55 +02:00
--enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
2006-11-06 01:09:07 +01:00
--enable-dvb enable DVB video output [autodetect]
--enable-dvbhead enable DVB video output (HEAD version) [autodetect]
2007-09-30 14:07:00 +02:00
--enable-mga enable mga_vid video output [autodetect]
2006-11-06 01:09:07 +01:00
--enable-xmga enable mga_vid X11 video output [autodetect]
--enable-xv enable Xv video output [autodetect]
--enable-xvmc enable XvMC acceleration [disable]
--enable-vm enable XF86VidMode support [autodetect]
--enable-xinerama enable Xinerama support [autodetect]
--enable-x11 enable X11 video output [autodetect]
--enable-xshape enable XShape support [autodetect]
2007-12-22 12:09:43 +01:00
--disable-xss disable screensaver support via xss [autodetect]
2006-11-06 01:09:07 +01:00
--enable-fbdev enable FBDev video output [autodetect]
--enable-mlib enable mediaLib video output (Solaris) [disable]
--enable-3dfx enable obsolete /dev/3dfx video output [disable]
--enable-tdfxfb enable tdfxfb video output [disable]
--enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
--enable-directfb enable DirectFB video output [autodetect]
--enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
--enable-bl enable Blinkenlights video output [disable]
--enable-tdfxvid enable tdfx_vid video output [disable]
2007-08-03 19:14:35 +02:00
--enable-xvr100 enable SUN XVR-100 video output [autodetect]
2006-11-06 01:09:07 +01:00
--disable-tga disable Targa video output [enable]
--disable-pnm disable PNM video output [enable]
--disable-md5sum disable md5sum video output [enable]
2008-06-20 22:31:19 +02:00
--disable-yuv4mpeg disable yuv4mpeg video output [enable]
2006-11-06 01:09:07 +01:00
2002-09-09 21:23:06 +02:00
Audio output:
2006-11-06 01:09:07 +01:00
--disable-alsa disable ALSA audio output [autodetect]
--disable-ossaudio disable OSS audio output [autodetect]
--disable-arts disable aRts audio output [autodetect]
--disable-esd disable esd audio output [autodetect]
2007-10-18 15:34:26 +02:00
--disable-pulse disable Pulseaudio audio output [autodetect]
2006-11-06 01:09:07 +01:00
--disable-jack disable JACK audio output [autodetect]
--disable-openal disable OpenAL audio output [autodetect]
--disable-nas disable NAS audio output [autodetect]
--disable-sgiaudio disable SGI audio output [autodetect]
--disable-sunaudio disable Sun audio output [autodetect]
--disable-win32waveout disable Windows waveout audio output [autodetect]
--disable-select disable using select() on the audio device [enable]
2001-10-13 18:53:37 +02:00
2001-10-31 19:25:28 +01:00
Miscellaneous options:
2006-11-06 01:09:07 +01:00
--enable-runtime-cpudetection enable runtime CPU detection [disable]
--enable-cross-compile enable cross-compilation [autodetect]
--cc=COMPILER C compiler to build MPlayer [gcc]
--host-cc=COMPILER C compiler for tools needed while building [gcc]
--as=ASSEMBLER assembler to build MPlayer [as]
2007-08-16 17:16:52 +02:00
--ar=AR librarian to build MPlayer [ar]
--ranlib=RANLIB ranlib to build MPlayer [ranlib]
2007-12-28 11:33:22 +01:00
--windres=WINDRES windres to build MPlayer [windres]
2001-10-23 20:32:55 +02:00
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
2006-11-06 01:18:06 +01:00
--enable-static build a statically linked binary
2006-11-06 01:09:07 +01:00
--charset=charset convert the console messages to this character set
--language=list a white space or comma separated list of languages for
translated man pages, the first language is used for
messages and the GUI (the environment variable
\$LINGUAS is also honored) [en]
2003-02-21 00:32:47 +01:00
(Available: $LANGUAGES all)
2006-11-06 01:09:07 +01:00
--with-install=PATH path to a custom install program
2001-10-23 20:32:55 +02:00
Advanced options:
2006-11-06 01:09:07 +01:00
--enable-mmx enable MMX [autodetect]
--enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
--enable-3dnow enable 3DNow! [autodetect]
--enable-3dnowext enable extended 3DNow! [autodetect]
--enable-sse enable SSE [autodetect]
--enable-sse2 enable SSE2 [autodetect]
2007-05-20 07:04:14 +02:00
--enable-ssse3 enable SSSE3 [autodetect]
2006-11-06 01:09:07 +01:00
--enable-shm enable shm [autodetect]
--enable-altivec enable AltiVec (PowerPC) [autodetect]
--enable-armv5te enable DSP extensions (ARM) [autodetect]
2007-05-14 00:29:10 +02:00
--enable-armv6 enable ARMv6 (ARM) [autodetect]
2006-11-06 01:09:07 +01:00
--enable-iwmmxt enable iWMMXt (ARM) [autodetect]
--disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
--enable-big-endian force byte order to big-endian [autodetect]
--enable-debug[=1-3] compile-in debugging information [disable]
--enable-profile compile-in profiling information [disable]
--disable-sighandler disable sighandler for crashes [enable]
--enable-crash-debug enable automatic gdb attach on crash [disable]
--enable-dynamic-plugins enable dynamic A/V plugins [disable]
2001-10-23 20:32:55 +02:00
2004-08-25 03:06:26 +02:00
Use these options if autodetection fails (Options marked with (*) accept
multiple paths separated by ':'):
2006-11-06 01:09:07 +01:00
--extra-libs=FLAGS extra linker flags
2006-11-21 14:18:56 +01:00
--extra-libs-mplayer=FLAGS extra linker flags for MPlayer
--extra-libs-mencoder=FLAGS extra linker flags for MEncoder
2006-11-06 01:09:07 +01:00
--with-extraincdir=DIR extra header search paths in DIR (*)
--with-extralibdir=DIR extra linker search paths in DIR (*)
--with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
2006-08-26 22:55:53 +02:00
2004-04-14 01:26:31 +02:00
--with-freetype-config=PATH path to freetype-config
2003-03-21 17:54:03 +01:00
--with-fribidi-config=PATH path to fribidi-config
2006-11-06 01:09:07 +01:00
--with-glib-config=PATH path to glib*-config
--with-gtk-config=PATH path to gtk*-config
--with-sdl-config=PATH path to sdl*-config
--with-dvdnav-config=PATH path to dvdnav-config
2008-04-22 23:48:28 +02:00
--with-dvdread-config=PATH path to dvdread-config
2005-06-05 16:30:16 +02:00
This configure script is NOT autoconf-based, even though its output is similar.
It will try to autodetect all configuration options. If you --enable an option
it will be forcefully turned on, skipping autodetection. This can break
compilation, so you need to know what you are doing.
2001-02-24 21:28:24 +01:00
EOF
2006-06-16 20:38:35 +02:00
exit 0
} #show_help()
2001-02-24 21:28:24 +01:00
2007-01-31 00:33:25 +01:00
# GOTCHA: the variables below defines the default behavior for autodetection
# and have - unless stated otherwise - at least 2 states : yes no
# If autodetection is available then the third state is: auto
2006-04-25 03:38:02 +02:00
_mmx=auto
_3dnow=auto
_3dnowext=auto
_mmxext=auto
_sse=auto
_sse2=auto
2007-05-20 07:04:14 +02:00
_ssse3=auto
2006-10-27 13:56:43 +02:00
_cmov=auto
2007-03-18 16:38:15 +01:00
_fast_cmov=auto
2006-10-08 15:49:16 +02:00
_armv5te=auto
2007-05-14 00:29:10 +02:00
_armv6=auto
2006-10-08 15:49:16 +02:00
_iwmmxt=auto
2006-04-25 03:38:02 +02:00
_mtrr=auto
2007-09-06 11:36:01 +02:00
_altivec=auto
2002-12-05 00:29:41 +01:00
_install=install
_ranlib=ranlib
2007-12-28 11:33:22 +01:00
_windres=windres
2003-10-24 09:44:38 +02:00
_cc=cc
2007-08-16 14:41:01 +02:00
_ar=ar
2001-10-23 20:32:55 +02:00
test "$CC" && _cc="$CC"
2001-07-28 07:36:45 +02:00
_as=auto
2002-04-24 22:33:12 +02:00
_runtime_cpudetection=no
2005-10-18 23:48:09 +02:00
_cross_compile=auto
2007-01-31 00:18:51 +01:00
_prefix="/usr/local"
2007-04-26 13:19:29 +02:00
_libavutil_a=auto
2007-01-31 00:18:51 +01:00
_libavutil_so=auto
2007-04-26 13:19:29 +02:00
_libavcodec_a=auto
2007-05-03 14:04:29 +02:00
_libamr_nb=auto
_libamr_wb=auto
2007-05-19 13:17:49 +02:00
_libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
2008-05-03 17:40:12 +02:00
_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER// `
2007-05-19 13:17:49 +02:00
_libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
2008-05-03 17:40:12 +02:00
_libavencoders=` echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g'`
2007-05-19 13:17:49 +02:00
_libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
2007-01-31 00:18:51 +01:00
_libavparsers=$_libavparsers_all
2007-05-19 13:17:49 +02:00
_libavbsfs_all=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
2007-05-13 17:58:38 +02:00
_libavbsfs=$_libavbsfs_all
2007-05-19 13:17:49 +02:00
_libavdemuxers_all=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
2008-05-03 17:40:12 +02:00
_libavdemuxers=`echo $_libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/AVISYNTH_DEMUXER// `
2007-05-19 13:17:49 +02:00
_libavmuxers_all=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
2008-05-03 17:40:12 +02:00
_libavmuxers=`echo $_libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// `
2007-05-19 13:17:49 +02:00
_libavprotocols_all=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
2007-01-31 00:18:51 +01:00
_libavcodec_so=auto
2007-04-26 13:19:29 +02:00
_libavformat_a=auto
2007-01-31 00:18:51 +01:00
_libavformat_so=auto
2007-04-26 13:19:29 +02:00
_libpostproc_a=auto
2007-01-31 00:18:51 +01:00
_libpostproc_so=auto
_libavcodec_mpegaudio_hp=yes
_mencoder=yes
_mplayer=yes
_x11=auto
_xshape=auto
2007-12-22 12:09:43 +01:00
_xss=auto
2007-08-31 15:08:13 +02:00
_dga1=auto
_dga2=auto
2007-01-31 00:18:51 +01:00
_xv=auto
_xvmc=no #auto when complete
_sdl=auto
_directx=auto
_win32waveout=auto
_nas=auto
_png=auto
_jpeg=auto
_pnm=yes
_md5sum=yes
2008-06-20 21:33:32 +02:00
_yuv4mpeg=yes
2007-01-31 00:18:51 +01:00
_gif=auto
_gl=auto
_ggi=auto
_ggiwmh=auto
_aa=auto
_caca=auto
_svga=auto
_vesa=auto
_fbdev=auto
_dvb=auto
_dvbhead=auto
_dxr2=auto
_dxr3=auto
_ivtv=auto
2007-07-29 21:20:55 +02:00
_v4l2=auto
2007-01-31 00:18:51 +01:00
_iconv=auto
_langinfo=auto
_rtc=auto
_ossaudio=auto
_arts=auto
_esd=auto
2007-10-18 15:34:26 +02:00
_pulse=auto
2007-01-31 00:18:51 +01:00
_jack=auto
_openal=auto
_libcdio=auto
_liblzo=auto
_mad=auto
2008-05-09 00:32:40 +02:00
_mp3lame=auto
2008-05-09 00:50:17 +02:00
_mp3lame_lavc=auto
2007-01-31 00:18:51 +01:00
_toolame=auto
_twolame=auto
_tremor_internal=yes
_tremor_low=no
_tremor_external=auto
_libvorbis=auto
_speex=auto
_theora=auto
_mp3lib=yes
_liba52=yes
2007-07-22 18:24:25 +02:00
_libdca=auto
2008-02-21 17:47:05 +01:00
_libmpeg2=auto
2007-01-31 00:18:51 +01:00
_faad_internal=auto
_faad_external=auto
_faad_fixed=no
_faac=auto
2008-05-09 00:50:17 +02:00
_faac_lavc=auto
2007-01-31 00:18:51 +01:00
_ladspa=auto
_xmms=no
_dvdnav=auto
_dvdnavconfig=dvdnav-config
2008-04-22 23:48:28 +02:00
_dvdreadconfig=dvdread-config
2007-01-31 00:18:51 +01:00
_dvdread=auto
_dvdread_internal=auto
_libdvdcss_internal=auto
_xanim=auto
_real=auto
_live=auto
2007-09-19 23:38:22 +02:00
_nemesi=auto
_native_rtsp=yes
2007-01-31 00:18:51 +01:00
_xinerama=auto
2007-09-30 14:07:00 +02:00
_mga=auto
2007-01-31 00:18:51 +01:00
_xmga=auto
_vm=auto
_xf86keysym=auto
_mlib=no #broken, thus disabled
_sgiaudio=auto
_sunaudio=auto
_alsa=auto
_fastmemcpy=yes
2007-12-14 09:16:39 +01:00
_unrar_exec=auto
2007-03-18 21:15:57 +01:00
_win32dll=auto
2007-01-31 00:18:51 +01:00
_select=yes
_radio=no
_radio_capture=no
_radio_v4l=auto
_radio_v4l2=auto
_radio_bsdbt848=auto
_tv=yes
_tv_v4l1=auto
_tv_v4l2=auto
_tv_bsdbt848=auto
2007-10-13 19:14:39 +02:00
_tv_dshow=auto
2007-07-29 19:55:28 +02:00
_tv_teletext=auto
2007-01-31 00:18:51 +01:00
_pvr=auto
_network=yes
_winsock2=auto
_smbsupport=auto
2008-06-07 12:54:07 +02:00
_vidix=auto
2007-12-04 19:10:20 +01:00
_vidix_pcidb=yes
2008-06-08 12:38:28 +02:00
_dhahelper=no
2008-06-07 16:32:06 +02:00
_svgalib_helper=no
2007-01-31 00:18:51 +01:00
_joystick=no
_xvid=auto
2008-05-09 00:50:17 +02:00
_xvid_lavc=auto
2007-01-31 00:18:51 +01:00
_x264=auto
2008-05-09 00:50:17 +02:00
_x264_lavc=auto
2007-07-13 19:08:37 +02:00
_libnut=auto
2007-01-31 00:18:51 +01:00
_lirc=auto
_lircc=auto
2007-08-14 16:29:22 +02:00
_apple_remote=auto
2008-05-18 13:53:00 +02:00
_apple_ir=auto
2007-01-31 00:18:51 +01:00
_gui=no
_gtk1=no
_termcap=auto
_termios=auto
_3dfx=no
_s3fb=no
_tdfxfb=no
_tdfxvid=no
2007-08-03 19:14:35 +02:00
_xvr100=auto
2007-01-31 00:18:51 +01:00
_tga=yes
_directfb=auto
_zr=auto
_bl=no
2007-12-14 23:02:48 +01:00
_largefiles=yes
2007-01-31 00:18:51 +01:00
#_language=en
_shm=auto
_linux_devfs=no
_charset="UTF-8"
_dynamic_plugins=no
_crash_debug=no
_sighandler=yes
_libdv=auto
_cdparanoia=auto
_cddb=auto
_big_endian=auto
_bitmap_font=yes
_freetype=auto
_fontconfig=auto
_menu=no
_qtx=auto
_macosx=auto
_maemo=auto
_macosx_finder_support=no
_macosx_bundle=auto
_sortsub=yes
_freetypeconfig='freetype-config'
_fribidi=auto
_fribidiconfig='fribidi-config'
_enca=auto
_inet6=auto
_gethostbyname2=auto
_ftp=yes
_musepack=auto
_vstream=auto
_pthreads=auto
2007-07-16 08:34:51 +02:00
_w32threads=auto
2007-01-31 00:18:51 +01:00
_ass=auto
_rpath=no
_asmalign_pot=auto
2007-02-27 18:13:17 +01:00
_stream_cache=yes
2007-02-27 20:49:29 +01:00
_def_stream_cache="#define USE_STREAM_CACHE 1"
2007-03-17 20:54:31 +01:00
_need_shmem=yes
2007-01-31 00:18:51 +01:00
for ac_option do
case "$ac_option" in
2007-01-31 00:35:52 +01:00
--help|-help|-h)
show_help
;;
2007-01-31 00:59:39 +01:00
--prefix=*)
_prefix=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--bindir=*)
_bindir=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--datadir=*)
_datadir=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--mandir=*)
_mandir=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--confdir=*)
_confdir=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--libdir=*)
_libdir=`echo $ac_option | cut -d '=' -f 2`
;;
--codecsdir=*)
_codecsdir=`echo $ac_option | cut -d '=' -f 2`
;;
--win32codecsdir=*)
_win32codecsdir=`echo $ac_option | cut -d '=' -f 2`
;;
--xanimcodecsdir=*)
_xanimcodecsdir=`echo $ac_option | cut -d '=' -f 2`
;;
--realcodecsdir=*)
_realcodecsdir=`echo $ac_option | cut -d '=' -f 2`
2007-01-31 00:33:25 +01:00
;;
--with-extraincdir=*)
_inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
;;
--with-extralibdir=*)
_ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
;;
2007-01-31 00:59:39 +01:00
--with-install=*)
_install=`echo $ac_option | cut -d '=' -f 2 `
;;
--with-xvmclib=*)
_xvmclib=`echo $ac_option | cut -d '=' -f 2`
;;
--with-sdl-config=*)
_sdlconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-freetype-config=*)
_freetypeconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-fribidi-config=*)
_fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-gtk-config=*)
_gtkconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-glib-config=*)
_glibconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-dvdnav-config=*)
_dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2008-04-22 23:48:28 +02:00
--with-dvdread-config=*)
_dvdreadconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2007-01-31 00:59:39 +01:00
2007-01-31 00:33:25 +01:00
--extra-libs=*)
_extra_libs=`echo $ac_option | cut -d '=' -f 2`
;;
--extra-libs-mplayer=*)
_libs_mplayer=`echo $ac_option | cut -d '=' -f 2`
;;
--extra-libs-mencoder=*)
_libs_mencoder=`echo $ac_option | cut -d '=' -f 2`
;;
2007-01-31 00:59:39 +01:00
--target=*)
_target=`echo $ac_option | cut -d '=' -f 2`
;;
--cc=*)
_cc=`echo $ac_option | cut -d '=' -f 2`
;;
--host-cc=*)
_host_cc=`echo $ac_option | cut -d '=' -f 2`
;;
--as=*)
_as=`echo $ac_option | cut -d '=' -f 2`
;;
2007-08-16 14:41:01 +02:00
--ar=*)
_ar=`echo $ac_option | cut -d '=' -f 2`
;;
2007-08-16 14:42:14 +02:00
--ranlib=*)
_ranlib=`echo $ac_option | cut -d '=' -f 2`
;;
2007-12-28 11:33:22 +01:00
--windres=*)
_windres=`echo $ac_option | cut -d '=' -f 2`
;;
2007-01-31 00:59:39 +01:00
--charset=*)
_charset=`echo $ac_option | cut -d '=' -f 2`
;;
--language=*)
_language=`echo $ac_option | cut -d '=' -f 2`
;;
--enable-static)
_ld_static='-static'
;;
--disable-static)
_ld_static=''
2007-01-31 00:33:25 +01:00
;;
--enable-profile)
_profile='-p'
;;
--disable-profile)
_profile=
;;
--enable-debug)
_debug='-g'
;;
--enable-debug=*)
_debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
;;
--disable-debug)
_debug=
;;
2007-01-31 00:59:39 +01:00
--enable-runtime-cpudetection) _runtime_cpudetection=yes ;;
--disable-runtime-cpudetection) _runtime_cpudetection=no ;;
--enable-cross-compile) _cross_compile=yes ;;
--disable-cross-compile) _cross_compile=no ;;
2007-01-31 00:18:51 +01:00
--enable-mencoder) _mencoder=yes ;;
--disable-mencoder) _mencoder=no ;;
--enable-mplayer) _mplayer=yes ;;
--disable-mplayer) _mplayer=no ;;
--enable-dynamic-plugins) _dynamic_plugins=yes ;;
--disable-dynamic-plugins) _dynamic_plugins=no ;;
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xshape) _xshape=yes ;;
--disable-xshape) _xshape=no ;;
2007-12-22 12:09:43 +01:00
--enable-xss) _xss=yes ;;
--disable-xss) _xss=no ;;
2007-01-31 00:18:51 +01:00
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
--enable-xvmc) _xvmc=yes ;;
--disable-xvmc) _xvmc=no ;;
--enable-sdl) _sdl=yes ;;
--disable-sdl) _sdl=no ;;
--enable-directx) _directx=yes ;;
--disable-directx) _directx=no ;;
--enable-win32waveout) _win32waveout=yes ;;
--disable-win32waveout) _win32waveout=no ;;
--enable-nas) _nas=yes ;;
--disable-nas) _nas=no ;;
--enable-png) _png=yes ;;
--disable-png) _png=no ;;
--enable-jpeg) _jpeg=yes ;;
--disable-jpeg) _jpeg=no ;;
--enable-pnm) _pnm=yes ;;
--disable-pnm) _pnm=no ;;
--enable-md5sum) _md5sum=yes ;;
--disable-md5sum) _md5sum=no ;;
2008-06-20 21:33:32 +02:00
--enable-yuv4mpeg) _yuv4mpeg=yes ;;
--disable-yuv4mpeg) _yuv4mpeg=no ;;
2007-01-31 00:18:51 +01:00
--enable-gif) _gif=yes ;;
--disable-gif) _gif=no ;;
--enable-gl) _gl=yes ;;
--disable-gl) _gl=no ;;
--enable-ggi) _ggi=yes ;;
--disable-ggi) _ggi=no ;;
--enable-ggiwmh) _ggiwmh=yes ;;
--disable-ggiwmh) _ggiwmh=no ;;
--enable-aa) _aa=yes ;;
--disable-aa) _aa=no ;;
--enable-caca) _caca=yes ;;
--disable-caca) _caca=no ;;
--enable-svga) _svga=yes ;;
--disable-svga) _svga=no ;;
--enable-vesa) _vesa=yes ;;
--disable-vesa) _vesa=no ;;
--enable-fbdev) _fbdev=yes ;;
--disable-fbdev) _fbdev=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-dvbhead) _dvbhead=yes ;;
--disable-dvbhead) _dvbhead=no ;;
--enable-dxr2) _dxr2=yes ;;
--disable-dxr2) _dxr2=no ;;
--enable-dxr3) _dxr3=yes ;;
--disable-dxr3) _dxr3=no ;;
--enable-ivtv) _ivtv=yes ;;
--disable-ivtv) _ivtv=no ;;
2007-07-29 21:20:55 +02:00
--enable-v4l2) _v4l2=yes ;;
--disable-v4l2) _v4l2=no ;;
2007-01-31 00:18:51 +01:00
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
--enable-langinfo) _langinfo=yes ;;
--disable-langinfo) _langinfo=no ;;
--enable-rtc) _rtc=yes ;;
--disable-rtc) _rtc=no ;;
--enable-libdv) _libdv=yes ;;
--disable-libdv) _libdv=no ;;
--enable-ossaudio) _ossaudio=yes ;;
--disable-ossaudio) _ossaudio=no ;;
--enable-arts) _arts=yes ;;
--disable-arts) _arts=no ;;
--enable-esd) _esd=yes ;;
--disable-esd) _esd=no ;;
2007-10-18 15:34:26 +02:00
--enable-pulse) _pulse=yes ;;
--disable-pulse) _pulse=no ;;
2007-01-31 00:18:51 +01:00
--enable-jack) _jack=yes ;;
--disable-jack) _jack=no ;;
--enable-openal) _openal=yes ;;
--disable-openal) _openal=no ;;
--enable-mad) _mad=yes ;;
--disable-mad) _mad=no ;;
2008-05-09 00:32:40 +02:00
--enable-mp3lame) _mp3lame=yes ;;
--disable-mp3lame) _mp3lame=no ;;
2008-05-09 00:50:17 +02:00
--enable-mp3lame-lavc) _mp3lame_lavc=yes ;;
--disable-mp3lame-lavc) _mp3lame_lavc=no ;;
2007-01-31 00:18:51 +01:00
--enable-toolame) _toolame=yes ;;
--disable-toolame) _toolame=no ;;
--enable-twolame) _twolame=yes ;;
--disable-twolame) _twolame=no ;;
--enable-libcdio) _libcdio=yes ;;
--disable-libcdio) _libcdio=no ;;
--enable-liblzo) _liblzo=yes ;;
--disable-liblzo) _liblzo=no ;;
--enable-libvorbis) _libvorbis=yes ;;
--disable-libvorbis) _libvorbis=no ;;
--enable-speex) _speex=yes ;;
--disable-speex) _speex=no ;;
--enable-tremor-internal) _tremor_internal=yes ;;
--disable-tremor-internal) _tremor_internal=no ;;
--enable-tremor-low) _tremor_low=yes ;;
--disable-tremor-low) _tremor_low=no ;;
--enable-tremor-external) _tremor_external=yes ;;
--disable-tremor-external) _tremor_external=no ;;
--enable-theora) _theora=yes ;;
--disable-theora) _theora=no ;;
--enable-mp3lib) _mp3lib=yes ;;
--disable-mp3lib) _mp3lib=no ;;
--enable-liba52) _liba52=yes ;;
--disable-liba52) _liba52=no ;;
2007-07-22 18:24:25 +02:00
--enable-libdca) _libdca=yes ;;
--disable-libdca) _libdca=no ;;
2007-01-31 00:18:51 +01:00
--enable-libmpeg2) _libmpeg2=yes ;;
--disable-libmpeg2) _libmpeg2=no ;;
--enable-musepack) _musepack=yes ;;
--disable-musepack) _musepack=no ;;
--enable-faad-internal) _faad_internal=yes ;;
--disable-faad-internal) _faad_internal=no ;;
--enable-faad-external) _faad_external=yes ;;
--disable-faad-external) _faad_external=no ;;
--enable-faad-fixed) _faad_fixed=yes ;;
--disable-faad-fixed) _faad_fixed=no ;;
--enable-faac) _faac=yes ;;
--disable-faac) _faac=no ;;
2008-05-09 00:50:17 +02:00
--enable-faac-lavc) _faac_lavc=yes ;;
--disable-faac-lavc) _faac_lavc=no ;;
2007-01-31 00:18:51 +01:00
--enable-ladspa) _ladspa=yes ;;
--disable-ladspa) _ladspa=no ;;
--enable-xmms) _xmms=yes ;;
--disable-xmms) _xmms=no ;;
--enable-dvdread) _dvdread=yes ;;
--disable-dvdread) _dvdread=no ;;
--enable-dvdread-internal) _dvdread_internal=yes ;;
--disable-dvdread-internal) _dvdread_internal=no ;;
--enable-libdvdcss-internal) _libdvdcss_internal=yes ;;
--disable-libdvdcss-internal) _libdvdcss_internal=no ;;
--enable-dvdnav) _dvdnav=yes ;;
--disable-dvdnav) _dvdnav=no ;;
--enable-xanim) _xanim=yes ;;
--disable-xanim) _xanim=no ;;
--enable-real) _real=yes ;;
--disable-real) _real=no ;;
--enable-live) _live=yes ;;
--disable-live) _live=no ;;
2007-09-19 23:38:22 +02:00
--enable-nemesi) _nemesi=yes ;;
--disable-nemesi) _nemesi=no ;;
2007-01-31 00:18:51 +01:00
--enable-xinerama) _xinerama=yes ;;
--disable-xinerama) _xinerama=no ;;
--enable-mga) _mga=yes ;;
--disable-mga) _mga=no ;;
--enable-xmga) _xmga=yes ;;
--disable-xmga) _xmga=no ;;
--enable-vm) _vm=yes ;;
--disable-vm) _vm=no ;;
--enable-xf86keysym) _xf86keysym=yes ;;
--disable-xf86keysym) _xf86keysym=no ;;
--enable-mlib) _mlib=yes ;;
--disable-mlib) _mlib=no ;;
--enable-sunaudio) _sunaudio=yes ;;
--disable-sunaudio) _sunaudio=no ;;
--enable-sgiaudio) _sgiaudio=yes ;;
--disable-sgiaudio) _sgiaudio=no ;;
--enable-alsa) _alsa=yes ;;
--disable-alsa) _alsa=no ;;
--enable-tv) _tv=yes ;;
--disable-tv) _tv=no ;;
--enable-tv-bsdbt848) _tv_bsdbt848=yes ;;
--disable-tv-bsdbt848) _tv_bsdbt848=no ;;
--enable-tv-v4l1) _tv_v4l1=yes ;;
--disable-tv-v4l1) _tv_v4l1=no ;;
--enable-tv-v4l2) _tv_v4l2=yes ;;
--disable-tv-v4l2) _tv_v4l2=no ;;
2007-10-13 19:14:39 +02:00
--enable-tv-dshow) _tv_dshow=yes ;;
--disable-tv-dshow) _tv_dshow=no ;;
2007-07-29 19:55:28 +02:00
--enable-tv-teletext) _tv_teletext=yes ;;
--disable-tv-teletext) _tv_teletext=no ;;
2007-01-31 00:18:51 +01:00
--enable-radio) _radio=yes ;;
--enable-radio-capture) _radio_capture=yes ;;
--disable-radio-capture) _radio_capture=no ;;
--disable-radio) _radio=no ;;
--enable-radio-v4l) _radio_v4l=yes ;;
--disable-radio-v4l) _radio_v4l=no ;;
--enable-radio-v4l2) _radio_v4l2=yes ;;
--disable-radio-v4l2) _radio_v4l2=no ;;
--enable-radio-bsdbt848) _radio_bsdbt848=yes ;;
--disable-radio-bsdbt848) _radio_bsdbt848=no ;;
--enable-pvr) _pvr=yes ;;
--disable-pvr) _pvr=no ;;
--enable-fastmemcpy) _fastmemcpy=yes ;;
--disable-fastmemcpy) _fastmemcpy=no ;;
--enable-network) _network=yes ;;
--disable-network) _network=no ;;
--enable-winsock2) _winsock2=yes ;;
--disable-winsock2) _winsock2=no ;;
--enable-smb) _smbsupport=yes ;;
--disable-smb) _smbsupport=no ;;
2008-06-07 12:54:07 +02:00
--enable-vidix) _vidix=yes ;;
--disable-vidix) _vidix=no ;;
2007-04-14 12:39:17 +02:00
--with-vidix-drivers=*)
_vidix_drivers=`echo $ac_option | cut -d '=' -f 2`
;;
2007-12-04 19:10:20 +01:00
--disable-vidix-pcidb) _vidix_pcidb=no ;;
2008-06-08 12:38:28 +02:00
--enable-dhahelper) _dhahelper=yes ;;
--disable-dhahelper) _dhahelper=no ;;
2008-06-07 16:32:06 +02:00
--enable-svgalib_helper) _svgalib_helper=yes ;;
--disable-svgalib_helper) _svgalib_helper=no ;;
2007-01-31 00:18:51 +01:00
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
--enable-xvid) _xvid=yes ;;
--disable-xvid) _xvid=no ;;
2008-05-09 00:50:17 +02:00
--enable-xvid-lavc) _xvid_lavc=yes ;;
--disable-xvid-lavc) _xvid_lavc=no ;;
2007-01-31 00:18:51 +01:00
--enable-x264) _x264=yes ;;
--disable-x264) _x264=no ;;
2008-05-09 00:50:17 +02:00
--enable-x264-lavc) _x264_lavc=yes ;;
--disable-x264-lavc) _x264_lavc=no ;;
2007-07-13 19:08:37 +02:00
--enable-libnut) _libnut=yes ;;
--disable-libnut) _libnut=no ;;
2007-04-26 13:19:29 +02:00
--enable-libavutil_a) _libavutil_a=yes ;;
--disable-libavutil_a) _libavutil_a=no ;;
2007-01-31 00:18:51 +01:00
--enable-libavutil_so) _libavutil_so=yes ;;
--disable-libavutil_so) _libavutil_so=no ;;
2007-04-26 13:19:29 +02:00
--enable-libavcodec_a) _libavcodec_a=yes ;;
--disable-libavcodec_a) _libavcodec_a=no ;;
2007-01-31 00:18:51 +01:00
--enable-libavcodec_so) _libavcodec_so=yes ;;
--disable-libavcodec_so) _libavcodec_so=no ;;
2007-05-03 14:08:54 +02:00
--enable-libamr_nb) _libamr_nb=yes ;;
--disable-libamr_nb) _libamr_nb=no ;;
--enable-libamr_wb) _libamr_wb=yes ;;
--disable-libamr_wb) _libamr_wb=no ;;
2007-01-31 00:18:51 +01:00
--enable-decoder=*) _libavdecoders="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
--disable-decoder=*) _libavdecoders=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
--enable-encoder=*) _libavencoders="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
--disable-encoder=*) _libavencoders=`echo $_libavencoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
--enable-parser=*) _libavparsers="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
--disable-parser=*) _libavparsers=`echo $_libavparsers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
--enable-demuxer=*) _libavdemuxers="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
--disable-demuxer=*) _libavdemuxers=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
--enable-muxer=*) _libavmuxers="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
--disable-muxer=*) _libavmuxers=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
2007-04-26 13:19:29 +02:00
--enable-libavformat_a) _libavformat_a=yes ;;
--disable-libavformat_a) _libavformat_a=no ;;
2007-01-31 00:18:51 +01:00
--enable-libavformat_so) _libavformat_so=yes ;;
--disable-libavformat_so) _libavformat_so=no ;;
2007-04-26 13:19:29 +02:00
--enable-libpostproc_a) _libpostproc_a=yes ;;
--disable-libpostproc_a) _libpostproc_a=no ;;
2007-01-31 00:18:51 +01:00
--enable-libpostproc_so) _libpostproc_so=yes ;;
--disable-libpostproc_so) _libpostproc_so=no ;;
--enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=yes ;;
--disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=no ;;
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
2007-08-14 16:29:22 +02:00
--enable-apple-remote) _apple_remote=yes ;;
--disable-apple-remote) _apple_remote=no ;;
2008-05-18 13:53:00 +02:00
--enable-apple-ir) _apple_ir=yes ;;
--disable-apple-ir) _apple_ir=no ;;
2007-01-31 00:18:51 +01:00
--enable-gui) _gui=yes ;;
--disable-gui) _gui=no ;;
--enable-gtk1) _gtk1=yes ;;
--disable-gtk1) _gtk1=no ;;
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
--disable-termios) _termios=no ;;
--enable-3dfx) _3dfx=yes ;;
--disable-3dfx) _3dfx=no ;;
--enable-s3fb) _s3fb=yes ;;
--disable-s3fb) _s3fb=no ;;
--enable-tdfxfb) _tdfxfb=yes ;;
--disable-tdfxfb) _tdfxfb=no ;;
--disable-tdfxvid) _tdfxvid=no ;;
--enable-tdfxvid) _tdfxvid=yes ;;
2007-08-03 19:14:35 +02:00
--disable-xvr100) _xvr100=no ;;
--enable-xvr100) _xvr100=yes ;;
2007-01-31 00:18:51 +01:00
--disable-tga) _tga=no ;;
--enable-tga) _tga=yes ;;
--enable-directfb) _directfb=yes ;;
--disable-directfb) _directfb=no ;;
--enable-zr) _zr=yes ;;
--disable-zr) _zr=no ;;
--enable-bl) _bl=yes ;;
--disable-bl) _bl=no ;;
--enable-mtrr) _mtrr=yes ;;
--disable-mtrr) _mtrr=no ;;
--enable-largefiles) _largefiles=yes ;;
--disable-largefiles) _largefiles=no ;;
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
--enable-linux-devfs) _linux_devfs=yes ;;
--disable-linux-devfs) _linux_devfs=no ;;
--enable-cdparanoia) _cdparanoia=yes ;;
--disable-cdparanoia) _cdparanoia=no ;;
--enable-cddb) _cddb=yes ;;
--disable-cddb) _cddb=no ;;
--enable-big-endian) _big_endian=yes ;;
--disable-big-endian) _big_endian=no ;;
--enable-bitmap-font) _bitmap_font=yes ;;
--disable-bitmap-font) _bitmap_font=no ;;
--enable-freetype) _freetype=yes ;;
--disable-freetype) _freetype=no ;;
--enable-fontconfig) _fontconfig=yes ;;
--disable-fontconfig) _fontconfig=no ;;
2007-12-14 09:16:39 +01:00
--enable-unrarexec) _unrar_exec=yes ;;
--disable-unrarexec) _unrar_exec=no ;;
2007-01-31 00:18:51 +01:00
--enable-ftp) _ftp=yes ;;
--disable-ftp) _ftp=no ;;
--enable-vstream) _vstream=yes ;;
--disable-vstream) _vstream=no ;;
--enable-pthreads) _pthreads=yes ;;
--disable-pthreads) _pthreads=no ;;
2007-07-16 08:34:51 +02:00
--enable-w32threads) _w32threads=yes ;;
--disable-w32threads) _w32threads=no ;;
2007-01-31 00:18:51 +01:00
--enable-ass) _ass=yes ;;
--disable-ass) _ass=no ;;
--enable-rpath) _rpath=yes ;;
--disable-rpath) _rpath=no ;;
--enable-fribidi) _fribidi=yes ;;
--disable-fribidi) _fribidi=no ;;
--enable-enca) _enca=yes ;;
--disable-enca) _enca=no ;;
--enable-inet6) _inet6=yes ;;
--disable-inet6) _inet6=no ;;
--enable-gethostbyname2) _gethostbyname2=yes ;;
--disable-gethostbyname2) _gethostbyname2=no ;;
2007-08-31 15:08:13 +02:00
--enable-dga1) _dga1=yes ;;
--disable-dga1) _dga1=no ;;
--enable-dga2) _dga2=yes ;;
--disable-dga2) _dga2=no ;;
2007-01-31 00:18:51 +01:00
--enable-menu) _menu=yes ;;
--disable-menu) _menu=no ;;
--enable-qtx) _qtx=yes ;;
--disable-qtx) _qtx=no ;;
--enable-macosx) _macosx=yes ;;
--disable-macosx) _macosx=no ;;
--enable-macosx-finder-support) _macosx_finder_support=yes ;;
--disable-macosx-finder-support) _macosx_finder_support=no ;;
--enable-macosx-bundle) _macosx_bundle=yes;;
--disable-macosx-bundle) _macosx_bundle=no;;
--enable-maemo) _maemo=yes ;;
--disable-maemo) _maemo=no ;;
--enable-sortsub) _sortsub=yes ;;
--disable-sortsub) _sortsub=no ;;
2007-01-31 00:50:30 +01:00
--enable-crash-debug) _crash_debug=yes ;;
--disable-crash-debug) _crash_debug=no ;;
--enable-sighandler) _sighandler=yes ;;
--disable-sighandler) _sighandler=no ;;
2007-03-18 21:15:57 +01:00
--enable-win32dll) _win32dll=yes ;;
--disable-win32dll) _win32dll=no ;;
2007-01-31 00:18:51 +01:00
--enable-sse) _sse=yes ;;
--disable-sse) _sse=no ;;
--enable-sse2) _sse2=yes ;;
--disable-sse2) _sse2=no ;;
2007-05-20 07:04:14 +02:00
--enable-ssse3) _ssse3=yes ;;
--disable-ssse3) _ssse3=no ;;
2007-01-31 00:18:51 +01:00
--enable-mmxext) _mmxext=yes ;;
--disable-mmxext) _mmxext=no ;;
--enable-3dnow) _3dnow=yes ;;
--disable-3dnow) _3dnow=no _3dnowext=no ;;
--enable-3dnowext) _3dnow=yes _3dnowext=yes ;;
--disable-3dnowext) _3dnowext=no ;;
--enable-cmov) _cmov=yes ;;
--disable-cmov) _cmov=no ;;
2007-03-18 16:38:15 +01:00
--enable-fast-cmov) _fast_cmov=yes ;;
--disable-fast-cmov) _fast_cmov=no ;;
2007-01-31 00:18:51 +01:00
--enable-altivec) _altivec=yes ;;
--disable-altivec) _altivec=no ;;
--enable-armv5te) _armv5te=yes ;;
--disable-armv5te) _armv5te=no ;;
2007-05-14 00:29:10 +02:00
--enable-armv6) _armv6=yes ;;
--disable-armv6) _armv6=no ;;
2007-01-31 00:18:51 +01:00
--enable-iwmmxt) _iwmmxt=yes ;;
--disable-iwmmxt) _iwmmxt=no ;;
--enable-mmx) _mmx=yes ;;
--disable-mmx) # 3Dnow! and MMX2 require MMX
_3dnow=no _3dnowext=no _mmx=no _mmxext=no ;;
*)
echo "Unknown parameter: $ac_option"
exit 1
;;
esac
done
# Atmos: moved this here, to be correct, if --prefix is specified
test -z "$_bindir" && _bindir="$_prefix/bin"
test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
2007-09-16 19:48:20 +02:00
test -z "$_mandir" && _mandir="$_prefix/share/man"
2007-01-31 00:18:51 +01:00
test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
test -z "$_libdir" && _libdir="$_prefix/lib"
# Determine our OS name and CPU architecture
if test -z "$_target" ; then
# OS name
system_name=`uname -s 2>&1`
case "$system_name" in
2008-03-27 03:04:03 +01:00
Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS)
2007-01-31 00:18:51 +01:00
;;
IRIX*)
system_name=IRIX
;;
GNU/kFreeBSD)
system_name=FreeBSD
;;
HP-UX*)
system_name=HP-UX
;;
[cC][yY][gG][wW][iI][nN]*)
system_name=CYGWIN
;;
MINGW32*)
system_name=MINGW32
;;
2008-02-18 16:02:41 +01:00
OS/2*)
system_name=OS/2
;;
2007-01-31 00:18:51 +01:00
*)
system_name="$system_name-UNKNOWN"
;;
esac
# host's CPU/instruction set
host_arch=`uname -p 2>&1`
case "$host_arch" in
2007-07-26 10:21:42 +02:00
i386|sparc|ppc|alpha|arm|sh3|mips|vax)
2007-01-31 00:18:51 +01:00
;;
powerpc) # Darwin returns 'powerpc'
host_arch=ppc
;;
*) # uname -p on Linux returns 'unknown' for the processor type,
# OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
# Maybe uname -m (machine hardware name) returns something we
# recognize.
# x86/x86pc is used by QNX
case "`uname -m 2>&1`" in
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 ;;
ia64) host_arch=ia64 ;;
x86_64|amd64)
if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
-z "`echo $CFLAGS | grep -- -m32`" ]; then
host_arch=x86_64
else
host_arch=i386
fi
;;
macppc|ppc|ppc64) host_arch=ppc ;;
alpha) host_arch=alpha ;;
sparc) host_arch=sparc ;;
2004-08-14 17:17:39 +02:00
sparc64) host_arch=sparc64 ;;
2003-12-23 23:47:11 +01:00
parisc*|hppa*|9000*) host_arch=hppa ;;
2006-02-12 15:17:39 +01:00
arm*|zaurus|cats) host_arch=arm ;;
2007-07-26 10:21:42 +02:00
sh3) host_arch=sh3 ;;
2002-05-23 16:38:40 +02:00
s390) host_arch=s390 ;;
s390x) host_arch=s390x ;;
2005-10-16 19:44:58 +02:00
mips*) host_arch=mips ;;
2004-06-11 11:58:27 +02:00
vax) host_arch=vax ;;
2007-12-11 23:37:36 +01:00
xtensa*) host_arch=xtensa ;;
2001-11-18 18:45:23 +01:00
*) host_arch=UNKNOWN ;;
2001-11-17 04:53:05 +01:00
esac
;;
esac
2005-10-23 13:26:36 +02:00
else # if test -z "$_target"
2001-11-17 04:53:05 +01:00
system_name=`echo $_target | cut -d '-' -f 2`
2002-04-24 03:54:37 +02:00
case "`echo $system_name | tr A-Z a-z`" in
linux) system_name=Linux ;;
freebsd) system_name=FreeBSD ;;
2007-01-10 15:56:23 +01:00
gnu/kfreebsd) system_name=FreeBSD ;;
2002-04-24 03:54:37 +02:00
netbsd) system_name=NetBSD ;;
bsd/os) system_name=BSD/OS ;;
openbsd) system_name=OpenBSD ;;
2008-03-27 03:04:03 +01:00
dragonfly) system_name=DragonFly ;;
2002-04-24 03:54:37 +02:00
sunos) system_name=SunOS ;;
qnx) system_name=QNX ;;
2003-09-26 20:08:10 +02:00
morphos) system_name=MorphOS ;;
2007-03-15 18:06:28 +01:00
amigaos) system_name=AmigaOS ;;
2004-06-27 19:54:31 +02:00
mingw32msvc) system_name=MINGW32 ;;
2002-04-24 03:54:37 +02:00
esac
2002-06-14 00:44:28 +02:00
# We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
2007-09-12 08:59:36 +02:00
host_arch=`echo $_target | cut -d '-' -f 1`
if test `echo $host_arch` != "x86_64" ; then
host_arch=`echo $host_arch | tr '_' '-'`
fi
2001-06-21 02:06:40 +02:00
fi
2001-11-17 04:53:05 +01:00
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
2001-10-05 02:39:54 +02:00
2007-11-22 18:11:38 +01:00
if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
2007-01-05 11:05:05 +01:00
die "Runtime CPU detection only works for x86, x86-64 and PPC!"
fi
2007-07-04 10:33:40 +02:00
2008-04-08 20:03:14 +02:00
_timer=timer-linux.c
_getch=getch2.c
2001-10-28 22:44:23 +01:00
if freebsd ; then
2001-11-17 04:53:05 +01:00
_ld_extra="$_ld_extra -L/usr/local/lib"
_inc_extra="$_inc_extra -I/usr/local/include"
2001-10-28 22:44:23 +01:00
fi
2008-03-27 03:04:03 +01:00
if netbsd || dragonfly ; then
_ld_extra="$_ld_extra -L/usr/pkg/lib"
_inc_extra="$_inc_extra -I/usr/pkg/include"
fi
2003-04-24 20:55:43 +02:00
if darwin; then
2006-11-29 12:07:30 +01:00
_ld_extra="$_ld_extra -L/usr/local/lib"
_inc_extra="$_inc_extra -I/usr/local/include"
2008-04-08 20:03:14 +02:00
_timer=timer-darwin.c
2003-04-24 20:55:43 +02:00
fi
2001-06-05 20:40:44 +02:00
2005-12-29 19:01:22 +01:00
if aix ; then
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lC"
2005-12-29 19:01:22 +01:00
fi
2007-01-20 22:14:14 +01:00
if irix ; then
_ranlib='ar -r'
elif linux ; then
_ranlib='true'
fi
2007-01-28 23:31:53 +01:00
if win32 ; then
_exesuf=".exe"
# -lwinmm is always needed for osdep/timer-win2.c
_ld_extra="$_ld_extra -lwinmm"
2008-04-13 09:57:35 +02:00
_pe_executable=yes
2008-04-08 20:03:14 +02:00
_timer=timer-win2.c
2007-01-28 23:31:53 +01:00
fi
2007-02-27 18:13:17 +01:00
if mingw32 ; then
2008-04-08 20:03:14 +02:00
_getch=getch2-win.c
2007-03-17 20:54:31 +01:00
_need_shmem=no
2007-02-27 18:13:17 +01:00
fi
2007-03-18 21:25:02 +01:00
if cygwin ; then
_def_confwin32='#define WIN32'
fi
2007-03-15 18:06:28 +01:00
if amigaos ; then
_select=no
_sighandler=no
_stream_cache=no
_def_stream_cache="#undef USE_STREAM_CACHE"
fi
2007-04-01 01:02:36 +02:00
if qnx ; then
_ld_extra="$_ld_extra -lph"
fi
2008-02-18 16:02:41 +01:00
if os2 ; then
_exesuf=".exe"
2008-04-08 20:03:14 +02:00
_getch=getch2-os2.c
2008-02-18 16:02:41 +01:00
_need_shmem=no
_ar="emxomfar -p256"
_ranlib="echo ignoring ranlib"
_ld_extra="$_ld_extra -Zomf -Zstack 16384 -Zbin-files -Zargs-wild -lmmpm2"
fi
2007-09-30 00:26:35 +02:00
for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
test "$I" && break
done
TMPLOG="configure.log"
TMPC="$I/mplayer-conf-$RANDOM-$$.c"
TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
2007-09-30 00:28:24 +02:00
TMPEXE="$I/mplayer-conf-$RANDOM-$$$_exesuf"
2007-09-30 00:26:35 +02:00
TMPH="$I/mplayer-conf-$RANDOM-$$.h"
TMPS="$I/mplayer-conf-$RANDOM-$$.S"
rm -f "$TMPLOG"
echo configuration: $_configuration > "$TMPLOG"
echo >> "$TMPLOG"
2004-11-07 22:58:29 +01:00
# Check how to call 'head' and 'tail'. Newer versions spit out warnings
# if used as 'head -1' instead of 'head -n 1', but older versions don't
# know about '-n'.
if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
_head() { head -$1 2>/dev/null ; }
else
_head() { head -n $1 2>/dev/null ; }
fi
if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
_tail() { tail -$1 2>/dev/null ; }
else
_tail() { tail -n $1 2>/dev/null ; }
fi
2001-06-05 09:10:00 +02:00
# Checking CC version...
2008-05-01 19:43:12 +02:00
# Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then
2001-11-17 04:53:05 +01:00
echocheck "$_cc version"
2004-08-02 06:24:36 +02:00
cc_vendor=intel
2005-08-18 01:39:19 +02:00
cc_name=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
cc_version=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
2004-08-02 06:24:36 +02:00
_cc_major=`echo $cc_version | cut -d '.' -f 1`
_cc_minor=`echo $cc_version | cut -d '.' -f 2`
# TODO verify older icc/ecc compatibility
case $cc_version in
'')
cc_version="v. ?.??, bad"
2008-05-01 19:25:19 +02:00
cc_fail=yes
2004-08-02 06:24:36 +02:00
;;
2008-02-24 12:18:12 +01:00
10.1)
2004-08-02 06:24:36 +02:00
cc_version="$cc_version, ok"
;;
*)
cc_version="$cc_version, bad"
2008-05-01 19:25:19 +02:00
cc_fail=yes
2004-08-02 06:24:36 +02:00
;;
esac
echores "$cc_version"
2008-05-01 19:43:12 +02:00
else
2008-05-04 13:35:07 +02:00
for _cc in "$_cc" cc gcc ; do
cc_name_tmp=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
if test "$cc_name_tmp" = "gcc"; then
cc_name=$cc_name_tmp
2008-05-01 19:43:12 +02:00
echocheck "$_cc version"
cc_vendor=gnu
cc_version=`$_cc -dumpversion 2>&1`
case $cc_version in
2008-05-04 13:35:07 +02:00
2.96*)
2008-05-01 19:43:12 +02:00
cc_fail=yes
;;
2008-05-04 13:35:07 +02:00
*)
2008-05-01 19:43:12 +02:00
_cc_major=`echo $cc_version | cut -d '.' -f 1`
_cc_minor=`echo $cc_version | cut -d '.' -f 2`
_cc_mini=`echo $cc_version | cut -d '.' -f 3`
;;
esac
echores "$cc_version"
2008-05-04 13:35:07 +02:00
break
fi
2008-05-01 19:43:12 +02:00
done
fi # icc
2008-05-01 19:40:38 +02:00
test "$cc_fail" = yes && die "unsupported compiler version"
2001-11-14 23:18:16 +01:00
2004-09-26 16:40:59 +02:00
echocheck "host cc"
2005-08-18 01:39:19 +02:00
test "$_host_cc" || _host_cc=$_cc
2008-05-03 22:14:50 +02:00
echores $_host_cc
2004-09-26 16:40:59 +02:00
2005-10-18 23:48:09 +02:00
echocheck "cross compilation"
if test $_cross_compile = auto ; then
cat > $TMPC << EOF
2007-11-21 10:17:04 +01:00
int main(void) { return 0; }
2005-10-18 23:48:09 +02:00
EOF
_cross_compile=yes
2007-08-14 16:52:22 +02:00
cc_check && "$TMPEXE" && _cross_compile=no
2005-10-18 23:48:09 +02:00
fi
echores $_cross_compile
if test $_cross_compile = yes; then
tmp_run() {
return 0
}
fi
2004-09-26 16:40:59 +02:00
2001-02-24 21:28:24 +01:00
# ---
2001-07-04 12:45:20 +02:00
# now that we know what compiler should be used for compilation, try to find
# out which assembler is used by the $_cc compiler
2001-10-12 01:41:43 +02:00
if test "$_as" = auto ; then
2001-07-04 12:45:20 +02:00
_as=`$_cc -print-prog-name=as`
2001-11-17 04:53:05 +01:00
test -z "$_as" && _as=as
fi
2003-08-18 16:24:29 +02:00
# XXX: this should be ok..
_cpuinfo="echo"
2006-12-24 01:43:09 +01:00
2006-12-24 03:05:18 +01:00
if test "$_runtime_cpudetection" = no ; then
2006-12-24 01:43:09 +01:00
2003-10-14 14:14:48 +02:00
# Cygwin has /proc/cpuinfo, but only supports Intel CPUs
# FIXME: Remove the cygwin check once AMD CPUs are supported
2007-11-22 18:11:38 +01:00
if test -r /proc/cpuinfo && ! cygwin; then
2003-08-18 16:24:29 +02:00
# Linux with /proc mounted, extract CPU information from it
_cpuinfo="cat /proc/cpuinfo"
2007-11-22 18:11:38 +01:00
elif test -r /compat/linux/proc/cpuinfo && ! x86_32 ; then
2003-08-18 16:24:29 +02:00
# FreeBSD with Linux emulation /proc mounted,
2007-01-31 00:18:51 +01:00
# extract CPU information from it
_cpuinfo="cat /compat/linux/proc/cpuinfo"
2007-11-22 18:11:38 +01:00
elif darwin && ! x86_32 ; then
2007-01-31 00:18:51 +01:00
# use hostinfo on Darwin
_cpuinfo="hostinfo"
elif aix; then
# use 'lsattr' on AIX
_cpuinfo="lsattr -E -l proc0 -a type"
elif x86; then
# all other OSes try to extract CPU information from a small helper
2007-04-09 13:30:26 +02:00
# program cpuinfo instead
2007-08-03 19:22:31 +02:00
$_cc -o cpuinfo$_exesuf cpuinfo.c
_cpuinfo="./cpuinfo$_exesuf"
2007-01-31 00:18:51 +01:00
fi
2001-11-14 01:33:39 +01:00
2007-01-31 00:18:51 +01:00
if x86 ; then
# gather more CPU information
pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
2002-06-14 00:44:28 +02:00
2007-01-31 00:18:51 +01:00
exts=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
2001-11-14 01:33:39 +01:00
2007-01-31 00:18:51 +01:00
pparam=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
-e s/xmm/sse/ -e s/kni/sse/`
2001-07-12 17:35:52 +02:00
2007-01-31 00:18:51 +01:00
for ext in $pparam ; do
2007-05-15 23:07:27 +02:00
eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check
2007-01-31 00:18:51 +01:00
done
2002-05-23 16:38:40 +02:00
2007-01-31 00:18:51 +01:00
# SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
2007-02-04 14:44:49 +01:00
test $_sse = kernel_check && _mmxext=kernel_check
2005-05-27 13:14:22 +02:00
2007-01-31 00:18:51 +01:00
echocheck "CPU vendor"
echores "$pvendor ($pfamily:$pmodel:$pstepping)"
2005-05-27 13:14:22 +02:00
2007-01-31 00:18:51 +01:00
echocheck "CPU type"
echores "$pname"
fi
2005-10-23 15:55:23 +02:00
2007-01-31 00:18:51 +01:00
fi # test "$_runtime_cpudetection" = no
2005-05-27 13:14:22 +02:00
2007-03-18 14:38:55 +01:00
if x86 && test "$_runtime_cpudetection" = no ; then
extcheck() {
if test "$1" = kernel_check ; then
echocheck "kernel support of $2"
cat > $TMPC <<EOF
#include <signal.h>
void catch() { exit(1); }
2008-05-03 22:03:36 +02:00
int main(void) {
2007-03-18 14:38:55 +01:00
signal(SIGILL, catch);
2008-05-16 11:42:28 +02:00
__asm__ __volatile__ ("$3":::"memory"); return 0;
2007-03-18 14:38:55 +01:00
}
EOF
if cc_check && tmp_run ; then
eval _$2=yes
echores "yes"
_optimizing="$_optimizing $2"
return 0
else
eval _$2=no
echores "failed"
echo "It seems that your kernel does not correctly support $2."
echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
return 1
fi
fi
return 0
}
extcheck $_mmx "mmx" "emms"
extcheck $_mmxext "mmxext" "sfence"
extcheck $_3dnow "3dnow" "femms"
extcheck $_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse"
extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse2"
2007-05-20 07:04:14 +02:00
extcheck $_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
2007-03-18 14:38:55 +01:00
extcheck $_cmov "cmov" "cmovb %%eax,%%ebx"
echocheck "mtrr support"
if test "$_mtrr" = kernel_check ; then
_mtrr="yes"
_optimizing="$_optimizing mtrr"
fi
echores "$_mtrr"
if test "$_gcc3_ext" != ""; then
# if we had to disable sse/sse2 because the active kernel does not
# support this instruction set extension, we also have to tell
# gcc3 to not generate sse/sse2 instructions for normal C code
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
fi
fi
2002-05-23 16:38:40 +02:00
2007-06-19 15:55:12 +02:00
2007-12-11 23:37:36 +01:00
_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L SH3 POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
2007-01-31 00:18:51 +01:00
case "$host_arch" in
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
2007-06-19 15:55:12 +02:00
_arch='X86 X86_32'
2007-06-16 17:24:39 +02:00
_target_arch_x86="ARCH_X86 = yes"
_target_arch="ARCH_X86_32 = yes"
2007-06-24 16:39:11 +02:00
_def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
2007-01-31 00:18:51 +01:00
iproc=486
proc=i486
2004-08-14 17:17:39 +02:00
2001-07-12 17:35:52 +02:00
2007-01-31 00:18:51 +01:00
if test "$_runtime_cpudetection" = no ; then
case "$pvendor" in
AuthenticAMD)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
5) iproc=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
# K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
proc=k6-3
elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
proc=geode
elif test "$pmodel" -ge 8; then
proc=k6-2
elif test "$pmodel" -ge 6; then
proc=k6
else
proc=i586
fi
;;
6) iproc=686
# It's a bit difficult to determine the correct type of Family 6
# AMD CPUs just from their signature. Instead, we check directly
# whether it supports SSE.
if test "$_sse" = yes; then
# gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
proc=athlon-xp
else
# Again, gcc treats athlon and athlon-tbird similarly.
proc=athlon
fi
;;
15) iproc=686
# k8 cpu-type only supported in gcc >= 3.4.0, but that will be
# caught and remedied in the optimization tests below.
proc=k8
;;
*) proc=k8 iproc=686 ;;
esac
;;
GenuineIntel)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
5) iproc=586
if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then
proc=pentium-mmx # 4 is desktop, 8 is mobile
else
proc=i586
fi
;;
6) iproc=686
2007-04-20 20:57:09 +02:00
if test "$pmodel" -ge 15; then
2007-01-31 00:18:51 +01:00
proc=core2
elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
proc=pentium-m
elif test "$pmodel" -ge 7; then
proc=pentium3
elif test "$pmodel" -ge 3; then
proc=pentium2
else
proc=i686
fi
;;
15) iproc=686
# A nocona in 32-bit mode has no more capabilities than a prescott.
if test "$pmodel" -ge 3; then
proc=prescott
else
proc=pentium4
fi
2007-09-08 20:06:44 +02:00
test $_fast_cmov = "auto" && _fast_cmov=no
2007-01-31 00:18:51 +01:00
;;
*) proc=prescott iproc=686 ;;
esac
2001-07-28 07:36:45 +02:00
;;
2007-01-31 00:18:51 +01:00
CentaurHauls)
case "$pfamily" in
5) iproc=586
if test "$pmodel" -ge 8; then
proc=winchip2
elif test "$pmodel" -ge 4; then
proc=winchip-c6
else
proc=i586
2003-07-01 17:33:07 +02:00
fi
2007-01-31 00:18:51 +01:00
;;
6) iproc=686
if test "$pmodel" -ge 9; then
proc=c3-2
else
proc=c3
iproc=586
2003-10-14 11:41:08 +02:00
fi
2005-12-29 19:01:22 +01:00
;;
2007-01-31 00:18:51 +01:00
*) proc=i686 iproc=i686 ;;
2005-10-23 14:39:47 +02:00
esac
2007-01-31 00:18:51 +01:00
;;
unknown)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
*) proc=i586 iproc=586 ;;
esac
;;
*)
proc=i586 iproc=586 ;;
esac
fi # test "$_runtime_cpudetection" = no
2003-08-18 16:24:29 +02:00
2003-10-05 01:06:04 +02:00
2007-01-31 00:18:51 +01:00
# check that gcc supports our CPU, if not, fall back to earlier ones
# LGB: check -mcpu and -march swithing step by step with enabling
# to fall back till 386.
2003-08-18 16:24:29 +02:00
2007-01-31 00:18:51 +01:00
# gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] || ( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
cpuopt=-mtune
2003-10-05 01:06:04 +02:00
else
2007-01-31 00:18:51 +01:00
cpuopt=-mcpu
2003-10-05 01:06:04 +02:00
fi
2002-01-17 10:32:22 +01:00
echocheck "GCC & CPU optimization abilities"
2007-01-31 00:18:51 +01:00
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
if test "$_runtime_cpudetection" = no ; then
2007-09-08 20:04:47 +02:00
cc_check -march=native && proc=native
2007-01-31 00:18:51 +01:00
if test "$proc" = "k8"; then
cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp
2002-01-17 10:32:22 +01:00
fi
2007-01-31 00:18:51 +01:00
if test "$proc" = "athlon-xp"; then
cc_check -march=$proc $cpuopt=$proc || proc=athlon
2002-01-17 10:32:22 +01:00
fi
2007-01-31 00:18:51 +01:00
if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then
cc_check -march=$proc $cpuopt=$proc || proc=k6
2003-07-28 00:55:25 +02:00
fi
2007-01-31 00:18:51 +01:00
if test "$proc" = "k6" || test "$proc" = "c3"; then
2007-11-22 18:11:38 +01:00
if ! cc_check -march=$proc $cpuopt=$proc; then
2007-01-31 00:18:51 +01:00
if cc_check -march=i586 $cpuopt=i686; then
proc=i586-i686
2008-05-03 22:14:50 +02:00
else
2007-01-31 00:18:51 +01:00
proc=i586
2006-09-14 20:29:24 +02:00
fi
2007-01-31 00:18:51 +01:00
fi
fi
if test "$proc" = "prescott" ; then
cc_check -march=$proc $cpuopt=$proc || proc=pentium4
fi
if test "$proc" = "core2" ; then
cc_check -march=$proc $cpuopt=$proc || proc=pentium-m
fi
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
cc_check -march=$proc $cpuopt=$proc || proc=i686
fi
if test "$proc" = "i686" || test "$proc" = "pentium-mmx" || test "$proc" = "winchip-c6" || test "$proc" = "winchip2"; then
cc_check -march=$proc $cpuopt=$proc || proc=i586
fi
if test "$proc" = "i586"; then
cc_check -march=$proc $cpuopt=$proc || proc=i486
fi
if test "$proc" = "i486" ; then
cc_check -march=$proc $cpuopt=$proc || proc=i386
fi
if test "$proc" = "i386" ; then
cc_check -march=$proc $cpuopt=$proc || proc=error
fi
if test "$proc" = "error" ; then
echores "CPU optimization disabled. CPU not recognized or your compiler is too old."
_mcpu=""
_march=""
_optimizing=""
elif test "$proc" = "i586-i686"; then
_march="-march=i586"
_mcpu="$cpuopt=i686"
_optimizing="$proc"
else
_march="-march=$proc"
_mcpu="$cpuopt=$proc"
_optimizing="$proc"
2003-12-27 20:27:59 +01:00
fi
2007-01-31 00:18:51 +01:00
else # if test "$_runtime_cpudetection" = no
2007-04-03 15:16:46 +02:00
_mcpu="$cpuopt=generic"
2007-01-31 00:18:51 +01:00
# at least i486 required, for bswap instruction
_march="-march=i486"
2007-04-03 15:16:46 +02:00
cc_check $_mcpu || _mcpu="$cpuopt=i686"
2007-01-31 00:18:51 +01:00
cc_check $_mcpu || _mcpu=""
cc_check $_march $_mcpu || _march=""
fi
2003-12-27 20:27:59 +01:00
2007-01-31 00:18:51 +01:00
## Gabucino : --target takes effect here (hopefully...) by overwriting
## autodetected mcpu/march parameters
if test "$_target" ; then
# TODO: it may be a good idea to check GCC and fall back in all cases
if test "$host_arch" = "i586-i686"; then
_march="-march=i586"
_mcpu="$cpuopt=i686"
2008-05-03 22:14:50 +02:00
else
2007-01-31 00:18:51 +01:00
_march="-march=$host_arch"
_mcpu="$cpuopt=$host_arch"
fi
2008-05-03 22:14:50 +02:00
2007-01-31 00:18:51 +01:00
proc="$host_arch"
2002-05-23 16:38:40 +02:00
2007-01-31 00:18:51 +01:00
case "$proc" in
i386) iproc=386 ;;
i486) iproc=486 ;;
i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx) iproc=586 ;;
i686|athlon*|pentium*) iproc=686 ;;
*) iproc=586 ;;
esac
fi
2002-05-23 16:38:40 +02:00
2007-03-18 17:30:11 +01:00
if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
_fast_cmov="yes"
else
_fast_cmov="no"
fi
2007-01-31 00:18:51 +01:00
echores "$proc"
2003-12-25 13:05:28 +01:00
;;
2007-01-31 00:18:51 +01:00
ia64)
2007-06-19 15:55:12 +02:00
_arch='IA64'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_IA64 = yes'
2007-01-31 00:18:51 +01:00
iproc='ia64'
2006-11-25 18:58:33 +01:00
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
2007-01-31 00:18:51 +01:00
x86_64|amd64)
2007-06-19 15:55:12 +02:00
_arch='X86 X86_64'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_X86_64 = yes'
_target_arch_x86="ARCH_X86 = yes"
2007-06-24 16:39:11 +02:00
_def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
2007-01-31 00:18:51 +01:00
iproc='x86_64'
2001-11-17 04:53:05 +01:00
2007-01-31 00:18:51 +01:00
# gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
cpuopt=-mtune
else
cpuopt=-mcpu
2001-11-17 04:53:05 +01:00
fi
2007-01-31 00:18:51 +01:00
if test "$_runtime_cpudetection" = no ; then
case "$pvendor" in
AuthenticAMD)
proc=k8;;
GenuineIntel)
2007-06-07 05:01:32 +02:00
case "$pfamily" in
2007-01-31 00:18:51 +01:00
6) proc=core2;;
*)
# 64-bit prescotts exist, but as far as GCC is concerned they
# have the same capabilities as a nocona.
2007-09-08 20:06:44 +02:00
proc=nocona
test $_fast_cmov = "auto" && _fast_cmov=no
;;
2007-01-31 00:18:51 +01:00
esac
;;
*)
proc=error;;
esac
fi # test "$_runtime_cpudetection" = no
2006-05-14 14:27:11 +02:00
2007-01-31 00:18:51 +01:00
echocheck "GCC & CPU optimization abilities"
2004-08-25 17:40:06 +02:00
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
2007-01-31 00:18:51 +01:00
# This is a stripped-down version of the i386 fallback.
if test "$_runtime_cpudetection" = no ; then
2007-09-08 20:04:47 +02:00
cc_check -march=native && proc=native
2007-01-31 00:18:51 +01:00
# --- AMD processors ---
if test "$proc" = "k8"; then
cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp
fi
# This will fail if gcc version < 3.3, which is ok because earlier
# versions don't really support 64-bit on amd64.
# Is this a valid assumption? -Corey
if test "$proc" = "athlon-xp"; then
cc_check -march=$proc $cpuopt=$proc || proc=error
fi
# --- Intel processors ---
if test "$proc" = "core2"; then
cc_check -march=$proc $cpuopt=$proc || proc=nocona
fi
if test "$proc" = "nocona"; then
cc_check -march=$proc $cpuopt=$proc || proc=pentium4
fi
if test "$proc" = "pentium4"; then
cc_check -march=$proc $cpuopt=$proc || proc=error
fi
2006-09-18 18:48:50 +02:00
2007-01-31 00:18:51 +01:00
_march="-march=$proc"
_mcpu="$cpuopt=$proc"
if test "$proc" = "error" ; then
echores "CPU optimization disabled. CPU not recognized or your compiler is too old."
_mcpu=""
_march=""
fi
else # if test "$_runtime_cpudetection" = no
# x86-64 is an undocumented option, an intersection of k8 and nocona.
_march="-march=x86-64"
2007-04-03 15:16:46 +02:00
_mcpu="$cpuopt=generic"
cc_check $_mcpu || _mcpu="x86-64"
2007-01-31 00:18:51 +01:00
cc_check $_mcpu || _mcpu=""
cc_check $_march $_mcpu || _march=""
fi
2008-05-03 22:14:50 +02:00
2007-01-31 00:18:51 +01:00
_optimizing=""
2006-04-27 21:06:25 +02:00
2007-01-31 00:18:51 +01:00
echores "$proc"
;;
2001-08-14 16:34:27 +02:00
2007-01-31 00:18:51 +01:00
sparc)
2007-06-19 15:55:12 +02:00
_arch='SPARC'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_SPARC = yes'
2007-01-31 00:18:51 +01:00
iproc='sparc'
if sunos ; then
echocheck "CPU type"
karch=`uname -m`
case "`echo $karch`" in
sun4) proc=v7 ;;
2008-05-03 22:14:50 +02:00
sun4c) proc=v7 ;;
2007-01-31 00:18:51 +01:00
sun4d) proc=v8 ;;
sun4m) proc=v8 ;;
2007-08-26 14:07:37 +02:00
sun4u) proc=ultrasparc _vis='yes' ;;
2007-01-31 00:18:51 +01:00
sun4v) proc=v9 ;;
*) proc=v8 ;;
esac
echores "$proc"
else
proc=v8
fi
_march=''
_mcpu="-mcpu=$proc"
_optimizing="$proc"
;;
sparc64)
2007-06-19 15:55:12 +02:00
_arch='SPARC'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_SPARC = yes'
2007-01-31 00:18:51 +01:00
_vis='yes'
iproc='sparc'
2007-10-03 19:06:27 +02:00
proc='ultrasparc'
2007-01-31 00:18:51 +01:00
_march=''
_mcpu="-mcpu=$proc"
_optimizing="$proc"
;;
arm|armv4l|armv5tel)
2007-06-19 15:55:12 +02:00
_arch='ARM ARMV4L'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_ARMV4L = yes'
2007-01-31 00:18:51 +01:00
iproc='arm'
proc=''
_march=''
_mcpu=''
2007-07-26 10:21:42 +02:00
_optimizing=''
;;
sh3)
_arch='SH3'
_target_arch='ARCH_SH3 = yes'
iproc='sh3'
proc=''
_march='-m3'
_mcpu='-ml'
2007-01-31 00:18:51 +01:00
_optimizing=''
;;
2001-11-19 01:38:41 +01:00
2007-04-23 19:40:25 +02:00
ppc|powerpc)
2007-06-19 15:55:12 +02:00
_arch='POWERPC PPC'
2007-10-10 10:45:54 +02:00
_def_dcbzl='#undef HAVE_DCBZL'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_POWERPC = yes'
2007-01-31 00:18:51 +01:00
iproc='ppc'
proc=''
_march=''
_mcpu=''
_optimizing=''
echocheck "CPU type"
case $system_name in
Linux)
proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
if test -n "`$_cpuinfo | grep altivec`"; then
2007-09-06 11:36:01 +02:00
test $_altivec = auto && _altivec=yes
2007-01-31 00:18:51 +01:00
fi
;;
Darwin)
proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
if [ `sysctl -n hw.vectorunit` -eq 1 -o \
"`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
2007-09-06 11:36:01 +02:00
test $_altivec = auto && _altivec=yes
2007-01-31 00:18:51 +01:00
fi
;;
NetBSD)
# only gcc 3.4 works reliably with AltiVec code under NetBSD
case $cc_version in
2*|3.0*|3.1*|3.2*|3.3*)
;;
*)
if [ `sysctl -n machdep.altivec` -eq 1 ]; then
2007-09-06 11:36:01 +02:00
test $_altivec = auto && _altivec=yes
2007-01-31 00:18:51 +01:00
fi
;;
esac
;;
AIX)
proc=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
;;
esac
if test "$_altivec" = yes; then
echores "$proc altivec"
else
2007-09-06 11:36:01 +02:00
_altivec=no
2007-01-31 00:18:51 +01:00
echores "$proc"
fi
2006-08-14 14:32:36 +02:00
2007-01-31 00:18:51 +01:00
echocheck "GCC & CPU optimization abilities"
2001-11-17 12:26:26 +01:00
2007-01-31 00:18:51 +01:00
if test -n "$proc"; then
case "$proc" in
601) _march='-mcpu=601' _mcpu='-mtune=601' ;;
603) _march='-mcpu=603' _mcpu='-mtune=603' ;;
603e|603ev) _march='-mcpu=603e' _mcpu='-mtune=603e' ;;
604|604e|604r|604ev) _march='-mcpu=604' _mcpu='-mtune=604' ;;
740|740/750|745/755) _march='-mcpu=740' _mcpu='-mtune=740' ;;
750|750CX) _march='-mcpu=750' _mcpu='-mtune=750' ;;
POWER) _march='-mcpu=power' _mcpu='-mtune=power' ;;
POWER2) _march='-mcpu=power2' _mcpu='-mtune=power2' ;;
POWER3) _march='-mcpu=power3' _mcpu='-mtune=power3' ;;
*) ;;
esac
# gcc 3.1(.1) and up supports 7400 and 7450
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then
case "$proc" in
7400*|7410*) _march='-mcpu=7400' _mcpu='-mtune=7400' ;;
7447*|7450*|7455*) _march='-mcpu=7450' _mcpu='-mtune=7450' ;;
*) ;;
esac
fi
# gcc 3.2 and up supports 970
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
case "$proc" in
970*|PPC970*) _march='-mcpu=970' _mcpu='-mtune=970'
2007-10-10 10:45:54 +02:00
_def_dcbzl='#define HAVE_DCBZL 1' ;;
2007-01-31 00:18:51 +01:00
*) ;;
esac
fi
# gcc 3.3 and up supports POWER4
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
case "$proc" in
POWER4) _march='-mcpu=power4' _mcpu='-mtune=power4' ;;
*) ;;
esac
fi
2007-02-25 23:33:10 +01:00
# gcc 3.4 and up supports 440*
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" || test "$_cc_major" -ge "4"; then
case "$proc" in
440EP*) _march='-mcpu=440fp' _mcpu='-mtune=440fp' ;;
440G* ) _march='-mcpu=440' _mcpu='-mtune=440' ;;
*) ;;
esac
fi
2007-01-31 00:18:51 +01:00
# gcc 4.0 and up supports POWER5
if test "$_cc_major" -ge "4"; then
case "$proc" in
POWER5*) _march='-mcpu=power5' _mcpu='-mtune=power5' ;;
*) ;;
esac
fi
fi
2003-03-21 17:54:03 +01:00
2007-01-31 00:18:51 +01:00
if test -n "$_mcpu"; then
_optimizing=`echo $_mcpu | cut -c 8-`
echores "$_optimizing"
else
echores "none"
fi
;;
alpha)
2007-06-19 15:55:12 +02:00
_arch='ALPHA'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_ALPHA = yes'
2007-01-31 00:18:51 +01:00
iproc='alpha'
_march=''
2008-05-03 22:14:50 +02:00
2007-01-31 00:18:51 +01:00
echocheck "CPU type"
cat > $TMPC << EOF
2007-11-21 10:17:04 +01:00
int main(void) {
2007-01-31 00:18:51 +01:00
unsigned long ver, mask;
asm ("implver %0" : "=r" (ver));
asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
printf("%ld-%x\n", ver, ~mask);
return 0;
}
EOF
2007-08-14 16:52:22 +02:00
$_cc -o "$TMPEXE" "$TMPC"
case `"$TMPEXE"` in
2007-01-31 00:18:51 +01:00
2007-08-27 11:07:13 +02:00
0-0) proc="ev4"; _mvi="0";;
1-0) proc="ev5"; _mvi="0";;
1-1) proc="ev56"; _mvi="0";;
1-101) proc="pca56"; _mvi="1";;
2-303) proc="ev6"; _mvi="1";;
2-307) proc="ev67"; _mvi="1";;
2-1307) proc="ev68"; _mvi="1";;
2007-01-31 00:18:51 +01:00
esac
echores "$proc"
2008-05-03 22:14:50 +02:00
2007-01-31 00:18:51 +01:00
echocheck "GCC & CPU optimization abilities"
if test "$proc" = "ev68" ; then
cc_check -mcpu=$proc || proc=ev67
fi
if test "$proc" = "ev67" ; then
cc_check -mcpu=$proc || proc=ev6
fi
_mcpu="-mcpu=$proc"
echores "$proc"
2008-05-03 22:14:50 +02:00
2007-01-31 00:18:51 +01:00
_optimizing="$proc"
;;
mips)
2007-06-19 15:55:12 +02:00
_arch='SGI_MIPS'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_SGI_MIPS = yes'
2007-01-31 00:18:51 +01:00
iproc='sgi-mips'
proc=''
_march=''
_mcpu=''
_optimizing=''
if irix ; then
echocheck "CPU type"
proc=`hinv -c processor | grep CPU | cut -d " " -f3`
case "`echo $proc`" in
R3000) _march='-mips1' _mcpu='-mtune=r2000' ;;
R4000) _march='-mips3' _mcpu='-mtune=r4000' ;;
R4400) _march='-mips3' _mcpu='-mtune=r4400' ;;
R4600) _march='-mips3' _mcpu='-mtune=r4600' ;;
R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
esac
# gcc < 3.x does not support -mtune.
if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
_mcpu=''
fi
echores "$proc"
fi
;;
hppa)
2007-06-19 15:55:12 +02:00
_arch='PA_RISC'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_PA_RISC = yes'
2007-01-31 00:18:51 +01:00
iproc='PA-RISC'
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
s390)
2007-06-19 15:55:12 +02:00
_arch='S390'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_S390 = yes'
2007-01-31 00:18:51 +01:00
iproc='390'
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
s390x)
2007-06-19 15:55:12 +02:00
_arch='S390X'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_S390X = yes'
2007-01-31 00:18:51 +01:00
iproc='390x'
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
2004-05-08 19:52:25 +02:00
2007-01-31 00:18:51 +01:00
vax)
2007-06-19 15:55:12 +02:00
_arch='VAX'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_VAX = yes'
2007-01-31 00:18:51 +01:00
iproc='vax'
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
2003-03-26 12:35:13 +01:00
2007-12-11 23:37:36 +01:00
xtensa)
_arch='XTENSA'
_target_arch='ARCH_XTENSA = yes'
iproc='xtensa'
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
2007-01-31 00:18:51 +01:00
generic)
2007-06-19 15:55:12 +02:00
_arch='GENERIC'
2007-06-16 17:24:39 +02:00
_target_arch='ARCH_GENERIC = yes'
2007-01-31 00:18:51 +01:00
iproc=''
proc=''
_march=''
_mcpu=''
_optimizing=''
;;
2003-03-26 12:35:13 +01:00
2007-01-31 00:18:51 +01:00
*)
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
die "unsupported architecture $host_arch"
;;
esac # case "$host_arch" in
2001-07-03 16:22:23 +02:00
2007-01-31 00:18:51 +01:00
if test "$_runtime_cpudetection" = yes ; then
if x86 ; then
2007-06-19 15:37:31 +02:00
test "$_cmov" != no && _cmov=yes
2007-01-31 00:18:51 +01:00
x86_32 && _cmov=no
2007-06-19 15:37:31 +02:00
test "$_mmx" != no && _mmx=yes
test "$_3dnow" != no && _3dnow=yes
test "$_3dnowext" != no && _3dnowext=yes
test "$_mmxext" != no && _mmxext=yes
test "$_sse" != no && _sse=yes
test "$_sse2" != no && _sse2=yes
test "$_ssse3" != no && _ssse3=yes
test "$_mtrr" != no && _mtrr=yes
2007-01-31 00:18:51 +01:00
fi
if ppc; then
_altivec=yes
fi
fi
2002-11-15 00:49:05 +01:00
2001-06-04 22:12:41 +02:00
2008-03-18 10:09:53 +01:00
echocheck "extern symbol prefix"
cat > $TMPC << EOF
int ff_extern;
EOF
cc_check -c || die "Symbol mangling check failed."
sym=$(nm -P -g $TMPEXE)
extern_prefix=${sym%%ff_extern*}
_def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
echores $extern_prefix
2001-06-05 04:26:56 +02:00
2007-01-31 00:18:51 +01:00
echocheck "assembler support of -pipe option"
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no"
2001-11-17 04:53:05 +01:00
2001-04-15 22:31:58 +02:00
2007-01-31 00:18:51 +01:00
echocheck "compiler support of named assembler arguments"
_named_asm_args=yes
_def_named_asm_args="#define NAMED_ASM_ARGS 1"
if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
-o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
_named_asm_args=no
_def_named_asm_args="#undef NAMED_ASM_ARGS"
fi
echores $_named_asm_args
2001-11-17 12:26:26 +01:00
2001-04-15 22:31:58 +02:00
2007-10-02 00:46:33 +02:00
if darwin && test "$cc_vendor" = "gnu" ; then
echocheck "GCC support of -mstackrealign"
# GCC 4.2 and some earlier Apple versions support this flag on x86. Since
# Mac OS X/Intel has an ABI different from Windows this is needed to avoid
# crashes when loading Win32 DLLs. Unfortunately some gcc versions create
# wrong code with this flag, but this can be worked around by adding
# -fno-unit-at-a-time as described in the blog post at
# http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
cat > $TMPC << EOF
__attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
EOF
cc_check -O4 -mstackrealign && tmp_run && _stackrealign=-mstackrealign
test -z "$_stackrealign" && cc_check -O4 -mstackrealign -fno-unit-at-a-time \
&& tmp_run && _stackrealign="-mstackrealign -fno-unit-at-a-time"
test -n "$_stackrealign" && echores "yes" || echores "no"
fi # if darwin && test "$cc_vendor" = "gnu" ; then
2007-01-31 00:18:51 +01:00
# Checking for CFLAGS
2007-02-27 18:10:11 +01:00
_install_strip="-s"
2007-01-31 00:18:51 +01:00
if test "$_profile" != "" || test "$_debug" != "" ; then
2007-06-05 12:05:09 +02:00
CFLAGS="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2007-02-27 18:10:11 +01:00
_install_strip=
2007-01-31 00:18:51 +01:00
elif test -z "$CFLAGS" ; then
if test "$cc_vendor" = "intel" ; then
2007-08-13 10:30:53 +02:00
CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2007-01-31 00:18:51 +01:00
elif test "$cc_vendor" != "gnu" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe"
else
2007-06-08 01:59:23 +02:00
CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2007-01-31 00:18:51 +01:00
fi
else
_warn_CFLAGS=yes
fi
if test -n "$LDFLAGS" ; then
_ld_extra="$_ld_extra $LDFLAGS"
_warn_CFLAGS=yes
elif test "$cc_vendor" = "intel" ; then
_ld_extra="$_ld_extra -i-static"
fi
if test -n "$CPPFLAGS" ; then
_inc_extra="$_inc_extra $CPPFLAGS"
_warn_CFLAGS=yes
fi
2001-10-22 09:43:32 +02:00
2001-10-10 15:07:42 +02:00
2006-11-08 01:13:33 +01:00
2006-12-24 01:08:57 +01:00
if x86_32 ; then
2001-11-17 04:53:05 +01:00
# Checking assembler (_as) compatibility...
# Added workaround for older as that reads from stdin by default - atmos
as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
echocheck "assembler ($_as $as_version)"
2001-10-10 15:07:42 +02:00
2001-11-17 04:53:05 +01:00
_pref_as_version='2.9.1'
echo 'nop' > $TMPS
if test "$_mmx" = yes ; then
echo 'emms' >> $TMPS
fi
if test "$_3dnow" = yes ; then
_pref_as_version='2.10.1'
echo 'femms' >> $TMPS
fi
2006-04-24 00:56:29 +02:00
if test "$_3dnowext" = yes ; then
2001-11-17 04:53:05 +01:00
_pref_as_version='2.10.1'
echo 'pswapd %mm0, %mm0' >> $TMPS
fi
2006-04-24 00:56:29 +02:00
if test "$_mmxext" = yes ; then
2001-11-17 04:53:05 +01:00
_pref_as_version='2.10.1'
echo 'movntq %mm0, (%eax)' >> $TMPS
fi
if test "$_sse" = yes ; then
_pref_as_version='2.10.1'
echo 'xorps %xmm0, %xmm0' >> $TMPS
fi
#if test "$_sse2" = yes ; then
# _pref_as_version='2.11'
# echo 'xorpd %xmm0, %xmm0' >> $TMPS
#fi
2006-10-27 13:56:43 +02:00
if test "$_cmov" = yes ; then
_pref_as_version='2.10.1'
echo 'cmovb %eax, %ebx' >> $TMPS
fi
2007-05-20 07:04:14 +02:00
if test "$_ssse3" = yes ; then
_pref_as_version='2.16.92'
echo 'pabsd %xmm0, %xmm1' >> $TMPS
fi
2007-08-14 16:52:22 +02:00
$_as $TMPS -o $TMPEXE > /dev/null 2>&1 || as_verc_fail=yes
2001-11-17 04:53:05 +01:00
if test "$as_verc_fail" != yes ; then
echores "ok"
else
2007-06-25 15:59:46 +02:00
_res_comment="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2001-11-17 04:53:05 +01:00
echores "failed"
die "obsolete binutils version"
fi
2006-08-13 01:58:26 +02:00
2006-12-24 01:08:57 +01:00
fi #if x86_32
2006-08-13 12:19:35 +02:00
2006-08-13 01:58:26 +02:00
echocheck ".align is a power of two"
if test "$_asmalign_pot" = auto ; then
_asmalign_pot=no
cat > $TMPC << EOF
2007-11-21 10:17:04 +01:00
main(void) { asm (".align 3"); }
2006-08-13 01:58:26 +02:00
EOF
cc_check && _asmalign_pot=yes
fi
if test "$_asmalign_pot" = "yes" ; then
_def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
else
_def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2001-06-21 02:06:40 +02:00
fi
2006-08-13 01:58:26 +02:00
echores $_asmalign_pot
2001-04-15 22:31:58 +02:00
2006-05-11 00:00:30 +02:00
#FIXME: This should happen before the check for CFLAGS..
2008-05-18 21:05:52 +02:00
if ppc && ( test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ) ; then
2008-05-03 22:14:50 +02:00
2008-05-10 15:23:05 +02:00
# check if AltiVec is supported by the compiler, and how to enable it
2008-05-10 16:54:51 +02:00
echocheck "GCC AltiVec flags"
2008-05-01 19:51:04 +02:00
cat > $TMPC << EOF
2008-05-03 22:03:36 +02:00
int main(void) { return 0; }
2003-10-05 01:06:04 +02:00
EOF
2008-05-30 20:03:36 +02:00
if $(cc_check -maltivec -mabi=altivec) ; then
_altivec_gcc_flags="-maltivec -mabi=altivec"
2003-10-05 01:06:04 +02:00
# check if <altivec.h> should be included
2008-05-01 15:49:53 +02:00
_def_altivec_h='#undef HAVE_ALTIVEC_H'
2008-05-01 15:46:17 +02:00
cat > $TMPC << EOF
2003-10-05 01:06:04 +02:00
#include <altivec.h>
int main(void) { return 0; }
EOF
2008-05-30 20:03:36 +02:00
if $(cc_check $_altivec_gcc_flags) ; then
_def_altivec_h='#define HAVE_ALTIVEC_H 1'
inc_altivec_h='#include <altivec.h>'
else
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
if $(cc_check -faltivec) ; then
_altivec_gcc_flags="-faltivec"
else
_altivec=no
_altivec_gcc_flags="none, AltiVec disabled"
fi
fi
fi
echores "$_altivec_gcc_flags"
2003-10-05 01:06:04 +02:00
2008-05-30 13:45:08 +02:00
# check if the compiler supports braces for vector declarations
cat > $TMPC << EOF
$inc_altivec_h
#define AVV(x...) {x}
int main (void) { (vector int) AVV(1); return 0; }
EOF
cc_check $_altivec_gcc_flags &&
_def_altivec_vector_braces='#define HAVE_ALTIVEC_VECTOR_BRACES 1'
2008-05-10 15:23:05 +02:00
# Disable runtime cpudetection if we cannot generate AltiVec code or
# AltiVec is disabled by the user.
2008-05-10 15:40:36 +02:00
test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
&& _runtime_cpudetection=no
2003-10-05 01:06:04 +02:00
2008-05-10 15:23:05 +02:00
# Show that we are optimizing for AltiVec (if enabled and supported).
2008-05-10 15:40:36 +02:00
test "$_runtime_cpudetection" = no && test "$_altivec" = yes \
&& _optimizing="$_optimizing altivec"
2003-10-05 01:06:04 +02:00
2008-05-10 15:23:05 +02:00
# If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2008-05-10 15:40:36 +02:00
test "$_altivec" = yes && CFLAGS="$CFLAGS $_altivec_gcc_flags"
2003-10-05 01:06:04 +02:00
fi
2006-10-08 15:49:16 +02:00
if arm ; then
echocheck "ARMv5TE (Enhanced DSP Extensions)"
if test $_armv5te = "auto" ; then
cat > $TMPC << EOF
2008-05-03 22:03:36 +02:00
int main(void) { __asm__ __volatile__ ("qadd r0, r0, r0"); }
2006-10-08 15:49:16 +02:00
EOF
_armv5te=no
cc_check && _armv5te=yes
fi
echores "$_armv5te"
2007-05-14 00:29:10 +02:00
echocheck "ARMv6 (SIMD instructions)"
if test $_armv6 = "auto" ; then
cat > $TMPC << EOF
int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
EOF
_armv6=no
cc_check && _armv6=yes
fi
echores "$_armv6"
2006-10-08 15:49:16 +02:00
echocheck "iWMMXt (Intel XScale SIMD instructions)"
if test $_iwmmxt = "auto" ; then
cat > $TMPC << EOF
2008-05-03 22:03:36 +02:00
int main(void) { __asm__ __volatile__ ("wunpckelub wr6, wr4"); }
2006-10-08 15:49:16 +02:00
EOF
_iwmmxt=no
cc_check && _iwmmxt=yes
fi
echores "$_iwmmxt"
fi
2007-09-26 23:31:07 +02:00
_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 VIS MVI'
2007-06-21 21:01:29 +02:00
test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts"
2007-06-19 15:55:22 +02:00
test "$_mmx" = yes && _cpuexts="MMX $_cpuexts"
test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts"
test "$_3dnow" = yes && _cpuexts="3DNOW $_cpuexts"
test "$_3dnowext" = yes && _cpuexts="3DNOWEX $_cpuexts"
test "$_sse" = yes && _cpuexts="SSE $_cpuexts"
test "$_sse2" = yes && _cpuexts="SSE2 $_cpuexts"
test "$_ssse3" = yes && _cpuexts="SSSE3 $_cpuexts"
test "$_cmov" = yes && _cpuexts="CMOV $_cpuexts"
test "$_fast_cmov" = yes && _cpuexts="FAST_CMOV $_cpuexts"
test "$_armv5te" = yes && _cpuexts="ARMV5TE $_cpuexts"
2007-06-22 21:58:44 +02:00
test "$_armv6" = yes && _cpuexts="ARMV6 $_cpuexts"
2007-06-19 15:55:22 +02:00
test "$_iwmmxt" = yes && _cpuexts="IWMMXT $_cpuexts"
2007-08-26 14:07:37 +02:00
test "$_vis" = yes && _cpuexts="VIS $_cpuexts"
2007-08-27 11:07:13 +02:00
test "$_mvi" = yes && _cpuexts="MVI $_cpuexts"
2001-03-08 13:30:42 +01:00
2001-11-17 04:53:05 +01:00
# Checking kernel version...
2006-12-24 01:08:57 +01:00
if x86_32 && linux ; then
2001-11-17 04:53:05 +01:00
_k_verc_problem=no
kernel_version=`uname -r 2>&1`
echocheck "$system_name kernel version"
case "$kernel_version" in
'') kernel_version="?.??"; _k_verc_fail=yes;;
[0-1].[0-9].[0-9]*|2.[0-3].[0-9]*)
_k_verc_problem=yes;;
esac
if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
_k_verc_fail=yes
fi
if test "$_k_verc_fail" ; then
echores "$kernel_version, fail"
2002-08-04 00:48:41 +02:00
echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
echo "supports SSE, but you have been warned! If you are using a kernel older than"
echo "2.2.x you must upgrade it to get SSE support!"
2003-01-31 02:47:55 +01:00
# die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2001-11-17 04:53:05 +01:00
else
echores "$kernel_version, ok"
fi
fi
2001-03-28 21:58:45 +02:00
2001-11-17 04:53:05 +01:00
######################
# MAIN TESTS GO HERE #
######################
2001-08-25 23:05:23 +02:00
2004-10-11 21:26:13 +02:00
echocheck "-lposix"
cat > $TMPC <<EOF
int main(void) { return 0; }
EOF
if cc_check -lposix ; then
2006-11-27 23:55:46 +01:00
_ld_extra="$_ld_extra -lposix"
2004-10-11 21:26:13 +02:00
echores "yes"
else
echores "no"
fi
echocheck "-lm"
cat > $TMPC <<EOF
int main(void) { return 0; }
EOF
if cc_check -lm ; then
_ld_lm="-lm"
echores "yes"
else
_ld_lm=""
echores "no"
fi
2001-08-24 18:20:04 +02:00
2002-03-15 21:48:42 +01:00
2004-06-26 11:54:02 +02:00
echocheck "langinfo"
if test "$_langinfo" = auto ; then
cat > $TMPC <<EOF
#include <langinfo.h>
int main(void) { nl_langinfo(CODESET); return 0; }
EOF
_langinfo=no
cc_check && _langinfo=yes
fi
if test "$_langinfo" = yes ; then
_def_langinfo='#define USE_LANGINFO 1'
else
_def_langinfo='#undef USE_LANGINFO'
fi
echores "$_langinfo"
2002-03-15 21:48:42 +01:00
echocheck "language"
2003-02-21 00:32:47 +01:00
test -z "$_language" && _language=$LINGUAS
_language=`echo $_language | sed 's/,/ /g'`
2003-03-13 00:57:23 +01:00
echo $_language | grep all > /dev/null || LANGUAGES="$_language en"
2004-08-05 02:14:16 +02:00
for lang in $_language ; do
test "$lang" = all && lang=en
if test -f "help/help_mp-${lang}.h" ; then
_language=$lang
2003-02-21 00:32:47 +01:00
break
else
2006-11-05 01:02:48 +01:00
echo ${_echo_n} "$lang not found, ${_echo_c}"
2004-08-05 02:14:16 +02:00
_language=`echo $_language | sed "s/$lang *//"`
2003-02-21 00:32:47 +01:00
fi
done
test -z "$_language" && _language=en
_mp_help="help/help_mp-${_language}.h"
2002-09-22 18:31:21 +02:00
test -f $_mp_help || die "$_mp_help not found"
2004-08-05 02:14:16 +02:00
for lang in $LANGUAGES ; do
if test -f "DOCS/man/$lang/mplayer.1" ; then
2008-05-18 18:40:20 +02:00
MAN_LANG_ALL="$lang $MAN_LANG_ALL"
2004-08-05 02:14:16 +02:00
fi
done
2008-05-18 19:32:51 +02:00
MAN_LANG="$(echo $MAN_LANG_ALL | sed 's/en//')"
2004-06-15 09:01:02 +02:00
_doc_lang=$_language
test -d DOCS/xml/$_doc_lang || _doc_lang=en
2008-05-18 18:40:20 +02:00
echores "using $_language (man pages: $MAN_LANG_ALL)"
2004-08-05 02:14:16 +02:00
2002-03-15 21:48:42 +01:00
2002-03-27 04:45:55 +01:00
echocheck "enable sighandler"
if test "$_sighandler" = yes ; then
_def_sighandler='#define ENABLE_SIGHANDLER 1'
else
_def_sighandler='#undef ENABLE_SIGHANDLER'
fi
echores "$_sighandler"
2002-03-15 21:48:42 +01:00
2002-03-15 23:16:02 +01:00
echocheck "runtime cpudetection"
if test "$_runtime_cpudetection" = yes ; then
2003-10-05 01:06:04 +02:00
_optimizing="Runtime CPU-Detection enabled"
2002-03-15 23:16:02 +01:00
_def_runtime_cpudetection='#define RUNTIME_CPUDETECT 1'
else
_def_runtime_cpudetection='#undef RUNTIME_CPUDETECT'
fi
echores "$_runtime_cpudetection"
2002-11-11 19:25:02 +01:00
2002-07-06 17:20:10 +02:00
echocheck "restrict keyword"
for restrict_keyword in restrict __restrict __restrict__ ; do
2008-05-03 22:03:36 +02:00
echo "void foo(char * $restrict_keyword p); int main(void) {}" > $TMPC
2002-07-06 17:20:10 +02:00
if cc_check; then
_def_restrict_keyword=$restrict_keyword
break;
fi
done
if [ -n "$_def_restrict_keyword" ]; then
echores "$_def_restrict_keyword"
else
echores "none"
fi
2004-10-30 11:31:33 +02:00
# Avoid infinite recursion loop ("#define restrict restrict")
if [ "$_def_restrict_keyword" != "restrict" ]; then
_def_restrict_keyword="#define restrict $_def_restrict_keyword"
else
_def_restrict_keyword=""
fi
2002-03-15 23:16:02 +01:00
2002-11-11 19:25:02 +01:00
2004-11-22 11:28:36 +01:00
echocheck "__builtin_expect"
# GCC branch prediction hint
cat > $TMPC << EOF
int foo (int a) {
a = __builtin_expect (a, 10);
return a == 10 ? 0 : 1;
}
2007-11-21 10:17:04 +01:00
int main(void) { return foo(10) && foo(0); }
2004-11-22 11:28:36 +01:00
EOF
_builtin_expect=no
cc_check && _builtin_expect=yes
if test "$_builtin_expect" = yes ; then
_def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1'
else
_def_builtin_expect='#undef HAVE_BUILTIN_EXPECT'
fi
echores "$_builtin_expect"
2001-11-17 04:53:05 +01:00
echocheck "kstat"
2001-08-24 18:20:04 +02:00
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <kstat.h>
int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2001-08-24 18:20:04 +02:00
EOF
2001-11-17 04:53:05 +01:00
_kstat=no
cc_check -lkstat && _kstat=yes
if test "$_kstat" = yes ; then
_def_kstat="#define HAVE_LIBKSTAT 1"
2006-11-27 23:55:46 +01:00
_ld_extra="$_ld_extra -lkstat"
2001-11-17 04:53:05 +01:00
else
_def_kstat="#undef HAVE_LIBKSTAT"
fi
echores "$_kstat"
2001-08-24 18:20:04 +02:00
2001-11-17 04:53:05 +01:00
echocheck "posix4"
2001-11-20 17:16:47 +01:00
# required for nanosleep on some systems
2001-11-17 12:46:09 +01:00
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <time.h>
int main(void) { (void) nanosleep(0, 0); return 0; }
2001-11-17 12:46:09 +01:00
EOF
2001-11-17 04:53:05 +01:00
_posix4=no
cc_check -lposix4 && _posix4=yes
if test "$_posix4" = yes ; then
2006-11-27 23:55:46 +01:00
_ld_extra="$_ld_extra -lposix4"
2001-11-17 04:53:05 +01:00
fi
echores "$_posix4"
2001-06-05 20:40:44 +02:00
2007-12-28 18:23:57 +01:00
for func in llrint lrint lrintf round roundf; do
echocheck $func
2002-11-05 08:34:55 +01:00
cat > $TMPC << EOF
#include <math.h>
2007-12-28 18:23:57 +01:00
int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
2002-11-05 08:34:55 +01:00
EOF
2007-12-28 18:23:57 +01:00
eval _$func=no
2008-01-02 19:32:55 +01:00
cc_check -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes
2007-12-28 18:23:57 +01:00
if eval test "x\$_$func" = "xyes"; then
eval _def_$func="\"#define HAVE_`echo $func | tr '[a-z]' '[A-Z]'` 1\""
echores yes
2002-11-05 08:34:55 +01:00
else
2007-12-28 18:23:57 +01:00
eval _def_$func="\"#undef HAVE_`echo $func | tr '[a-z]' '[A-Z]'`\""
echores no
2002-11-05 08:34:55 +01:00
fi
2007-12-28 18:23:57 +01:00
done
2002-11-05 08:34:55 +01:00
2007-07-11 21:47:20 +02:00
echocheck "mkstemp"
cat > $TMPC << EOF
#include <stdlib.h>
int main(void) { char a; mkstemp(&a); return 0; }
EOF
_mkstemp=no
cc_check && _mkstemp=yes
if test "$_mkstemp" = yes ; then
_def_mkstemp='#define HAVE_MKSTEMP 1'
else
_def_mkstemp='#undef HAVE_MKSTEMP'
fi
echores "$_mkstemp"
2001-11-23 19:25:09 +01:00
echocheck "nanosleep"
# also check for nanosleep
cat > $TMPC << EOF
#include <time.h>
int main(void) { (void) nanosleep(0, 0); return 0; }
EOF
_nanosleep=no
2006-11-27 23:55:46 +01:00
cc_check && _nanosleep=yes
2001-11-23 19:25:09 +01:00
if test "$_nanosleep" = yes ; then
_def_nanosleep='#define HAVE_NANOSLEEP 1'
else
_def_nanosleep='#undef HAVE_NANOSLEEP'
fi
echores "$_nanosleep"
2001-11-17 04:53:05 +01:00
echocheck "socklib"
# for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2004-10-11 21:26:13 +02:00
# for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <netdb.h>
2005-10-15 12:46:24 +02:00
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2006-10-11 16:06:38 +02:00
_socklib=no
2006-10-11 16:09:30 +02:00
for _ld_tmp in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2006-10-11 16:06:38 +02:00
cc_check $_ld_tmp && _ld_sock="$_ld_tmp" && _socklib=yes && break
2005-10-03 21:36:32 +02:00
done
2007-11-22 18:11:38 +01:00
if test $_winsock2 = auto && ! cygwin ; then
2003-06-11 18:48:09 +02:00
_winsock2=no
cat > $TMPC << EOF
#include <winsock2.h>
int main(void) { (void) gethostbyname(0); return 0; }
EOF
cc_check -lws2_32 && _ld_sock="-lws2_32" && _winsock2=yes
fi
2006-10-11 16:06:38 +02:00
test "$_ld_sock" && _res_comment="using $_ld_sock"
echores "$_socklib"
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
2003-06-11 18:48:09 +02:00
if test $_winsock2 = yes ; then
_ld_sock="-lws2_32"
_def_winsock2='#define HAVE_WINSOCK2 1'
else
_def_winsock2='#undef HAVE_WINSOCK2'
fi
2002-08-29 09:07:12 +02:00
_use_aton=no
2001-12-30 20:38:28 +01:00
echocheck "inet_pton()"
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_pton(0, 0, 0); return 0; }
EOF
2003-06-11 18:48:09 +02:00
if test "$_winsock2" = yes ; then
2006-05-07 16:00:07 +02:00
_res_comment="using winsock2 functions instead"
echores "no"
2003-06-11 18:48:09 +02:00
elif cc_check $_ld_sock ; then
2001-12-30 20:38:28 +01:00
# NOTE: Linux has libresolv but does not need it
:
2006-05-07 16:00:07 +02:00
_res_comment="using $_ld_sock"
echores "yes"
2001-12-30 20:38:28 +01:00
elif cc_check $_ld_sock -lresolv ; then
# NOTE: needed for SunOS at least
_ld_sock="$_ld_sock -lresolv"
2006-05-07 16:00:07 +02:00
_res_comment="using $_ld_sock"
echores "yes"
2001-12-30 20:38:28 +01:00
else
2006-05-07 16:00:07 +02:00
_res_comment="trying inet_aton next"
echores "no"
2008-05-03 22:14:50 +02:00
2002-08-29 09:07:12 +02:00
echocheck "inet_aton()"
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_aton(0, 0); return 0; }
EOF
_use_aton=yes
if cc_check $_ld_sock ; then
# NOTE: Linux has libresolv but does not need it
:
2006-05-07 16:00:07 +02:00
_res_comment="using $_ld_sock"
2002-08-29 09:07:12 +02:00
elif cc_check $_ld_sock -lresolv ; then
# NOTE: needed for SunOS at least
_ld_sock="$_ld_sock -lresolv"
2006-05-07 16:00:07 +02:00
_res_comment="using $_ld_sock"
2002-08-29 09:07:12 +02:00
else
_use_aton=no
2003-05-17 14:24:01 +02:00
_network=no
2006-05-07 16:00:07 +02:00
_res_comment="network support disabled"
2002-08-29 09:07:12 +02:00
fi
2006-05-07 16:00:07 +02:00
echores "$_use_aton"
2001-12-30 20:38:28 +01:00
fi
2002-08-29 09:07:12 +02:00
_def_use_aton='#undef USE_ATON'
2006-08-18 18:04:16 +02:00
if test "$_use_aton" = yes; then
2002-08-29 09:07:12 +02:00
_def_use_aton='#define USE_ATON 1'
fi
2002-03-15 21:48:42 +01:00
2007-01-30 19:29:02 +01:00
echocheck "network"
# FIXME network check
if test "$_network" = yes ; then
_def_network='#define MPLAYER_NETWORK 1'
_ld_extra="$_ld_extra $_ld_sock"
_inputmodules="network $_inputmodules"
else
_noinputmodules="network $_noinputmodules"
_def_network='#undef MPLAYER_NETWORK'
_ftp=no
fi
echores "$_network"
2002-11-11 19:25:02 +01:00
2002-01-06 14:06:51 +01:00
echocheck "inttypes.h (required)"
2001-12-31 16:29:46 +01:00
cat > $TMPC << EOF
2002-01-06 14:06:51 +01:00
#include <inttypes.h>
2001-12-31 16:29:46 +01:00
int main(void) { return 0; }
EOF
2002-01-06 14:06:51 +01:00
_inttypes=no
cc_check && _inttypes=yes
2006-04-04 07:09:12 +02:00
echores "$_inttypes"
if test "$_inttypes" = no ; then
2003-11-13 21:53:40 +01:00
echocheck "bitypes.h (inttypes.h predecessor)"
cat > $TMPC << EOF
#include <sys/bitypes.h>
int main(void) { return 0; }
EOF
cc_check && _inttypes=yes
if test "$_inttypes" = yes ; then
2004-01-30 10:07:28 +01:00
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."
2003-11-13 21:53:40 +01:00
else
2007-08-07 18:07:52 +02:00
die "Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2003-11-13 21:53:40 +01:00
fi
2001-12-31 16:29:46 +01:00
fi
2002-11-11 19:25:02 +01:00
2003-11-02 11:14:05 +01:00
echocheck "int_fastXY_t in inttypes.h"
cat > $TMPC << EOF
#include <inttypes.h>
2008-05-03 22:14:50 +02:00
int main(void) {
2003-11-02 11:14:05 +01:00
volatile int_fast16_t v= 0;
return v; }
EOF
_fast_inttypes=no
cc_check && _fast_inttypes=yes
2007-12-22 16:44:57 +01:00
if test "$_fast_inttypes" = no ; then
2008-05-03 22:14:50 +02:00
_def_fast_inttypes='
2003-11-02 11:14:05 +01:00
typedef signed char int_fast8_t;
typedef signed int int_fast16_t;
typedef signed int int_fast32_t;
2006-10-22 17:13:50 +02:00
typedef signed long long int_fast64_t;
2003-11-02 11:14:05 +01:00
typedef unsigned char uint_fast8_t;
typedef unsigned int uint_fast16_t;
2006-08-18 16:44:09 +02:00
typedef unsigned int uint_fast32_t;
typedef unsigned long long uint_fast64_t;'
2003-11-02 11:14:05 +01:00
fi
echores "$_fast_inttypes"
2002-09-16 21:37:57 +02:00
echocheck "word size"
_mp_wordsize="#undef MP_WORDSIZE"
cat > $TMPC << EOF
#include <stdio.h>
#include <sys/types.h>
int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
EOF
2007-08-14 16:52:22 +02:00
cc_check && _wordsize=`$TMPEXE` && _mp_wordsize="#define MP_WORDSIZE $_wordsize"
2002-09-16 21:37:57 +02:00
echores "$_wordsize"
2001-12-31 16:29:46 +01:00
2002-11-11 19:25:02 +01:00
2001-11-17 04:53:05 +01:00
echocheck "malloc.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <malloc.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) malloc(0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01:00
_malloc=no
cc_check && _malloc=yes
if test "$_malloc" = yes ; then
_def_malloc='#define HAVE_MALLOC_H 1'
else
_def_malloc='#undef HAVE_MALLOC_H'
fi
2002-07-04 00:17:33 +02:00
# malloc.h emits a warning in FreeBSD and OpenBSD
2008-03-27 03:04:03 +01:00
freebsd || openbsd || dragonfly && _def_malloc='#undef HAVE_MALLOC_H'
2001-11-17 04:53:05 +01:00
echores "$_malloc"
2001-11-09 03:02:58 +01:00
2001-11-17 04:53:05 +01:00
echocheck "memalign()"
2001-11-09 03:02:58 +01:00
# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
cat > $TMPC << EOF
2001-08-24 16:49:05 +02:00
#include <malloc.h>
2008-05-03 22:03:36 +02:00
int main(void) { (void) memalign(64, sizeof(char)); return 0; }
2001-08-24 16:49:05 +02:00
EOF
2001-11-09 03:02:58 +01:00
_memalign=no
cc_check && _memalign=yes
2001-11-17 04:53:05 +01:00
if test "$_memalign" = yes ; then
_def_memalign='#define HAVE_MEMALIGN 1'
else
_def_memalign='#undef HAVE_MEMALIGN'
2006-08-03 19:07:31 +02:00
_def_map_memalign='#define memalign(a,b) malloc(b)'
2007-11-22 18:11:38 +01:00
darwin || _def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
2001-11-17 04:53:05 +01:00
fi
echores "$_memalign"
2001-11-09 03:02:58 +01:00
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
echocheck "alloca.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <alloca.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) alloca(0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01:00
_alloca=no
cc_check && _alloca=yes
if cc_check ; then
_def_alloca='#define HAVE_ALLOCA_H 1'
else
_def_alloca='#undef HAVE_ALLOCA_H'
fi
echores "$_alloca"
2001-07-12 17:35:52 +02:00
2008-02-12 22:10:13 +01:00
echocheck "byteswap.h"
cat > $TMPC << EOF
#include <byteswap.h>
int main(void) { bswap_16(0); return 0; }
EOF
_byteswap_h=no
cc_check && _byteswap_h=yes
if cc_check ; then
_def_byteswap_h='#define HAVE_BYTESWAP_H 1'
else
_def_byteswap_h='#undef HAVE_BYTESWAP_H'
fi
echores "$_byteswap_h"
2001-11-17 04:53:05 +01:00
echocheck "mman.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
2001-07-12 18:11:55 +02:00
#include <sys/types.h>
2001-07-12 17:35:52 +02:00
#include <sys/mman.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01:00
_mman=no
cc_check && _mman=yes
if test "$_mman" = yes ; then
_def_mman='#define HAVE_SYS_MMAN_H 1'
else
_def_mman='#undef HAVE_SYS_MMAN_H'
2008-04-08 19:31:25 +02:00
os2 && _need_mmap=yes
2001-11-17 04:53:05 +01:00
fi
echores "$_mman"
2001-07-12 17:35:52 +02:00
2005-01-21 22:32:15 +01:00
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/mman.h>
int main(void) { void *p = MAP_FAILED; return 0; }
EOF
_mman_has_map_failed=no
cc_check && _mman_has_map_failed=yes
if test "$_mman_has_map_failed" = yes ; then
_def_mman_has_map_failed=''
else
_def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)'
fi
2001-11-18 18:45:23 +01:00
echocheck "dynamic loader"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <dlfcn.h>
2001-11-18 18:45:23 +01:00
int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01:00
_dl=no
2005-10-03 21:36:32 +02:00
for _ld_tmp in "" "-ldl" ; do
2005-10-08 22:43:41 +02:00
cc_check $_ld_tmp && _ld_dl="$_ld_tmp" && _dl=yes && break
2005-10-03 21:36:32 +02:00
done
2001-11-17 04:53:05 +01:00
if test "$_dl" = yes ; then
_def_dl='#define HAVE_LIBDL 1'
else
_def_dl='#undef HAVE_LIBDL'
fi
echores "$_dl"
2001-07-12 17:35:52 +02:00
2001-11-19 16:54:43 +01:00
2002-11-11 19:25:02 +01:00
echocheck "dynamic a/v plugins support"
if test "$_dl" = no ; then
2003-04-21 18:08:06 +02:00
_dynamic_plugins=no
2002-11-11 19:25:02 +01:00
fi
if test "$_dynamic_plugins" = yes ; then
_def_dynamic_plugins='#define DYNAMIC_PLUGINS 1'
else
_def_dynamic_plugins='#undef DYNAMIC_PLUGINS'
fi
echores "$_dynamic_plugins"
2004-12-23 16:18:39 +01:00
_def_threads='#undef HAVE_THREADS'
2001-11-20 16:11:49 +01:00
2001-11-18 18:45:23 +01:00
echocheck "pthread"
2006-08-18 18:04:16 +02:00
if test "$_pthreads" = auto ; then
2001-11-18 18:45:23 +01:00
cat > $TMPC << EOF
2001-11-19 15:11:57 +01:00
#include <pthread.h>
2001-12-15 19:35:06 +01:00
void* func(void *arg) { return arg; }
int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2001-11-18 18:45:23 +01:00
EOF
2005-10-03 21:36:32 +02:00
_pthreads=no
2007-11-22 18:11:38 +01:00
if ! hpux ; then
2005-10-03 21:36:32 +02:00
for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
2002-01-17 02:12:01 +01:00
# for crosscompilation, we cannot execute the program, be happy if we can link statically
2005-10-18 23:44:14 +02:00
cc_check $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
2005-10-03 21:36:32 +02:00
done
2001-11-18 18:45:23 +01:00
fi
2005-06-06 18:56:29 +02:00
fi
2005-10-03 21:36:32 +02:00
if test "$_pthreads" = yes ; then
2006-04-24 23:50:06 +02:00
_res_comment="using $_ld_pthread"
2004-07-06 04:10:22 +02:00
_def_pthreads='#define HAVE_PTHREADS 1'
2004-12-23 16:18:39 +01:00
_def_threads='#define HAVE_THREADS 1'
2004-03-27 21:19:57 +01:00
else
2008-03-15 10:20:41 +01:00
_res_comment="v4l, v4l2, ao_nas, win32 loader disabled"
2004-07-06 04:10:22 +02:00
_def_pthreads='#undef HAVE_PTHREADS'
2008-03-15 10:20:41 +01:00
_nas=no ; _tv_v4l1=no ; _tv_v4l2=no
2007-11-22 18:11:38 +01:00
mingw32 || _win32dll=no
2003-10-25 22:33:51 +02:00
fi
2006-03-13 22:50:56 +01:00
echores "$_pthreads"
2001-11-18 18:45:23 +01:00
2007-07-16 08:34:51 +02:00
echocheck "w32threads"
if test "$_pthreads" = yes ; then
_res_comment="using pthread instead"
_w32threads=no
fi
if test "$_w32threads" = auto ; then
_w32threads=no
mingw32 && _w32threads=yes
fi
test "$_w32threads" = yes && _def_threads='#define HAVE_THREADS 1'
echores "$_w32threads"
2006-06-09 16:19:59 +02:00
echocheck "rpath"
netbsd &&_rpath=yes
if test "$_rpath" = yes ; then
for I in `echo $_ld_extra | sed 's/-L//g'` ; do
tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
done
_ld_extra=$tmp
fi
echores "$_rpath"
2004-03-27 21:19:57 +01:00
2005-07-30 03:07:27 +02:00
echocheck "iconv"
if test "$_iconv" = auto ; then
cat > $TMPC << EOF
#include <stdio.h>
#include <unistd.h>
2007-07-13 19:01:21 +02:00
#include <iconv.h>
2005-07-30 03:07:27 +02:00
#define INBUFSIZE 1024
#define OUTBUFSIZE 4096
char inbuffer[INBUFSIZE];
char outbuffer[OUTBUFSIZE];
int main(void) {
size_t numread;
iconv_t icdsc;
char *tocode="UTF-8";
char *fromcode="cp1250";
if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
while ((numread = read (0, inbuffer, INBUFSIZE))) {
char *iptr=inbuffer;
char *optr=outbuffer;
size_t inleft=numread;
size_t outleft=OUTBUFSIZE;
if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
!= (size_t)(-1)) {
write (1, outbuffer, OUTBUFSIZE - outleft);
}
}
if (iconv_close(icdsc) == -1)
;
}
}
EOF
_iconv=no
2005-10-03 21:36:32 +02:00
for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do
2006-11-20 01:19:43 +01:00
cc_check $_ld_lm $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" && \
_iconv=yes && break
2005-10-03 21:36:32 +02:00
done
2005-07-30 03:07:27 +02:00
fi
if test "$_iconv" = yes ; then
_def_iconv='#define USE_ICONV 1'
else
_def_iconv='#undef USE_ICONV'
fi
echores "$_iconv"
2002-04-28 00:42:27 +02:00
echocheck "soundcard.h"
2007-07-11 12:43:25 +02:00
_soundcard_h=no
_def_soundcard='#undef HAVE_SOUNDCARD_H'
_def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H'
for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do
cat > $TMPC << EOF
#include <$_soundcard_header>
2002-04-28 00:42:27 +02:00
int main(void) { return 0; }
EOF
2007-07-13 19:36:14 +02:00
cc_check && _soundcard_h=yes && _res_comment="$_soundcard_header" && break
2007-07-11 12:43:25 +02:00
done
if test "$_soundcard_h" = yes ; then
if test $_soundcard_header = "sys/soundcard.h"; then
_def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1'
else
_def_soundcard='#define HAVE_SOUNDCARD_H 1'
fi
2002-04-28 00:42:27 +02:00
fi
2007-07-11 12:43:25 +02:00
echores "$_soundcard_h"
2001-11-17 04:53:05 +01:00
2002-11-11 19:25:02 +01:00
2002-04-23 18:29:13 +02:00
echocheck "sys/dvdio.h"
cat > $TMPC << EOF
2002-04-25 11:30:47 +02:00
#include <unistd.h>
2002-04-23 18:29:13 +02:00
#include <sys/dvdio.h>
int main(void) { return 0; }
EOF
_dvdio=no
cc_check && _dvdio=yes
if test "$_dvdio" = yes ; then
_def_dvdio='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
else
_def_dvdio='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
fi
echores "$_dvdio"
echocheck "sys/cdio.h"
cat > $TMPC << EOF
2002-06-08 00:41:26 +02:00
#include <unistd.h>
2002-04-23 18:29:13 +02:00
#include <sys/cdio.h>
int main(void) { return 0; }
EOF
_cdio=no
cc_check && _cdio=yes
if test "$_cdio" = yes ; then
_def_cdio='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
else
_def_cdio='#undef DVD_STRUCT_IN_SYS_CDIO_H'
fi
echores "$_cdio"
echocheck "linux/cdrom.h"
cat > $TMPC << EOF
2002-05-02 13:50:39 +02:00
#include <sys/types.h>
2002-04-23 18:29:13 +02:00
#include <linux/cdrom.h>
int main(void) { return 0; }
EOF
_cdrom=no
cc_check && _cdrom=yes
if test "$_cdrom" = yes ; then
_def_cdrom='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
else
_def_cdrom='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
fi
echores "$_cdrom"
echocheck "dvd.h"
cat > $TMPC << EOF
#include <dvd.h>
int main(void) { return 0; }
EOF
_dvd=no
cc_check && _dvd=yes
if test "$_dvd" = yes ; then
_def_dvd='#define DVD_STRUCT_IN_DVD_H 1'
else
_def_dvd='#undef DVD_STRUCT_IN_DVD_H'
fi
echores "$_dvd"
2006-06-18 13:21:23 +02:00
if bsdos; then
2002-05-09 11:04:08 +02:00
echocheck "BSDI dvd.h"
2002-04-23 18:29:13 +02:00
cat > $TMPC << EOF
2002-05-09 11:04:08 +02:00
#include <dvd.h>
2002-04-23 18:29:13 +02:00
int main(void) { return 0; }
EOF
_bsdi_dvd=no
cc_check && _bsdi_dvd=yes
if test "$_bsdi_dvd" = yes ; then
_def_bsdi_dvd='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
else
_def_bsdi_dvd='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
fi
echores "$_bsdi_dvd"
2006-06-18 13:21:23 +02:00
fi #if bsdos
2002-04-23 18:29:13 +02:00
2006-06-18 13:21:23 +02:00
if hpux; then
2006-05-12 19:27:03 +02:00
# also used by AIX, but AIX does not support VCD and/or libdvdread
2006-05-12 11:13:05 +02:00
echocheck "HP-UX SCSI header"
2002-09-14 00:04:11 +02:00
cat > $TMPC << EOF
#include <sys/scsi.h>
int main(void) { return 0; }
EOF
_hpux_scsi_h=no
cc_check && _hpux_scsi_h=yes
if test "$_hpux_scsi_h" = yes ; then
2003-02-23 21:31:59 +01:00
_def_hpux_scsi_h='#define HPUX_SCTL_IO 1'
2002-09-14 00:04:11 +02:00
else
2003-02-23 21:31:59 +01:00
_def_hpux_scsi_h='#undef HPUX_SCTL_IO'
2002-09-14 00:04:11 +02:00
fi
echores "$_hpux_scsi_h"
2006-06-18 13:21:23 +02:00
fi #if hpux
2002-09-14 00:04:11 +02:00
2006-06-18 13:21:23 +02:00
if sunos; then
2002-04-27 03:25:32 +02:00
echocheck "userspace SCSI headers (Solaris)"
2002-04-23 18:29:13 +02:00
cat > $TMPC << EOF
2008-05-03 22:03:36 +02:00
#include <unistd.h>
#include <stropts.h>
#include <sys/scsi/scsi_types.h>
#include <sys/scsi/impl/uscsi.h>
2002-04-23 18:29:13 +02:00
int main(void) { return 0; }
EOF
_sol_scsi_h=no
cc_check && _sol_scsi_h=yes
if test "$_sol_scsi_h" = yes ; then
_def_sol_scsi_h='#define SOLARIS_USCSI 1'
else
_def_sol_scsi_h='#undef SOLARIS_USCSI'
fi
echores "$_sol_scsi_h"
2006-06-18 13:21:23 +02:00
fi #if sunos
2002-04-23 18:29:13 +02:00
2001-11-17 04:53:05 +01:00
echocheck "termcap"
2001-11-17 12:46:09 +01:00
if test "$_termcap" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2005-12-25 08:21:42 +01:00
int main(void) { tgetent(); return 0; }
2001-11-14 20:02:39 +01:00
EOF
2001-11-27 18:58:29 +01:00
_termcap=no
2005-12-25 15:00:04 +01:00
for _ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do
2006-11-20 01:19:43 +01:00
cc_check $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
&& _termcap=yes && break
2005-10-03 21:36:32 +02:00
done
2001-11-17 04:53:05 +01:00
fi
if test "$_termcap" = yes ; then
_def_termcap='#define USE_TERMCAP 1'
2006-11-20 01:19:43 +01:00
_res_comment="using $_ld_tmp"
2001-11-17 04:53:05 +01:00
else
_def_termcap='#undef USE_TERMCAP'
fi
2005-09-12 12:05:06 +02:00
echores "$_termcap"
2001-11-14 20:02:39 +01:00
2001-06-09 01:30:09 +02:00
2001-11-19 17:42:01 +01:00
echocheck "termios"
2007-07-13 19:54:45 +02:00
_def_termios='#undef HAVE_TERMIOS'
_def_termios_h='#undef HAVE_TERMIOS_H'
_def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
2001-11-19 17:42:01 +01:00
if test "$_termios" = auto ; then
2007-07-13 19:54:45 +02:00
_termios=no
for _termios_header in "sys/termios.h" "termios.h"; do
2001-11-19 17:42:01 +01:00
cat > $TMPC <<EOF
2007-07-13 19:54:45 +02:00
#include <$_termios_header>
2001-12-03 16:22:03 +01:00
int main(void) { return 0; }
EOF
2007-07-13 19:54:45 +02:00
cc_check && _termios=yes && _res_comment="$_termios_header" && break
done
2001-12-03 16:22:03 +01:00
fi
2001-11-19 17:42:01 +01:00
if test "$_termios" = yes ; then
2001-11-20 20:28:16 +01:00
_def_termios='#define HAVE_TERMIOS 1'
2007-07-13 19:54:45 +02:00
if test "$_termios_header" = "termios.h" ; then
2001-12-03 16:22:03 +01:00
_def_termios_h='#define HAVE_TERMIOS_H 1'
2007-07-13 19:54:45 +02:00
else
_def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1'
2001-12-03 16:22:03 +01:00
fi
2001-11-19 17:42:01 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_termios"
2001-11-19 17:42:01 +01:00
2001-11-19 16:54:43 +01:00
echocheck "shm"
2001-11-19 17:06:33 +01:00
if test "$_shm" = auto ; then
cat > $TMPC << EOF
2001-11-19 17:42:01 +01:00
#include <sys/types.h>
2001-11-19 16:54:43 +01:00
#include <sys/shm.h>
int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
EOF
2001-11-27 18:58:29 +01:00
_shm=no
2001-11-19 17:06:33 +01:00
cc_check && _shm=yes
fi
2001-11-19 16:54:43 +01:00
if test "$_shm" = yes ; then
_def_shm='#define HAVE_SHM 1'
else
_def_shm='#undef HAVE_SHM'
fi
echores "$_shm"
2002-03-15 21:48:42 +01:00
2002-03-29 22:24:36 +01:00
echocheck "strsep()"
cat > $TMPC << EOF
#include <string.h>
2008-05-03 22:03:36 +02:00
int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
2002-03-29 22:24:36 +01:00
EOF
_strsep=no
cc_check && _strsep=yes
if test "$_strsep" = yes ; then
_def_strsep='#define HAVE_STRSEP 1'
2007-01-10 20:07:42 +01:00
_need_strsep=no
2002-03-29 22:24:36 +01:00
else
_def_strsep='#undef HAVE_STRSEP'
2007-01-10 20:07:42 +01:00
_need_strsep=yes
2002-03-29 22:24:36 +01:00
fi
echores "$_strsep"
2001-11-17 04:53:05 +01:00
echocheck "vsscanf()"
2001-06-05 12:16:32 +02:00
cat > $TMPC << EOF
2001-11-17 04:53:05 +01:00
#include <stdarg.h>
2003-09-02 16:36:26 +02:00
int main(void) { vsscanf(0, 0, 0); return 0; }
2001-06-05 12:16:32 +02:00
EOF
2001-11-17 04:53:05 +01:00
_vsscanf=no
cc_check && _vsscanf=yes
if test "$_vsscanf" = yes ; then
_def_vsscanf='#define HAVE_VSSCANF 1'
2007-01-10 20:07:42 +01:00
_need_vsscanf=no
2001-11-17 04:53:05 +01:00
else
_def_vsscanf='#undef HAVE_VSSCANF'
2007-01-10 20:07:42 +01:00
_need_vsscanf=yes
2001-11-17 04:53:05 +01:00
fi
echores "$_vsscanf"
2001-06-05 12:16:32 +02:00
2003-04-04 21:15:24 +02:00
2004-10-11 21:26:13 +02:00
echocheck "swab()"
cat > $TMPC << EOF
#include <unistd.h>
int main(void) { swab(0, 0, 0); return 0; }
EOF
_swab=no
cc_check && _swab=yes
if test "$_swab" = yes ; then
_def_swab='#define HAVE_SWAB 1'
2007-01-10 20:07:42 +01:00
_need_swab=no
2004-10-11 21:26:13 +02:00
else
_def_swab='#undef HAVE_SWAB'
2007-01-10 20:07:42 +01:00
_need_swab=yes
2004-10-11 21:26:13 +02:00
fi
echores "$_swab"
2006-05-12 11:13:05 +02:00
echocheck "POSIX select()"
2003-04-04 21:15:24 +02:00
cat > $TMPC << EOF
2003-04-11 18:33:29 +02:00
#include <stdio.h>
#include <stdlib.h>
2003-04-04 21:15:24 +02:00
#include <sys/types.h>
2003-04-11 18:33:29 +02:00
#include <string.h>
#include <sys/time.h>
2003-04-04 21:15:24 +02:00
#include <unistd.h>
int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
EOF
_posix_select=no
2007-03-21 09:24:20 +01:00
_def_posix_select='#undef HAVE_POSIX_SELECT'
2008-02-18 16:02:41 +01:00
#select() of kLIBC (OS/2) supports socket only
! os2 && cc_check && _posix_select=yes \
2007-03-21 09:24:20 +01:00
&& _def_posix_select='#define HAVE_POSIX_SELECT 1'
2003-04-04 21:15:24 +02:00
echores "$_posix_select"
echocheck "gettimeofday()"
cat > $TMPC << EOF
#include <stdio.h>
#include <sys/time.h>
int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
EOF
_gettimeofday=no
cc_check && _gettimeofday=yes
if test "$_gettimeofday" = yes ; then
_def_gettimeofday='#define HAVE_GETTIMEOFDAY 1'
2007-01-13 05:12:05 +01:00
_need_gettimeofday=no
2003-04-04 21:15:24 +02:00
else
_def_gettimeofday='#undef HAVE_GETTIMEOFDAY'
2007-01-13 05:12:05 +01:00
_need_gettimeofday=yes
2003-04-04 21:15:24 +02:00
fi
echores "$_gettimeofday"
echocheck "glob()"
cat > $TMPC << EOF
#include <stdio.h>
#include <glob.h>
int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
EOF
_glob=no
cc_check && _glob=yes
if test "$_glob" = yes ; then
_def_glob='#define HAVE_GLOB 1'
2007-01-10 20:07:42 +01:00
_need_glob=no
2003-04-04 21:15:24 +02:00
else
_def_glob='#undef HAVE_GLOB'
2007-01-10 20:07:42 +01:00
_need_glob=yes
2003-04-04 21:15:24 +02:00
fi
echores "$_glob"
2005-12-26 04:16:48 +01:00
echocheck "setenv()"
cat > $TMPC << EOF
#include <stdlib.h>
2008-05-03 22:03:36 +02:00
int main(void) { setenv("","",0); return 0; }
2005-12-26 04:16:48 +01:00
EOF
_setenv=no
cc_check && _setenv=yes
if test "$_setenv" = yes ; then
_def_setenv='#define HAVE_SETENV 1'
2007-01-10 20:07:42 +01:00
_need_setenv=no
2005-12-26 04:16:48 +01:00
else
_def_setenv='#undef HAVE_SETENV'
2007-01-10 20:07:42 +01:00
_need_setenv=yes
2005-12-26 04:16:48 +01:00
fi
echores "$_setenv"
2006-04-30 23:17:30 +02:00
if sunos; then
echocheck "sysi86()"
cat > $TMPC << EOF
#include <sys/sysi86.h>
2008-05-03 22:03:36 +02:00
int main(void) { sysi86(0); return 0; }
2006-04-30 23:17:30 +02:00
EOF
_sysi86=no
cc_check && _sysi86=yes
if test "$_sysi86" = yes ; then
_def_sysi86='#define HAVE_SYSI86 1'
2007-03-18 23:18:11 +01:00
cat > $TMPC << EOF
2008-05-03 22:03:36 +02:00
#include <sys/sysi86.h>
int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
2007-03-18 23:18:11 +01:00
EOF
cc_check && _def_sysi86_iv='#define HAVE_SYSI86_iv 1'
2006-04-30 23:17:30 +02:00
else
_def_sysi86='#undef HAVE_SYSI86'
fi
echores "$_sysi86"
2006-06-16 18:03:27 +02:00
fi #if sunos
2006-04-30 23:17:30 +02:00
2002-08-21 23:31:20 +02:00
echocheck "sys/sysinfo.h"
cat > $TMPC << EOF
#include <sys/sysinfo.h>
int main(void) {
struct sysinfo s_info;
sysinfo(&s_info);
return 0;
}
EOF
_sys_sysinfo=no
cc_check && _sys_sysinfo=yes
if test "$_sys_sysinfo" = yes ; then
_def_sys_sysinfo='#define HAVE_SYS_SYSINFO_H 1'
else
_def_sys_sysinfo='#undef HAVE_SYS_SYSINFO_H'
fi
echores "$_sys_sysinfo"
2001-10-25 13:46:50 +02:00
2006-06-18 13:21:23 +02:00
if darwin; then
2003-02-19 18:26:59 +01:00
echocheck "Mac OS X APIs"
2006-06-18 13:21:23 +02:00
if test "$_macosx" = auto ; then
2005-09-11 16:50:33 +02:00
productName=`/usr/bin/sw_vers -productName`
2006-11-12 17:34:33 +01:00
if test "$productName" = "Mac OS X" ||
test "$productName" = "Mac OS X Server" ; then
2003-02-19 18:26:59 +01:00
_macosx=yes
else
_macosx=no
2003-05-21 23:15:46 +02:00
_noaomodules="macosx $_noaomodules"
2004-04-05 23:20:19 +02:00
_novomodules="quartz $_novomodules"
2003-02-19 18:26:59 +01:00
fi
fi
if test "$_macosx" = yes ; then
cat > $TMPC <<EOF
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
2003-05-21 23:15:46 +02:00
#include <CoreAudio/CoreAudio.h>
2003-04-08 18:10:52 +02:00
int main(void) {
EnterMovies();
ExitMovies();
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
2003-02-19 18:26:59 +01:00
}
EOF
2008-05-03 22:14:50 +02:00
if cc_check -framework Carbon -framework QuickTime -framework CoreAudio; then
2006-11-20 01:59:05 +01:00
_ld_extra="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
2008-03-15 09:54:21 +01:00
_coreaudio=yes
_def_coreaudio='#define HAVE_COREAUDIO 1'
2003-05-23 14:37:58 +02:00
_aosrc="$_aosrc ao_macosx.c"
2003-05-21 23:15:46 +02:00
_aomodules="macosx $_aomodules"
2008-03-15 10:49:14 +01:00
_def_quartz='#define HAVE_QUARTZ 1'
2004-04-05 23:20:19 +02:00
_vosrc="$_vosrc vo_quartz.c"
_vomodules="quartz $_vomodules"
2008-03-15 12:31:28 +01:00
_def_quicktime='#define HAVE_QUICKTIME 1'
2003-02-19 18:26:59 +01:00
else
_macosx=no
2008-03-15 10:28:33 +01:00
_coreaudio=no
2008-03-15 09:54:21 +01:00
_def_coreaudio='#undef HAVE_COREAUDIO'
2003-05-21 23:15:46 +02:00
_noaomodules="macosx $_noaomodules"
2008-03-15 10:49:14 +01:00
_def_quartz='#undef HAVE_QUARTZ'
2004-04-05 23:20:19 +02:00
_novomodules="quartz $_novomodules"
2008-03-15 12:31:28 +01:00
_def_quicktime='#undef HAVE_QUICKTIME'
2003-04-08 18:10:52 +02:00
fi
2005-04-29 17:44:46 +02:00
cat > $TMPC <<EOF
#include <Carbon/Carbon.h>
#include <QuartzCore/CoreVideo.h>
int main(void) {}
EOF
if cc_check -framework Carbon -framework QuartzCore -framework OpenGL; then
2005-04-29 13:41:07 +02:00
_vosrc="$_vosrc vo_macosx.m"
_vomodules="macosx $_vomodules"
2006-11-20 01:59:05 +01:00
_ld_extra="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
2008-03-15 10:19:38 +01:00
_def_corevideo='#define HAVE_COREVIDEO 1'
_corevideo=yes
2005-04-29 13:41:07 +02:00
else
_novomodules="macosx $_novomodules"
2008-03-15 10:19:38 +01:00
_def_corevideo='#undef HAVE_COREVIDEO'
_corevideo=no
2005-04-29 13:41:07 +02:00
fi
fi
2005-04-29 17:44:46 +02:00
echores "$_macosx"
2005-04-29 13:41:07 +02:00
2004-11-10 17:43:40 +01:00
echocheck "Mac OS X Finder Support"
if test "$_macosx_finder_support" = auto ; then
_macosx_finder_support=$_macosx
fi
if test "$_macosx_finder_support" = yes; then
_def_macosx_finder_support='#define MACOSX_FINDER_SUPPORT 1'
_macosx_finder_support=yes
else
_def_macosx_finder_support='#undef MACOSX_FINDER_SUPPORT'
_macosx_finder_support=no
2008-05-03 22:14:50 +02:00
fi
2004-11-10 17:43:40 +01:00
echores "$_macosx_finder_support"
2003-02-19 18:26:59 +01:00
2005-04-13 13:46:35 +02:00
echocheck "Mac OS X Bundle file locations"
if test "$_macosx_bundle" = auto ; then
_macosx_bundle=$_macosx_finder_support
fi
if test "$_macosx_bundle" = yes; then
_def_macosx_bundle='#define MACOSX_BUNDLE 1'
else
_def_macosx_bundle='#undef MACOSX_BUNDLE'
_macosx_bundle=no
2008-05-03 22:14:50 +02:00
fi
2005-04-13 13:46:35 +02:00
echores "$_macosx_bundle"
2007-08-14 16:29:22 +02:00
echocheck "Apple Remote"
if test "$_apple_remote" = auto ; then
_apple_remote=no
cat > $TMPC <<EOF
#include <stdio.h>
#include <IOKit/IOCFPlugIn.h>
2008-05-03 22:07:04 +02:00
int main(void) {
2007-08-14 16:29:22 +02:00
io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
CFMutableDictionaryRef hidMatchDictionary;
IOReturn ioReturnValue;
// Set up a matching dictionary to search the I/O Registry by class.
// name for all HID class devices
hidMatchDictionary = IOServiceMatching("AppleIRController");
// Now search I/O Registry for matching devices.
ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
hidMatchDictionary, &hidObjectIterator);
// If search is unsuccessful, return nonzero.
if (ioReturnValue != kIOReturnSuccess ||
!IOIteratorIsValid(hidObjectIterator)) {
return 1;
}
return 0;
}
EOF
cc_check -framework IOKit && tmp_run && _apple_remote=yes
fi
if test "$_apple_remote" = yes ; then
_def_apple_remote='#define HAVE_APPLE_REMOTE 1'
_ld_extra="$_ld_extra -framework IOKit"
else
_def_apple_remote='#undef HAVE_APPLE_REMOTE'
fi
echores "$_apple_remote"
2006-06-18 13:21:23 +02:00
fi #if darwin
2008-05-18 13:53:00 +02:00
if linux; then
echocheck "Apple IR"
if test "$_apple_ir" = auto ; then
_apple_ir=no
cat > $TMPC <<EOF
2008-05-20 22:51:22 +02:00
#include <linux/types.h>
2008-05-18 13:53:00 +02:00
#include <linux/input.h>
int main(void) {
struct input_event ev;
2008-06-24 10:21:04 +02:00
struct input_id id;
2008-05-18 13:53:00 +02:00
return 0;
}
EOF
cc_check && tmp_run && _apple_ir=yes
fi
if test "$_apple_ir" = yes ; then
_def_apple_ir='#define HAVE_APPLE_IR 1'
else
_def_apple_ir='#undef HAVE_APPLE_IR'
fi
echores "$_apple_ir"
fi #if linux
2006-06-18 13:21:23 +02:00
2006-10-31 10:25:40 +01:00
echocheck "pkg-config"
_pkg_config=pkg-config
2006-10-31 13:21:01 +01:00
if `$_pkg_config --version > /dev/null 2>&1`; then
2007-07-20 23:57:59 +02:00
if test "$_ld_static"; then
_pkg_config="$_pkg_config --static"
fi
2006-10-31 10:25:40 +01:00
echores "yes"
else
_pkg_config=false
echores "no"
fi
2003-03-21 17:06:11 +01:00
echocheck "Samba support (libsmbclient)"
2003-11-16 10:12:03 +01:00
if test "$_smbsupport" = yes; then
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lsmbclient"
2003-11-16 10:12:03 +01:00
fi
2003-03-21 17:06:11 +01:00
if test "$_smbsupport" = auto; then
_smbsupport=no
cat > $TMPC << EOF
#include <libsmbclient.h>
int main(void) { smbc_opendir("smb://"); return 0; }
EOF
2005-10-03 21:36:32 +02:00
for _ld_tmp in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
2006-11-20 01:19:43 +01:00
cc_check $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" && \
_smbsupport=yes && break
2005-10-03 21:36:32 +02:00
done
2003-03-21 17:06:11 +01:00
fi
if test "$_smbsupport" = yes; then
_def_smbsupport="#define LIBSMBCLIENT"
_inputmodules="smb $_inputmodules"
else
_def_smbsupport="#undef LIBSMBCLIENT"
_noinputmodules="smb $_noinputmodules"
fi
echores "$_smbsupport"
2001-11-17 12:26:26 +01:00
#########
# VIDEO #
#########
2002-03-15 21:48:42 +01:00
echocheck "tdfxfb"
if test "$_tdfxfb" = yes ; then
_def_tdfxfb='#define HAVE_TDFXFB 1'
_vosrc="$_vosrc vo_tdfxfb.c"
_vomodules="tdfxfb $_vomodules"
else
_def_tdfxfb='#undef HAVE_TDFXFB'
_novomodules="tdfxfb $_novomodules"
fi
echores "$_tdfxfb"
2006-05-17 22:56:49 +02:00
echocheck "s3fb"
if test "$_s3fb" = yes ; then
_def_s3fb='#define HAVE_S3FB 1'
_vosrc="$_vosrc vo_s3fb.c"
_vomodules="s3fb $_vomodules"
else
_def_s3fb='#undef HAVE_S3FB'
_novomodules="s3fb $_novomodules"
fi
echores "$_s3fb"
2003-03-07 19:45:02 +01:00
echocheck "tdfxvid"
if test "$_tdfxvid" = yes ; then
_def_tdfxvid='#define HAVE_TDFX_VID 1'
_vosrc="$_vosrc vo_tdfx_vid.c"
_vomodules="tdfx_vid $_vomodules"
else
_def_tdfxvid='#undef HAVE_TDFX_VID'
_novomodules="tdfx_vid $_novomodules"
fi
2006-11-05 19:27:07 +01:00
echores "$_tdfxvid"
2002-03-15 21:48:42 +01:00
2007-08-03 19:14:35 +02:00
echocheck "xvr100"
if test "$_xvr100" = auto ; then
cat > $TMPC << EOF
#include <unistd.h>
#include <sys/fbio.h>
#include <sys/visual_io.h>
int main(void) {
struct vis_identifier ident;
struct fbgattr attr;
ioctl(0, VIS_GETIDENTIFIER, &ident);
ioctl(0, FBIOGATTR, &attr);
}
EOF
_xvr100=no
cc_check && _xvr100=yes
fi
if test "$_xvr100" = yes ; then
_def_xvr100='#define HAVE_XVR100 1'
_vosrc="$_vosrc vo_xvr100.c"
_vomodules="xvr100 $_vomodules"
else
_def_tdfxvid='#undef HAVE_XVR100'
_novomodules="xvr100 $_novomodules"
fi
echores "$_xvr100"
2003-08-24 20:26:37 +02:00
echocheck "tga"
if test "$_tga" = yes ; then
_def_tga='#define HAVE_TGA 1'
_vosrc="$_vosrc vo_tga.c"
_vomodules="tga $_vomodules"
else
_def_tga='#undef HAVE_TGA'
_novomodules="tga $_novomodules"
fi
echores "$_tga"
2002-06-02 00:20:19 +02:00
2007-07-14 17:11:08 +02:00
echocheck "md5sum support"
if test "$_md5sum" = yes; then
_def_md5sum="#define HAVE_MD5SUM"
_vosrc="$_vosrc vo_md5sum.c"
_vomodules="md5sum $_vomodules"
else
_def_md5sum="#undef HAVE_MD5SUM"
_novomodules="md5sum $_novomodules"
fi
echores "$_md5sum"
2008-06-20 21:33:32 +02:00
echocheck "yuv4mpeg support"
if test "$_yuv4mpeg" = yes; then
_def_yuv4mpeg="#define HAVE_YUV4MPEG"
_vosrc="$_vosrc vo_yuv4mpeg.c"
_vomodules="yuv4mpeg $_vomodules"
else
_def_yuv4mpeg="#undef HAVE_YUV4MPEG"
_novomodules="yuv4mpeg $_novomodules"
fi
echores "$_yuv4mpeg"
2007-07-14 17:11:08 +02:00
echocheck "bl"
if test "$_bl" = yes ; then
_def_bl='#define HAVE_BL 1'
_vosrc="$_vosrc vo_bl.c"
_vomodules="bl $_vomodules"
else
_def_bl='#undef HAVE_BL'
_novomodules="bl $_novomodules"
fi
echores "$_bl"
2002-03-15 21:48:42 +01:00
echocheck "DirectFB"
if test "$_directfb" = auto ; then
_directfb=no
2006-10-15 18:47:17 +02:00
cat > $TMPC <<EOF
2002-03-15 21:48:42 +01:00
#include <directfb.h>
2005-10-18 23:37:28 +02:00
int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
2002-03-15 21:48:42 +01:00
EOF
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" -I/usr/local/include/directfb \
2007-07-17 13:08:41 +02:00
-I/usr/include/directfb -I/usr/local/include; do
2006-08-27 23:05:42 +02:00
cc_check $_inc_tmp -ldirectfb && _directfb=yes && \
_inc_extra="$_inc_extra $_inc_tmp" && break
2006-08-04 15:23:14 +02:00
done
2002-03-15 21:48:42 +01:00
fi
2002-08-05 13:42:29 +02:00
2006-10-09 00:16:38 +02:00
dfb_version() {
2007-10-08 13:43:56 +02:00
expr $1 \* 65536 + $2 \* 256 + $3
2006-10-09 00:16:38 +02:00
}
2002-08-05 13:42:29 +02:00
if test "$_directfb" = yes; then
2005-10-18 23:37:28 +02:00
cat > $TMPC << EOF
#include <directfb_version.h>
int
2006-10-09 00:16:38 +02:00
dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
2005-10-18 23:37:28 +02:00
;
2002-08-05 13:42:29 +02:00
EOF
2007-08-14 16:52:22 +02:00
if $_cc -E $TMPC $_inc_extra > "$TMPEXE"; then
_directfb_version=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'`
2006-10-09 00:16:38 +02:00
_dfb_major=`echo $_directfb_version | cut -d . -f 1`
_dfb_minor=`echo $_directfb_version | cut -d . -f 2`
_dfb_micro=`echo $_directfb_version | cut -d . -f 3`
2006-10-23 00:14:08 +02:00
_dfb_version=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
2007-10-08 13:43:56 +02:00
_def_directfb_version="#define DIRECTFBVERSION $_dfb_version"
_res_comment="$_directfb_version"
test "$_dfb_version" -ge `dfb_version 0 9 15` && _dfbmga=yes
2004-11-25 21:03:11 +01:00
else
2007-10-08 13:43:56 +02:00
_def_directfb_version='#undef DIRECTFBVERSION'
_directfb=no
_res_comment="version >=0.9.13 required"
2004-11-25 21:03:11 +01:00
fi
2002-08-05 13:42:29 +02:00
else
_directfb=no
2005-09-12 12:05:06 +02:00
_res_comment="failed to get version"
2002-08-05 13:42:29 +02:00
fi
fi
2005-09-12 12:05:06 +02:00
echores "$_directfb"
2002-08-05 13:42:29 +02:00
2002-03-15 21:48:42 +01:00
if test "$_directfb" = yes ; then
_def_directfb='#define HAVE_DIRECTFB 1'
2007-10-08 13:31:28 +02:00
_vosrc="$_vosrc vo_directfb2.c"
_vomodules="directfb $_vomodules"
_libs_mplayer="$_libs_mplayer -ldirectfb"
2002-03-15 21:48:42 +01:00
else
_def_directfb='#undef HAVE_DIRECTFB'
2007-10-08 13:42:47 +02:00
_novomodules="directfb $_novomodules"
fi
if test "$_dfbmga" = yes; then
_vosrc="$_vosrc vo_dfbmga.c"
_vomodules="dfbmga $_vomodules"
_def_dfbmga='#define HAVE_DFBMGA 1'
else
_novomodules="dfbmga $_novomodules"
_def_dfbmga='#undef HAVE_DFBMGA'
2002-03-15 21:48:42 +01:00
fi
2002-05-25 23:43:02 +02:00
echocheck "X11 headers presence"
2007-07-17 13:16:15 +02:00
_x11_headers="no"
_res_comment="check if the dev(el) packages are installed"
for I in `echo $_inc_extra | sed s/-I//g` /usr/include ; do
2006-08-05 01:57:04 +02:00
if test -f "$I/X11/Xlib.h" ; then
2007-07-17 13:16:15 +02:00
_x11_headers="yes"
_res_comment=""
break
fi
done
2008-03-26 01:14:51 +01:00
if test $_cross_compile = no; then
2008-03-26 01:15:43 +01:00
for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do
if test -f "$I/X11/Xlib.h" ; then
_inc_extra="$_inc_extra -I$I"
_x11_headers="yes"
_res_comment="using $I"
break
fi
done
2008-03-26 01:14:51 +01:00
fi
2006-05-07 16:00:07 +02:00
echores "$_x11_headers"
2002-05-25 23:43:02 +02:00
2001-11-17 04:53:05 +01:00
echocheck "X11"
2007-07-17 13:16:15 +02:00
if test "$_x11" = auto && test "$_x11_headers" = yes ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-19 01:38:41 +01:00
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
2001-10-23 20:32:55 +02:00
EOF
2006-11-22 17:42:04 +01:00
for I in "" -L/usr/X11R6/lib -L/usr/lib/X11R6 -L/usr/X11/lib \
2006-08-27 00:13:07 +02:00
-L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 -L/usr/lib ; do
2005-06-03 19:24:30 +02:00
if netbsd; then
2007-01-30 19:29:02 +01:00
_ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
2006-11-21 17:13:11 +01:00
else
2007-01-30 19:29:02 +01:00
_ld_tmp="$I -lXext -lX11 $_ld_pthread"
2005-06-03 19:24:30 +02:00
fi
2007-07-17 13:16:15 +02:00
cc_check $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" \
2006-11-22 17:42:04 +01:00
&& _x11=yes && break
2005-06-03 19:24:30 +02:00
done
2001-11-17 04:53:05 +01:00
fi
if test "$_x11" = yes ; then
_def_x11='#define HAVE_X11 1'
2003-03-12 16:04:05 +01:00
_vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c"
_vomodules="x11 xover $_vomodules"
2001-11-17 04:53:05 +01:00
else
2005-06-03 19:24:30 +02:00
_x11=no
2001-11-17 04:53:05 +01:00
_def_x11='#undef HAVE_X11'
2002-03-12 08:16:29 +01:00
_novomodules="x11 $_novomodules"
2005-09-12 12:05:06 +02:00
_res_comment="check if the dev(el) packages are installed"
2006-08-21 18:24:16 +02:00
# disable stuff that depends on X
2007-08-31 15:08:13 +02:00
_xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no
2001-11-17 04:53:05 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_x11"
2001-02-24 21:28:24 +01:00
2007-12-22 12:09:43 +01:00
echocheck "Xss screensaver extensions"
if test "$_xss" = auto ; then
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/extensions/scrnsaver.h>
2008-05-03 22:03:36 +02:00
int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
2007-12-22 12:09:43 +01:00
EOF
_xss=no
cc_check -lXss && _xss=yes
fi
if test "$_xss" = yes ; then
_def_xss='#define HAVE_XSS 1'
_libs_mplayer="$_libs_mplayer -lXss"
else
_def_xss='#undef HAVE_XSS'
fi
echores "$_xss"
2001-06-05 20:40:44 +02:00
2001-11-17 10:57:54 +01:00
echocheck "DPMS"
2001-11-17 04:53:05 +01:00
_xdpms3=no
2005-10-03 21:36:32 +02:00
_xdpms4=no
2001-11-17 04:53:05 +01:00
if test "$_x11" = yes ; then
cat > $TMPC <<EOF
#include <X11/Xmd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/dpms.h>
2008-05-03 22:03:36 +02:00
int main(void) { (void) DPMSQueryExtension(0, 0, 0); }
2001-06-04 10:07:57 +02:00
EOF
2006-11-22 17:42:04 +01:00
cc_check -lXdpms && _xdpms3=yes
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
#include <X11/Xlib.h>
#include <X11/extensions/dpms.h>
2008-05-03 22:03:36 +02:00
int main(void) { (void) DPMSQueryExtension(0, 0, 0); }
2001-06-04 10:07:57 +02:00
EOF
2007-09-30 00:49:25 +02:00
cc_check -lXext && _xdpms4=yes
2001-06-04 11:38:18 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xdpms4" = yes ; then
_def_xdpms='#define HAVE_XDPMS 1'
2006-05-07 16:00:07 +02:00
_res_comment="using Xdpms 4"
echores "yes"
2001-11-17 04:53:05 +01:00
elif test "$_xdpms3" = yes ; then
_def_xdpms='#define HAVE_XDPMS 1'
2006-11-22 17:42:04 +01:00
_libs_mplayer="$_libs_mplayer -lXdpms"
2006-05-07 16:00:07 +02:00
_res_comment="using Xdpms 3"
echores "yes"
2001-11-17 04:53:05 +01:00
else
_def_xdpms='#undef HAVE_XDPMS'
echores "no"
2001-06-04 10:07:57 +02:00
fi
2001-06-04 22:12:41 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Xv"
2006-08-21 18:24:16 +02:00
if test "$_xv" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
2004-10-30 10:17:48 +02:00
int main(void) {
(void) XvGetPortAttribute(0, 0, 0, 0);
(void) XvQueryPortAttributes(0, 0, 0);
return 0; }
2001-06-04 10:07:57 +02:00
EOF
2001-11-17 04:53:05 +01:00
_xv=no
2006-11-22 17:42:04 +01:00
cc_check -lXv && _xv=yes
2001-06-04 10:07:57 +02:00
fi
2006-08-19 21:10:27 +02:00
2001-11-17 04:53:05 +01:00
if test "$_xv" = yes ; then
_def_xv='#define HAVE_XV 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lXv"
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_xv.c"
2001-11-27 18:58:29 +01:00
_vomodules="xv $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_xv='#undef HAVE_XV'
2002-03-12 08:16:29 +01:00
_novomodules="xv $_novomodules"
2001-06-04 10:07:57 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xv"
2001-06-04 10:07:57 +02:00
2001-07-28 23:35:55 +02:00
2003-06-21 03:47:26 +02:00
echocheck "XvMC"
2006-08-21 18:24:16 +02:00
if test "$_xv" = yes && test "$_xvmc" != no ; then
2003-06-21 03:47:26 +02:00
_xvmc=no
cat > $TMPC <<EOF
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
#include <X11/extensions/XvMClib.h>
2008-05-03 22:14:50 +02:00
int main(void) {
2003-06-21 03:47:26 +02:00
(void) XvMCQueryExtension(0,0,0);
(void) XvMCCreateContext(0,0,0,0,0,0,0);
return 0; }
EOF
2006-07-09 19:00:23 +02:00
for _ld_tmp in $_xvmclib XvMCNVIDIA XvMCW I810XvMC ; do
2006-11-22 17:42:04 +01:00
cc_check -lXvMC -l$_ld_tmp && _xvmc=yes && _xvmclib="$_ld_tmp" && break
2006-01-19 23:09:20 +01:00
done
2003-06-21 03:47:26 +02:00
fi
if test "$_xvmc" = yes ; then
_def_xvmc='#define HAVE_XVMC 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lXvMC -l$_xvmclib"
2003-06-21 03:47:26 +02:00
_vosrc="$_vosrc vo_xvmc.c"
_vomodules="xvmc $_vomodules"
2006-07-09 19:00:23 +02:00
_res_comment="using $_xvmclib"
2003-06-21 03:47:26 +02:00
else
_def_xvmc='#undef HAVE_XVMC'
_novomodules="xvmc $_novomodules"
2007-05-01 16:08:26 +02:00
_libavdecoders=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
2003-06-21 03:47:26 +02:00
fi
2006-04-24 20:29:53 +02:00
echores "$_xvmc"
2003-06-21 03:47:26 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Xinerama"
2006-08-21 18:24:16 +02:00
if test "$_xinerama" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/Xinerama.h>
int main(void) { (void) XineramaIsActive(0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_xinerama=no
2006-11-22 17:42:04 +01:00
cc_check -lXinerama && _xinerama=yes
2001-07-28 23:35:55 +02:00
fi
2006-08-19 21:10:27 +02:00
2001-11-17 04:53:05 +01:00
if test "$_xinerama" = yes ; then
_def_xinerama='#define HAVE_XINERAMA 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lXinerama"
2001-11-17 04:53:05 +01:00
else
_def_xinerama='#undef HAVE_XINERAMA'
2001-07-28 23:35:55 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xinerama"
2001-07-28 23:35:55 +02:00
2001-06-04 10:07:57 +02:00
2001-11-17 04:53:05 +01:00
# Note: the -lXxf86vm library is the VideoMode extension and though it's not
# needed for DGA, AFAIK every distribution packages together with DGA stuffs
# named 'X extensions' or something similar.
# This check may be useful for future mplayer versions (to change resolution)
# If you run into problems, remove '-lXxf86vm'.
echocheck "Xxf86vm"
2006-08-21 18:24:16 +02:00
if test "$_vm" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_vm=no
2006-11-22 17:42:04 +01:00
cc_check -lXxf86vm && _vm=yes
2001-04-15 22:31:58 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_vm" = yes ; then
_def_vm='#define HAVE_XF86VM 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lXxf86vm"
2001-11-17 04:53:05 +01:00
else
_def_vm='#undef HAVE_XF86VM'
fi
echores "$_vm"
2001-04-15 22:31:58 +02:00
2005-02-02 15:07:13 +01:00
# Check for the presence of special keycodes, like audio control buttons
# that XFree86 might have. Used to be bundled with the xf86vm check, but
# has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
# have these new keycodes.
echocheck "XF86keysym"
if test "$_xf86keysym" = auto; then
_xf86keysym=no
2006-08-21 18:24:45 +02:00
cat > $TMPC <<EOF
2005-02-02 15:07:13 +01:00
#include <X11/Xlib.h>
#include <X11/XF86keysym.h>
int main(void) { return XF86XK_AudioPause; }
EOF
2006-11-22 17:42:04 +01:00
cc_check && _xf86keysym=yes
2005-02-02 15:07:13 +01:00
fi
if test "$_xf86keysym" = yes ; then
_def_xf86keysym='#define HAVE_XF86XK 1'
else
_def_xf86keysym='#undef HAVE_XF86XK'
fi
echores "$_xf86keysym"
2001-08-29 14:15:09 +02:00
2001-11-17 04:53:05 +01:00
echocheck "DGA"
2007-08-31 15:08:13 +02:00
if test "$_dga2" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
2008-05-03 22:03:36 +02:00
int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
2001-08-29 14:15:09 +02:00
EOF
2007-08-31 15:08:13 +02:00
_dga2=no
cc_check -lXxf86dga && _dga2=yes
fi
if test "$_dga1" = auto && test "$_dga2" = no && test "$_vm" = yes ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
2008-05-03 22:03:36 +02:00
int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2007-08-31 15:08:13 +02:00
_dga1=no
cc_check -lXxf86dga -lXxf86vm && _dga1=yes
2001-11-17 04:53:05 +01:00
fi
2001-11-29 19:56:08 +01:00
2007-08-31 15:08:13 +02:00
_dga=no
2001-11-29 19:56:08 +01:00
_def_dga='#undef HAVE_DGA'
2007-08-31 15:08:13 +02:00
_def_dga1='#undef HAVE_DGA1'
2001-11-29 19:56:08 +01:00
_def_dga2='#undef HAVE_DGA2'
2007-08-31 15:08:13 +02:00
if test "$_dga1" = yes ; then
_dga=yes
_def_dga1='#define HAVE_DGA1 1'
2006-04-24 20:29:53 +02:00
_res_comment="using DGA 1.0"
2007-08-31 15:08:13 +02:00
elif test "$_dga2" = yes ; then
_dga=yes
2001-11-17 04:53:05 +01:00
_def_dga2='#define HAVE_DGA2 1'
2007-08-31 15:08:13 +02:00
_res_comment="using DGA 2.0"
fi
if test "$_dga" = yes ; then
_def_dga='#define HAVE_DGA 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lXxf86dga"
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_dga.c"
2001-11-29 19:56:08 +01:00
_vomodules="dga $_vomodules"
2001-11-17 04:53:05 +01:00
else
2007-08-31 15:08:13 +02:00
_novomodules="dga $_novomodules"
2001-11-17 04:53:05 +01:00
fi
2006-04-04 07:09:12 +02:00
echores "$_dga"
2001-08-25 23:05:23 +02:00
2001-10-26 21:54:43 +02:00
2007-09-09 12:18:18 +02:00
echocheck "3dfx"
if test "$_3dfx" = yes && test "$_dga" = yes ; then
_def_3dfx='#define HAVE_3DFX 1'
_vosrc="$_vosrc vo_3dfx.c"
_vomodules="3dfx $_vomodules"
else
_def_3dfx='#undef HAVE_3DFX'
_novomodules="3dfx $_novomodules"
fi
echores "$_3dfx"
2001-11-17 04:53:05 +01:00
echocheck "OpenGL"
2006-11-21 14:18:56 +01:00
#Note: this test is run even with --enable-gl since we autodetect linker flags
2007-03-29 11:26:21 +02:00
if (test "$_x11" = yes || win32) && test "$_gl" != no ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <GL/gl.h>
2007-07-30 21:02:45 +02:00
#ifdef GL_WIN32
#include <windows.h>
#include <GL/glext.h>
#else
#include <X11/Xlib.h>
#include <GL/glx.h>
#endif
int main(void) {
#ifdef GL_WIN32
HDC dc;
wglCreateContext(dc);
#else
glXCreateContext(NULL, NULL, NULL, True);
#endif
glFinish();
return 0;
}
2001-11-17 04:53:05 +01:00
EOF
_gl=no
2006-11-22 17:42:04 +01:00
if cc_check -lGL $_ld_lm ; then
2001-11-19 01:38:41 +01:00
_gl=yes
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lGL $_ld_dl"
2006-11-22 17:42:04 +01:00
elif cc_check -lGL $_ld_lm $_ld_pthread ; then
2001-11-19 01:38:41 +01:00
_gl=yes
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
2007-07-30 21:48:31 +02:00
elif cc_check -DGL_WIN32 -lopengl32 ; then
2003-09-19 16:33:51 +02:00
_gl=yes
_gl_win32=yes
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lopengl32 -lgdi32"
2001-11-05 01:00:25 +01:00
fi
2001-11-19 13:29:48 +01:00
else
_gl=no
2001-10-31 19:25:28 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_gl" = yes ; then
_def_gl='#define HAVE_GL 1'
2005-08-06 15:38:00 +02:00
_vosrc="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
2003-09-19 16:33:51 +02:00
if test "$_gl_win32" = yes ; then
2008-05-03 22:14:50 +02:00
_def_gl_win32='#define GL_WIN32 1'
2005-08-06 15:38:00 +02:00
_vosrc="$_vosrc w32_common.c"
2005-09-12 12:05:06 +02:00
_res_comment="win32 version"
2003-09-19 16:33:51 +02:00
fi
2001-11-27 18:58:29 +01:00
_vomodules="opengl $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_gl='#undef HAVE_GL'
2003-09-19 16:33:51 +02:00
_def_gl_win32='#undef GL_WIN32'
2002-03-12 08:16:29 +01:00
_novomodules="opengl $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_gl"
2001-08-25 23:05:23 +02:00
2007-07-14 17:11:08 +02:00
echocheck "VIDIX"
_def_vidix='#undef CONFIG_VIDIX'
_def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
_vidix_drv_cyberblade=no
_def_vidix_drv_ivtv='#undef CONFIG_VIDIX_DRV_IVTV'
_vidix_drv_ivtv=no
_def_vidix_drv_ivtv='#undef CONFIG_VIDIX_DRV_IVTV'
_vidix_drv_ivtv=no
_def_vidix_drv_mach64='#undef CONFIG_VIDIX_DRV_MACH64'
_vidix_drv_mach64=no
_def_vidix_drv_mga='#undef CONFIG_VIDIX_DRV_MGA'
_vidix_drv_mga=no
_def_vidix_drv_mga_crtc2='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
_vidix_drv_mga_crtc2=no
_def_vidix_drv_nvidia='#undef CONFIG_VIDIX_DRV_NVIDIA'
_vidix_drv_nvidia=no
_def_vidix_drv_pm2='#undef CONFIG_VIDIX_DRV_PM2'
_vidix_drv_pm2=no
_def_vidix_drv_pm3='#undef CONFIG_VIDIX_DRV_PM3'
_vidix_drv_pm3=no
_def_vidix_drv_radeon='#undef CONFIG_VIDIX_DRV_RADEON'
_vidix_drv_radeon=no
_def_vidix_drv_rage128='#undef CONFIG_VIDIX_DRV_RAGE128'
_vidix_drv_rage128=no
2008-02-29 21:01:28 +01:00
_def_vidix_drv_s3='#undef CONFIG_VIDIX_DRV_S3'
_vidix_drv_s3=no
2007-07-14 17:11:08 +02:00
_def_vidix_drv_sis='#undef CONFIG_VIDIX_DRV_SIS'
_vidix_drv_sis=no
_def_vidix_drv_unichrome='#undef CONFIG_VIDIX_DRV_UNICHROME'
_vidix_drv_unichrome=no
2008-06-07 12:54:07 +02:00
if test "$_vidix" = auto ; then
_vidix=no
2008-03-27 03:04:03 +01:00
x86 && (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32) \
2008-06-07 12:54:07 +02:00
&& _vidix=yes
(ppc || alpha) && linux && _vidix=yes
2007-07-14 17:11:08 +02:00
fi
echores "$_vidix"
if test "$_vidix" = yes ; then
_def_vidix='#define CONFIG_VIDIX 1'
_vosrc="$_vosrc vo_cvidix.c"
_vomodules="cvidix $_vomodules"
2008-02-29 21:01:28 +01:00
test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sis unichrome"
2007-07-14 17:11:08 +02:00
test $_ivtv = "yes" || _vidix_drivers=`echo $_vidix_drivers | sed s/ivtv//`
2007-10-21 00:19:38 +02:00
# some vidix drivers are meant to work on x86 only, discard them elsewhere
2008-03-06 01:42:24 +01:00
x86 || _vidix_drivers=`echo $_vidix_drivers | sed -e s/cyberblade// -e s/sis// -e s/unichrome// -e s/s3//`
2007-09-15 19:53:15 +02:00
2007-07-14 17:11:08 +02:00
for driver in $_vidix_drivers ; do
uc_driver=`echo $driver | tr '[a-z]' '[A-Z]'`
eval _vidix_drv_${driver}=yes
eval _def_vidix_drv_${driver}=\"\#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
done
2008-06-07 16:00:04 +02:00
echocheck "VIDIX PCI device name database"
echores "$_vidix_pcidb"
if test "$_vidix_pcidb" = yes ; then
_vidix_pcidb_val=1
else
_vidix_pcidb_val=0
fi
2008-06-08 12:38:28 +02:00
echocheck "VIDIX dhahelper support"
test "$_dhahelper" = yes && cflag_dhahelper=-DCONFIG_DHAHELPER
echores "$_dhahelper"
2008-06-07 16:32:06 +02:00
echocheck "VIDIX svgalib_helper support"
test "$_svgalib_helper" = yes && cflag_svgalib_helper=-DCONFIG_SVGAHELPER
echores "$_svgalib_helper"
2007-07-14 17:11:08 +02:00
else
_novomodules="cvidix $_novomodules"
fi
if test "$_vidix" = yes && win32; then
_vosrc="$_vosrc vo_winvidix.c"
_vomodules="winvidix $_vomodules"
_libs_mplayer="$_libs_mplayer -lgdi32"
else
_novomodules="winvidix $_novomodules"
fi
if test "$_vidix" = yes && test "$_x11" = yes; then
_vosrc="$_vosrc vo_xvidix.c"
_vomodules="xvidix $_vomodules"
else
_novomodules="xvidix $_novomodules"
fi
2007-09-30 14:07:00 +02:00
echocheck "/dev/mga_vid"
2007-07-18 11:15:34 +02:00
if test "$_mga" = auto ; then
_mga=no
2007-09-30 14:07:00 +02:00
test -c /dev/mga_vid && _mga=yes
2007-07-18 11:15:34 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_mga" = yes ; then
_def_mga='#define HAVE_MGA 1'
_vosrc="$_vosrc vo_mga.c"
2001-11-27 18:58:29 +01:00
_vomodules="mga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_mga='#undef HAVE_MGA'
2002-03-12 08:16:29 +01:00
_novomodules="mga $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_mga"
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
echocheck "xmga"
if test "$_xmga" = auto ; then
_xmga=no
test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
2001-08-25 23:05:23 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xmga" = yes ; then
_def_xmga='#define HAVE_XMGA 1'
_vosrc="$_vosrc vo_xmga.c"
2001-11-27 18:58:29 +01:00
_vomodules="xmga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_xmga='#undef HAVE_XMGA'
2002-03-12 08:16:29 +01:00
_novomodules="xmga $_novomodules"
2001-06-09 01:30:09 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xmga"
2001-06-09 01:30:09 +02:00
2001-11-17 04:53:05 +01:00
echocheck "GGI"
if test "$_ggi" = auto ; then
cat > $TMPC << EOF
#include <ggi/ggi.h>
2007-07-20 23:29:44 +02:00
int main(void) { ggiInit(); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_ggi=no
2001-11-21 22:09:03 +01:00
cc_check -lggi && _ggi=yes
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_ggi" = yes ; then
_def_ggi='#define HAVE_GGI 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lggi"
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_ggi.c"
2001-11-27 18:58:29 +01:00
_vomodules="ggi $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_ggi='#undef HAVE_GGI'
2002-03-12 08:16:29 +01:00
_novomodules="ggi $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_ggi"
2001-02-24 21:28:24 +01:00
2005-05-11 10:01:52 +02:00
echocheck "GGI extension: libggiwmh"
if test "$_ggiwmh" = auto ; then
_ggiwmh=no
cat > $TMPC << EOF
#include <ggi/ggi.h>
#include <ggi/wmh.h>
2007-07-20 23:29:44 +02:00
int main(void) { ggiInit(); ggiWmhInit(); return 0; }
2005-05-11 10:01:52 +02:00
EOF
cc_check -lggi -lggiwmh && _ggiwmh=yes
fi
# needed to get right output on obscure combination
# like --disable-ggi --enable-ggiwmh
if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
_def_ggiwmh='#define HAVE_GGIWMH 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lggiwmh"
2005-05-11 10:01:52 +02:00
else
_ggiwmh=no
_def_ggiwmh='#undef HAVE_GGIWMH'
fi
echores "$_ggiwmh"
2001-08-20 23:20:03 +02:00
2001-11-17 04:53:05 +01:00
echocheck "AA"
if test "$_aa" = auto ; then
cat > $TMPC << EOF
#include <aalib.h>
2005-08-26 20:58:06 +02:00
extern struct aa_hardware_params aa_defparams;
extern struct aa_renderparams aa_defrenderparams;
int main(void) {
aa_context *c;
aa_renderparams *p;
(void) aa_init(0, 0, 0);
c = aa_autoinit(&aa_defparams);
p = aa_getrenderparams();
aa_autoinitkbd(c,0);
return 0; }
2001-11-17 04:53:05 +01:00
EOF
_aa=no
2006-11-22 17:42:04 +01:00
for _ld_tmp in "-laa" ; do
2006-11-21 14:18:56 +01:00
cc_check $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" && _aa=yes && break
2005-10-03 21:36:32 +02:00
done
2001-11-17 04:53:05 +01:00
fi
if test "$_aa" = yes ; then
_def_aa='#define HAVE_AA 1'
2002-11-18 02:02:27 +01:00
if cygwin ; then
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
2002-11-18 02:02:27 +01:00
fi
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_aa.c"
2001-11-27 18:58:29 +01:00
_vomodules="aa $_vomodules"
2001-08-20 23:20:03 +02:00
else
2001-11-17 04:53:05 +01:00
_def_aa='#undef HAVE_AA'
2002-03-12 08:16:29 +01:00
_novomodules="aa $_novomodules"
2001-08-20 23:20:03 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_aa"
2004-04-13 23:40:04 +02:00
2004-04-06 02:04:48 +02:00
echocheck "CACA"
if test "$_caca" = auto ; then
2004-04-13 23:40:04 +02:00
_caca=no
if ( caca-config --version ) >> "$TMPLOG" 2>&1 ; then
2004-04-06 02:04:48 +02:00
cat > $TMPC << EOF
#include <caca.h>
2006-09-27 01:43:21 +02:00
#ifdef CACA_API_VERSION_1
#include <caca0.h>
#endif
2004-04-06 02:04:48 +02:00
int main(void) { (void) caca_init(); return 0; }
EOF
cc_check `caca-config --libs` && _caca=yes
2004-04-13 23:40:04 +02:00
fi
2004-04-06 02:04:48 +02:00
fi
if test "$_caca" = yes ; then
_def_caca='#define HAVE_CACA 1'
2006-08-01 17:10:02 +02:00
_inc_extra="$_inc_extra `caca-config --cflags`"
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `caca-config --libs`"
2004-04-06 02:04:48 +02:00
_vosrc="$_vosrc vo_caca.c"
_vomodules="caca $_vomodules"
else
_def_caca='#undef HAVE_CACA'
_novomodules="caca $_novomodules"
fi
echores "$_caca"
2001-08-20 23:20:03 +02:00
2001-11-17 04:53:05 +01:00
echocheck "SVGAlib"
if test "$_svga" = auto ; then
cat > $TMPC << EOF
#include <vga.h>
int main(void) { return 0; }
EOF
_svga=no
2005-07-27 00:39:08 +02:00
cc_check -lvga $_ld_lm && _svga=yes
2001-04-18 00:04:44 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_svga" = yes ; then
_def_svga='#define HAVE_SVGALIB 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lvga"
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_svga.c"
2001-11-27 18:58:29 +01:00
_vomodules="svga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_svga='#undef HAVE_SVGALIB'
2002-03-12 08:16:29 +01:00
_novomodules="svga $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_svga"
2001-04-18 00:04:44 +02:00
2001-08-14 20:28:56 +02:00
2001-11-17 04:53:05 +01:00
echocheck "FBDev"
if test "$_fbdev" = auto ; then
_fbdev=no
2007-07-17 14:37:16 +02:00
linux && _fbdev=yes
2001-11-17 04:53:05 +01:00
fi
if test "$_fbdev" = yes ; then
_def_fbdev='#define HAVE_FBDEV 1'
2003-09-01 01:00:39 +02:00
_vosrc="$_vosrc vo_fbdev.c vo_fbdev2.c"
2001-11-27 18:58:29 +01:00
_vomodules="fbdev $_vomodules"
2001-04-25 00:51:55 +02:00
else
2001-11-17 04:53:05 +01:00
_def_fbdev='#undef HAVE_FBDEV'
2002-03-12 08:16:29 +01:00
_novomodules="fbdev $_novomodules"
2001-04-25 00:51:55 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_fbdev"
2001-04-25 00:51:55 +02:00
2001-11-17 04:53:05 +01:00
2002-01-17 02:12:01 +01:00
2001-11-17 04:53:05 +01:00
echocheck "DVB"
2006-08-04 01:41:35 +02:00
if test "$_dvb" = auto ; then
2001-11-17 04:53:05 +01:00
_dvb=no
2002-04-04 15:21:13 +02:00
cat >$TMPC << EOF
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <ost/dmx.h>
#include <ost/frontend.h>
#include <ost/sec.h>
#include <ost/video.h>
#include <ost/audio.h>
int main(void) {return 0;}
EOF
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" "-I/usr/src/DVB/ost/include" ; do
cc_check $_inc_tmp && _dvb=yes && \
_inc_extra="$_inc_extra $_inc_tmp" && break
2006-08-05 01:57:04 +02:00
done
2001-11-17 04:53:05 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_dvb"
2001-11-17 04:53:05 +01:00
if test "$_dvb" = yes ; then
_def_dvb='#define HAVE_DVB 1'
2003-03-16 21:13:28 +01:00
_def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
2002-05-14 11:39:13 +02:00
_aomodules="mpegpes(dvb) $_aomodules"
2001-12-04 23:04:14 +01:00
_vomodules="mpegpes(dvb) $_vomodules"
2002-12-28 13:04:58 +01:00
fi
2006-08-04 01:41:35 +02:00
2006-08-04 01:43:15 +02:00
echocheck "DVB HEAD"
if test "$_dvbhead" = auto ; then
_dvbhead=no
2002-12-28 13:04:58 +01:00
cat >$TMPC << EOF
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h>
#include <linux/dvb/video.h>
#include <linux/dvb/audio.h>
int main(void) {return 0;}
EOF
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" "-I/usr/src/DVB/include" ; do
cc_check $_inc_tmp && _dvbhead=yes && \
_inc_extra="$_inc_extra $_inc_tmp" && break
2006-08-05 01:57:04 +02:00
done
2006-08-04 01:43:15 +02:00
fi
echores "$_dvbhead"
if test "$_dvbhead" = yes ; then
_def_dvb='#define HAVE_DVB_HEAD 1'
_def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
_aomodules="mpegpes(dvb) $_aomodules"
_vomodules="mpegpes(dvb) $_vomodules"
fi
2006-08-04 01:41:35 +02:00
2002-12-28 13:04:58 +01:00
if test "$_dvbhead" = no && test "$_dvb" = no ; then
2001-11-17 04:53:05 +01:00
_def_dvb='#undef HAVE_DVB'
2003-03-16 21:13:28 +01:00
_def_dvb_in='#undef HAS_DVBIN_SUPPORT '
2002-05-14 11:39:13 +02:00
_aomodules="mpegpes(file) $_aomodules"
2002-12-28 13:04:58 +01:00
_vomodules="mpegpes(file) $_vomodules"
2001-11-03 22:25:55 +01:00
fi
2003-03-22 20:15:23 +01:00
if test "$_dvb" = yes || test "$_dvbhead" = yes ; then
_dvbin=yes
2003-10-16 10:45:10 +02:00
_inputmodules="dvb $_inputmodules"
2003-03-22 20:15:23 +01:00
else
_dvbin=no
2004-04-01 16:17:58 +02:00
_noinputmodules="dvb $_noinputmodules"
2003-03-22 20:15:23 +01:00
fi
2002-02-01 14:10:35 +01:00
2007-07-14 17:11:08 +02:00
2001-11-17 12:26:26 +01:00
echocheck "PNG support"
if test "$_png" = auto ; then
_png=no
if irix ; then
# Don't check for -lpng on irix since it has its own libpng
# incompatible with the GNU libpng
2005-09-12 12:05:06 +02:00
_res_comment="disabled on irix (not GNU libpng)"
2001-11-17 12:26:26 +01:00
else
2001-11-19 10:43:55 +01:00
cat > $TMPC << EOF
#include <png.h>
2002-02-01 14:10:35 +01:00
#include <string.h>
int main(void) {
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
2002-04-29 18:24:22 +02:00
printf("libpng: %s\n", png_libpng_ver);
2008-05-16 11:42:28 +02:00
return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
2002-02-01 14:10:35 +01:00
}
2001-11-19 10:43:55 +01:00
EOF
2004-10-11 21:26:13 +02:00
if cc_check -lpng -lz $_ld_lm ; then
2005-10-18 23:44:14 +02:00
if tmp_run ; then
2002-02-01 14:10:35 +01:00
_png=yes
else
2005-09-12 12:05:06 +02:00
_res_comment="mismatch of library and header versions"
2002-02-01 14:10:35 +01:00
fi
fi
2001-11-17 12:26:26 +01:00
fi
fi
2005-09-12 12:05:06 +02:00
echores "$_png"
2001-11-17 12:26:26 +01:00
if test "$_png" = yes ; then
_def_png='#define HAVE_PNG 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lpng -lz"
2001-11-17 12:26:26 +01:00
_vosrc="$_vosrc vo_png.c"
2001-11-27 18:58:29 +01:00
_vomodules="png $_vomodules"
2001-11-17 12:26:26 +01:00
else
_def_png='#undef HAVE_PNG'
2002-03-12 08:16:29 +01:00
_novomodules="png $_novomodules"
2001-11-17 12:26:26 +01:00
fi
2002-03-10 23:49:18 +01:00
echocheck "JPEG support"
2006-06-16 23:17:47 +02:00
if test "$_jpeg" = auto ; then
_jpeg=no
2002-03-10 23:49:18 +01:00
cat > $TMPC << EOF
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <string.h>
#include <jpeglib.h>
2008-05-03 22:03:36 +02:00
int main(void) { return 0; }
2002-03-10 23:49:18 +01:00
EOF
2004-10-11 21:26:13 +02:00
if cc_check -ljpeg $_ld_lm ; then
2005-10-18 23:44:14 +02:00
if tmp_run ; then
2006-06-16 23:17:47 +02:00
_jpeg=yes
2002-03-10 23:49:18 +01:00
fi
fi
fi
2006-06-16 23:17:47 +02:00
echores "$_jpeg"
2002-03-11 01:13:05 +01:00
2006-06-16 23:17:47 +02:00
if test "$_jpeg" = yes ; then
_def_jpeg='#define HAVE_JPEG 1'
2002-04-16 13:21:59 +02:00
_vosrc="$_vosrc vo_jpeg.c"
_vomodules="jpeg $_vomodules"
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -ljpeg"
2002-03-10 23:49:18 +01:00
else
2006-06-16 23:17:47 +02:00
_def_jpeg='#undef HAVE_JPEG'
2002-04-16 13:21:59 +02:00
_novomodules="jpeg $_novomodules"
2002-03-10 23:49:18 +01:00
fi
2002-05-13 14:28:00 +02:00
2004-10-24 00:43:19 +02:00
echocheck "PNM support"
if test "$_pnm" = yes; then
_def_pnm="#define HAVE_PNM"
_vosrc="$_vosrc vo_pnm.c"
_vomodules="pnm $_vomodules"
else
_def_pnm="#undef HAVE_PNM"
_novomodules="pnm $_novomodules"
fi
echores "$_pnm"
2003-01-28 01:12:23 +01:00
echocheck "GIF support"
2004-09-05 19:46:33 +02:00
# This is to appease people who want to force gif support.
# If it is forced to yes, then we still do checks to determine
# which gif library to use.
if test "$_gif" = yes ; then
_force_gif=yes
_gif=auto
fi
2002-05-12 03:07:25 +02:00
if test "$_gif" = auto ; then
_gif=no
cat > $TMPC << EOF
#include <gif_lib.h>
2008-05-03 22:03:36 +02:00
int main(void) { return 0; }
2002-05-12 03:07:25 +02:00
EOF
2006-11-22 17:42:04 +01:00
for _ld_gif in "-lungif" "-lgif" ; do
2006-11-22 10:51:34 +01:00
cc_check $_ld_gif && tmp_run && _gif=yes && break
2005-10-03 21:36:32 +02:00
done
2002-05-12 03:07:25 +02:00
fi
2004-09-05 19:46:33 +02:00
# If no library was found, and the user wants support forced,
# then we force it on with libgif, as this is the safest
# assumption IMHO. (libungif & libregif both create symbolic
# links to libgif. We also assume that no x11 support is needed,
# because if you are forcing this, then you _should_ know what
# you are doing. [ Besides, package maintainers should never
# have compiled x11 deps into libungif in the first place. ] )
# </rant>
# --Joey
if test "$_force_gif" = yes && test "$_gif" = no ; then
_gif=yes
_ld_gif="-lgif"
fi
2002-05-12 03:07:25 +02:00
if test "$_gif" = yes ; then
_def_gif='#define HAVE_GIF 1'
_vosrc="$_vosrc vo_gif89a.c"
2003-01-28 01:12:23 +01:00
_codecmodules="gif $_codecmodules"
2002-05-12 03:07:25 +02:00
_vomodules="gif89a $_vomodules"
2006-04-24 23:50:06 +02:00
_res_comment="old version, some encoding functions disabled"
2002-05-13 22:52:10 +02:00
_def_gif_4='#undef HAVE_GIF_4'
2006-11-22 10:51:34 +01:00
_ld_extra="$_ld_extra $_ld_gif"
2002-05-13 22:52:10 +02:00
cat > $TMPC << EOF
2002-05-23 22:38:27 +02:00
#include <signal.h>
2002-05-13 22:52:10 +02:00
#include <gif_lib.h>
2002-05-23 22:38:27 +02:00
void catch() { exit(1); }
2002-05-13 22:52:10 +02:00
int main(void) {
2002-05-23 22:38:27 +02:00
signal(SIGSEGV, catch); // catch segfault
2002-05-13 22:52:10 +02:00
printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
return 0;
}
EOF
2005-10-18 23:44:14 +02:00
if cc_check "$_ld_gif" && tmp_run ; then
2002-05-13 22:52:10 +02:00
_def_gif_4='#define HAVE_GIF_4 1'
2006-03-13 22:50:56 +01:00
_res_comment=""
2002-05-13 22:52:10 +02:00
fi
2002-05-12 03:07:25 +02:00
else
_def_gif='#undef HAVE_GIF'
2002-05-13 22:52:10 +02:00
_def_gif_4='#undef HAVE_GIF_4'
2002-05-12 03:07:25 +02:00
_novomodules="gif89a $_novomodules"
2005-02-21 23:27:03 +01:00
_nocodecmodules="gif $_nocodecmodules"
2002-05-12 03:07:25 +02:00
fi
2002-05-13 22:52:10 +02:00
echores "$_gif"
2002-05-12 03:07:25 +02:00
2001-11-17 12:26:26 +01:00
2003-03-05 11:28:32 +01:00
case "$_gif" in yes*)
2003-02-19 17:55:14 +01:00
echocheck "broken giflib workaround"
_def_gif_tvt_hack='#define HAVE_GIF_TVT_HACK 1'
cat > $TMPC << EOF
#include <gif_lib.h>
int main(void) {
GifFileType gif;
printf("UserData is at address %p\n", gif.UserData);
return 0;
}
EOF
2005-10-18 23:44:14 +02:00
if cc_check "$_ld_gif" && tmp_run ; then
2003-02-19 17:55:14 +01:00
_def_gif_tvt_hack='#undef HAVE_GIF_TVT_HACK'
echores "disabled"
else
echores "enabled"
fi
2003-03-05 11:28:32 +01:00
;;
esac
2003-02-19 17:55:14 +01:00
2001-11-28 18:52:25 +01:00
echocheck "VESA support"
2003-11-13 21:53:40 +01:00
if test "$_vesa" = auto ; then
cat > $TMPC << EOF
2005-08-18 13:26:04 +02:00
#include <vbe.h>
int main(void) { vbeVersion(); return 0; }
2003-11-13 21:53:40 +01:00
EOF
2005-08-18 13:26:04 +02:00
_vesa=no
cc_check -lvbe -llrmi && _vesa=yes
2003-11-13 21:53:40 +01:00
fi
if test "$_vesa" = yes ; then
2002-02-07 03:29:55 +01:00
_def_vesa='#define HAVE_VESA 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lvbe -llrmi"
2005-08-18 14:59:19 +02:00
_vosrc="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
2001-11-28 18:52:25 +01:00
_vomodules="vesa $_vomodules"
else
2002-02-07 03:29:55 +01:00
_def_vesa='#undef HAVE_VESA'
2003-11-13 21:53:40 +01:00
_novomodules="vesa $_novomodules"
2001-11-28 18:52:25 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_vesa"
2001-11-28 18:52:25 +01:00
2001-11-17 12:26:26 +01:00
#################
# VIDEO + AUDIO #
#################
echocheck "SDL"
if test -z "$_sdlconfig" ; then
2002-05-03 22:29:20 +02:00
if ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdlconfig="sdl-config"
2002-05-03 22:29:20 +02:00
elif ( sdl11-config --version ) >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdlconfig="sdl11-config"
else
_sdlconfig=false
fi
fi
if test "$_sdl" = auto || test "$_sdl" = yes ; then
2001-11-17 12:46:09 +01:00
cat > $TMPC << EOF
#include <SDL.h>
2008-05-03 22:07:04 +02:00
int main(void) {
2007-07-20 23:27:17 +02:00
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
return 0;
}
2001-11-17 12:46:09 +01:00
EOF
2001-11-17 12:26:26 +01:00
_sdl=no
2002-05-03 22:29:20 +02:00
if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
if cc_check `$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdlversion=`$_sdlconfig --version | sed 's/[^0-9]//g'`
if test "$_sdlversion" -gt 116 ; then
if test "$_sdlversion" -lt 121 ; then
_def_sdlbuggy='#define BUGGY_SDL'
else
_def_sdlbuggy='#undef BUGGY_SDL'
fi
_sdl=yes
fi
fi
fi
fi
if test "$_sdl" = yes ; then
_def_sdl='#define HAVE_SDL 1'
2002-11-18 02:02:27 +01:00
if cygwin ; then
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
2004-03-13 17:25:08 +01:00
elif mingw32 ; then
2006-11-29 11:33:42 +01:00
_libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
2002-11-18 02:02:27 +01:00
else
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `$_sdlconfig --libs`"
2006-12-12 21:29:30 +01:00
_inc_extra="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
2002-11-18 02:02:27 +01:00
fi
2001-11-17 12:26:26 +01:00
_vosrc="$_vosrc vo_sdl.c"
2001-11-28 18:52:25 +01:00
_vomodules="sdl $_vomodules"
2001-11-17 12:26:26 +01:00
_aosrc="$_aosrc ao_sdl.c"
2001-11-27 18:58:29 +01:00
_aomodules="sdl $_aomodules"
2005-09-12 12:05:06 +02:00
_res_comment="using $_sdlconfig"
2001-11-17 12:26:26 +01:00
else
_def_sdl='#undef HAVE_SDL'
2002-03-12 08:16:29 +01:00
_novomodules="sdl $_novomodules"
_noaomodules="sdl $_noaomodules"
2001-11-17 12:26:26 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_sdl"
2001-11-17 12:26:26 +01:00
2006-06-18 13:21:23 +02:00
if win32; then
2002-12-29 20:58:56 +01:00
echocheck "Windows waveout"
2002-10-25 18:25:41 +02:00
if test "$_win32waveout" = auto ; then
cat > $TMPC << EOF
#include <windows.h>
#include <mmsystem.h>
int main(void) { return 0; }
EOF
_win32waveout=no
cc_check -lwinmm && _win32waveout=yes
fi
if test "$_win32waveout" = yes ; then
_def_win32waveout='#define HAVE_WIN32WAVEOUT 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lwinmm"
2002-10-25 18:25:41 +02:00
_aosrc="$_aosrc ao_win32.c"
_aomodules="win32 $_aomodules"
else
_def_win32waveout='#undef HAVE_WIN32WAVEOUT'
_noaomodules="win32 $_noaomodules"
fi
echores "$_win32waveout"
2002-09-28 21:03:50 +02:00
echocheck "Directx"
if test "$_directx" = auto ; then
cat > $TMPC << EOF
#include <windows.h>
#include <ddraw.h>
2004-09-25 17:34:42 +02:00
#include <dsound.h>
2002-09-28 21:03:50 +02:00
int main(void) { return 0; }
EOF
_directx=no
2002-10-25 18:25:41 +02:00
cc_check -lgdi32 && _directx=yes
2002-09-28 21:03:50 +02:00
fi
if test "$_directx" = yes ; then
_def_directx='#define HAVE_DIRECTX 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lgdi32"
2002-09-28 21:03:50 +02:00
_vosrc="$_vosrc vo_directx.c"
_vomodules="directx $_vomodules"
2004-09-25 17:34:42 +02:00
_aosrc="$_aosrc ao_dsound.c"
_aomodules="dsound $_aomodules"
2002-09-28 21:03:50 +02:00
else
_def_directx='#undef HAVE_DIRECTX'
_novomodules="directx $_novomodules"
2004-09-25 17:34:42 +02:00
_noaomodules="dsound $_noaomodules"
2002-09-28 21:03:50 +02:00
fi
echores "$_directx"
2006-06-18 13:21:23 +02:00
fi #if win32; then
2001-12-03 02:13:48 +01:00
echocheck "NAS"
2005-10-03 21:36:32 +02:00
if test "$_nas" = auto ; then
2001-12-03 02:13:48 +01:00
cat > $TMPC << EOF
#include <audio/audiolib.h>
int main(void) { return 0; }
EOF
_nas=no
2006-11-22 17:42:04 +01:00
cc_check $_ld_lm -laudio -lXt && _nas=yes
2001-12-03 02:13:48 +01:00
fi
if test "$_nas" = yes ; then
_def_nas='#define HAVE_NAS 1'
2006-11-22 17:42:04 +01:00
_libs_mplayer="$_libs_mplayer -laudio -lXt"
2001-12-03 02:13:48 +01:00
_aosrc="$_aosrc ao_nas.c"
_aomodules="nas $_aomodules"
else
2002-03-12 08:16:29 +01:00
_noaomodules="nas $_noaomodules"
2001-12-03 02:13:48 +01:00
_def_nas='#undef HAVE_NAS'
fi
echores "$_nas"
2001-12-01 16:05:08 +01:00
2002-05-13 15:15:40 +02:00
echocheck "DXR2"
if test "$_dxr2" = auto; then
_dxr2=no
cat > $TMPC << EOF
#include <dxr2ioctl.h>
int main(void) { return 0; }
EOF
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" -I/usr/local/include/dxr2 -I/usr/include/dxr2; do
cc_check $_inc_tmp && _dxr2=yes && \
_inc_extra="$_inc_extra $_inc_tmp" && break
2002-05-13 15:15:40 +02:00
done
fi
if test "$_dxr2" = yes; then
_def_dxr2='#define HAVE_DXR2 1'
_vosrc="$_vosrc vo_dxr2.c"
_aosrc="$_aosrc ao_dxr2.c"
_aomodules="dxr2 $_aomodules"
_vomodules="dxr2 $_vomodules"
else
_def_dxr2='#undef HAVE_DXR2'
_noaomodules="dxr2 $_noaomodules"
_novomodules="dxr2 $_novomodules"
fi
2005-09-12 12:05:06 +02:00
echores "$_dxr2"
2002-05-13 15:15:40 +02:00
2001-11-17 04:53:05 +01:00
echocheck "DXR3/H+"
if test "$_dxr3" = auto ; then
cat > $TMPC << EOF
2001-12-05 00:10:59 +01:00
#include <linux/em8300.h>
2001-11-17 04:53:05 +01:00
int main(void) { return 0; }
EOF
_dxr3=no
2001-12-05 00:10:59 +01:00
cc_check && _dxr3=yes
2001-07-06 05:22:14 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_dxr3" = yes ; then
_def_dxr3='#define HAVE_DXR3 1'
_vosrc="$_vosrc vo_dxr3.c"
2001-11-29 20:18:48 +01:00
_vomodules="dxr3 $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_dxr3='#undef HAVE_DXR3'
2002-03-12 08:16:29 +01:00
_novomodules="dxr3 $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_dxr3"
2001-07-06 05:22:14 +02:00
2002-05-04 00:13:06 +02:00
2008-02-01 21:14:53 +01:00
echocheck "IVTV TV-Out (pre linux-2.6.24)"
2006-07-20 00:02:09 +02:00
if test "$_ivtv" = auto ; then
cat > $TMPC << EOF
#include <stdlib.h>
#include <inttypes.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <linux/ivtv.h>
2008-02-01 21:14:53 +01:00
#include <sys/ioctl.h>
2008-05-03 22:14:50 +02:00
int main(void) {
2008-02-01 21:14:53 +01:00
struct ivtv_cfg_stop_decode sd;
struct ivtv_cfg_start_decode sd1;
ioctl (0, IVTV_IOC_START_DECODE, &sd1);
ioctl (0, IVTV_IOC_STOP_DECODE, &sd);
return 0; }
2006-07-20 00:02:09 +02:00
EOF
_ivtv=no
cc_check && _ivtv=yes
fi
if test "$_ivtv" = yes ; then
_def_ivtv='#define HAVE_IVTV 1'
_vosrc="$_vosrc vo_ivtv.c"
_vomodules="ivtv $_vomodules"
2006-07-28 23:36:03 +02:00
_aosrc="$_aosrc ao_ivtv.c"
_aomodules="ivtv $_aomodules"
2006-07-20 00:02:09 +02:00
else
_def_ivtv='#undef HAVE_IVTV'
_novomodules="ivtv $_novomodules"
2006-07-28 23:36:03 +02:00
_noaomodules="ivtv $_noaomodules"
2006-07-20 00:02:09 +02:00
fi
echores "$_ivtv"
2007-07-29 21:20:55 +02:00
echocheck "V4L2 MPEG Decoder"
if test "$_v4l2" = auto ; then
cat > $TMPC << EOF
#include <stdlib.h>
#include <inttypes.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <linux/version.h>
int main(void) {
2007-07-30 19:01:50 +02:00
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#error kernel headers too old, need 2.6.22
bad_kernel_version();
2007-07-29 21:20:55 +02:00
#endif
2007-07-30 19:01:50 +02:00
struct v4l2_ext_controls ctrls;
ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
return 0;
2007-07-29 21:20:55 +02:00
}
EOF
_v4l2=no
cc_check && _v4l2=yes
fi
if test "$_v4l2" = yes ; then
_def_v4l2='#define HAVE_V4L2_DECODER 1'
_vosrc="$_vosrc vo_v4l2.c"
_vomodules="v4l2 $_vomodules"
_aosrc="$_aosrc ao_v4l2.c"
_aomodules="v4l2 $_aomodules"
else
_def_v4l2='#undef HAVE_V4L2_DECODER'
_novomodules="v4l2 $_novomodules"
_noaomodules="v4l2 $_noaomodules"
fi
echores "$_v4l2"
2002-05-04 00:13:06 +02:00
2001-11-17 12:26:26 +01:00
#########
# AUDIO #
#########
2001-11-17 04:53:05 +01:00
echocheck "OSS Audio"
if test "$_ossaudio" = auto ; then
cat > $TMPC << EOF
2002-04-28 19:25:10 +02:00
#include <sys/ioctl.h>
2007-07-11 12:43:25 +02:00
#include <$_soundcard_header>
2001-11-17 04:53:05 +01:00
int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
EOF
_ossaudio=no
cc_check && _ossaudio=yes
fi
if test "$_ossaudio" = yes ; then
2001-11-27 18:58:29 +01:00
_def_ossaudio='#define USE_OSS_AUDIO 1'
_aosrc="$_aosrc ao_oss.c"
_aomodules="oss $_aomodules"
2002-02-22 14:47:31 +01:00
if test "$_linux_devfs" = yes; then
2002-03-30 20:25:11 +01:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound/dsp"'
2002-02-22 14:47:31 +01:00
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/sound/mixer"'
else
2003-01-19 16:43:12 +01:00
cat > $TMPC << EOF
#include <sys/ioctl.h>
2007-07-11 12:43:25 +02:00
#include <$_soundcard_header>
2003-01-19 16:43:12 +01:00
#ifdef OPEN_SOUND_SYSTEM
int main(void) { return 0; }
#else
#error Not the real thing
#endif
EOF
_real_ossaudio=no
cc_check && _real_ossaudio=yes
if test "$_real_ossaudio" = yes; then
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
elif netbsd || openbsd ; then
2002-04-28 00:42:27 +02:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
2006-11-27 23:55:46 +01:00
_ld_extra="$_ld_extra -lossaudio"
2002-04-28 00:42:27 +02:00
else
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
fi
2002-02-22 14:47:31 +01:00
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
2008-05-03 22:14:50 +02:00
fi
2001-04-26 22:23:24 +02:00
else
2001-11-27 18:58:29 +01:00
_def_ossaudio='#undef USE_OSS_AUDIO'
2002-02-22 14:47:31 +01:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
_def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
2002-03-12 08:16:29 +01:00
_noaomodules="oss $_noaomodules"
2001-04-26 22:23:24 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_ossaudio"
2001-04-26 22:23:24 +02:00
2001-11-17 04:53:05 +01:00
2002-05-28 03:52:40 +02:00
echocheck "aRts"
if test "$_arts" = auto ; then
_arts=no
2002-05-28 11:48:45 +02:00
if ( artsc-config --version ) >> "$TMPLOG" 2>&1 ; then
2002-05-29 23:23:19 +02:00
cat > $TMPC << EOF
#include <artsc.h>
int main(void) { return 0; }
EOF
2005-10-18 23:44:14 +02:00
cc_check `artsc-config --libs` `artsc-config --cflags` && tmp_run && _arts=yes
2002-05-29 23:23:19 +02:00
2002-05-28 03:52:40 +02:00
fi
fi
if test "$_arts" = yes ; then
_def_arts='#define USE_ARTS 1'
_aosrc="$_aosrc ao_arts.c"
_aomodules="arts $_aomodules"
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `artsc-config --libs`"
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `artsc-config --cflags`"
2002-05-30 13:42:55 +02:00
else
_noaomodules="arts $_noaomodules"
2002-05-28 03:52:40 +02:00
fi
echores "$_arts"
2002-12-27 17:02:57 +01:00
echocheck "EsounD"
if test "$_esd" = auto ; then
_esd=no
if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then
cat > $TMPC << EOF
#include <esd.h>
2007-09-14 16:45:08 +02:00
int main(void) { int fd = esd_open_sound("test"); return fd; }
2002-12-27 17:02:57 +01:00
EOF
2007-09-14 16:45:08 +02:00
cc_check `esd-config --libs` `esd-config --cflags` && _esd=yes
2002-12-27 17:02:57 +01:00
fi
fi
2003-05-30 20:15:59 +02:00
echores "$_esd"
2002-12-27 17:02:57 +01:00
if test "$_esd" = yes ; then
_def_esd='#define USE_ESD 1'
_aosrc="$_aosrc ao_esd.c"
_aomodules="esd $_aomodules"
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `esd-config --libs`"
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `esd-config --cflags`"
2003-05-30 20:15:59 +02:00
echocheck "esd_get_latency()"
cat > $TMPC << EOF
#include <esd.h>
int main(void) { return esd_get_latency(0); }
EOF
cc_check `esd-config --libs` `esd-config --cflags` && _esd_latency=yes && _def_esd_latency='#define HAVE_ESD_LATENCY'
echores "$_esd_latency"
2002-12-27 17:02:57 +01:00
else
2003-05-30 20:15:59 +02:00
_def_esd='#undef USE_ESD'
_def_esd_latency='#undef HAVE_ESD_LATENCY'
2002-12-27 17:02:57 +01:00
_noaomodules="esd $_noaomodules"
fi
2007-10-18 15:34:26 +02:00
echocheck "pulse"
if test "$_pulse" = auto ; then
_pulse=no
if $_pkg_config --exists 'libpulse >= 0.9' ; then
2004-11-06 20:35:24 +01:00
cat > $TMPC << EOF
2007-10-18 15:34:26 +02:00
#include <pulse/pulseaudio.h>
2004-11-06 20:35:24 +01:00
int main(void) { return 0; }
EOF
2007-10-18 15:34:26 +02:00
cc_check `$_pkg_config --libs --cflags libpulse` && tmp_run && _pulse=yes
2004-11-06 20:35:24 +01:00
fi
fi
2007-10-18 15:34:26 +02:00
echores "$_pulse"
2004-11-06 20:35:24 +01:00
2007-10-18 15:34:26 +02:00
if test "$_pulse" = yes ; then
_def_pulse='#define USE_PULSE 1'
_aosrc="$_aosrc ao_pulse.c"
_aomodules="pulse $_aomodules"
_libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`"
_inc_extra="$_inc_extra `$_pkg_config --cflags libpulse`"
2004-11-06 20:35:24 +01:00
else
2007-10-18 15:34:26 +02:00
_def_pulse='#undef USE_PULSE'
_noaomodules="pulse $_noaomodules"
2004-11-06 20:35:24 +01:00
fi
2004-06-25 20:11:15 +02:00
echocheck "JACK"
if test "$_jack" = auto ; then
2005-10-03 21:36:32 +02:00
_jack=yes
2004-06-25 20:11:15 +02:00
cat > $TMPC << EOF
#include <jack/jack.h>
2005-06-01 11:20:46 +02:00
int main(void) { jack_client_new("test"); return 0; }
2004-06-25 20:11:15 +02:00
EOF
2005-10-03 21:36:32 +02:00
if cc_check -ljack ; then
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -ljack"
2006-10-31 10:25:40 +01:00
elif cc_check `$_pkg_config --libs --cflags --silence-errors jack` ; then
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer `$_pkg_config --libs jack`"
2006-10-31 10:25:40 +01:00
_inc_extra="$_inc_extra "`$_pkg_config --cflags jack`""
2005-10-03 21:36:32 +02:00
else
_jack=no
fi
2004-09-20 10:48:53 +02:00
fi
2004-06-25 20:11:15 +02:00
if test "$_jack" = yes ; then
_def_jack='#define USE_JACK 1'
_aosrc="$_aosrc ao_jack.c"
_aomodules="jack $_aomodules"
else
_noaomodules="jack $_noaomodules"
fi
echores "$_jack"
2006-02-16 21:45:25 +01:00
echocheck "OpenAL"
if test "$_openal" = auto ; then
_openal=no
cat > $TMPC << EOF
2006-12-10 15:07:08 +01:00
#ifdef OPENAL_AL_H
#include <OpenAL/al.h>
#else
2006-02-16 21:45:25 +01:00
#include <AL/al.h>
2006-12-10 15:07:08 +01:00
#endif
2006-02-16 21:45:25 +01:00
int main(void) {
alSourceQueueBuffers(0, 0, 0);
// alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
return 0;
}
EOF
2008-01-30 22:46:20 +01:00
for I in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
2006-12-10 15:07:08 +01:00
cc_check $I && _openal=yes && break
cc_check -DOPENAL_AL_H=1 $I && _def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break
done
test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I"
2006-02-16 21:45:25 +01:00
fi
if test "$_openal" = yes ; then
_def_openal='#define USE_OPENAL 1'
_aosrc="$_aosrc ao_openal.c"
_aomodules="openal $_aomodules"
else
_noaomodules="openal $_noaomodules"
fi
echores "$_openal"
2004-06-25 20:11:15 +02:00
2001-11-17 04:53:05 +01:00
echocheck "ALSA audio"
2002-04-27 03:25:32 +02:00
if test "$_alsa" != no ; then
2001-11-17 04:53:05 +01:00
_alsa=no
cat > $TMPC << EOF
#include <sys/asoundlib.h>
2005-10-18 23:34:54 +02:00
#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
#error "alsa version != 0.5.x"
#endif
int main(void) { return 0; }
2001-11-17 04:53:05 +01:00
EOF
2005-10-18 23:34:54 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.5.x'
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <sys/asoundlib.h>
2005-10-18 23:34:54 +02:00
#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
#error "alsa version != 0.9.x"
#endif
int main(void) { return 0; }
2001-11-17 04:53:05 +01:00
EOF
2005-10-18 23:34:54 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-sys'
2002-04-27 03:25:32 +02:00
cat > $TMPC << EOF
#include <alsa/asoundlib.h>
2005-10-18 23:34:54 +02:00
#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
#error "alsa version != 0.9.x"
#endif
int main(void) { return 0; }
2002-04-27 03:25:32 +02:00
EOF
2005-10-18 23:34:54 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-alsa'
2003-12-07 16:26:12 +01:00
cat > $TMPC << EOF
#include <sys/asoundlib.h>
2005-10-18 23:34:54 +02:00
#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
#error "alsa version != 1.0.x"
#endif
int main(void) { return 0; }
2003-12-07 16:26:12 +01:00
EOF
2005-10-18 23:34:54 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-sys'
2003-12-07 16:26:12 +01:00
cat > $TMPC << EOF
#include <alsa/asoundlib.h>
2005-10-18 23:34:54 +02:00
#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
#error "alsa version != 1.0.x"
#endif
int main(void) { return 0; }
2003-12-07 16:26:12 +01:00
EOF
2005-10-18 23:34:54 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-alsa'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
_def_alsa5='#undef HAVE_ALSA5'
_def_alsa9='#undef HAVE_ALSA9'
2004-01-11 18:07:32 +01:00
_def_alsa1x='#undef HAVE_ALSA1X'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H'
_def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
if test "$_alsaver" ; then
2005-09-12 12:05:06 +02:00
_alsa=yes
2001-11-17 04:53:05 +01:00
if test "$_alsaver" = '0.5.x' ; then
2006-07-06 15:09:45 +02:00
_alsa5=yes
2001-11-17 04:53:05 +01:00
_aosrc="$_aosrc ao_alsa5.c"
2001-11-27 18:58:29 +01:00
_aomodules="alsa5 $_aomodules"
2001-11-17 04:53:05 +01:00
_def_alsa5='#define HAVE_ALSA5 1'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
2005-09-12 12:05:06 +02:00
_res_comment="using alsa 0.5.x and sys/asoundlib.h"
2002-04-27 03:25:32 +02:00
elif test "$_alsaver" = '0.9.x-sys' ; then
2006-07-06 15:09:45 +02:00
_alsa9=yes
2004-05-13 00:49:23 +02:00
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
2001-11-17 04:53:05 +01:00
_def_alsa9='#define HAVE_ALSA9 1'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
2005-09-12 12:05:06 +02:00
_res_comment="using alsa 0.9.x and sys/asoundlib.h"
2002-04-27 03:25:32 +02:00
elif test "$_alsaver" = '0.9.x-alsa' ; then
2006-07-06 15:09:45 +02:00
_alsa9=yes
2004-05-13 00:49:23 +02:00
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
2002-04-27 03:25:32 +02:00
_def_alsa9='#define HAVE_ALSA9 1'
_def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
2005-09-12 12:05:06 +02:00
_res_comment="using alsa 0.9.x and alsa/asoundlib.h"
2003-12-07 16:26:12 +01:00
elif test "$_alsaver" = '1.0.x-sys' ; then
2006-07-06 15:09:45 +02:00
_alsa1x=yes
2004-05-13 00:49:23 +02:00
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
2004-01-11 18:07:32 +01:00
_def_alsa1x="#define HAVE_ALSA1X 1"
2003-12-07 16:26:12 +01:00
_def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
2005-09-12 12:05:06 +02:00
_res_comment="using alsa 1.0.x and sys/asoundlib.h"
2003-12-07 16:26:12 +01:00
elif test "$_alsaver" = '1.0.x-alsa' ; then
2006-07-06 15:09:45 +02:00
_alsa1x=yes
2004-05-13 00:49:23 +02:00
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
2004-01-11 18:07:32 +01:00
_def_alsa1x="#define HAVE_ALSA1X 1"
2003-12-07 16:26:12 +01:00
_def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
2005-09-12 12:05:06 +02:00
_res_comment="using alsa 1.0.x and alsa/asoundlib.h"
else
_alsa=no
_res_comment="unknown version"
2001-11-17 04:53:05 +01:00
fi
2006-11-21 16:15:13 +01:00
_ld_extra="$_ld_extra -lasound $_ld_dl $_ld_pthread"
2002-03-12 08:16:29 +01:00
else
_noaomodules="alsa $_noaomodules"
2001-02-24 21:28:24 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_alsa"
2001-02-24 21:28:24 +01:00
2001-10-10 03:48:54 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Sun audio"
if test "$_sunaudio" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/audioio.h>
2001-11-20 17:16:47 +01:00
int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_sunaudio=no
cc_check && _sunaudio=yes
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_sunaudio" = yes ; then
_def_sunaudio='#define USE_SUN_AUDIO 1'
_aosrc="$_aosrc ao_sun.c"
2001-11-27 18:58:29 +01:00
_aomodules="sun $_aomodules"
2001-11-17 04:53:05 +01:00
else
_def_sunaudio='#undef USE_SUN_AUDIO'
2002-03-12 08:16:29 +01:00
_noaomodules="sun $_noaomodules"
2001-06-15 18:32:21 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_sunaudio"
2001-06-15 18:32:21 +02:00
2001-11-17 04:53:05 +01:00
2006-06-18 13:21:23 +02:00
if sunos; then
2001-11-17 04:53:05 +01:00
echocheck "Sun mediaLib"
if test "$_mlib" = auto ; then
_mlib=no
cat > $TMPC << EOF
#include <mlib.h>
int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
EOF
2006-11-20 01:19:43 +01:00
cc_check -lmlib && _mlib=yes
2001-02-27 02:09:22 +01:00
fi
2007-06-19 15:55:22 +02:00
test "$_mlib" = yes && _cpuexts="MLIB $_cpuexts"
2001-11-17 04:53:05 +01:00
echores "$_mlib"
2006-06-18 13:21:23 +02:00
fi #if sunos
2001-02-27 02:09:22 +01:00
2001-11-17 04:53:05 +01:00
2006-06-18 13:21:23 +02:00
if irix; then
2002-04-27 03:25:32 +02:00
echocheck "SGI audio"
2001-11-17 04:53:05 +01:00
if test "$_sgiaudio" = auto ; then
# check for SGI audio
cat > $TMPC << EOF
#include <dmedia/audio.h>
int main(void) { return 0; }
EOF
_sgiaudio=no
cc_check && _sgiaudio=yes
2001-04-05 21:02:02 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_sgiaudio" = "yes" ; then
_def_sgiaudio='#define USE_SGI_AUDIO 1'
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -laudio"
2001-11-17 04:53:05 +01:00
_aosrc="$_aosrc ao_sgi.c"
2001-11-27 18:58:29 +01:00
_aomodules="sgi $_aomodules"
2001-11-17 04:53:05 +01:00
else
_def_sgiaudio='#undef USE_SGI_AUDIO'
2002-03-12 08:16:29 +01:00
_noaomodules="sgi $_noaomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_sgiaudio"
2006-06-18 13:21:23 +02:00
fi #if irix
2001-04-05 21:02:02 +02:00
2001-11-17 04:53:05 +01:00
2001-11-28 00:17:58 +01:00
echocheck "VCD support"
2008-03-27 03:04:03 +01:00
if linux || freebsd || netbsd || dragonfly || bsdos || darwin || sunos || mingw32; then
2001-11-28 00:17:58 +01:00
_inputmodules="vcd $_inputmodules"
2001-12-02 00:38:57 +01:00
_def_vcd='#define HAVE_VCD 1'
2006-05-07 16:00:07 +02:00
_vcd="yes"
2001-11-28 00:17:58 +01:00
else
2001-12-02 00:38:57 +01:00
_def_vcd='#undef HAVE_VCD'
2002-03-12 08:16:29 +01:00
_noinputmodules="vcd $_noinputmodules"
2006-05-07 16:00:07 +02:00
_res_comment="not supported on this OS"
_vcd="no"
2001-11-28 00:17:58 +01:00
fi
2006-05-07 16:00:07 +02:00
echores "$_vcd"
2001-11-28 00:17:58 +01:00
2002-01-04 14:08:14 +01:00
2006-11-03 23:03:58 +01:00
echocheck "dvdread"
if test "$_dvdread_internal" = auto ; then
_dvdread_internal=no
2008-04-01 23:22:02 +02:00
_dvdread=no
2008-04-01 23:59:39 +02:00
if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux) \
&& (test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \
test "$_dvdio" = yes || test "$_bsdi_dvd" = yes) \
|| darwin || win32; then
2006-11-03 23:03:58 +01:00
_dvdread_internal=yes
_dvdread=yes
fi
elif test "$_dvdread" = auto ; then
_dvdread=no
if test "$_dl" = yes; then
cat > $TMPC << EOF
2003-08-10 17:54:25 +02:00
#include <inttypes.h>
2008-06-01 09:31:03 +02:00
#include <libdvdread/dvd_reader.h>
#include <libdvdread/ifo_types.h>
#include <libdvdread/ifo_read.h>
#include <libdvdread/nav_read.h>
2001-11-17 04:53:05 +01:00
int main(void) { return 0; }
EOF
2001-12-17 13:04:20 +01:00
fi
2008-06-01 09:32:28 +02:00
_dvdreadconfig="dvdread-config"
_dvdreadcflags=`$_dvdreadconfig --cflags`
_dvdreadlibs=`$_dvdreadconfig --libs`
if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
_dvdread=yes
_inc_extra="$_inc_extra $_dvdreadcflags"
_ld_extra="$_ld_extra $_dvdreadlibs"
_res_comment="external"
fi
2001-11-17 04:53:05 +01:00
fi
2001-02-27 02:09:22 +01:00
2006-11-03 23:03:58 +01:00
if test "$_dvdread_internal" = yes; then
_def_dvdread_internal="#define USE_DVDREAD_INTERNAL 1"
_def_dvdread='#define USE_DVDREAD 1'
2007-04-15 14:06:48 +02:00
_inputmodules="dvdread(internal) $_inputmodules"
2006-11-03 23:03:58 +01:00
_largefiles=yes
2007-08-16 16:12:58 +02:00
_res_comment="internal"
2006-11-03 23:03:58 +01:00
elif test "$_dvdread" = yes; then
_def_dvdread='#define USE_DVDREAD 1'
_largefiles=yes
2007-05-01 21:55:15 +02:00
_ld_extra="$_ld_extra -ldvdread"
_inputmodules="dvdread(external) $_inputmodules"
_res_comment="external"
2005-12-14 22:52:41 +01:00
else
2006-11-03 23:03:58 +01:00
_def_dvdread_internal="#undef USE_DVDREAD_INTERNAL"
_def_dvdread='#undef USE_DVDREAD'
_noinputmodules="dvdread $_noinputmodules"
2005-12-14 22:52:41 +01:00
fi
2006-11-03 23:03:58 +01:00
echores "$_dvdread"
2005-12-14 22:52:41 +01:00
2002-03-28 21:40:21 +01:00
2006-11-09 19:25:42 +01:00
echocheck "internal libdvdcss"
if test "$_libdvdcss_internal" = auto ; then
_libdvdcss_internal=no
test "$_dvdread_internal" = yes && _libdvdcss_internal=yes
2008-03-08 17:44:51 +01:00
hpux && test "$_hpux_scsi_h" = no && _libdvdcss_internal=no
2006-11-09 19:25:42 +01:00
fi
if test "$_libdvdcss_internal" = yes ; then
2006-11-26 19:37:51 +01:00
if linux || netbsd || openbsd || bsdos ; then
_def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
openbsd && _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
2008-03-27 03:04:03 +01:00
elif freebsd || dragonfly ; then
2006-11-26 19:37:51 +01:00
_def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
elif darwin ; then
_def_dvd_darwin='#define DARWIN_DVD_IOCTL'
_ld_extra="$_ld_extra -framework IOKit"
fi
2008-04-30 17:36:17 +02:00
_libdvdcss_dvdread_flags="-Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H"
2007-04-15 14:06:48 +02:00
_inputmodules="libdvdcss(internal) $_inputmodules"
2007-03-16 23:22:02 +01:00
_largefiles=yes
2006-11-09 19:25:42 +01:00
else
2007-04-15 14:06:48 +02:00
_noinputmodules="libdvdcss(internal) $_noinputmodules"
2006-11-09 19:25:42 +01:00
fi
echores "$_libdvdcss_internal"
2002-06-11 16:29:51 +02:00
echocheck "cdparanoia"
if test "$_cdparanoia" = auto ; then
cat > $TMPC <<EOF
#include <cdda_interface.h>
#include <cdda_paranoia.h>
// This need a better test. How ?
2008-05-03 22:03:36 +02:00
int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
2002-06-11 16:29:51 +02:00
EOF
_cdparanoia=no
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
2006-11-20 01:19:43 +01:00
cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
2006-08-27 23:05:42 +02:00
_cdparanoia=yes && _inc_extra="$_inc_extra $_inc_tmp" && break
2005-10-03 21:36:32 +02:00
done
2002-06-11 16:29:51 +02:00
fi
if test "$_cdparanoia" = yes ; then
2006-07-06 15:09:45 +02:00
_cdda='yes'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lcdda_interface -lcdda_paranoia"
openbsd && _ld_extra="$_ld_extra -lutil"
2002-06-11 16:29:51 +02:00
fi
echores "$_cdparanoia"
2004-06-11 17:10:36 +02:00
2005-11-06 18:42:20 +01:00
echocheck "libcdio"
if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then
cat > $TMPC << EOF
#include <stdio.h>
#include <cdio/version.h>
#include <cdio/cdda.h>
#include <cdio/paranoia.h>
2008-05-03 22:03:36 +02:00
int main(void) {
2006-11-01 11:49:52 +01:00
void *test = cdda_verbose_set;
2005-11-06 18:42:20 +01:00
printf("%s\n", CDIO_VERSION);
2006-11-01 18:05:17 +01:00
return test == (void *)1;
2005-11-06 18:42:20 +01:00
}
EOF
_libcdio=no
2006-11-01 19:54:10 +01:00
for _ld_tmp in "" "-lwinmm" ; do
_ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
2006-11-02 19:05:22 +01:00
cc_check $_ld_tmp $_ld_lm \
2006-11-20 01:19:43 +01:00
&& _libcdio=yes && _ld_extra="$_ld_extra $_ld_tmp" && break
2005-11-06 18:42:20 +01:00
done
2006-11-02 19:12:19 +01:00
if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then
2006-11-02 19:14:12 +01:00
_inc_tmp=`$_pkg_config --cflags libcdio_paranoia`
_ld_tmp=`$_pkg_config --libs libcdio_paranoia`
2006-11-01 19:15:06 +01:00
cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes \
2006-11-20 01:19:43 +01:00
&& _ld_extra="$_ld_extra $_ld_tmp" && _inc_extra="$_inc_extra $_inc_tmp"
2005-11-06 18:42:20 +01:00
fi
fi
if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
2006-07-06 15:09:45 +02:00
_cdda='yes'
2005-11-06 18:42:20 +01:00
_def_libcdio='#define HAVE_LIBCDIO'
_def_havelibcdio='yes'
else
if test "$_cdparanoia" = yes ; then
2006-04-24 23:50:06 +02:00
_res_comment="using cdparanoia"
2005-11-06 18:42:20 +01:00
fi
_def_libcdio='#undef HAVE_LIBCDIO'
_def_havelibcdio='no'
fi
echores "$_libcdio"
2006-10-29 12:38:14 +01:00
if test "$_cdda" = yes ; then
2007-12-16 12:31:52 +01:00
test $_cddb = auto && test $_network = yes && _cddb=yes
2006-10-29 12:38:14 +01:00
_def_cdparanoia='#define HAVE_CDDA'
_inputmodules="cdda $_inputmodules"
else
_def_cdparanoia='#undef HAVE_CDDA'
_noinputmodules="cdda $_noinputmodules"
fi
2005-11-06 18:42:20 +01:00
2006-12-04 21:20:32 +01:00
if test "$_cddb" = yes ; then
_def_cddb='#define HAVE_CDDB'
_inputmodules="cddb $_inputmodules"
else
_cddb=no
_def_cddb='#undef HAVE_CDDB'
_noinputmodules="cddb $_noinputmodules"
fi
2006-08-22 01:19:11 +02:00
echocheck "bitmap font support"
if test "$_bitmap_font" = yes ; then
_def_bitmap_font="#define HAVE_BITMAP_FONT 1"
else
_def_bitmap_font="#undef HAVE_BITMAP_FONT"
fi
echores "$_bitmap_font"
2002-09-09 21:23:06 +02:00
echocheck "freetype >= 2.0.9"
2004-06-11 17:10:36 +02:00
# freetype depends on iconv
if test "$_iconv" = no ; then
2005-09-11 12:57:28 +02:00
_freetype=no
2005-09-12 12:05:06 +02:00
_res_comment="iconv support needed"
2004-06-11 17:10:36 +02:00
fi
2002-12-29 00:52:22 +01:00
if test "$_freetype" = auto ; then
2002-09-02 20:43:01 +02:00
if ( $_freetypeconfig --version ) >/dev/null 2>&1 ; then
2002-08-28 22:52:02 +02:00
cat > $TMPC << EOF
2002-09-02 01:26:37 +02:00
#include <stdio.h>
2003-11-29 04:02:38 +01:00
#include <ft2build.h>
#include FT_FREETYPE_H
2002-09-09 21:23:06 +02:00
#if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
#error "Need FreeType 2.0.9 or newer"
2002-08-28 22:52:02 +02:00
#endif
2008-05-03 22:03:36 +02:00
int main(void) {
2002-09-02 01:26:37 +02:00
FT_Library library;
FT_Int major=-1,minor=-1,patch=-1;
int err=FT_Init_FreeType(&library);
if(err){
printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
exit(err);
}
FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
(int)major,(int)minor,(int)patch );
if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
printf("Library and header version mismatch! Fix it in your distribution!\n");
exit(1);
}
2002-08-28 22:52:02 +02:00
return 0;
}
EOF
_freetype=no
2005-10-18 23:44:14 +02:00
cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run && _freetype=yes
2002-08-28 22:52:02 +02:00
else
_freetype=no
fi
fi
if test "$_freetype" = yes ; then
_def_freetype='#define HAVE_FREETYPE'
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `$_freetypeconfig --cflags`"
2006-11-22 10:36:33 +01:00
_ld_extra="$_ld_extra `$_freetypeconfig --libs`"
2002-08-28 22:52:02 +02:00
else
_def_freetype='#undef HAVE_FREETYPE'
fi
2005-09-11 14:45:34 +02:00
echores "$_freetype"
2002-08-28 22:52:02 +02:00
2003-12-08 13:14:32 +01:00
if test "$_freetype" = no ; then
_fontconfig=no
2005-09-12 12:05:06 +02:00
_res_comment="freetype support needed"
2003-12-08 13:14:32 +01:00
fi
echocheck "fontconfig"
if test "$_fontconfig" = auto ; then
cat > $TMPC << EOF
#include <stdio.h>
#include <fontconfig/fontconfig.h>
2008-05-03 22:03:36 +02:00
int main(void) {
2003-12-08 13:14:32 +01:00
int err = FcInit();
if(err == FcFalse){
printf("Couldn't initialize fontconfig lib\n");
exit(err);
}
return 0;
}
EOF
2006-11-04 12:57:03 +01:00
_fontconfig=no
for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
_ld_tmp="-lfontconfig $_ld_tmp"
2006-11-22 10:36:33 +01:00
cc_check $_ld_tmp && _fontconfig=yes && _ld_extra="$_ld_extra $_ld_tmp" && break
2006-11-04 12:57:03 +01:00
done
if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then
_inc_tmp=`$_pkg_config --cflags fontconfig`
_ld_tmp=`$_pkg_config --libs fontconfig`
cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes \
2006-11-22 10:36:33 +01:00
&& _ld_extra="$_ld_extra $_ld_tmp" && _inc_extra="$_inc_extra $_inc_tmp"
2005-10-03 21:36:32 +02:00
fi
2003-12-08 13:14:32 +01:00
fi
if test "$_fontconfig" = yes ; then
_def_fontconfig='#define HAVE_FONTCONFIG'
else
_def_fontconfig='#undef HAVE_FONTCONFIG'
fi
2005-09-11 14:45:34 +02:00
echores "$_fontconfig"
2003-03-21 17:54:03 +01:00
2006-07-08 15:47:43 +02:00
2006-07-07 20:26:51 +02:00
echocheck "SSA/ASS support"
2006-07-08 15:47:43 +02:00
# libass depends on FreeType
2006-07-07 20:26:51 +02:00
if test "$_freetype" = no ; then
_ass=no
_res_comment="FreeType support needed"
fi
if test "$_ass" = auto ; then
cat > $TMPC << EOF
#include <ft2build.h>
#include FT_FREETYPE_H
#if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
#error "Need FreeType 2.1.8 or newer"
#endif
2007-11-21 10:17:04 +01:00
int main(void) { return 0; }
2006-07-07 20:26:51 +02:00
EOF
_ass=no
cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run && _ass=yes
if test "$_ass" = no ; then
_res_comment="FreeType >= 2.1.8 needed"
fi
fi
if test "$_ass" = yes ; then
_def_ass='#define USE_ASS'
else
_def_ass='#undef USE_ASS'
fi
echores "$_ass"
2006-07-08 15:47:43 +02:00
2003-03-21 17:54:03 +01:00
echocheck "fribidi with charsets"
2005-12-11 19:19:05 +01:00
if test "$_fribidi" = auto ; then
2003-03-21 17:54:03 +01:00
if ( $_fribidiconfig --version ) >/dev/null 2>&1 ; then
cat > $TMPC << EOF
#include <stdio.h>
2005-06-23 00:12:55 +02:00
/* workaround for fribidi 0.10.4 and below */
2005-06-24 01:40:07 +02:00
#define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
#include <fribidi/fribidi.h>
2008-05-03 22:03:36 +02:00
int main(void) {
2005-06-23 00:12:55 +02:00
if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
2003-03-21 17:54:03 +01:00
printf("Fribidi headers are not consistents with the library!\n");
exit(1);
}
return 0;
}
EOF
_fribidi=no
2005-10-18 23:44:14 +02:00
cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run && _fribidi=yes
2003-03-21 17:54:03 +01:00
else
_fribidi=no
fi
fi
if test "$_fribidi" = yes ; then
_def_fribidi='#define USE_FRIBIDI'
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `$_fribidiconfig --cflags`"
2006-11-20 01:55:57 +01:00
_ld_extra="$_ld_extra `$_fribidiconfig --libs`"
2003-03-21 17:54:03 +01:00
else
_def_fribidi='#undef USE_FRIBIDI'
fi
echores "$_fribidi"
2004-05-08 19:52:25 +02:00
echocheck "ENCA"
if test "$_enca" = auto ; then
cat > $TMPC << EOF
#include <enca.h>
2008-05-03 22:03:36 +02:00
int main(void) {
2004-05-08 19:52:25 +02:00
const char **langs;
size_t langcnt;
langs = enca_get_languages(&langcnt);
return 0;
}
EOF
_enca=no
2005-08-26 21:08:28 +02:00
cc_check -lenca $_ld_lm && _enca=yes
2004-10-24 15:37:35 +02:00
fi
2004-05-08 19:52:25 +02:00
if test "$_enca" = yes ; then
_def_enca='#define HAVE_ENCA 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lenca"
2004-05-08 19:52:25 +02:00
else
_def_enca='#undef HAVE_ENCA'
fi
echores "$_enca"
2001-11-17 04:53:05 +01:00
echocheck "zlib"
cat > $TMPC << EOF
#include <zlib.h>
2001-11-18 22:36:30 +01:00
int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_zlib=no
cc_check -lz && _zlib=yes
if test "$_zlib" = yes ; then
_def_zlib='#define HAVE_ZLIB 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lz"
2001-02-24 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
_def_zlib='#undef HAVE_ZLIB'
2007-05-01 16:08:26 +02:00
_libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
_libavencoders=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_zlib"
2001-02-24 21:28:24 +01:00
2001-07-03 16:22:23 +02:00
2001-11-20 08:53:20 +01:00
echocheck "RTC"
2005-01-06 13:06:57 +01:00
if test "$_rtc" = auto ; then
cat > $TMPC << EOF
2001-11-20 08:53:20 +01:00
#include <sys/ioctl.h>
2005-01-06 01:06:56 +01:00
#ifdef __linux__
2001-11-20 08:53:20 +01:00
#include <linux/rtc.h>
2005-01-06 01:06:56 +01:00
#else
#include <rtc.h>
#define RTC_PIE_ON RTCIO_PIE_ON
#endif
int main(void) { return RTC_PIE_ON; }
2001-11-20 08:53:20 +01:00
EOF
_rtc=no
2005-01-06 13:06:57 +01:00
cc_check && _rtc=yes
2006-04-22 15:17:23 +02:00
ppc && _rtc=no
2001-11-20 08:53:20 +01:00
fi
if test "$_rtc" = yes ; then
_def_rtc='#define HAVE_RTC 1'
else
_def_rtc='#undef HAVE_RTC'
fi
2005-01-06 13:06:57 +01:00
echores "$_rtc"
2001-11-20 08:53:20 +01:00
2001-11-20 10:26:44 +01:00
2007-02-18 15:54:50 +01:00
echocheck "liblzo2 support"
2002-10-29 17:50:34 +01:00
if test "$_liblzo" = auto ; then
_liblzo=no
2002-10-13 23:40:10 +02:00
cat > $TMPC << EOF
2007-02-18 15:54:50 +01:00
#include <lzo/lzo1x.h>
2002-10-13 23:40:10 +02:00
int main(void) { lzo_init();return 0; }
EOF
2007-02-18 15:54:50 +01:00
cc_check -llzo2 && _liblzo=yes
2002-10-13 23:40:10 +02:00
fi
2002-10-29 17:50:34 +01:00
if test "$_liblzo" = yes ; then
_def_liblzo='#define USE_LIBLZO 1'
2007-02-18 15:54:50 +01:00
_ld_extra="$_ld_extra -llzo2"
2002-10-29 17:50:34 +01:00
_codecmodules="liblzo $_codecmodules"
2002-10-13 23:40:10 +02:00
else
2002-10-29 17:50:34 +01:00
_def_liblzo='#undef USE_LIBLZO'
_nocodecmodules="liblzo $_nocodecmodules"
2002-10-13 23:40:10 +02:00
fi
2002-10-29 17:50:34 +01:00
echores "$_liblzo"
2002-10-13 23:40:10 +02:00
2001-11-17 04:53:05 +01:00
echocheck "mad support"
if test "$_mad" = auto ; then
_mad=no
cat > $TMPC << EOF
#include <mad.h>
int main(void) { return 0; }
EOF
2006-08-26 19:10:26 +02:00
cc_check -lmad && _mad=yes
2001-04-19 21:59:11 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_mad" = yes ; then
_def_mad='#define USE_LIBMAD 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lmad"
2002-04-21 04:44:25 +02:00
_codecmodules="libmad $_codecmodules"
2001-11-17 04:53:05 +01:00
else
_def_mad='#undef USE_LIBMAD'
2002-04-22 11:31:13 +02:00
_nocodecmodules="libmad $_nocodecmodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_mad"
2001-02-24 21:28:24 +01:00
2007-01-14 23:35:10 +01:00
echocheck "Twolame"
if test "$_twolame" = auto ; then
cat > $TMPC <<EOF
#include <twolame.h>
int main(void) { twolame_init(); return 0; }
EOF
_twolame=no
cc_check -ltwolame $_ld_lm && _twolame=yes
fi
if test "$_twolame" = yes ; then
_def_twolame='#define HAVE_TWOLAME 1'
_libs_mencoder="$_libs_mencoder -ltwolame"
_codecmodules="twolame $_codecmodules"
else
_def_twolame='#undef HAVE_TWOLAME'
_nocodecmodules="twolame $_nocodecmodules"
fi
echores "$_twolame"
2004-09-21 21:50:54 +02:00
echocheck "Toolame"
if test "$_toolame" = auto ; then
2007-01-14 23:58:25 +01:00
_toolame=no
if test "$_twolame" = yes ; then
_res_comment="disabled by twolame"
else
2004-09-21 21:50:54 +02:00
cat > $TMPC <<EOF
#include <toolame.h>
int main(void) { toolame_init(); return 0; }
EOF
2006-11-20 17:14:47 +01:00
cc_check -ltoolame $_ld_lm && _toolame=yes
2004-09-21 21:50:54 +02:00
fi
2007-01-14 23:58:25 +01:00
fi
2004-09-21 21:50:54 +02:00
if test "$_toolame" = yes ; then
_def_toolame='#define HAVE_TOOLAME 1'
2006-11-21 14:53:32 +01:00
_libs_mencoder="$_libs_mencoder -ltoolame"
2006-10-07 18:43:39 +02:00
_codecmodules="toolame $_codecmodules"
2004-09-21 21:50:54 +02:00
else
_def_toolame='#undef HAVE_TOOLAME'
_nocodecmodules="toolame $_nocodecmodules"
fi
2005-09-12 12:05:06 +02:00
if test "$_toolamedir" ; then
_res_comment="using $_toolamedir"
2004-09-21 21:50:54 +02:00
fi
2005-09-12 12:05:06 +02:00
echores "$_toolame"
2001-10-23 15:59:10 +02:00
2001-11-17 04:53:05 +01:00
echocheck "OggVorbis support"
2004-12-30 13:11:32 +01:00
if test "$_tremor_internal" = yes; then
2006-08-08 11:29:15 +02:00
_libvorbis=no
elif test "$_tremor_external" = auto; then
_tremor_external=no
cat > $TMPC << EOF
#include <tremor/ivorbiscodec.h>
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
EOF
2006-08-08 13:55:23 +02:00
cc_check -logg -lvorbisidec $_ld_lm && _tremor_external=yes && _libvorbis=no
2006-08-08 11:29:15 +02:00
fi
if test "$_libvorbis" = auto; then
_libvorbis=no
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <vorbis/codec.h>
2002-03-26 13:43:01 +01:00
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2006-08-08 11:29:15 +02:00
cc_check -lvorbis -logg $_ld_lm && _libvorbis=yes
2001-11-17 04:53:05 +01:00
fi
2006-08-08 11:29:15 +02:00
if test "$_tremor_internal" = yes ; then
_vorbis=yes
2001-11-17 04:53:05 +01:00
_def_vorbis='#define HAVE_OGGVORBIS 1'
2006-08-08 11:29:15 +02:00
_def_tremor='#define TREMOR 1'
_codecmodules="tremor(internal) $_codecmodules"
_res_comment="internal Tremor"
if test "$_tremor_low" = yes ; then
2008-04-23 00:55:55 +02:00
CFLAGS="$CFLAGS -D_LOW_ACCURACY_"
2006-08-08 11:29:15 +02:00
_res_comment="internal low accuracy Tremor"
2002-12-04 21:27:36 +01:00
fi
2006-08-08 11:29:15 +02:00
elif test "$_tremor_external" = yes ; then
_vorbis=yes
_def_vorbis='#define HAVE_OGGVORBIS 1'
_def_tremor='#define TREMOR 1'
_codecmodules="tremor(external) $_codecmodules"
_res_comment="external Tremor"
2006-11-22 20:26:52 +01:00
_ld_extra="$_ld_extra -logg -lvorbisidec"
2006-08-08 11:29:15 +02:00
elif test "$_libvorbis" = yes ; then
_vorbis=yes
_def_vorbis='#define HAVE_OGGVORBIS 1'
_codecmodules="libvorbis $_codecmodules"
_res_comment="libvorbis"
2006-11-22 20:26:52 +01:00
_ld_extra="$_ld_extra -lvorbis -logg"
2001-09-01 21:36:44 +02:00
else
2006-08-12 20:21:51 +02:00
_vorbis=no
2002-04-22 11:31:13 +02:00
_nocodecmodules="libvorbis $_nocodecmodules"
2001-09-01 21:36:44 +02:00
fi
2005-09-12 12:05:06 +02:00
echores "$_vorbis"
2001-09-01 21:36:44 +02:00
2005-11-05 12:58:25 +01:00
echocheck "libspeex (version >= 1.1 required)"
if test "$_speex" = auto ; then
_speex=no
cat > $TMPC << EOF
#include <speex/speex.h>
2008-05-03 22:03:36 +02:00
int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); }
2005-11-05 12:58:25 +01:00
EOF
cc_check -lspeex $_ld_lm && _speex=yes
fi
if test "$_speex" = yes ; then
_def_speex='#define HAVE_SPEEX 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lspeex"
2005-11-05 12:58:25 +01:00
_codecmodules="speex $_codecmodules"
else
_def_speex='#undef HAVE_SPEEX'
_nocodecmodules="speex $_nocodecmodules"
fi
echores "$_speex"
2005-10-04 19:58:11 +02:00
echocheck "OggTheora support"
2003-05-11 20:29:07 +02:00
if test "$_theora" = auto ; then
_theora=no
2005-10-04 19:58:11 +02:00
cat > $TMPC << EOF
2003-05-11 20:29:07 +02:00
#include <theora/theora.h>
2003-08-18 15:13:41 +02:00
#include <string.h>
2008-05-03 22:03:36 +02:00
int main(void) {
2008-05-03 22:14:50 +02:00
/* theora is in flux, make sure that all interface routines and
2003-08-18 15:13:41 +02:00
* datatypes exist and work the way we expect it, so we don't break
* mplayer */
ogg_packet op;
theora_comment tc;
theora_info inf;
theora_state st;
yuv_buffer yuv;
int r;
double t;
theora_info_init (&inf);
theora_comment_init (&tc);
2008-05-03 22:14:50 +02:00
2003-08-18 15:13:41 +02:00
return 0;
/* we don't want to execute this kind of nonsense; just for making sure
* that compilation works... */
memset(&op, 0, sizeof(op));
r = theora_decode_header (&inf, &tc, &op);
r = theora_decode_init (&st, &inf);
t = theora_granule_time (&st, op.granulepos);
r = theora_decode_packetin (&st, &op);
r = theora_decode_YUVout (&st, &yuv);
theora_clear (&st);
return 0;
}
2003-05-11 20:29:07 +02:00
EOF
2007-09-30 00:19:54 +02:00
for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
2006-11-22 10:51:34 +01:00
cc_check $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" \
2006-11-22 13:05:27 +01:00
&& _theora=yes && break
2005-11-05 10:57:13 +01:00
done
if test "$_theora" = no && test "$_tremor_internal" = yes; then
2007-09-30 00:19:54 +02:00
for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
2006-11-22 10:51:34 +01:00
cc_check -I. tremor/bitwise.c $_ld_theora \
&& _ld_extra="$_ld_extra $_ld_theora" && theora=yes && break
2005-11-05 10:57:13 +01:00
done
2005-10-04 19:58:11 +02:00
fi
2003-05-11 20:29:07 +02:00
fi
if test "$_theora" = yes ; then
_def_theora='#define HAVE_OGGTHEORA 1'
_codecmodules="libtheora $_codecmodules"
2005-12-13 22:54:28 +01:00
# when --enable-theora is forced, we'd better provide a probably sane
# $_ld_theora than nothing
2007-04-06 11:22:28 +02:00
test -z "$_ld_theora" && _ld_extra="$_ld_extra -ltheora -logg"
2003-05-11 20:29:07 +02:00
else
_def_theora='#undef HAVE_OGGTHEORA'
_nocodecmodules="libtheora $_nocodecmodules"
fi
echores "$_theora"
2007-07-14 17:13:25 +02:00
echocheck "internal mp3lib support"
2004-04-06 01:17:40 +02:00
if test "$_mp3lib" = yes ; then
_def_mp3lib='#define USE_MP3LIB 1'
_codecmodules="mp3lib $_codecmodules"
else
_def_mp3lib='#undef USE_MP3LIB'
_nocodecmodules="mp3lib $_nocodecmodules"
fi
echores "$_mp3lib"
2001-06-05 13:20:14 +02:00
2007-07-14 17:13:25 +02:00
echocheck "internal liba52 support"
2004-04-06 01:17:40 +02:00
if test "$_liba52" = yes ; then
_def_liba52='#define USE_LIBA52 1'
_codecmodules="liba52 $_codecmodules"
else
2004-10-07 11:31:16 +02:00
_def_liba52='#undef USE_LIBA52'
2004-04-06 01:17:40 +02:00
_nocodecmodules="liba52 $_nocodecmodules"
fi
echores "$_liba52"
2008-06-15 18:00:51 +02:00
echocheck "internal libmpeg2 support"
if test "$_libmpeg2" = auto ; then
_libmpeg2=yes
if alpha && test cc_vendor=gnu; then
case $cc_version in
2*|3.0*|3.1*) # cannot compile MVI instructions
_libmpeg2=no
_res_comment="broken gcc"
;;
esac
fi
fi
if test "$_libmpeg2" = yes ; then
_def_libmpeg2='#define USE_LIBMPEG2 1'
_codecmodules="libmpeg2 $_codecmodules"
else
_def_libmpeg2='#undef USE_LIBMPEG2'
_nocodecmodules="libmpeg2 $_nocodecmodules"
fi
echores "$_libmpeg2"
2007-07-22 18:24:25 +02:00
echocheck "libdca support"
if test "$_libdca" = auto ; then
_libdca=no
cat > $TMPC << EOF
#include <inttypes.h>
#include <dts.h>
int main(void) { dts_init (0); return 0; }
EOF
2007-11-07 00:44:53 +01:00
for _ld_dca in -ldts -ldca ; do
cc_check $_ld_dca $_ld_lm && _ld_extra="$_ld_extra $_ld_dca" \
&& _libdca=yes && break
done
2007-07-22 18:24:25 +02:00
fi
if test "$_libdca" = yes ; then
_def_libdca='#define USE_LIBDCA 1'
_codecmodules="libdca $_codecmodules"
else
_def_libdca='#undef USE_LIBDCA'
_nocodecmodules="libdca $_nocodecmodules"
fi
echores "$_libdca"
2004-08-12 14:36:08 +02:00
2005-09-05 00:42:01 +02:00
echocheck "libmpcdec (musepack, version >= 1.2.1 required)"
2005-07-10 19:14:12 +02:00
if test "$_musepack" = auto ; then
_musepack=no
cat > $TMPC << EOF
#include <mpcdec/mpcdec.h>
int main(void) {
mpc_streaminfo info;
mpc_decoder decoder;
mpc_decoder_set_streaminfo(&decoder, &info);
mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
}
EOF
cc_check -lmpcdec $_ld_lm && _musepack=yes
fi
if test "$_musepack" = yes ; then
_def_musepack='#define HAVE_MUSEPACK 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lmpcdec"
2005-07-10 19:14:12 +02:00
_codecmodules="musepack $_codecmodules"
else
_def_musepack='#undef HAVE_MUSEPACK'
_nocodecmodules="musepack $_nocodecmodules"
fi
echores "$_musepack"
2004-08-19 13:57:33 +02:00
2005-04-25 09:07:57 +02:00
echocheck "FAAC (AAC encoder) support"
if test "$_faac" = auto ; then
cat > $TMPC <<EOF
2008-05-03 22:14:50 +02:00
#include <inttypes.h>
2005-04-25 09:07:57 +02:00
#include <faac.h>
int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
EOF
2005-10-03 21:36:32 +02:00
_faac=no
2006-11-21 17:00:00 +01:00
for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
2007-03-29 11:27:36 +02:00
cc_check -O4 $_ld_faac $_ld_lm && _libs_mencoder="$_libs_mencoder $_ld_faac" && _faac=yes && break
2005-10-03 21:36:32 +02:00
done
2005-04-25 09:07:57 +02:00
fi
if test "$_faac" = yes ; then
_def_faac="#define HAVE_FAAC 1"
2008-05-09 00:50:17 +02:00
test "$_faac_lavc" = auto && _faac_lavc=yes
if test "$_faac_lavc" = yes ; then
2008-05-08 23:50:31 +02:00
_def_faac_lavc="#define CONFIG_LIBFAAC 1"
2006-11-21 17:00:00 +01:00
_libs_mplayer="$_libs_mplayer $_ld_faac"
2008-05-09 00:50:17 +02:00
_libavencoders="$_libavencoders LIBFAAC_ENCODER"
2006-11-10 00:14:33 +01:00
fi
2005-10-03 21:36:32 +02:00
_codecmodules="faac $_codecmodules"
2005-04-25 09:07:57 +02:00
else
2008-05-09 00:50:17 +02:00
_faac_lavc=no
2005-04-25 09:07:57 +02:00
_def_faac="#undef HAVE_FAAC"
2008-05-09 00:50:17 +02:00
_def_faac_lavc="#undef CONFIG_LIBFAAC"
2005-10-03 21:36:32 +02:00
_nocodecmodules="faac $_nocodecmodules"
2005-04-25 09:07:57 +02:00
fi
2008-05-09 00:50:17 +02:00
_res_comment="in libavcodec: $_faac_lavc"
echores "$_faac"
2003-11-12 11:26:01 +01:00
2006-06-17 19:08:06 +02:00
echocheck "FAAD2 (AAC) support"
2003-11-12 11:26:01 +01:00
if test "$_faad_internal" = auto ; then
2006-12-24 01:08:57 +01:00
if x86_32 && test cc_vendor=gnu; then
2006-04-22 13:03:45 +02:00
case $cc_version in
3.1*|3.2) # ICE/insn with these versions
_faad_internal=no
_res_comment="broken gcc"
;;
2006-04-22 17:13:51 +02:00
*)
_faad_internal=yes
;;
2006-04-22 13:03:45 +02:00
esac
2006-04-22 14:46:33 +02:00
else
_faad_internal=yes
2003-11-12 11:26:01 +01:00
fi
2006-08-21 02:39:48 +02:00
elif test "$_faad_internal" = no && test "$_faad_external" = auto ; then
2006-08-21 02:42:34 +02:00
_faad_external=no
cat > $TMPC << EOF
2003-09-07 19:48:17 +02:00
#include <faad.h>
2005-02-03 18:35:49 +01:00
#ifndef FAAD_MIN_STREAMSIZE
#error Too old version
#endif
2008-05-03 22:03:36 +02:00
int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
2003-09-07 19:48:17 +02:00
EOF
2006-11-20 01:19:43 +01:00
cc_check -lfaad $_ld_lm && _faad_external=yes
2002-03-19 00:30:04 +01:00
fi
2003-02-07 22:04:35 +01:00
2006-06-17 19:08:06 +02:00
if test "$_faad_internal" = yes ; then
2006-08-07 10:57:43 +02:00
_def_faad_internal="#define USE_FAAD_INTERNAL 1"
2006-06-17 19:08:06 +02:00
_faad=yes
2006-10-17 18:01:25 +02:00
_res_comment="internal floating-point"
2008-04-24 18:41:44 +02:00
if test "$_faad_fixed" = yes ; then
# The FIXED_POINT implementation of FAAD2 improves performance
# on some platforms, especially for SBR files.
CFLAGS="$CFLAGS -DFIXED_POINT"
_res_comment="internal fixed-point"
fi
2006-06-17 19:08:06 +02:00
elif test "$_faad_external" = yes ; then
_faad=yes
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lfaad"
2006-06-17 19:08:06 +02:00
else
2006-08-07 10:57:43 +02:00
_def_faad_internal="#undef USE_FAAD_INTERNAL"
2006-06-17 19:08:06 +02:00
_faad=no
fi
if test "$_faad" = yes ; then
2003-11-12 11:26:01 +01:00
_def_faad='#define HAVE_FAAD 1'
2006-06-17 19:08:06 +02:00
_codecmodules="faad2 $_codecmodules"
2003-02-07 22:04:35 +01:00
else
2003-09-08 12:09:02 +02:00
_def_faad='#undef HAVE_FAAD'
_nocodecmodules="faad2 $_nocodecmodules"
2003-02-07 22:04:35 +01:00
fi
2006-06-17 19:08:06 +02:00
echores "$_faad"
2002-03-19 00:30:04 +01:00
2004-12-23 03:09:52 +01:00
echocheck "LADSPA plugin support"
if test "$_ladspa" = auto ; then
cat > $TMPC <<EOF
#include <stdio.h>
#include <ladspa.h>
int main(void) {
const LADSPA_Descriptor *ld = NULL;
return 0;
}
EOF
_ladspa=no
cc_check && _ladspa=yes
fi
if test "$_ladspa" = yes; then
_def_ladspa="#define HAVE_LADSPA"
else
_def_ladspa="#undef HAVE_LADSPA"
fi
echores "$_ladspa"
2006-11-01 21:31:18 +01:00
if test -z "$_codecsdir" ; then
for dir in "$_libdir/codecs" "$_libdir/win32" /usr/local/lib/codecs \
/usr/lib/codecs /usr/local/lib/win32 /usr/lib/win32 ; do
if test -d "$dir" ; then
_codecsdir="$dir"
break;
fi;
done
fi
# Fall back on default directory.
if test -z "$_codecsdir" ; then
_codecsdir="$_libdir/codecs"
mingw32 && _codecsdir="codecs"
2008-02-18 16:02:41 +01:00
os2 && _codecsdir="codecs"
2003-01-04 20:07:46 +01:00
fi
2006-11-01 21:31:18 +01:00
2006-11-06 17:23:04 +01:00
echocheck "Win32 codecs"
2007-03-18 21:15:57 +01:00
if test "$_win32dll" = auto ; then
_win32dll=no
2007-11-22 18:11:38 +01:00
if x86_32 && ! qnx; then
2007-03-18 21:15:57 +01:00
_win32dll=yes
2006-11-01 21:31:18 +01:00
fi
2001-06-05 20:40:44 +02:00
fi
2007-03-18 21:15:57 +01:00
if test "$_win32dll" = yes ; then
_def_win32dll='#define USE_WIN32DLL 1'
2006-11-26 12:56:54 +01:00
test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir
2006-10-31 15:47:34 +01:00
_res_comment="using $_win32codecsdir"
2007-11-22 18:11:38 +01:00
if ! win32 ; then
2003-02-11 19:56:17 +01:00
_def_win32_loader='#define WIN32_LOADER 1'
2008-03-03 19:12:05 +01:00
_win32_emulation=yes
2003-02-11 19:56:17 +01:00
else
2006-11-21 13:16:12 +01:00
_ld_extra="$_ld_extra -ladvapi32 -lole32"
2006-05-07 16:00:07 +02:00
_res_comment="using native windows"
2003-02-11 19:56:17 +01:00
fi
2006-11-01 21:31:18 +01:00
_codecmodules="win32 $_codecmodules"
else
2007-03-18 21:15:57 +01:00
_def_win32dll='#undef USE_WIN32DLL'
2006-11-01 21:31:18 +01:00
_def_win32_loader='#undef WIN32_LOADER'
_nocodecmodules="win32 $_nocodecmodules"
2003-02-11 19:56:17 +01:00
fi
2007-03-18 21:15:57 +01:00
echores "$_win32dll"
2006-06-18 13:21:23 +02:00
2001-11-17 04:53:05 +01:00
2006-11-06 17:23:04 +01:00
echocheck "XAnim codecs"
2001-11-17 04:53:05 +01:00
if test "$_xanim" = auto ; then
_xanim=no
2005-09-12 12:05:06 +02:00
_res_comment="dynamic loader support needed"
2001-11-18 18:45:23 +01:00
if test "$_dl" = yes ; then
2006-11-01 21:31:18 +01:00
_xanim=yes
2001-11-17 04:53:05 +01:00
fi
2001-10-26 15:50:05 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xanim" = yes ; then
2006-12-02 21:54:51 +01:00
test -z "$_xanimcodecsdir" && _xanimcodecsdir=$_codecsdir
2001-11-17 04:53:05 +01:00
_def_xanim='#define USE_XANIM 1'
2006-10-31 15:47:34 +01:00
_def_xanim_path="#define XACODEC_PATH \"$_xanimcodecsdir\""
2001-11-27 22:54:27 +01:00
_codecmodules="xanim $_codecmodules"
2006-10-31 15:47:34 +01:00
_res_comment="using $_xanimcodecsdir"
2001-11-14 20:02:39 +01:00
else
2001-11-17 04:53:05 +01:00
_def_xanim='#undef USE_XANIM'
_def_xanim_path='#undef XACODEC_PATH'
2002-03-12 08:16:29 +01:00
_nocodecmodules="xanim $_nocodecmodules"
2001-11-14 20:02:39 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_xanim"
2001-11-14 20:02:39 +01:00
2006-11-01 21:31:18 +01:00
2006-11-06 17:23:04 +01:00
echocheck "RealPlayer codecs"
2002-06-09 03:19:48 +02:00
if test "$_real" = auto ; then
_real=no
2005-09-12 12:05:06 +02:00
_res_comment="dynamic loader support needed"
2007-03-18 21:15:57 +01:00
if test "$_dl" = yes || test "$_win32dll" = yes &&
2008-03-27 03:04:03 +01:00
(linux || freebsd || netbsd || dragonfly || darwin || win32) ; then
2006-11-01 21:31:18 +01:00
_real=yes
2002-06-09 03:19:48 +02:00
fi
fi
if test "$_real" = yes ; then
2006-12-02 21:54:51 +01:00
test -z "$_realcodecsdir" && _realcodecsdir="$_codecsdir"
2002-06-09 03:19:48 +02:00
_def_real='#define USE_REALCODECS 1'
2006-10-31 15:47:34 +01:00
_def_real_path="#define REALCODEC_PATH \"$_realcodecsdir\""
2002-06-09 03:19:48 +02:00
_codecmodules="real $_codecmodules"
2006-10-31 15:47:34 +01:00
_res_comment="using $_realcodecsdir"
2002-06-09 03:19:48 +02:00
else
_def_real='#undef USE_REALCODECS'
2002-06-13 02:14:28 +02:00
_def_real_path="#undef REALCODEC_PATH"
2002-06-09 03:19:48 +02:00
_nocodecmodules="real $_nocodecmodules"
fi
2005-09-12 12:05:06 +02:00
echores "$_real"
2002-06-09 03:19:48 +02:00
2001-10-13 18:53:37 +02:00
2007-07-14 16:53:30 +02:00
echocheck "QuickTime codecs"
2008-03-03 18:51:36 +01:00
_qtx_emulation=no
2008-04-26 12:53:32 +02:00
_def_qtx_win32='#undef USE_QTX_CODECS_WIN32'
2007-07-14 16:53:30 +02:00
if test "$_qtx" = auto ; then
test "$_win32dll" = yes || darwin && _qtx=yes
fi
if test "$_qtx" = yes ; then
_def_qtx='#define USE_QTX_CODECS 1'
2008-04-26 12:53:32 +02:00
win32 && _qtx_codecs_win32=yes && _def_qtx_win32='#define USE_QTX_CODECS_WIN32 1'
2007-07-14 16:53:30 +02:00
_codecmodules="qtx $_codecmodules"
2008-03-10 09:16:55 +01:00
darwin || win32 || _qtx_emulation=yes
2007-07-14 16:53:30 +02:00
else
_def_qtx='#undef USE_QTX_CODECS'
_nocodecmodules="qtx $_nocodecmodules"
fi
echores "$_qtx"
2007-09-19 23:38:22 +02:00
echocheck "Nemesi Streaming Media libraries"
if test "$_nemesi" = auto && test "$_network" = yes ; then
_nemesi=no
2007-10-29 19:31:47 +01:00
if $_pkg_config libnemesi --atleast-version=0.6.3 ; then
2008-06-13 10:28:03 +02:00
_inc_extra="$_inc_extra `$_pkg_config --cflags libnemesi`"
2007-09-19 23:38:22 +02:00
_ld_extra="$_ld_extra `$_pkg_config --libs libnemesi`"
_nemesi=yes
fi
fi
if test "$_nemesi" = yes; then
_native_rtsp=no
_def_nemesi='#define LIBNEMESI 1'
_inputmodules="nemesi $_inputmodules"
else
2007-09-22 18:14:20 +02:00
_native_rtsp="$_network"
_nemesi=no
2007-09-19 23:38:22 +02:00
_def_nemesi='#undef LIBNEMESI'
_noinputmodules="nemesi $_noinputmodules"
fi
2007-09-22 18:14:20 +02:00
echores "$_nemesi"
2007-07-14 16:53:30 +02:00
2005-09-24 00:35:04 +02:00
echocheck "LIVE555 Streaming Media libraries"
2003-05-17 14:24:01 +02:00
if test "$_live" = auto && test "$_network" = yes ; then
2005-10-18 23:30:43 +02:00
cat > $TMPCPP << EOF
2004-08-09 10:21:42 +02:00
#include <liveMedia.hh>
2007-03-03 08:58:36 +01:00
#if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
#error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
2004-08-09 10:21:42 +02:00
#endif
int main(void) {}
EOF
2004-11-20 15:46:22 +01:00
2005-10-03 21:36:32 +02:00
_live=no
2006-11-21 17:13:11 +01:00
for I in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
2006-11-21 17:46:31 +01:00
cxx_check $I/liveMedia/include $I/UsageEnvironment/include \
$I/groupsock/include && _livelibdir=`echo $I| sed s/-I//` && \
2007-02-27 18:16:44 +01:00
_ld_extra="$_livelibdir/liveMedia/libliveMedia.a \
2007-02-13 16:37:38 +01:00
$_livelibdir/groupsock/libgroupsock.a \
$_livelibdir/UsageEnvironment/libUsageEnvironment.a \
$_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
2007-02-27 18:16:44 +01:00
$_ld_extra -lstdc++" \
2007-03-15 19:07:12 +01:00
_inc_extraxx="-I$_livelibdir/liveMedia/include \
2007-02-13 16:37:38 +01:00
-I$_livelibdir/UsageEnvironment/include \
-I$_livelibdir/BasicUsageEnvironment/include \
-I$_livelibdir/groupsock/include" && \
2006-11-21 17:46:31 +01:00
_live=yes && break
2005-10-03 21:36:32 +02:00
done
if test "$_live" != yes ; then
2005-10-18 23:30:43 +02:00
if cxx_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock; then
2004-11-20 15:46:22 +01:00
_live_dist=yes
fi
fi
2002-08-05 02:39:07 +02:00
fi
2007-12-04 16:13:50 +01:00
if test "$_live" = yes && test "$_network" = yes; then
2006-04-24 23:50:06 +02:00
_res_comment="using $_livelibdir"
2005-09-24 00:35:04 +02:00
_def_live='#define STREAMING_LIVE555 1'
_inputmodules="live555 $_inputmodules"
2007-12-04 16:13:50 +01:00
elif test "$_live_dist" = yes && test "$_network" = yes; then
2006-04-24 23:50:06 +02:00
_res_comment="using distribution version"
2004-11-20 15:46:22 +01:00
_live="yes"
2005-09-24 00:35:04 +02:00
_def_live='#define STREAMING_LIVE555 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
2007-03-18 22:21:38 +01:00
_inc_extraxx="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
2006-08-01 09:34:32 +02:00
-I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
2005-09-24 00:35:04 +02:00
_inputmodules="live555 $_inputmodules"
2002-08-05 02:39:07 +02:00
else
2007-09-22 18:14:20 +02:00
_live=no
2005-09-24 00:35:04 +02:00
_def_live='#undef STREAMING_LIVE555'
_noinputmodules="live555 $_noinputmodules"
2002-08-05 02:39:07 +02:00
fi
2006-04-04 07:09:12 +02:00
echores "$_live"
2002-08-05 02:39:07 +02:00
2007-04-26 13:37:24 +02:00
echocheck "FFmpeg libavutil"
2007-04-26 13:19:29 +02:00
if test "$_libavutil_a" = auto ; then
2006-04-22 19:31:10 +02:00
if test -d libavutil ; then
2007-04-26 13:19:29 +02:00
_libavutil_a=yes
2007-04-26 13:37:24 +02:00
_res_comment="static"
2006-04-22 19:31:10 +02:00
else
2007-03-24 20:29:55 +01:00
die "MPlayer will not compile without libavutil in the source tree."
2006-04-22 19:31:10 +02:00
fi
2007-04-26 13:53:38 +02:00
elif test "$_libavutil_so" = auto ; then
2007-04-26 13:37:24 +02:00
_libavutil_so=no
cat > $TMPC << EOF
2008-02-25 16:46:36 +01:00
#include <libavutil/common.h>
2007-04-26 13:37:24 +02:00
int main(void) { ff_gcd(1,1); return 0; }
EOF
if $_pkg_config --exists libavutil ; then
_inc_libavutil=`$_pkg_config --cflags libavutil`
_ld_tmp=`$_pkg_config --libs libavutil`
cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
&& _libavutil_so=yes
elif cc_check -lavutil $_ld_lm ; then
_ld_extra="$_ld_extra -lavutil"
_libavutil_so=yes
_res_comment="using libavutil.so, but static libavutil is recommended"
fi
2005-08-01 22:16:56 +02:00
fi
2007-04-26 13:37:24 +02:00
_libavutil=no
2007-04-26 14:39:09 +02:00
_def_libavutil='#undef USE_LIBAVUTIL'
2007-04-26 15:20:18 +02:00
_def_libavutil_a='#undef USE_LIBAVUTIL_A'
2007-04-26 14:39:09 +02:00
_def_libavutil_so='#undef USE_LIBAVUTIL_SO'
2007-04-26 13:37:24 +02:00
test "$_libavutil_a" = yes || test "$_libavutil_so" = yes && _libavutil=yes
2007-04-26 15:20:18 +02:00
test "$_libavutil" = yes && _def_libavutil='#define USE_LIBAVUTIL 1'
2007-04-26 22:56:54 +02:00
test "$_libavutil_a" = yes && _def_libavutil_a='#define USE_LIBAVUTIL_A 1'
test "$_libavutil_so" = yes && _def_libavutil_so='#define USE_LIBAVUTIL_SO 1'
2007-04-26 13:37:24 +02:00
# neither static nor shared libavutil is available, but it is mandatory ...
if test "$_libavutil" = no ; then
die "You need static or shared libavutil, MPlayer will not compile without!"
fi
echores "$_libavutil"
2002-08-05 02:39:07 +02:00
2007-04-26 13:59:26 +02:00
echocheck "FFmpeg libavcodec"
2007-04-26 13:19:29 +02:00
if test "$_libavcodec_a" = auto ; then
2007-04-26 14:30:34 +02:00
_libavcodec_a=no
2001-12-30 05:03:27 +01:00
if test -d libavcodec && test -f libavcodec/utils.c ; then
2007-04-26 14:35:32 +02:00
_libavcodec_a="yes"
_res_comment="static"
2001-12-29 01:40:04 +01:00
fi
2007-04-26 13:59:26 +02:00
elif test "$_libavcodec_so" = auto ; then
_libavcodec_so=no
_res_comment="libavcodec.so is discouraged over static libavcodec"
cat > $TMPC << EOF
2008-02-25 16:46:36 +01:00
#include <libavcodec/avcodec.h>
2007-04-26 14:26:52 +02:00
int main(void) { avcodec_find_encoder_by_name(""); return 0; }
2007-04-26 13:59:26 +02:00
EOF
if $_pkg_config --exists libavcodec ; then
_inc_libavcodec=`$_pkg_config --cflags libavcodec`
_ld_tmp=`$_pkg_config --libs libavcodec`
cc_check $_inc_libavcodec $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
&& _libavcodec_so=yes
elif cc_check -lavcodec $_ld_lm ; then
_ld_extra="$_ld_extra -lavcodec"
_libavcodec_so=yes
_res_comment="using libavcodec.so, but static libavcodec is recommended"
fi
2001-02-24 21:28:24 +01:00
fi
2007-04-26 13:59:26 +02:00
_libavcodec=no
2007-04-26 14:53:26 +02:00
_def_libavcodec='#undef USE_LIBAVCODEC'
2007-04-26 15:20:18 +02:00
_def_libavcodec_a='#undef USE_LIBAVCODEC_A'
2007-04-26 14:53:26 +02:00
_def_libavcodec_so='#undef USE_LIBAVCODEC_SO'
2007-04-26 13:59:26 +02:00
test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes
2007-04-26 15:11:22 +02:00
test "$_libavcodec" = yes && _def_libavcodec='#define USE_LIBAVCODEC 1'
2007-04-26 22:56:54 +02:00
test "$_libavcodec_a" = yes && _def_libavcodec_a='#define USE_LIBAVCODEC_A 1'
test "$_libavcodec_so" = yes && _def_libavcodec_so='#define USE_LIBAVCODEC_SO 1'
2007-04-26 14:53:26 +02:00
test "$_libavcodec_mpegaudio_hp" = yes \
&& _def_libavcodec_mpegaudio_hp='#define CONFIG_MPEGAUDIO_HP 1'
if test "$_libavcodec_a" = yes ; then
_codecmodules="libavcodec $_codecmodules"
elif test "$_libavcodec_so" = yes ; then
_codecmodules="libavcodec.so $_codecmodules"
else
_nocodecmodules="libavcodec $_nocodecmodules"
fi
2007-04-26 13:59:26 +02:00
echores "$_libavcodec"
2001-12-30 00:34:53 +01:00
2007-04-26 14:20:36 +02:00
echocheck "FFmpeg libavformat"
2007-04-26 13:19:29 +02:00
if test "$_libavformat_a" = auto ; then
_libavformat_a=no
2004-04-11 16:26:04 +02:00
if test -d libavformat && test -f libavformat/utils.c ; then
2007-04-26 13:19:29 +02:00
_libavformat_a=yes
2007-04-26 14:20:36 +02:00
_res_comment="static"
2004-04-11 16:26:04 +02:00
fi
2007-04-26 14:20:36 +02:00
elif test "$_libavformat_so" = auto ; then
2006-01-09 20:35:44 +01:00
_libavformat_so=no
cat > $TMPC <<EOF
2008-02-25 16:46:36 +01:00
#include <libavformat/avformat.h>
#include <libavcodec/opt.h>
2006-01-09 20:35:44 +01:00
int main(void) { av_alloc_format_context(); return 0; }
EOF
2006-10-31 10:25:40 +01:00
if $_pkg_config --exists libavformat ; then
_inc_libavformat=`$_pkg_config --cflags libavformat`
2006-11-21 13:49:46 +01:00
_ld_tmp=`$_pkg_config --libs libavformat`
cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
2007-04-26 14:20:36 +02:00
&& _libavformat_so=yes
2006-01-30 21:58:11 +01:00
elif cc_check $_ld_lm -lavformat ; then
2006-11-21 13:49:46 +01:00
_ld_extra="$_ld_extra -lavformat"
_libavformat_so=yes
2006-01-30 21:58:11 +01:00
_res_comment="using libavformat.so, but static libavformat is recommended"
fi
2006-01-09 20:35:44 +01:00
fi
2007-04-26 14:20:36 +02:00
_libavformat=no
2007-04-26 14:58:46 +02:00
_def_libavformat='#undef USE_LIBAVFORMAT'
2007-04-26 15:20:18 +02:00
_def_libavformat_a='#undef USE_LIBAVFORMAT_A'
2007-04-26 14:58:46 +02:00
_def_libavformat_so='#undef USE_LIBAVFORMAT_SO'
2007-04-26 14:20:36 +02:00
test "$_libavformat_a" = yes || test "$_libavformat_so" = yes && _libavformat=yes
2007-04-26 15:20:18 +02:00
test "$_libavformat" = yes && _def_libavformat='#define USE_LIBAVFORMAT 1'
2007-04-26 22:56:54 +02:00
test "$_libavformat_a" = yes && _def_libavformat_a='#define USE_LIBAVFORMAT_A 1'
2007-04-26 14:58:46 +02:00
test "$_libavformat_so" = yes \
&& _def_libavformat_so='#define USE_LIBAVFORMAT_SO 1'
2007-04-26 14:20:36 +02:00
echores "$_libavformat"
2007-04-26 14:25:27 +02:00
echocheck "FFmpeg libpostproc"
2007-04-26 14:20:36 +02:00
if test "$_libpostproc_a" = auto ; then
2007-04-26 14:26:52 +02:00
_libpostproc_a=no
if test -d libpostproc && test -f libpostproc/postprocess.h ; then
_libpostproc_a='yes'
_res_comment="static"
fi
2007-04-26 14:25:27 +02:00
elif test "$_libpostproc_so" = auto ; then
2006-01-22 19:11:35 +01:00
_libpostproc_so=no
cat > $TMPC << EOF
#define USE_LIBPOSTPROC 1
#include <inttypes.h>
2008-02-25 16:46:36 +01:00
#include <libpostproc/postprocess.h>
2007-04-26 14:26:52 +02:00
int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
2006-01-22 19:11:35 +01:00
EOF
if cc_check -lpostproc $_ld_lm ; then
2006-11-21 13:49:46 +01:00
_ld_extra="$_ld_extra -lpostproc"
2006-01-22 19:11:35 +01:00
_libpostproc_so=yes
_res_comment="using libpostproc.so, but static libpostproc is recommended"
fi
fi
2007-04-26 14:25:27 +02:00
_libpostproc=no
2007-04-26 15:01:54 +02:00
_def_libpostproc='#undef USE_LIBPOSTPROC'
2007-04-26 15:20:18 +02:00
_def_libpostproc_a='#undef USE_LIBPOSTPROC_A'
2007-04-26 15:01:54 +02:00
_def_libpostproc_so='#undef USE_LIBPOSTPROC_SO'
2007-04-26 14:25:27 +02:00
test "$_libpostproc_a" = yes || test "$_libpostproc_so" = yes && _libpostproc=yes
2007-04-26 15:20:18 +02:00
test "$_libpostproc" = yes && _def_libpostproc='#define USE_LIBPOSTPROC 1'
2007-04-26 22:44:02 +02:00
test "$_libpostproc_a" = yes && _def_libpostproc_a='#define USE_LIBPOSTPROC_A 1'
2007-04-26 15:01:54 +02:00
test "$_libpostproc_so" = yes \
&& _def_libpostproc_so='#define USE_LIBPOSTPROC_SO 1'
2007-04-26 14:25:27 +02:00
echores "$_libpostproc"
2006-01-22 19:11:35 +01:00
2007-05-03 14:10:22 +02:00
echocheck "libamr narrowband"
2007-05-03 14:04:29 +02:00
if test "$_libamr_nb" = auto ; then
_libamr_nb=no
2007-04-15 13:33:02 +02:00
cat > $TMPC << EOF
#include <amrnb/interf_dec.h>
int main(void) { Speech_Decode_Frame_init(); return 0; }
EOF
2007-05-03 14:04:29 +02:00
cc_check -lamrnb && _libamr_nb=yes
2007-04-26 13:19:29 +02:00
if test "$_libavcodec_a" != yes ; then
2007-05-03 14:04:29 +02:00
_libamr_nb=no
2007-05-03 14:10:22 +02:00
_res_comment="libavcodec (static) is required by libamr_nb, sorry"
2004-12-30 00:23:46 +01:00
fi
fi
2007-05-03 14:04:29 +02:00
if test "$_libamr_nb" = yes ; then
_libamr=yes
2007-04-15 13:33:02 +02:00
_ld_extra="$_ld_extra -lamrnb"
2007-05-03 14:07:13 +02:00
_def_libamr='#define CONFIG_LIBAMR 1'
_def_libamr_nb='#define CONFIG_LIBAMR_NB 1'
2008-05-03 17:40:12 +02:00
_libavdecoders="$_libavdecoders LIBAMR_NB_DECODER"
_libavencoders="$_libavencoders LIBAMR_NB_ENCODER"
2007-05-03 14:11:21 +02:00
_codecmodules="libamr_nb $_codecmodules"
2004-12-30 00:23:46 +01:00
else
2007-05-03 14:07:13 +02:00
_def_libamr_nb='#undef CONFIG_LIBAMR_NB'
2007-05-03 14:11:21 +02:00
_nocodecmodules="libamr_nb $_nocodecmodules"
2004-12-30 00:23:46 +01:00
fi
2007-05-03 14:04:29 +02:00
echores "$_libamr_nb"
2004-12-30 00:23:46 +01:00
2007-05-03 14:10:22 +02:00
echocheck "libamr wideband"
2007-05-03 14:04:29 +02:00
if test "$_libamr_wb" = auto ; then
_libamr_wb=no
2007-04-15 13:33:02 +02:00
cat > $TMPC << EOF
#include <amrwb/dec_if.h>
int main(void) { D_IF_init(); return 0; }
EOF
2007-05-03 14:04:29 +02:00
cc_check -lamrwb && _libamr_wb=yes
2007-04-26 13:19:29 +02:00
if test "$_libavcodec_a" != yes ; then
2007-05-03 14:04:29 +02:00
_libamr_wb=no
2007-05-03 14:10:22 +02:00
_res_comment="libavcodec (static) is required by libamr_wb, sorry"
2004-12-30 00:23:46 +01:00
fi
fi
2007-05-03 14:04:29 +02:00
if test "$_libamr_wb" = yes ; then
_libamr=yes
2007-04-15 13:33:02 +02:00
_ld_extra="$_ld_extra -lamrwb"
2007-05-03 14:07:13 +02:00
_def_libamr='#define CONFIG_LIBAMR 1'
_def_libamr_wb='#define CONFIG_LIBAMR_WB 1'
2008-05-03 17:40:12 +02:00
_libavdecoders="$_libavdecoders LIBAMR_WB_DECODER"
_libavencoders="$_libavencoders LIBAMR_WB_ENCODER"
2007-05-03 14:10:22 +02:00
_codecmodules="libamr_wb $_codecmodules"
2004-12-30 00:23:46 +01:00
else
2007-05-03 14:07:13 +02:00
_def_libamr_wb='#undef CONFIG_LIBAMR_WB'
2007-08-15 11:02:38 +02:00
_nocodecmodules="libamr_wb $_nocodecmodules"
2004-12-30 00:23:46 +01:00
fi
2007-05-03 14:04:29 +02:00
echores "$_libamr_wb"
2004-12-30 00:23:46 +01:00
2002-10-04 21:22:29 +02:00
echocheck "libdv-0.9.5+"
2002-04-13 18:51:01 +02:00
if test "$_libdv" = auto ; then
_libdv=no
cat > $TMPC <<EOF
#include <libdv/dv.h>
int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
EOF
2006-10-16 11:25:23 +02:00
cc_check -ldv $_ld_pthread $_ld_lm && _libdv=yes
2002-04-13 18:51:01 +02:00
fi
if test "$_libdv" = yes ; then
_def_libdv='#define HAVE_LIBDV095 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -ldv"
2002-10-23 21:19:23 +02:00
_codecmodules="libdv $_codecmodules"
2002-04-13 18:51:01 +02:00
else
_def_libdv='#undef HAVE_LIBDV095'
2002-10-23 21:19:23 +02:00
_nocodecmodules="libdv $_nocodecmodules"
2002-04-13 18:51:01 +02:00
fi
echores "$_libdv"
2002-02-12 23:03:44 +01:00
2006-11-08 19:36:46 +01:00
2008-05-31 18:38:02 +02:00
echocheck "Xvid"
2006-11-08 19:46:03 +01:00
if test "$_xvid" = auto ; then
_xvid=no
2006-11-08 19:35:32 +01:00
cat > $TMPC << EOF
2003-11-12 01:43:42 +01:00
#include <xvid.h>
int main(void) { xvid_global(0, 0, 0, 0); return 0; }
EOF
2006-11-20 17:51:09 +01:00
for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
cc_check $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" && _xvid=yes && break
2006-11-08 19:35:32 +01:00
done
fi
2008-05-03 22:14:50 +02:00
2006-11-08 19:46:03 +01:00
if test "$_xvid" = yes ; then
_def_xvid='#define HAVE_XVID4 1'
_codecmodules="xvid $_codecmodules"
2006-11-08 19:36:46 +01:00
else
2006-11-08 19:46:03 +01:00
_def_xvid='#undef HAVE_XVID4'
_nocodecmodules="xvid $_nocodecmodules"
2006-11-08 19:36:46 +01:00
fi
2006-11-08 19:46:03 +01:00
echores "$_xvid"
2002-07-10 22:56:57 +02:00
2008-05-31 18:38:02 +02:00
echocheck "Xvid two pass plugin"
2008-05-09 00:50:17 +02:00
if test "$_xvid" = yes && test "$_xvid_lavc" = auto ; then
2006-03-21 06:36:10 +01:00
cat > $TMPC << EOF
#include <xvid.h>
int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
EOF
2008-05-09 00:50:17 +02:00
cc_check && _xvid_lavc=yes
fi
2008-05-09 02:02:27 +02:00
if test "$_xvid_lavc" = yes ; then
_def_xvid_lavc='#define CONFIG_LIBXVID 1'
_libavencoders="$_libavencoders LIBXVID_ENCODER"
else
_xvid_lavc=no
_def_xvid_lavc='#undef CONFIG_LIBXVID'
fi
echores "$_xvid_lavc"
2006-03-21 06:36:10 +01:00
2002-07-10 22:56:57 +02:00
2004-08-27 22:43:05 +02:00
echocheck "x264"
2006-08-18 18:04:16 +02:00
if test "$_x264" = auto ; then
cat > $TMPC << EOF
2005-03-06 15:43:41 +01:00
#include <inttypes.h>
2004-08-27 22:43:05 +02:00
#include <x264.h>
2008-06-09 10:09:02 +02:00
#if X264_BUILD < 59
2005-02-18 04:55:27 +01:00
#error We do not support old versions of x264. Get the latest from SVN.
#endif
2004-08-27 22:43:05 +02:00
int main(void) { x264_encoder_open((void*)0); return 0; }
EOF
2006-05-04 21:10:16 +02:00
_x264=no
2006-11-22 17:42:04 +01:00
for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
2006-11-21 17:15:39 +01:00
cc_check $_ld_x264 && _libs_mencoder="$_libs_mencoder $_ld_x264" && _x264=yes && break
2006-11-20 17:59:09 +01:00
done
2006-05-04 21:10:16 +02:00
fi
if test "$_x264" = yes ; then
2004-08-27 22:43:05 +02:00
_def_x264='#define HAVE_X264 1'
_codecmodules="x264 $_codecmodules"
2008-05-09 00:50:17 +02:00
test "$_x264_lavc" = auto && _x264_lavc=yes
if test "$_x264_lavc" = yes ; then
2008-05-08 23:50:31 +02:00
_def_x264_lavc='#define CONFIG_LIBX264 1'
2006-11-21 16:12:55 +01:00
_libs_mplayer="$_libs_mplayer $_ld_x264"
2008-05-03 17:40:12 +02:00
_libavencoders="$_libavencoders LIBX264_ENCODER"
2008-05-09 00:50:17 +02:00
fi
2004-08-27 22:43:05 +02:00
else
2008-05-09 00:50:17 +02:00
_x264_lavc=no
2004-08-27 22:43:05 +02:00
_def_x264='#undef HAVE_X264'
2008-05-08 23:50:31 +02:00
_def_x264_lavc='#undef CONFIG_LIBX264'
2004-08-27 22:43:05 +02:00
_nocodecmodules="x264 $_nocodecmodules"
fi
2008-05-09 00:50:17 +02:00
_res_comment="in libavcodec: $_x264_lavc"
2008-05-08 01:26:16 +02:00
echores "$_x264"
2003-02-06 21:24:14 +01:00
2006-07-14 19:14:16 +02:00
2007-07-13 19:08:37 +02:00
echocheck "libnut"
if test "$_libnut" = auto ; then
2006-09-17 11:32:28 +02:00
cat > $TMPC << EOF
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
2006-11-14 07:01:54 +01:00
#include <libnut.h>
2006-09-17 11:32:28 +02:00
int main(void) { (void)nut_error(0); return 0; }
EOF
2007-07-13 19:08:37 +02:00
_libnut=no
cc_check -lnut && _libnut=yes
2006-09-17 11:32:28 +02:00
fi
2007-07-13 19:08:37 +02:00
if test "$_libnut" = yes ; then
_def_libnut='#define HAVE_LIBNUT 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lnut"
2006-09-17 11:32:28 +02:00
else
2007-07-13 19:08:37 +02:00
_def_libnut='#undef HAVE_LIBNUT'
2006-09-17 11:32:28 +02:00
fi
2007-07-13 19:08:37 +02:00
echores "$_libnut"
2006-09-17 11:32:28 +02:00
2008-01-23 15:08:59 +01:00
#check must be done after libavcodec one
echocheck "zr"
if test "$_zr" = auto ; then
#36067's seem to identify themselves as 36057PQC's, so the line
#below should work for 36067's and 36057's.
if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc/pci > /dev/null 2>&1; then
_zr=yes
else
_zr=no
fi
fi
if test "$_zr" = yes ; then
if test "$_libavcodec_a" = yes ; then
_def_zr='#define HAVE_ZR 1'
_vosrc="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
_vomodules="zr zr2 $_vomodules"
else
_res_comment="libavcodec (static) is required by zr, sorry"
_novomodules="zr $_novomodules"
_def_zr='#undef HAVE_ZR'
fi
else
_def_zr='#undef HAVE_ZR'
_novomodules="zr zr2 $_novomodules"
fi
echores "$_zr"
2006-09-17 11:32:28 +02:00
2006-07-14 19:14:16 +02:00
# mencoder requires (optional) those libs: libmp3lame
2001-12-10 13:07:03 +01:00
if test "$_mencoder" != no ; then
2007-05-01 15:55:28 +02:00
echocheck "libmp3lame (for mencoder)"
_def_mp3lame_preset='#undef HAVE_MP3LAME_PRESET'
_def_mp3lame_preset_medium='#undef HAVE_MP3LAME_PRESET_MEDIUM'
2008-05-09 00:32:40 +02:00
if test "$_mp3lame" = auto ; then
2008-05-09 02:02:27 +02:00
_mp3lame=no
cat > $TMPC <<EOF
2001-12-06 23:26:41 +01:00
#include <lame/lame.h>
2008-05-03 22:03:36 +02:00
int main(void) { lame_version_t lv; (void) lame_init();
get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor);
return 0; }
2001-12-06 23:26:41 +01:00
EOF
2008-05-09 02:02:27 +02:00
cc_check -lmp3lame $_ld_lm && tmp_run && _mp3lame=yes
2008-05-09 00:32:40 +02:00
fi
2007-05-01 15:55:28 +02:00
if test "$_mp3lame" = yes ; then
_def_mp3lame="#define HAVE_MP3LAME"
_ld_mp3lame=-lmp3lame
_libs_mencoder="$_libs_mencoder $_ld_mp3lame"
cat > $TMPC << EOF
2005-10-18 23:40:17 +02:00
#include <lame/lame.h>
2006-11-15 21:51:27 +01:00
int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
2005-10-18 23:40:17 +02:00
EOF
2007-05-01 15:55:28 +02:00
cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset="#define HAVE_MP3LAME_PRESET"
cat > $TMPC << EOF
2005-10-18 23:40:17 +02:00
#include <lame/lame.h>
2006-11-15 21:51:27 +01:00
int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
2005-10-18 23:40:17 +02:00
EOF
2007-05-01 15:55:28 +02:00
cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define HAVE_MP3LAME_PRESET_MEDIUM"
2008-05-09 00:50:17 +02:00
test "$_mp3lame_lavc" = auto && _mp3lame_lavc=yes
if test "$_mp3lame_lavc" = yes ; then
2008-05-08 23:50:31 +02:00
_def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1"
2008-05-03 17:40:12 +02:00
_libavencoders="$_libavencoders LIBMP3LAME_ENCODER"
2007-05-01 15:55:28 +02:00
_libs_mplayer="$_libs_mplayer $_ld_mp3lame"
2001-12-10 13:07:03 +01:00
fi
2007-05-01 15:55:28 +02:00
else
2008-05-09 00:50:17 +02:00
_mp3lame_lavc=no
2007-05-01 15:55:28 +02:00
_def_mp3lame='#undef HAVE_MP3LAME'
2008-05-09 00:50:17 +02:00
_def_mp3lame_lavc="#undef CONFIG_LIBMP3LAME"
2007-05-01 15:55:28 +02:00
fi
2008-05-09 00:50:17 +02:00
_res_comment="in libavcodec: $_mp3lame_lavc"
2007-05-01 15:55:28 +02:00
echores "$_mp3lame"
2001-12-06 23:26:41 +01:00
2001-08-14 14:30:56 +02:00
fi
2001-12-10 13:07:03 +01:00
2002-01-15 18:03:19 +01:00
echocheck "mencoder"
_mencoder_flag='#undef HAVE_MENCODER'
if test "$_mencoder" = yes ; then
_mencoder_flag='#define HAVE_MENCODER'
2006-07-08 19:09:35 +02:00
_def_muxers='#define CONFIG_MUXERS 1'
2006-07-09 17:38:44 +02:00
else
2007-07-11 03:49:43 +02:00
# mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
_libavencoders="MPEG1VIDEO_ENCODER SNOW_ENCODER"
2006-07-12 13:43:50 +02:00
_libavmuxers=""
2002-01-15 18:03:19 +01:00
fi
echores "$_mencoder"
2001-08-14 14:30:56 +02:00
2001-11-17 04:53:05 +01:00
echocheck "fastmemcpy"
2001-11-18 18:45:23 +01:00
# fastmemcpy check is done earlier with tests of CPU & binutils features
2001-11-17 04:53:05 +01:00
if test "$_fastmemcpy" = yes ; then
_def_fastmemcpy='#define USE_FASTMEMCPY 1'
2001-02-24 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
_def_fastmemcpy='#undef USE_FASTMEMCPY'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_fastmemcpy"
2001-02-24 21:28:24 +01:00
2007-12-14 09:16:39 +01:00
echocheck "UnRAR executable"
if test "$_unrar_exec" = auto ; then
_unrar_exec="yes"
mingw32 && _unrar_exec="no"
fi
if test "$_unrar_exec" = yes ; then
_def_unrar_exec='#define USE_UNRAR_EXEC 1'
else
_def_unrar_exec='#undef USE_UNRAR_EXEC'
fi
echores "$_unrar_exec"
2001-11-17 04:53:05 +01:00
echocheck "TV interface"
if test "$_tv" = yes ; then
_def_tv='#define USE_TV 1'
2001-12-01 15:41:54 +01:00
_inputmodules="tv $_inputmodules"
2001-02-24 21:28:24 +01:00
else
2002-03-12 08:16:29 +01:00
_noinputmodules="tv $_noinputmodules"
2001-11-17 04:53:05 +01:00
_def_tv='#undef USE_TV'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_tv"
2001-02-24 21:28:24 +01:00
2006-06-18 13:21:23 +02:00
2008-03-27 12:18:09 +01:00
if freebsd || netbsd || openbsd || dragonfly || bsdos ; then
2007-08-01 11:32:37 +02:00
echocheck "*BSD BT848 bt8xx header"
_ioctl_bt848_h=no
for file in "machine/ioctl_bt848.h" \
2007-04-09 15:18:06 +02:00
"dev/bktr/ioctl_bt848.h" \
"dev/video/bktr/ioctl_bt848.h" \
"dev/ic/bt8xx.h" ; do
cat > $TMPC <<EOF
#include <sys/types.h>
2007-11-02 00:33:51 +01:00
#include <sys/ioctl.h>
2007-04-09 15:18:06 +02:00
#include <$file>
2008-05-03 22:03:36 +02:00
int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
2007-04-09 15:18:06 +02:00
EOF
if cc_check ; then
_ioctl_bt848_h=yes
_ioctl_bt848_h_name="$file"
break;
fi
2007-08-01 11:32:37 +02:00
done
if test "$_ioctl_bt848_h" = yes ; then
_def_ioctl_bt848_h_name="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
_res_comment="using $_ioctl_bt848_h_name"
else
_def_ioctl_bt848_h_name="#undef IOCTL_BT848_H_NAME"
fi
echores "$_ioctl_bt848_h"
2007-04-09 15:18:06 +02:00
2007-08-01 11:32:37 +02:00
echocheck "*BSD ioctl_meteor.h"
_ioctl_meteor_h=no
for file in "machine/ioctl_meteor.h" \
2007-04-09 15:18:06 +02:00
"dev/bktr/ioctl_meteor.h" \
"dev/video/bktr/ioctl_meteor.h" ; do
cat > $TMPC <<EOF
#include <sys/types.h>
#include <$file>
2008-05-03 22:03:36 +02:00
int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
2007-04-09 15:18:06 +02:00
EOF
if cc_check ; then
_ioctl_meteor_h=yes
_ioctl_meteor_h_name="$file"
break;
fi
2007-08-01 11:32:37 +02:00
done
if test "$_ioctl_meteor_h" = yes ; then
_def_ioctl_meteor_h_name="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
_res_comment="using $_ioctl_meteor_h_name"
else
_def_ioctl_meteor_h_name="#undef IOCTL_METEOR_H_NAME"
fi
echores "$_ioctl_meteor_h"
2007-04-09 15:18:06 +02:00
2007-08-01 11:32:37 +02:00
echocheck "*BSD BrookTree 848 TV interface"
if test "$_tv_bsdbt848" = auto ; then
_tv_bsdbt848=no
if test "$_tv" = yes ; then
cat > $TMPC <<EOF
2002-03-15 17:10:29 +01:00
#include <sys/types.h>
2007-04-09 15:18:06 +02:00
$_def_ioctl_meteor_h_name
$_def_ioctl_bt848_h_name
#ifdef IOCTL_METEOR_H_NAME
#include IOCTL_METEOR_H_NAME
2002-04-28 00:42:27 +02:00
#endif
2007-04-09 15:18:06 +02:00
#ifdef IOCTL_BT848_H_NAME
#include IOCTL_BT848_H_NAME
#endif
2008-05-03 22:03:36 +02:00
int main(void) {
2007-04-09 15:18:06 +02:00
ioctl(0, METEORSINPUT, 0);
ioctl(0, TVTUNER_GETFREQ, 0);
2008-05-03 22:14:50 +02:00
return 0;
2007-04-09 15:18:06 +02:00
}
2002-03-15 17:10:29 +01:00
EOF
2007-08-01 11:32:37 +02:00
cc_check && _tv_bsdbt848=yes
fi
fi
if test "$_tv_bsdbt848" = yes ; then
_def_tv_bsdbt848='#define HAVE_TV_BSDBT848 1'
_inputmodules="tv-bsdbt848 $_inputmodules"
else
_def_tv_bsdbt848='#undef HAVE_TV_BSDBT848'
_noinputmodules="tv-bsdbt848 $_noinputmodules"
fi
echores "$_tv_bsdbt848"
2008-03-27 12:18:09 +01:00
fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
2006-06-18 13:21:23 +02:00
2002-03-15 17:10:29 +01:00
2007-10-13 19:14:39 +02:00
echocheck "DirectShow TV interface"
if test "$_tv_dshow" = auto ; then
_tv_dshow=no
if test "$_tv" = yes && win32 ; then
cat > $TMPC <<EOF
#include <ole2.h>
2008-05-03 22:14:50 +02:00
int main(void) {
2007-10-13 19:14:39 +02:00
void* p;
CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
2008-05-03 22:14:50 +02:00
return 0;
2007-10-13 19:14:39 +02:00
}
EOF
cc_check -lole32 -luuid && _tv_dshow=yes
fi
fi
if test "$_tv_dshow" = yes ; then
_inputmodules="tv-dshow $_inputmodules"
_def_tv_dshow='#define HAVE_TV_DSHOW 1'
_ld_extra="$_ld_extra -lole32 -luuid"
else
_noinputmodules="tv-dshow $_noinputmodules"
_def_tv_dshow='#undef HAVE_TV_DSHOW'
fi
echores "$_tv_dshow"
2001-12-01 16:05:08 +01:00
echocheck "Video 4 Linux TV interface"
2006-07-27 11:30:39 +02:00
if test "$_tv_v4l1" = auto ; then
2007-08-01 11:32:37 +02:00
_tv_v4l1=no
if test "$_tv" = yes && linux ; then
cat > $TMPC <<EOF
2001-12-28 19:14:23 +01:00
#include <stdlib.h>
2001-12-01 16:05:08 +01:00
#include <linux/videodev.h>
int main(void) { return 0; }
EOF
2007-08-01 11:32:37 +02:00
cc_check && _tv_v4l1=yes
fi
2001-12-01 16:05:08 +01:00
fi
2006-07-27 11:30:39 +02:00
if test "$_tv_v4l1" = yes ; then
2007-04-22 22:43:28 +02:00
_audio_input=yes
2006-07-27 11:34:32 +02:00
_tv_v4l=yes
_def_tv_v4l='#define HAVE_TV_V4L 1'
2006-07-27 11:30:39 +02:00
_def_tv_v4l1='#define HAVE_TV_V4L1 1'
2001-12-01 16:05:08 +01:00
_inputmodules="tv-v4l $_inputmodules"
else
2006-07-27 11:30:39 +02:00
_noinputmodules="tv-v4l1 $_noinputmodules"
2001-12-01 16:05:08 +01:00
_def_tv_v4l='#undef HAVE_TV_V4L'
fi
2006-07-27 11:30:39 +02:00
echores "$_tv_v4l1"
2001-12-01 16:05:08 +01:00
2001-02-24 21:28:24 +01:00
2003-08-07 14:24:35 +02:00
echocheck "Video 4 Linux 2 TV interface"
if test "$_tv_v4l2" = auto ; then
2007-08-01 11:32:37 +02:00
_tv_v4l2=no
if test "$_tv" = yes && linux ; then
cat > $TMPC <<EOF
2005-09-10 20:38:23 +02:00
#include <stdlib.h>
#include <linux/types.h>
#include <linux/videodev2.h>
int main(void) { return 0; }
EOF
2007-08-01 11:32:37 +02:00
cc_check && _tv_v4l2=yes
fi
2003-08-07 14:24:35 +02:00
fi
if test "$_tv_v4l2" = yes ; then
2007-04-23 09:28:48 +02:00
_audio_input=yes
2006-07-27 11:34:32 +02:00
_tv_v4l=yes
_def_tv_v4l='#define HAVE_TV_V4L 1'
2003-08-07 14:24:35 +02:00
_def_tv_v4l2='#define HAVE_TV_V4L2 1'
_inputmodules="tv-v4l2 $_inputmodules"
else
_noinputmodules="tv-v4l2 $_noinputmodules"
2003-09-07 19:49:56 +02:00
_def_tv_v4l2='#undef HAVE_TV_V4L2'
2003-08-07 14:24:35 +02:00
fi
echores "$_tv_v4l2"
2007-07-29 19:55:28 +02:00
echocheck "TV teletext interface"
if test "$_tv_teletext" = auto ; then
_tv_teletext=no
2007-10-13 19:14:39 +02:00
if test "$_freetype" = yes && test "$_pthreads" = yes; then
if test "$_tv_v4l2" = yes || test "$_v4l" = yes || test "$_tv_dshow" = yes; then
2007-08-01 11:23:04 +02:00
_tv_teletext=yes
fi
fi
2007-07-29 19:55:28 +02:00
fi
if test "$_tv_teletext" = yes ; then
_def_tv_teletext='#define HAVE_TV_TELETEXT 1'
_inputmodules="tv-teletext $_inputmodules"
else
_noinputmodules="tv-teletext $_noinputmodules"
_def_tv_teletext='#undef HAVE_TV_TELETEXT'
fi
echores "$_tv_teletext"
2006-08-28 19:05:18 +02:00
echocheck "Radio interface"
if test "$_radio" = yes ; then
_def_radio='#define USE_RADIO 1'
_inputmodules="radio $_inputmodules"
if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
_radio_capture=no
fi
if test "$_radio_capture" = yes ; then
2007-04-22 22:43:28 +02:00
_audio_input=yes
2006-08-28 19:05:18 +02:00
_def_radio_capture="#define USE_RADIO_CAPTURE 1"
else
_def_radio_capture="#undef USE_RADIO_CAPTURE"
fi
else
_noinputmodules="radio $_noinputmodules"
_def_radio='#undef USE_RADIO'
_def_radio_capture="#undef USE_RADIO_CAPTURE"
_radio_capture=no
fi
echores "$_radio"
echocheck "Capture for Radio interface"
echores "$_radio_capture"
echocheck "Video 4 Linux 2 Radio interface"
if test "$_radio_v4l2" = auto ; then
2006-08-31 20:35:32 +02:00
_radio_v4l2=no
if test "$_radio" = yes && linux ; then
cat > $TMPC <<EOF
2006-08-28 19:05:18 +02:00
#include <stdlib.h>
#include <linux/types.h>
#include <linux/videodev2.h>
int main(void) { return 0; }
EOF
2006-08-31 20:35:32 +02:00
cc_check && _radio_v4l2=yes
fi
2006-08-28 19:05:18 +02:00
fi
if test "$_radio_v4l2" = yes ; then
_def_radio_v4l2='#define HAVE_RADIO_V4L2 1'
else
_def_radio_v4l2='#undef HAVE_RADIO_V4L2'
fi
echores "$_radio_v4l2"
echocheck "Video 4 Linux Radio interface"
if test "$_radio_v4l" = auto ; then
2006-08-31 20:35:32 +02:00
_radio_v4l=no
if test "$_radio" = yes && linux ; then
cat > $TMPC <<EOF
2006-08-28 19:05:18 +02:00
#include <stdlib.h>
#include <linux/videodev.h>
int main(void) { return 0; }
EOF
2006-08-31 20:35:32 +02:00
cc_check && _radio_v4l=yes
fi
2006-08-28 19:05:18 +02:00
fi
if test "$_radio_v4l" = yes ; then
_def_radio_v4l='#define HAVE_RADIO_V4L 1'
else
_def_radio_v4l='#undef HAVE_RADIO_V4L'
fi
echores "$_radio_v4l"
2008-03-27 12:18:09 +01:00
if freebsd || netbsd || openbsd || dragonfly || bsdos \
2008-03-27 02:56:37 +01:00
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto ; then
2007-04-11 07:39:09 +02:00
echocheck "*BSD BrookTree 848 Radio interface"
_radio_bsdbt848=no
2006-11-18 07:53:33 +01:00
cat > $TMPC <<EOF
#include <sys/types.h>
2007-04-11 07:39:09 +02:00
$_def_ioctl_bt848_h_name
#ifdef IOCTL_BT848_H_NAME
#include IOCTL_BT848_H_NAME
#endif
2008-05-03 22:03:36 +02:00
int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
2006-11-18 07:53:33 +01:00
EOF
2007-04-11 07:39:09 +02:00
cc_check && _radio_bsdbt848=yes
echores "$_radio_bsdbt848"
2008-03-27 12:18:09 +01:00
fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
2006-11-18 07:53:33 +01:00
2007-04-11 07:39:09 +02:00
if test "$_radio_bsdbt848" = yes ; then
_def_radio_bsdbt848='#define HAVE_RADIO_BSDBT848 1'
2006-11-18 07:53:33 +01:00
else
2007-04-11 07:39:09 +02:00
_def_radio_bsdbt848='#undef HAVE_RADIO_BSDBT848'
2006-11-18 07:53:33 +01:00
fi
if test "$_radio_v4l" = no && test "$_radio_v4l2" = no && \
2007-04-11 07:39:09 +02:00
test "$_radio_bsdbt848" = no && test "$_radio" = yes ; then
2006-11-18 07:53:33 +01:00
die "Radio driver requires BSD BT848, V4L or V4L2!"
2006-08-31 21:00:09 +02:00
fi
2006-08-28 19:05:18 +02:00
2006-09-27 22:26:38 +02:00
echocheck "Video 4 Linux 2 MPEG PVR interface"
2006-07-10 23:32:19 +02:00
if test "$_pvr" = auto ; then
_pvr=no
if test "$_tv_v4l2" = yes && linux ; then
cat > $TMPC <<EOF
#include <stdlib.h>
#include <inttypes.h>
#include <linux/types.h>
#include <linux/videodev2.h>
2006-09-27 22:26:38 +02:00
int main(void) { struct v4l2_ext_controls ext; return 0; }
2006-07-10 23:32:19 +02:00
EOF
cc_check && _pvr=yes
fi
fi
if test "$_pvr" = yes ; then
_def_pvr='#define HAVE_PVR 1'
_inputmodules="pvr $_inputmodules"
else
_noinputmodules="pvr $_noinputmodules"
_def_pvr='#undef HAVE_PVR'
fi
echores "$_pvr"
2002-04-27 03:25:32 +02:00
echocheck "audio select()"
2001-11-29 19:56:08 +01:00
if test "$_select" = no ; then
_def_select='#undef HAVE_AUDIO_SELECT'
elif test "$_select" = yes ; then
_def_select='#define HAVE_AUDIO_SELECT 1'
fi
echores "$_select"
2003-08-15 21:13:23 +02:00
echocheck "ftp"
2007-11-22 18:11:38 +01:00
if ! beos && test "$_ftp" = yes ; then
2003-08-15 21:13:23 +02:00
_def_ftp='#define HAVE_FTP 1'
_inputmodules="ftp $_inputmodules"
else
_noinputmodules="ftp $_noinputmodules"
_def_ftp='#undef HAVE_FTP'
fi
echores "$_ftp"
2005-02-27 05:25:12 +01:00
echocheck "vstream client"
if test "$_vstream" = auto ; then
_vstream=no
cat > $TMPC <<EOF
#include <vstream-client.h>
void vstream_error(const char *format, ... ) {}
int main(void) { vstream_start(); return 0; }
EOF
cc_check -lvstream-client && _vstream=yes
fi
if test "$_vstream" = yes ; then
_def_vstream='#define HAVE_VSTREAM 1'
_inputmodules="vstream $_inputmodules"
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -lvstream-client"
2005-02-27 05:25:12 +01:00
else
_noinputmodules="vstream $_noinputmodules"
_def_vstream='#undef HAVE_VSTREAM'
fi
echores "$_vstream"
2002-08-05 03:31:47 +02:00
# endian testing
echocheck "byte order"
if test "$_big_endian" = auto ; then
cat > $TMPC <<EOF
2004-10-31 19:19:28 +01:00
short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
(('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2008-05-03 22:03:36 +02:00
int main(void) { return (int)ascii_name; }
2002-08-05 03:31:47 +02:00
EOF
2008-05-03 22:14:50 +02:00
if cc_check ; then
if strings $TMPEXE | grep -l MPlayerBigEndian >/dev/null ; then
2002-08-05 03:31:47 +02:00
_big_endian=yes
else
_big_endian=no
fi
else
2006-11-05 01:02:48 +01:00
echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2002-08-05 03:31:47 +02:00
fi
fi
if test "$_big_endian" = yes ; then
2004-08-18 21:00:05 +02:00
_byte_order='big-endian'
2002-08-05 03:31:47 +02:00
_def_words_endian='#define WORDS_BIGENDIAN 1'
else
2004-08-18 21:00:05 +02:00
_byte_order='little-endian'
2002-08-05 03:31:47 +02:00
_def_words_endian='#undef WORDS_BIGENDIAN'
fi
echores "$_byte_order"
2001-02-24 21:28:24 +01:00
2002-11-15 00:49:05 +01:00
echocheck "OSD menu"
if test "$_menu" = yes ; then
_def_menu='#define HAVE_MENU 1'
2008-04-13 12:44:21 +02:00
test $_dvbin = "yes" && _menu_dvbin=yes
2002-11-15 00:49:05 +01:00
else
_def_menu='#undef HAVE_MENU'
2008-04-13 12:44:21 +02:00
_menu_dvbin=no
2002-11-15 00:49:05 +01:00
fi
echores "$_menu"
2006-06-18 13:21:23 +02:00
2002-12-05 01:05:57 +01:00
echocheck "Subtitles sorting"
if test "$_sortsub" = yes ; then
_def_sortsub='#define USE_SORTSUB 1'
else
_def_sortsub='#undef USE_SORTSUB'
fi
echores "$_sortsub"
2002-12-22 22:01:01 +01:00
echocheck "XMMS inputplugin support"
if test "$_xmms" = yes ; then
if ( xmms-config --version ) >/dev/null 2>&1 ; then
_xmmsplugindir=`xmms-config --input-plugin-dir`
_xmmslibdir=`xmms-config --exec-prefix`/lib
else
_xmmsplugindir=/usr/lib/xmms/Input
_xmmslibdir=/usr/lib
fi
_def_xmms='#define HAVE_XMMS 1'
2003-10-14 11:41:08 +02:00
if darwin ; then
2006-11-22 20:19:47 +01:00
_ld_extra="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
2003-10-14 11:41:08 +02:00
else
2006-11-22 20:19:47 +01:00
_ld_extra="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
2003-10-14 11:41:08 +02:00
fi
2002-12-22 22:01:01 +01:00
else
_def_xmms='#undef HAVE_XMMS'
fi
echores "$_xmms"
2003-03-26 12:35:13 +01:00
echocheck "inet6"
if test "$_inet6" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
2007-10-30 03:44:17 +01:00
#if !defined(_WIN32) || defined(__CYGWIN__)
2003-03-26 12:35:13 +01:00
#include <sys/socket.h>
2006-10-22 16:51:17 +02:00
#include <netinet/in.h>
2007-10-30 03:44:17 +01:00
#else
#include <ws2tcpip.h>
#endif
2006-10-22 16:51:17 +02:00
int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
2003-03-26 12:35:13 +01:00
EOF
_inet6=no
2007-10-30 03:44:17 +01:00
if cc_check $_ld_sock ; then
2003-03-26 12:35:13 +01:00
_inet6=yes
fi
fi
if test "$_inet6" = yes ; then
_def_inet6='#define HAVE_AF_INET6 1'
else
_def_inet6='#undef HAVE_AF_INET6'
fi
echores "$_inet6"
echocheck "gethostbyname2"
if test "$_gethostbyname2" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main(void) { gethostbyname2("", AF_INET); }
EOF
_gethostbyname2=no
if cc_check ; then
_gethostbyname2=yes
fi
fi
2003-04-10 14:12:56 +02:00
if test "$_gethostbyname2" = yes ; then
2003-03-26 12:35:13 +01:00
_def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1'
else
_def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2'
fi
echores "$_gethostbyname2"
2006-07-13 05:05:08 +02:00
2001-11-17 04:53:05 +01:00
# --------------- GUI specific tests begin -------------------
echocheck "GUI"
echo "$_gui"
if test "$_gui" = yes ; then
2001-03-24 22:37:25 +01:00
2001-11-29 17:47:07 +01:00
# Required libraries
2007-06-13 13:04:01 +02:00
if test "$_libavcodec" != yes ||
2007-11-23 00:08:35 +01:00
! echo $_libavdecoders | grep PNG_DECODER >/dev/null 2>&1 ; then
2007-09-18 14:08:24 +02:00
die "The GUI requires libavcodec with PNG support (needs zlib)."
2007-06-13 13:04:01 +02:00
fi
2008-01-15 00:08:24 +01:00
test "$_freetype" = no && test "$_bitmap_font" = no && \
die "The GUI requires either FreeType or bitmap font support."
2007-11-23 00:08:35 +01:00
if ! win32 ; then
2008-04-11 12:51:36 +02:00
_gui_gtk=yes
2007-11-23 00:08:35 +01:00
test "$_x11" != yes && die "X11 support required for GUI compilation."
2001-11-29 17:47:07 +01:00
2001-11-17 04:53:05 +01:00
echocheck "XShape extension"
2006-07-13 05:05:08 +02:00
if test "$_xshape" = auto ; then
_xshape=no
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <stdlib.h>
int main(void) {
char *name = ":0.0";
Display *wsDisplay;
int exitvar = 0;
int eventbase, errorbase;
if (getenv("DISPLAY"))
name=getenv("DISPLAY");
wsDisplay=XOpenDisplay(name);
if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
exitvar=1;
XCloseDisplay(wsDisplay);
return exitvar;
}
EOF
2007-10-01 15:08:49 +02:00
cc_check -lXext && _xshape=yes
2001-11-17 04:53:05 +01:00
fi
if test "$_xshape" = yes ; then
_def_xshape='#define HAVE_XSHAPE 1'
else
2003-11-29 02:28:05 +01:00
die "The GUI requires the X11 extension XShape (which was not found)."
2001-11-17 04:53:05 +01:00
fi
echores "$_xshape"
2001-10-10 03:48:54 +02:00
2005-08-17 20:41:15 +02:00
#Check for GTK
if test "$_gtk1" = no ; then
#Check for GTK2 :
echocheck "GTK+ version"
2006-10-31 10:25:40 +01:00
if $_pkg_config gtk+-2.0 --exists ; then
_gtk=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
_inc_extra="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
2006-11-22 20:35:41 +01:00
_libs_mplayer="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
2005-08-17 20:41:15 +02:00
echores "$_gtk"
# Check for GLIB2
2006-10-31 10:25:40 +01:00
if $_pkg_config glib-2.0 --exists ; then
2005-08-17 20:41:15 +02:00
echocheck "glib version"
2006-10-31 10:25:40 +01:00
_glib=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
2006-11-22 20:35:41 +01:00
_libs_mplayer="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
2005-08-17 20:41:15 +02:00
echores "$_glib"
_def_gui='#define HAVE_NEW_GUI 1'
_def_gtk2_gui='#define HAVE_GTK2_GUI 1'
else
_gtk1=yes
echo "GLIB-2 devel packages were not found, trying GTK 1.2"
fi
else
echo "GTK-2 devel packages were not found, trying GTK 1.2"
_gtk1=yes
fi
fi
2001-06-21 17:16:52 +02:00
2005-08-17 20:41:15 +02:00
if test "$_gtk1" = yes ; then
# Check for old GTK (1.2.x)
2004-07-09 17:19:47 +02:00
echocheck "GTK version"
2001-11-17 04:53:05 +01:00
if test -z "$_gtkconfig" ; then
if ( gtk-config --version ) >/dev/null 2>&1 ; then
_gtkconfig="gtk-config"
elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
_gtkconfig="gtk12-config"
else
2003-11-29 02:28:05 +01:00
die "The GUI requires GTK devel packages (which were not found)."
2001-11-17 04:53:05 +01:00
fi
fi
_gtk=`$_gtkconfig --version 2>&1`
2006-07-27 19:43:21 +02:00
_inc_extra="$_inc_extra `$_gtkconfig --cflags 2>&1`"
2006-11-22 20:35:41 +01:00
_libs_mplayer="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
2001-12-30 20:17:10 +01:00
echores "$_gtk (using $_gtkconfig)"
2001-11-17 04:53:05 +01:00
# Check for GLIB
echocheck "glib version"
if test -z "$_glibconfig" ; then
if ( glib-config --version ) >/dev/null 2>&1 ; then
_glibconfig="glib-config"
elif ( glib12-config --version ) >/dev/null 2>&1 ; then
_glibconfig="glib12-config"
else
2006-07-13 05:05:08 +02:00
die "The GUI requires GLIB devel packages (which were not found)"
2001-11-17 04:53:05 +01:00
fi
fi
_glib=`$_glibconfig --version 2>&1`
2006-11-22 20:35:41 +01:00
_libs_mplayer="$_libs_mplayer `$_glibconfig --libs 2>&1`"
2001-12-30 20:17:10 +01:00
echores "$_glib (using $_glibconfig)"
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
_def_gui='#define HAVE_NEW_GUI 1'
2005-08-17 20:41:15 +02:00
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
fi
2001-02-24 21:28:24 +01:00
2007-11-22 18:11:38 +01:00
else #if ! win32
2008-04-11 09:28:32 +02:00
_gui_win32=yes
2006-11-21 14:18:56 +01:00
_libs_mplayer="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
2006-07-06 03:51:31 +02:00
_def_gui='#define HAVE_NEW_GUI 1'
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
2007-11-22 18:11:38 +01:00
fi #if ! win32
2006-07-06 03:51:31 +02:00
2006-07-13 05:05:08 +02:00
else #if test "$_gui"
2001-11-17 04:53:05 +01:00
_def_gui='#undef HAVE_NEW_GUI'
2005-08-17 20:41:15 +02:00
_def_gtk2_gui='#undef HAVE_GTK2_GUI'
2006-07-13 05:05:08 +02:00
fi #if test "$_gui"
2001-11-17 04:53:05 +01:00
# --------------- GUI specific tests end -------------------
2001-02-27 01:23:54 +01:00
2006-07-13 05:05:08 +02:00
2006-03-08 13:45:48 +01:00
if test "$_charset" = "noconv" ; then
_charset=""
fi
if test "$_charset" ; then
_def_charset="#define MSG_CHARSET \"$_charset\""
else
_def_charset="#undef MSG_CHARSET"
fi
2001-03-28 21:58:45 +02:00
2008-05-19 01:16:30 +02:00
if test "$_charset" != "UTF-8" ; then
2006-05-13 21:03:20 +02:00
echocheck "iconv program"
2006-11-03 22:52:35 +01:00
iconv -f UTF-8 -t $_charset ${_mp_help} > /dev/null 2>> "$TMPLOG"
2006-05-13 21:03:20 +02:00
if test "$?" -ne 0 ; then
echores "no"
echo "No working iconv program found, use "
2006-11-03 22:52:35 +01:00
echo "--charset=UTF-8 to continue anyway."
2006-06-10 22:11:38 +02:00
echo "If you also have problems with iconv library functions use --charset=noconv."
2006-05-13 21:03:20 +02:00
echo "Messages in the GTK-2 interface will be broken then."
exit 1
else
echores "yes"
fi
fi
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-03-28 14:08:44 +02:00
2004-10-29 01:25:18 +02:00
echocheck "automatic gdb attach"
if test "$_crash_debug" = yes ; then
_def_crash_debug='#define CRASH_DEBUG 1'
else
_def_crash_debug='#undef CRASH_DEBUG'
_crash_debug=no
fi
echores "$_crash_debug"
2005-06-01 11:08:15 +02:00
echocheck "compiler support for noexecstack"
cat > $TMPC <<EOF
int main(void) { return 0; }
EOF
if cc_check -Wl,-z,noexecstack ; then
_ld_extra="-Wl,-z,noexecstack $_ld_extra"
echores "yes"
else
echores "no"
fi
2002-04-12 12:40:38 +02:00
2008-05-03 22:14:50 +02:00
# Dynamic linking flags
2001-11-22 11:06:30 +01:00
# (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
_ld_dl_dynamic=''
2008-03-27 12:18:09 +01:00
freebsd || netbsd || openbsd || dragonfly || bsdos && _ld_dl_dynamic='-rdynamic'
2008-02-18 16:02:41 +01:00
if test "$_real" = yes || test "$_xanim" = yes && ! win32 && ! qnx && ! darwin && ! os2 ; then
2004-04-13 12:02:37 +02:00
_ld_dl_dynamic='-rdynamic'
fi
2001-11-22 11:06:30 +01:00
2006-11-27 23:55:46 +01:00
_ld_extra="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
bsdos && _ld_extra="$_ld_extra -ldvd"
2006-12-24 01:08:57 +01:00
netbsd && x86_32 && _ld_extra="$_ld_extra -li386"
2007-03-24 21:16:34 +01:00
openbsd && x86_32 && _ld_extra="$_ld_extra -li386"
2001-11-17 04:53:05 +01:00
_def_debug='#undef MP_DEBUG'
2002-09-03 19:13:08 +02:00
test "$_debug" != "" && _def_debug='#define MP_DEBUG 1'
2001-11-17 04:53:05 +01:00
2007-05-18 01:20:58 +02:00
2005-11-17 12:06:38 +01:00
echocheck "joystick"
2002-02-03 13:43:18 +01:00
_def_joystick='#undef HAVE_JOYSTICK'
2002-08-28 17:55:58 +02:00
if test "$_joystick" = yes ; then
if linux ; then
# TODO add some check
_def_joystick='#define HAVE_JOYSTICK 1'
else
2008-02-28 19:19:10 +01:00
_joystick="no"
_res_comment="unsupported under $system_name"
2002-02-03 13:43:18 +01:00
fi
fi
2005-11-17 12:06:38 +01:00
echores "$_joystick"
2002-02-03 13:43:18 +01:00
2002-02-23 22:20:16 +01:00
echocheck "lirc"
if test "$_lirc" = auto ; then
_lirc=no
2006-10-22 15:19:55 +02:00
cat > $TMPC <<EOF
2002-02-23 22:20:16 +01:00
#include <lirc/lirc_client.h>
int main(void) { return 0; }
EOF
2006-10-22 15:19:55 +02:00
cc_check -llirc_client && _lirc=yes
2002-02-23 22:20:16 +01:00
fi
if test "$_lirc" = yes ; then
_def_lirc='#define HAVE_LIRC 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -llirc_client"
2002-02-23 22:20:16 +01:00
else
_def_lirc='#undef HAVE_LIRC'
fi
echores "$_lirc"
2003-05-30 20:23:55 +02:00
echocheck "lircc"
if test "$_lircc" = auto ; then
_lircc=no
cat > $TMPC <<EOF
#include <lirc/lircc.h>
int main(void) { return 0; }
EOF
cc_check -llircc && _lircc=yes
fi
if test "$_lircc" = yes ; then
_def_lircc='#define HAVE_LIRCC 1'
2006-11-20 01:19:43 +01:00
_ld_extra="$_ld_extra -llircc"
2003-05-30 20:23:55 +02:00
else
_def_lircc='#undef HAVE_LIRCC'
fi
echores "$_lircc"
2002-02-23 22:20:16 +01:00
2006-10-12 10:23:17 +02:00
if arm; then
# Detect maemo development platform libraries availability (http://www.maemo.org),
# they are used when run on Nokia 770
echocheck "maemo (Nokia 770)"
if test "$_maemo" = auto ; then
_maemo=no
cat > $TMPC << EOF
#include <libosso.h>
int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
EOF
2006-10-31 10:25:40 +01:00
cc_check `$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo=yes
2006-10-12 10:23:17 +02:00
fi
if test "$_maemo" = yes ; then
_def_maemo='#define HAVE_MAEMO 1'
2006-10-31 10:25:40 +01:00
_inc_extra="$_inc_extra `$_pkg_config --cflags libosso`"
_ld_extra="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
2006-10-12 10:23:17 +02:00
else
_def_maemo='#undef HAVE_MAEMO'
fi
echores "$_maemo"
fi
2006-12-15 10:41:39 +01:00
# linker paths should be the same for mencoder and mplayer
_ld_tmp=""
for I in $_libs_mplayer ; do
2007-01-24 19:10:40 +01:00
_tmp=`echo $I | sed -e 's/^-L.*$//'`
if test -z "$_tmp" ; then
2006-12-15 10:41:39 +01:00
_ld_extra="$I $_ld_extra"
else
_ld_tmp="$_ld_tmp $I"
fi
done
_libs_mplayer=$_ld_tmp
2007-03-18 21:33:20 +01:00
#############################################################################
if darwin ; then
2007-12-11 21:32:50 +01:00
CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc"
2007-03-18 21:33:20 +01:00
if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
CFLAGS="$CFLAGS -no-cpp-precomp"
fi
fi
if amigaos ; then
2007-12-11 21:40:34 +01:00
CFLAGS="$CFLAGS -DNEWLIB -D__USE_INLINE__"
2007-03-18 21:33:20 +01:00
fi
if hpux ; then
# use flag for HPUX missing setenv()
CFLAGS="$CFLAGS -DHPUX"
fi
# Thread support
if linux ; then
CFLAGS="$CFLAGS -D_REENTRANT"
2008-03-27 02:56:37 +01:00
elif freebsd || netbsd || openbsd || bsdos ; then
2007-03-18 21:33:20 +01:00
# FIXME bsd needs this so maybe other OS'es
CFLAGS="$CFLAGS -D_THREAD_SAFE"
fi
if cygwin ; then
2007-08-18 11:39:56 +02:00
CFLAGS="$CFLAGS -D__CYGWIN__"
2007-03-18 21:33:20 +01:00
fi
2008-02-18 16:02:41 +01:00
if os2 ; then
CFLAGS="$CFLAGS -Zomf"
2008-03-07 11:05:08 +01:00
ASFLAGS="$ASFLAGS -Zomf"
2008-02-18 16:02:41 +01:00
fi
2007-03-18 21:33:20 +01:00
# 64 bit file offsets?
if test "$_largefiles" = yes || freebsd ; then
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
if test "$_dvdread" = yes || test "$_libdvdcss_internal" = yes ; then
# dvdread support requires this (for off64_t)
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
2007-08-18 11:39:56 +02:00
cygwin && CFLAGS="$CFLAGS -DSYS_CYGWIN"
2008-02-18 15:57:54 +01:00
beos && CFLAGS="$CFLAGS -DSYS_BEOS"
2008-02-18 16:02:41 +01:00
os2 && CFLAGS="$CFLAGS -DSYS_OS2"
2007-03-18 21:33:20 +01:00
fi
fi
2007-08-09 13:35:41 +02:00
# Make sure config.h gets included.
if test "$_dvdread_internal" = yes || test "$_faad_internal" = yes ; then
CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
fi
2008-05-09 14:39:04 +02:00
CFLAGS="-I. $CFLAGS"
2007-03-24 20:44:15 +01:00
CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS"
2007-03-18 22:58:28 +01:00
2007-03-19 00:54:51 +01:00
cat > $TMPC << EOF
2007-11-21 10:17:04 +01:00
int main(void) { return 0; }
2007-03-19 00:54:51 +01:00
EOF
2007-06-08 10:16:54 +02:00
if test "$cc_vendor" = "gnu" ; then
2007-06-09 00:22:50 +02:00
cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS"
2007-06-08 10:19:29 +02:00
cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS"
cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS"
2007-06-08 10:16:54 +02:00
fi
2007-03-18 21:33:20 +01:00
2008-02-24 12:15:30 +01:00
cc_check -mno-omit-leaf-frame-pointer && CFLAG_NO_OMIT_LEAF_FRAME_POINTER="-mno-omit-leaf-frame-pointer"
2007-01-24 01:10:47 +01:00
2007-05-01 21:54:13 +02:00
#this must be the last test to be performed or the ones following it will likely fail
#because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
# to use its own copy of the library)
echocheck "DVD support (libdvdnav)"
if test "$_dvdnav" = auto ; then
2008-06-01 09:44:36 +02:00
if test "$_dvdread_internal" = yes ; then
_dvdnav=no
2008-06-22 18:41:26 +02:00
_res_comment="Disabled in favor of the internal copy of dvdread. Append --disable-dvdread-internal."
2008-06-01 09:44:36 +02:00
else
2008-06-01 09:45:22 +02:00
$_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
2008-06-01 09:44:36 +02:00
fi
2007-05-01 21:54:13 +02:00
fi
if test "$_dvdnav" = auto ; then
cat > $TMPC <<EOF
#include <inttypes.h>
2008-01-01 18:34:57 +01:00
#include <dvdnav/dvdnav.h>
2007-05-01 21:54:13 +02:00
int main(void) { dvdnav_t *dvd=0; return 0; }
EOF
_dvdnav=no
_dvdnavdir=`$_dvdnavconfig --cflags`
_dvdnavlibs=`$_dvdnavconfig --libs`
2007-11-14 23:21:04 +01:00
cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
2007-05-01 21:54:13 +02:00
fi
if test "$_dvdnav" = yes ; then
_largefiles=yes
_def_dvdnav='#define USE_DVDNAV 1'
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
_ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
_inputmodules="dvdnav $_inputmodules"
else
_def_dvdnav='#undef USE_DVDNAV'
_noinputmodules="dvdnav $_noinputmodules"
fi
echores "$_dvdnav"
2001-11-17 04:53:05 +01:00
#############################################################################
2001-11-18 18:45:23 +01:00
echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------
2001-11-17 04:53:05 +01:00
2008-06-02 14:55:24 +02:00
# Ensure that locale settings do not interfere with shell commands.
2008-06-07 15:54:49 +02:00
export LC_ALL = C
2008-06-02 14:55:24 +02:00
2004-08-05 02:14:16 +02:00
MAN_LANG = $MAN_LANG
2008-05-18 18:40:20 +02:00
MAN_LANG_ALL = $MAN_LANG_ALL
2008-06-02 14:24:28 +02:00
2002-06-24 10:23:48 +02:00
DESTDIR =
prefix = \$(DESTDIR)$_prefix
2002-09-01 16:40:09 +02:00
BINDIR = \$(DESTDIR)$_bindir
2002-06-24 10:23:48 +02:00
DATADIR = \$(DESTDIR)$_datadir
2002-09-01 16:40:09 +02:00
MANDIR = \$(DESTDIR)$_mandir
2002-06-24 10:23:48 +02:00
CONFDIR = \$(DESTDIR)$_confdir
LIBDIR = \$(DESTDIR)$_libdir
2008-06-02 14:24:28 +02:00
2007-08-16 14:41:01 +02:00
AR = $_ar
2001-11-17 04:53:05 +01:00
CC = $_cc
2007-06-08 10:14:31 +02:00
CXX = $_cc
2004-09-26 16:40:59 +02:00
HOST_CC = $_host_cc
2002-12-05 00:29:41 +01:00
RANLIB = $_ranlib
2007-12-28 11:33:22 +01:00
WINDRES = $_windres
2002-12-05 00:29:41 +01:00
INSTALL = $_install
2008-06-02 14:24:28 +02:00
INSTALLSTRIP = $_install_strip
2006-08-05 01:57:04 +02:00
EXTRA_INC = $_inc_extra
2007-03-18 22:58:28 +01:00
EXTRAXX_INC = $_inc_extra $_inc_extraxx
2008-04-30 00:27:50 +02:00
CFLAGS = $CFLAGS \$(EXTRA_INC)
2006-08-18 15:58:03 +02:00
OPTFLAGS = $CFLAGS \$(EXTRA_INC)
2008-02-24 12:15:30 +01:00
CFLAG_NO_OMIT_LEAF_FRAME_POINTER = $CFLAG_NO_OMIT_LEAF_FRAME_POINTER
2007-03-18 22:58:28 +01:00
CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
2007-10-02 00:46:33 +02:00
CFLAG_STACKREALIGN = $_stackrealign
2008-06-02 14:24:28 +02:00
LIBDVDCSS_DVDREAD_FLAGS = $_libdvdcss_dvdread_flags
2008-06-08 12:38:28 +02:00
CFLAG_DHAHELPER = $cflag_dhahelper
2008-06-07 16:32:06 +02:00
CFLAG_SVGALIB_HELPER = $cflag_svgalib_helper
2008-03-07 11:05:08 +01:00
ASFLAGS = $ASFLAGS
2008-06-02 14:24:28 +02:00
EXTRALIBS = $_extra_libs
EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
EXTRALIBS_MPLAYER = $_libs_mplayer
EXTRALIBS_MENCODER = $_libs_mencoder
2005-02-26 14:38:17 +01:00
CHARSET = $_charset
2004-10-20 16:23:33 +02:00
HELP_FILE = $_mp_help
2001-11-17 04:53:05 +01:00
2006-11-08 01:13:33 +01:00
EXESUF = $_exesuf
2004-06-27 19:54:31 +02:00
2008-06-02 14:24:28 +02:00
$_target_arch
$_target_arch_x86
`echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'`
2001-11-17 04:53:05 +01:00
2008-06-02 14:24:28 +02:00
GETCH = $_getch
TIMER = $_timer
AO_SRCS = $_aosrc
VO_SRCS = $_vosrc
MENCODER = $_mencoder
MPLAYER = $_mplayer
#internal libraries
2004-10-07 11:31:16 +02:00
LIBA52 = $_liba52
LIBMPEG2 = $_libmpeg2
2008-06-02 14:24:28 +02:00
MP3LIB = $_mp3lib
2006-08-07 22:58:39 +02:00
TREMOR_INTERNAL = $_tremor_internal
2007-03-16 22:54:48 +01:00
TREMOR_LOW = $_tremor_low
2006-10-31 13:52:05 +01:00
2007-01-10 23:58:32 +01:00
HAVE_SYS_MMAN_H = $_mman
2007-03-21 09:29:46 +01:00
HAVE_POSIX_SELECT = $_posix_select
2007-01-10 20:07:42 +01:00
2007-01-13 22:26:54 +01:00
NEED_GETTIMEOFDAY = $_need_gettimeofday
2007-01-10 20:07:42 +01:00
NEED_GLOB = $_need_glob
2008-04-08 19:31:25 +02:00
NEED_MMAP = $_need_mmap
2007-01-10 20:07:42 +01:00
NEED_SETENV = $_need_setenv
2007-03-17 20:54:31 +01:00
NEED_SHMEM = $_need_shmem
2007-01-10 20:07:42 +01:00
NEED_STRSEP = $_need_strsep
NEED_SWAB = $_need_swab
NEED_VSSCANF = $_need_vsscanf
2001-11-27 18:58:29 +01:00
# audio output
2006-07-06 15:09:45 +02:00
OSS = $_ossaudio
ALSA9 = $_alsa9
ALSA1X = $_alsa1x
2001-11-17 04:53:05 +01:00
2008-06-02 14:24:28 +02:00
# features
2008-05-18 13:53:00 +02:00
APPLE_IR = $_apple_ir
2008-06-02 14:24:28 +02:00
APPLE_REMOTE = $_apple_remote
2007-04-22 22:43:28 +02:00
AUDIO_INPUT = $_audio_input
2008-06-02 14:24:28 +02:00
BITMAP_FONT = $_bitmap_font
2006-07-06 15:09:45 +02:00
CDDA = $_cdda
2006-11-27 23:02:06 +01:00
CDDB = $_cddb
2008-06-02 14:24:28 +02:00
COREAUDIO = $_coreaudio
COREVIDEO = $_corevideo
DVBIN = $_dvbin
DVDNAV = $_dvdnav
DVDREAD = $_dvdread
DVDREAD_INTERNAL = $_dvdread_internal
FAAC=$_faac
FAAD = $_faad
FAAD_INTERNAL = $_faad_internal
2006-06-30 14:41:05 +02:00
FREETYPE = $_freetype
2008-06-02 14:24:28 +02:00
FTP = $_ftp
GIF = $_gif
GUI = $_gui
GUI_GTK = $_gui_gtk
GUI_WIN32 = $_gui_win32
JOYSTICK = $_joystick
JPEG = $_jpeg
LADSPA = $_ladspa
2008-04-09 20:26:44 +02:00
LIBASS = $_ass
2008-06-02 14:24:28 +02:00
LIBDCA = $_libdca
LIBDV = $_libdv
LIBDVDCSS_INTERNAL = $_libdvdcss_internal
LIBLZO = $_liblzo
2006-06-21 16:49:09 +02:00
LIBMAD = $_mad
2008-06-02 14:24:28 +02:00
LIBMENU = $_menu
LIBMENU_DVBIN = $_menu_dvbin
LIBNEMESI = $_nemesi
LIBNUT = $_libnut
2006-07-06 15:09:45 +02:00
LIBSMBCLIENT = $_smbsupport
2008-06-02 14:24:28 +02:00
LIBTHEORA = $_theora
LIBVORBIS = $_vorbis
LIRC = $_lirc
2005-04-13 13:46:35 +02:00
MACOSX_BUNDLE = $_macosx_bundle
2008-06-02 14:24:28 +02:00
MACOSX_FINDER_SUPPORT = $_macosx_finder_support
MP3LAME = $_mp3lame
MPLAYER_NETWORK = $_network
MUSEPACK = $_musepack
NATIVE_RTSP = $_native_rtsp
PE_EXECUTABLE = $_pe_executable
PNG = $_png
PVR = $_pvr
QTX_CODECS = $_qtx
QTX_CODECS_WIN32 = $_qtx_codecs_win32
QTX_EMULATION = $_qtx_emulation
2008-03-15 10:49:14 +01:00
QUARTZ = $_quartz
2006-08-28 19:05:18 +02:00
RADIO=$_radio
RADIO_CAPTURE=$_radio_capture
2008-06-02 14:24:28 +02:00
REAL_CODECS = $_real
SPEEX = $_speex
STREAMING_LIVE555 = $_live
STREAM_CACHE = $_stream_cache
TOOLAME=$_toolame
TV = $_tv
TV_BSDBT848 = $_tv_bsdbt848
TV_DSHOW = $_tv_dshow
TV_TELETEXT = $_tv_teletext
TV_V4L = $_tv_v4l
TV_V4L1 = $_tv_v4l1
TV_V4L2 = $_tv_v4l2
TWOLAME=$_twolame
UNRAR_EXEC = $_unrar_exec
VCD = $_vcd
VIDIX = $_vidix
VIDIX_PCIDB = $_vidix_pcidb_val
2007-04-25 10:40:43 +02:00
VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
2007-05-10 20:47:27 +02:00
VIDIX_IVTV=$_vidix_drv_ivtv
2007-04-25 10:40:43 +02:00
VIDIX_MACH64=$_vidix_drv_mach64
VIDIX_MGA=$_vidix_drv_mga
VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
VIDIX_NVIDIA=$_vidix_drv_nvidia
VIDIX_PM2=$_vidix_drv_pm2
VIDIX_PM3=$_vidix_drv_pm3
VIDIX_RADEON=$_vidix_drv_radeon
VIDIX_RAGE128=$_vidix_drv_rage128
2008-02-29 21:01:28 +01:00
VIDIX_S3=$_vidix_drv_s3
2007-04-25 10:40:43 +02:00
VIDIX_SIS=$_vidix_drv_sis
VIDIX_UNICHROME=$_vidix_drv_unichrome
2008-06-02 14:24:28 +02:00
VSTREAM = $_vstream
WIN32DLL = $_win32dll
WIN32_EMULATION = $_win32_emulation
X264 = $_x264
XANIM_CODECS = $_xanim
XMMS_PLUGINS = $_xmms
XVID4 = $_xvid
ZORAN = $_zr
2006-07-12 19:28:14 +02:00
2008-03-31 19:04:06 +02:00
# FFmpeg
LIBAVUTIL = $_libavutil
LIBAVUTIL_A = $_libavutil_a
LIBAVUTIL_SO = $_libavutil_so
LIBAVCODEC = $_libavcodec
LIBAVCODEC_A = $_libavcodec_a
LIBAVCODEC_SO = $_libavcodec_so
LIBAVFORMAT = $_libavformat
LIBAVFORMAT_A = $_libavformat_a
LIBAVFORMAT_SO = $_libavformat_so
LIBPOSTPROC = $_libpostproc
LIBPOSTPROC_A = $_libpostproc_a
LIBPOSTPROC_SO = $_libpostproc_so
2008-04-04 21:38:06 +02:00
BUILD_STATIC=yes
2008-03-31 19:04:06 +02:00
SRC_PATH=..
BUILD_ROOT=..
LIBPREF=lib
LIBSUF=.a
LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
CONFIG_ENCODERS=yes
CONFIG_GPL=yes
CONFIG_MUXERS=$_mencoder
CONFIG_LIBAMR=$_libamr
CONFIG_LIBAMR_NB=$_libamr_nb
CONFIG_LIBAMR_WB=$_libamr_wb
2008-05-08 23:58:32 +02:00
CONFIG_LIBFAAC=$_faac_lavc
CONFIG_LIBMP3LAME=$_mp3lame_lavc
2008-03-31 19:04:06 +02:00
CONFIG_LIBVORBIS=$_libvorbis
2008-05-09 00:50:17 +02:00
CONFIG_LIBX264=$_x264_lavc
2008-05-08 23:58:32 +02:00
CONFIG_LIBXVID=$_xvid_lavc
2008-03-31 19:04:06 +02:00
CONFIG_MLIB = $_mlib
2008-06-02 14:24:28 +02:00
CONFIG_POSTPROC = yes
2008-03-31 19:04:06 +02:00
# Prevent building libavcodec/imgresample.c with conflicting symbols
CONFIG_SWSCALE=yes
CONFIG_ZLIB=$_zlib
HAVE_PTHREADS = $_pthreads
HAVE_W32THREADS = $_w32threads
2008-03-31 19:19:51 +02:00
HAVE_XVMC = $_xvmc
2008-03-31 19:04:06 +02:00
`echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
2008-04-13 12:59:11 +02:00
DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&,"
2008-04-08 01:49:39 +02:00
2008-06-23 10:58:25 +02:00
MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,$^) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.h,$^) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
2008-04-08 01:49:39 +02:00
2001-07-03 09:50:52 +02:00
EOF
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
#############################################################################
2006-12-23 03:47:38 +01:00
ff_config_enable () {
2007-06-19 15:54:48 +02:00
_nprefix=$3;
test -z "$_nprefix" && _nprefix='CONFIG'
2006-12-23 03:47:38 +01:00
for part in $1; do
2007-09-27 07:33:26 +02:00
if ` echo $2 | grep -E "(^| )$part($| )" > /dev/null `; then
2007-06-19 15:54:48 +02:00
echo "#define ${_nprefix}_$part 1"
2007-02-03 22:40:10 +01:00
echo "#define ENABLE_$part 1"
2006-12-23 03:47:38 +01:00
else
2007-02-03 22:40:10 +01:00
echo "#define ENABLE_$part 0"
2006-12-23 03:47:38 +01:00
fi
done
}
2001-11-18 18:45:23 +01:00
echo "Creating config.h"
2007-08-27 13:40:25 +02:00
cat > $TMPH << EOF
2001-12-10 13:07:03 +01:00
/* -------- This file has been automatically generated by configure ---------
Note: Any changes in it will be lost when you run configure again. */
2001-02-24 21:28:24 +01:00
2003-11-02 14:45:24 +01:00
/* Protect against multiple inclusion */
#ifndef MPLAYER_CONFIG_H
2008-02-21 17:35:00 +01:00
#define MPLAYER_CONFIG_H
2003-11-02 14:45:24 +01:00
2006-11-28 19:29:24 +01:00
#define CONFIGURATION "$_configuration"
2007-02-15 19:24:12 +01:00
/* make sure we never get lavformat's poll() emulation, the results are
horrible if the X libs try to actually use it, see MPlayer-users
Message-ID: <45D49541.8060101@infernix.net>
Date: Thu, 15 Feb 2007 18:15:45 +0100
Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
*/
#define HAVE_SYS_POLL_H 1
2007-08-07 19:59:42 +02:00
/* yes, we have inttypes.h */
#define HAVE_INTTYPES_H 1
/* int_fastXY_t emulation */
$_def_fast_inttypes
2007-08-08 11:12:33 +02:00
/* libdvdcss */
#define HAVE_ERRNO_H 1
2007-08-09 13:35:41 +02:00
/* libdvdcss + libdvdread */
2007-08-08 11:12:33 +02:00
#define HAVE_LIMITS_H 1
/* libdvdcss + libfaad2 */
#define HAVE_UNISTD_H 1
2007-08-09 13:35:41 +02:00
/* libfaad2 + libdvdread */
2007-08-08 11:12:33 +02:00
#define STDC_HEADERS 1
2007-08-09 13:35:41 +02:00
/* libfaad2 */
2007-08-08 11:12:33 +02:00
#define HAVE_MEMCPY 1
#define HAVE_STRCHR 1
2007-08-15 13:47:22 +02:00
/* libdvdread */
#define HAVE_UINTPTR_T 1
2006-03-08 13:45:48 +01:00
/* name of messages charset */
$_def_charset
2002-08-04 00:48:41 +02:00
/* Runtime CPU detection */
2002-03-15 23:16:02 +01:00
$_def_runtime_cpudetection
2002-11-11 19:25:02 +01:00
/* Dynamic a/v plugins */
$_def_dynamic_plugins
2002-07-06 17:20:10 +02:00
/* "restrict" keyword */
2004-10-30 11:31:33 +02:00
$_def_restrict_keyword
2002-07-06 17:20:10 +02:00
2004-11-22 11:28:36 +01:00
/* __builtin_expect branch prediction hint */
$_def_builtin_expect
2005-09-03 10:53:48 +02:00
#ifdef HAVE_BUILTIN_EXPECT
#define likely(x) __builtin_expect ((x) != 0, 1)
#define unlikely(x) __builtin_expect ((x) != 0, 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif
2004-11-22 11:28:36 +01:00
2004-04-26 11:44:06 +02:00
/* attribute(used) as needed by some compilers */
#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
# define attribute_used __attribute__((used))
#else
# define attribute_used
#endif
2008-03-18 10:09:53 +01:00
/* extern symbol prefix */
$_def_extern_prefix
2006-09-18 18:48:50 +02:00
/* compiler support for named assembler arguments */
$_def_named_asm_args
2002-03-27 04:45:55 +01:00
/* enable/disable SIGHANDLER */
$_def_sighandler
2004-10-29 01:25:18 +02:00
/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
$_def_crash_debug
2001-12-10 13:07:03 +01:00
/* Toggles debugging informations */
2001-11-17 04:53:05 +01:00
$_def_debug
2001-08-17 02:38:10 +02:00
2005-11-06 18:42:20 +01:00
/* Indicates that libcdio is available for VCD and CD-DA playback */
$_def_libcdio
2002-04-24 23:17:22 +02:00
/* Indicates that Ogle's libdvdread is available for DVD playback */
2001-11-17 04:53:05 +01:00
$_def_dvdread
2001-08-20 23:20:03 +02:00
2006-11-03 23:03:58 +01:00
/* Indicates that dvdread is internal */
$_def_dvdread_internal
2002-04-24 23:17:22 +02:00
2006-11-03 23:03:58 +01:00
/* Additional options for libdvdread/libdvdcss */
2002-04-23 18:29:13 +02:00
$_def_dvd
$_def_cdrom
$_def_cdio
$_def_dvdio
$_def_bsdi_dvd
$_def_dvd_bsd
2002-04-24 23:34:41 +02:00
$_def_dvd_linux
2002-08-28 02:05:10 +02:00
$_dev_dvd_openbsd
2002-12-04 22:33:36 +01:00
$_def_dvd_darwin
2002-04-23 18:29:13 +02:00
$_def_sol_scsi_h
2002-09-14 00:04:11 +02:00
$_def_hpux_scsi_h
2002-04-23 18:29:13 +02:00
2001-07-20 02:01:09 +02:00
/* Common data directory (for fonts, etc) */
2003-06-09 14:15:48 +02:00
#define MPLAYER_DATADIR "$_datadir"
#define MPLAYER_CONFDIR "$_confdir"
#define MPLAYER_LIBDIR "$_libdir"
2001-07-20 02:01:09 +02:00
2001-10-28 23:56:44 +01:00
/* Define this to compile stream-caching support, it can be enabled via
-cache <kilobytes> */
2007-02-27 18:13:17 +01:00
$_def_stream_cache
2001-10-28 23:56:44 +01:00
2008-05-31 18:38:02 +02:00
/* Define if you are using Xvid library */
2006-11-08 19:46:03 +01:00
$_def_xvid
2002-07-10 22:56:57 +02:00
2004-08-27 22:43:05 +02:00
/* Define if you are using the X.264 library */
$_def_x264
2006-09-17 11:32:28 +02:00
/* Define if you are using libnut */
2007-07-13 19:08:37 +02:00
$_def_libnut
2006-09-17 11:32:28 +02:00
2002-04-13 18:51:01 +02:00
/* Define to include support for libdv-0.9.5 */
$_def_libdv
2002-01-15 18:03:19 +01:00
/* If build mencoder */
$_mencoder_flag
2001-12-10 13:07:03 +01:00
/* Indicates if libmp3lame is available
2001-12-30 20:11:11 +01:00
Note: for mencoder */
2001-12-06 23:26:41 +01:00
$_def_mp3lame
2005-10-18 23:40:17 +02:00
$_def_mp3lame_preset
$_def_mp3lame_preset_medium
2001-12-06 23:26:41 +01:00
2001-11-27 18:58:29 +01:00
/* Undefine this if you do not want to select mono audio (left or right)
2002-08-04 00:48:41 +02:00
with a stereo MPEG layer 2/3 audio stream. The command line option
2001-05-08 23:49:00 +02:00
-stereo has three possible values (0 for stereo, 1 for left-only, 2 for
right-only), with 0 being the default.
*/
2001-11-17 04:53:05 +01:00
#define USE_FAKE_MONO 1
2001-05-08 23:49:00 +02:00
2002-08-04 00:48:41 +02:00
/* Undefine this if your sound card driver has no working select().
2001-02-24 21:28:24 +01:00
If you have kernel Oops, player hangups, or just no audio, you should
try to recompile MPlayer with this option disabled! */
2001-11-17 04:53:05 +01:00
$_def_select
2001-02-24 21:28:24 +01:00
2001-10-10 15:07:42 +02:00
/* define this to use iconv(3) function to codepage conversions */
2001-11-17 04:53:05 +01:00
$_def_iconv
2001-02-24 21:28:24 +01:00
2004-06-26 11:54:02 +02:00
/* define this to use nl_langinfo function */
$_def_langinfo
2005-01-06 01:06:56 +01:00
/* define this to use RTC (/dev/rtc) for video timers */
2001-11-20 08:53:20 +01:00
$_def_rtc
2001-05-10 20:46:33 +02:00
/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
#define MAX_OUTBURST 65536
2001-04-23 05:39:34 +02:00
/* set up audio OUTBURST. Do not change this! */
#define OUTBURST 512
2001-06-09 01:30:09 +02:00
/* Define this if your system has the header file for the OSS sound interface */
2001-11-17 04:53:05 +01:00
$_def_sys_soundcard
2001-06-09 01:30:09 +02:00
2002-08-04 00:48:41 +02:00
/* Define this if your system has the header file for the OSS sound interface
2002-04-28 00:42:27 +02:00
* in /usr/include */
$_def_soundcard
2002-08-21 23:31:20 +02:00
/* Define this if your system has the sysinfo header */
$_def_sys_sysinfo
2001-07-12 17:35:52 +02:00
/* Define this if your system has the "malloc.h" header file */
2001-11-17 04:53:05 +01:00
$_def_malloc
2001-06-09 01:30:09 +02:00
2001-11-09 03:02:58 +01:00
/* memalign is mapped to malloc if unsupported */
2001-11-17 04:53:05 +01:00
$_def_memalign
2006-08-03 19:07:31 +02:00
$_def_map_memalign
$_def_memalign_hack
2001-08-24 16:49:05 +02:00
2006-08-13 01:58:26 +02:00
/* assembler handling of .align */
$_def_asmalign_pot
2001-07-12 17:35:52 +02:00
/* Define this if your system has the "alloca.h" header file */
2001-11-17 04:53:05 +01:00
$_def_alloca
2001-07-12 17:35:52 +02:00
2008-02-12 22:10:13 +01:00
/* Define this if your system has the "byteswap.h" header file */
$_def_byteswap_h
2001-07-12 17:35:52 +02:00
/* Define this if your system has the "sys/mman.h" header file */
2001-11-17 04:53:05 +01:00
$_def_mman
2005-01-21 22:32:15 +01:00
$_def_mman_has_map_failed
2001-07-03 16:22:23 +02:00
2001-07-12 17:35:52 +02:00
/* Define this if you have the elf dynamic linker -ldl library */
2001-11-17 04:53:05 +01:00
$_def_dl
2001-07-12 17:35:52 +02:00
/* Define this if you have the kstat kernel statistics library */
2001-11-17 04:53:05 +01:00
$_def_kstat
2001-07-12 17:35:52 +02:00
2001-10-26 15:50:05 +02:00
/* Define this if you have zlib */
2001-11-17 04:53:05 +01:00
$_def_zlib
2004-01-12 23:48:03 +01:00
#ifdef HAVE_ZLIB
2004-04-06 03:12:36 +02:00
#define CONFIG_ZLIB 1
2004-01-12 23:48:03 +01:00
#endif
2001-10-26 15:50:05 +02:00
2001-11-19 16:54:43 +01:00
/* Define this if you have shm support */
$_def_shm
2002-03-29 22:24:36 +01:00
/* Define this if your system has strsep */
$_def_strsep
2001-11-14 20:02:39 +01:00
/* Define this if your system has vsscanf */
2001-11-17 04:53:05 +01:00
$_def_vsscanf
2001-11-14 20:02:39 +01:00
2004-10-11 21:26:13 +02:00
/* Define this if your system has swab */
$_def_swab
2007-03-21 09:44:45 +01:00
/* Define this if your system has posix select */
2007-03-21 09:24:20 +01:00
$_def_posix_select
2003-04-04 21:15:24 +02:00
/* Define this if your system has gettimeofday */
$_def_gettimeofday
/* Define this if your system has glob */
$_def_glob
2005-12-26 04:16:48 +01:00
/* Define this if your system has setenv */
$_def_setenv
#ifndef HAVE_SETENV
int setenv(const char *name, const char *val, int overwrite);
#endif
2006-04-30 23:17:30 +02:00
/* Define this if your system has sysi86 */
$_def_sysi86
2007-03-18 23:18:11 +01:00
$_def_sysi86_iv
2006-04-30 23:17:30 +02:00
2004-07-06 04:10:22 +02:00
/* Define this if your system has pthreads */
$_def_pthreads
2004-12-23 16:18:39 +01:00
/* Define this if you enabled thread support for libavcodec */
$_def_threads
2007-07-06 21:38:54 +02:00
#ifdef HAVE_THREADS
#define ENABLE_THREADS 1
#else
#define ENABLE_THREADS 0
#endif
2004-12-23 16:18:39 +01:00
2001-02-24 21:28:24 +01:00
/* LIRC (remote control, see www.lirc.org) support: */
2001-11-17 04:53:05 +01:00
$_def_lirc
2001-02-24 21:28:24 +01:00
2007-08-14 16:29:22 +02:00
/* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */
$_def_apple_remote
2008-05-18 13:53:00 +02:00
/* Apple IR Remote (Linux remote control driver) */
$_def_apple_ir
2006-10-12 10:23:17 +02:00
/* Support for maemo (http://www.maemo.org) */
$_def_maemo
2003-05-30 20:23:55 +02:00
/*
* LIRCCD (LIRC client daemon)
* See http://www.dolda2000.cjb.net/~fredrik/lirccd/
*/
$_def_lircc
2002-03-28 21:40:21 +01:00
/* DVD navigation support using libdvdnav */
$_def_dvdnav
2002-08-04 00:48:41 +02:00
/* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
2001-11-17 04:53:05 +01:00
#define MPEG12_POSTPROC 1
2001-03-06 00:02:30 +01:00
2008-02-23 14:13:28 +01:00
/* maximum alignment used by libmpeg2 */
#define ATTRIBUTE_ALIGNED_MAX 16
2002-08-04 00:48:41 +02:00
/* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
2006-01-22 19:11:35 +01:00
$_def_libpostproc
2007-04-26 15:20:18 +02:00
$_def_libpostproc_a
2006-01-22 19:11:35 +01:00
$_def_libpostproc_so
2001-10-17 01:30:38 +02:00
2001-08-14 20:28:56 +02:00
/* Win32 DLL support */
2007-03-18 21:15:57 +01:00
$_def_win32dll
2006-10-31 15:47:34 +01:00
#define WIN32_PATH "$_win32codecsdir"
2001-08-14 20:28:56 +02:00
2003-02-19 18:26:59 +01:00
/* Mac OS X specific features */
2004-11-10 17:43:40 +01:00
$_def_macosx_finder_support
2005-04-13 13:46:35 +02:00
$_def_macosx_bundle
2008-03-15 09:54:21 +01:00
$_def_coreaudio
2008-03-15 10:19:38 +01:00
$_def_corevideo
2008-03-15 10:49:14 +01:00
$_def_quartz
2008-03-15 12:31:28 +01:00
$_def_quicktime
2003-02-19 18:26:59 +01:00
2003-02-11 19:56:17 +01:00
/* Build our Win32-loader */
$_def_win32_loader
2001-07-06 05:22:14 +02:00
/* ffmpeg's libavcodec support (requires libavcodec source) */
2001-11-17 04:53:05 +01:00
$_def_libavcodec
2007-04-26 15:20:18 +02:00
$_def_libavcodec_a
2006-01-14 17:26:42 +01:00
$_def_libavcodec_so
2006-08-14 16:43:38 +02:00
$_def_libavcodec_mpegaudio_hp
2001-11-17 04:53:05 +01:00
2004-04-11 16:26:04 +02:00
/* ffmpeg's libavformat support (requires libavformat source) */
$_def_libavformat
2007-04-26 15:20:18 +02:00
$_def_libavformat_a
2006-01-09 20:35:44 +01:00
$_def_libavformat_so
2004-04-11 16:26:04 +02:00
2006-07-05 22:26:39 +02:00
$_def_libavutil
2007-04-26 15:20:18 +02:00
$_def_libavutil_a
2006-07-05 22:26:39 +02:00
$_def_libavutil_so
2002-01-12 22:07:17 +01:00
/* Use libavcodec's decoders */
2001-11-17 04:53:05 +01:00
#define CONFIG_DECODERS 1
2008-03-06 00:03:04 +01:00
#define ENABLE_DECODERS 1
2002-01-12 22:07:17 +01:00
/* Use libavcodec's encoders */
2007-07-11 03:49:43 +02:00
#define CONFIG_ENCODERS 1
2008-02-26 06:18:56 +01:00
#define ENABLE_ENCODERS 1
2001-07-06 05:22:14 +02:00
2005-09-23 02:55:11 +02:00
/* Use libavformat's demuxers */
#define CONFIG_DEMUXERS 1
2008-03-06 00:03:04 +01:00
#define ENABLE_DEMUXERS 1
2005-09-23 02:55:11 +02:00
/* Use libavformat's muxers */
2006-07-08 19:09:35 +02:00
$_def_muxers
2005-09-23 02:55:11 +02:00
2007-03-31 00:57:04 +02:00
/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
2007-04-25 01:46:42 +02:00
#define HAVE_EBX_AVAILABLE 1
2007-08-22 19:10:31 +02:00
#ifndef MP_DEBUG
2007-04-25 01:46:42 +02:00
#define HAVE_EBP_AVAILABLE 1
2007-08-22 19:10:31 +02:00
#endif
2007-03-31 00:57:04 +02:00
2008-01-03 02:44:58 +01:00
#define HAVE_SOCKLEN_T 1
2005-09-10 19:03:35 +02:00
#define CONFIG_GPL 1
2007-07-06 21:38:54 +02:00
#define ENABLE_SMALL 0
2008-03-06 01:34:40 +01:00
#define ENABLE_GRAY 0
2005-09-10 19:03:35 +02:00
2007-04-25 21:32:53 +02:00
/* Use AMR codecs from libavcodec. */
2007-05-03 14:04:29 +02:00
$_def_libamr
$_def_libamr_nb
$_def_libamr_wb
2004-12-30 00:23:46 +01:00
2006-07-11 16:47:07 +02:00
/* Use specific parts from FFmpeg. */
2006-12-23 03:47:38 +01:00
`ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
`ff_config_enable "$_libavencoders_all" "$_libavencoders"`
`ff_config_enable "$_libavparsers_all" "$_libavparsers"`
`ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
`ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
2007-04-27 11:19:00 +02:00
`ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
2007-05-13 17:58:38 +02:00
`ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
2006-12-13 11:59:14 +01:00
2008-05-08 23:50:31 +02:00
$_def_faac_lavc
$_def_mp3lame_lavc
$_def_x264_lavc
$_def_xvid_lavc
2005-05-03 13:16:35 +02:00
2002-11-01 17:39:39 +01:00
/* Use codec libs included in mplayer CVS / source dist: */
2004-04-06 01:17:40 +02:00
$_def_mp3lib
$_def_liba52
$_def_libmpeg2
2002-11-01 17:39:39 +01:00
2001-11-03 22:25:55 +01:00
/* XAnim DLL support */
2001-11-17 04:53:05 +01:00
$_def_xanim
2002-01-12 22:07:17 +01:00
/* Default search path */
2001-11-17 04:53:05 +01:00
$_def_xanim_path
2001-11-03 22:25:55 +01:00
2002-06-09 03:19:48 +02:00
/* RealPlayer DLL support */
$_def_real
2002-06-13 02:14:28 +02:00
/* Default search path */
$_def_real_path
2002-06-09 03:19:48 +02:00
2005-09-24 00:35:04 +02:00
/* LIVE555 Streaming Media library support */
2002-08-05 02:39:07 +02:00
$_def_live
2007-09-19 23:38:22 +02:00
/* libnemesi Streaming Media library support */
$_def_nemesi
2001-04-26 22:23:24 +02:00
/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
2001-11-17 04:53:05 +01:00
$_def_fastmemcpy
2001-04-26 22:23:24 +02:00
2007-12-14 09:16:39 +01:00
/* Use UnRAR executable for Vobsubs */
$_def_unrar_exec
2001-05-08 14:17:03 +02:00
/* gui support, please do not edit this option */
2001-11-17 04:53:05 +01:00
$_def_gui
2005-08-17 20:41:15 +02:00
$_def_gtk2_gui
2001-05-08 14:17:03 +02:00
2002-01-12 22:07:17 +01:00
/* Audio output drivers */
2001-11-17 04:53:05 +01:00
$_def_ossaudio
2002-02-22 14:47:31 +01:00
$_def_ossaudio_devdsp
$_def_ossaudio_devmixer
2001-11-17 04:53:05 +01:00
$_def_alsa5
$_def_alsa9
2004-01-11 18:07:32 +01:00
$_def_alsa1x
2002-05-28 03:52:40 +02:00
$_def_arts
2002-12-27 17:02:57 +01:00
$_def_esd
2003-05-30 20:15:59 +02:00
$_def_esd_latency
2007-10-18 15:34:26 +02:00
$_def_pulse
2004-06-25 20:11:15 +02:00
$_def_jack
2006-02-16 21:45:25 +01:00
$_def_openal
2006-12-10 15:07:08 +01:00
$_def_openal_h
2002-04-27 03:25:32 +02:00
$_def_sys_asoundlib_h
$_def_alsa_asoundlib_h
2001-11-17 04:53:05 +01:00
$_def_sunaudio
$_def_sgiaudio
2002-10-25 18:25:41 +02:00
$_def_win32waveout
2001-12-03 02:13:48 +01:00
$_def_nas
2001-06-02 18:02:38 +02:00
/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
#undef FAST_OSD
#undef FAST_OSD_TABLE
2001-11-11 05:26:54 +01:00
/* Enable TV Interface support */
2001-11-17 04:53:05 +01:00
$_def_tv
2001-11-11 05:26:54 +01:00
2006-07-27 11:34:32 +02:00
/* Enable Video 4 Linux TV interface support */
$_def_tv_v4l
2006-07-27 11:30:39 +02:00
/* Enable Video 4 Linux 1 TV interface support */
$_def_tv_v4l1
2001-12-01 16:05:08 +01:00
2003-08-07 14:24:35 +02:00
/* Enable Video 4 Linux 2 TV interface support */
$_def_tv_v4l2
2007-10-13 19:14:39 +02:00
/* Enable DirectShow TV interface support */
$_def_tv_dshow
2007-04-09 15:18:06 +02:00
/* *BSD BrookTree headers */
$_def_ioctl_meteor_h_name
$_def_ioctl_bt848_h_name
2002-03-15 17:10:29 +01:00
/* Enable *BSD BrookTree TV interface support */
$_def_tv_bsdbt848
2007-07-29 19:55:28 +02:00
/* Enable TV Teletext Interface support */
$_def_tv_teletext
2006-08-28 19:05:18 +02:00
/* Enable Radio Interface support */
$_def_radio
/* Enable Capture for Radio Interface support */
$_def_radio_capture
/* Enable Video 4 Linux Radio interface support */
$_def_radio_v4l
/* Enable Video 4 Linux 2 Radio interface support */
$_def_radio_v4l2
2006-11-18 07:53:33 +01:00
/* Enable *BSD BrookTree Radio interface support */
$_def_radio_bsdbt848
2006-09-27 22:26:38 +02:00
/* Enable Video 4 Linux 2 MPEG PVR support */
2006-07-10 23:32:19 +02:00
$_def_pvr
2001-02-24 21:28:24 +01:00
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
2001-11-17 04:53:05 +01:00
$_def_words_endian
2001-02-24 21:28:24 +01:00
2007-06-24 16:39:11 +02:00
/* Define if your processor can access unaligned data in a fast way */
$_def_fast_unaligned
2007-06-19 15:55:12 +02:00
`ff_config_enable "$_arch_all" "$_arch" "ARCH"`
2001-02-24 21:28:24 +01:00
2005-05-09 19:02:10 +02:00
/* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
have the instruction. */
$_def_dcbzl
2001-11-17 04:53:05 +01:00
/* Define this for Cygwin build for win32 */
$_def_confwin32
2001-08-05 14:39:34 +02:00
2001-05-22 09:45:35 +02:00
/* Define this to any prefered value from 386 up to infinity with step 100 */
#define __CPU__ $iproc
2002-09-16 21:37:57 +02:00
$_mp_wordsize
2001-12-02 00:38:57 +01:00
$_def_vcd
2001-08-12 15:34:24 +02:00
#ifdef sun
#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
2001-08-21 19:17:03 +02:00
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2008-02-18 16:02:41 +01:00
#elif defined(WIN32) || defined(__OS2__)
2002-07-10 05:02:11 +02:00
#define DEFAULT_CDROM_DEVICE "D:"
2007-12-11 21:36:33 +01:00
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2007-12-11 21:32:21 +01:00
#elif defined(__APPLE__) || defined(__DARWIN__)
2004-10-18 22:30:07 +02:00
#define DEFAULT_CDROM_DEVICE "/dev/disk1"
#define DEFAULT_DVD_DEVICE "/dev/rdiskN"
2004-07-12 12:44:18 +02:00
#elif defined(__OpenBSD__)
#define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2007-01-10 15:56:23 +01:00
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
2005-09-17 21:51:41 +02:00
#define DEFAULT_CDROM_DEVICE "/dev/acd0"
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2008-03-27 03:04:03 +01:00
#elif defined(__DragonFly__)
#define DEFAULT_CDROM_DEVICE "/dev/cd0"
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2007-12-11 21:39:18 +01:00
#elif defined(__AMIGAOS4__)
2007-03-15 18:06:28 +01:00
#define DEFAULT_CDROM_DEVICE "a1ide.device:2"
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2001-08-12 15:34:24 +02:00
#else
#define DEFAULT_CDROM_DEVICE "/dev/cdrom"
2001-08-21 19:17:03 +02:00
#define DEFAULT_DVD_DEVICE "/dev/dvd"
2001-08-12 15:34:24 +02:00
#endif
2001-08-20 23:20:03 +02:00
2001-05-22 09:45:35 +02:00
/*----------------------------------------------------------------------------
**
** NOTE: Instead of modifying these definitions here, use the
** --enable/--disable options of the ./configure script!
** See ./configure --help for details.
**
*---------------------------------------------------------------------------*/
2001-02-24 21:28:24 +01:00
2007-12-28 18:23:57 +01:00
/* C99 *lrint* and round* functions available */
$_def_llrint
$_def_lrint
2002-11-05 08:34:55 +01:00
$_def_lrintf
2007-12-28 18:23:57 +01:00
$_def_round
$_def_roundf
2002-11-05 08:34:55 +01:00
2007-07-11 21:47:20 +02:00
/* mkstemp support */
$_def_mkstemp
2001-11-23 19:25:09 +01:00
/* nanosleep support */
$_def_nanosleep
2003-03-21 17:06:11 +01:00
/* SMB support */
$_def_smbsupport
2001-02-24 21:28:24 +01:00
/* termcap flag for getch2.c */
2001-11-17 04:53:05 +01:00
$_def_termcap
2001-06-09 01:30:09 +02:00
2001-11-19 17:42:01 +01:00
/* termios flag for getch2.c */
$_def_termios
2001-12-03 16:22:03 +01:00
$_def_termios_h
$_def_termios_sys_h
2001-11-19 17:42:01 +01:00
2001-09-01 21:36:44 +02:00
/* enable PNG support */
2001-11-17 04:53:05 +01:00
$_def_png
2001-02-24 21:28:24 +01:00
2002-03-10 23:49:18 +01:00
/* enable JPEG support */
2006-06-16 23:17:47 +02:00
$_def_jpeg
2002-03-10 23:49:18 +01:00
2004-10-24 00:43:19 +02:00
/* enable PNM support */
$_def_pnm
/* enable md5sum support */
$_def_md5sum
2008-06-20 21:33:32 +02:00
/* enable yuv4mpeg support */
$_def_yuv4mpeg
2002-05-12 03:07:25 +02:00
/* enable GIF support */
$_def_gif
2002-05-13 22:52:10 +02:00
$_def_gif_4
2003-02-19 17:55:14 +01:00
$_def_gif_tvt_hack
2002-05-12 03:07:25 +02:00
2006-08-22 01:19:11 +02:00
/* enable bitmap font support */
$_def_bitmap_font
2002-08-28 22:52:02 +02:00
/* enable FreeType support */
$_def_freetype
2003-12-08 13:14:32 +01:00
/* enable Fontconfig support */
$_def_fontconfig
2006-07-07 20:26:51 +02:00
/* enable SSA/ASS support */
$_def_ass
2003-03-21 17:54:03 +01:00
/* enable FriBiDi usage */
$_def_fribidi
2004-05-08 19:52:25 +02:00
/* enable ENCA usage */
$_def_enca
2002-10-13 23:40:10 +02:00
/* liblzo support */
2002-10-29 17:50:34 +01:00
$_def_liblzo
2006-01-09 16:44:15 +01:00
#ifdef USE_LIBLZO
#define CONFIG_LZO 1
#endif
2002-10-13 23:40:10 +02:00
2001-10-23 15:59:10 +02:00
/* libmad support */
2001-11-17 04:53:05 +01:00
$_def_mad
2001-10-23 15:59:10 +02:00
2001-09-01 21:36:44 +02:00
/* enable OggVorbis support */
2001-11-17 04:53:05 +01:00
$_def_vorbis
2002-12-04 21:27:36 +01:00
$_def_tremor
2005-11-05 12:58:25 +01:00
/* enable Speex support */
$_def_speex
2005-07-10 19:14:12 +02:00
/* enable musepack support */
$_def_musepack
2003-05-11 20:29:07 +02:00
/* enable OggTheora support */
$_def_theora
2002-03-19 00:30:04 +01:00
/* enable FAAD (AAC) support */
$_def_faad
2003-09-21 19:05:51 +02:00
$_def_faad_internal
2002-03-19 00:30:04 +01:00
2005-04-25 09:07:57 +02:00
/* enable FAAC (AAC encoder) support */
$_def_faac
2008-02-23 13:47:19 +01:00
/* enable libdca support */
$_def_libdca
2004-12-23 03:09:52 +01:00
/* enable LADSPA plugin support */
$_def_ladspa
2003-05-17 14:24:01 +02:00
/* enable network */
$_def_network
2001-06-09 01:30:09 +02:00
2003-08-15 21:13:23 +02:00
/* enable ftp support */
$_def_ftp
2005-02-27 05:25:12 +01:00
/* enable vstream support */
$_def_vstream
2003-06-11 18:48:09 +02:00
/* enable winsock2 instead of Unix functions*/
$_def_winsock2
2002-08-29 09:07:12 +02:00
/* define this to use inet_aton() instead of inet_pton() */
$_def_use_aton
2002-06-11 16:29:51 +02:00
/* enables / disables cdparanoia support */
$_def_cdparanoia
2006-12-04 21:20:32 +01:00
$_def_cddb
2002-06-11 16:29:51 +02:00
2003-01-31 02:47:55 +01:00
/* enables / disables VIDIX usage */
2002-01-11 18:20:43 +01:00
$_def_vidix
2007-04-14 12:39:17 +02:00
$_def_vidix_drv_cyberblade
2007-05-10 20:47:27 +02:00
$_def_vidix_drv_ivtv
2007-04-14 12:39:17 +02:00
$_def_vidix_drv_mach64
$_def_vidix_drv_mga
$_def_vidix_drv_mga_crtc2
$_def_vidix_drv_nvidia
$_def_vidix_drv_pm3
$_def_vidix_drv_radeon
$_def_vidix_drv_rage128
2008-02-29 21:01:28 +01:00
$_def_vidix_drv_s3
2007-04-14 12:39:17 +02:00
$_def_vidix_drv_sis
$_def_vidix_drv_unichrome
2006-03-29 00:44:16 +02:00
$_def_vidix_pfx
2002-01-11 18:20:43 +01:00
2002-02-03 13:43:18 +01:00
/* enables / disables new input joystick support */
$_def_joystick
2002-11-16 04:06:55 +01:00
/* enables / disables QTX codecs */
2003-05-29 13:50:23 +02:00
$_def_qtx
2008-04-26 12:53:32 +02:00
$_def_qtx_win32
2002-11-16 04:06:55 +01:00
2002-11-15 00:49:05 +01:00
/* enables / disables osd menu */
$_def_menu
2002-12-05 01:05:57 +01:00
/* enables / disables subtitles sorting */
$_def_sortsub
2002-12-22 22:01:01 +01:00
/* XMMS input plugin support */
$_def_xmms
#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
2003-03-26 12:35:13 +01:00
/* enables inet6 support */
$_def_inet6
/* do we have gethostbyname2? */
$_def_gethostbyname2
2001-02-24 21:28:24 +01:00
/* Extension defines */
2007-06-19 15:55:22 +02:00
`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
2001-02-24 21:28:24 +01:00
2003-06-09 14:09:39 +02:00
$_def_altivec_h // enables usage of altivec.h
2008-05-30 13:45:08 +02:00
$_def_altivec_vector_braces
2003-06-09 14:09:39 +02:00
2001-02-24 21:28:24 +01:00
/* libvo options */
2001-11-17 23:50:30 +01:00
#define SCREEN_SIZE_X 1
#define SCREEN_SIZE_Y 1
2001-11-17 04:53:05 +01:00
$_def_x11
$_def_xv
2003-06-21 03:47:26 +02:00
$_def_xvmc
2001-11-17 04:53:05 +01:00
$_def_vm
2005-02-02 15:07:13 +01:00
$_def_xf86keysym
2001-11-17 04:53:05 +01:00
$_def_xinerama
$_def_gl
2003-09-19 16:33:51 +02:00
$_def_gl_win32
2001-11-17 04:53:05 +01:00
$_def_dga
2007-08-31 15:08:13 +02:00
$_def_dga1
2001-11-17 04:53:05 +01:00
$_def_dga2
$_def_sdl
2001-05-05 23:37:37 +02:00
/* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
2001-11-17 04:53:05 +01:00
$_def_sdlbuggy
2002-09-28 21:03:50 +02:00
$_def_directx
2001-11-17 04:53:05 +01:00
$_def_ggi
2005-05-11 10:01:52 +02:00
$_def_ggiwmh
2001-11-17 04:53:05 +01:00
$_def_3dfx
2006-05-17 22:56:49 +02:00
$_def_s3fb
2001-11-17 04:53:05 +01:00
$_def_tdfxfb
2003-03-07 19:45:02 +01:00
$_def_tdfxvid
2007-08-03 19:14:35 +02:00
$_def_xvr100
2001-12-03 02:09:36 +01:00
$_def_directfb
2002-08-05 13:42:29 +02:00
$_def_directfb_version
2006-10-14 20:00:26 +02:00
$_def_dfbmga
2002-01-17 02:27:20 +01:00
$_def_zr
2002-09-09 00:41:53 +02:00
$_def_bl
2001-11-17 04:53:05 +01:00
$_def_mga
$_def_xmga
$_def_fbdev
2002-05-13 15:15:40 +02:00
$_def_dxr2
2001-11-17 04:53:05 +01:00
$_def_dxr3
2006-07-20 00:02:09 +02:00
$_def_ivtv
2007-07-29 21:20:55 +02:00
$_def_v4l2
2001-11-17 04:53:05 +01:00
$_def_dvb
2003-03-16 21:13:28 +01:00
$_def_dvb_in
2001-11-17 04:53:05 +01:00
$_def_svga
2002-02-07 03:29:55 +01:00
$_def_vesa
2007-12-22 12:09:43 +01:00
$_def_xss
2001-11-17 04:53:05 +01:00
$_def_xdpms
$_def_aa
2004-04-06 02:04:48 +02:00
$_def_caca
2003-08-24 20:26:37 +02:00
$_def_tga
2004-09-21 21:50:54 +02:00
$_def_toolame
2005-05-07 16:50:14 +02:00
$_def_twolame
2001-02-24 21:28:24 +01:00
2001-08-25 23:05:23 +02:00
/* used by GUI: */
2001-11-17 04:53:05 +01:00
$_def_xshape
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
#if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
#define X11_FULLSCREEN 1
2001-02-24 21:28:24 +01:00
#endif
2003-11-02 14:45:24 +01:00
#endif /* MPLAYER_CONFIG_H */
2001-02-24 21:28:24 +01:00
EOF
2007-08-27 13:40:25 +02:00
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
2007-11-22 17:46:48 +01:00
cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
2007-08-27 13:40:25 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
cat << EOF
2007-04-27 12:16:25 +02:00
Config files successfully generated by ./configure $_configuration !
2001-10-13 18:53:37 +02:00
2001-11-17 04:53:05 +01:00
Install prefix: $_prefix
Data directory: $_datadir
2001-12-25 22:58:10 +01:00
Config direct.: $_confdir
2001-11-29 02:18:05 +01:00
2002-08-05 03:31:47 +02:00
Byte order: $_byte_order
2002-05-03 11:43:36 +02:00
Optimizing for: $_optimizing
2003-02-21 00:32:47 +01:00
Languages:
Messages/GUI: $_language
EOF
2008-05-18 18:40:20 +02:00
echo ${_echo_n} " Manual pages: $MAN_LANG_ALL ${_echo_c}"
2006-11-05 01:02:48 +01:00
test "$LANGUAGES" = en && echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
2003-02-21 00:32:47 +01:00
echo
2008-05-03 22:14:50 +02:00
2003-02-21 00:32:47 +01:00
cat << EOF
2001-11-29 02:18:05 +01:00
Enabled optional drivers:
Input: $_inputmodules
Codecs: $_codecmodules
Audio output: $_aomodules
Video output: $_vomodules
2002-03-12 08:16:29 +01:00
Disabled optional drivers:
Input: $_noinputmodules
Codecs: $_nocodecmodules
Audio output: $_noaomodules
Video output: $_novomodules
2001-11-17 04:53:05 +01:00
'config.h' and 'config.mak' contain your configuration options.
2002-08-04 00:48:41 +02:00
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
compile *** DO NOT REPORT BUGS if you tweak these files ***
2001-11-17 04:53:05 +01:00
'make' will now compile MPlayer and 'make install' will install it.
2001-10-13 18:53:37 +02:00
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
2001-02-24 21:28:24 +01:00
EOF
2001-08-22 10:51:19 +02:00
2001-10-12 01:41:43 +02:00
if test "$_mtrr" = yes ; then
2004-11-11 03:27:15 +01:00
echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
2001-11-17 04:53:05 +01:00
echo
2001-02-24 21:28:24 +01:00
fi
2007-11-23 00:08:35 +01:00
if ! x86_32; then
2001-11-17 04:53:05 +01:00
cat <<EOF
2002-12-29 20:58:56 +01:00
NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
2004-05-07 13:25:07 +02:00
operating system ($system_name). You may encounter a few files that cannot
be played due to missing open source video/audio codec support.
2002-05-23 16:38:40 +02:00
2001-10-13 18:53:37 +02:00
EOF
2001-02-24 21:28:24 +01:00
fi
2001-11-28 18:52:25 +01:00
2001-11-17 04:53:05 +01:00
cat <<EOF
2006-10-30 22:28:44 +01:00
Check $TMPLOG if you wonder why an autodetection failed (make sure
development headers/packages are installed).
NOTE: The --enable-* parameters unconditionally force options on, completely
skipping autodetection. This behavior is unlike what you may be used to from
autoconf-based configure scripts that can decide to override you. This greater
level of control comes at a price. You may have to provide the correct compiler
and linker flags yourself.
If you used one of these options (except --enable-gui and similar ones that
turn on internal features) and experience a compilation or linking failure,
make sure you have passed the necessary compiler/linker flags to configure.
2002-01-07 13:17:21 +01:00
2004-06-15 09:01:02 +02:00
If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
2001-11-17 04:53:05 +01:00
EOF
2005-07-10 19:01:49 +02:00
if test "$_warn_CFLAGS" = yes; then
cat <<EOF
2006-04-27 21:06:25 +02:00
MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
2005-07-10 19:01:49 +02:00
*** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
It is strongly recommended to let MPlayer choose the correct CFLAGS!
To do so, execute 'CFLAGS= ./configure <options>'
EOF
fi
2001-06-05 04:36:12 +02:00
# Last move:
2007-08-27 13:40:25 +02:00
rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"