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
#
2008-10-03 23:49:25 +02:00
# History / Contributors: Check the Subversion 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
#
2010-09-26 21:33:48 +02:00
# If you want to add a new check for $feature, look at the existing checks
# and try to use helper functions where you can.
2006-04-27 16:26:57 +02:00
#
# 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
2009-02-08 23:49:52 +01:00
# def_feature : '#define ... 1' or '#undef ...' for conditional compilation
2006-04-27 16:26:57 +02:00
# _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
2008-10-04 19:15:39 +02:00
export LC_ALL=C
2005-05-09 23:39:17 +02:00
2006-11-28 19:29:24 +01:00
# Store the configure line that was used
2010-06-09 11:27:29 +02:00
configuration="$*"
2006-11-28 19:29:24 +01:00
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() {
2010-05-30 14:14:40 +02:00
source="$1"
shift
2001-11-19 01:38:41 +01:00
echo >> "$TMPLOG"
2010-05-30 14:14:40 +02:00
cat "$source" >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
echo >> "$TMPLOG"
2011-01-21 00:44:26 +01:00
echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o $TMPEXE $@" >> "$TMPLOG"
2007-08-14 16:52:22 +02:00
rm -f "$TMPEXE"
2011-01-21 00:44:26 +01:00
$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
2009-03-27 18:14:58 +01:00
TMPRES="$?"
2001-11-19 01:38:41 +01:00
echo >> "$TMPLOG"
echo >> "$TMPLOG"
2009-03-27 18:14:58 +01:00
return "$TMPRES"
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++
}
2010-07-02 01:03:40 +02:00
cflag_check() {
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
compile_check $TMPC $@
}
2011-01-20 12:21:34 +01:00
header_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { return 0; }
EOF
shift
compile_check $TMPC $@
}
return_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { return $2; }
EOF
shift 2
compile_check $TMPC $@
}
2010-09-27 02:02:59 +02:00
statement_check() {
2010-07-01 12:14:30 +02:00
cat > $TMPC << EOF
#include <$1>
2010-07-02 11:38:46 +02:00
int main(void) { $2; return 0; }
2010-07-01 12:14:30 +02:00
EOF
2010-08-27 18:19:24 +02:00
shift
2010-07-01 12:14:30 +02:00
shift
compile_check $TMPC $@
}
2011-01-05 16:59:43 +01:00
define_statement_check() {
cat > $TMPC << EOF
#define $1
#include <$2>
int main(void) { $3; return 0; }
EOF
shift 3
compile_check $TMPC $@
}
2011-01-20 12:21:34 +01:00
return_statement_check() {
2010-06-16 21:09:06 +02:00
cat > $TMPC << EOF
#include <$1>
2011-01-20 12:21:34 +01:00
int main(void) { $2; return $3; }
2010-06-16 21:09:06 +02:00
EOF
2011-01-20 12:21:34 +01:00
shift 3
2010-06-16 21:09:06 +02:00
compile_check $TMPC $@
}
2010-09-14 15:37:47 +02:00
inline_asm_check() {
cat > $TMPC << EOF
int main(void) { __asm__ volatile ($1); return 0; }
EOF
shift
compile_check $TMPC $@
}
2010-09-18 11:49:12 +02:00
# The following checks are special and should only be used with broken and
# non-selfsufficient headers that do not include all of their dependencies.
2010-07-29 10:44:44 +02:00
header_check_broken() {
cat > $TMPC << EOF
#include <$1>
#include <$2>
int main(void) { return 0; }
EOF
shift
shift
compile_check $TMPC $@
}
2010-09-27 02:02:59 +02:00
statement_check_broken() {
2010-09-18 11:49:12 +02:00
cat > $TMPC << EOF
#include <$1>
#include <$2>
int main(void) { $3; return 0; }
EOF
shift 3
compile_check $TMPC $@
}
2008-11-16 14:04:16 +01:00
yasm_check() {
echo >> "$TMPLOG"
cat "$TMPS" >> "$TMPLOG"
echo >> "$TMPLOG"
echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
rm -f "$TMPEXE"
$_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
2009-03-27 18:14:58 +01:00
TMPRES="$?"
2008-11-16 14:04:16 +01:00
echo >> "$TMPLOG"
echo >> "$TMPLOG"
2009-03-27 18:14:58 +01:00
return "$TMPRES"
2008-11-16 14:04:16 +01:00
}
2012-02-27 14:51:35 +01:00
pkg_config_add() {
2012-03-04 20:53:42 +01:00
unset IFS # shell should not be used for programming
2012-02-27 14:51:35 +01:00
echo >> "$TMPLOG"
echo "$_pkg_config --cflags $@" >> "$TMPLOG"
ctmp=$($_pkg_config --cflags "$@" 2>> "$TMPLOG") || return $?
echo >> "$TMPLOG"
echo "$_pkg_config --libs $@" >> "$TMPLOG"
ltmp=$($_pkg_config --libs "$@" 2>> "$TMPLOG") || return $?
echo >> "$TMPLOG"
echo "cflags: $ctmp" >> "$TMPLOG"
echo "libs: $ltmp" >> "$TMPLOG"
echo >> "$TMPLOG"
extra_cflags="$extra_cflags $ctmp"
extra_ldflags="$extra_ldflags $ltmp"
}
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() {
2009-04-15 22:00:26 +02:00
test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
2001-12-01 18:17:32 +01:00
}
2009-04-15 19:08:41 +02:00
aix() { issystem "AIX"; }
amigaos() { issystem "AmigaOS"; }
beos() { issystem "BEOS"; }
bsdos() { issystem "BSD/OS"; }
cygwin() { issystem "CYGWIN"; }
darwin() { issystem "Darwin"; }
dragonfly() { issystem "DragonFly"; }
freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; }
gnu() { issystem "GNU"; }
hpux() { issystem "HP-UX"; }
irix() { issystem "IRIX"; }
linux() { issystem "Linux"; }
mingw32() { issystem "MINGW32"; }
morphos() { issystem "MorphOS"; }
netbsd() { issystem "NetBSD"; }
openbsd() { issystem "OpenBSD"; }
qnx() { issystem "QNX"; }
sunos() { issystem "SunOS"; }
win32() { cygwin || mingw32; }
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
2008-08-05 00:38:57 +02:00
ppc|ppc64|powerpc|powerpc64) 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
2009-02-21 23:08:50 +01:00
alpha*) return 0;;
2003-10-22 20:23:28 +02:00
*) return 1;;
esac
2002-06-06 18:46:05 +02:00
}
2006-10-08 15:49:16 +02:00
arm() {
case "$host_arch" in
2010-01-17 00:22:43 +01:00
arm*) return 0;;
2006-10-08 15:49:16 +02:00
*) 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() {
2010-05-09 13:20:15 +02:00
if test "$res_comment" ; then
res_comment="($res_comment)"
2005-09-12 12:05:06 +02:00
fi
2010-05-09 13:20:15 +02:00
echo "Result is: $@ $res_comment" >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
echo "##########################################" >> "$TMPLOG"
echo "" >> "$TMPLOG"
2010-05-09 13:20:15 +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
2009-04-15 22:00:26 +02:00
case $(echo -n) in
2010-01-04 13:24:07 +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
2010-03-28 13:49:09 +02:00
msg_lang_all=''
ls po/*.po >/dev/null 2>&1 && msg_lang_all=$(echo po/*.po | sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
2009-04-15 22:00:26 +02:00
man_lang_all=$(echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
doc_lang_all=$(echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\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]
2010-03-08 21:48:50 +01:00
--localedir=DIR directory for locale tree [PREFIX/share/locale]
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]
2001-10-23 20:32:55 +02:00
Optional features:
2006-11-20 17:14:01 +01:00
--disable-mplayer disable MPlayer compilation [enable]
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]
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
2002-09-09 21:23:06 +02:00
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
2010-07-17 15:14:53 +02:00
--disable-networking disable networking [enable]
2008-08-29 22:05:08 +02:00
--enable-winsock2_h enable winsock2_h [autodetect]
2006-11-06 01:09:07 +01:00
--enable-smb enable Samba (SMB) input [autodetect]
2012-03-04 19:38:42 +01:00
--enable-live enable LIVE555 Streaming Media [disable]
2007-09-19 23:38:22 +02:00
--enable-nemesi enable Nemesi Streaming Media [autodetect]
2009-05-05 19:15:54 +02:00
--disable-vcd disable VCD support [autodetect]
2010-07-05 19:04:46 +02:00
--disable-bluray disable Blu-ray support [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
--disable-sortsub disable subtitle sorting [enabled]
--enable-fribidi enable the FriBiDi libs [autodetect]
--disable-enca disable ENCA charset oracle library [autodetect]
2008-08-03 18:16:10 +02:00
--enable-macosx-finder enable Mac OS X Finder invocation parameter
parsing [disabled]
2006-11-06 01:09:07 +01:00
--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]
2011-07-06 19:41:48 +02:00
--disable-libass disable subtitle rendering with libass [autodetect]
2006-11-06 01:09:07 +01:00
--enable-rpath enable runtime linker path for extra libs [disabled]
2012-02-27 17:18:49 +01:00
--disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
2003-10-27 02:06:35 +01:00
2002-09-09 21:23:06 +02:00
Codecs:
2010-01-04 13:24:07 +01:00
--enable-gif enable GIF support [autodetect]
--enable-png enable PNG input/output support [autodetect]
--enable-mng enable MNG input support [autodetect]
--enable-jpeg enable JPEG input/output support [autodetect]
--enable-libcdio enable libcdio support [autodetect]
2010-03-09 13:01:42 +01:00
--disable-win32dll disable Win32 DLL support [autodetect]
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]
2007-07-13 19:08:37 +02:00
--disable-libnut disable libnut [autodetect]
2011-12-11 06:48:26 +01:00
--enable-libav skip Libav autodetection [autodetect]
2006-11-06 01:09:07 +01:00
--disable-libvorbis disable libvorbis support [autodetect]
2011-02-01 20:30:53 +01:00
--disable-tremor disable Tremor [autodetect if no libvorbis]
2006-11-06 01:09:07 +01:00
--disable-speex disable Speex support [autodetect]
--enable-theora enable OggTheora libraries [autodetect]
2011-01-01 15:27:41 +01:00
--enable-faad enable FAAD2 (AAC) [autodetect]
2006-11-06 01:09:07 +01:00
--disable-ladspa disable LADSPA plugin support [autodetect]
2009-04-02 21:01:23 +02:00
--disable-libbs2b disable libbs2b audio filter support [autodetect]
2006-11-06 01:09:07 +01:00
--disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
2010-06-30 11:55:14 +02:00
--disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
2006-11-06 01:09:07 +01:00
--disable-mad disable libmad (MPEG audio) support [autodetect]
--enable-xmms enable XMMS input plugin support [disabled]
2007-07-22 18:24:25 +02:00
--enable-libdca enable libdca support [autodetect]
2009-04-25 19:52:55 +02:00
--disable-liba52 disable liba52 [autodetect]
2011-01-28 20:06:27 +01:00
--enable-musepack enable libmpcdec support (deprecated, libavcodec
Musepack decoder is preferred) [disabled]
2006-11-06 01:09:07 +01:00
2002-09-09 21:23:06 +02:00
Video output:
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]
2008-11-18 13:23:42 +01:00
--enable-direct3d enable Direct3D video output [autodetect]
2006-11-06 01:09:07 +01:00
--enable-directx enable DirectX 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]
2009-07-26 04:55:40 +02:00
--enable-mga enable mga_vid video output [autodetect]
--enable-xmga enable mga_vid X11 video output [autodetect]
2006-11-06 01:09:07 +01:00
--enable-xv enable Xv video output [autodetect]
2009-02-16 21:58:13 +01:00
--enable-vdpau enable VDPAU acceleration [autodetect]
2006-11-06 01:09:07 +01:00
--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-3dfx enable obsolete /dev/3dfx video output [disable]
--enable-tdfxfb enable tdfxfb video output [disable]
--enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
2008-08-03 22:04:03 +02:00
--enable-wii enable Nintendo Wii/GameCube video output [disable]
2006-11-06 01:09:07 +01:00
--enable-directfb enable DirectFB video output [autodetect]
2010-01-04 13:24:07 +01:00
--enable-bl enable Blinkenlights video output [disable]
2006-11-06 01:09:07 +01:00
--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]
2010-01-04 13:24:07 +01:00
--disable-pnm disable PNM video output [enable]
--disable-md5sum disable md5sum video output [enable]
--disable-yuv4mpeg disable yuv4mpeg video output [enable]
2009-04-25 19:48:48 +02:00
--disable-corevideo disable CoreVideo video output [autodetect]
2011-10-15 18:44:00 +02:00
--disable-cocoa disable Cocoa OpenGL backend [autodetect]
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]
2011-06-24 15:56:43 +02:00
--disable-rsound disable RSound 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]
2009-10-06 04:08:33 +02:00
--enable-openal enable OpenAL audio output [disable]
2006-11-06 01:09:07 +01:00
--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]
2009-04-25 19:48:48 +02:00
--disable-coreaudio disable CoreAudio audio output [autodetect]
2006-11-06 01:09:07 +01:00
--disable-select disable using select() on the audio device [enable]
2001-10-13 18:53:37 +02:00
2009-06-14 16:55:01 +02:00
Language options:
2010-03-08 21:48:50 +01:00
--enable-translation enable support for translated output [disable]
2009-06-14 16:55:01 +02:00
--charset=charset convert the console messages to this character set
--language-doc=lang language to use for the documentation [en]
--language-man=lang language to use for the man pages [en]
2010-03-28 13:49:09 +02:00
--language-msg=lang extra languages for program messages [all]
2009-06-14 16:55:01 +02:00
--language=lang default language to use [en]
Specific options override --language. You can pass a list of languages separated
by whitespace or commas instead of a single language. Nonexisting translations
2010-03-28 13:49:09 +02:00
will be dropped from each list. All translations available in the list will be
installed. The value "all" will activate all translations. The LINGUAS
environment variable is honored. In all cases the fallback is English.
The program always supports English-language output; additional message
languages are only installed if --enable-translation is also specified.
Available values for --language-doc are: all $doc_lang_all
Available values for --language-man are: all $man_lang_all
Available values for --language-msg are: all $msg_lang_all
2009-06-14 16:55:01 +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]
2012-01-31 19:36:16 +01:00
--enable-cross-compile enable cross-compilation [disable]
2006-11-06 01:09:07 +01:00
--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]
2008-11-28 11:53:09 +01:00
--nm=NM nm tool to build MPlayer [nm]
2008-11-16 14:04:16 +01:00
--yasm=YASM Yasm assembler to build MPlayer [yasm]
2007-08-16 17:16:52 +02:00
--ar=AR librarian to build MPlayer [ar]
2012-01-31 08:30:09 +01:00
--pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
2007-08-16 17:16:52 +02:00
--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
--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]
2009-01-04 14:05:24 +01:00
--enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
2008-08-18 00:02:05 +02:00
--enable-armvfp enable ARM VFP (ARM) [autodetect]
2009-09-19 15:58:38 +02:00
--enable-neon enable NEON (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]
2001-10-23 20:32:55 +02:00
2009-03-24 10:32:35 +01:00
Use these options if autodetection fails:
2009-03-24 00:37:51 +01:00
--extra-cflags=FLAGS extra CFLAGS
2009-03-24 10:32:35 +01:00
--extra-ldflags=FLAGS extra LDFLAGS
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
2006-08-26 22:55:53 +02:00
2006-11-06 01:09:07 +01:00
--with-sdl-config=PATH path to sdl*-config
--with-dvdnav-config=PATH path to dvdnav-config
2009-09-27 21:22:48 +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
2010-01-19 14:35:57 +01:00
_fast_clz=auto
2006-10-08 15:49:16 +02:00
_armv5te=auto
2007-05-14 00:29:10 +02:00
_armv6=auto
2009-01-04 14:05:24 +01:00
_armv6t2=auto
2008-08-18 00:02:05 +02:00
_armvfp=auto
2009-09-19 15:58:38 +02:00
neon=auto
2006-10-08 15:49:16 +02:00
_iwmmxt=auto
2007-09-06 11:36:01 +02:00
_altivec=auto
2002-12-05 00:29:41 +01:00
_install=install
2012-01-31 08:29:53 +01:00
_pkg_config=auto
_ranlib=auto
_windres=auto
_cc=auto
_ar=auto
2001-10-23 20:32:55 +02:00
test "$CC" && _cc="$CC"
2001-07-28 07:36:45 +02:00
_as=auto
2008-11-28 11:53:09 +01:00
_nm=auto
2012-01-31 08:29:53 +01:00
_yasm=auto
2002-04-24 22:33:12 +02:00
_runtime_cpudetection=no
2012-01-31 19:36:16 +01:00
_cross_compile=no
2007-01-31 00:18:51 +01:00
_prefix="/usr/local"
2010-10-31 02:19:56 +02:00
ffmpeg=auto
ffmpeg_internals=no
2007-01-31 00:18:51 +01:00
_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
2009-02-16 21:58:13 +01:00
_vdpau=auto
2007-01-31 00:18:51 +01:00
_sdl=auto
2008-11-18 13:23:42 +01:00
_direct3d=auto
2007-01-31 00:18:51 +01:00
_directx=auto
_win32waveout=auto
_nas=auto
_png=auto
2008-11-30 14:22:34 +01:00
_mng=auto
2007-01-31 00:18:51 +01:00
_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
_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
2011-06-24 15:56:43 +02:00
_rsound=auto
2007-10-18 15:34:26 +02:00
_pulse=auto
2007-01-31 00:18:51 +01:00
_jack=auto
2009-10-06 04:08:33 +02:00
_openal=no
2007-01-31 00:18:51 +01:00
_libcdio=auto
_mad=auto
2008-09-01 19:56:02 +02:00
_tremor=auto
2007-01-31 00:18:51 +01:00
_libvorbis=auto
_speex=auto
_theora=auto
2010-06-30 11:55:14 +02:00
_mpg123=auto
2008-09-15 18:32:31 +02:00
_liba52=auto
2007-07-22 18:24:25 +02:00
_libdca=auto
2008-09-01 19:46:39 +02:00
_faad=auto
2007-01-31 00:18:51 +01:00
_ladspa=auto
2009-04-02 21:01:23 +02:00
_libbs2b=auto
2007-01-31 00:18:51 +01:00
_xmms=no
2009-05-05 19:15:54 +02:00
_vcd=auto
2010-07-05 19:04:46 +02:00
_bluray=auto
2007-01-31 00:18:51 +01:00
_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
2012-03-04 19:38:42 +01:00
_live=no
2007-09-19 23:38:22 +02:00
_nemesi=auto
_native_rtsp=yes
2007-01-31 00:18:51 +01:00
_xinerama=auto
2009-07-26 04:55:40 +02:00
_mga=auto
_xmga=auto
2007-01-31 00:18:51 +01:00
_vm=auto
_xf86keysym=auto
_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-01-31 00:18:51 +01:00
_pvr=auto
2010-07-17 15:14:53 +02:00
networking=yes
2008-08-29 22:05:08 +02:00
_winsock2_h=auto
2008-08-03 17:57:18 +02:00
_smb=auto
2007-01-31 00:18:51 +01:00
_joystick=no
_xvid=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
_termcap=auto
_termios=auto
_3dfx=no
_s3fb=no
2008-08-03 22:04:03 +02:00
_wii=no
2007-01-31 00:18:51 +01:00
_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
_bl=no
2009-06-14 15:25:54 +02:00
#language=en
2007-01-31 00:18:51 +01:00
_shm=auto
2010-03-08 21:48:50 +01:00
_translation=no
2007-01-31 00:18:51 +01:00
_charset="UTF-8"
_crash_debug=no
_sighandler=yes
_libdv=auto
_cdparanoia=auto
_cddb=auto
_big_endian=auto
_bitmap_font=yes
_freetype=auto
_fontconfig=auto
_qtx=auto
2009-04-25 19:48:48 +02:00
_coreaudio=auto
_corevideo=auto
2011-10-15 18:44:00 +02:00
_cocoa=auto
2009-09-04 11:35:58 +02:00
quicktime=auto
2008-08-03 18:16:10 +02:00
_macosx_finder=no
2007-01-31 00:18:51 +01:00
_macosx_bundle=auto
_sortsub=yes
_fribidi=auto
_enca=auto
_inet6=auto
_gethostbyname2=auto
2010-09-22 00:26:44 +02:00
_ftp=auto
2011-01-28 20:06:27 +01:00
_musepack=no
2007-01-31 00:18:51 +01:00
_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
2012-02-27 17:18:49 +01:00
libpostproc=auto
2007-01-31 00:18:51 +01:00
_asmalign_pot=auto
2007-02-27 18:13:17 +01:00
_stream_cache=yes
2009-02-10 16:34:44 +01:00
_priority=no
2009-02-04 19:22:28 +01:00
def_dos_paths="#define HAVE_DOS_PATHS 0"
2009-02-08 23:49:52 +01:00
def_stream_cache="#define CONFIG_STREAM_CACHE 1"
2009-02-10 16:34:44 +01:00
def_priority="#undef CONFIG_PRIORITY"
2009-02-08 23:49:52 +01:00
def_pthread_cache="#undef PTHREAD_CACHE"
2011-01-26 20:00:17 +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=*)
2009-04-15 22:00:26 +02:00
_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=*)
2009-04-15 22:00:26 +02:00
_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=*)
2009-04-15 22:00:26 +02:00
_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=*)
2009-04-15 22:00:26 +02:00
_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=*)
2009-04-15 22:00:26 +02:00
_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=*)
2009-04-15 22:00:26 +02:00
_libdir=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--codecsdir=*)
2009-04-15 22:00:26 +02:00
_codecsdir=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
2010-03-08 21:48:50 +01:00
--localedir=*)
_localedir=$(echo $ac_option | cut -d '=' -f 2)
;;
2007-01-31 00:59:39 +01:00
--with-install=*)
2009-04-15 22:00:26 +02:00
_install=$(echo $ac_option | cut -d '=' -f 2 )
2007-01-31 00:59:39 +01:00
;;
--with-sdl-config=*)
2009-04-15 22:00:26 +02:00
_sdlconfig=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--with-dvdnav-config=*)
2009-04-15 22:00:26 +02:00
_dvdnavconfig=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
2008-04-22 23:48:28 +02:00
--with-dvdread-config=*)
2009-04-15 22:00:26 +02:00
_dvdreadconfig=$(echo $ac_option | cut -d '=' -f 2)
2008-04-22 23:48:28 +02:00
;;
2007-01-31 00:59:39 +01:00
2009-03-24 00:37:51 +01:00
--extra-cflags=*)
2009-07-25 06:33:52 +02:00
extra_cflags="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
2009-03-24 00:37:51 +01:00
;;
2009-03-24 01:22:51 +01:00
--extra-ldflags=*)
2009-07-25 06:33:52 +02:00
extra_ldflags="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
2009-03-24 01:22:51 +01:00
;;
2007-01-31 00:33:25 +01:00
--extra-libs=*)
2009-04-15 22:00:26 +02:00
extra_libs=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:33:25 +01:00
;;
--extra-libs-mplayer=*)
2009-04-15 22:00:26 +02:00
libs_mplayer=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:33:25 +01:00
;;
2007-01-31 00:59:39 +01:00
--target=*)
2009-04-15 22:00:26 +02:00
_target=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--cc=*)
2009-04-15 22:00:26 +02:00
_cc=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--host-cc=*)
2009-04-15 22:00:26 +02:00
_host_cc=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--as=*)
2009-04-15 22:00:26 +02:00
_as=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
2008-11-28 11:53:09 +01:00
--nm=*)
2009-04-15 22:00:26 +02:00
_nm=$(echo $ac_option | cut -d '=' -f 2)
2008-11-28 11:53:09 +01:00
;;
2008-11-16 14:04:16 +01:00
--yasm=*)
2009-04-15 22:00:26 +02:00
_yasm=$(echo $ac_option | cut -d '=' -f 2)
2008-11-16 14:04:16 +01:00
;;
2007-08-16 14:41:01 +02:00
--ar=*)
2009-04-15 22:00:26 +02:00
_ar=$(echo $ac_option | cut -d '=' -f 2)
2007-08-16 14:41:01 +02:00
;;
2012-01-31 08:30:09 +01:00
--pkg-config=*)
_pkg_config=$(echo $ac_option | cut -d '=' -f 2)
;;
2007-08-16 14:42:14 +02:00
--ranlib=*)
2009-04-15 22:00:26 +02:00
_ranlib=$(echo $ac_option | cut -d '=' -f 2)
2007-08-16 14:42:14 +02:00
;;
2007-12-28 11:33:22 +01:00
--windres=*)
2009-04-15 22:00:26 +02:00
_windres=$(echo $ac_option | cut -d '=' -f 2)
2007-12-28 11:33:22 +01:00
;;
2007-01-31 00:59:39 +01:00
--charset=*)
2009-04-15 22:00:26 +02:00
_charset=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
2009-06-14 16:55:01 +02:00
--language-doc=*)
language_doc=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-man=*)
language_man=$(echo $ac_option | cut -d '=' -f 2)
;;
2010-03-28 13:49:09 +02:00
--language-msg=*)
language_msg=$(echo $ac_option | cut -d '=' -f 2)
;;
2007-01-31 00:59:39 +01:00
--language=*)
2009-06-14 15:25:54 +02:00
language=$(echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:59:39 +01:00
;;
--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=*)
2009-04-15 22:00:26 +02:00
_debug=$(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2)
2007-01-31 00:33:25 +01:00
;;
--disable-debug)
_debug=
;;
2010-03-08 21:48:50 +01:00
--enable-translation) _translation=yes ;;
--disable-translation) _translation=no ;;
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 ;;
2010-01-04 13:24:07 +01:00
--enable-mplayer) _mplayer=yes ;;
--disable-mplayer) _mplayer=no ;;
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xshape) _xshape=yes ;;
--disable-xshape) _xshape=no ;;
--enable-xss) _xss=yes ;;
--disable-xss) _xss=no ;;
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
2009-02-16 21:58:13 +01:00
--enable-vdpau) _vdpau=yes ;;
--disable-vdpau) _vdpau=no ;;
2010-01-04 13:24:07 +01:00
--enable-sdl) _sdl=yes ;;
--disable-sdl) _sdl=no ;;
2008-11-18 13:23:42 +01:00
--enable-direct3d) _direct3d=yes ;;
--disable-direct3d) _direct3d=no ;;
2007-01-31 00:18:51 +01:00
--enable-directx) _directx=yes ;;
--disable-directx) _directx=no ;;
--enable-win32waveout) _win32waveout=yes ;;
--disable-win32waveout) _win32waveout=no ;;
2010-01-04 13:24:07 +01:00
--enable-nas) _nas=yes ;;
--disable-nas) _nas=no ;;
--enable-png) _png=yes ;;
--disable-png) _png=no ;;
--enable-mng) _mng=yes ;;
--disable-mng) _mng=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 ;;
--enable-yuv4mpeg) _yuv4mpeg=yes ;;
--disable-yuv4mpeg) _yuv4mpeg=no ;;
--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-dxr3) _dxr3=yes ;;
--disable-dxr3) _dxr3=no ;;
2007-01-31 00:18:51 +01:00
--enable-ivtv) _ivtv=yes ;;
--disable-ivtv) _ivtv=no ;;
2007-07-29 21:20:55 +02:00
--enable-v4l2) _v4l2=yes ;;
--disable-v4l2) _v4l2=no ;;
2010-01-04 13:24:07 +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 ;;
2011-06-24 15:56:43 +02:00
--enable-rsound) _rsound=yes ;;
--disable-rsound) _rsound=no ;;
2010-01-04 13:24:07 +01:00
--enable-pulse) _pulse=yes ;;
--disable-pulse) _pulse=no ;;
--enable-jack) _jack=yes ;;
--disable-jack) _jack=no ;;
--enable-openal) _openal=yes ;;
--disable-openal) _openal=no ;;
--enable-mad) _mad=yes ;;
--disable-mad) _mad=no ;;
--enable-libcdio) _libcdio=yes ;;
--disable-libcdio) _libcdio=no ;;
--enable-libvorbis) _libvorbis=yes ;;
--disable-libvorbis) _libvorbis=no ;;
--enable-speex) _speex=yes ;;
--disable-speex) _speex=no ;;
--enable-tremor) _tremor=yes ;;
--disable-tremor) _tremor=no ;;
--enable-theora) _theora=yes ;;
--disable-theora) _theora=no ;;
2010-06-30 11:55:14 +02:00
--enable-mpg123) _mpg123=yes ;;
--disable-mpg123) _mpg123=no ;;
2010-01-04 13:24:07 +01:00
--enable-liba52) _liba52=yes ;;
--disable-liba52) _liba52=no ;;
--enable-libdca) _libdca=yes ;;
--disable-libdca) _libdca=no ;;
--enable-musepack) _musepack=yes ;;
--disable-musepack) _musepack=no ;;
--enable-faad) _faad=yes ;;
--disable-faad) _faad=no ;;
--enable-ladspa) _ladspa=yes ;;
--disable-ladspa) _ladspa=no ;;
--enable-libbs2b) _libbs2b=yes ;;
--disable-libbs2b) _libbs2b=no ;;
--enable-xmms) _xmms=yes ;;
--disable-xmms) _xmms=no ;;
2009-05-05 19:15:54 +02:00
--enable-vcd) _vcd=yes ;;
--disable-vcd) _vcd=no ;;
2010-07-05 19:04:46 +02:00
--enable-bluray) _bluray=yes ;;
--disable-bluray) _bluray=no ;;
2010-01-04 13:24:07 +01:00
--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 ;;
--enable-nemesi) _nemesi=yes ;;
--disable-nemesi) _nemesi=no ;;
--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-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 ;;
--enable-tv-dshow) _tv_dshow=yes ;;
--disable-tv-dshow) _tv_dshow=no ;;
--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 ;;
2010-07-17 15:14:53 +02:00
--enable-networking) networking=yes ;;
--disable-networking) networking=no ;;
2010-01-04 13:24:07 +01:00
--enable-winsock2_h) _winsock2_h=yes ;;
--disable-winsock2_h) _winsock2_h=no ;;
--enable-smb) _smb=yes ;;
--disable-smb) _smb=no ;;
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
--enable-xvid) _xvid=yes ;;
--disable-xvid) _xvid=no ;;
--enable-libnut) _libnut=yes ;;
--disable-libnut) _libnut=no ;;
2011-08-20 23:36:23 +02:00
--enable-libav) ffmpeg=yes ;;
2009-07-26 04:55:40 +02:00
--ffmpeg-source-dir=*)
_ffmpeg_source=$(echo $ac_option | cut -d '=' -f 2 ) ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
--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 ;;
2010-01-04 13:24:07 +01:00
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
2007-01-31 00:18:51 +01:00
--disable-termios) _termios=no ;;
2010-01-04 13:24:07 +01:00
--enable-3dfx) _3dfx=yes ;;
--disable-3dfx) _3dfx=no ;;
--enable-s3fb) _s3fb=yes ;;
--disable-s3fb) _s3fb=no ;;
--enable-wii) _wii=yes ;;
--disable-wii) _wii=no ;;
--enable-tdfxfb) _tdfxfb=yes ;;
--disable-tdfxfb) _tdfxfb=no ;;
--disable-tdfxvid) _tdfxvid=no ;;
--enable-tdfxvid) _tdfxvid=yes ;;
--disable-xvr100) _xvr100=no ;;
--enable-xvr100) _xvr100=yes ;;
--disable-tga) _tga=no ;;
--enable-tga) _tga=yes ;;
--enable-directfb) _directfb=yes ;;
--disable-directfb) _directfb=no ;;
--enable-bl) _bl=yes ;;
--disable-bl) _bl=no ;;
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
--enable-cdparanoia) _cdparanoia=yes ;;
--disable-cdparanoia) _cdparanoia=no ;;
--enable-cddb) _cddb=yes ;;
--disable-cddb) _cddb=no ;;
2007-01-31 00:18:51 +01:00
--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 ;;
2011-07-06 19:41:48 +02:00
--enable-libass) _ass=yes ;;
--disable-libass) _ass=no ;;
2007-01-31 00:18:51 +01:00
--enable-rpath) _rpath=yes ;;
--disable-rpath) _rpath=no ;;
2012-02-27 17:18:49 +01:00
--enable-libpostproc) libpostproc=yes ;;
--disable-libpostproc) libpostproc=no ;;
2007-01-31 00:18:51 +01:00
--enable-fribidi) _fribidi=yes ;;
--disable-fribidi) _fribidi=no ;;
2010-01-04 13:24:07 +01:00
--enable-enca) _enca=yes ;;
--disable-enca) _enca=no ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-inet6) _inet6=yes ;;
--disable-inet6) _inet6=no ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-gethostbyname2) _gethostbyname2=yes ;;
--disable-gethostbyname2) _gethostbyname2=no ;;
2007-01-31 00:18:51 +01:00
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-qtx) _qtx=yes ;;
--disable-qtx) _qtx=no ;;
2009-04-25 19:48:48 +02:00
--enable-coreaudio) _coreaudio=yes ;;
--disable-coreaudio) _coreaudio=no ;;
--enable-corevideo) _corevideo=yes ;;
--disable-corevideo) _corevideo=no ;;
2011-10-15 18:44:00 +02:00
--enable-cocoa) _cocoa=yes ;;
--disable-cocoa) _cocoa=no ;;
2008-08-03 18:16:10 +02:00
--enable-macosx-finder) _macosx_finder=yes ;;
--disable-macosx-finder) _macosx_finder=no ;;
2010-01-04 13:24:07 +01:00
--enable-macosx-bundle) _macosx_bundle=yes ;;
--disable-macosx-bundle) _macosx_bundle=no ;;
2007-01-31 00:18:51 +01:00
--enable-sortsub) _sortsub=yes ;;
--disable-sortsub) _sortsub=no ;;
2010-01-04 13:24:07 +01:00
--enable-crash-debug) _crash_debug=yes ;;
2007-01-31 00:50:30 +01:00
--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
2010-01-04 13:24:07 +01:00
--enable-sse) _sse=yes ;;
2007-01-31 00:18:51 +01:00
--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 ;;
2010-01-19 14:35:57 +01:00
--enable-fast-clz) _fast_clz=yes ;;
--disable-fast-clz) _fast_clz=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 ;;
2009-01-04 14:05:24 +01:00
--enable-armv6t2) _armv6t2=yes ;;
--disable-armv6t2) _armv6t2=no ;;
2008-08-18 00:02:05 +02:00
--enable-armvfp) _armvfp=yes ;;
--disable-armvfp) _armvfp=no ;;
2009-09-19 15:58:38 +02:00
--enable-neon) neon=yes ;;
--disable-neon) neon=no ;;
2007-01-31 00:18:51 +01:00
--enable-iwmmxt) _iwmmxt=yes ;;
--disable-iwmmxt) _iwmmxt=no ;;
2010-01-04 13:24:07 +01:00
--enable-mmx) _mmx=yes ;;
2007-01-31 00:18:51 +01:00
--disable-mmx) # 3Dnow! and MMX2 require MMX
_3dnow=no _3dnowext=no _mmx=no _mmxext=no ;;
*)
2011-02-02 01:18:51 +01:00
echo "Unknown parameter: $ac_option" >&2
2007-01-31 00:18:51 +01:00
exit 1
;;
esac
done
# Atmos: moved this here, to be correct, if --prefix is specified
2010-01-04 13:24:07 +01:00
test -z "$_bindir" && _bindir="$_prefix/bin"
2007-01-31 00:18:51 +01:00
test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
2010-01-04 13:24:07 +01:00
test -z "$_mandir" && _mandir="$_prefix/share/man"
2007-01-31 00:18:51 +01:00
test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
2010-01-04 13:24:07 +01:00
test -z "$_libdir" && _libdir="$_prefix/lib"
2010-03-08 21:48:50 +01:00
test -z "$_localedir" && _localedir="$_prefix/share/locale"
2007-01-31 00:18:51 +01:00
2012-01-31 08:29:53 +01:00
for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
test "$tmpdir" && break
done
mplayer_tmpdir="$tmpdir/mplayer-configure-$RANDOM-$$"
mkdir $mplayer_tmpdir || die "Unable to create tmpdir."
TMPLOG="config.log"
rm -f "$TMPLOG"
echo Parameters configure was run with: > "$TMPLOG"
if test -n "$CFLAGS" ; then
echo ${_echo_n} CFLAGS="'$CFLAGS' ${_echo_c}" >> "$TMPLOG"
fi
if test -n "$PKG_CONFIG_PATH" ; then
echo ${_echo_n} PKG_CONFIG_PATH="'$PKG_CONFIG_PATH' ${_echo_c}" >> "$TMPLOG"
fi
echo ./configure $configuration >> "$TMPLOG"
echo >> "$TMPLOG"
echocheck "cross compilation"
echores $_cross_compile
if test $_cross_compile = yes; then
tmp_run() {
return 0
}
test "$_host_cc" || _host_cc=cc
fi
tool_prefix=""
if test $_cross_compile = yes ; then
# Usually cross-compiler prefixes match with the target triplet
test -n "$_target" && tool_prefix="$_target"-
fi
test "$_ranlib" = auto && _ranlib="$tool_prefix"ranlib
test "$_windres" = auto && _windres="$tool_prefix"windres
test "$_ar" = auto && _ar="$tool_prefix"ar
test "$_yasm" = auto && _yasm="$tool_prefix"yasm
test "$_pkg_config" = auto && _pkg_config="$tool_prefix"pkg-config
if test "$_cc" = auto ; then
if test -n "$tool_prefix" ; then
_cc="$tool_prefix"gcc
else
_cc=cc
fi
fi
2007-01-31 00:18:51 +01:00
# Determine our OS name and CPU architecture
if test -z "$_target" ; then
# OS name
2009-04-15 22:00:26 +02:00
system_name=$(uname -s 2>&1)
2007-01-31 00:18:51 +01:00
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
;;
2009-09-19 14:56:19 +02:00
Haiku)
system_name=BeOS
;;
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
2009-04-15 22:00:26 +02:00
host_arch=$(uname -p 2>&1)
2007-01-31 00:18:51 +01:00
case "$host_arch" in
2008-08-07 13:58:37 +02:00
i386|sparc|ppc|alpha|arm|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
2009-04-15 22:00:26 +02:00
case "$(uname -m 2>&1)" in
2009-09-19 15:36:58 +02:00
x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
2007-01-31 00:18:51 +01:00
ia64) host_arch=ia64 ;;
2009-06-01 11:35:16 +02:00
macppc|ppc) host_arch=ppc ;;
ppc64) host_arch=ppc64 ;;
2007-01-31 00:18:51 +01:00
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 ;;
2008-08-07 13:58:37 +02:00
sh3|sh4|sh4a) host_arch=sh ;;
2002-05-23 16:38:40 +02:00
s390) host_arch=s390 ;;
s390x) host_arch=s390x ;;
2009-08-19 10:47:46 +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"
2010-08-02 06:21:51 +02:00
for i in 2 3; do
system_name=$(echo $_target | cut -d '-' -f $i)
case "$(echo $system_name | tr A-Z a-z)" in
linux) system_name=Linux ;;
freebsd) system_name=FreeBSD ;;
gnu/kfreebsd) system_name=FreeBSD ;;
netbsd) system_name=NetBSD ;;
bsd/os) system_name=BSD/OS ;;
openbsd) system_name=OpenBSD ;;
dragonfly) system_name=DragonFly ;;
sunos) system_name=SunOS ;;
qnx) system_name=QNX ;;
morphos) system_name=MorphOS ;;
amigaos) system_name=AmigaOS ;;
mingw32*) system_name=MINGW32 ;;
*) continue ;;
esac
break
done
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
2009-04-15 22:00:26 +02:00
host_arch=$(echo $_target | cut -d '-' -f 1)
if test $(echo $host_arch) != "x86_64" ; then
host_arch=$(echo $host_arch | tr '_' '-')
2007-09-12 08:59:36 +02:00
fi
2001-06-21 02:06:40 +02:00
fi
2009-03-25 20:48:05 +01:00
extra_cflags="-I. $extra_cflags"
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
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -L/usr/local/lib"
extra_cflags="$extra_cflags -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
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -L/usr/pkg/lib"
extra_cflags="$extra_cflags -I/usr/pkg/include"
2008-03-27 03:04:03 +01:00
fi
2003-04-24 20:55:43 +02:00
if darwin; then
2010-08-03 13:46:55 +02:00
extra_cflags="-mdynamic-no-pic $extra_cflags"
if test "$(basename $_cc)" != "clang" ; then
extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags"
fi
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
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -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"
2010-01-15 10:31:15 +01:00
extra_cflags="$extra_cflags -fno-common"
2007-01-28 23:31:53 +01:00
# -lwinmm is always needed for osdep/timer-win2.c
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lwinmm"
2008-04-13 09:57:35 +02:00
_pe_executable=yes
2008-04-08 20:03:14 +02:00
_timer=timer-win2.c
2009-02-10 16:34:44 +01:00
_priority=yes
2009-02-04 19:22:28 +01:00
def_dos_paths="#define HAVE_DOS_PATHS 1"
2009-02-10 16:34:44 +01:00
def_priority="#define CONFIG_PRIORITY 1"
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
2011-01-26 20:00:17 +01:00
need_shmem=no
2012-01-31 08:31:04 +01:00
extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
2007-02-27 18:13:17 +01:00
fi
2007-03-15 18:06:28 +01:00
if amigaos ; then
_select=no
_sighandler=no
_stream_cache=no
2009-02-08 23:49:52 +01:00
def_stream_cache="#undef CONFIG_STREAM_CACHE"
2009-04-12 19:07:30 +02:00
extra_cflags="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
2007-03-15 18:06:28 +01:00
fi
2007-04-01 01:02:36 +02:00
if qnx ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lph"
2007-04-01 01:02:36 +02:00
fi
2010-07-01 11:00:54 +02:00
TMPC="$mplayer_tmpdir/tmp.c"
TMPCPP="$mplayer_tmpdir/tmp.cpp"
TMPEXE="$mplayer_tmpdir/tmp$_exesuf"
TMPH="$mplayer_tmpdir/tmp.h"
TMPS="$mplayer_tmpdir/tmp.S"
2007-09-30 00:26:35 +02:00
2009-09-19 15:36:58 +02:00
if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
die "Runtime CPU detection only works for x86, x86-64 and PPC!"
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)
2009-04-15 22:00:26 +02:00
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
2009-04-16 12:02:10 +02:00
cc_name=$($_cc -V 2>&1 | head -n 1 | cut -d ',' -f 1)
cc_version=$($_cc -V 2>&1 | head -n 1 | cut -d ',' -f 2 | cut -d ' ' -f 3)
2009-04-15 22:00:26 +02:00
_cc_major=$(echo $cc_version | cut -d '.' -f 1)
_cc_minor=$(echo $cc_version | cut -d '.' -f 2)
2004-08-02 06:24:36 +02:00
# 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
;;
2009-03-18 22:48:35 +01:00
10.1|11.0|11.1)
2004-08-02 06:24:36 +02:00
cc_version="$cc_version, ok"
2002-06-07 00:58:18 +02:00
;;
2001-11-17 04:53:05 +01:00
*)
cc_version="$cc_version, bad"
2008-05-01 19:25:19 +02:00
cc_fail=yes
2001-11-17 04:53:05 +01:00
;;
esac
echores "$cc_version"
2001-06-04 22:12:41 +02:00
else
2010-01-12 22:16:01 +01:00
for _cc in "$_cc" gcc cc ; do
2009-04-16 12:02:10 +02:00
cc_name_tmp=$($_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
2008-05-04 13:35:07 +02:00
if test "$cc_name_tmp" = "gcc"; then
2010-06-27 21:20:38 +02:00
cc_name=$cc_name_tmp
echocheck "$_cc version"
cc_vendor=gnu
cc_version=$($_cc -dumpversion 2>&1)
case $cc_version in
2.96*)
cc_fail=yes
;;
*)
_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"
break
2008-05-04 13:35:07 +02:00
fi
2011-06-25 03:22:43 +02:00
if $_cc -v 2>&1 | grep -q "clang"; then
2010-06-27 21:07:51 +02:00
echocheck "$_cc version"
cc_vendor=clang
cc_version=$($_cc -dumpversion 2>&1)
res_comment="experimental support only"
echores "clang $cc_version"
break
fi
2010-01-12 22:16:01 +01:00
cc_name_tmp=$($_cc -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3)
if test "$cc_name_tmp" = "Sun C"; then
echocheck "$_cc version"
cc_vendor=sun
cc_version=$($_cc -V 2>&1 | head -n 1 | cut -d ' ' -f 4)
2010-05-09 13:20:15 +02:00
res_comment="experimental support only"
2010-01-12 22:16:01 +01:00
echores "Sun C $cc_version"
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-10-06 17:38:56 +02:00
2011-05-31 23:15:14 +02:00
echocheck "working compiler"
cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
echo "yes"
2009-10-26 23:15:19 +01:00
if test -z "$_target" && x86 ; then
cat > $TMPC << EOF
int main(void) {
2009-11-05 20:05:42 +01:00
int test[(int)sizeof(char *)-7];
2009-10-26 23:15:19 +01:00
return 0;
}
EOF
cc_check && host_arch=x86_64 || host_arch=i386
fi
2011-06-11 16:54:59 +02:00
echocheck "host cc"
test "$_host_cc" || _host_cc=$_cc
echores $_host_cc
2012-01-31 08:29:53 +01:00
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
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
2009-04-15 22:00:26 +02:00
_as=$($_cc -print-prog-name=as)
2001-11-17 04:53:05 +01:00
test -z "$_as" && _as=as
fi
2008-11-28 11:53:09 +01:00
if test "$_nm" = auto ; then
2009-04-15 22:00:26 +02:00
_nm=$($_cc -print-prog-name=nm)
2008-11-28 11:53:09 +01:00
test -z "$_nm" && _nm=nm
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"
2010-01-10 22:22:44 +01:00
elif test -r /compat/linux/proc/cpuinfo && ! x86 ; 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
2010-01-10 22:22:44 +01:00
# Don't use it on x86 though, it never reports 3Dnow
2007-01-31 00:18:51 +01:00
_cpuinfo="cat /compat/linux/proc/cpuinfo"
2008-11-15 21:37:08 +01:00
elif darwin && ! x86 ; 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
2009-04-16 12:02:10 +02:00
pname=$($_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1)
pvendor=$($_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
pfamily=$($_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
pmodel=$($_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
pstepping=$($_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
2002-06-14 00:44:28 +02:00
2009-04-16 12:02:10 +02:00
exts=$($_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | head -n 1)
2001-11-14 01:33:39 +01:00
2012-02-28 02:56:44 +01:00
pparam=$(echo $exts | sed -e s/xmm/sse/ -e s/kni/sse/)
2011-06-23 20:42:26 +02:00
# SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
pparam=$(echo $pparam | sed -e 's/sse/sse mmxext/')
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
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
2008-07-15 10:18:08 +02:00
#include <stdlib.h>
2007-03-18 14:38:55 +01:00
#include <signal.h>
2010-09-14 11:41:32 +02:00
static void catch(int sig) { 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-10-16 22:17:56 +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"
2010-01-04 13:24:07 +01:00
_optimizing="$_optimizing $2"
2007-03-18 14:38:55 +01:00
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!"
2010-01-04 13:24:07 +01:00
return 1
2007-03-18 14:38:55 +01:00
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"
2010-09-16 20:58:21 +02:00
extcheck $_cmov "cmov" "cmovb %%eax, %%ebx"
2007-03-18 14:38:55 +01:00
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
2010-07-02 01:52:01 +02:00
cflag_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
2007-03-18 14:38:55 +01:00
fi
fi
2002-05-23 16:38:40 +02:00
2007-06-19 15:55:12 +02:00
2009-01-31 23:37:12 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 0'
2009-03-21 17:00:15 +01:00
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 0'
2010-03-17 15:09:09 +01:00
arch_all='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
2010-03-17 14:20:06 +01:00
subarch_all='X86_32 X86_64 PPC64'
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)
2010-03-17 14:41:54 +01:00
arch='x86'
subarch='x86_32'
2009-02-08 23:49:52 +01: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
2010-01-04 13:24:07 +01:00
# 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
;;
2007-01-31 00:18:51 +01:00
6) iproc=686
2010-01-04 13:24:07 +01:00
# 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
;;
2007-01-31 00:18:51 +01:00
15) iproc=686
2010-01-04 13:24:07 +01:00
# k8 cpu-type only supported in gcc >= 3.4.0, but that will be
# caught and remedied in the optimization tests below.
proc=k8
;;
2007-01-31 00:18:51 +01:00
2010-01-19 14:35:57 +01:00
*) proc=amdfam10 iproc=686
test $_fast_clz = "auto" && _fast_clz=yes
;;
2007-01-31 00:18:51 +01:00
esac
;;
GenuineIntel)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
5) iproc=586
2010-01-04 13:24:07 +01:00
if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then
proc=pentium-mmx # 4 is desktop, 8 is mobile
else
proc=i586
fi
;;
2007-01-31 00:18:51 +01:00
6) iproc=686
2010-01-04 13:24:07 +01:00
if test "$pmodel" -ge 15; then
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
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2010-01-04 13:24:07 +01:00
;;
2007-01-31 00:18:51 +01:00
15) iproc=686
2010-01-04 13:24:07 +01:00
# A nocona in 32-bit mode has no more capabilities than a prescott.
if test "$pmodel" -ge 3; then
proc=prescott
else
proc=pentium4
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2010-01-04 13:24:07 +01:00
fi
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
2010-01-04 13:24:07 +01:00
if test "$pmodel" -ge 8; then
proc=winchip2
elif test "$pmodel" -ge 4; then
proc=winchip-c6
else
proc=i586
fi
;;
2007-01-31 00:18:51 +01:00
6) iproc=686
2010-01-04 13:24:07 +01:00
if test "$pmodel" -ge 9; then
proc=c3-2
else
proc=c3
iproc=586
fi
;;
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
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=no
2007-01-31 00:18:51 +01:00
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
2010-01-04 13:24:07 +01:00
cpuopt=-mtune
2003-10-05 01:06:04 +02:00
else
2010-01-04 13:24:07 +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
if test "$_runtime_cpudetection" = no ; then
2010-06-27 21:07:51 +02:00
if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
2010-07-02 01:52:01 +02:00
cflag_check -march=native && proc=native
2010-04-02 12:13:08 +02:00
fi
2010-05-29 16:44:02 +02:00
if test "$proc" = "amdfam10"; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=k8
2010-05-29 16:44:02 +02:00
fi
2007-01-31 00:18:51 +01:00
if test "$proc" = "k8"; then
2010-07-02 01:52:01 +02:00
cflag_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
2010-07-02 01:52:01 +02:00
cflag_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
2010-07-02 01:52:01 +02:00
cflag_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
2010-07-02 01:52:01 +02:00
if ! cflag_check -march=$proc $cpuopt=$proc; then
if cflag_check -march=i586 $cpuopt=i686; then
2007-01-31 00:18:51 +01:00
proc=i586-i686
2008-05-03 22:14:50 +02:00
else
2007-01-31 00:18:51 +01:00
proc=i586
2010-01-04 13:24:07 +01:00
fi
2007-01-31 00:18:51 +01:00
fi
fi
if test "$proc" = "prescott" ; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=pentium4
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "core2" ; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=pentium-m
2007-01-31 00:18:51 +01:00
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
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=i686
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "i686" || test "$proc" = "pentium-mmx" || test "$proc" = "winchip-c6" || test "$proc" = "winchip2"; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=i586
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "i586"; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=i486
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "i486" ; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=i386
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "i386" ; then
2010-07-02 01:52:01 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=error
2007-01-31 00:18:51 +01:00
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"
2010-07-02 01:52:01 +02:00
cflag_check $_mcpu || _mcpu="$cpuopt=i686"
cflag_check $_mcpu || _mcpu=""
cflag_check $_march $_mcpu || _march=""
2007-01-31 00:18:51 +01:00
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
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2007-03-18 17:30:11 +01:00
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)
2010-03-17 14:41:54 +01:00
arch='ia64'
2008-12-02 17:40:44 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
2007-01-31 00:18:51 +01:00
iproc='ia64'
2006-11-25 18:58:33 +01:00
;;
2007-01-31 00:18:51 +01:00
x86_64|amd64)
2010-03-17 14:41:54 +01:00
arch='x86'
subarch='x86_64'
2009-02-08 23:49:52 +01:00
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
2008-12-02 17:40:44 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 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
2010-01-04 13:24:07 +01:00
cpuopt=-mtune
2007-01-31 00:18:51 +01:00
else
2010-01-04 13:24:07 +01:00
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)
2010-01-18 04:06:43 +01:00
case "$pfamily" in
2010-01-19 14:35:57 +01:00
15) proc=k8
test $_fast_clz = "auto" && _fast_clz=no
;;
2010-01-18 04:06:43 +01:00
*) proc=amdfam10;;
esac
;;
2007-01-31 00:18:51 +01:00
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
2010-01-15 10:10:23 +01:00
test $_fast_cmov = "auto" && _fast_cmov=no
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=no
2007-09-08 20:06:44 +02:00
;;
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"
# This is a stripped-down version of the i386 fallback.
if test "$_runtime_cpudetection" = no ; then
2010-06-27 21:07:51 +02:00
if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
2010-07-02 01:03:40 +02:00
cflag_check -march=native && proc=native
2010-04-02 12:13:08 +02:00
fi
2007-01-31 00:18:51 +01:00
# --- AMD processors ---
2010-06-03 00:09:04 +02:00
if test "$proc" = "amdfam10"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=k8
2010-06-03 00:09:04 +02:00
fi
2007-01-31 00:18:51 +01:00
if test "$proc" = "k8"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=athlon-xp
2007-01-31 00:18:51 +01:00
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
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=error
2007-01-31 00:18:51 +01:00
fi
# --- Intel processors ---
if test "$proc" = "core2"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=x86-64
2010-01-15 10:33:38 +01:00
fi
if test "$proc" = "x86-64"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=nocona
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "nocona"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=pentium4
2007-01-31 00:18:51 +01:00
fi
if test "$proc" = "pentium4"; then
2010-07-02 01:03:40 +02:00
cflag_check -march=$proc $cpuopt=$proc || proc=error
2007-01-31 00:18:51 +01:00
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"
2010-07-02 01:03:40 +02:00
cflag_check $_mcpu || _mcpu="x86-64"
cflag_check $_mcpu || _mcpu=""
cflag_check $_march $_mcpu || _march=""
2007-01-31 00:18:51 +01:00
fi
2008-05-03 22:14:50 +02:00
2010-01-15 10:47:45 +01:00
_optimizing="$proc"
2010-01-15 10:10:23 +01:00
test $_fast_cmov = "auto" && _fast_cmov=yes
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
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
2008-10-04 11:38:10 +02:00
sparc|sparc64)
2010-03-17 14:41:54 +01:00
arch='sparc'
2007-01-31 00:18:51 +01:00
iproc='sparc'
2008-10-04 11:38:10 +02:00
if test "$host_arch" = "sparc64" ; then
_vis='yes'
proc='ultrasparc'
2008-12-23 12:42:11 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
2008-10-04 11:38:10 +02:00
elif sunos ; then
2010-01-04 13:24:07 +01:00
echocheck "CPU type"
karch=$(uname -m)
case "$(echo $karch)" in
sun4) proc=v7 ;;
sun4c) proc=v7 ;;
sun4d) proc=v8 ;;
sun4m) proc=v8 ;;
sun4u) proc=ultrasparc _vis='yes' ;;
sun4v) proc=v9 ;;
*) proc=v8 ;;
esac
echores "$proc"
2007-01-31 00:18:51 +01:00
else
2010-01-04 13:24:07 +01:00
proc=v8
2007-01-31 00:18:51 +01:00
fi
_mcpu="-mcpu=$proc"
_optimizing="$proc"
;;
2010-01-17 00:22:43 +01:00
arm*)
2010-03-17 14:41:54 +01:00
arch='arm'
2007-01-31 00:18:51 +01:00
iproc='arm'
2007-07-26 10:21:42 +02:00
;;
2009-02-16 18:02:16 +01:00
avr32)
2010-03-17 14:41:54 +01:00
arch='avr32'
2009-02-17 23:05:25 +01:00
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
2009-02-16 18:02:16 +01:00
iproc='avr32'
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2009-02-16 18:02:16 +01:00
;;
2009-01-15 16:41:29 +01:00
sh|sh4)
2010-03-17 14:41:54 +01:00
arch='sh4'
2009-01-15 16:41:29 +01:00
iproc='sh4'
2007-01-31 00:18:51 +01:00
;;
2001-11-19 01:38:41 +01:00
2008-08-05 00:38:57 +02:00
ppc|ppc64|powerpc|powerpc64)
2010-03-17 14:41:54 +01:00
arch='ppc'
2009-02-08 23:49:52 +01:00
def_dcbzl='#define HAVE_DCBZL 0'
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
2007-01-31 00:18:51 +01:00
iproc='ppc'
2008-12-23 12:42:11 +01:00
if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2010-03-17 14:41:54 +01:00
subarch='ppc64'
2008-12-23 12:42:11 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
fi
2007-01-31 00:18:51 +01:00
echocheck "CPU type"
case $system_name in
Linux)
2010-01-04 13:24:07 +01:00
proc=$($_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -n 1)
if test -n "$($_cpuinfo | grep altivec)"; then
test $_altivec = auto && _altivec=yes
fi
2007-01-31 00:18:51 +01:00
;;
Darwin)
2010-01-04 13:24:07 +01:00
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
test $_altivec = auto && _altivec=yes
fi
2007-01-31 00:18:51 +01:00
;;
NetBSD)
# only gcc 3.4 works reliably with AltiVec code under NetBSD
2010-01-04 13:24:07 +01:00
case $cc_version in
2*|3.0*|3.1*|3.2*|3.3*)
;;
*)
if [ $(sysctl -n machdep.altivec) -eq 1 ]; then
test $_altivec = auto && _altivec=yes
fi
;;
esac
2007-01-31 00:18:51 +01:00
;;
AIX)
2010-01-04 13:24:07 +01:00
proc=$($_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//')
;;
2007-01-31 00:18:51 +01:00
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
2010-01-04 13:24:07 +01:00
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' ;;
*) ;;
2007-01-31 00:18:51 +01:00
esac
2010-01-04 13:24:07 +01:00
# 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'
2009-02-08 23:49:52 +01:00
def_dcbzl='#define HAVE_DCBZL 1' ;;
2010-01-04 13:24:07 +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
# 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
2007-02-25 23:33:10 +01:00
440EP*) _march='-mcpu=440fp' _mcpu='-mtune=440fp' ;;
440G* ) _march='-mcpu=440' _mcpu='-mtune=440' ;;
2010-01-04 13:24:07 +01:00
*) ;;
esac
fi
# 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
2007-01-31 00:18:51 +01:00
fi
2003-03-21 17:54:03 +01:00
2007-01-31 00:18:51 +01:00
if test -n "$_mcpu"; then
2009-04-15 22:00:26 +02:00
_optimizing=$(echo $_mcpu | cut -c 8-)
2007-01-31 00:18:51 +01:00
echores "$_optimizing"
else
echores "none"
fi
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2007-01-31 00:18:51 +01:00
;;
2009-02-21 23:08:50 +01:00
alpha*)
2010-03-17 14:41:54 +01:00
arch='alpha'
2007-01-31 00:18:51 +01:00
iproc='alpha'
2008-12-02 17:40:44 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
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;
2008-10-16 20:59:27 +02:00
__asm__ ("implver %0" : "=r" (ver));
__asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2007-01-31 00:18:51 +01:00
printf("%ld-%x\n", ver, ~mask);
return 0;
}
EOF
2007-08-14 16:52:22 +02:00
$_cc -o "$TMPEXE" "$TMPC"
2009-04-15 22:00:26 +02:00
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
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2007-01-31 00:18:51 +01:00
_optimizing="$proc"
;;
2010-10-21 14:58:21 +02:00
mips*)
2010-03-17 15:09:09 +01:00
arch='mips'
iproc='mips'
2007-01-31 00:18:51 +01:00
if irix ; then
2010-01-04 13:24:07 +01:00
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
2007-01-31 00:18:51 +01:00
echores "$proc"
fi
2010-01-19 14:35:57 +01:00
test $_fast_clz = "auto" && _fast_clz=yes
2007-01-31 00:18:51 +01:00
;;
hppa)
2010-03-17 14:41:54 +01:00
arch='pa_risc'
2007-01-31 00:18:51 +01:00
iproc='PA-RISC'
;;
s390)
2010-03-17 14:41:54 +01:00
arch='s390'
2007-01-31 00:18:51 +01:00
iproc='390'
;;
s390x)
2010-03-17 14:41:54 +01:00
arch='s390x'
2007-01-31 00:18:51 +01:00
iproc='390x'
;;
2004-05-08 19:52:25 +02:00
2007-01-31 00:18:51 +01:00
vax)
2010-03-17 14:41:54 +01:00
arch='vax'
2007-01-31 00:18:51 +01:00
iproc='vax'
;;
2003-03-26 12:35:13 +01:00
2007-12-11 23:37:36 +01:00
xtensa)
2010-03-17 14:41:54 +01:00
arch='xtensa'
2007-12-11 23:37:36 +01:00
iproc='xtensa'
;;
2007-01-31 00:18:51 +01:00
generic)
2010-03-17 14:41:54 +01:00
arch='generic'
2007-01-31 00:18:51 +01:00
;;
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
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
2009-01-11 16:31:53 +01:00
# endian testing
echocheck "byte order"
if test "$_big_endian" = auto ; then
cat > $TMPC <<EOF
2010-09-16 20:58:21 +02:00
short ascii_name[] = {
2010-09-18 11:24:38 +02:00
'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 };
2010-09-14 11:41:32 +02:00
int main(void) { return (long)ascii_name; }
2009-01-11 16:31:53 +01:00
EOF
if cc_check ; then
if strings $TMPEXE | grep -q -l MPlayerBigEndian ; then
_big_endian=yes
else
_big_endian=no
fi
else
echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
fi
fi
if test "$_big_endian" = yes ; then
_byte_order='big-endian'
2009-02-08 23:49:52 +01:00
def_words_endian='#define WORDS_BIGENDIAN 1'
2009-07-26 19:43:06 +02:00
def_bigendian='#define HAVE_BIGENDIAN 1'
2009-01-11 16:31:53 +01:00
else
_byte_order='little-endian'
2009-02-08 23:49:52 +01:00
def_words_endian='#undef WORDS_BIGENDIAN'
2009-07-26 19:43:06 +02:00
def_bigendian='#define HAVE_BIGENDIAN 0'
2009-01-11 16:31:53 +01:00
fi
echores "$_byte_order"
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."
2008-11-28 11:53:09 +01:00
sym=$($_nm -P -g $TMPEXE)
2008-03-18 10:09:53 +01:00
extern_prefix=${sym%%ff_extern*}
2009-10-02 10:58:29 +02:00
def_extern_asm="#define EXTERN_ASM $extern_prefix"
2009-02-08 23:49:52 +01:00
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
2008-03-18 10:09:53 +01:00
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"
2010-01-12 22:12:23 +01:00
# -I. helps to detect compilers that just misunderstand -pipe like Sun C
2010-07-02 01:03:40 +02:00
cflag_check -pipe -I. && _pipe="-pipe" && echores "yes" || echores "no"
2001-11-17 04:53:05 +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; }
2010-09-16 20:58:21 +02:00
int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2007-10-02 00:46:33 +02:00
EOF
2009-07-22 19:38:45 +02:00
cc_check -O2 -mstackrealign && tmp_run && cflags_stackrealign=-mstackrealign
2011-01-02 12:49:48 +01:00
test -z "$cflags_stackrealign" && cc_check -O2 -mstackrealign -fno-unit-at-a-time &&
tmp_run && cflags_stackrealign="-mstackrealign -fno-unit-at-a-time"
2008-08-07 23:03:14 +02:00
test -n "$cflags_stackrealign" && echores "yes" || echores "no"
2007-10-02 00:46:33 +02:00
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
2010-09-12 01:30:52 +02:00
CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile"
WARNFLAGS="-W -Wall"
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
2010-09-12 01:30:52 +02:00
CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
WARNFLAGS="-wd167 -wd556 -wd144"
2010-01-12 22:16:01 +01:00
elif test "$cc_vendor" = "sun" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2010-08-01 00:15:49 +02:00
elif test "$cc_vendor" = "clang"; then
CFLAGS="-O2 $_march $_pipe"
2011-07-07 21:51:23 +02:00
WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
ERRORFLAGS="-Werror=implicit-function-declaration"
2007-01-31 00:18:51 +01:00
elif test "$cc_vendor" != "gnu" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe"
else
2010-09-12 01:30:52 +02:00
CFLAGS="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2011-07-06 09:53:41 +02:00
ERRORFLAGS="-Werror-implicit-function-declaration"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ffast-math"
2007-01-31 00:18:51 +01:00
fi
else
2010-07-02 00:19:57 +02:00
warn_cflags=yes
2007-01-31 00:18:51 +01:00
fi
2009-04-10 20:29:01 +02:00
if test "$cc_vendor" = "gnu" ; then
2010-09-12 01:30:52 +02:00
cflag_check -Wundef && WARNFLAGS="-Wundef $WARNFLAGS"
# -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
# that's the only variable specific to C now, and this option is not valid
# for C++.
cflag_check -std=gnu99 && WARN_CFLAGS="-std=gnu99 $WARN_CFLAGS"
cflag_check -Wno-pointer-sign && WARN_CFLAGS="-Wno-pointer-sign $WARN_CFLAGS"
cflag_check -Wdisabled-optimization && WARN_CFLAGS="-Wdisabled-optimization $WARN_CFLAGS"
cflag_check -Wmissing-prototypes && WARN_CFLAGS="-Wmissing-prototypes $WARN_CFLAGS"
cflag_check -Wstrict-prototypes && WARN_CFLAGS="-Wstrict-prototypes $WARN_CFLAGS"
2009-04-10 20:29:01 +02:00
else
CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
fi
2010-07-02 01:03:40 +02:00
cflag_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer"
2010-10-30 19:58:37 +02:00
cflag_check -MD -MP && DEPFLAGS="-MD -MP"
2009-04-10 20:29:01 +02:00
2007-01-31 00:18:51 +01:00
if test -n "$LDFLAGS" ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags $LDFLAGS"
2010-07-02 00:19:57 +02:00
warn_cflags=yes
2007-01-31 00:18:51 +01:00
elif test "$cc_vendor" = "intel" ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -i-static"
2007-01-31 00:18:51 +01:00
fi
if test -n "$CPPFLAGS" ; then
2009-03-25 20:48:05 +01:00
extra_cflags="$extra_cflags $CPPFLAGS"
2010-07-02 00:19:57 +02:00
warn_cflags=yes
2007-01-31 00:18:51 +01:00
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
2009-04-15 22:00:26 +02:00
as_version=$(echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2001-11-17 04:53:05 +01:00
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'
2010-01-04 13:24:07 +01:00
echo 'pswapd %mm0, %mm0' >> $TMPS
2001-11-17 04:53:05 +01:00
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'
2010-01-04 13:24:07 +01:00
echo 'movntq %mm0, (%eax)' >> $TMPS
2001-11-17 04:53:05 +01:00
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
2010-05-09 13:20:15 +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
2010-07-13 13:46:54 +02:00
echocheck "PIC"
pic=no
cat > $TMPC << EOF
int main(void) {
#if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
#error PIC not enabled
#endif
return 0;
}
EOF
cc_check && pic=yes && extra_cflags="$extra_cflags -DPIC"
echores $pic
2009-01-11 14:33:44 +01:00
if x86 ; then
2010-09-21 15:51:33 +02:00
echocheck ".align is a power of two"
if test "$_asmalign_pot" = auto ; then
_asmalign_pot=no
inline_asm_check '".align 3"' && _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"'
fi
echores $_asmalign_pot
2009-09-19 15:18:48 +02:00
echocheck "ebx availability"
ebx_available=no
def_ebx_available='#define HAVE_EBX_AVAILABLE 0'
cat > $TMPC << EOF
int main(void) {
int x;
__asm__ volatile(
"xor %0, %0"
:"=b"(x)
// just adding ebx to clobber list seems unreliable with some
// compilers, e.g. Haiku's gcc 2.95
);
2009-09-30 20:45:02 +02:00
// and the above check does not work for OSX 64 bit...
__asm__ volatile("":::"%ebx");
2009-09-19 15:18:48 +02:00
return 0;
}
EOF
cc_check && ebx_available=yes && def_ebx_available='#define HAVE_EBX_AVAILABLE 1'
echores $ebx_available
2009-11-08 16:38:59 +01:00
2008-11-16 14:04:16 +01:00
echocheck "yasm"
if test -z "$YASMFLAGS" ; then
if darwin ; then
2008-12-03 10:06:23 +01:00
x86_64 && objformat="macho64" || objformat="macho"
2008-11-16 14:04:16 +01:00
elif win32 ; then
objformat="win32"
2009-04-25 19:52:55 +02:00
else
2008-11-16 14:04:16 +01:00
objformat="elf"
fi
# currently tested for Linux x86, x86_64
YASMFLAGS="-f $objformat"
2008-11-16 17:59:17 +01:00
x86_64 && YASMFLAGS="$YASMFLAGS -DARCH_X86_64 -m amd64"
2009-11-08 16:38:59 +01:00
test "$pic" = "yes" && YASMFLAGS="$YASMFLAGS -DPIC"
2008-11-16 14:04:16 +01:00
case "$objformat" in
elf) test $_debug && YASMFLAGS="$YASMFLAGS -g dwarf2" ;;
*) YASMFLAGS="$YASMFLAGS -DPREFIX" ;;
esac
else
2010-07-02 00:19:57 +02:00
warn_cflags=yes
2008-11-16 14:04:16 +01:00
fi
echo "pabsw xmm0, xmm0" > $TMPS
yasm_check || _yasm=""
if test $_yasm ; then
2009-02-08 23:49:52 +01:00
def_yasm='#define HAVE_YASM 1'
2010-03-15 00:39:02 +01:00
have_yasm="yes"
2008-11-16 14:04:16 +01:00
echores "$_yasm"
else
2009-02-08 23:49:52 +01:00
def_yasm='#define HAVE_YASM 0'
2010-03-15 00:39:02 +01:00
have_yasm="no"
2008-11-16 14:04:16 +01:00
echores "no"
fi
2009-01-31 23:34:52 +01:00
echocheck "bswap"
def_bswap='#define HAVE_BSWAP 0'
echo 'bswap %eax' > $TMPS
$_as $TMPS -o $TMPEXE > /dev/null 2>&1 && def_bswap='#define HAVE_BSWAP 1' && bswap=yes || bswap=no
echores "$bswap"
2009-01-11 14:33:44 +01:00
fi #if x86
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..
2009-01-31 23:37:53 +01:00
def_altivec_h='#define HAVE_ALTIVEC_H 0'
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"
2010-07-02 01:03:40 +02:00
if $(cflag_check -maltivec -mabi=altivec) ; then
2008-05-30 20:03:36 +02:00
_altivec_gcc_flags="-maltivec -mabi=altivec"
2003-10-05 01:06:04 +02:00
# check if <altivec.h> should be included
2010-06-24 10:03:41 +02:00
if $(header_check altivec.h $_altivec_gcc_flags) ; then
2008-10-15 01:00:04 +02:00
def_altivec_h='#define HAVE_ALTIVEC_H 1'
2008-05-30 20:03:36 +02:00
inc_altivec_h='#include <altivec.h>'
else
2010-07-02 01:03:40 +02:00
if $(cflag_check -faltivec) ; then
2008-05-30 20:03:36 +02:00
_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
2008-07-26 14:26:04 +02:00
int main(void) { (vector int) {1}; return 0; }
2008-05-30 13:45:08 +02:00
EOF
2008-07-26 14:26:04 +02:00
cc_check $_altivec_gcc_flags || die "You need a compiler that supports {} in AltiVec vector declarations."
2003-10-05 01:06:04 +02:00
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
2009-04-20 02:10:09 +02:00
if ppc ; then
def_xform_asm='#define HAVE_XFORM_ASM 0'
xform_asm=no
echocheck "XFORM ASM support"
2010-09-14 15:37:47 +02:00
inline_asm_check '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
xform_asm=yes && def_xform_asm='#define HAVE_XFORM_ASM 1'
2009-04-20 02:10:09 +02:00
echores "$xform_asm"
fi
2006-10-08 15:49:16 +02:00
if arm ; then
echocheck "ARMv5TE (Enhanced DSP Extensions)"
if test $_armv5te = "auto" ; then
_armv5te=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"qadd r0, r0, r0"' && _armv5te=yes
2006-10-08 15:49:16 +02:00
fi
echores "$_armv5te"
2010-01-19 14:35:57 +01:00
test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz=yes
2007-05-14 00:29:10 +02:00
echocheck "ARMv6 (SIMD instructions)"
if test $_armv6 = "auto" ; then
_armv6=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"sadd16 r0, r0, r0"' && _armv6=yes
2007-05-14 00:29:10 +02:00
fi
echores "$_armv6"
2009-01-04 14:05:24 +01:00
echocheck "ARMv6t2 (SIMD instructions)"
if test $_armv6t2 = "auto" ; then
_armv6t2=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"movt r0, #0"' && _armv6t2=yes
2009-01-04 14:05:24 +01:00
fi
2011-03-02 08:53:59 +01:00
echores "$_armv6t2"
2007-05-14 00:29:10 +02:00
2008-08-18 00:02:05 +02:00
echocheck "ARM VFP"
if test $_armvfp = "auto" ; then
_armvfp=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"fadds s0, s0, s0"' && _armvfp=yes
2008-08-18 00:02:05 +02:00
fi
echores "$_armvfp"
2009-09-19 15:58:38 +02:00
echocheck "ARM NEON"
if test $neon = "auto" ; then
neon=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"vadd.i16 q0, q0, q0"' && neon=yes
2009-09-19 15:58:38 +02:00
fi
echores "$neon"
2006-10-08 15:49:16 +02:00
echocheck "iWMMXt (Intel XScale SIMD instructions)"
if test $_iwmmxt = "auto" ; then
_iwmmxt=no
2010-09-14 15:37:47 +02:00
inline_asm_check '"wunpckelub wr6, wr4"' && _iwmmxt=yes
2006-10-08 15:49:16 +02:00
fi
echores "$_iwmmxt"
fi
2011-06-30 13:58:49 +02:00
cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2010-03-17 14:37:36 +01:00
test "$_altivec" = yes && cpuexts="ALTIVEC $cpuexts"
test "$_mmx" = yes && cpuexts="MMX $cpuexts"
test "$_mmxext" = yes && cpuexts="MMX2 $cpuexts"
test "$_3dnow" = yes && cpuexts="AMD3DNOW $cpuexts"
test "$_3dnowext" = yes && cpuexts="AMD3DNOWEXT $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 "$_fast_clz" = yes && cpuexts="FAST_CLZ $cpuexts"
test "$_armv5te" = yes && cpuexts="ARMV5TE $cpuexts"
test "$_armv6" = yes && cpuexts="ARMV6 $cpuexts"
test "$_armv6t2" = yes && cpuexts="ARMV6T2 $cpuexts"
test "$_armvfp" = yes && cpuexts="ARMVFP $cpuexts"
test "$neon" = yes && cpuexts="NEON $cpuexts"
test "$_iwmmxt" = yes && cpuexts="IWMMXT $cpuexts"
test "$_vis" = yes && cpuexts="VIS $cpuexts"
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
2009-04-15 22:00:26 +02:00
kernel_version=$(uname -r 2>&1)
2001-11-17 04:53:05 +01:00
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"
2010-07-02 01:03:40 +02:00
if cflag_check -lposix ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lposix"
2004-10-11 21:26:13 +02:00
echores "yes"
else
echores "no"
fi
echocheck "-lm"
2010-07-02 01:03:40 +02:00
if cflag_check -lm ; then
2004-10-11 21:26:13 +02:00
_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
_langinfo=no
2010-09-27 02:02:59 +02:00
statement_check langinfo.h 'nl_langinfo(CODESET)' && _langinfo=yes
2004-06-26 11:54:02 +02:00
fi
if test "$_langinfo" = yes ; then
2009-02-08 23:49:52 +01:00
def_langinfo='#define HAVE_LANGINFO 1'
2004-06-26 11:54:02 +02:00
else
2009-02-08 23:49:52 +01:00
def_langinfo='#undef HAVE_LANGINFO'
2004-06-26 11:54:02 +02:00
fi
echores "$_langinfo"
2010-03-08 21:48:50 +01:00
echocheck "translation support"
if test "$_translation" = yes; then
def_translation="#define CONFIG_TRANSLATION 1"
else
def_translation="#undef CONFIG_TRANSLATION"
fi
echores "$_translation"
2002-03-15 21:48:42 +01:00
echocheck "language"
2009-06-14 16:55:01 +02:00
# Set preferred languages, "all" uses English as main language.
2009-06-14 15:25:54 +02:00
test -z "$language" && language=$LINGUAS
2009-06-14 16:55:01 +02:00
test -z "$language_doc" && language_doc=$language
test -z "$language_man" && language_man=$language
2011-02-15 15:33:27 +01:00
test -z "$language_msg" && language_msg=$language
2010-03-28 13:49:09 +02:00
test -z "$language_msg" && language_msg="all"
2009-06-14 16:55:01 +02:00
language_doc=$(echo $language_doc | tr , " ")
language_man=$(echo $language_man | tr , " ")
2010-03-28 13:49:09 +02:00
language_msg=$(echo $language_msg | tr , " ")
2009-06-14 16:55:01 +02:00
test "$language_doc" = "all" && language_doc=$doc_lang_all
test "$language_man" = "all" && language_man=$man_lang_all
2010-03-28 13:49:09 +02:00
test "$language_msg" = "all" && language_msg=$msg_lang_all
if test "$_translation" != yes ; then
language_msg=""
fi
2009-06-14 16:55:01 +02:00
# Prune non-existing translations from language lists.
# Set message translation to the first available language.
# Fall back on English.
for lang in $language_doc ; do
test -d DOCS/xml/$lang && tmp_language_doc="$tmp_language_doc $lang"
done
language_doc=$tmp_language_doc
2009-06-14 20:51:36 +02:00
test -z "$language_doc" && language_doc=en
2009-06-14 16:55:01 +02:00
for lang in $language_man ; do
test -d DOCS/man/$lang && tmp_language_man="$tmp_language_man $lang"
done
language_man=$tmp_language_man
2009-06-14 20:51:36 +02:00
test -z "$language_man" && language_man=en
2009-06-14 16:55:01 +02:00
2010-03-28 13:49:09 +02:00
for lang in $language_msg ; do
test -f po/$lang.po && tmp_language_msg="$tmp_language_msg $lang"
done
language_msg=$tmp_language_msg
echores "messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
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
2009-02-08 23:49:52 +01:00
def_sighandler='#define CONFIG_SIGHANDLER 1'
2002-03-27 04:45:55 +01:00
else
2009-02-08 23:49:52 +01:00
def_sighandler='#undef CONFIG_SIGHANDLER'
2002-03-27 04:45:55 +01:00
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"
2009-04-08 22:21:21 +02:00
def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 1'
2002-03-15 23:16:02 +01:00
else
2009-04-08 22:21:21 +02:00
def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 0'
2002-03-15 23:16:02 +01:00
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-07-15 10:31:43 +02:00
echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2002-07-06 17:20:10 +02:00
if cc_check; then
2009-02-08 23:49:52 +01:00
def_restrict_keyword=$restrict_keyword
2002-07-06 17:20:10 +02:00
break;
fi
done
2009-02-08 23:49:52 +01:00
if [ -n "$def_restrict_keyword" ]; then
echores "$def_restrict_keyword"
2002-07-06 17:20:10 +02:00
else
echores "none"
fi
2004-10-30 11:31:33 +02:00
# Avoid infinite recursion loop ("#define restrict restrict")
2009-02-08 23:49:52 +01:00
if [ "$def_restrict_keyword" != "restrict" ]; then
def_restrict_keyword="#define restrict $def_restrict_keyword"
2004-10-30 11:31:33 +02:00
else
2009-02-08 23:49:52 +01:00
def_restrict_keyword=""
2004-10-30 11:31:33 +02:00
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
2010-09-14 11:41:32 +02:00
static int foo(int a) {
2008-12-03 15:54:04 +01:00
a = __builtin_expect(a, 10);
2004-11-22 11:28:36 +01:00
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
2009-02-08 23:49:52 +01:00
def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1'
2004-11-22 11:28:36 +01:00
else
2009-02-08 23:49:52 +01:00
def_builtin_expect='#undef HAVE_BUILTIN_EXPECT'
2004-11-22 11:28:36 +01:00
fi
echores "$_builtin_expect"
2001-11-17 04:53:05 +01:00
echocheck "kstat"
_kstat=no
2010-09-27 02:02:59 +02:00
statement_check kstat.h 'kstat_open()' -lkstat && _kstat=yes
2001-11-17 04:53:05 +01:00
if test "$_kstat" = yes ; then
2009-02-08 23:49:52 +01:00
def_kstat="#define HAVE_LIBKSTAT 1"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lkstat"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_kstat="#undef HAVE_LIBKSTAT"
2001-11-17 04:53:05 +01:00
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 04:53:05 +01:00
_posix4=no
2010-09-27 02:02:59 +02:00
statement_check time.h 'nanosleep(0, 0)' -lposix4 && _posix4=yes
2001-11-17 04:53:05 +01:00
if test "$_posix4" = yes ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lposix4"
2001-11-17 04:53:05 +01:00
fi
echores "$_posix4"
2001-06-05 20:40:44 +02:00
2010-01-12 20:41:44 +01:00
for func in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf; do
2007-12-28 18:23:57 +01:00
echocheck $func
eval _$func=no
2010-09-27 02:02:59 +02:00
statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes
2007-12-28 18:23:57 +01:00
if eval test "x\$_$func" = "xyes"; then
2009-04-15 22:00:26 +02:00
eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2007-12-28 18:23:57 +01:00
echores yes
2002-11-05 08:34:55 +01:00
else
2009-04-15 22:00:26 +02:00
eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2007-12-28 18:23:57 +01:00
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"
_mkstemp=no
2011-01-05 17:01:01 +01:00
define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp=yes
2007-07-11 21:47:20 +02:00
if test "$_mkstemp" = yes ; then
2009-02-08 23:49:52 +01:00
def_mkstemp='#define HAVE_MKSTEMP 1'
2007-07-11 21:47:20 +02:00
else
2010-09-18 16:51:55 +02:00
def_mkstemp='#define HAVE_MKSTEMP 0'
2007-07-11 21:47:20 +02:00
fi
echores "$_mkstemp"
2001-11-23 19:25:09 +01:00
echocheck "nanosleep"
_nanosleep=no
2010-09-27 02:02:59 +02:00
statement_check time.h 'nanosleep(0, 0)' && _nanosleep=yes
2001-11-23 19:25:09 +01:00
if test "$_nanosleep" = yes ; then
2009-02-08 23:49:52 +01:00
def_nanosleep='#define HAVE_NANOSLEEP 1'
2001-11-23 19:25:09 +01:00
else
2009-02-08 23:49:52 +01:00
def_nanosleep='#undef HAVE_NANOSLEEP'
2001-11-23 19:25:09 +01:00
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>
2010-09-14 12:05:46 +02:00
int main(void) { gethostbyname(0); 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
2009-12-09 18:55:34 +01:00
test $_socklib = yes && test $_winsock2_h = auto && _winsock2_h=no
if test $_winsock2_h = auto ; then
2008-08-29 22:05:08 +02:00
_winsock2_h=no
2010-09-27 02:02:59 +02:00
statement_check winsock2.h 'gethostbyname(0)' -lws2_32 && _ld_sock="-lws2_32" && _winsock2_h=yes
2003-06-11 18:48:09 +02:00
fi
2010-05-09 13:20:15 +02:00
test "$_ld_sock" && res_comment="using $_ld_sock"
2006-10-11 16:06:38 +02:00
echores "$_socklib"
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
2008-08-29 22:05:08 +02:00
if test $_winsock2_h = yes ; then
2003-06-11 18:48:09 +02:00
_ld_sock="-lws2_32"
2008-10-15 01:00:04 +02:00
def_winsock2_h='#define HAVE_WINSOCK2_H 1'
2003-06-11 18:48:09 +02:00
else
2009-02-01 14:42:27 +01:00
def_winsock2_h='#define HAVE_WINSOCK2_H 0'
2003-06-11 18:48:09 +02:00
fi
2009-02-04 20:04:22 +01:00
echocheck "arpa/inet.h"
arpa_inet_h=no
def_arpa_inet_h='#define HAVE_ARPA_INET_H 0'
2010-06-24 10:03:41 +02:00
header_check arpa/inet.h && arpa_inet_h=yes &&
def_arpa_inet_h='#define HAVE_ARPA_INET_H 1'
2009-02-04 20:04:22 +01:00
echores "$arpa_inet_h"
2001-12-30 20:38:28 +01:00
echocheck "inet_pton()"
2009-02-01 15:38:28 +01:00
def_inet_pton='#define HAVE_INET_PTON 0'
inet_pton=no
2009-02-01 15:57:01 +01:00
for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do
2010-09-27 02:02:59 +02:00
statement_check arpa/inet.h 'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton=yes && break
2009-02-01 15:57:01 +01:00
done
if test $inet_pton = yes ; then
2010-05-09 13:20:15 +02:00
test "$_ld_tmp" && res_comment="using $_ld_tmp"
2009-02-01 15:38:28 +01:00
def_inet_pton='#define HAVE_INET_PTON 1'
fi
echores "$inet_pton"
2008-05-03 22:14:50 +02:00
2009-02-01 15:57:01 +01:00
2009-02-01 15:39:33 +01:00
echocheck "inet_aton()"
2009-02-01 15:38:28 +01:00
def_inet_aton='#define HAVE_INET_ATON 0'
inet_aton=no
2009-02-01 15:57:01 +01:00
for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do
2010-09-27 02:02:59 +02:00
statement_check arpa/inet.h 'inet_aton(0, 0)' $_ld_tmp && inet_aton=yes && break
2009-02-01 15:57:01 +01:00
done
if test $inet_aton = yes ; then
2010-05-09 13:20:15 +02:00
test "$_ld_tmp" && res_comment="using $_ld_tmp"
2009-02-01 15:39:33 +01:00
def_inet_aton='#define HAVE_INET_ATON 1'
2002-08-29 09:07:12 +02:00
fi
2009-02-01 15:38:28 +01:00
echores "$inet_aton"
2002-03-15 21:48:42 +01:00
2008-07-30 11:42:37 +02:00
echocheck "socklen_t"
2008-08-01 07:35:30 +02:00
_socklen_t=no
2008-11-18 10:41:31 +01:00
for header in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
2010-09-27 02:46:28 +02:00
statement_check $header 'socklen_t v = 0' && _socklen_t=yes && break
2008-07-30 20:16:57 +02:00
done
2008-07-30 11:42:37 +02:00
if test "$_socklen_t" = yes ; then
2009-02-08 23:49:52 +01:00
def_socklen_t='#define HAVE_SOCKLEN_T 1'
2008-07-30 11:42:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_socklen_t='#define HAVE_SOCKLEN_T 0'
2008-07-30 11:42:37 +02:00
fi
echores "$_socklen_t"
2008-08-29 18:20:35 +02:00
echocheck "closesocket()"
_closesocket=no
2010-09-27 02:02:59 +02:00
statement_check winsock2.h 'closesocket(~0)' $_ld_sock && _closesocket=yes
2008-08-29 18:20:35 +02:00
if test "$_closesocket" = yes ; then
2009-02-08 23:49:52 +01:00
def_closesocket='#define HAVE_CLOSESOCKET 1'
2008-08-29 18:20:35 +02:00
else
2009-02-08 23:49:52 +01:00
def_closesocket='#define HAVE_CLOSESOCKET 0'
2008-08-29 18:20:35 +02:00
fi
echores "$_closesocket"
2010-07-17 15:14:53 +02:00
echocheck "networking"
2009-02-01 15:38:28 +01:00
test $_winsock2_h = no && test $inet_pton = no &&
2010-07-17 15:14:53 +02:00
test $inet_aton = no && networking=no
if test "$networking" = yes ; then
2009-02-08 23:49:52 +01:00
def_network='#define CONFIG_NETWORK 1'
2010-07-17 15:14:53 +02:00
def_networking='#define CONFIG_NETWORKING 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags $_ld_sock"
2010-07-17 15:14:53 +02:00
inputmodules="networking $inputmodules"
2007-01-30 19:29:02 +01:00
else
2010-07-17 15:14:53 +02:00
noinputmodules="networking $noinputmodules"
2010-10-05 11:49:17 +02:00
def_network='#define CONFIG_NETWORK 0'
2010-07-17 15:14:53 +02:00
def_networking='#undef CONFIG_NETWORKING'
2007-01-30 19:29:02 +01:00
fi
2010-07-17 15:14:53 +02:00
echores "$networking"
2002-11-11 19:25:02 +01:00
2009-01-11 13:58:06 +01:00
echocheck "inet6"
if test "$_inet6" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
2010-12-19 23:02:52 +01:00
#if !defined(_WIN32)
2009-01-11 13:58:06 +01:00
#include <sys/socket.h>
#include <netinet/in.h>
#else
#include <ws2tcpip.h>
#endif
int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
EOF
_inet6=no
if cc_check $_ld_sock ; then
_inet6=yes
fi
fi
if test "$_inet6" = yes ; then
2009-02-08 23:49:52 +01:00
def_inet6='#define HAVE_AF_INET6 1'
2009-01-11 13:58:06 +01:00
else
2009-02-08 23:49:52 +01:00
def_inet6='#undef HAVE_AF_INET6'
2009-01-11 13:58:06 +01:00
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); return 0; }
EOF
_gethostbyname2=no
if cc_check ; then
_gethostbyname2=yes
fi
fi
if test "$_gethostbyname2" = yes ; then
2009-02-08 23:49:52 +01:00
def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1'
2009-01-11 13:58:06 +01:00
else
2009-02-08 23:49:52 +01:00
def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2'
2009-01-11 13:58:06 +01:00
fi
echores "$_gethostbyname2"
2002-01-06 14:06:51 +01:00
echocheck "inttypes.h (required)"
_inttypes=no
2010-06-24 10:03:41 +02:00
header_check inttypes.h && _inttypes=yes
2006-04-04 07:09:12 +02:00
echores "$_inttypes"
if test "$_inttypes" = no ; then
2010-06-24 10:03:41 +02:00
echocheck "sys/bitypes.h (inttypes.h predecessor)"
header_check sys/bitypes.h && _inttypes=yes
2003-11-13 21:53:40 +01:00
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
2001-11-17 04:53:05 +01:00
echocheck "malloc.h"
_malloc=no
2010-06-24 10:03:41 +02:00
header_check malloc.h && _malloc=yes
2001-11-17 04:53:05 +01:00
if test "$_malloc" = yes ; then
2008-10-15 01:00:04 +02:00
def_malloc_h='#define HAVE_MALLOC_H 1'
2001-11-17 04:53:05 +01:00
else
2009-02-17 12:16:19 +01:00
def_malloc_h='#define HAVE_MALLOC_H 0'
2001-11-17 04:53:05 +01:00
fi
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 ?
2009-02-08 23:49:52 +01:00
def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
2001-11-09 03:02:58 +01:00
_memalign=no
2010-09-27 02:02:59 +02:00
statement_check malloc.h 'memalign(64, sizeof(char))' && _memalign=yes
2001-11-17 04:53:05 +01:00
if test "$_memalign" = yes ; then
2009-02-08 23:49:52 +01:00
def_memalign='#define HAVE_MEMALIGN 1'
2001-11-17 04:53:05 +01:00
else
2009-02-17 11:41:13 +01:00
def_memalign='#define HAVE_MEMALIGN 0'
2010-09-16 20:58:21 +02:00
def_map_memalign='#define memalign(a, b) malloc(b)'
2009-02-08 23:49:52 +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
2009-02-10 03:01:35 +01:00
echocheck "posix_memalign()"
posix_memalign=no
def_posix_memalign='#define HAVE_POSIX_MEMALIGN 0'
2011-01-05 16:59:43 +01:00
define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
posix_memalign=yes && def_posix_memalign='#define HAVE_POSIX_MEMALIGN 1'
2009-02-10 03:01:35 +01:00
echores "$posix_memalign"
2001-11-17 04:53:05 +01:00
echocheck "alloca.h"
_alloca=no
2010-09-27 02:02:59 +02:00
statement_check alloca.h 'alloca(0)' && _alloca=yes
2001-11-17 04:53:05 +01:00
if cc_check ; then
2008-10-15 01:00:04 +02:00
def_alloca_h='#define HAVE_ALLOCA_H 1'
2001-11-17 04:53:05 +01:00
else
2008-10-15 01:00:04 +02:00
def_alloca_h='#undef HAVE_ALLOCA_H'
2001-11-17 04:53:05 +01:00
fi
echores "$_alloca"
2001-07-12 17:35:52 +02:00
2009-01-11 13:58:06 +01:00
echocheck "fastmemcpy"
if test "$_fastmemcpy" = yes ; then
2009-02-08 23:49:52 +01:00
def_fastmemcpy='#define CONFIG_FASTMEMCPY 1'
2009-01-11 13:58:06 +01:00
else
2009-02-08 23:49:52 +01:00
def_fastmemcpy='#undef CONFIG_FASTMEMCPY'
2009-01-11 13:58:06 +01:00
fi
echores "$_fastmemcpy"
2001-11-17 04:53:05 +01:00
echocheck "mman.h"
_mman=no
2010-09-27 02:02:59 +02:00
statement_check sys/mman.h 'mmap(0, 0, 0, 0, 0, 0)' && _mman=yes
2001-11-17 04:53:05 +01:00
if test "$_mman" = yes ; then
2008-10-15 01:00:04 +02:00
def_mman_h='#define HAVE_SYS_MMAN_H 1'
2001-11-17 04:53:05 +01:00
else
2008-10-15 01:00:04 +02:00
def_mman_h='#undef HAVE_SYS_MMAN_H'
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
_mman_has_map_failed=no
2010-09-27 02:46:28 +02:00
statement_check sys/mman.h 'void *p = MAP_FAILED' && _mman_has_map_failed=yes
2005-01-21 22:32:15 +01:00
if test "$_mman_has_map_failed" = yes ; then
2009-02-08 23:49:52 +01:00
def_mman_has_map_failed=''
2005-01-21 22:32:15 +01:00
else
2009-02-08 23:49:52 +01:00
def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)'
2005-01-21 22:32:15 +01:00
fi
2001-11-18 18:45:23 +01:00
echocheck "dynamic loader"
2001-11-17 04:53:05 +01:00
_dl=no
2010-09-14 12:05:46 +02:00
for _ld_tmp in "" "-ldl"; do
2010-09-27 02:02:59 +02:00
statement_check dlfcn.h 'dlopen("", 0)' $_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
2009-02-08 23:49:52 +01:00
def_dl='#define HAVE_LIBDL 1'
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_dl='#undef HAVE_LIBDL'
2001-11-17 04:53:05 +01:00
fi
echores "$_dl"
2001-07-12 17:35:52 +02:00
2001-11-19 16:54:43 +01:00
2009-03-15 10:17:42 +01:00
def_threads='#define HAVE_THREADS 0'
2001-11-20 16:11:49 +01:00
2001-11-18 18:45:23 +01:00
echocheck "pthread"
2009-04-10 19:39:44 +02:00
if linux ; then
THREAD_CFLAGS=-D_REENTRANT
elif freebsd || netbsd || openbsd || bsdos ; then
THREAD_CFLAGS=-D_THREAD_SAFE
fi
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>
2010-09-14 11:41:32 +02:00
static void *func(void *arg) { return arg; }
2011-03-27 17:38:01 +02:00
int main(void) {
pthread_t tid;
#ifdef PTW32_STATIC_LIB
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
#endif
return pthread_create (&tid, 0, func, 0) != 0;
}
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
2009-04-10 19:39:44 +02:00
cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
2005-10-03 21:36:32 +02:00
done
2011-03-27 17:38:01 +02:00
if test "$_pthreads" = no && mingw32 ; then
_ld_tmp="-lpthreadGC2 -lws2_32"
cc_check $_ld_tmp -DPTW32_STATIC_LIB && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
fi
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
2010-05-09 13:20:15 +02:00
test $_ld_pthread && res_comment="using $_ld_pthread"
2009-02-08 23:49:52 +01:00
def_pthreads='#define HAVE_PTHREADS 1'
def_threads='#define HAVE_THREADS 1'
2009-04-10 19:39:44 +02:00
extra_cflags="$extra_cflags $THREAD_CFLAGS"
2004-03-27 21:19:57 +01:00
else
2010-05-09 13:20:15 +02:00
res_comment="v4l, v4l2, ao_nas, win32 loader disabled"
2009-02-08 23:49:52 +01: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
2008-11-28 18:04:36 +01:00
if cygwin ; then
if test "$_pthreads" = yes ; then
2009-02-08 23:49:52 +01:00
def_pthread_cache="#define PTHREAD_CACHE 1"
2008-11-28 18:04:36 +01:00
else
_stream_cache=no
2009-02-08 23:49:52 +01:00
def_stream_cache="#undef CONFIG_STREAM_CACHE"
2008-11-28 18:04:36 +01:00
fi
fi
2007-07-16 08:34:51 +02:00
echocheck "w32threads"
if test "$_pthreads" = yes ; then
2010-05-09 13:20:15 +02:00
res_comment="using pthread instead"
2007-07-16 08:34:51 +02:00
_w32threads=no
fi
if test "$_w32threads" = auto ; then
_w32threads=no
mingw32 && _w32threads=yes
fi
2009-02-08 23:49:52 +01:00
test "$_w32threads" = yes && def_threads='#define HAVE_THREADS 1'
2007-07-16 08:34:51 +02:00
echores "$_w32threads"
2006-06-09 16:19:59 +02:00
echocheck "rpath"
if test "$_rpath" = yes ; then
2009-04-15 22:00:26 +02:00
for I in $(echo $extra_ldflags | sed 's/-L//g') ; do
tmp="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
2006-06-09 16:19:59 +02:00
done
2009-03-25 20:48:05 +01:00
extra_ldflags=$tmp
2006-06-09 16:19:59 +02:00
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";
2008-12-03 15:54:04 +01:00
if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
while ((numread = read(0, inbuffer, INBUFSIZE))) {
2005-07-30 03:07:27 +02:00
char *iptr=inbuffer;
char *optr=outbuffer;
size_t inleft=numread;
size_t outleft=OUTBUFSIZE;
2010-09-14 11:41:32 +02:00
if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
2005-07-30 03:07:27 +02:00
!= (size_t)(-1)) {
2008-12-03 15:54:04 +01:00
write(1, outbuffer, OUTBUFSIZE - outleft);
2005-07-30 03:07:27 +02:00
}
}
if (iconv_close(icdsc) == -1)
;
}
2008-07-15 10:31:43 +02:00
return 0;
2005-07-30 03:07:27 +02:00
}
EOF
_iconv=no
2005-10-03 21:36:32 +02:00
for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do
2011-01-02 12:49:48 +01:00
cc_check $_ld_lm $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" &&
2006-11-20 01:19:43 +01:00
_iconv=yes && break
2005-10-03 21:36:32 +02:00
done
2011-04-20 20:39:53 +02:00
if test "$_iconv" != yes ; then
die "Unable to find iconv which should be part of standard compilation environment. Aborting. If you really mean to compile without iconv support use --disable-iconv."
fi
2005-07-30 03:07:27 +02:00
fi
if test "$_iconv" = yes ; then
2009-02-08 23:49:52 +01:00
def_iconv='#define CONFIG_ICONV 1'
2005-07-30 03:07:27 +02:00
else
2009-02-08 23:49:52 +01:00
def_iconv='#undef CONFIG_ICONV'
2005-07-30 03:07:27 +02:00
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
2008-10-15 01:00:04 +02:00
def_soundcard_h='#undef HAVE_SOUNDCARD_H'
def_sys_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H'
2007-07-11 12:43:25 +02:00
for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do
2010-06-24 10:03:41 +02:00
header_check $_soundcard_header && _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
2008-10-15 01:00:04 +02:00
def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1'
2007-07-11 12:43:25 +02:00
else
2008-10-15 01:00:04 +02:00
def_soundcard_h='#define HAVE_SOUNDCARD_H 1'
2007-07-11 12:43:25 +02:00
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
2011-06-29 06:19:49 +02:00
echocheck "sys/videoio.h"
sys_videoio_h=no
def_sys_videoio_h='#undef HAVE_SYS_VIDEOIO_H'
header_check sys/videoio.h && sys_videoio_h=yes &&
def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1'
echores "$sys_videoio_h"
2002-04-23 18:29:13 +02:00
echocheck "sys/dvdio.h"
_dvdio=no
2010-09-02 21:48:07 +02:00
# FreeBSD 8.1 has broken dvdio.h
header_check_broken sys/types.h sys/dvdio.h && _dvdio=yes
2002-04-23 18:29:13 +02:00
if test "$_dvdio" = yes ; then
2009-02-08 23:49:52 +01:00
def_dvdio='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_dvdio='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2002-04-23 18:29:13 +02:00
fi
echores "$_dvdio"
echocheck "sys/cdio.h"
_cdio=no
2010-07-29 10:44:44 +02:00
# at least OpenSolaris has a broken cdio.h
header_check_broken sys/types.h sys/cdio.h && _cdio=yes
2002-04-23 18:29:13 +02:00
if test "$_cdio" = yes ; then
2009-02-08 23:49:52 +01:00
def_cdio='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_cdio='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2002-04-23 18:29:13 +02:00
fi
echores "$_cdio"
echocheck "linux/cdrom.h"
_cdrom=no
2010-06-24 10:03:41 +02:00
header_check linux/cdrom.h && _cdrom=yes
2002-04-23 18:29:13 +02:00
if test "$_cdrom" = yes ; then
2009-02-08 23:49:52 +01:00
def_cdrom='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_cdrom='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2002-04-23 18:29:13 +02:00
fi
echores "$_cdrom"
echocheck "dvd.h"
_dvd=no
2010-06-24 10:03:41 +02:00
header_check dvd.h && _dvd=yes
2002-04-23 18:29:13 +02:00
if test "$_dvd" = yes ; then
2009-02-08 23:49:52 +01:00
def_dvd='#define DVD_STRUCT_IN_DVD_H 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_dvd='#undef DVD_STRUCT_IN_DVD_H'
2002-04-23 18:29:13 +02:00
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
_bsdi_dvd=no
2010-06-24 10:03:41 +02:00
header_check dvd.h && _bsdi_dvd=yes
2002-04-23 18:29:13 +02:00
if test "$_bsdi_dvd" = yes ; then
2009-02-08 23:49:52 +01:00
def_bsdi_dvd='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_bsdi_dvd='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2002-04-23 18:29:13 +02:00
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
_hpux_scsi_h=no
2010-06-24 10:03:41 +02:00
header_check sys/scsi.h && _hpux_scsi_h=yes
2002-09-14 00:04:11 +02:00
if test "$_hpux_scsi_h" = yes ; then
2009-02-08 23:49:52 +01:00
def_hpux_scsi_h='#define HPUX_SCTL_IO 1'
2002-09-14 00:04:11 +02:00
else
2009-02-08 23:49:52 +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
_sol_scsi_h=no
2010-07-29 10:44:44 +02:00
header_check sys/scsi/scsi_types.h &&
header_check_broken sys/types.h sys/scsi/impl/uscsi.h &&
2010-06-24 10:03:41 +02:00
_sol_scsi_h=yes
2002-04-23 18:29:13 +02:00
if test "$_sol_scsi_h" = yes ; then
2009-02-08 23:49:52 +01:00
def_sol_scsi_h='#define SOLARIS_USCSI 1'
2002-04-23 18:29:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_sol_scsi_h='#undef SOLARIS_USCSI'
2002-04-23 18:29:13 +02:00
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-27 18:58:29 +01:00
_termcap=no
2005-12-25 15:00:04 +01:00
for _ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do
2010-09-27 02:02:59 +02:00
statement_check term.h 'tgetent(0, 0)' $_ld_tmp &&
2010-09-16 13:22:30 +02:00
extra_ldflags="$extra_ldflags $_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
2009-02-08 23:49:52 +01:00
def_termcap='#define HAVE_TERMCAP 1'
2010-05-09 13:20:15 +02:00
test $_ld_tmp && res_comment="using $_ld_tmp"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_termcap='#undef HAVE_TERMCAP'
2001-11-17 04:53:05 +01:00
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"
2009-02-08 23:49:52 +01:00
def_termios='#undef HAVE_TERMIOS'
2008-10-15 01:00:04 +02:00
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
2010-05-14 17:34:30 +02:00
for _termios_header in "termios.h" "sys/termios.h"; do
2010-06-24 10:03:41 +02:00
header_check $_termios_header && _termios=yes &&
res_comment="using $_termios_header" && break
2007-07-13 19:54:45 +02:00
done
2001-12-03 16:22:03 +01:00
fi
2001-11-19 17:42:01 +01:00
if test "$_termios" = yes ; then
2009-02-08 23:49:52 +01:00
def_termios='#define HAVE_TERMIOS 1'
2007-07-13 19:54:45 +02:00
if test "$_termios_header" = "termios.h" ; then
2008-10-15 01:00:04 +02:00
def_termios_h='#define HAVE_TERMIOS_H 1'
2007-07-13 19:54:45 +02:00
else
2008-10-15 01:00:04 +02:00
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
2001-11-27 18:58:29 +01:00
_shm=no
2011-01-05 16:59:43 +01:00
statement_check sys/shm.h 'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm=yes
2001-11-19 17:06:33 +01:00
fi
2001-11-19 16:54:43 +01:00
if test "$_shm" = yes ; then
2009-02-08 23:49:52 +01:00
def_shm='#define HAVE_SHM 1'
2001-11-19 16:54:43 +01:00
else
2009-02-08 23:49:52 +01:00
def_shm='#undef HAVE_SHM'
2001-11-19 16:54:43 +01:00
fi
echores "$_shm"
2002-03-15 21:48:42 +01:00
2002-03-29 22:24:36 +01:00
echocheck "strsep()"
_strsep=no
2011-01-05 16:59:43 +01:00
statement_check string.h 'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep=yes
2002-03-29 22:24:36 +01:00
if test "$_strsep" = yes ; then
2009-02-08 23:49:52 +01:00
def_strsep='#define HAVE_STRSEP 1'
2011-01-26 20:00:17 +01:00
need_strsep=no
2002-03-29 22:24:36 +01:00
else
2009-02-08 23:49:52 +01:00
def_strsep='#undef HAVE_STRSEP'
2011-01-26 20:00:17 +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
2008-10-04 00:39:06 +02:00
#define _ISOC99_SOURCE
2001-11-17 04:53:05 +01:00
#include <stdarg.h>
2008-10-04 00:39:06 +02:00
#include <stdio.h>
2010-01-04 23:28:44 +01:00
int main(void) { va_list ap; vsscanf("foo", "bar", ap); 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
2009-02-08 23:49:52 +01:00
def_vsscanf='#define HAVE_VSSCANF 1'
2011-01-26 20:00:17 +01:00
need_vsscanf=no
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_vsscanf='#undef HAVE_VSSCANF'
2011-01-26 20:00:17 +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()"
_swab=no
2011-04-28 17:58:42 +02:00
define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes
2004-10-11 21:26:13 +02:00
if test "$_swab" = yes ; then
2009-02-08 23:49:52 +01:00
def_swab='#define HAVE_SWAB 1'
2011-01-26 20:00:17 +01:00
need_swab=no
2004-10-11 21:26:13 +02:00
else
2009-02-08 23:49:52 +01:00
def_swab='#undef HAVE_SWAB'
2011-01-26 20:00:17 +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>
2010-09-16 20:58:21 +02:00
int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
2003-04-04 21:15:24 +02:00
EOF
_posix_select=no
2009-02-08 23:49:52 +01:00
def_posix_select='#undef HAVE_POSIX_SELECT'
2012-04-06 15:58:39 +02:00
cc_check && _posix_select=yes &&
2011-01-02 12:49:48 +01:00
def_posix_select='#define HAVE_POSIX_SELECT 1'
2003-04-04 21:15:24 +02:00
echores "$_posix_select"
2009-01-11 13:58:06 +01:00
echocheck "audio select()"
if test "$_select" = no ; then
2009-02-08 23:49:52 +01:00
def_select='#undef HAVE_AUDIO_SELECT'
2009-01-11 13:58:06 +01:00
elif test "$_select" = yes ; then
2009-02-08 23:49:52 +01:00
def_select='#define HAVE_AUDIO_SELECT 1'
2009-01-11 13:58:06 +01:00
fi
echores "$_select"
2003-04-04 21:15:24 +02:00
echocheck "gettimeofday()"
_gettimeofday=no
2011-01-05 16:59:43 +01:00
statement_check sys/time.h 'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday=yes
2003-04-04 21:15:24 +02:00
if test "$_gettimeofday" = yes ; then
2009-02-08 23:49:52 +01:00
def_gettimeofday='#define HAVE_GETTIMEOFDAY 1'
2011-01-26 20:00:17 +01:00
need_gettimeofday=no
2003-04-04 21:15:24 +02:00
else
2009-02-08 23:49:52 +01:00
def_gettimeofday='#undef HAVE_GETTIMEOFDAY'
2011-01-26 20:00:17 +01:00
need_gettimeofday=yes
2003-04-04 21:15:24 +02:00
fi
echores "$_gettimeofday"
echocheck "glob()"
_glob=no
2010-09-27 02:02:59 +02:00
statement_check glob.h 'glob("filename", 0, 0, 0)' && _glob=yes
2011-06-11 18:40:10 +02:00
need_glob=no
2003-04-04 21:15:24 +02:00
if test "$_glob" = yes ; then
2009-02-08 23:49:52 +01:00
def_glob='#define HAVE_GLOB 1'
2003-04-04 21:15:24 +02:00
else
2009-02-08 23:49:52 +01:00
def_glob='#undef HAVE_GLOB'
2011-06-11 18:40:10 +02:00
# HACK! need_glob currently enables compilation of a
# win32-specific glob()-replacement.
# Other OS neither need it nor can they use it (mf:// is disabled for them).
win32 && need_glob=yes
2003-04-04 21:15:24 +02:00
fi
echores "$_glob"
2005-12-26 04:16:48 +01:00
echocheck "setenv()"
_setenv=no
2010-09-27 02:02:59 +02:00
statement_check stdlib.h 'setenv("", "", 0)' && _setenv=yes
2005-12-26 04:16:48 +01:00
if test "$_setenv" = yes ; then
2009-02-08 23:49:52 +01:00
def_setenv='#define HAVE_SETENV 1'
2011-01-26 20:00:17 +01:00
need_setenv=no
2005-12-26 04:16:48 +01:00
else
2009-02-08 23:49:52 +01:00
def_setenv='#undef HAVE_SETENV'
2011-01-26 20:00:17 +01:00
need_setenv=yes
2005-12-26 04:16:48 +01:00
fi
echores "$_setenv"
2010-03-04 15:46:44 +01:00
echocheck "setmode()"
_setmode=no
def_setmode='#define HAVE_SETMODE 0'
2010-09-27 02:02:59 +02:00
statement_check io.h 'setmode(0, 0)' && _setmode=yes && def_setmode='#define HAVE_SETMODE 1'
2010-03-04 15:46:44 +01:00
echores "$_setmode"
2006-04-30 23:17:30 +02:00
if sunos; then
echocheck "sysi86()"
_sysi86=no
2010-09-27 02:02:59 +02:00
statement_check sys/sysi86.h 'sysi86(0)' && _sysi86=yes
2006-04-30 23:17:30 +02:00
if test "$_sysi86" = yes ; then
2009-02-08 23:49:52 +01:00
def_sysi86='#define HAVE_SYSI86 1'
2011-01-05 16:59:43 +01:00
statement_check sys/sysi86.h 'int sysi86(int, void*); sysi86(0)' && def_sysi86_iv='#define HAVE_SYSI86_iv 1'
2006-04-30 23:17:30 +02:00
else
2009-02-08 23:49:52 +01:00
def_sysi86='#undef HAVE_SYSI86'
2006-04-30 23:17:30 +02:00
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"
_sys_sysinfo=no
2011-06-26 16:42:35 +02:00
statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo=yes
2002-08-21 23:31:20 +02:00
if test "$_sys_sysinfo" = yes ; then
2008-10-15 01:00:04 +02:00
def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1'
2002-08-21 23:31:20 +02:00
else
2008-10-15 01:00:04 +02:00
def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H'
2002-08-21 23:31:20 +02:00
fi
echores "$_sys_sysinfo"
2001-10-25 13:46:50 +02:00
2006-06-18 13:21:23 +02:00
if darwin; then
2004-11-10 17:43:40 +01:00
echocheck "Mac OS X Finder Support"
2009-05-05 10:46:37 +02:00
def_macosx_finder='#undef CONFIG_MACOSX_FINDER'
2009-05-07 23:34:56 +02:00
if test "$_macosx_finder" = yes ; then
2009-02-08 23:49:52 +01:00
def_macosx_finder='#define CONFIG_MACOSX_FINDER 1'
2012-01-11 22:29:06 +01:00
extra_ldflags="$extra_ldflags -framework Cocoa"
2008-05-03 22:14:50 +02:00
fi
2008-08-03 18:16:10 +02:00
echores "$_macosx_finder"
2003-02-19 18:26:59 +01:00
2005-04-13 13:46:35 +02:00
echocheck "Mac OS X Bundle file locations"
2009-05-05 10:46:37 +02:00
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
test "$_macosx_bundle" = auto && _macosx_bundle=$_macosx_finder
2009-05-07 23:34:56 +02:00
if test "$_macosx_bundle" = yes ; then
2009-02-08 23:49:52 +01:00
def_macosx_bundle='#define CONFIG_MACOSX_BUNDLE 1'
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
2010-09-12 02:11:26 +02:00
cc_check -framework IOKit && _apple_remote=yes
2007-08-14 16:29:22 +02:00
fi
if test "$_apple_remote" = yes ; then
2009-02-08 23:49:52 +01:00
def_apple_remote='#define CONFIG_APPLE_REMOTE 1'
2009-05-08 15:58:42 +02:00
libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa"
2007-08-14 16:29:22 +02:00
else
2009-02-08 23:49:52 +01:00
def_apple_remote='#undef CONFIG_APPLE_REMOTE'
2007-08-14 16:29:22 +02:00
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
2011-01-05 16:59:43 +01:00
statement_check linux/input.h 'struct input_event ev; struct input_id id' && _apple_ir=yes
2008-05-18 13:53:00 +02:00
fi
if test "$_apple_ir" = yes ; then
2009-02-08 23:49:52 +01:00
def_apple_ir='#define CONFIG_APPLE_IR 1'
2008-05-18 13:53:00 +02:00
else
2009-02-08 23:49:52 +01:00
def_apple_ir='#undef CONFIG_APPLE_IR'
2008-05-18 13:53:00 +02:00
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"
2009-04-15 22:00:26 +02: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)"
2008-08-03 17:57:18 +02:00
if test "$_smb" = yes; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lsmbclient"
2003-11-16 10:12:03 +01:00
fi
2008-08-03 17:57:18 +02:00
if test "$_smb" = auto; then
2010-09-14 12:05:46 +02:00
_smb=no
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
2010-09-27 02:02:59 +02:00
statement_check libsmbclient.h 'smbc_opendir("smb://")' $_ld_tmp &&
2010-09-14 12:05:46 +02:00
extra_ldflags="$extra_ldflags $_ld_tmp" && _smb=yes && break
2005-10-03 21:36:32 +02:00
done
2003-03-21 17:06:11 +01:00
fi
2008-08-03 17:57:18 +02:00
if test "$_smb" = yes; then
2009-10-28 14:55:18 +01:00
def_smb="#define CONFIG_LIBSMBCLIENT 1"
2010-05-09 13:20:15 +02:00
inputmodules="smb $inputmodules"
2003-03-21 17:06:11 +01:00
else
2009-02-08 23:49:52 +01:00
def_smb="#undef CONFIG_LIBSMBCLIENT"
2010-05-29 12:43:51 +02:00
noinputmodules="smb $noinputmodules"
2003-03-21 17:06:11 +01:00
fi
2008-08-03 17:57:18 +02:00
echores "$_smb"
2003-03-21 17:06:11 +01:00
2001-11-17 12:26:26 +01:00
#########
# VIDEO #
#########
2002-03-15 21:48:42 +01:00
echocheck "tdfxfb"
if test "$_tdfxfb" = yes ; then
2009-02-08 23:49:52 +01:00
def_tdfxfb='#define CONFIG_TDFXFB 1'
2010-05-09 13:20:15 +02:00
vomodules="tdfxfb $vomodules"
2002-03-15 21:48:42 +01:00
else
2009-02-08 23:49:52 +01:00
def_tdfxfb='#undef CONFIG_TDFXFB'
2010-05-09 13:20:15 +02:00
novomodules="tdfxfb $novomodules"
2002-03-15 21:48:42 +01:00
fi
echores "$_tdfxfb"
2006-05-17 22:56:49 +02:00
echocheck "s3fb"
if test "$_s3fb" = yes ; then
2009-02-08 23:49:52 +01:00
def_s3fb='#define CONFIG_S3FB 1'
2010-05-09 13:20:15 +02:00
vomodules="s3fb $vomodules"
2006-05-17 22:56:49 +02:00
else
2009-02-08 23:49:52 +01:00
def_s3fb='#undef CONFIG_S3FB'
2010-05-09 13:20:15 +02:00
novomodules="s3fb $novomodules"
2006-05-17 22:56:49 +02:00
fi
echores "$_s3fb"
2008-08-03 22:04:03 +02:00
echocheck "wii"
if test "$_wii" = yes ; then
2009-02-08 23:49:52 +01:00
def_wii='#define CONFIG_WII 1'
2010-05-09 13:20:15 +02:00
vomodules="wii $vomodules"
2008-08-03 22:04:03 +02:00
else
2009-02-08 23:49:52 +01:00
def_wii='#undef CONFIG_WII'
2010-05-09 13:20:15 +02:00
novomodules="wii $novomodules"
2008-08-03 22:04:03 +02:00
fi
echores "$_wii"
2003-03-07 19:45:02 +01:00
echocheck "tdfxvid"
if test "$_tdfxvid" = yes ; then
2009-02-08 23:49:52 +01:00
def_tdfxvid='#define CONFIG_TDFX_VID 1'
2010-05-09 13:20:15 +02:00
vomodules="tdfx_vid $vomodules"
2003-03-07 19:45:02 +01:00
else
2009-02-08 23:49:52 +01:00
def_tdfxvid='#undef CONFIG_TDFX_VID'
2010-05-09 13:20:15 +02:00
novomodules="tdfx_vid $novomodules"
2003-03-07 19:45:02 +01:00
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);
2008-07-15 10:31:43 +02:00
return 0;
2007-08-03 19:14:35 +02:00
}
EOF
_xvr100=no
cc_check && _xvr100=yes
fi
if test "$_xvr100" = yes ; then
2009-02-08 23:49:52 +01:00
def_xvr100='#define CONFIG_XVR100 1'
2010-05-09 13:20:15 +02:00
vomodules="xvr100 $vomodules"
2007-08-03 19:14:35 +02:00
else
2009-02-08 23:49:52 +01:00
def_tdfxvid='#undef CONFIG_XVR100'
2010-05-09 13:20:15 +02:00
novomodules="xvr100 $novomodules"
2007-08-03 19:14:35 +02:00
fi
echores "$_xvr100"
2003-08-24 20:26:37 +02:00
echocheck "tga"
if test "$_tga" = yes ; then
2009-02-08 23:49:52 +01:00
def_tga='#define CONFIG_TGA 1'
2010-05-09 13:20:15 +02:00
vomodules="tga $vomodules"
2003-08-24 20:26:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_tga='#undef CONFIG_TGA'
2010-05-09 13:20:15 +02:00
novomodules="tga $novomodules"
2003-08-24 20:26:37 +02:00
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
2009-10-28 14:55:18 +01:00
def_md5sum="#define CONFIG_MD5SUM 1"
2010-05-09 13:20:15 +02:00
vomodules="md5sum $vomodules"
2007-07-14 17:11:08 +02:00
else
2009-02-08 23:49:52 +01:00
def_md5sum="#undef CONFIG_MD5SUM"
2010-05-09 13:20:15 +02:00
novomodules="md5sum $novomodules"
2007-07-14 17:11:08 +02:00
fi
echores "$_md5sum"
2008-06-20 21:33:32 +02:00
echocheck "yuv4mpeg support"
if test "$_yuv4mpeg" = yes; then
2009-10-28 14:55:18 +01:00
def_yuv4mpeg="#define CONFIG_YUV4MPEG 1"
2010-05-09 13:20:15 +02:00
vomodules="yuv4mpeg $vomodules"
2008-06-20 21:33:32 +02:00
else
2009-02-08 23:49:52 +01:00
def_yuv4mpeg="#undef CONFIG_YUV4MPEG"
2010-05-09 13:20:15 +02:00
novomodules="yuv4mpeg $novomodules"
2008-06-20 21:33:32 +02:00
fi
echores "$_yuv4mpeg"
2007-07-14 17:11:08 +02:00
echocheck "bl"
if test "$_bl" = yes ; then
2009-02-08 23:49:52 +01:00
def_bl='#define CONFIG_BL 1'
2010-05-09 13:20:15 +02:00
vomodules="bl $vomodules"
2007-07-14 17:11:08 +02:00
else
2009-02-08 23:49:52 +01:00
def_bl='#undef CONFIG_BL'
2010-05-09 13:20:15 +02:00
novomodules="bl $novomodules"
2007-07-14 17:11:08 +02:00
fi
echores "$_bl"
2002-03-15 21:48:42 +01:00
echocheck "DirectFB"
if test "$_directfb" = auto ; then
_directfb=no
2005-10-18 23:37:28 +02:00
cat > $TMPC << EOF
2010-09-15 17:58:48 +02:00
#include <directfb.h>
2005-10-18 23:37:28 +02:00
#include <directfb_version.h>
2010-09-15 17:58:48 +02:00
#if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
#error "DirectFB version too old."
#endif
int main(void) { DirectFBInit(0, 0); return 0; }
2002-08-05 13:42:29 +02:00
EOF
2010-09-15 17:58:48 +02:00
for _inc_tmp in "" -I/usr/local/include/directfb -I/usr/include/directfb -I/usr/local/include; do
cc_check $_inc_tmp -ldirectfb &&
_directfb=yes && extra_cflags="$extra_cflags $_inc_tmp" && break
done
2002-08-05 13:42:29 +02:00
fi
2002-03-15 21:48:42 +01:00
if test "$_directfb" = yes ; then
2009-02-08 23:49:52 +01:00
def_directfb='#define CONFIG_DIRECTFB 1'
2010-09-15 17:58:48 +02:00
vomodules="directfb dfbmga $vomodules"
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -ldirectfb"
2002-03-15 21:48:42 +01:00
else
2009-02-08 23:49:52 +01:00
def_directfb='#undef CONFIG_DIRECTFB'
2010-09-15 17:58:48 +02:00
novomodules="directfb dfbmga $novomodules"
2002-03-15 21:48:42 +01:00
fi
2010-09-15 17:58:48 +02:00
echores "$_directfb"
2002-05-25 23:43:02 +02:00
echocheck "X11 headers presence"
2007-07-17 13:16:15 +02:00
_x11_headers="no"
2010-05-09 13:20:15 +02:00
res_comment="check if the dev(el) packages are installed"
2009-04-15 22:00:26 +02:00
for I in $(echo $extra_cflags | 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"
2010-05-09 13:20:15 +02:00
res_comment=""
2007-07-17 13:16:15 +02:00
break
fi
done
2008-03-26 01:14:51 +01:00
if test $_cross_compile = no; then
2010-01-10 22:47:50 +01:00
for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/X11R6/include \
2009-03-14 17:00:21 +01:00
/usr/include/X11R6 /usr/openwin/include ; do
2008-03-26 01:15:43 +01:00
if test -f "$I/X11/Xlib.h" ; then
2009-03-25 20:48:05 +01:00
extra_cflags="$extra_cflags -I$I"
2008-03-26 01:15:43 +01:00
_x11_headers="yes"
2010-05-09 13:20:15 +02:00
res_comment="using $I"
2008-03-26 01:15:43 +01:00
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
2010-01-10 22:47:50 +01:00
for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \
-L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \
2009-03-14 17:00:21 +01:00
-L/usr/lib ; do
2005-06-03 19:24:30 +02:00
if netbsd; then
2009-04-15 22:00:26 +02: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
2010-09-27 02:46:28 +02:00
statement_check X11/Xutil.h 'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
libs_mplayer="$libs_mplayer $_ld_tmp" && _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
2009-02-08 23:49:52 +01:00
def_x11='#define CONFIG_X11 1'
2010-05-09 13:20:15 +02:00
vomodules="x11 xover $vomodules"
2001-11-17 04:53:05 +01:00
else
2005-06-03 19:24:30 +02:00
_x11=no
2009-02-08 23:49:52 +01:00
def_x11='#undef CONFIG_X11'
2010-05-09 13:20:15 +02:00
novomodules="x11 $novomodules"
res_comment="check if the dev(el) packages are installed"
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
_xss=no
2011-01-02 12:49:48 +01:00
statement_check "X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss=yes
2007-12-22 12:09:43 +01:00
fi
if test "$_xss" = yes ; then
2009-02-08 23:49:52 +01:00
def_xss='#define CONFIG_XSS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXss"
2007-12-22 12:09:43 +01:00
else
2009-02-08 23:49:52 +01:00
def_xss='#undef CONFIG_XSS'
2007-12-22 12:09:43 +01:00
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>
2010-09-14 12:05:46 +02:00
int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
2001-06-04 10:07:57 +02:00
EOF
2006-11-22 17:42:04 +01:00
cc_check -lXdpms && _xdpms3=yes
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/dpms.h 'DPMSQueryExtension(0, 0, 0)' -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
2009-02-08 23:49:52 +01:00
def_xdpms='#define CONFIG_XDPMS 1'
2010-05-09 13:20:15 +02:00
res_comment="using Xdpms 4"
2006-05-07 16:00:07 +02:00
echores "yes"
2001-11-17 04:53:05 +01:00
elif test "$_xdpms3" = yes ; then
2009-02-08 23:49:52 +01:00
def_xdpms='#define CONFIG_XDPMS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXdpms"
2010-05-09 13:20:15 +02:00
res_comment="using Xdpms 3"
2006-05-07 16:00:07 +02:00
echores "yes"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xdpms='#undef CONFIG_XDPMS'
2001-11-17 04:53:05 +01:00
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"
2011-05-05 12:25:17 +02:00
if test "$_xv" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_xv=no
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/Xvlib.h 'XvGetPortAttribute(0, 0, 0, 0)' -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
2009-02-08 23:49:52 +01:00
def_xv='#define CONFIG_XV 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXv"
2010-05-09 13:20:15 +02:00
vomodules="xv $vomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xv='#undef CONFIG_XV'
2010-05-09 13:20:15 +02: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
2009-02-16 21:58:13 +01:00
echocheck "VDPAU"
2011-05-05 12:25:17 +02:00
if test "$_vdpau" = auto && test "$_x11" = yes ; then
2009-02-16 21:58:13 +01:00
_vdpau=no
if test "$_dl" = yes ; then
2011-01-20 12:21:34 +01:00
return_statement_check vdpau/vdpau_x11.h 'vdp_device_create_x11(0, 0, 0, 0)' VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 -lvdpau && _vdpau=yes
2009-02-16 21:58:13 +01:00
fi
fi
if test "$_vdpau" = yes ; then
def_vdpau='#define CONFIG_VDPAU 1'
2010-02-26 17:37:19 +01:00
libs_mplayer="$libs_mplayer -lvdpau"
2010-05-09 13:20:15 +02:00
vomodules="vdpau $vomodules"
2009-02-16 21:58:13 +01:00
else
def_vdpau='#define CONFIG_VDPAU 0'
2010-05-09 13:20:15 +02:00
novomodules="vdpau $novomodules"
2009-02-16 21:58:13 +01:00
fi
echores "$_vdpau"
2001-11-17 04:53:05 +01:00
echocheck "Xinerama"
2011-05-05 12:25:17 +02:00
if test "$_xinerama" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_xinerama=no
2010-09-27 02:46:28 +02:00
statement_check X11/extensions/Xinerama.h 'XineramaIsActive(0)' -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
2009-02-08 23:49:52 +01:00
def_xinerama='#define CONFIG_XINERAMA 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXinerama"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xinerama='#undef CONFIG_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"
2011-05-05 12:25:17 +02:00
if test "$_vm" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_vm=no
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -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
2009-02-08 23:49:52 +01:00
def_vm='#define CONFIG_XF86VM 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXxf86vm"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_vm='#undef CONFIG_XF86VM'
2001-11-17 04:53:05 +01:00
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"
2011-05-05 12:25:17 +02:00
if test "$_xf86keysym" = auto && test "$_x11" = yes ; then
2005-02-02 15:07:13 +01:00
_xf86keysym=no
2011-01-20 12:21:34 +01:00
return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes
2005-02-02 15:07:13 +01:00
fi
if test "$_xf86keysym" = yes ; then
2009-02-08 23:49:52 +01:00
def_xf86keysym='#define CONFIG_XF86XK 1'
2005-02-02 15:07:13 +01:00
else
2009-02-08 23:49:52 +01:00
def_xf86keysym='#undef CONFIG_XF86XK'
2005-02-02 15:07:13 +01:00
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
_dga2=no
2011-03-09 20:39:13 +01:00
statement_check_broken X11/Xlib.h X11/extensions/Xxf86dga.h 'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2=yes
2007-08-31 15:08:13 +02:00
fi
if test "$_dga1" = auto && test "$_dga2" = no && test "$_vm" = yes ; then
_dga1=no
2011-03-09 20:39:13 +01:00
statement_check_broken X11/Xlib.h X11/extensions/Xxf86dga.h 'XF86DGASetViewPort(0, 0, 0, 0)' -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
2009-02-08 23:49:52 +01:00
def_dga='#undef CONFIG_DGA'
def_dga1='#undef CONFIG_DGA1'
def_dga2='#undef CONFIG_DGA2'
2007-08-31 15:08:13 +02:00
if test "$_dga1" = yes ; then
_dga=yes
2009-02-08 23:49:52 +01:00
def_dga1='#define CONFIG_DGA1 1'
2010-05-09 13:20:15 +02:00
res_comment="using DGA 1.0"
2007-08-31 15:08:13 +02:00
elif test "$_dga2" = yes ; then
_dga=yes
2009-02-08 23:49:52 +01:00
def_dga2='#define CONFIG_DGA2 1'
2010-05-09 13:20:15 +02:00
res_comment="using DGA 2.0"
2007-08-31 15:08:13 +02:00
fi
if test "$_dga" = yes ; then
2009-02-08 23:49:52 +01:00
def_dga='#define CONFIG_DGA 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXxf86dga"
2010-05-09 13:20:15 +02:00
vomodules="dga $vomodules"
2001-11-17 04:53:05 +01:00
else
2010-05-09 13:20:15 +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
2009-02-08 23:49:52 +01:00
def_3dfx='#define CONFIG_3DFX 1'
2010-05-09 13:20:15 +02:00
vomodules="3dfx $vomodules"
2007-09-09 12:18:18 +02:00
else
2011-04-20 19:37:10 +02:00
_3dfx=no
2009-02-08 23:49:52 +01:00
def_3dfx='#undef CONFIG_3DFX'
2010-05-09 13:20:15 +02:00
novomodules="3dfx $novomodules"
2007-09-09 12:18:18 +02:00
fi
echores "$_3dfx"
2001-11-17 04:53:05 +01:00
echocheck "GGI"
if test "$_ggi" = auto ; then
_ggi=no
2010-09-27 02:02:59 +02:00
statement_check ggi/ggi.h 'ggiInit()' -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
2009-02-08 23:49:52 +01:00
def_ggi='#define CONFIG_GGI 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lggi"
2010-05-09 13:20:15 +02:00
vomodules="ggi $vomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_ggi='#undef CONFIG_GGI'
2010-05-09 13:20:15 +02: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
2010-09-27 02:02:59 +02:00
statement_check ggi/wmh.h 'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh=yes
2005-05-11 10:01:52 +02:00
fi
# needed to get right output on obscure combination
# like --disable-ggi --enable-ggiwmh
if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
2009-02-08 23:49:52 +01:00
def_ggiwmh='#define CONFIG_GGIWMH 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lggiwmh"
2005-05-11 10:01:52 +02:00
else
_ggiwmh=no
2009-02-08 23:49:52 +01:00
def_ggiwmh='#undef CONFIG_GGIWMH'
2005-05-11 10:01:52 +02:00
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
int main(void) {
aa_context *c;
aa_renderparams *p;
2010-09-14 12:05:46 +02:00
aa_init(0, 0, 0);
2005-08-26 20:58:06 +02:00
c = aa_autoinit(&aa_defparams);
p = aa_getrenderparams();
2010-09-16 20:58:21 +02:00
aa_autoinitkbd(c, 0);
2005-08-26 20:58:06 +02:00
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
2009-03-25 20:48:05 +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
2009-02-08 23:49:52 +01:00
def_aa='#define CONFIG_AA 1'
2002-11-18 02:02:27 +01:00
if cygwin ; then
2009-04-15 22:00:26 +02:00
libs_mplayer="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
2002-11-18 02:02:27 +01:00
fi
2010-05-09 13:20:15 +02:00
vomodules="aa $vomodules"
2001-08-20 23:20:03 +02:00
else
2009-02-08 23:49:52 +01:00
def_aa='#undef CONFIG_AA'
2010-05-09 13:20:15 +02: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
2010-09-14 12:05:46 +02:00
int main(void) { caca_init(); return 0; }
2004-04-06 02:04:48 +02:00
EOF
2009-04-15 22:00:26 +02:00
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
2009-02-08 23:49:52 +01:00
def_caca='#define CONFIG_CACA 1'
2009-04-15 22:00:26 +02:00
extra_cflags="$extra_cflags $(caca-config --cflags)"
libs_mplayer="$libs_mplayer $(caca-config --libs)"
2010-05-09 13:20:15 +02:00
vomodules="caca $vomodules"
2004-04-06 02:04:48 +02:00
else
2009-02-08 23:49:52 +01:00
def_caca='#undef CONFIG_CACA'
2010-05-09 13:20:15 +02:00
novomodules="caca $novomodules"
2004-04-06 02:04:48 +02:00
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
_svga=no
2010-06-24 10:03:41 +02:00
header_check vga.h -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
2009-02-08 23:49:52 +01:00
def_svga='#define CONFIG_SVGALIB 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lvga"
2010-05-09 13:20:15 +02:00
vomodules="svga $vomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_svga='#undef CONFIG_SVGALIB'
2010-05-09 13:20:15 +02: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
2009-02-08 23:49:52 +01:00
def_fbdev='#define CONFIG_FBDEV 1'
2010-05-09 13:20:15 +02:00
vomodules="fbdev $vomodules"
2001-04-25 00:51:55 +02:00
else
2009-02-08 23:49:52 +01:00
def_fbdev='#undef CONFIG_FBDEV'
2010-05-09 13:20:15 +02: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
2008-08-14 17:54:53 +02:00
#include <poll.h>
2002-04-04 15:21:13 +02:00
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
2002-12-28 13:04:58 +01:00
#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
2011-01-02 12:49:48 +01:00
cc_check $_inc_tmp && _dvb=yes &&
2009-03-25 20:48:05 +01:00
extra_cflags="$extra_cflags $_inc_tmp" && break
2006-08-05 01:57:04 +02:00
done
2006-08-04 01:43:15 +02:00
fi
2010-03-02 20:57:17 +01:00
echores "$_dvb"
if test "$_dvb" = yes ; then
_dvbin=yes
2010-05-09 13:20:15 +02:00
inputmodules="dvb $inputmodules"
2009-02-08 23:49:52 +01:00
def_dvb='#define CONFIG_DVB 1'
def_dvbin='#define CONFIG_DVBIN 1'
2010-05-09 13:20:15 +02:00
aomodules="mpegpes(dvb) $aomodules"
vomodules="mpegpes(dvb) $vomodules"
2010-03-02 20:57:17 +01:00
else
_dvbin=no
2010-05-29 12:43:51 +02:00
noinputmodules="dvb $noinputmodules"
2009-02-08 23:49:52 +01:00
def_dvb='#undef CONFIG_DVB'
def_dvbin='#undef CONFIG_DVBIN '
2010-05-09 13:20:15 +02:00
aomodules="mpegpes(file) $aomodules"
vomodules="mpegpes(file) $vomodules"
2001-11-03 22:25:55 +01:00
fi
2007-07-14 17:11:08 +02:00
2009-05-06 01:02:59 +02:00
if darwin; then
2009-09-04 11:35:58 +02:00
echocheck "QuickTime"
if test "$quicktime" = auto ; then
quicktime=no
2011-01-05 16:59:43 +01:00
statement_check QuickTime/QuickTime.h 'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime && quicktime=yes
2009-09-04 11:35:58 +02:00
fi
if test "$quicktime" = yes ; then
2009-09-04 14:24:45 +02:00
extra_ldflags="$extra_ldflags -framework QuickTime"
2009-09-04 11:35:58 +02:00
def_quicktime='#define CONFIG_QUICKTIME 1'
else
def_quicktime='#undef CONFIG_QUICKTIME'
fi
echores $quicktime
2009-05-06 01:02:59 +02:00
echocheck "CoreVideo"
if test "$_corevideo" = auto ; then
cat > $TMPC <<EOF
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
#include <OpenGL/OpenGL.h>
#include <QuartzCore/CoreVideo.h>
int main(void) { return 0; }
EOF
_corevideo=no
cc_check -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes
fi
if test "$_corevideo" = yes ; then
2010-05-09 13:20:15 +02:00
vomodules="corevideo $vomodules"
2009-05-06 01:02:59 +02:00
libs_mplayer="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
def_corevideo='#define CONFIG_COREVIDEO 1'
else
2010-05-09 13:20:15 +02:00
novomodules="corevideo $novomodules"
2009-05-06 01:02:59 +02:00
def_corevideo='#undef CONFIG_COREVIDEO'
fi
echores "$_corevideo"
2011-10-15 18:44:00 +02:00
echocheck "Cocoa"
if test "$_gl" = no ; then
# if _gl is not enabled there is no point to add potentially unused linker flags
_cocoa=no
fi
if test "$_cocoa" = auto ; then
cat > $TMPC <<EOF
#include <CoreServices/CoreServices.h>
#include <OpenGL/OpenGL.h>
#include <QuartzCore/CoreVideo.h>
int main(void) { return 0; }
EOF
_cocoa=no
cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _cocoa=yes
fi
if test "$_cocoa" = yes ; then
libs_mplayer="$libs_mplayer -framework Cocoa -framework QuartzCore -framework OpenGL"
fi
echores "$_cocoa"
2009-05-06 01:02:59 +02:00
fi #if darwin
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
2010-05-09 13:20:15 +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
2010-09-16 13:22:30 +02:00
#include <stdio.h>
2002-02-01 14:10:35 +01:00
#include <string.h>
2010-09-16 13:22:30 +02:00
#include <png.h>
2002-02-01 14:10:35 +01:00
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
2009-10-06 08:43:00 +02:00
cc_check -lpng -lz $_ld_lm && _png=yes
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
2009-02-08 23:49:52 +01:00
def_png='#define CONFIG_PNG 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lpng -lz"
2001-11-17 12:26:26 +01:00
else
2009-02-08 23:49:52 +01:00
def_png='#undef CONFIG_PNG'
2001-11-17 12:26:26 +01:00
fi
2008-11-30 14:22:34 +01:00
echocheck "MNG support"
if test "$_mng" = auto ; then
_mng=no
2011-01-20 12:21:34 +01:00
return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng=yes
2008-11-30 14:22:34 +01:00
fi
echores "$_mng"
if test "$_mng" = yes ; then
2009-02-08 23:49:52 +01:00
def_mng='#define CONFIG_MNG 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lmng -lz"
2008-11-30 14:22:34 +01:00
else
2009-02-08 23:49:52 +01:00
def_mng='#undef CONFIG_MNG'
2008-11-30 14:22:34 +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
2010-09-26 20:22:06 +02:00
header_check_broken stdio.h jpeglib.h -ljpeg $_ld_lm && _jpeg=yes
2002-03-10 23:49:18 +01:00
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
2009-02-08 23:49:52 +01:00
def_jpeg='#define CONFIG_JPEG 1'
2010-05-09 13:20:15 +02:00
vomodules="jpeg $vomodules"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ljpeg"
2002-03-10 23:49:18 +01:00
else
2009-02-08 23:49:52 +01:00
def_jpeg='#undef CONFIG_JPEG'
2010-05-09 13:20:15 +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
2009-02-08 23:49:52 +01:00
def_pnm="#define CONFIG_PNM 1"
2010-05-09 13:20:15 +02:00
vomodules="pnm $vomodules"
2004-10-24 00:43:19 +02:00
else
2009-02-08 23:49:52 +01:00
def_pnm="#undef CONFIG_PNM"
2010-05-09 13:20:15 +02:00
novomodules="pnm $novomodules"
2004-10-24 00:43:19 +02:00
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
2006-11-22 17:42:04 +01:00
for _ld_gif in "-lungif" "-lgif" ; do
2010-09-27 02:02:59 +02:00
statement_check gif_lib.h 'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _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
2009-02-08 23:49:52 +01:00
def_gif='#define CONFIG_GIF 1'
2010-05-09 13:20:15 +02:00
codecmodules="gif $codecmodules"
vomodules="gif89a $vomodules"
res_comment="old version, some encoding functions disabled"
2009-02-08 23:49:52 +01:00
def_gif_4='#undef CONFIG_GIF_4'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags $_ld_gif"
2002-05-13 22:52:10 +02:00
cat > $TMPC << EOF
2002-05-23 22:38:27 +02:00
#include <signal.h>
2010-09-14 11:41:32 +02:00
#include <stdio.h>
#include <stdlib.h>
2002-05-13 22:52:10 +02:00
#include <gif_lib.h>
2010-09-14 11:41:32 +02:00
static void catch(int sig) { 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
2009-10-06 08:43:00 +02:00
if cc_check "$_ld_gif" ; then
2009-02-08 23:49:52 +01:00
def_gif_4='#define CONFIG_GIF_4 1'
2010-05-09 13:20:15 +02:00
res_comment=""
2002-05-13 22:52:10 +02:00
fi
2002-05-12 03:07:25 +02:00
else
2009-02-08 23:49:52 +01:00
def_gif='#undef CONFIG_GIF'
def_gif_4='#undef CONFIG_GIF_4'
2010-05-09 13:20:15 +02:00
novomodules="gif89a $novomodules"
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"
2009-02-08 23:49:52 +01:00
def_gif_tvt_hack='#define CONFIG_GIF_TVT_HACK 1'
2003-02-19 17:55:14 +01:00
cat > $TMPC << EOF
2010-09-14 11:41:32 +02:00
#include <stdio.h>
2003-02-19 17:55:14 +01:00
#include <gif_lib.h>
int main(void) {
2010-09-14 11:41:32 +02:00
GifFileType gif = {.UserData = NULL};
2003-02-19 17:55:14 +01:00
printf("UserData is at address %p\n", gif.UserData);
return 0;
}
EOF
2009-10-06 08:43:00 +02:00
if cc_check "$_ld_gif" ; then
2009-02-08 23:49:52 +01:00
def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK'
2003-02-19 17:55:14 +01:00
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
2005-08-18 13:26:04 +02:00
_vesa=no
2010-09-27 02:02:59 +02:00
statement_check vbe.h 'vbeInit()' -lvbe -llrmi && _vesa=yes
2003-11-13 21:53:40 +01:00
fi
if test "$_vesa" = yes ; then
2009-02-08 23:49:52 +01:00
def_vesa='#define CONFIG_VESA 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lvbe -llrmi"
2010-05-09 13:20:15 +02:00
vomodules="vesa $vomodules"
2001-11-28 18:52:25 +01:00
else
2009-02-08 23:49:52 +01:00
def_vesa='#undef CONFIG_VESA'
2010-05-09 13:20:15 +02: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"
2010-01-03 12:33:33 +01:00
_inc_tmp=""
_ld_tmp=""
def_sdl_sdl_h="#undef CONFIG_SDL_SDL_H"
2001-11-17 12:26:26 +01:00
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
2010-01-03 12:33:33 +01:00
#ifdef CONFIG_SDL_SDL_H
#include <SDL/SDL.h>
#else
2001-11-17 12:46:09 +01:00
#include <SDL.h>
2010-01-03 12:33:33 +01:00
#endif
#ifndef __APPLE__
// we allow SDL hacking our main() only on OSX
#undef main
#endif
2009-04-23 09:39:39 +02:00
int main(int argc, char *argv[]) {
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
2010-01-17 12:49:33 +01:00
for _ld_tmp in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
2010-01-03 12:33:33 +01:00
if cc_check -DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
_sdl=yes
def_sdl_sdl_h="#define CONFIG_SDL_SDL_H 1"
break
fi
done
if test "$_sdl" = no && "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
2010-05-09 13:20:15 +02:00
res_comment="using $_sdlconfig"
2010-01-03 12:33:33 +01:00
if cygwin ; then
_inc_tmp="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
_ld_tmp="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
elif mingw32 ; then
_inc_tmp=$($_sdlconfig --cflags | sed s/-Dmain=SDL_main//)
_ld_tmp=$($_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//)
else
_inc_tmp="$($_sdlconfig --cflags)"
_ld_tmp="$($_sdlconfig --libs)"
fi
if cc_check $_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdl=yes
2010-09-04 11:39:21 +02:00
elif cc_check $_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
# HACK for BeOS/Haiku SDL
_ld_tmp="$_ld_tmp -lstdc++"
_sdl=yes
2001-11-17 12:26:26 +01:00
fi
fi
fi
if test "$_sdl" = yes ; then
2009-02-08 23:49:52 +01:00
def_sdl='#define CONFIG_SDL 1'
2010-01-03 12:33:33 +01:00
extra_cflags="$extra_cflags $_inc_tmp"
libs_mplayer="$libs_mplayer $_ld_tmp"
2010-05-09 13:20:15 +02:00
vomodules="sdl $vomodules"
aomodules="sdl $aomodules"
2001-11-17 12:26:26 +01:00
else
2009-02-08 23:49:52 +01:00
def_sdl='#undef CONFIG_SDL'
2010-05-09 13:20:15 +02: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
2010-04-30 21:04:13 +02:00
# make sure this stays below CoreVideo to avoid issues due to namespace
# conflicts between -lGL and -framework OpenGL
echocheck "OpenGL"
#Note: this test is run even with --enable-gl since we autodetect linker flags
2011-10-15 18:44:00 +02:00
if (test "$_x11" = yes || test "$_sdl" = yes || test "$_cocoa" = yes || win32) && test "$_gl" != no ; then
2010-04-30 21:04:13 +02:00
cat > $TMPC << EOF
#ifdef GL_WIN32
#include <windows.h>
#include <GL/gl.h>
#elif defined(GL_SDL)
#include <GL/gl.h>
#ifdef CONFIG_SDL_SDL_H
#include <SDL/SDL.h>
#else
#include <SDL.h>
#endif
#ifndef __APPLE__
// we allow SDL hacking our main() only on OSX
#undef main
#endif
#else
#include <GL/gl.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
#endif
2010-06-30 11:27:03 +02:00
int main(int argc, char *argv[]) {
2010-04-30 21:04:13 +02:00
#ifdef GL_WIN32
HDC dc;
wglCreateContext(dc);
#elif defined(GL_SDL)
SDL_GL_SwapBuffers();
#else
glXCreateContext(NULL, NULL, NULL, True);
#endif
glFinish();
return 0;
}
EOF
_gl=no
for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
2012-03-16 21:41:41 +01:00
if test "$_cocoa" != yes && cc_check $_ld_tmp $_ld_lm ; then
2010-04-30 21:04:13 +02:00
_gl=yes
_gl_x11=yes
libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl"
break
fi
done
if cc_check -DGL_WIN32 -lopengl32 ; then
_gl=yes
_gl_win32=yes
libs_mplayer="$libs_mplayer -lopengl32 -lgdi32"
fi
2011-10-15 18:44:00 +02:00
if test "$_cocoa" = yes ; then
_gl=yes
_gl_cocoa=yes
fi
2010-04-30 21:04:13 +02:00
# last so it can reuse any linker etc. flags detected before
if test "$_sdl" = yes ; then
if cc_check -DGL_SDL ||
cc_check -DCONFIG_SDL_SDL_H -DGL_SDL ; then
_gl=yes
_gl_sdl=yes
elif cc_check -DGL_SDL -lGL ||
cc_check -DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
_gl=yes
_gl_sdl=yes
libs_mplayer="$libs_mplayer -lGL"
fi
fi
else
_gl=no
fi
if test "$_gl" = yes ; then
def_gl='#define CONFIG_GL 1'
2010-05-09 13:20:15 +02:00
res_comment="backends:"
2011-10-15 18:44:00 +02:00
if test "$_gl_cocoa" = yes ; then
def_gl_cocoa='#define CONFIG_GL_COCOA 1'
res_comment="$res_comment cocoa"
fi
2010-04-30 21:04:13 +02:00
if test "$_gl_win32" = yes ; then
def_gl_win32='#define CONFIG_GL_WIN32 1'
2010-05-09 13:20:15 +02:00
res_comment="$res_comment win32"
2010-04-30 21:04:13 +02:00
fi
if test "$_gl_x11" = yes ; then
def_gl_x11='#define CONFIG_GL_X11 1'
2010-05-09 13:20:15 +02:00
res_comment="$res_comment x11"
2010-04-30 21:04:13 +02:00
fi
if test "$_gl_sdl" = yes ; then
def_gl_sdl='#define CONFIG_GL_SDL 1'
2010-05-09 13:20:15 +02:00
res_comment="$res_comment sdl"
2010-04-30 21:04:13 +02:00
fi
2010-05-09 13:20:15 +02:00
vomodules="opengl $vomodules"
2010-04-30 21:04:13 +02:00
else
def_gl='#undef CONFIG_GL'
2011-10-15 18:44:00 +02:00
def_gl_cocoa='#undef CONFIG_GL_COCOA'
2010-04-30 21:04:13 +02:00
def_gl_win32='#undef CONFIG_GL_WIN32'
def_gl_x11='#undef CONFIG_GL_X11'
def_gl_sdl='#undef CONFIG_GL_SDL'
2010-05-09 13:20:15 +02:00
novomodules="opengl $novomodules"
2010-04-30 21:04:13 +02:00
fi
echores "$_gl"
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
_win32waveout=no
2010-09-26 20:22:06 +02:00
header_check_broken windows.h mmsystem.h -lwinmm && _win32waveout=yes
2002-10-25 18:25:41 +02:00
fi
if test "$_win32waveout" = yes ; then
2009-02-08 23:49:52 +01:00
def_win32waveout='#define CONFIG_WIN32WAVEOUT 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lwinmm"
2010-05-09 13:20:15 +02:00
aomodules="win32 $aomodules"
2002-10-25 18:25:41 +02:00
else
2009-02-08 23:49:52 +01:00
def_win32waveout='#undef CONFIG_WIN32WAVEOUT'
2010-05-09 13:20:15 +02:00
noaomodules="win32 $noaomodules"
2002-10-25 18:25:41 +02:00
fi
echores "$_win32waveout"
2008-11-18 13:23:42 +01:00
echocheck "Direct3D"
if test "$_direct3d" = auto ; then
_direct3d=no
2010-09-26 20:22:06 +02:00
header_check d3d9.h && _direct3d=yes
2008-11-18 13:23:42 +01:00
fi
if test "$_direct3d" = yes ; then
2009-02-08 23:49:52 +01:00
def_direct3d='#define CONFIG_DIRECT3D 1'
2010-05-09 13:20:15 +02:00
vomodules="direct3d $vomodules"
2008-11-18 13:23:42 +01:00
else
2009-02-08 23:49:52 +01:00
def_direct3d='#undef CONFIG_DIRECT3D'
2010-05-09 13:20:15 +02:00
novomodules="direct3d $novomodules"
2008-11-18 13:23:42 +01:00
fi
echores "$_direct3d"
2002-09-28 21:03:50 +02:00
echocheck "Directx"
if test "$_directx" = auto ; then
cat > $TMPC << EOF
#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
2009-02-08 23:49:52 +01:00
def_directx='#define CONFIG_DIRECTX 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lgdi32"
2010-05-09 13:20:15 +02:00
vomodules="directx $vomodules"
aomodules="dsound $aomodules"
2002-09-28 21:03:50 +02:00
else
2009-02-08 23:49:52 +01:00
def_directx='#undef CONFIG_DIRECTX'
2010-05-09 13:20:15 +02:00
novomodules="directx $novomodules"
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-11-17 04:53:05 +01:00
echocheck "DXR3/H+"
if test "$_dxr3" = auto ; then
_dxr3=no
2010-06-24 10:03:41 +02:00
header_check linux/em8300.h && _dxr3=yes
2001-07-06 05:22:14 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_dxr3" = yes ; then
2009-02-08 23:49:52 +01:00
def_dxr3='#define CONFIG_DXR3 1'
2010-05-09 13:20:15 +02:00
vomodules="dxr3 $vomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_dxr3='#undef CONFIG_DXR3'
2010-05-09 13:20:15 +02: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
2011-01-02 12:49:48 +01:00
#include <sys/time.h>
2006-07-20 00:02:09 +02:00
#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;
2008-12-03 15:54:04 +01:00
ioctl(0, IVTV_IOC_START_DECODE, &sd1);
ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
2008-02-01 21:14:53 +01:00
return 0; }
2006-07-20 00:02:09 +02:00
EOF
_ivtv=no
cc_check && _ivtv=yes
fi
if test "$_ivtv" = yes ; then
2009-02-08 23:49:52 +01:00
def_ivtv='#define CONFIG_IVTV 1'
2010-05-09 13:20:15 +02:00
vomodules="ivtv $vomodules"
aomodules="ivtv $aomodules"
2006-07-20 00:02:09 +02:00
else
2009-02-08 23:49:52 +01:00
def_ivtv='#undef CONFIG_IVTV'
2010-05-09 13:20:15 +02:00
novomodules="ivtv $novomodules"
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
2011-01-02 12:49:48 +01:00
#include <sys/time.h>
2007-07-29 21:20:55 +02:00
#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
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
2009-02-08 23:49:52 +01:00
def_v4l2='#define CONFIG_V4L2_DECODER 1'
2010-05-09 13:20:15 +02:00
vomodules="v4l2 $vomodules"
aomodules="v4l2 $aomodules"
2007-07-29 21:20:55 +02:00
else
2009-02-08 23:49:52 +01:00
def_v4l2='#undef CONFIG_V4L2_DECODER'
2010-05-09 13:20:15 +02:00
novomodules="v4l2 $novomodules"
noaomodules="v4l2 $noaomodules"
2007-07-29 21:20:55 +02:00
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
_ossaudio=no
2011-01-20 12:21:34 +01:00
return_check $_soundcard_header SNDCTL_DSP_SETFRAGMENT && _ossaudio=yes
2001-11-17 04:53:05 +01:00
fi
if test "$_ossaudio" = yes ; then
2009-02-08 23:49:52 +01:00
def_ossaudio='#define CONFIG_OSS_AUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="oss $aomodules"
2010-06-14 17:19:38 +02:00
cat > $TMPC << EOF
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
2010-06-14 17:19:38 +02:00
_real_ossaudio=no
cc_check && _real_ossaudio=yes
if test "$_real_ossaudio" = yes; then
def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
# Check for OSS4 headers (override default headers)
# Does not apply to systems where OSS4 is native (e.g. FreeBSD)
if test -f /etc/oss.conf; then
. /etc/oss.conf
_ossinc="$OSSLIBDIR/include"
if test -f "$_ossinc/sys/soundcard.h"; then
extra_cflags="-I$_ossinc $extra_cflags"
2009-06-23 06:31:13 +02:00
fi
2002-04-28 00:42:27 +02:00
fi
2010-06-14 17:19:38 +02:00
elif netbsd || openbsd ; then
def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
extra_ldflags="$extra_ldflags -lossaudio"
else
def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
fi
def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
2001-04-26 22:23:24 +02:00
else
2009-02-08 23:49:52 +01:00
def_ossaudio='#undef CONFIG_OSS_AUDIO'
def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
2010-05-09 13:20:15 +02: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
2010-09-27 02:02:59 +02:00
statement_check artsc.h 'arts_init()' $(artsc-config --libs) $(artsc-config --cflags) &&
2010-06-24 10:03:41 +02:00
_arts=yes
2002-05-28 03:52:40 +02:00
fi
fi
if test "$_arts" = yes ; then
2009-02-08 23:49:52 +01:00
def_arts='#define CONFIG_ARTS 1'
2010-05-09 13:20:15 +02:00
aomodules="arts $aomodules"
2009-04-15 22:00:26 +02:00
libs_mplayer="$libs_mplayer $(artsc-config --libs)"
extra_cflags="$extra_cflags $(artsc-config --cflags)"
2002-05-30 13:42:55 +02:00
else
2010-05-09 13:20:15 +02:00
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
2010-09-27 02:02:59 +02:00
statement_check esd.h 'esd_open_sound("test")' $(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
2009-02-08 23:49:52 +01:00
def_esd='#define CONFIG_ESD 1'
2010-05-09 13:20:15 +02:00
aomodules="esd $aomodules"
2009-04-15 22:00:26 +02:00
libs_mplayer="$libs_mplayer $(esd-config --libs)"
extra_cflags="$extra_cflags $(esd-config --cflags)"
2003-05-30 20:15:59 +02:00
echocheck "esd_get_latency()"
2010-09-27 02:02:59 +02:00
statement_check esd.h 'esd_get_latency(0)' $(esd-config --libs) $(esd-config --cflags) &&
2010-09-16 13:22:30 +02:00
_esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
2003-05-30 20:15:59 +02:00
echores "$_esd_latency"
2002-12-27 17:02:57 +01:00
else
2009-02-08 23:49:52 +01:00
def_esd='#undef CONFIG_ESD'
def_esd_latency='#undef CONFIG_ESD_LATENCY'
2010-05-09 13:20:15 +02:00
noaomodules="esd $noaomodules"
2002-12-27 17:02:57 +01:00
fi
2011-06-24 15:56:43 +02:00
echocheck "RSound"
if test "$_rsound" = auto ; then
_rsound=no
statement_check rsound.h 'rsd_init(NULL);' -lrsound && _rsound=yes
fi
echores "$_rsound"
if test "$_rsound" = yes ; then
def_rsound='#define CONFIG_RSOUND 1'
aomodules="rsound $aomodules"
libs_mplayer="$libs_mplayer -lrsound"
else
def_rsound='#undef CONFIG_RSOUND'
noaomodules="rsound $noaomodules"
fi
2009-01-11 13:58:06 +01:00
echocheck "NAS"
if test "$_nas" = auto ; then
_nas=no
2010-06-24 10:03:41 +02:00
header_check audio/audiolib.h $_ld_lm -laudio -lXt && _nas=yes
2009-01-11 13:58:06 +01:00
fi
if test "$_nas" = yes ; then
2009-02-08 23:49:52 +01:00
def_nas='#define CONFIG_NAS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -laudio -lXt"
2010-05-09 13:20:15 +02:00
aomodules="nas $aomodules"
2009-01-11 13:58:06 +01:00
else
2010-05-09 13:20:15 +02:00
noaomodules="nas $noaomodules"
2009-02-08 23:49:52 +01:00
def_nas='#undef CONFIG_NAS'
2009-01-11 13:58:06 +01:00
fi
echores "$_nas"
2007-10-18 15:34:26 +02:00
echocheck "pulse"
if test "$_pulse" = auto ; then
_pulse=no
2012-02-27 14:51:35 +01:00
if pkg_config_add 'libpulse >= 0.9' ; then
2010-06-24 10:03:41 +02:00
_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
2009-02-08 23:49:52 +01:00
def_pulse='#define CONFIG_PULSE 1'
2010-05-09 13:20:15 +02:00
aomodules="pulse $aomodules"
2004-11-06 20:35:24 +01:00
else
2009-02-08 23:49:52 +01:00
def_pulse='#undef CONFIG_PULSE'
2010-05-09 13:20:15 +02:00
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
2012-02-27 14:51:35 +01:00
_jack=no
if pkg_config_add jack ; then
_jack=yes
2005-10-03 21:36:32 +02:00
fi
2004-09-20 10:48:53 +02:00
fi
2004-06-25 20:11:15 +02:00
if test "$_jack" = yes ; then
2009-02-08 23:49:52 +01:00
def_jack='#define CONFIG_JACK 1'
2010-05-09 13:20:15 +02:00
aomodules="jack $aomodules"
2004-06-25 20:11:15 +02:00
else
2010-05-09 13:20:15 +02:00
noaomodules="jack $noaomodules"
2004-06-25 20:11:15 +02:00
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
2009-02-08 23:49:52 +01:00
cc_check -DOPENAL_AL_H=1 $I && def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break
2006-12-10 15:07:08 +01:00
done
2009-03-25 20:48:05 +01:00
test "$_openal" = yes && libs_mplayer="$libs_mplayer $I"
2006-02-16 21:45:25 +01:00
fi
if test "$_openal" = yes ; then
2009-02-08 23:49:52 +01:00
def_openal='#define CONFIG_OPENAL 1'
2010-05-09 13:20:15 +02:00
aomodules="openal $aomodules"
2006-02-16 21:45:25 +01:00
else
2010-05-09 13:20:15 +02:00
noaomodules="openal $noaomodules"
2006-02-16 21:45:25 +01:00
fi
echores "$_openal"
2004-06-25 20:11:15 +02:00
2001-11-17 04:53:05 +01:00
echocheck "ALSA audio"
2008-07-17 19:11:30 +02:00
if test "$_alloca" != yes ; then
_alsa=no
2010-05-09 13:20:15 +02:00
res_comment="alloca missing"
2008-07-17 19:11:30 +02:00
fi
2012-02-27 15:29:21 +01:00
if test "$_alsa" = auto ; then
_alsa=no
if pkg_config_add "alsa >= 1.0.9" ; then
_alsa=yes
fi
2001-02-24 21:28:24 +01:00
fi
2009-02-08 23:49:52 +01:00
def_alsa='#undef CONFIG_ALSA'
2012-02-27 15:29:21 +01:00
if test "$_alsa" = yes ; then
2010-05-09 13:20:15 +02:00
aomodules="alsa $aomodules"
2009-02-08 23:49:52 +01:00
def_alsa='#define CONFIG_ALSA 1'
2002-03-12 08:16:29 +01:00
else
2012-02-27 15:29:21 +01:00
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
2009-02-08 23:49:52 +01:00
def_sunaudio='#define CONFIG_SUN_AUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="sun $aomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_sunaudio='#undef CONFIG_SUN_AUDIO'
2010-05-09 13:20:15 +02: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
2009-05-05 19:57:44 +02:00
if darwin; then
echocheck "CoreAudio"
if test "$_coreaudio" = auto ; then
cat > $TMPC <<EOF
#include <CoreAudio/CoreAudio.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AudioUnit.h>
int main(void) { return 0; }
EOF
_coreaudio=no
cc_check -framework CoreAudio -framework AudioUnit -framework AudioToolbox && _coreaudio=yes
fi
if test "$_coreaudio" = yes ; then
libs_mplayer="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
def_coreaudio='#define CONFIG_COREAUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="coreaudio $aomodules"
2009-05-05 19:57:44 +02:00
else
def_coreaudio='#undef CONFIG_COREAUDIO'
2010-05-09 13:20:15 +02:00
noaomodules="coreaudio $noaomodules"
2009-05-05 19:57:44 +02:00
fi
echores $_coreaudio
fi #if darwin
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
_sgiaudio=no
2010-06-24 10:03:41 +02:00
header_check dmedia/audio.h && _sgiaudio=yes
2001-04-05 21:02:02 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_sgiaudio" = "yes" ; then
2009-02-08 23:49:52 +01:00
def_sgiaudio='#define CONFIG_SGI_AUDIO 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -laudio"
2010-05-09 13:20:15 +02:00
aomodules="sgi $aomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_sgiaudio='#undef CONFIG_SGI_AUDIO'
2010-05-09 13:20:15 +02: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
2008-10-21 09:02:25 +02:00
# set default CD/DVD devices
2012-04-06 15:58:39 +02:00
if win32 ; then
2008-10-21 09:02:25 +02:00
default_cdrom_device="D:"
elif darwin ; then
default_cdrom_device="/dev/disk1"
elif dragonfly ; then
default_cdrom_device="/dev/cd0"
elif freebsd ; then
default_cdrom_device="/dev/acd0"
elif openbsd ; then
2010-08-03 10:57:48 +02:00
default_cdrom_device="/dev/rcd0c"
2008-10-21 09:02:25 +02:00
elif sunos ; then
default_cdrom_device="/vol/dev/aliases/cdrom0"
2009-06-25 01:31:17 +02:00
# Modern Solaris versions use HAL instead of the vold daemon, the volfs
# file system and the volfs service.
test -r "/cdrom/cdrom0" && default_cdrom_device="/cdrom/cdrom0"
2008-10-21 09:02:25 +02:00
elif amigaos ; then
default_cdrom_device="a1ide.device:2"
else
default_cdrom_device="/dev/cdrom"
fi
2012-04-06 15:58:39 +02:00
if win32 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
2008-10-21 09:02:25 +02:00
default_dvd_device=$default_cdrom_device
elif darwin ; then
default_dvd_device="/dev/rdiskN"
else
default_dvd_device="/dev/dvd"
fi
2001-11-28 00:17:58 +01:00
echocheck "VCD support"
2009-05-05 19:15:54 +02:00
if test "$_vcd" = auto; then
2009-05-05 19:17:17 +02:00
_vcd=no
2012-04-06 15:58:39 +02:00
if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos; then
2009-05-05 19:17:17 +02:00
_vcd=yes
elif mingw32; then
2010-06-24 10:03:41 +02:00
header_check ddk/ntddcdrm.h && _vcd=yes
2009-05-05 19:17:17 +02:00
fi
2009-03-28 19:53:26 +01:00
fi
if test "$_vcd" = yes; then
2010-05-09 13:20:15 +02:00
inputmodules="vcd $inputmodules"
2009-02-08 23:49:52 +01:00
def_vcd='#define CONFIG_VCD 1'
2001-11-28 00:17:58 +01:00
else
2009-02-08 23:49:52 +01:00
def_vcd='#undef CONFIG_VCD'
2010-05-29 12:43:51 +02:00
noinputmodules="vcd $noinputmodules"
2010-05-09 13:20:15 +02:00
res_comment="not supported on this OS"
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
2010-07-05 19:04:46 +02:00
echocheck "Blu-ray support"
if test "$_bluray" = auto ; then
_bluray=no
2011-07-10 10:21:35 +02:00
statement_check libbluray/bluray.h 'bd_get_title_info(0, 0, 0)' -lbluray && _bluray=yes
2010-07-05 19:04:46 +02:00
fi
if test "$_bluray" = yes ; then
def_bluray='#define CONFIG_LIBBLURAY 1'
extra_ldflags="$extra_ldflags -lbluray"
inputmodules="bluray $inputmodules"
else
def_bluray='#undef CONFIG_LIBBLURAY'
noinputmodules="bluray $noinputmodules"
fi
echores "$_bluray"
2006-11-03 23:03:58 +01:00
echocheck "dvdread"
2009-01-15 04:07:09 +01:00
if test "$_dvdread_internal" = auto && test ! -f "libdvdread4/dvd_reader.c" ; then
_dvdread_internal=no
fi
2006-11-03 23:03:58 +01:00
if test "$_dvdread_internal" = auto ; then
_dvdread_internal=no
2008-04-01 23:22:02 +02:00
_dvdread=no
2011-01-02 12:49:48 +01: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) ||
2012-04-06 15:58:39 +02:00
darwin || win32; then
2006-11-03 23:03:58 +01:00
_dvdread_internal=yes
_dvdread=yes
2009-05-12 21:25:35 +02:00
extra_cflags="-Ilibdvdread4 $extra_cflags"
2006-11-03 23:03:58 +01:00
fi
elif test "$_dvdread" = auto ; then
_dvdread=no
if test "$_dl" = yes; then
2010-09-17 12:35:15 +02:00
_dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
_dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
2010-09-16 13:22:30 +02:00
if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
2009-05-09 15:15:31 +02:00
_dvdread=yes
extra_cflags="$extra_cflags $_dvdreadcflags"
extra_ldflags="$extra_ldflags $_dvdreadlibs"
2010-05-09 13:20:15 +02:00
res_comment="external"
2009-05-09 15:15:31 +02:00
fi
2008-04-22 23:48:28 +02:00
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
2009-02-08 23:49:52 +01:00
def_dvdread='#define CONFIG_DVDREAD 1'
2010-05-09 13:20:15 +02:00
inputmodules="dvdread(internal) $inputmodules"
res_comment="internal"
2006-11-03 23:03:58 +01:00
elif test "$_dvdread" = yes; then
2009-02-08 23:49:52 +01:00
def_dvdread='#define CONFIG_DVDREAD 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ldvdread"
2010-05-09 13:20:15 +02:00
inputmodules="dvdread(external) $inputmodules"
res_comment="external"
2005-12-14 22:52:41 +01:00
else
2009-02-08 23:49:52 +01:00
def_dvdread='#undef CONFIG_DVDREAD'
2010-05-29 12:43:51 +02:00
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
2010-10-15 12:45:19 +02:00
test "$_dvdread_internal" = yes && test -d libdvdcss && _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
2009-02-08 23:49:52 +01:00
def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
openbsd && def_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
2008-03-27 03:04:03 +01:00
elif freebsd || dragonfly ; then
2009-02-08 23:49:52 +01:00
def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
2006-11-26 19:37:51 +01:00
elif darwin ; then
2009-02-08 23:49:52 +01:00
def_dvd_darwin='#define DARWIN_DVD_IOCTL'
2009-05-05 20:45:59 +02:00
extra_ldflags="$extra_ldflags -framework IOKit -framework Carbon"
2008-07-28 18:36:11 +02:00
elif cygwin ; then
2008-10-13 18:26:05 +02:00
cflags_libdvdcss="-DSYS_CYGWIN -DWIN32"
2008-07-28 18:36:11 +02:00
elif beos ; then
2008-08-07 23:46:06 +02:00
cflags_libdvdcss="-DSYS_BEOS"
2006-11-26 19:37:51 +01:00
fi
2009-05-05 19:30:50 +02:00
cflags_libdvdcss_dvdread="-Ilibdvdcss"
def_dvdcss="#define HAVE_DVDCSS_DVDCSS_H 1"
2010-05-09 13:20:15 +02:00
inputmodules="libdvdcss(internal) $inputmodules"
2006-11-09 19:25:42 +01:00
else
2010-05-29 12:43:51 +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
2011-01-02 12:49:48 +01:00
cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm &&
2009-03-25 20:48:05 +01:00
_cdparanoia=yes && extra_cflags="$extra_cflags $_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'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lcdda_interface -lcdda_paranoia"
openbsd && extra_ldflags="$extra_ldflags -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
2012-02-27 14:51:35 +01:00
_libcdio=no
if pkg_config_add libcdio_paranoia ; then
_libcdio=yes
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'
2009-10-28 14:55:18 +01:00
def_libcdio='#define CONFIG_LIBCDIO 1'
2009-02-08 23:49:52 +01:00
def_havelibcdio='yes'
2005-11-06 18:42:20 +01:00
else
2011-06-04 11:10:04 +02:00
_libcdio=no
2005-11-06 18:42:20 +01:00
if test "$_cdparanoia" = yes ; then
2010-05-09 13:20:15 +02:00
res_comment="using cdparanoia"
2005-11-06 18:42:20 +01:00
fi
2009-02-08 23:49:52 +01:00
def_libcdio='#undef CONFIG_LIBCDIO'
def_havelibcdio='no'
2005-11-06 18:42:20 +01:00
fi
echores "$_libcdio"
2006-10-29 12:38:14 +01:00
if test "$_cdda" = yes ; then
2010-07-17 15:14:53 +02:00
test $_cddb = auto && test $networking = yes && _cddb=yes
2009-10-28 14:55:18 +01:00
def_cdparanoia='#define CONFIG_CDDA 1'
2010-05-09 13:20:15 +02:00
inputmodules="cdda $inputmodules"
2006-10-29 12:38:14 +01:00
else
2009-02-08 23:49:52 +01:00
def_cdparanoia='#undef CONFIG_CDDA'
2010-05-29 12:43:51 +02:00
noinputmodules="cdda $noinputmodules"
2006-10-29 12:38:14 +01:00
fi
2005-11-06 18:42:20 +01:00
2006-12-04 21:20:32 +01:00
if test "$_cddb" = yes ; then
2009-10-28 14:55:18 +01:00
def_cddb='#define CONFIG_CDDB 1'
2010-05-09 13:20:15 +02:00
inputmodules="cddb $inputmodules"
2006-12-04 21:20:32 +01:00
else
_cddb=no
2009-02-08 23:49:52 +01:00
def_cddb='#undef CONFIG_CDDB'
2010-05-29 12:43:51 +02:00
noinputmodules="cddb $noinputmodules"
2006-12-04 21:20:32 +01:00
fi
2006-08-22 01:19:11 +02:00
echocheck "bitmap font support"
if test "$_bitmap_font" = yes ; then
2009-02-08 23:49:52 +01:00
def_bitmap_font="#define CONFIG_BITMAP_FONT 1"
2006-08-22 01:19:11 +02:00
else
2009-02-08 23:49:52 +01:00
def_bitmap_font="#undef CONFIG_BITMAP_FONT"
2006-08-22 01:19:11 +02:00
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
2010-05-09 13:20:15 +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
2012-02-27 14:51:35 +01:00
if pkg_config_add freetype2 ; then
_freetype=yes
2002-08-28 22:52:02 +02:00
else
2012-02-27 14:51:35 +01:00
die "Unable to find development files for libfreetype. Aborting. If you really mean to compile without FreeType support use --disable-freetype."
2011-04-20 20:39:53 +02:00
fi
2002-08-28 22:52:02 +02:00
fi
if test "$_freetype" = yes ; then
2009-10-28 14:55:18 +01:00
def_freetype='#define CONFIG_FREETYPE 1'
2002-08-28 22:52:02 +02:00
else
2009-02-08 23:49:52 +01:00
def_freetype='#undef CONFIG_FREETYPE'
2002-08-28 22:52:02 +02:00
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
2010-05-09 13:20:15 +02:00
res_comment="FreeType support needed"
2003-12-08 13:14:32 +01:00
fi
echocheck "fontconfig"
if test "$_fontconfig" = auto ; then
2012-02-27 14:51:35 +01:00
if pkg_config_add 'fontconfig >= 2.4.2' ; then
_fontconfig=yes
else
die "Unable to find development files for libfontconfig. Aborting. If you really mean to compile without fontconfig support use --disable-fontconfig."
fi
2003-12-08 13:14:32 +01:00
fi
if test "$_fontconfig" = yes ; then
2009-10-28 14:55:18 +01:00
def_fontconfig='#define CONFIG_FONTCONFIG 1'
2003-12-08 13:14:32 +01:00
else
2009-02-08 23:49:52 +01:00
def_fontconfig='#undef CONFIG_FONTCONFIG'
2003-12-08 13:14:32 +01:00
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"
2012-02-27 14:51:35 +01:00
if test "$_ass" = auto ; then
if pkg_config_add libass ; then
_ass=yes
def_ass='#define CONFIG_ASS 1'
else
die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
fi
2006-07-07 20:26:51 +02:00
else
2009-02-08 23:49:52 +01:00
def_ass='#undef CONFIG_ASS'
2006-07-07 20:26:51 +02:00
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
2010-01-04 13:24:07 +01:00
_fribidi=no
2012-02-27 14:51:35 +01:00
if pkg_config_add fribidi ; then
_fribidi=yes
2010-01-04 13:24:07 +01:00
fi
2003-03-21 17:54:03 +01:00
fi
if test "$_fribidi" = yes ; then
2009-10-28 14:55:18 +01:00
def_fribidi='#define CONFIG_FRIBIDI 1'
2003-03-21 17:54:03 +01:00
else
2009-02-08 23:49:52 +01:00
def_fribidi='#undef CONFIG_FRIBIDI'
2003-03-21 17:54:03 +01:00
fi
echores "$_fribidi"
2004-05-08 19:52:25 +02:00
echocheck "ENCA"
if test "$_enca" = auto ; then
_enca=no
2010-09-27 02:02:59 +02:00
statement_check enca.h 'enca_get_languages(NULL)' -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
2010-01-04 13:24:07 +01:00
def_enca='#define CONFIG_ENCA 1'
extra_ldflags="$extra_ldflags -lenca"
2004-05-08 19:52:25 +02:00
else
2010-01-04 13:24:07 +01:00
def_enca='#undef CONFIG_ENCA'
2004-05-08 19:52:25 +02:00
fi
echores "$_enca"
2001-11-17 04:53:05 +01:00
echocheck "zlib"
_zlib=no
2010-09-27 02:02:59 +02:00
statement_check zlib.h 'inflate(0, Z_NO_FLUSH)' -lz && _zlib=yes
2001-11-17 04:53:05 +01:00
if test "$_zlib" = yes ; then
2009-02-08 23:49:52 +01:00
def_zlib='#define CONFIG_ZLIB 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lz"
2001-02-24 21:28:24 +01:00
else
2009-02-08 23:49:52 +01:00
def_zlib='#define CONFIG_ZLIB 0'
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
2009-02-08 23:49:52 +01:00
def_rtc='#define HAVE_RTC 1'
2001-11-20 08:53:20 +01:00
else
2009-02-08 23:49:52 +01:00
def_rtc='#undef HAVE_RTC'
2001-11-20 08:53:20 +01:00
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
2001-11-17 04:53:05 +01:00
echocheck "mad support"
if test "$_mad" = auto ; then
_mad=no
2010-06-24 10:03:41 +02:00
header_check mad.h -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
2009-02-08 23:49:52 +01:00
def_mad='#define CONFIG_LIBMAD 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lmad"
2010-05-09 13:20:15 +02:00
codecmodules="libmad $codecmodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_mad='#undef CONFIG_LIBMAD'
2010-05-09 13:20:15 +02:00
nocodecmodules="libmad $nocodecmodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_mad"
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
echocheck "OggVorbis support"
2006-08-08 11:29:15 +02:00
if test "$_libvorbis" = auto; then
_libvorbis=no
2011-02-01 20:30:53 +01:00
statement_check vorbis/codec.h 'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis=yes && _tremor=no
2011-02-18 15:16:30 +01:00
elif test "$_libvorbis" = yes ; then
_tremor=no
2011-02-01 20:30:53 +01:00
fi
if test "$_tremor" = auto; then
_tremor=no
statement_check tremor/ivorbiscodec.h 'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor=yes
2001-11-17 04:53:05 +01:00
fi
2011-02-01 20:15:16 +01:00
if test "$_tremor" = yes ; then
2006-08-08 11:29:15 +02:00
_vorbis=yes
2009-02-08 23:49:52 +01:00
def_vorbis='#define CONFIG_OGGVORBIS 1'
def_tremor='#define CONFIG_TREMOR 1'
2010-05-09 13:20:15 +02:00
codecmodules="tremor(external) $codecmodules"
res_comment="external Tremor"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -logg -lvorbisidec"
2006-08-08 11:29:15 +02:00
elif test "$_libvorbis" = yes ; then
_vorbis=yes
2009-02-08 23:49:52 +01:00
def_vorbis='#define CONFIG_OGGVORBIS 1'
2010-05-09 13:20:15 +02:00
codecmodules="libvorbis $codecmodules"
res_comment="libvorbis"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lvorbis -logg"
2001-09-01 21:36:44 +02:00
else
2006-08-12 20:21:51 +02:00
_vorbis=no
2010-05-09 13:20:15 +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
2010-09-14 11:41:32 +02:00
#include <stddef.h>
2005-11-05 12:58:25 +01:00
#include <speex/speex.h>
2010-09-14 11:41:32 +02:00
int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
2005-11-05 12:58:25 +01:00
EOF
cc_check -lspeex $_ld_lm && _speex=yes
fi
if test "$_speex" = yes ; then
2009-02-08 23:49:52 +01:00
def_speex='#define CONFIG_SPEEX 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lspeex"
2010-05-09 13:20:15 +02:00
codecmodules="speex $codecmodules"
2005-11-05 12:58:25 +01:00
else
2009-02-08 23:49:52 +01:00
def_speex='#undef CONFIG_SPEEX'
2010-05-09 13:20:15 +02:00
nocodecmodules="speex $nocodecmodules"
2005-11-05 12:58:25 +01:00
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
2012-02-27 14:51:35 +01:00
if pkg_config_add theora ; then
_theora=yes
2008-12-11 22:52:47 +01:00
fi
2003-05-11 20:29:07 +02:00
fi
if test "$_theora" = yes ; then
2009-02-08 23:49:52 +01:00
def_theora='#define CONFIG_OGGTHEORA 1'
2010-05-09 13:20:15 +02:00
codecmodules="libtheora $codecmodules"
2003-05-11 20:29:07 +02:00
else
2009-02-08 23:49:52 +01:00
def_theora='#undef CONFIG_OGGTHEORA'
2010-05-09 13:20:15 +02:00
nocodecmodules="libtheora $nocodecmodules"
2003-05-11 20:29:07 +02:00
fi
echores "$_theora"
2010-06-30 11:55:14 +02:00
# Any version of libmpg123 shall be fine.
echocheck "mpg123 support"
def_mpg123='#undef CONFIG_MPG123'
if test "$_mpg123" = auto; then
_mpg123=no
2010-09-27 02:02:59 +02:00
statement_check mpg123.h 'mpg123_init()' -lmpg123 && _mpg123=yes && extra_ldflags="$extra_ldflags -lmpg123"
2010-06-30 11:55:14 +02:00
fi
if test "$_mpg123" = yes ; then
def_mpg123='#define CONFIG_MPG123 1'
codecmodules="mpg123 $codecmodules"
else
nocodecmodules="mpg123 $nocodecmodules"
fi
echores "$_mpg123"
2008-09-15 18:32:31 +02:00
echocheck "liba52 support"
2009-02-08 23:49:52 +01:00
def_liba52='#undef CONFIG_LIBA52'
2010-05-09 16:45:29 +02:00
if test "$_liba52" = auto ; then
2008-09-15 18:32:31 +02:00
_liba52=no
cat > $TMPC << EOF
#include <inttypes.h>
#include <a52dec/a52.h>
int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
EOF
2010-05-09 16:45:29 +02:00
cc_check -la52 && _liba52=yes && extra_ldflags="$extra_ldflags -la52"
2008-09-15 18:32:31 +02:00
fi
2004-04-06 01:17:40 +02:00
if test "$_liba52" = yes ; then
2009-02-08 23:49:52 +01:00
def_liba52='#define CONFIG_LIBA52 1'
2010-05-09 16:45:29 +02:00
codecmodules="liba52 $codecmodules"
2004-04-06 01:17:40 +02:00
else
2010-05-09 13:20:15 +02:00
nocodecmodules="liba52 $nocodecmodules"
2004-04-06 01:17:40 +02:00
fi
echores "$_liba52"
2007-07-22 18:24:25 +02:00
echocheck "libdca support"
if test "$_libdca" = auto ; then
_libdca=no
2010-01-10 14:55:55 +01:00
for _ld_dca in -ldca -ldts ; do
2010-09-27 02:02:59 +02:00
statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm &&
2010-09-18 11:49:12 +02:00
extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break
2007-11-07 00:44:53 +01:00
done
2007-07-22 18:24:25 +02:00
fi
if test "$_libdca" = yes ; then
2009-02-08 23:49:52 +01:00
def_libdca='#define CONFIG_LIBDCA 1'
2010-05-09 13:20:15 +02:00
codecmodules="libdca $codecmodules"
2007-07-22 18:24:25 +02:00
else
2009-02-08 23:49:52 +01:00
def_libdca='#undef CONFIG_LIBDCA'
2010-05-09 13:20:15 +02:00
nocodecmodules="libdca $nocodecmodules"
2007-07-22 18:24:25 +02:00
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)"
2011-01-28 20:06:27 +01:00
if test "$_musepack" = yes ; then
2005-07-10 19:14:12 +02:00
_musepack=no
cat > $TMPC << EOF
2008-07-15 11:07:31 +02:00
#include <stddef.h>
2005-07-10 19:14:12 +02:00
#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);
2008-07-15 10:31:43 +02:00
return 0;
2005-07-10 19:14:12 +02:00
}
EOF
cc_check -lmpcdec $_ld_lm && _musepack=yes
fi
if test "$_musepack" = yes ; then
2009-02-08 23:49:52 +01:00
def_musepack='#define CONFIG_MUSEPACK 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lmpcdec"
2010-05-09 13:20:15 +02:00
codecmodules="musepack $codecmodules"
2005-07-10 19:14:12 +02:00
else
2009-02-08 23:49:52 +01:00
def_musepack='#undef CONFIG_MUSEPACK'
2010-05-09 13:20:15 +02:00
nocodecmodules="musepack $nocodecmodules"
2005-07-10 19:14:12 +02:00
fi
echores "$_musepack"
2004-08-19 13:57:33 +02:00
2008-10-04 12:18:42 +02:00
echocheck "FAAD2 support"
2008-09-01 19:46:39 +02:00
if test "$_faad" = auto ; then
2011-01-01 15:27:41 +01:00
_faad=no
2006-08-21 02:42:34 +02:00
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
2008-09-01 19:46:39 +02:00
cc_check -lfaad $_ld_lm && _faad=yes
2002-03-19 00:30:04 +01:00
fi
2003-02-07 22:04:35 +01:00
2009-02-08 23:49:52 +01:00
def_faad='#undef CONFIG_FAAD'
2006-06-17 19:08:06 +02:00
if test "$_faad" = yes ; then
2009-02-08 23:49:52 +01:00
def_faad='#define CONFIG_FAAD 1'
2011-01-01 15:27:41 +01:00
extra_ldflags="$extra_ldflags -lfaad"
codecmodules="faad2 $codecmodules"
2003-02-07 22:04:35 +01:00
else
2010-05-09 13:20:15 +02:00
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
_ladspa=no
2010-09-27 02:46:28 +02:00
statement_check ladspa.h 'LADSPA_Descriptor ld = {0}' && _ladspa=yes
2004-12-23 03:09:52 +01:00
fi
if test "$_ladspa" = yes; then
2009-10-28 14:55:18 +01:00
def_ladspa="#define CONFIG_LADSPA 1"
2004-12-23 03:09:52 +01:00
else
2009-02-08 23:49:52 +01:00
def_ladspa="#undef CONFIG_LADSPA"
2004-12-23 03:09:52 +01:00
fi
echores "$_ladspa"
2009-04-02 21:01:23 +02:00
echocheck "libbs2b audio filter support"
if test "$_libbs2b" = auto ; then
2012-02-27 14:51:35 +01:00
_libbs2b=no
if pkg_config_add libbs2b ; then
2009-04-02 21:01:23 +02:00
_libbs2b=yes
2012-02-27 14:51:35 +01:00
fi
2009-04-02 21:01:23 +02:00
fi
def_libbs2b="#undef CONFIG_LIBBS2B"
2009-10-28 14:55:18 +01:00
test "$_libbs2b" = yes && def_libbs2b="#define CONFIG_LIBBS2B 1"
2009-04-02 21:01:23 +02:00
echores "$_libbs2b"
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"
2012-04-06 15:58:39 +02:00
mingw32 && _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
2009-02-08 23:49:52 +01:00
def_win32dll='#define CONFIG_WIN32DLL 1'
2007-11-22 18:11:38 +01:00
if ! win32 ; then
2009-02-08 23:49:52 +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
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ladvapi32 -lole32"
2010-05-09 13:20:15 +02:00
res_comment="using native windows"
2003-02-11 19:56:17 +01:00
fi
2010-05-09 13:20:15 +02:00
codecmodules="win32 $codecmodules"
2006-11-01 21:31:18 +01:00
else
2009-02-08 23:49:52 +01:00
def_win32dll='#undef CONFIG_WIN32DLL'
def_win32_loader='#undef WIN32_LOADER'
2010-05-09 13:20:15 +02:00
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
2010-05-09 13:20:15 +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
2009-02-08 23:49:52 +01:00
def_xanim='#define CONFIG_XANIM 1'
2010-05-09 13:20:15 +02:00
codecmodules="xanim $codecmodules"
2001-11-14 20:02:39 +01:00
else
2009-02-08 23:49:52 +01:00
def_xanim='#undef CONFIG_XANIM'
2010-05-09 13:20:15 +02: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
2010-05-09 13:20:15 +02:00
res_comment="dynamic loader support needed"
2007-03-18 21:15:57 +01:00
if test "$_dl" = yes || test "$_win32dll" = yes &&
2012-04-06 15:58:39 +02:00
(linux || freebsd || netbsd || openbsd || 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
2009-02-08 23:49:52 +01:00
def_real='#define CONFIG_REALCODECS 1'
2010-05-09 13:20:15 +02:00
codecmodules="real $codecmodules"
2002-06-09 03:19:48 +02:00
else
2009-02-08 23:49:52 +01:00
def_real='#undef CONFIG_REALCODECS'
2010-05-09 13:20:15 +02:00
nocodecmodules="real $nocodecmodules"
2002-06-09 03:19:48 +02:00
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
2009-02-08 23:49:52 +01:00
def_qtx_win32='#undef CONFIG_QTX_CODECS_WIN32'
2007-07-14 16:53:30 +02:00
if test "$_qtx" = auto ; then
2009-09-08 10:50:03 +02:00
test "$_win32dll" = yes || test "$quicktime" = yes && _qtx=yes
2007-07-14 16:53:30 +02:00
fi
if test "$_qtx" = yes ; then
2009-02-08 23:49:52 +01:00
def_qtx='#define CONFIG_QTX_CODECS 1'
win32 && _qtx_codecs_win32=yes && def_qtx_win32='#define CONFIG_QTX_CODECS_WIN32 1'
2010-05-09 13:20:15 +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
2009-02-08 23:49:52 +01:00
def_qtx='#undef CONFIG_QTX_CODECS'
2010-05-09 13:20:15 +02:00
nocodecmodules="qtx $nocodecmodules"
2007-07-14 16:53:30 +02:00
fi
echores "$_qtx"
2007-09-19 23:38:22 +02:00
echocheck "Nemesi Streaming Media libraries"
2010-07-17 15:14:53 +02:00
if test "$_nemesi" = auto && test "$networking" = yes ; then
2007-09-19 23:38:22 +02:00
_nemesi=no
2012-02-27 14:51:35 +01:00
if pkg_config_add libnemesi ; then
2007-09-19 23:38:22 +02:00
_nemesi=yes
fi
fi
if test "$_nemesi" = yes; then
_native_rtsp=no
2009-02-08 23:49:52 +01:00
def_nemesi='#define CONFIG_LIBNEMESI 1'
2010-05-09 13:20:15 +02:00
inputmodules="nemesi $inputmodules"
2007-09-19 23:38:22 +02:00
else
2010-07-17 15:14:53 +02:00
_native_rtsp="$networking"
2007-09-22 18:14:20 +02:00
_nemesi=no
2009-02-08 23:49:52 +01:00
def_nemesi='#undef CONFIG_LIBNEMESI'
2010-05-29 12:43:51 +02:00
noinputmodules="nemesi $noinputmodules"
2007-09-19 23:38:22 +02:00
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"
2012-03-04 19:38:42 +01:00
if test "$_live" != no && test "$networking" = 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
2008-07-15 10:31:43 +02:00
int main(void) { return 0; }
2004-08-09 10:21:42 +02:00
EOF
2004-11-20 15:46:22 +01:00
2005-10-03 21:36:32 +02:00
_live=no
2009-03-25 20:48:05 +01:00
for I in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
2011-01-02 12:49:48 +01:00
cxx_check $I/liveMedia/include $I/UsageEnvironment/include $I/groupsock/include &&
_livelibdir=$(echo $I| sed s/-I//) &&
2009-03-25 20:48:05 +01:00
extra_ldflags="$_livelibdir/liveMedia/libliveMedia.a \
2007-02-13 16:37:38 +01:00
$_livelibdir/groupsock/libgroupsock.a \
$_livelibdir/UsageEnvironment/libUsageEnvironment.a \
$_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
2009-03-25 20:48:05 +01:00
$extra_ldflags -lstdc++" \
extra_cxxflags="-I$_livelibdir/liveMedia/include \
2007-02-13 16:37:38 +01:00
-I$_livelibdir/UsageEnvironment/include \
-I$_livelibdir/BasicUsageEnvironment/include \
2011-01-02 12:49:48 +01:00
-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
2009-08-31 11:00:37 +02:00
ld_tmp="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
if cxx_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock $ld_tmp; then
2010-01-04 13:24:07 +01:00
_live_dist=yes
2004-11-20 15:46:22 +01:00
fi
fi
2002-08-05 02:39:07 +02:00
fi
2010-07-17 15:14:53 +02:00
if test "$_live" = yes && test "$networking" = yes; then
2010-05-09 13:20:15 +02:00
test $_livelibdir && res_comment="using $_livelibdir"
2009-02-08 23:49:52 +01:00
def_live='#define CONFIG_LIVE555 1'
2010-05-09 13:20:15 +02:00
inputmodules="live555 $inputmodules"
2010-07-17 15:14:53 +02:00
elif test "$_live_dist" = yes && test "$networking" = yes; then
2010-05-09 13:20:15 +02:00
res_comment="using distribution version"
2004-11-20 15:46:22 +01:00
_live="yes"
2009-02-08 23:49:52 +01:00
def_live='#define CONFIG_LIVE555 1'
2009-08-31 11:00:37 +02:00
extra_ldflags="$extra_ldflags $ld_tmp"
2011-01-02 12:49:48 +01:00
extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
2010-05-09 13:20:15 +02:00
inputmodules="live555 $inputmodules"
2002-08-05 02:39:07 +02:00
else
2007-09-22 18:14:20 +02:00
_live=no
2009-02-08 23:49:52 +01:00
def_live='#undef CONFIG_LIVE555'
2010-05-29 12:43:51 +02:00
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
2001-12-30 00:34:53 +01:00
2012-01-28 12:41:36 +01:00
# Test with > against Libav 0.8 versions which will NOT work rather than
# specify minimum version, to allow (future) point releases to possibly work.
2012-02-27 17:18:49 +01:00
all_libav_libs="libavutil > 51.21.0:libavcodec > 53.34.0:libavformat > 53.20.0:libswscale >= 2.0.0"
2011-08-20 23:36:23 +02:00
echocheck "Libav ($all_libav_libs)"
2010-10-31 02:19:56 +02:00
if test "$ffmpeg" = auto ; then
2011-12-22 00:07:12 +01:00
IFS=":" # shell should not be used for programming
2012-03-04 20:53:42 +01:00
if ! pkg_config_add $all_libav_libs ; then
2011-12-11 06:48:26 +01:00
die "Unable to find development files for some of the required Libav libraries above. Aborting."
2006-01-22 19:11:35 +01:00
fi
fi
2011-12-22 00:07:12 +01:00
echores "yes"
2006-01-22 19:11:35 +01:00
2010-10-31 02:19:56 +02:00
def_ffmpeg_internals="#undef CONFIG_FFMPEG_INTERNALS"
2009-07-26 04:55:40 +02:00
if ! test -z "$_ffmpeg_source" ; then
2011-12-11 06:48:26 +01:00
def_ffmpeg_internals="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals=yes
2009-07-26 04:55:40 +02:00
fi
2012-02-27 17:18:49 +01:00
echocheck "libpostproc >= 52.0.0"
if test "$libpostproc" = auto ; then
libpostproc=no
if pkg_config_add "libpostproc >= 52.0.0" ; then
libpostproc=yes
fi
fi
if test "$libpostproc" = yes ; then
def_libpostproc='#define CONFIG_LIBPOSTPROC 1'
else
def_libpostproc='#undef CONFIG_LIBPOSTPROC'
fi
echores "$libpostproc"
2010-10-31 02:19:56 +02:00
2009-07-26 04:55:40 +02: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
2010-09-27 02:02:59 +02:00
statement_check libdv/dv.h 'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv=yes
2002-04-13 18:51:01 +02:00
fi
if test "$_libdv" = yes ; then
2009-02-08 23:49:52 +01:00
def_libdv='#define CONFIG_LIBDV095 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ldv"
2010-05-09 13:20:15 +02:00
codecmodules="libdv $codecmodules"
2002-04-13 18:51:01 +02:00
else
2009-02-08 23:49:52 +01:00
def_libdv='#undef CONFIG_LIBDV095'
2010-05-09 13:20:15 +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-20 17:51:09 +01:00
for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
2010-09-27 02:02:59 +02:00
statement_check xvid.h 'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
2010-09-14 12:05:46 +02:00
extra_ldflags="$extra_ldflags $_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
2009-02-08 23:49:52 +01:00
def_xvid='#define CONFIG_XVID4 1'
2010-05-09 13:20:15 +02:00
codecmodules="xvid $codecmodules"
2006-11-08 19:36:46 +01:00
else
2009-02-08 23:49:52 +01:00
def_xvid='#undef CONFIG_XVID4'
2010-05-09 13:20:15 +02:00
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
2003-02-06 21:24:14 +01:00
2007-07-13 19:08:37 +02:00
echocheck "libnut"
if test "$_libnut" = auto ; then
_libnut=no
2011-01-05 16:59:43 +01:00
statement_check libnut.h 'nut_context_tt * nut; nut_error(0)' -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
2009-02-08 23:49:52 +01:00
def_libnut='#define CONFIG_LIBNUT 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lnut"
2006-09-17 11:32:28 +02:00
else
2009-02-08 23:49:52 +01:00
def_libnut='#undef CONFIG_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
2010-10-31 02:19:56 +02:00
# These VO checks must be done after the FFmpeg one
2009-07-26 04:55:40 +02:00
echocheck "/dev/mga_vid"
if test "$_mga" = auto ; then
_mga=no
test -c /dev/mga_vid && _mga=yes
fi
if test "$_mga" = yes ; then
2010-10-30 06:55:31 +02:00
def_mga='#define CONFIG_MGA 1'
vomodules="mga $vomodules"
2009-07-26 04:55:40 +02:00
else
def_mga='#undef CONFIG_MGA'
2010-05-30 14:21:18 +02:00
novomodules="mga $novomodules"
2009-07-26 04:55:40 +02:00
fi
echores "$_mga"
echocheck "xmga"
if test "$_xmga" = auto ; then
_xmga=no
test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
fi
if test "$_xmga" = yes ; then
2010-10-30 06:55:31 +02:00
def_xmga='#define CONFIG_XMGA 1'
vomodules="xmga $vomodules"
2009-07-26 04:55:40 +02:00
else
def_xmga='#undef CONFIG_XMGA'
2010-05-30 14:21:18 +02:00
novomodules="xmga $novomodules"
2009-07-26 04:55:40 +02:00
fi
echores "$_xmga"
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
2009-02-08 23:49:52 +01:00
def_unrar_exec='#define CONFIG_UNRAR_EXEC 1'
2007-12-14 09:16:39 +01:00
else
2009-02-08 23:49:52 +01:00
def_unrar_exec='#undef CONFIG_UNRAR_EXEC'
2007-12-14 09:16:39 +01:00
fi
echores "$_unrar_exec"
2001-11-17 04:53:05 +01:00
echocheck "TV interface"
if test "$_tv" = yes ; then
2009-02-08 23:49:52 +01:00
def_tv='#define CONFIG_TV 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv $inputmodules"
2001-02-24 21:28:24 +01:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv='#undef CONFIG_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
2009-02-08 23:49:52 +01:00
def_ioctl_bt848_h_name="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
2010-05-09 13:20:15 +02:00
res_comment="using $_ioctl_bt848_h_name"
2007-08-01 11:32:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_ioctl_bt848_h_name="#undef IOCTL_BT848_H_NAME"
2007-08-01 11:32:37 +02:00
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
2011-01-02 12:49:48 +01:00
for ioctl_meteor_h_path in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
statement_check_broken "sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
_ioctl_meteor_h=yes && break
2007-08-01 11:32:37 +02:00
done
if test "$_ioctl_meteor_h" = yes ; then
2011-01-02 12:49:48 +01:00
def_ioctl_meteor_h_name="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
res_comment="using $ioctl_meteor_h_path"
2007-08-01 11:32:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_ioctl_meteor_h_name="#undef IOCTL_METEOR_H_NAME"
2007-08-01 11:32:37 +02:00
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>
2009-02-08 23:49:52 +01:00
$def_ioctl_meteor_h_name
$def_ioctl_bt848_h_name
2007-04-09 15:18:06 +02:00
#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
2009-02-08 23:49:52 +01:00
def_tv_bsdbt848='#define CONFIG_TV_BSDBT848 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv-bsdbt848 $inputmodules"
2007-08-01 11:32:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_tv_bsdbt848='#undef CONFIG_TV_BSDBT848'
2010-05-29 12:43:51 +02:00
noinputmodules="tv-bsdbt848 $noinputmodules"
2007-08-01 11:32:37 +02:00
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
2011-01-05 16:59:43 +01:00
statement_check ole2.h 'void* p; CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p)' -lole32 -luuid && _tv_dshow=yes
2007-10-13 19:14:39 +02:00
fi
fi
if test "$_tv_dshow" = yes ; then
2010-05-09 13:20:15 +02:00
inputmodules="tv-dshow $inputmodules"
2009-02-08 23:49:52 +01:00
def_tv_dshow='#define CONFIG_TV_DSHOW 1'
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lole32 -luuid"
2007-10-13 19:14:39 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv-dshow $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv_dshow='#undef CONFIG_TV_DSHOW'
2007-10-13 19:14:39 +02:00
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
2011-01-02 12:49:48 +01:00
header_check_broken sys/time.h linux/videodev.h && _tv_v4l1=yes
2007-08-01 11:32:37 +02:00
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
2009-02-08 23:49:52 +01:00
def_tv_v4l='#define CONFIG_TV_V4L 1'
def_tv_v4l1='#define CONFIG_TV_V4L1 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv-v4l $inputmodules"
2001-12-01 16:05:08 +01:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv-v4l1 $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv_v4l='#undef CONFIG_TV_V4L'
2001-12-01 16:05:08 +01:00
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
2011-01-02 12:49:48 +01:00
header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes
2011-06-29 06:19:49 +02:00
elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
_tv_v4l2=yes
2007-08-01 11:32:37 +02:00
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
2009-02-08 23:49:52 +01:00
def_tv_v4l='#define CONFIG_TV_V4L 1'
def_tv_v4l2='#define CONFIG_TV_V4L2 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv-v4l2 $inputmodules"
2003-08-07 14:24:35 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv-v4l2 $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv_v4l2='#undef CONFIG_TV_V4L2'
2003-08-07 14:24:35 +02:00
fi
echores "$_tv_v4l2"
2006-08-28 19:05:18 +02:00
echocheck "Radio interface"
if test "$_radio" = yes ; then
2009-02-08 23:49:52 +01:00
def_radio='#define CONFIG_RADIO 1'
2010-05-09 13:20:15 +02:00
inputmodules="radio $inputmodules"
2012-02-27 15:29:21 +01:00
if test "$_alsa" != yes -a "$_ossaudio" != yes ; then
2006-08-28 19:05:18 +02:00
_radio_capture=no
fi
if test "$_radio_capture" = yes ; then
2007-04-22 22:43:28 +02:00
_audio_input=yes
2009-02-08 23:49:52 +01:00
def_radio_capture="#define CONFIG_RADIO_CAPTURE 1"
2006-08-28 19:05:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
2006-08-28 19:05:18 +02:00
fi
else
2010-05-29 12:43:51 +02:00
noinputmodules="radio $noinputmodules"
2009-02-08 23:49:52 +01:00
def_radio='#undef CONFIG_RADIO'
def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
2006-08-28 19:05:18 +02:00
_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
2010-06-24 10:03:41 +02:00
header_check linux/videodev2.h && _radio_v4l2=yes
2006-08-31 20:35:32 +02:00
fi
2006-08-28 19:05:18 +02:00
fi
if test "$_radio_v4l2" = yes ; then
2009-02-08 23:49:52 +01:00
def_radio_v4l2='#define CONFIG_RADIO_V4L2 1'
2006-08-28 19:05:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_radio_v4l2='#undef CONFIG_RADIO_V4L2'
2006-08-28 19:05:18 +02:00
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
2010-06-24 10:03:41 +02:00
header_check linux/videodev.h && _radio_v4l=yes
2006-08-31 20:35:32 +02:00
fi
2006-08-28 19:05:18 +02:00
fi
if test "$_radio_v4l" = yes ; then
2009-02-08 23:49:52 +01:00
def_radio_v4l='#define CONFIG_RADIO_V4L 1'
2006-08-28 19:05:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_radio_v4l='#undef CONFIG_RADIO_V4L'
2006-08-28 19:05:18 +02:00
fi
echores "$_radio_v4l"
2011-01-02 12:49:48 +01:00
if freebsd || netbsd || openbsd || dragonfly || bsdos &&
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>
2009-02-08 23:49:52 +01:00
$def_ioctl_bt848_h_name
2007-04-11 07:39:09 +02:00
#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
2009-02-08 23:49:52 +01:00
def_radio_bsdbt848='#define CONFIG_RADIO_BSDBT848 1'
2006-11-18 07:53:33 +01:00
else
2009-02-08 23:49:52 +01:00
def_radio_bsdbt848='#undef CONFIG_RADIO_BSDBT848'
2006-11-18 07:53:33 +01:00
fi
2011-01-02 12:49:48 +01:00
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
2011-01-02 12:49:48 +01:00
#include <sys/time.h>
2006-07-10 23:32:19 +02:00
#include <linux/videodev2.h>
2009-08-14 11:31:16 +02:00
int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
2006-07-10 23:32:19 +02:00
EOF
cc_check && _pvr=yes
fi
fi
if test "$_pvr" = yes ; then
2009-02-08 23:49:52 +01:00
def_pvr='#define CONFIG_PVR 1'
2010-05-09 13:20:15 +02:00
inputmodules="pvr $inputmodules"
2006-07-10 23:32:19 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="pvr $noinputmodules"
2009-02-08 23:49:52 +01:00
def_pvr='#undef CONFIG_PVR'
2006-07-10 23:32:19 +02:00
fi
echores "$_pvr"
2003-08-15 21:13:23 +02:00
echocheck "ftp"
2010-09-22 00:26:44 +02:00
if test "$_ftp" = "auto" ; then
test "$networking" = "yes" && ! beos && _ftp=yes
fi
if test "$_ftp" = yes ; then
2009-02-08 23:49:52 +01:00
def_ftp='#define CONFIG_FTP 1'
2010-05-09 13:20:15 +02:00
inputmodules="ftp $inputmodules"
2003-08-15 21:13:23 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="ftp $noinputmodules"
2009-02-08 23:49:52 +01:00
def_ftp='#undef CONFIG_FTP'
2003-08-15 21:13:23 +02:00
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
2009-02-08 23:49:52 +01:00
def_vstream='#define CONFIG_VSTREAM 1'
2010-05-09 13:20:15 +02:00
inputmodules="vstream $inputmodules"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -lvstream-client"
2005-02-27 05:25:12 +01:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="vstream $noinputmodules"
2009-02-08 23:49:52 +01:00
def_vstream='#undef CONFIG_VSTREAM'
2005-02-27 05:25:12 +01:00
fi
echores "$_vstream"
2001-02-24 21:28:24 +01:00
2002-12-05 01:05:57 +01:00
echocheck "Subtitles sorting"
if test "$_sortsub" = yes ; then
2009-02-08 23:49:52 +01:00
def_sortsub='#define CONFIG_SORTSUB 1'
2002-12-05 01:05:57 +01:00
else
2009-02-08 23:49:52 +01:00
def_sortsub='#undef CONFIG_SORTSUB'
2002-12-05 01:05:57 +01:00
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
2009-04-15 22:00:26 +02:00
_xmmsplugindir=$(xmms-config --input-plugin-dir)
_xmmslibdir=$(xmms-config --exec-prefix)/lib
2002-12-22 22:01:01 +01:00
else
_xmmsplugindir=/usr/lib/xmms/Input
_xmmslibdir=/usr/lib
fi
2009-02-08 23:49:52 +01:00
def_xmms='#define CONFIG_XMMS 1'
2003-10-14 11:41:08 +02:00
if darwin ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
2003-10-14 11:41:08 +02:00
else
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
2003-10-14 11:41:08 +02:00
fi
2002-12-22 22:01:01 +01:00
else
2009-02-08 23:49:52 +01:00
def_xmms='#undef CONFIG_XMMS'
2002-12-22 22:01:01 +01:00
fi
echores "$_xmms"
2009-03-13 17:42:42 +01:00
if test "$_charset" != "noconv" ; then
2009-02-08 23:49:52 +01:00
def_charset="#define MSG_CHARSET \"$_charset\""
2006-03-08 13:45:48 +01:00
else
2009-02-08 23:49:52 +01:00
def_charset="#undef MSG_CHARSET"
2009-03-13 17:42:42 +01:00
_charset="UTF-8"
2006-03-08 13:45:48 +01:00
fi
2001-03-28 21:58:45 +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
2009-02-08 23:49:52 +01:00
def_crash_debug='#define CONFIG_CRASH_DEBUG 1'
2004-10-29 01:25:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_crash_debug='#undef CONFIG_CRASH_DEBUG'
2004-10-29 01:25:18 +02:00
_crash_debug=no
fi
echores "$_crash_debug"
2005-06-01 11:08:15 +02:00
echocheck "compiler support for noexecstack"
2010-07-02 01:03:40 +02:00
if cflag_check -Wl,-z,noexecstack ; then
2009-03-25 20:48:05 +01:00
extra_ldflags="-Wl,-z,noexecstack $extra_ldflags"
2005-06-01 11:08:15 +02:00
echores "yes"
else
echores "no"
fi
2010-01-16 17:39:46 +01:00
echocheck "linker support for --nxcompat --no-seh --dynamicbase"
2010-07-02 01:03:40 +02:00
if cflag_check "-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
2010-01-16 17:39:46 +01:00
extra_ldflags="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
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'
2012-04-06 15:58:39 +02:00
if test "$_real" = yes || test "$_xanim" = yes && ! win32 && ! qnx && ! darwin && ! sunos; then
2004-04-13 12:02:37 +02:00
_ld_dl_dynamic='-rdynamic'
fi
2001-11-22 11:06:30 +01:00
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
bsdos && extra_ldflags="$extra_ldflags -ldvd"
(netbsd || openbsd) && x86_32 && extra_ldflags="$extra_ldflags -li386"
2001-11-17 04:53:05 +01:00
2009-02-08 23:49:52 +01:00
def_debug='#undef MP_DEBUG'
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"
2009-02-08 23:49:52 +01:00
def_joystick='#undef CONFIG_JOYSTICK'
2002-08-28 17:55:58 +02:00
if test "$_joystick" = yes ; then
2010-11-03 09:09:31 +01:00
if linux || freebsd ; then
2002-08-28 17:55:58 +02:00
# TODO add some check
2009-02-08 23:49:52 +01:00
def_joystick='#define CONFIG_JOYSTICK 1'
2002-08-28 17:55:58 +02:00
else
2008-02-28 19:19:10 +01:00
_joystick="no"
2010-05-09 13:20:15 +02:00
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
2010-06-24 10:03:41 +02:00
header_check lirc/lirc_client.h -llirc_client && _lirc=yes
2002-02-23 22:20:16 +01:00
fi
if test "$_lirc" = yes ; then
2009-02-08 23:49:52 +01:00
def_lirc='#define CONFIG_LIRC 1'
2009-05-08 18:21:03 +02:00
libs_mplayer="$libs_mplayer -llirc_client"
2002-02-23 22:20:16 +01:00
else
2009-02-08 23:49:52 +01:00
def_lirc='#undef CONFIG_LIRC'
2002-02-23 22:20:16 +01:00
fi
echores "$_lirc"
2003-05-30 20:23:55 +02:00
echocheck "lircc"
if test "$_lircc" = auto ; then
_lircc=no
2010-06-24 10:03:41 +02:00
header_check lirc/lircc.h -llircc && _lircc=yes
2003-05-30 20:23:55 +02:00
fi
if test "$_lircc" = yes ; then
2009-02-08 23:49:52 +01:00
def_lircc='#define CONFIG_LIRCC 1'
2009-05-08 18:21:03 +02:00
libs_mplayer="$libs_mplayer -llircc"
2003-05-30 20:23:55 +02:00
else
2009-02-08 23:49:52 +01:00
def_lircc='#undef CONFIG_LIRCC'
2003-05-30 20:23:55 +02:00
fi
echores "$_lircc"
2002-02-23 22:20:16 +01:00
2008-07-28 19:21:36 +02:00
#############################################################################
2008-07-28 19:33:08 +02:00
2011-04-23 17:00:43 +02:00
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
2007-03-18 21:33:20 +01:00
2010-04-27 10:19:42 +02:00
CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
2007-03-18 22:58:28 +01:00
2009-02-23 02:39:27 +01:00
# This must be the last test to be performed. Any other tests following it
# could fail due to linker errors. libdvdnavmini is intentionally not linked
# against libdvdread (to permit MPlayer to use its own copy of the library).
# So any compilation using the flags added here but not linking against
# libdvdread can fail.
echocheck "DVD support (libdvdnav)"
2009-02-23 20:00:52 +01:00
if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
_dvdnav=no
fi
2009-02-23 02:39:27 +01:00
dvdnav_internal=no
if test "$_dvdnav" = auto ; then
if test "$_dvdread_internal" = yes ; then
_dvdnav=yes
dvdnav_internal=yes
2010-05-09 13:20:15 +02:00
res_comment="internal"
2009-02-23 02:39:27 +01:00
else
$_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
fi
fi
if test "$_dvdnav" = auto ; then
_dvdnav=no
2009-04-15 22:00:26 +02:00
_dvdnavdir=$($_dvdnavconfig --cflags)
_dvdnavlibs=$($_dvdnavconfig --libs)
2010-09-27 02:46:28 +02:00
statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
2009-02-23 02:39:27 +01:00
fi
if test "$_dvdnav" = yes ; then
def_dvdnav='#define CONFIG_DVDNAV 1'
if test "$dvdnav_internal" = yes ; then
2009-03-05 23:19:47 +01:00
cflags_libdvdnav="-Ilibdvdnav"
2010-05-09 13:20:15 +02:00
inputmodules="dvdnav(internal) $inputmodules"
2009-02-23 02:39:27 +01:00
else
2009-04-15 22:00:26 +02:00
extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
2010-05-09 13:20:15 +02:00
inputmodules="dvdnav $inputmodules"
2009-02-23 02:39:27 +01:00
fi
else
def_dvdnav='#undef CONFIG_DVDNAV'
2010-05-29 12:43:51 +02:00
noinputmodules="dvdnav $noinputmodules"
2009-02-23 02:39:27 +01:00
fi
echores "$_dvdnav"
# DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
# Read dvdnav comment above.
2010-03-17 15:41:32 +01:00
mak_enable () {
list=$(echo $1 | tr '[a-z]' '[A-Z]')
item=$(echo $2 | tr '[a-z]' '[A-Z]')
nprefix=$3;
for part in $list; do
if $(echo $item | grep -q -E "(^| )$part($| )"); then
echo "${nprefix}_$part = yes"
fi
done
}
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
2010-06-09 11:27:29 +02:00
CONFIGURATION = $configuration
2009-05-04 13:44:36 +02:00
2008-10-04 13:27:39 +02:00
CHARSET = $_charset
2009-06-19 17:20:59 +02:00
DOC_LANGS = $language_doc
2008-07-19 04:00:56 +02:00
DOC_LANG_ALL = $doc_lang_all
2009-06-19 17:20:59 +02:00
MAN_LANGS = $language_man
2008-07-17 14:36:54 +02:00
MAN_LANG_ALL = $man_lang_all
2010-03-28 13:49:09 +02:00
MSG_LANGS = $language_msg
MSG_LANG_ALL = $msg_lang_all
2008-06-02 14:24:28 +02:00
2010-04-04 18:48:46 +02:00
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
2002-06-24 10:23:48 +02:00
DATADIR = \$(DESTDIR)$_datadir
2010-04-04 18:48:46 +02:00
LIBDIR = \$(DESTDIR)$_libdir
MANDIR = \$(DESTDIR)$_mandir
2002-06-24 10:23:48 +02:00
CONFDIR = \$(DESTDIR)$_confdir
2010-03-08 21:48:50 +01:00
LOCALEDIR = \$(DESTDIR)$_localedir
2008-06-02 14:24:28 +02:00
2010-04-04 18:48:46 +02:00
AR = $_ar
AS = $_cc
CC = $_cc
CXX = $_cc
2004-09-26 16:40:59 +02:00
HOST_CC = $_host_cc
2002-12-05 00:29:41 +01:00
INSTALL = $_install
2008-06-02 14:24:28 +02:00
INSTALLSTRIP = $_install_strip
2008-10-04 13:27:39 +02:00
WINDRES = $_windres
2008-06-02 14:24:28 +02:00
2011-07-06 09:53:41 +02:00
CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
CXXFLAGS = $WARNFLAGS $ERRORFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
2010-07-02 01:18:16 +02:00
DEPFLAGS = $DEPFLAGS
2010-04-04 18:48:46 +02:00
CFLAGS_LIBDVDCSS = $cflags_libdvdcss
2008-08-07 23:03:14 +02:00
CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
2010-04-04 18:48:46 +02:00
CFLAGS_LIBDVDNAV = $cflags_libdvdnav
2008-08-07 23:03:14 +02:00
CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
2010-04-04 18:48:46 +02:00
CFLAGS_STACKREALIGN = $cflags_stackrealign
2008-06-02 14:24:28 +02:00
2010-04-04 18:48:46 +02:00
EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
EXTRALIBS_MPLAYER = $libs_mplayer
2008-06-02 14:24:28 +02:00
GETCH = $_getch
TIMER = $_timer
2010-04-04 18:48:46 +02:00
EXESUF = $_exesuf
2009-02-12 13:17:50 +01:00
EXESUFS_ALL = .exe
2008-06-02 14:24:28 +02:00
2010-03-17 14:55:59 +01:00
ARCH = $arch
2010-03-17 15:41:32 +01:00
$(mak_enable "$arch_all" "$arch" ARCH)
$(mak_enable "$subarch_all" "$subarch" ARCH)
$(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
2006-10-31 13:52:05 +01:00
2010-04-04 18:48:46 +02:00
MPLAYER = $_mplayer
2007-01-10 20:07:42 +01:00
2011-01-26 20:00:17 +01:00
NEED_GETTIMEOFDAY = $need_gettimeofday
NEED_GLOB = $need_glob
NEED_SETENV = $need_setenv
NEED_SHMEM = $need_shmem
NEED_STRSEP = $need_strsep
NEED_SWAB = $need_swab
NEED_VSSCANF = $need_vsscanf
2007-01-10 20:07:42 +01:00
2008-06-02 14:24:28 +02:00
# features
2008-12-03 15:48:31 +01:00
3DFX = $_3dfx
AA = $_aa
2012-02-27 15:29:21 +01:00
ALSA = $_alsa
2008-05-18 13:53:00 +02:00
APPLE_IR = $_apple_ir
2007-08-14 16:29:22 +02:00
APPLE_REMOTE = $_apple_remote
2008-12-03 13:05:47 +01:00
ARTS = $_arts
2007-04-22 22:43:28 +02:00
AUDIO_INPUT = $_audio_input
2008-06-02 14:24:28 +02:00
BITMAP_FONT = $_bitmap_font
2008-12-03 15:48:31 +01:00
BL = $_bl
CACA = $_caca
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
2008-12-03 15:48:31 +01:00
DGA = $_dga
DIRECT3D = $_direct3d
DIRECTFB = $_directfb
2008-12-03 13:05:47 +01:00
DIRECTX = $_directx
2008-06-02 14:24:28 +02:00
DVBIN = $_dvbin
DVDNAV = $_dvdnav
2009-01-10 14:51:02 +01:00
DVDNAV_INTERNAL = $dvdnav_internal
2008-06-02 14:24:28 +02:00
DVDREAD = $_dvdread
DVDREAD_INTERNAL = $_dvdread_internal
2008-12-03 15:48:31 +01:00
DXR3 = $_dxr3
2008-12-03 13:05:47 +01:00
ESD = $_esd
2008-06-02 14:24:28 +02:00
FAAD = $_faad
2009-02-08 04:42:00 +01:00
FASTMEMCPY = $_fastmemcpy
2008-12-03 15:48:31 +01:00
FBDEV = $_fbdev
2006-06-30 14:41:05 +02:00
FREETYPE = $_freetype
2008-06-02 14:24:28 +02:00
FTP = $_ftp
GIF = $_gif
2008-12-03 15:48:31 +01:00
GGI = $_ggi
GL = $_gl
2011-10-15 18:44:00 +02:00
GL_COCOA = $_gl_cocoa
2008-12-03 15:48:31 +01:00
GL_WIN32 = $_gl_win32
2009-12-19 11:52:32 +01:00
GL_X11 = $_gl_x11
2010-04-30 21:04:13 +02:00
GL_SDL = $_gl_sdl
2008-10-04 13:06:50 +02:00
HAVE_POSIX_SELECT = $_posix_select
HAVE_SYS_MMAN_H = $_mman
2008-12-03 13:05:47 +01:00
IVTV = $_ivtv
JACK = $_jack
2008-06-02 14:24:28 +02:00
JOYSTICK = $_joystick
JPEG = $_jpeg
LADSPA = $_ladspa
2008-10-04 13:06:50 +02:00
LIBA52 = $_liba52
2008-04-09 20:26:44 +02:00
LIBASS = $_ass
2010-07-05 19:04:46 +02:00
LIBBLURAY = $_bluray
2009-04-02 21:01:23 +02:00
LIBBS2B = $_libbs2b
2008-06-02 14:24:28 +02:00
LIBDCA = $_libdca
LIBDV = $_libdv
LIBDVDCSS_INTERNAL = $_libdvdcss_internal
2006-06-21 16:49:09 +02:00
LIBMAD = $_mad
2008-06-02 14:24:28 +02:00
LIBNEMESI = $_nemesi
LIBNUT = $_libnut
2012-02-27 17:18:49 +01:00
LIBPOSTPROC = $libpostproc
2008-08-03 17:57:18 +02:00
LIBSMBCLIENT = $_smb
2008-06-02 14:24:28 +02:00
LIBTHEORA = $_theora
LIRC = $_lirc
2008-08-07 14:20:50 +02:00
LIVE555 = $_live
2008-08-03 18:16:10 +02:00
MACOSX_FINDER = $_macosx_finder
2008-12-03 15:48:31 +01:00
MD5SUM = $_md5sum
MGA = $_mga
2008-11-30 14:22:34 +01:00
MNG = $_mng
2010-06-30 11:55:14 +02:00
MPG123 = $_mpg123
2008-06-02 14:24:28 +02:00
MUSEPACK = $_musepack
2008-12-03 13:05:47 +01:00
NAS = $_nas
2008-06-02 14:24:28 +02:00
NATIVE_RTSP = $_native_rtsp
2010-07-17 15:14:53 +02:00
NETWORKING = $networking
2008-12-03 13:05:47 +01:00
OPENAL = $_openal
2008-10-04 13:06:50 +02:00
OSS = $_ossaudio
2008-06-02 14:24:28 +02:00
PE_EXECUTABLE = $_pe_executable
PNG = $_png
2008-12-03 15:48:31 +01:00
PNM = $_pnm
2009-02-10 16:34:44 +01:00
PRIORITY = $_priority
2008-12-03 13:05:47 +01:00
PULSE = $_pulse
2008-06-02 14:24:28 +02:00
PVR = $_pvr
QTX_CODECS = $_qtx
QTX_CODECS_WIN32 = $_qtx_codecs_win32
QTX_EMULATION = $_qtx_emulation
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
2011-06-24 15:56:43 +02:00
RSOUND = $_rsound
2008-12-03 15:48:31 +01:00
S3FB = $_s3fb
2008-12-03 13:05:47 +01:00
SDL = $_sdl
2008-06-02 14:24:28 +02:00
SPEEX = $_speex
STREAM_CACHE = $_stream_cache
2008-12-03 13:05:47 +01:00
SGIAUDIO = $_sgiaudio
SUNAUDIO = $_sunaudio
2008-12-03 15:48:31 +01:00
SVGA = $_svga
TDFXFB = $_tdfxfb
TDFXVID = $_tdfxvid
TGA = $_tga
2008-06-02 14:24:28 +02:00
TV = $_tv
TV_BSDBT848 = $_tv_bsdbt848
TV_DSHOW = $_tv_dshow
TV_V4L = $_tv_v4l
TV_V4L1 = $_tv_v4l1
TV_V4L2 = $_tv_v4l2
UNRAR_EXEC = $_unrar_exec
2008-12-03 13:05:47 +01:00
V4L2 = $_v4l2
2008-06-02 14:24:28 +02:00
VCD = $_vcd
2009-02-16 21:58:13 +01:00
VDPAU = $_vdpau
2008-12-03 15:48:31 +01:00
VESA = $_vesa
2009-06-14 23:09:35 +02:00
VORBIS = $_vorbis
2008-06-02 14:24:28 +02:00
VSTREAM = $_vstream
2008-12-03 15:48:31 +01:00
WII = $_wii
2008-06-02 14:24:28 +02:00
WIN32DLL = $_win32dll
2008-12-03 13:05:47 +01:00
WIN32WAVEOUT = $_win32waveout
2008-06-02 14:24:28 +02:00
WIN32_EMULATION = $_win32_emulation
2008-12-03 15:48:31 +01:00
X11 = $_x11
2008-06-02 14:24:28 +02:00
XANIM_CODECS = $_xanim
2008-12-03 15:48:31 +01:00
XMGA = $_xmga
2008-06-02 14:24:28 +02:00
XMMS_PLUGINS = $_xmms
2008-12-03 15:48:31 +01:00
XV = $_xv
2008-06-02 14:24:28 +02:00
XVID4 = $_xvid
2009-05-19 10:56:23 +02:00
XVR100 = $_xvr100
2008-12-03 15:48:31 +01:00
YUV4MPEG = $_yuv4mpeg
2006-07-12 19:28:14 +02:00
2008-03-31 19:04:06 +02:00
# FFmpeg
2010-10-31 02:19:56 +02:00
FFMPEG_INTERNALS = $ffmpeg_internals
2009-07-26 04:55:40 +02:00
FFMPEG_SOURCE_PATH = $_ffmpeg_source
2008-03-31 19:04:06 +02:00
2010-04-04 18:48:46 +02:00
RANLIB = $_ranlib
YASM = $_yasm
YASMFLAGS = $YASMFLAGS
2010-03-25 19:51:57 +01:00
2010-04-04 18:48:46 +02:00
CONFIG_VDPAU = $_vdpau
CONFIG_ZLIB = $_zlib
2008-03-31 19:04:06 +02:00
2010-04-04 18:48:46 +02:00
HAVE_PTHREADS = $_pthreads
HAVE_SHM = $_shm
2008-03-31 19:04:06 +02:00
HAVE_W32THREADS = $_w32threads
2010-04-04 18:48:46 +02:00
HAVE_YASM = $have_yasm
2008-03-31 19:04:06 +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 () {
2010-03-17 14:34:33 +01:00
list=$(echo $1 | tr '[a-z]' '[A-Z]')
item=$(echo $2 | tr '[a-z]' '[A-Z]')
2007-06-19 15:54:48 +02:00
_nprefix=$3;
test -z "$_nprefix" && _nprefix='CONFIG'
2010-03-17 14:34:33 +01:00
for part in $list; do
if $(echo $item | grep -q -E "(^| )$part($| )"); then
2007-06-19 15:54:48 +02:00
echo "#define ${_nprefix}_$part 1"
2006-12-23 03:47:38 +01:00
else
2009-01-15 16:56:24 +01:00
echo "#define ${_nprefix}_$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
2008-10-04 15:07:31 +02:00
/*----------------------------------------------------------------------------
** This file has been automatically generated by configure any changes in it
** will be lost when you run configure again.
** Instead of modifying definitions here, use the --enable/--disable options
** of the configure script! See ./configure --help for details.
*---------------------------------------------------------------------------*/
2001-02-24 21:28:24 +01:00
2003-11-02 14:45:24 +01:00
#ifndef MPLAYER_CONFIG_H
2008-02-21 17:35:00 +01:00
#define MPLAYER_CONFIG_H
2003-11-02 14:45:24 +01:00
2008-10-04 14:39:16 +02:00
/* Undefine this if you do not want to select mono audio (left or right)
with a stereo MPEG layer 2/3 audio stream. The command line option
-stereo has three possible values (0 for stereo, 1 for left-only, 2 for
right-only), with 0 being the default.
*/
#define CONFIG_FAKE_MONO 1
/* set up audio OUTBURST. Do not change this! */
#define OUTBURST 512
/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
#undef FAST_OSD
#undef FAST_OSD_TABLE
2008-10-16 22:44:05 +02:00
2008-10-04 14:39:16 +02:00
2010-06-09 11:27:29 +02:00
#define CONFIGURATION "$configuration"
2006-11-28 19:29:24 +01:00
2008-10-04 15:07:31 +02:00
#define MPLAYER_DATADIR "$_datadir"
#define MPLAYER_CONFDIR "$_confdir"
2010-03-08 21:48:50 +01:00
#define MPLAYER_LOCALEDIR "$_localedir"
$def_translation
2007-02-15 19:24:12 +01:00
2008-10-16 22:44:05 +02:00
/* definitions needed by included libraries */
2007-08-07 19:59:42 +02:00
#define HAVE_INTTYPES_H 1
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
2011-01-01 15:27:41 +01:00
/* libdvdcss */
2007-08-08 11:12:33 +02:00
#define HAVE_UNISTD_H 1
2011-01-01 15:27:41 +01:00
/* libdvdread */
2007-08-08 11:12:33 +02:00
#define STDC_HEADERS 1
#define HAVE_MEMCPY 1
2009-02-07 16:19:43 +01:00
/* libdvdnav */
#define READ_CACHE_TRACE 0
2007-08-15 13:47:22 +02:00
/* libdvdread */
2009-01-31 22:16:54 +01:00
#define HAVE_DLFCN_H 1
2009-05-05 20:04:53 +02:00
$def_dvdcss
2007-08-15 13:47:22 +02:00
2002-11-11 19:25:02 +01:00
2008-10-16 22:44:05 +02:00
/* system headers */
$def_alloca_h
$def_altivec_h
$def_malloc_h
2008-10-15 01:00:04 +02:00
$def_mman_h
2009-02-08 23:49:52 +01:00
$def_mman_has_map_failed
2008-10-15 01:00:04 +02:00
$def_soundcard_h
2008-10-16 22:44:05 +02:00
$def_sys_soundcard_h
2008-10-15 01:00:04 +02:00
$def_sys_sysinfo_h
2011-06-29 06:19:49 +02:00
$def_sys_videoio_h
2008-10-16 22:44:05 +02:00
$def_termios_h
$def_termios_sys_h
$def_winsock2_h
2002-07-06 17:20:10 +02:00
2004-11-22 11:28:36 +01:00
2008-10-16 22:44:05 +02:00
/* system functions */
2009-02-08 23:49:52 +01:00
$def_gethostbyname2
$def_gettimeofday
$def_glob
$def_langinfo
$def_lrintf
$def_map_memalign
$def_memalign
$def_nanosleep
$def_posix_select
$def_select
$def_setenv
2010-03-04 15:46:44 +01:00
$def_setmode
2009-02-08 23:49:52 +01:00
$def_shm
$def_strsep
$def_swab
$def_sysi86
$def_sysi86_iv
$def_termcap
$def_termios
$def_vsscanf
2004-04-26 11:44:06 +02:00
2008-03-18 10:09:53 +01:00
2008-10-16 22:44:05 +02:00
/* system-specific features */
2009-02-08 23:49:52 +01:00
$def_asmalign_pot
$def_builtin_expect
$def_dl
2010-02-11 09:52:15 +01:00
$def_dos_paths
2009-10-02 10:58:29 +02:00
$def_extern_asm
2009-02-08 23:49:52 +01:00
$def_extern_prefix
$def_iconv
$def_kstat
$def_macosx_bundle
$def_macosx_finder
2009-02-10 16:34:44 +01:00
$def_priority
2009-02-08 23:49:52 +01:00
$def_quicktime
$def_restrict_keyword
$def_rtc
$def_unrar_exec
2006-09-18 18:48:50 +02:00
2002-03-27 04:45:55 +01:00
2008-10-16 22:44:05 +02:00
/* configurable options */
2009-02-08 23:49:52 +01:00
$def_charset
$def_crash_debug
$def_debug
$def_fastmemcpy
$def_runtime_cpudetection
$def_sighandler
$def_sortsub
$def_stream_cache
$def_pthread_cache
2001-08-17 02:38:10 +02:00
2005-11-06 18:42:20 +01:00
2008-10-16 22:44:05 +02:00
/* CPU stuff */
#define __CPU__ $iproc
2010-07-10 18:26:58 +02:00
$def_ebx_available
2009-02-08 23:49:52 +01:00
$def_words_endian
2009-07-26 19:43:06 +02:00
$def_bigendian
2010-03-17 11:10:47 +01:00
$(ff_config_enable "$arch_all" "$arch" "ARCH")
2010-03-17 14:20:06 +01:00
$(ff_config_enable "$subarch_all" "$subarch" "ARCH")
2010-03-17 14:37:36 +01:00
$(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
2001-08-20 23:20:03 +02:00
2002-04-24 23:17:22 +02:00
2010-07-05 19:04:46 +02:00
/* Blu-ray/DVD/VCD/CD */
2008-10-21 09:02:25 +02:00
#define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
#define DEFAULT_DVD_DEVICE "$default_dvd_device"
2010-07-05 19:04:46 +02:00
$def_bluray
2009-02-08 23:49:52 +01:00
$def_bsdi_dvd
$def_cddb
$def_cdio
$def_cdparanoia
$def_cdrom
$def_dvd
$def_dvd_bsd
$def_dvd_darwin
$def_dvd_linux
$def_dvd_openbsd
$def_dvdio
$def_dvdnav
$def_dvdread
$def_hpux_scsi_h
$def_libcdio
$def_sol_scsi_h
$def_vcd
2002-04-23 18:29:13 +02:00
2006-09-17 11:32:28 +02:00
2008-10-16 22:44:05 +02:00
/* codec libraries */
2009-02-08 23:49:52 +01:00
$def_faad
$def_liba52
$def_libdca
$def_libdv
$def_mad
2010-06-30 11:55:14 +02:00
$def_mpg123
2009-02-08 23:49:52 +01:00
$def_musepack
$def_speex
$def_theora
$def_tremor
$def_vorbis
$def_xvid
$def_zlib
2012-02-27 17:18:49 +01:00
$def_libpostproc
2009-02-08 23:49:52 +01:00
$def_libnut
2001-02-24 21:28:24 +01:00
2004-06-26 11:54:02 +02:00
2008-10-16 22:44:05 +02:00
/* binary codecs */
2009-02-08 23:49:52 +01:00
$def_qtx
$def_qtx_win32
$def_real
$def_win32_loader
$def_win32dll
$def_xanim
$def_xmms
2010-03-14 17:13:32 +01:00
#define BINARY_CODECS_PATH "$_codecsdir"
2008-10-10 07:34:49 +02:00
#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
2001-11-03 22:25:55 +01:00
2007-12-14 09:16:39 +01:00
2002-01-12 22:07:17 +01:00
/* Audio output drivers */
2009-02-08 23:49:52 +01:00
$def_alsa
$def_arts
$def_coreaudio
$def_esd
$def_esd_latency
$def_jack
$def_nas
$def_openal
$def_openal_h
$def_ossaudio
$def_ossaudio_devdsp
$def_ossaudio_devmixer
$def_pulse
2011-06-24 15:56:43 +02:00
$def_rsound
2009-02-08 23:49:52 +01:00
$def_sgiaudio
$def_sunaudio
$def_win32waveout
$def_ladspa
2009-04-02 21:01:23 +02:00
$def_libbs2b
2003-08-07 14:24:35 +02:00
2007-10-13 19:14:39 +02:00
2008-10-16 22:44:05 +02:00
/* input */
2009-02-08 23:49:52 +01:00
$def_apple_ir
$def_apple_remote
$def_ioctl_bt848_h_name
$def_ioctl_meteor_h_name
$def_joystick
$def_lirc
$def_lircc
$def_pvr
$def_radio
$def_radio_bsdbt848
$def_radio_capture
$def_radio_v4l
$def_radio_v4l2
$def_tv
$def_tv_bsdbt848
$def_tv_dshow
$def_tv_v4l
$def_tv_v4l1
$def_tv_v4l2
2006-08-28 19:05:18 +02:00
2002-05-12 03:07:25 +02:00
2008-10-16 22:44:05 +02:00
/* font stuff */
2009-02-08 23:49:52 +01:00
$def_ass
$def_bitmap_font
$def_enca
$def_fontconfig
$def_freetype
$def_fribidi
2003-03-21 17:54:03 +01:00
2003-05-11 20:29:07 +02:00
2008-10-16 22:44:05 +02:00
/* networking */
2009-02-08 23:49:52 +01:00
$def_closesocket
$def_ftp
$def_inet6
2009-02-01 15:38:28 +01:00
$def_inet_aton
$def_inet_pton
2009-02-08 23:49:52 +01:00
$def_live
$def_nemesi
2010-07-17 15:14:53 +02:00
$def_networking
2009-02-08 23:49:52 +01:00
$def_smb
$def_socklen_t
$def_vstream
2008-08-29 18:20:35 +02:00
2002-06-11 16:29:51 +02:00
2008-10-16 22:44:05 +02:00
/* libvo options */
2009-02-08 23:49:52 +01:00
$def_3dfx
$def_aa
$def_bl
$def_caca
$def_corevideo
$def_dga
$def_dga1
$def_dga2
$def_direct3d
$def_directfb
$def_directx
$def_dvb
$def_dvbin
$def_dxr3
$def_fbdev
$def_ggi
$def_ggiwmh
$def_gif
$def_gif_4
$def_gif_tvt_hack
$def_gl
2011-10-15 18:44:00 +02:00
$def_gl_cocoa
2009-02-08 23:49:52 +01:00
$def_gl_win32
2009-12-19 11:52:32 +01:00
$def_gl_x11
2010-04-30 21:04:13 +02:00
$def_gl_sdl
2009-02-08 23:49:52 +01:00
$def_ivtv
$def_jpeg
$def_md5sum
$def_mga
$def_mng
$def_png
$def_pnm
$def_s3fb
$def_sdl
2010-01-03 12:33:33 +01:00
$def_sdl_sdl_h
2009-02-08 23:49:52 +01:00
$def_svga
$def_tdfxfb
$def_tdfxvid
$def_tga
$def_v4l2
2009-02-16 21:58:13 +01:00
$def_vdpau
2009-02-08 23:49:52 +01:00
$def_vesa
$def_vm
$def_wii
$def_x11
$def_xdpms
$def_xf86keysym
$def_xinerama
$def_xmga
$def_xss
$def_xv
$def_xvr100
$def_yuv4mpeg
2002-01-11 18:20:43 +01:00
2002-11-16 04:06:55 +01:00
2008-10-04 14:39:16 +02:00
/* FFmpeg */
2010-10-31 02:19:56 +02:00
$def_ffmpeg_internals
2002-11-15 00:49:05 +01:00
2009-02-04 20:04:22 +01:00
$def_arpa_inet_h
2009-01-31 23:34:52 +01:00
$def_bswap
2009-02-08 23:49:52 +01:00
$def_dcbzl
2010-02-11 11:52:36 +01:00
$def_exp2
$def_exp2f
2008-12-02 17:40:44 +01:00
$def_fast_64bit
2009-02-08 23:49:52 +01:00
$def_fast_unaligned
2010-02-11 11:52:36 +01:00
$def_llrint
$def_log2
$def_log2f
$def_lrint
2009-02-08 23:49:52 +01:00
$def_memalign_hack
$def_mkstemp
2009-02-10 03:01:35 +01:00
$def_posix_memalign
2009-02-08 23:49:52 +01:00
$def_pthreads
2010-02-11 11:52:36 +01:00
$def_round
$def_roundf
2009-02-08 23:49:52 +01:00
$def_threads
2010-02-11 11:56:09 +01:00
$def_truncf
2009-04-20 02:10:09 +02:00
$def_xform_asm
2009-02-08 23:49:52 +01:00
$def_yasm
2002-12-05 01:05:57 +01:00
2010-01-16 16:20:26 +01:00
#define HAVE_INLINE_ASM 1
2003-03-26 12:35:13 +01:00
2008-10-04 14:39:16 +02:00
/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
#ifndef MP_DEBUG
#define HAVE_EBP_AVAILABLE 1
2009-02-17 12:40:59 +01:00
#else
#define HAVE_EBP_AVAILABLE 0
2008-10-04 14:39:16 +02:00
#endif
2003-03-26 12:35:13 +01:00
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
2010-06-09 11:27:29 +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:
2010-03-28 13:49:09 +02:00
Messages (in addition to English): $language_msg
2009-06-14 16:55:01 +02:00
Manual pages: $language_man
Documentation: $language_doc
2003-02-21 00:32:47 +01:00
2001-11-29 02:18:05 +01:00
Enabled optional drivers:
2010-05-09 13:20:15 +02:00
Input: $inputmodules
Codecs: $codecmodules
Audio output: $aomodules
Video output: $vomodules
2008-07-17 14:24:47 +02:00
2002-03-12 08:16:29 +01:00
Disabled optional drivers:
2010-05-29 12:43:51 +02:00
Input: $noinputmodules
2010-05-09 13:20:15 +02:00
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-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.
2011-10-25 06:05:47 +02:00
If you used one of these options (except --enable-runtime-cpudetection 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
2010-08-19 01:20:23 +02:00
If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
2001-11-17 04:53:05 +01:00
EOF
2010-07-02 00:19:57 +02:00
if test "$warn_cflags" = yes; then
2005-07-10 19:01:49 +02:00
cat <<EOF
2008-11-16 14:04:16 +01:00
MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS 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:
2010-07-01 11:00:54 +02:00
rm -rf "$mplayer_tmpdir"