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
2012-08-16 11:08:38 +02:00
command_check() {
echo >> "$TMPLOG"
echo "$@" >> "$TMPLOG"
"$@" >> "$TMPLOG" 2>&1
TMPRES="$?"
echo >> "$TMPLOG"
return "$TMPRES"
}
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 $@
}
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"
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer $ltmp"
2012-02-27 14:51:35 +01:00
}
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
cygwin() { issystem "CYGWIN"; }
darwin() { issystem "Darwin"; }
dragonfly() { issystem "DragonFly"; }
freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; }
gnu() { issystem "GNU"; }
linux() { issystem "Linux"; }
mingw32() { issystem "MINGW32"; }
morphos() { issystem "MorphOS"; }
netbsd() { issystem "NetBSD"; }
openbsd() { issystem "OpenBSD"; }
win32() { cygwin || mingw32; }
2001-10-13 18:53:37 +02:00
2001-11-19 13:04:19 +01:00
# arch test boolean functions
2006-12-24 01:08:57 +01:00
x86_32() {
2001-11-19 13:04:19 +01:00
case "$host_arch" in
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
i[3-9]86|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
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
2012-10-11 02:04:08 +02:00
data files (skins, etc) [PREFIX/share/mpv]
2007-09-16 19:48:20 +02:00
--mandir=DIR directory for installing man pages [PREFIX/share/man]
2013-09-23 14:09:15 +02:00
--docdir=DIR directory for installing docs [PREFIX/share/doc/mpv]
2006-11-06 01:09:07 +01:00
--confdir=DIR directory for installing configuration files
2012-10-11 02:04:08 +02:00
[PREFIX/etc/mpv]
2001-10-23 20:32:55 +02:00
Optional features:
2012-09-14 17:51:26 +02:00
--disable-encoding disable encoding functionality [enable]
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
--disable-lua disable Lua scripting support [autodetect]
--lua=LUA select Lua package which should be autodetected
Choices: 51 51deb 52 52deb luajit
2013-06-24 23:06:34 +02:00
--disable-libguess disable libguess [autodetect]
2013-07-22 03:27:58 +02:00
--enable-terminfo use terminfo database for key codes [autodetect]
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]
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]
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]
--disable-tv disable TV interface (TV/DVB grabbers) [enable]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
2013-11-09 02:15:12 +01:00
--disable-libv4l2 disable libv4l2 [autodetect]
2006-11-06 01:09:07 +01:00
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
--enable-smb enable Samba (SMB) input [autodetect]
2013-07-05 22:53:59 +02:00
--disable-libquvi4 disable libquvi 0.4.x [autodetect]
2013-06-27 18:21:07 +02:00
--disable-libquvi9 disable libquvi 0.9.x [autodetect]
2012-03-31 01:13:38 +02:00
--enable-lcms2 enable LCMS2 support [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-dvdread disable libdvdread [autodetect]
--disable-enca disable ENCA charset oracle library [autodetect]
--disable-pthreads disable Posix threads support [autodetect]
2011-07-06 19:41:48 +02:00
--disable-libass disable subtitle rendering with libass [autodetect]
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
--disable-libass-osd disable OSD 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]
2013-09-01 03:03:25 +02:00
--disable-libavdevice disable libavdevice demuxers [autodetect]
--disable-libavfilter disable libavfilter [autodetect]
--disable-vf-lavfi disable vf_lavfi libavfilter bridge [audodetect]
--disable-af-lavfi disable af_lavfi libavfilter bridge [audodetect]
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-jpeg enable JPEG input/output support [autodetect]
--enable-libcdio enable libcdio support [autodetect]
2011-12-11 06:48:26 +01:00
--enable-libav skip Libav autodetection [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]
2010-06-30 11:55:14 +02:00
--disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
2006-11-06 01:09:07 +01:00
2013-03-09 09:30:26 +01:00
Resampler:
--disable-libavresample check for libswresample only [autodetect]
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]
--enable-caca enable CACA video output [autodetect]
2008-11-18 13:23:42 +01:00
--enable-direct3d enable Direct3D video output [autodetect]
2013-05-11 16:54:46 +02:00
--enable-sdl enable SDL audio output [disable]
--enable-sdl2 enable SDL 2.0+ audio and video output [disable]
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]
2013-08-14 15:47:18 +02:00
--enable-vda enable VDA acceleration [autodetect]
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
--enable-vaapi enable VAAPI 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]
2013-02-28 19:55:02 +01:00
--enable-wayland enable Wayland video output [autodetect]
2007-12-22 12:09:43 +01:00
--disable-xss disable screensaver support via xss [autodetect]
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]
2011-06-24 15:56:43 +02:00
--disable-rsound disable RSound audio output [autodetect]
2013-09-28 18:01:12 +02:00
--disable-sndio disable sndio audio output [autodetect]
2007-10-18 15:34:26 +02:00
--disable-pulse disable Pulseaudio audio output [autodetect]
2012-04-27 11:26:04 +02:00
--disable-portaudio disable PortAudio 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]
2009-04-25 19:48:48 +02:00
--disable-coreaudio disable CoreAudio audio output [autodetect]
2013-06-13 15:15:39 +02:00
--disable-dsound disable DirectSound audio output [autodetect]
2013-07-20 19:13:39 +02:00
--disable-wasapi disable WASAPI (event mode) 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
2001-10-31 19:25:28 +01:00
Miscellaneous options:
2012-01-31 19:36:16 +01:00
--enable-cross-compile enable cross-compilation [disable]
2012-10-11 02:04:08 +02:00
--cc=COMPILER C compiler to build mpv [gcc]
2012-01-31 08:30:09 +01:00
--pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
2012-10-11 02:04:08 +02:00
--windres=WINDRES windres to build mpv [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
2012-11-14 00:43:55 +01:00
--disable-manpage do not build and install manpage [auto]
2013-09-09 04:23:06 +02:00
--disable-pdf do not build and install PDF manual [auto]
2013-07-10 11:48:19 +02:00
--disable-build-date do not include binary compile time
2001-10-23 20:32:55 +02:00
Advanced options:
2006-11-06 01:09:07 +01:00
--enable-shm enable shm [autodetect]
2012-11-20 13:53:19 +01:00
--disable-debug compile-in debugging information [enable]
2012-11-20 13:45:35 +01:00
--disable-optimization compile without -O2 [enable]
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
2012-10-11 02:04:08 +02:00
--extra-libs-mpv=FLAGS extra linker flags for mpv
2006-08-26 22:55:53 +02:00
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
2002-12-05 00:29:41 +01:00
_install=install
2012-01-31 08:29:53 +01:00
_pkg_config=auto
_windres=auto
_cc=auto
2001-10-23 20:32:55 +02:00
test "$CC" && _cc="$CC"
2012-11-20 13:53:19 +01:00
_debug=-g
2012-08-25 20:01:03 +02:00
_opt=-O2
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
2012-09-14 17:51:26 +02:00
_encoding=yes
2013-03-09 09:30:26 +01:00
_disable_avresample=no
2007-01-31 00:18:51 +01:00
_x11=auto
2013-02-28 19:55:02 +01:00
_wayland=auto
2007-12-22 12:09:43 +01:00
_xss=auto
2007-01-31 00:18:51 +01:00
_xv=auto
2009-02-16 21:58:13 +01:00
_vdpau=auto
2013-08-14 15:47:18 +02:00
_vda=auto
_vda_refcounting=auto
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
_vaapi=auto
2008-11-18 13:23:42 +01:00
_direct3d=auto
2013-05-11 16:54:46 +02:00
_sdl=no
_sdl2=no
2012-10-05 15:17:16 +02:00
_dsound=auto
2013-07-20 19:13:39 +02:00
_wasapi=auto
2007-01-31 00:18:51 +01:00
_jpeg=auto
_gl=auto
_aa=auto
_caca=auto
_dvb=auto
_iconv=auto
_ossaudio=auto
2011-06-24 15:56:43 +02:00
_rsound=auto
2007-10-18 15:34:26 +02:00
_pulse=auto
2012-04-27 11:26:04 +02:00
_portaudio=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
2010-06-30 11:55:14 +02:00
_mpg123=auto
2007-01-31 00:18:51 +01:00
_ladspa=auto
2009-04-02 21:01:23 +02:00
_libbs2b=auto
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
_dvdread=auto
2012-03-31 01:13:38 +02:00
_lcms2=auto
2007-01-31 00:18:51 +01:00
_xinerama=auto
_vm=auto
_xf86keysym=auto
2013-09-28 18:01:12 +02:00
_sndio=auto
2007-01-31 00:18:51 +01:00
_alsa=auto
_select=yes
_radio=no
_radio_capture=no
_radio_v4l2=auto
_tv=yes
_tv_v4l2=auto
2013-11-09 02:15:12 +01:00
_libv4l2=auto
2007-01-31 00:18:51 +01:00
_pvr=auto
2008-08-03 17:57:18 +02:00
_smb=auto
2013-07-05 22:53:59 +02:00
_libquvi4=auto
2013-06-27 18:21:07 +02:00
_libquvi9=auto
2013-06-24 23:06:34 +02:00
_libguess=auto
2007-01-31 00:18:51 +01:00
_joystick=no
_lirc=auto
_lircc=auto
2013-07-22 03:27:58 +02:00
_terminfo=auto
2007-01-31 00:18:51 +01:00
_termcap=auto
_termios=auto
_shm=auto
2012-03-21 00:57:58 +01:00
_cdda=auto
2009-04-25 19:48:48 +02:00
_coreaudio=auto
_corevideo=auto
2011-10-15 18:44:00 +02:00
_cocoa=auto
2007-01-31 00:18:51 +01:00
_enca=auto
_pthreads=auto
_ass=auto
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
_libass_osd=auto
2007-01-31 00:18:51 +01:00
_rpath=no
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
lua=auto
2012-02-27 17:18:49 +01:00
libpostproc=auto
2013-03-11 00:16:34 +01:00
libavfilter=auto
vf_lavfi=auto
2013-05-23 15:11:57 +02:00
af_lavfi=auto
2013-04-23 14:11:43 +02:00
libavdevice=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"
2013-07-16 13:28:28 +02:00
def_priority="#define HAVE_PRIORITY 0"
2012-11-14 00:43:55 +01:00
_build_man=auto
2013-09-09 04:23:06 +02:00
_build_pdf=auto
2013-07-10 11:48:19 +02:00
_build_date=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
--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
;;
2013-09-09 04:23:06 +02:00
--docdir=*)
_docdir=$(echo $ac_option | cut -d '=' -f 2)
;;
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
--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
;;
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
;;
2012-10-11 02:04:08 +02:00
--extra-libs-mpv=*)
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
;;
2012-01-31 08:30:09 +01:00
--pkg-config=*)
_pkg_config=$(echo $ac_option | cut -d '=' -f 2)
;;
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
--enable-static)
_ld_static='-static'
;;
--disable-static)
_ld_static=''
2007-01-31 00:33:25 +01:00
;;
--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=
;;
2012-11-20 13:45:35 +01:00
--enable-optimization)
_opt='-O2'
;;
--enable-optimization=*)
_opt=$(echo $_echo_n '-O'$_echo_c; echo $ac_option | cut -d '=' -f 2)
;;
--disable-optimization)
_opt=
;;
2007-01-31 00:59:39 +01:00
--enable-cross-compile) _cross_compile=yes ;;
--disable-cross-compile) _cross_compile=no ;;
2012-09-14 17:51:26 +02:00
--enable-encoding) _encoding=yes ;;
--disable-encoding) _encoding=no ;;
2013-02-28 19:55:02 +01:00
--enable-wayland) _wayland=yes ;;
--disable-wayland) _wayland=no ;;
2010-01-04 13:24:07 +01:00
--enable-x11) _x11=yes ;;
--disable-x11) _x11=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 ;;
2013-08-14 15:47:18 +02:00
--enable-vda) _vda=yes ;;
--disable-vda) _vda=no ;;
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
--enable-vaapi) _vaapi=yes ;;
--disable-vaapi) _vaapi=no ;;
2008-11-18 13:23:42 +01:00
--enable-direct3d) _direct3d=yes ;;
--disable-direct3d) _direct3d=no ;;
2012-12-28 08:07:14 +01:00
--enable-sdl) _sdl=yes ;;
--disable-sdl) _sdl=no ;;
--enable-sdl2) _sdl2=yes ;;
--disable-sdl2) _sdl2=no ;;
2012-10-05 15:17:16 +02:00
--enable-dsound) _dsound=yes ;;
--disable-dsound) _dsound=no ;;
2013-07-20 19:13:39 +02:00
--enable-wasapi) _wasapi=yes ;;
--disable-wasapi) _wasapi=no ;;
2010-01-04 13:24:07 +01:00
--enable-jpeg) _jpeg=yes ;;
--disable-jpeg) _jpeg=no ;;
--enable-gl) _gl=yes ;;
--disable-gl) _gl=no ;;
--enable-caca) _caca=yes ;;
--disable-caca) _caca=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
--enable-ossaudio) _ossaudio=yes ;;
--disable-ossaudio) _ossaudio=no ;;
2011-06-24 15:56:43 +02:00
--enable-rsound) _rsound=yes ;;
--disable-rsound) _rsound=no ;;
2013-09-28 18:01:12 +02:00
--enable-sndio) _sndio=yes ;;
--disable-sndio) _sndio=no ;;
2010-01-04 13:24:07 +01:00
--enable-pulse) _pulse=yes ;;
--disable-pulse) _pulse=no ;;
2012-04-27 11:26:04 +02:00
--enable-portaudio) _portaudio=yes ;;
--disable-portaudio) _portaudio=no ;;
2010-01-04 13:24:07 +01:00
--enable-jack) _jack=yes ;;
--disable-jack) _jack=no ;;
2012-09-18 21:34:01 +02:00
--enable-openal) _openal=auto ;;
2010-01-04 13:24:07 +01:00
--disable-openal) _openal=no ;;
--enable-libcdio) _libcdio=yes ;;
--disable-libcdio) _libcdio=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-ladspa) _ladspa=yes ;;
--disable-ladspa) _ladspa=no ;;
--enable-libbs2b) _libbs2b=yes ;;
--disable-libbs2b) _libbs2b=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 ;;
2012-03-31 01:13:38 +02:00
--enable-lcms2) _lcms2=yes ;;
--disable-lcms2) _lcms2=no ;;
2010-01-04 13:24:07 +01:00
--enable-xinerama) _xinerama=yes ;;
--disable-xinerama) _xinerama=no ;;
--enable-vm) _vm=yes ;;
--disable-vm) _vm=no ;;
--enable-xf86keysym) _xf86keysym=yes ;;
--disable-xf86keysym) _xf86keysym=no ;;
--enable-alsa) _alsa=yes ;;
--disable-alsa) _alsa=no ;;
--enable-tv) _tv=yes ;;
--disable-tv) _tv=no ;;
--enable-tv-v4l2) _tv_v4l2=yes ;;
--disable-tv-v4l2) _tv_v4l2=no ;;
2013-11-09 02:15:12 +01:00
--enable-libv4l2) _libv4l2=yes ;;
--disable-libv4l2) _libv4l2=no ;;
2010-01-04 13:24:07 +01:00
--enable-radio) _radio=yes ;;
--enable-radio-capture) _radio_capture=yes ;;
--disable-radio-capture) _radio_capture=no ;;
--disable-radio) _radio=no ;;
--enable-radio-v4l2) _radio_v4l2=yes ;;
--disable-radio-v4l2) _radio_v4l2=no ;;
--enable-pvr) _pvr=yes ;;
--disable-pvr) _pvr=no ;;
--enable-smb) _smb=yes ;;
--disable-smb) _smb=no ;;
2013-07-05 22:53:59 +02:00
--enable-libquvi4) _libquvi4=yes ;;
--disable-libquvi4) _libquvi4=no ;;
2013-06-27 18:21:07 +02:00
--enable-libquvi9) _libquvi9=yes ;;
--disable-libquvi9) _libquvi9=no ;;
2013-06-24 23:06:34 +02:00
--enable-libguess) _libguess=yes ;;
--disable-libguess) _libguess=no ;;
2010-01-04 13:24:07 +01:00
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
2011-08-20 23:36:23 +02:00
--enable-libav) ffmpeg=yes ;;
2013-03-09 09:30:26 +01:00
--disable-libavresample) _disable_avresample=yes ;;
--enable-libavresample) _disable_avresample=no ;;
2007-01-31 00:18:51 +01:00
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
--enable-lua) lua=yes ;;
--disable-lua) lua=no ;;
--lua=*) lua_pkg=$(echo $ac_option | cut -d '=' -f 2) ;;
2010-01-04 13:24:07 +01:00
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
2013-07-22 03:27:58 +02:00
--enable-terminfo) _terminfo=yes ;;
--disable-terminfo) _terminfo=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-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
2007-01-31 00:18:51 +01:00
--enable-pthreads) _pthreads=yes ;;
--disable-pthreads) _pthreads=no ;;
2011-07-06 19:41:48 +02:00
--enable-libass) _ass=yes ;;
--disable-libass) _ass=no ;;
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
--enable-libass-osd) _libass_osd=yes ;;
--disable-libass-osd) _libass_osd=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 ;;
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
--enable-libavdevice) libavdevice=auto ;;
--disable-libavdevice) libavdevice=no ;;
--enable-libavfilter) libavfilter=auto ;;
--disable-libavfilter) libavfilter=no ;;
2013-03-11 00:16:34 +01:00
--enable-vf-lavfi) vf_lavfi=auto ;;
--disable-vf-lavfi) vf_lavfi=no ;;
2013-05-23 15:11:57 +02:00
--enable-af-lavfi) af_lavfi=auto ;;
--disable-af-lavfi) af_lavfi=no ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-enca) _enca=yes ;;
--disable-enca) _enca=no ;;
2007-01-31 00:18:51 +01:00
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 ;;
2007-01-31 00:18:51 +01:00
2012-11-14 00:43:55 +01:00
--enable-manpage) _build_man=yes ;;
--disable-manpage) _build_man=no ;;
2013-09-09 04:23:06 +02:00
--enable-pdf) _build_pdf=yes ;;
--disable-pdf) _build_pdf=no ;;
2012-11-14 00:43:55 +01:00
2013-07-10 11:48:19 +02:00
--enable-build-date) _build_date=yes ;;
--disable-build-date) _build_date=no ;;
2007-01-31 00:18:51 +01:00
*)
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"
test -z "$_mandir" && _mandir="$_prefix/share/man"
2013-09-23 14:09:15 +02:00
test -z "$_docdir" && _docdir="$_prefix/share/doc/mpv"
2012-10-11 02:04:08 +02:00
test -z "$_confdir" && _confdir="$_prefix/etc/mpv"
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
2012-10-11 02:04:08 +02:00
mplayer_tmpdir="$tmpdir/mpv-configure-$RANDOM-$$"
2012-01-31 08:29:53 +01:00
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
}
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 "$_windres" = auto && _windres="$tool_prefix"windres
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
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|Darwin|GNU|MorphOS)
2007-01-31 00:18:51 +01:00
;;
2009-09-19 14:56:19 +02:00
Haiku)
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
system_name=Haiku
2009-09-19 14:56:19 +02:00
;;
2007-01-31 00:18:51 +01:00
GNU/kFreeBSD)
system_name=FreeBSD
;;
[cC][yY][gG][wW][iI][nN]*)
system_name=CYGWIN
;;
MINGW32*)
system_name=MINGW32
;;
*)
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.
2009-04-15 22:00:26 +02:00
case "$(uname -m 2>&1)" in
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
x86_64|amd64|i[3-9]86*|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 ;;
openbsd) system_name=OpenBSD ;;
dragonfly) system_name=DragonFly ;;
morphos) system_name=MorphOS ;;
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
configure: add _GNU_SOURCE to CFLAGS by default
In theory, projects have to define feature test macros to enable various
system functionality in system headers. (This is done so to ensure new
identifiers can be added to system headers, without breaking old
programs by causing name conflicts.) This includes macros like
_GNU_SOURCE, _BSD_SOURCE, _POSIX_C_SOURCE etc.
Traditionally, gcc as well as glibc headers implicitly assumed
_GNU_SOURCE if no feature test macros were defined by the user.
clang did this too to ensure compatibility with gcc centric programs
(which in practice includes most Linux programs).
However, it appears recent clang versions started to prefer BSD
traditional function over the POSIX, which switches the definition
of a function used by mp_msg.c:
pid_t getpgrp(void); /* POSIX.1 version */
pid_t getpgrp(pid_t pid); /* BSD version */
mp_msg.c expects the POSIX version, while clang gives us the BSD
version, resulting in a compilation failure.
Solve this by defining _GNU_SOURCE. This requests most features from
system headers, and explicitly prefers POSIX definitions over BSD,
which should fix the compilation issue.
2013-03-11 01:05:19 +01:00
extra_cflags="-I. -D_GNU_SOURCE $extra_cflags"
2008-04-08 20:03:14 +02:00
_timer=timer-linux.c
_getch=getch2.c
2008-03-27 03:04:03 +01:00
2013-11-27 07:59:38 +01:00
if freebsd || openbsd ; then
2013-07-15 21:31:15 +02:00
extra_ldflags="$extra_ldflags -L/usr/local/lib"
extra_cflags="$extra_cflags -I/usr/local/include"
fi
if netbsd || dragonfly ; then
extra_ldflags="$extra_ldflags -L/usr/pkg/lib"
extra_cflags="$extra_cflags -I/usr/pkg/include"
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"
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
2013-07-09 09:28:05 +02:00
_win32=no
2007-01-28 23:31:53 +01:00
if win32 ; then
2013-07-09 09:28:05 +02:00
_win32=yes
2007-01-28 23:31:53 +01:00
_exesuf=".exe"
2013-06-18 12:10:55 +02:00
extra_cflags="$extra_cflags -fno-common"
2007-01-28 23:31:53 +01:00
# -lwinmm is always needed for osdep/timer-win2.c
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -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"
2013-07-16 13:28:28 +02:00
def_priority="#define HAVE_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
2012-01-31 08:31:04 +01:00
extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
2012-08-07 01:09:42 +02:00
# Hack for missing BYTE_ORDER declarations in <sys/types.h>.
# (For some reason, they are in <sys/param.h>, but we don't bother switching
# the includes based on whether we're compiling for MinGW.)
extra_cflags="$extra_cflags -DBYTE_ORDER=1234 -DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321"
2007-02-27 18:13:17 +01:00
fi
2012-09-30 14:47:54 +02:00
if cygwin ; then
extra_cflags="$extra_cflags -mwin32"
fi
2012-11-02 14:37:02 +01:00
_rst2man=rst2man
if [ -f "$(which rst2man.py)" ] ; then
_rst2man=rst2man.py
fi
2012-11-14 00:43:55 +01:00
echocheck "whether to build manpages with rst2man"
if test "$_build_man" = auto ; then
_build_man=no
command_check "$_rst2man" --version && _build_man=yes
else
_build_man=no
fi
echores "$_build_man"
2013-09-09 04:23:06 +02:00
_rst2latex=rst2latex
if [ -f "$(which rst2latex.py)" ] ; then
_rst2latex=rst2latex.py
fi
echocheck "whether to build manual PDFs with rst2latex"
2013-09-25 15:54:38 +02:00
texcheck() {
2013-09-25 16:04:41 +02:00
echo test | $_rst2latex --config=DOCS/man/docutils.conf | pdflatex -halt-on-error -draftmode -output-directory="$mplayer_tmpdir"
2013-09-25 15:54:38 +02:00
}
2013-09-09 04:23:06 +02:00
if test "$_build_pdf" = auto ; then
_build_pdf=no
2013-09-25 15:54:38 +02:00
command_check texcheck && _build_pdf=yes
2013-09-09 04:23:06 +02:00
else
_build_pdf=no
fi
echores "$_build_pdf"
2013-07-10 11:48:19 +02:00
echocheck "whether to print binary build date"
if test "$_build_date" = yes ; then
_build_yes=yes
else
_build_date=no
extra_cflags="$extra_cflags -DNO_BUILD_TIMESTAMPS"
fi
echores "$_build_date"
2012-11-14 00:43:55 +01:00
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
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)
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"
2012-11-07 15:49:44 +01:00
echocheck "perl"
command_check perl -Mv5.8 -e';' || die "Perl is not functioning correctly or is ancient. Install the latest perl available."
2012-08-16 11:08:38 +02:00
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
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
2009-01-31 23:37:12 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 0'
2013-07-07 21:37:31 +02:00
def_arch_x86='#define ARCH_X86 0'
def_arch_x86_32='#define ARCH_X86_32 0'
def_arch_x86_64='#define ARCH_X86_64 0'
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)
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
arch='x86'
subarch='x86_32'
2013-07-07 21:37:31 +02:00
def_arch_x86='#define ARCH_X86 1'
def_arch_x86_32='#define ARCH_X86_32 1'
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'
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'
2013-07-07 21:37:31 +02:00
def_arch_x86='#define ARCH_X86 1'
def_arch_x86_64='#define ARCH_X86_64 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
;;
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
;;
2010-01-17 00:22:43 +01:00
arm*)
2010-03-17 14:41:54 +01:00
arch='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-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'
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'
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
;;
2010-10-21 14:58:21 +02:00
mips*)
2010-03-17 15:09:09 +01:00
arch='mips'
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
;;
s390)
2010-03-17 14:41:54 +01:00
arch='s390'
2007-01-31 00:18:51 +01:00
;;
s390x)
2010-03-17 14:41:54 +01:00
arch='s390x'
2007-01-31 00:18:51 +01:00
;;
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
;;
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
;;
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"
2012-10-11 02:04:08 +02:00
echo "It seems nobody has ported mpv to your OS or CPU type yet."
2007-01-31 00:18:51 +01:00
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
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
2007-01-31 00:18:51 +01:00
# Checking for CFLAGS
2012-04-19 16:05:50 +02:00
if test -z "$CFLAGS" ; then
2007-01-31 00:18:51 +01:00
if test "$cc_vendor" = "intel" ; then
2013-03-11 00:50:01 +01:00
CFLAGS="$_opt $_debug $_pipe"
2010-09-12 01:30:52 +02:00
WARNFLAGS="-wd167 -wd556 -wd144"
2010-08-01 00:15:49 +02:00
elif test "$cc_vendor" = "clang"; then
2012-11-15 14:34:34 +01:00
CFLAGS="$_opt $_debug $_pipe"
2013-11-01 13:00:15 +01:00
WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes -Wshadow"
2013-07-20 18:00:10 +02:00
ERRORFLAGS="-Werror=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function"
2007-01-31 00:18:51 +01:00
elif test "$cc_vendor" != "gnu" ; then
2012-11-15 14:34:34 +01:00
CFLAGS="$_opt $_debug $_pipe"
2007-01-31 00:18:51 +01:00
else
2013-03-11 00:50:01 +01:00
CFLAGS="$_opt $_debug $_pipe"
2010-09-12 01:30:52 +02:00
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2013-11-01 13:00:15 +01:00
ERRORFLAGS="-Werror-implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function -Wshadow"
2013-03-11 00:50:01 +01:00
extra_ldflags="$extra_ldflags"
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-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
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
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-01-11 14:33:44 +01:00
fi #if x86
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 "-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
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
2013-07-16 13:28:28 +02:00
def_nanosleep='#define HAVE_NANOSLEEP 0'
2001-11-23 19:25:09 +01:00
fi
echores "$_nanosleep"
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
2013-07-16 13:28:28 +02:00
def_mman_h='#define HAVE_SYS_MMAN_H 0'
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
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
2013-07-16 13:28:28 +02:00
def_dl='#define HAVE_LIBDL 0'
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
2001-11-18 18:45:23 +01:00
echocheck "pthread"
2013-11-04 00:48:43 +01:00
def_pthreads='#define HAVE_PTHREADS 0'
2009-04-10 19:39:44 +02:00
if linux ; then
THREAD_CFLAGS=-D_REENTRANT
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
elif freebsd || netbsd || openbsd ; then
2009-04-10 19:39:44 +02:00
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
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
# for crosscompilation, we cannot execute the program, be happy if we can link statically
cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
done
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"
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
2012-12-09 15:49:39 +01:00
test "$_ld_pthread" && res_comment="using $_ld_pthread"
2009-02-08 23:49:52 +01:00
def_pthreads='#define HAVE_PTHREADS 1'
2009-04-10 19:39:44 +02:00
extra_cflags="$extra_cflags $THREAD_CFLAGS"
2004-03-27 21:19:57 +01:00
else
2013-01-13 16:20:59 +01:00
res_comment="v4l2 disabled"
2013-07-16 13:28:28 +02:00
def_pthreads='#define HAVE_PTHREADS 0'
2013-01-13 16:20:59 +01:00
_tv_v4l2=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
2013-11-28 19:28:38 +01:00
if test "$_pthreads" = no ; then
die "Unable to find pthreads support."
fi
2013-07-08 01:53:59 +02:00
if test "$_pthreads" = yes ; then
# Cargo-cult for -lrt, which is needed on not so recent glibc version for
# clock_gettime. It's documented as required before before glibc 2.17, which
# was released in december 2012. On newer glibc versions or on other systems,
# this will hopefully do nothing.
echocheck "linking with -lrt"
_rt=no
2013-07-08 02:24:42 +02:00
cc_check "$_ld_pthread -lrt" && _rt=yes
2013-07-08 01:53:59 +02:00
if test "$_rt" = yes ; then
_ld_pthread="$_ld_pthread -lrt"
fi
echores "$_rt"
fi
2013-06-16 22:11:30 +02:00
echocheck "stream cache"
2013-05-25 15:03:30 +02:00
_stream_cache="$_pthreads"
if test "$_stream_cache" = yes ; then
2013-07-16 13:28:28 +02:00
def_stream_cache='#define HAVE_STREAM_CACHE 1'
2013-05-25 15:03:30 +02:00
else
2013-07-16 13:28:28 +02:00
def_stream_cache='#define HAVE_STREAM_CACHE 0'
2008-11-28 18:04:36 +01:00
fi
2013-06-16 22:11:30 +02:00
echores "$_stream_cache"
2008-11-28 18:04:36 +01:00
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
2012-12-19 13:01:56 +01:00
cc_check $_ld_lm $_ld_tmp && libs_mplayer="$libs_mplayer $_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
2013-07-16 13:28:28 +02:00
def_iconv='#define HAVE_ICONV 1'
2005-07-30 03:07:27 +02:00
else
2013-07-16 13:28:28 +02:00
def_iconv='#define HAVE_ICONV 0'
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
2013-07-16 13:28:28 +02:00
def_soundcard_h='#define HAVE_SOUNDCARD_H 0'
def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 0'
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
2013-07-16 13:28:28 +02:00
def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 0'
2011-06-29 06:19:49 +02:00
header_check sys/videoio.h && sys_videoio_h=yes &&
def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1'
echores "$sys_videoio_h"
2013-07-22 03:27:58 +02:00
echocheck "terminfo"
if test "$_terminfo" = auto ; then
_terminfo=no
for _ld_tmp in "-lncurses" "-lncursesw"; do
2013-07-26 01:47:02 +02:00
statement_check term.h 'setupterm(0, 1, 0)' $_ld_tmp &&
2013-07-22 03:27:58 +02:00
libs_mplayer="$libs_mplayer $_ld_tmp" && _terminfo=yes && break
done
fi
if test "$_terminfo" = yes ; then
def_terminfo='#define HAVE_TERMINFO 1'
test $_ld_tmp && res_comment="using $_ld_tmp"
if test "$_termcap" = auto ; then
2013-07-25 17:24:09 +02:00
_termcap=yes # terminfo provides termcap
2013-07-22 03:27:58 +02:00
fi
else
2013-07-16 13:28:28 +02:00
def_terminfo='#define HAVE_TERMINFO 0'
2013-07-22 03:27:58 +02:00
fi
echores "$_terminfo"
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 &&
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer $_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
2013-07-16 13:28:28 +02:00
def_termcap='#define HAVE_TERMCAP 0'
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"
2013-07-16 13:28:28 +02:00
def_termios='#define HAVE_TERMIOS 0'
def_termios_h='#define HAVE_TERMIOS_H 0'
def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 0'
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
2013-07-16 13:28:28 +02:00
def_shm='#define HAVE_SHM 0'
2001-11-19 16:54:43 +01:00
fi
echores "$_shm"
2002-03-15 21:48:42 +01:00
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
2013-07-16 13:28:28 +02:00
def_posix_select='#define HAVE_POSIX_SELECT 0'
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
2013-07-16 13:28:28 +02:00
def_select='#define HAVE_AUDIO_SELECT 0'
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 "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
2013-07-16 13:28:28 +02:00
def_glob='#define HAVE_GLOB 0'
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"
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"
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
2013-07-16 13:28:28 +02:00
def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 0'
2002-08-21 23:31:20 +02:00
fi
echores "$_sys_sysinfo"
2001-10-25 13:46:50 +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
2013-06-24 23:06:34 +02:00
echocheck "libguess support"
if test "$_libguess" = auto ; then
_libguess=no
if pkg_config_add 'libguess >= 1.0' ; then
_libguess=yes
fi
fi
if test "$_libguess" = yes; then
2013-07-16 13:28:28 +02:00
def_libguess="#define HAVE_LIBGUESS 1"
2013-06-24 23:06:34 +02:00
else
2013-07-16 13:28:28 +02:00
def_libguess="#define HAVE_LIBGUESS 0"
2013-06-24 23:06:34 +02:00
fi
echores "$_libguess"
2003-03-21 17:06:11 +01:00
echocheck "Samba support (libsmbclient)"
2013-10-19 13:32:30 +02:00
if test "$_smb" = auto ; then
_smb=no
if pkg_config_add 'smbclient >= 0.2.0' ; then
_smb=yes
fi
2003-03-21 17:06:11 +01:00
fi
2008-08-03 17:57:18 +02:00
if test "$_smb" = yes; then
2013-07-16 13:28:28 +02:00
def_smb="#define HAVE_LIBSMBCLIENT 1"
2010-05-09 13:20:15 +02:00
inputmodules="smb $inputmodules"
2003-03-21 17:06:11 +01:00
else
2013-07-16 13:28:28 +02:00
def_smb="#define HAVE_LIBSMBCLIENT 0"
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
2013-06-27 18:21:07 +02:00
2013-07-05 22:53:59 +02:00
echocheck "libquvi 0.4.x support"
if test "$_libquvi4" = auto ; then
_libquvi4=no
2012-09-02 20:45:11 +02:00
if pkg_config_add 'libquvi >= 0.4.1' ; then
2013-07-05 22:53:59 +02:00
_libquvi4=yes
2012-03-02 20:24:34 +01:00
fi
fi
2013-07-05 22:53:59 +02:00
echores "$_libquvi4"
2003-03-21 17:06:11 +01:00
2013-06-28 15:46:38 +02:00
echocheck "libquvi 0.9.x support"
2013-07-05 22:53:59 +02:00
if test "$_libquvi4" = yes ; then
2013-06-28 15:46:38 +02:00
_libquvi9=no
res_comment="using libquvi 0.4.x"
fi
if test "$_libquvi9" = auto ; then
_libquvi9=no
if pkg_config_add 'libquvi-0.9 >= 0.9.0' ; then
_libquvi9=yes
fi
fi
2013-11-28 18:15:11 +01:00
echores "$_libquvi9"
if test "$_libquvi9" = yes || test "$_libquvi4" = yes; then
def_libquvi9="#define HAVE_LIBQUVI 1"
2013-06-28 15:46:38 +02:00
else
2013-11-28 18:15:11 +01:00
def_libquvi9="#define HAVE_LIBQUVI 0"
2013-06-28 15:46:38 +02:00
fi
2001-11-17 12:26:26 +01:00
#########
# VIDEO #
#########
2002-03-15 21:48:42 +01:00
2012-04-16 08:33:42 +02:00
if darwin; then
echocheck "Cocoa"
if test "$_cocoa" = auto ; then
cat > $TMPC <<EOF
#include <CoreServices/CoreServices.h>
#include <OpenGL/OpenGL.h>
int main(void) {
NSApplicationLoad();
}
EOF
_cocoa=no
2012-09-16 20:53:04 +02:00
cc_check -framework IOKit -framework Cocoa -framework OpenGL && _cocoa=yes
2012-04-16 08:33:42 +02:00
fi
if test "$_cocoa" = yes ; then
2012-09-16 20:53:04 +02:00
libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa -framework OpenGL"
2013-06-22 08:53:41 +02:00
extra_ldflags="$extra_ldflags -fobjc-arc" # needed for OS X 10.7
2013-07-16 13:28:28 +02:00
def_cocoa='#define HAVE_COCOA 1'
2012-04-16 08:33:42 +02:00
else
2013-07-16 13:28:28 +02:00
def_cocoa='#define HAVE_COCOA 0'
2012-04-16 08:33:42 +02:00
fi
echores "$_cocoa"
echocheck "CoreVideo"
if test "$_cocoa" = yes && test "$_corevideo" = auto ; then
cat > $TMPC <<EOF
#include <QuartzCore/CoreVideo.h>
int main(void) { return 0; }
EOF
_corevideo=no
cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes
fi
if test "$_corevideo" = yes ; then
vomodules="corevideo $vomodules"
libs_mplayer="$libs_mplayer -framework QuartzCore"
2013-07-16 13:28:28 +02:00
def_corevideo='#define HAVE_COREVIDEO 1'
2012-04-16 08:33:42 +02:00
else
novomodules="corevideo $novomodules"
2013-07-16 13:28:28 +02:00
def_corevideo='#define HAVE_COREVIDEO 0'
2012-04-16 08:33:42 +02:00
fi
echores "$_corevideo"
depends_on_application_services(){
test "$_corevideo" = yes
}
2013-07-16 13:28:28 +02:00
else
def_cocoa='#define HAVE_COCOA 0'
def_corevideo='#define HAVE_COREVIDEO 0'
2012-04-16 08:33:42 +02:00
fi #if darwin
2013-09-03 20:12:44 +02:00
_wlver="1.2.0"
2013-02-28 19:55:02 +01:00
echocheck "Wayland"
2013-09-03 19:31:10 +02:00
if test "$_wayland" = yes || test "$_wayland" = auto; then
2013-02-28 19:55:02 +01:00
_wayland="no"
2013-09-03 19:31:10 +02:00
pkg_config_add "wayland-client >= $_wlver wayland-cursor >= $_wlver xkbcommon >= 0.3.0" \
&& _wayland="yes"
2013-04-15 22:37:02 +02:00
fi
if test "$_wayland" = yes; then
2013-02-28 19:55:02 +01:00
res_comment=""
2013-11-04 21:24:00 +01:00
def_wayland='#define HAVE_WAYLAND 1'
2013-04-15 22:37:02 +02:00
vomodules="wayland $vomodules"
2013-02-28 19:55:02 +01:00
else
2013-09-03 19:31:10 +02:00
res_comment="version >= $_wlver"
2013-07-16 13:28:28 +02:00
def_wayland='#define HAVE_WAYLAND 0'
2013-04-15 22:37:02 +02:00
novomodules="wayland $novomodules"
2013-02-28 19:55:02 +01:00
fi
echores "$_wayland"
2013-09-03 19:31:10 +02:00
unset _wlver
2012-04-16 08:33:42 +02:00
2001-11-17 04:53:05 +01:00
echocheck "X11"
2013-07-16 13:28:28 +02:00
if test "$_x11" = auto ; then
_x11="no"
pkg_config_add "x11" && _x11="yes"
2001-11-17 04:53:05 +01:00
fi
if test "$_x11" = yes ; then
2013-07-16 13:28:28 +02:00
def_x11='#define HAVE_X11 1'
2012-08-25 19:57:08 +02:00
vomodules="x11 $vomodules"
2001-11-17 04:53:05 +01:00
else
2005-06-03 19:24:30 +02:00
_x11=no
2013-07-16 13:28:28 +02:00
def_x11='#define HAVE_X11 0'
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
2013-07-16 13:28:28 +02:00
def_xss='#define HAVE_XSS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXss"
2007-12-22 12:09:43 +01:00
else
2013-07-16 13:28:28 +02:00
def_xss='#define HAVE_XSS 0'
2007-12-22 12:09:43 +01:00
fi
echores "$_xss"
2001-06-05 20:40:44 +02:00
2013-07-16 13:28:28 +02:00
echocheck "X extensions"
_xext=no
2001-11-17 04:53:05 +01:00
if test "$_x11" = yes ; then
2013-07-16 13:28:28 +02:00
pkg_config_add "xext" && _xext="yes"
2001-06-04 11:38:18 +02:00
fi
2013-07-16 13:28:28 +02:00
if test "$_xext" = yes ; then
def_xext='#define HAVE_XEXT 1'
2006-05-07 16:00:07 +02:00
echores "yes"
2001-11-17 04:53:05 +01:00
else
2013-07-16 13:28:28 +02:00
def_xext='#define HAVE_XEXT 0'
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
2013-07-16 13:28:28 +02:00
def_xv='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_xv='#define HAVE_XV 0'
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
2012-05-06 18:08:33 +02:00
pkg_config_add 'vdpau >= 0.2' && _vdpau=yes
2009-02-16 21:58:13 +01:00
fi
fi
if test "$_vdpau" = yes ; then
2013-07-16 13:28:28 +02:00
def_vdpau='#define HAVE_VDPAU 1'
2010-05-09 13:20:15 +02:00
vomodules="vdpau $vomodules"
2009-02-16 21:58:13 +01:00
else
2013-07-16 13:28:28 +02:00
def_vdpau='#define HAVE_VDPAU 0'
2010-05-09 13:20:15 +02:00
novomodules="vdpau $novomodules"
2009-02-16 21:58:13 +01:00
fi
echores "$_vdpau"
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
echocheck "VAAPI"
2013-09-20 15:55:13 +02:00
_vaapi_vpp=no
2013-07-16 13:28:28 +02:00
def_vaapi_vpp='#define HAVE_VAAPI_VPP 0'
2013-11-04 00:02:21 +01:00
_vaapi_glx=no
2013-11-04 00:43:06 +01:00
def_vaapi_glx='#define HAVE_VAAPI_GLX 0'
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
if test "$_vaapi" = auto && test "$_x11" = yes ; then
_vaapi=no
if test "$_dl" = yes ; then
pkg_config_add 'libva >= 0.32.0 libva-x11 >= 0.32.0' && _vaapi=yes
fi
fi
if test "$_vaapi" = yes ; then
2013-07-16 13:28:28 +02:00
def_vaapi='#define HAVE_VAAPI 1'
def_vaapi_hwaccel='#define HAVE_VAAPI_HWACCEL 1'
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
vomodules="vaapi $vomodules"
else
2013-07-16 13:28:28 +02:00
def_vaapi='#define HAVE_VAAPI 0'
def_vaapi_hwaccel='#define HAVE_VAAPI_HWACCEL 0'
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
novomodules="vaapi $novomodules"
fi
2013-08-12 02:14:00 +02:00
echores "$_vaapi"
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
2013-09-20 15:55:13 +02:00
if test "$_vaapi" = yes ; then
echocheck "VAAPI VPP"
if pkg-config 'libva >= 0.34.0' ; then
_vaapi_vpp=yes
2013-07-16 13:28:28 +02:00
def_vaapi_vpp='#define HAVE_VAAPI_VPP 1'
2013-09-20 15:55:13 +02:00
fi
2013-11-04 00:02:21 +01:00
echores "$_vaapi_glx"
echocheck "VAAPI GLX"
if pkg_config_add 'libva-glx >= 0.32.0' ; then
_vaapi_glx=yes
2013-11-04 00:43:06 +01:00
def_vaapi_glx='#define HAVE_VAAPI_GLX 1'
2013-11-04 00:02:21 +01:00
fi
echores "$_vaapi_glx"
2013-09-20 15:55:13 +02:00
fi
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
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
2013-07-16 13:28:28 +02:00
def_xinerama='#define HAVE_XINERAMA 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXinerama"
2001-11-17 04:53:05 +01:00
else
2013-07-16 13:28:28 +02:00
def_xinerama='#define HAVE_XINERAMA 0'
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
2013-07-16 13:28:28 +02:00
def_vm='#define HAVE_XF86VM 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXxf86vm"
2001-11-17 04:53:05 +01:00
else
2013-07-16 13:28:28 +02:00
def_vm='#define HAVE_XF86VM 0'
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
2013-07-16 13:28:28 +02:00
def_xf86keysym='#define HAVE_XF86XK 1'
2005-02-02 15:07:13 +01:00
else
2013-07-16 13:28:28 +02:00
def_xf86keysym='#define HAVE_XF86XK 0'
2005-02-02 15:07:13 +01:00
fi
echores "$_xf86keysym"
2001-08-29 14:15:09 +02:00
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
2013-01-13 16:36:28 +01:00
pkg_config_add 'caca >= 0.99.beta18' && _caca=yes
2004-04-06 02:04:48 +02:00
fi
if test "$_caca" = yes ; then
2013-07-16 13:28:28 +02:00
def_caca='#define HAVE_CACA 1'
2010-05-09 13:20:15 +02:00
vomodules="caca $vomodules"
2004-04-06 02:04:48 +02:00
else
2013-07-16 13:28:28 +02:00
def_caca='#define HAVE_CACA 0'
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 "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"
2013-07-16 13:28:28 +02:00
def_dvb='#define HAVE_DVB 1'
def_dvbin='#define HAVE_DVBIN 1'
2010-03-02 20:57:17 +01:00
else
_dvbin=no
2010-05-29 12:43:51 +02:00
noinputmodules="dvb $noinputmodules"
2013-07-16 13:28:28 +02:00
def_dvb='#define HAVE_DVB 0'
def_dvbin='#define HAVE_DVBIN 0 '
2001-11-03 22:25:55 +01:00
fi
2007-07-14 17:11:08 +02:00
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
2013-07-16 13:28:28 +02:00
def_jpeg='#define HAVE_JPEG 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -ljpeg"
2002-03-10 23:49:18 +01:00
else
2013-07-16 13:28:28 +02:00
def_jpeg='#define HAVE_JPEG 0'
2002-03-10 23:49:18 +01:00
fi
2002-05-13 14:28:00 +02:00
2001-11-17 12:26:26 +01:00
#################
# VIDEO + AUDIO #
#################
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
2013-02-28 19:55:02 +01:00
if (test "$_x11" = yes || test "$_wayland" = 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>
2013-02-28 19:55:02 +01:00
#elif defined(GL_WAYLAND)
#include <EGL/egl.h>
2010-04-30 21:04:13 +02:00
#else
#include <X11/Xlib.h>
#include <GL/glx.h>
#endif
2013-02-28 19:55:02 +01:00
#include <GL/gl.h>
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);
2013-02-28 19:55:02 +01:00
#elif defined(GL_WAYLAND)
eglCreateContext(NULL, NULL, EGL_NO_CONTEXT, NULL);
2010-04-30 21:04:13 +02:00
#else
glXCreateContext(NULL, NULL, NULL, True);
#endif
glFinish();
return 0;
}
EOF
_gl=no
2012-05-01 12:39:14 +02:00
if test "$_x11" = yes ; then
for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
if cc_check $_ld_tmp $_ld_lm ; then
_gl=yes
_gl_x11=yes
libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl"
break
fi
done
fi
2013-08-26 17:20:44 +02:00
if test "$_wayland" = yes && cc_check -DGL_WAYLAND -lGL -lEGL &&
pkg_config_add "wayland-egl >= 9.0.0"; then
2013-02-28 19:55:02 +01:00
_gl=yes
_gl_wayland=yes
libs_mplayer="$libs_mplayer -lGL -lEGL"
fi
2012-05-01 12:39:14 +02:00
if win32 && cc_check -DGL_WIN32 -lopengl32 ; then
2010-04-30 21:04:13 +02:00
_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
2013-03-23 20:17:46 +01:00
cat > $TMPC << EOF
2013-03-24 20:00:22 +01:00
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#else
2013-03-23 20:17:46 +01:00
#include <GL/gl.h>
#include <GL/glext.h>
2013-03-24 20:00:22 +01:00
#endif
2013-03-23 20:17:46 +01:00
int main(int argc, char *argv[]) {
return !GL_INVALID_FRAMEBUFFER_OPERATION;
}
EOF
if ! cc_check; then
_gl=no
2013-03-24 20:00:22 +01:00
_gl_x11=no
_gl_wayland=no
_gl_win32=no
_gl_cocoa=no
2013-03-23 20:17:46 +01:00
res_comment="missing glext.h, get from http://www.opengl.org/registry/api/glext.h"
fi
2010-04-30 21:04:13 +02:00
else
_gl=no
fi
2013-07-16 13:28:28 +02:00
def_gl_cocoa='#define HAVE_GL_COCOA 0'
def_gl_win32='#define HAVE_GL_WIN32 0'
def_gl_x11='#define HAVE_GL_X11 0'
def_gl_wayland='#define HAVE_GL_WAYLAND 0'
2010-04-30 21:04:13 +02:00
if test "$_gl" = yes ; then
2013-07-16 13:28:28 +02:00
def_gl='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_gl_cocoa='#define HAVE_GL_COCOA 1'
2011-10-15 18:44:00 +02:00
res_comment="$res_comment cocoa"
fi
2010-04-30 21:04:13 +02:00
if test "$_gl_win32" = yes ; then
2013-07-16 13:28:28 +02:00
def_gl_win32='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_gl_x11='#define HAVE_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
2013-02-28 19:55:02 +01:00
if test "$_gl_wayland" = yes ; then
2013-11-04 21:24:00 +01:00
def_gl_wayland='#define HAVE_GL_WAYLAND 1'
2013-02-28 19:55:02 +01:00
res_comment="$res_comment wayland"
fi
2010-05-09 13:20:15 +02:00
vomodules="opengl $vomodules"
2010-04-30 21:04:13 +02:00
else
2013-07-16 13:28:28 +02:00
def_gl='#define HAVE_GL 0'
2010-05-09 13:20:15 +02:00
novomodules="opengl $novomodules"
2010-04-30 21:04:13 +02:00
fi
echores "$_gl"
2013-11-05 22:06:48 +01:00
echocheck "VDPAU with OpenGL/X11"
if test "$_gl_x11" = yes && test "$_vdpau" = yes ; then
def_vdpau_gl_x11='#define HAVE_VDPAU_GL_X11 1'
_vdpau_gl_x11=yes
else
def_vdpau_gl_x11='#define HAVE_VDPAU_GL_X11 0'
_vdpau_gl_x11=no
fi
echores "$_vdpau_gl_x11"
2013-07-16 13:28:28 +02:00
2006-06-18 13:21:23 +02:00
if win32; then
2012-10-05 15:17:16 +02:00
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
2013-07-16 13:28:28 +02:00
def_direct3d='#define HAVE_DIRECT3D 1'
2010-05-09 13:20:15 +02:00
vomodules="direct3d $vomodules"
2008-11-18 13:23:42 +01:00
else
2013-07-16 13:28:28 +02:00
def_direct3d='#define HAVE_DIRECT3D 0'
2010-05-09 13:20:15 +02:00
novomodules="direct3d $novomodules"
2008-11-18 13:23:42 +01:00
fi
echores "$_direct3d"
2012-10-05 15:17:16 +02:00
echocheck "DirectSound"
if test "$_dsound" = auto ; then
_dsound=no
header_check dsound.h && _dsound=yes
fi
if test "$_dsound" = yes ; then
2013-07-16 13:28:28 +02:00
def_dsound='#define HAVE_DSOUND 1'
2012-10-05 15:17:16 +02:00
aomodules="dsound $aomodules"
else
2013-07-16 13:28:28 +02:00
def_dsound='#define HAVE_DSOUND 0'
2012-10-05 15:17:16 +02:00
noaomodules="dsound $noaomodules"
fi
echores "$_dsound"
2013-06-13 15:15:39 +02:00
echocheck "WASAPI"
2013-07-20 19:13:39 +02:00
if test "$_wasapi" = auto ; then
_wasapi=no
2013-06-13 15:15:39 +02:00
cat > $TMPC << EOF
#define COBJMACROS 1
#define _WIN32_WINNT 0x600
#include <malloc.h>
#include <stdlib.h>
#include <process.h>
#include <initguid.h>
#include <audioclient.h>
#include <endpointvolume.h>
#include <mmdeviceapi.h>
#include <avrt.h>
const GUID *check1[] = {
&IID_IAudioClient,
&IID_IAudioRenderClient,
&IID_IAudioClient,
&IID_IAudioEndpointVolume,
};
int main(void) {
return 0;
}
EOF
2013-06-26 14:44:46 +02:00
if cc_check "-lole32"; then
2013-07-20 19:13:39 +02:00
_wasapi="yes"
2013-06-13 15:15:39 +02:00
fi
fi
2013-07-20 19:13:39 +02:00
if test "$_wasapi" = yes ; then
2013-07-16 13:28:28 +02:00
def_wasapi='#define HAVE_WASAPI 1'
2013-07-20 19:13:39 +02:00
aomodules="wasapi $aomodules"
2013-06-26 14:44:46 +02:00
libs_mplayer="$libs_mplayer -lole32"
2013-06-13 15:15:39 +02:00
else
2013-07-16 13:28:28 +02:00
def_wasapi='#define HAVE_WASAPI 0'
2013-07-20 19:13:39 +02:00
noaomodules="wasapi $noaomodules"
2013-06-13 15:15:39 +02:00
fi
2013-07-20 19:13:39 +02:00
echores "$_wasapi"
2012-10-05 15:17:16 +02:00
2013-07-16 13:28:28 +02:00
else
def_direct3d='#define HAVE_DIRECT3D 0'
def_dsound='#define HAVE_DSOUND 0'
def_wasapi='#define HAVE_WASAPI 0'
2006-06-18 13:21:23 +02:00
fi #if win32; then
2012-12-28 08:07:14 +01:00
echocheck "SDL 2.0"
2013-05-20 12:46:17 +02:00
if test "$_sdl2" = yes ; then
2012-12-28 08:07:14 +01:00
pkg_config_add 'sdl2' && _sdl2=yes
fi
if test "$_sdl2" = yes ; then
_sdl=yes # sdl2 implies sdl
2013-07-16 13:28:28 +02:00
def_sdl='#define HAVE_SDL 1'
def_sdl2='#define HAVE_SDL2 1'
2012-12-28 08:07:14 +01:00
vomodules="sdl $vomodules"
aomodules="sdl $aomodules"
echores "$_sdl2"
else
2013-07-16 13:28:28 +02:00
def_sdl2='#define HAVE_SDL2 0'
2012-12-28 08:07:14 +01:00
echores "$_sdl2"
echocheck "SDL"
2013-05-20 12:46:17 +02:00
if test "$_sdl" = yes ; then
2012-12-28 08:07:14 +01:00
pkg_config_add 'sdl' && _sdl=yes
fi
if test "$_sdl" = yes ; then
2013-07-16 13:28:28 +02:00
def_sdl='#define HAVE_SDL 1'
2012-12-28 08:07:14 +01:00
novomodules="sdl $novomodules"
aomodules="sdl $aomodules"
else
2013-07-16 13:28:28 +02:00
def_sdl='#define HAVE_SDL 0'
2012-12-28 08:07:14 +01:00
novomodules="sdl $novomodules"
noaomodules="sdl $noaomodules"
fi
echores "$_sdl"
fi
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
2013-07-16 13:28:28 +02:00
def_ossaudio='#define HAVE_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"'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lossaudio"
2010-06-14 17:19:38 +02:00
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
2013-07-16 13:28:28 +02:00
def_ossaudio='#define HAVE_OSS_AUDIO 0'
2009-02-08 23:49:52 +01:00
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
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
2013-07-16 13:28:28 +02:00
def_rsound='#define HAVE_RSOUND 1'
2011-06-24 15:56:43 +02:00
aomodules="rsound $aomodules"
libs_mplayer="$libs_mplayer -lrsound"
else
2013-07-16 13:28:28 +02:00
def_rsound='#define HAVE_RSOUND 0'
2011-06-24 15:56:43 +02:00
noaomodules="rsound $noaomodules"
fi
2009-01-11 13:58:06 +01:00
2013-09-28 18:01:12 +02:00
echocheck "sndio"
if test "$_sndio" = auto ; then
_sndio=no
statement_check sndio.h 'struct sio_par par; sio_initpar(&par);' -lsndio && _sndio=yes
fi
echores "$_sndio"
if test "$_sndio" = yes ; then
2013-07-16 13:28:28 +02:00
def_sndio='#define HAVE_SNDIO 1'
2013-09-28 18:01:12 +02:00
aomodules="sndio $_aomodules"
libs_mplayer="$libs_mplayer -lsndio"
else
2013-07-16 13:28:28 +02:00
def_sndio='#define HAVE_SNDIO 0'
2013-09-28 18:01:12 +02:00
noaomodules="sndio $_noaomodules"
fi
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
2013-07-16 13:28:28 +02:00
def_pulse='#define HAVE_PULSE 1'
2010-05-09 13:20:15 +02:00
aomodules="pulse $aomodules"
2004-11-06 20:35:24 +01:00
else
2013-07-16 13:28:28 +02:00
def_pulse='#define HAVE_PULSE 0'
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
2012-04-27 11:26:04 +02:00
echocheck "PortAudio"
if test "$_portaudio" = auto && test "$_pthreads" != yes ; then
_portaudio=no
res_comment="pthreads not enabled"
fi
if test "$_portaudio" = auto ; then
_portaudio=no
if pkg_config_add 'portaudio-2.0 >= 19' ; then
_portaudio=yes
fi
fi
echores "$_portaudio"
if test "$_portaudio" = yes ; then
2013-07-16 13:28:28 +02:00
def_portaudio='#define HAVE_PORTAUDIO 1'
2012-04-27 11:26:04 +02:00
aomodules="portaudio $aomodules"
else
2013-07-16 13:28:28 +02:00
def_portaudio='#define HAVE_PORTAUDIO 0'
2012-04-27 11:26:04 +02:00
noaomodules="portaudio $noaomodules"
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
2013-07-16 13:28:28 +02:00
def_jack='#define HAVE_JACK 1'
2010-05-09 13:20:15 +02:00
aomodules="jack $aomodules"
2004-06-25 20:11:15 +02:00
else
2013-11-04 00:48:29 +01:00
def_jack='#define HAVE_JACK 0'
2010-05-09 13:20:15 +02:00
noaomodules="jack $noaomodules"
2004-06-25 20:11:15 +02:00
fi
echores "$_jack"
2012-11-23 15:29:21 +01:00
2006-02-16 21:45:25 +01:00
echocheck "OpenAL"
if test "$_openal" = auto ; then
_openal=no
2012-11-23 15:29:21 +01:00
if pkg_config_add 'openal >= 1.13' ; then
_openal=yes
fi
2006-02-16 21:45:25 +01:00
fi
2012-11-23 15:29:21 +01:00
echores "$_openal"
2006-02-16 21:45:25 +01:00
if test "$_openal" = yes ; then
2013-07-16 13:28:28 +02:00
def_openal='#define HAVE_OPENAL 1'
2010-05-09 13:20:15 +02:00
aomodules="openal $aomodules"
2006-02-16 21:45:25 +01:00
else
2013-07-16 13:28:28 +02:00
def_openal='#define HAVE_OPENAL 0'
2010-05-09 13:20:15 +02:00
noaomodules="openal $noaomodules"
2006-02-16 21:45:25 +01:00
fi
2012-11-23 15:29:21 +01:00
2004-06-25 20:11:15 +02:00
2001-11-17 04:53:05 +01:00
echocheck "ALSA audio"
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
2013-07-16 13:28:28 +02:00
def_alsa='#define HAVE_ALSA 0'
2012-02-27 15:29:21 +01:00
if test "$_alsa" = yes ; then
2010-05-09 13:20:15 +02:00
aomodules="alsa $aomodules"
2013-07-16 13:28:28 +02:00
def_alsa='#define HAVE_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
2013-11-04 00:43:47 +01:00
def_coreaudio='#define HAVE_COREAUDIO 0'
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"
2013-07-16 13:28:28 +02:00
def_coreaudio='#define HAVE_COREAUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="coreaudio $aomodules"
2009-05-05 19:57:44 +02:00
else
2013-07-16 13:28:28 +02:00
def_coreaudio='#define HAVE_COREAUDIO 0'
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
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
2013-07-16 22:15:30 +02:00
default_cdrom_device="/dev/cd0"
2008-10-21 09:02:25 +02:00
elif openbsd ; then
2010-08-03 10:57:48 +02:00
default_cdrom_device="/dev/rcd0c"
2008-10-21 09:02:25 +02:00
else
default_cdrom_device="/dev/cdrom"
fi
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
if win32 || dragonfly || freebsd || openbsd ; 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
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
if linux || freebsd || netbsd || openbsd || dragonfly || darwin ; then
2009-05-05 19:17:17 +02:00
_vcd=yes
elif mingw32; then
2013-07-13 03:58:10 +02:00
header_check_broken windows.h 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"
2013-07-16 13:28:28 +02:00
def_vcd='#define HAVE_VCD 1'
2001-11-28 00:17:58 +01:00
else
2013-07-16 13:28:28 +02:00
def_vcd='#define HAVE_VCD 0'
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
2012-05-06 18:08:33 +02:00
pkg_config_add 'libbluray >= 0.2.1' && _bluray=yes
2010-07-05 19:04:46 +02:00
fi
if test "$_bluray" = yes ; then
2013-07-16 13:28:28 +02:00
def_bluray='#define HAVE_LIBBLURAY 1'
2010-07-05 19:04:46 +02:00
inputmodules="bluray $inputmodules"
else
2013-07-16 13:28:28 +02:00
def_bluray='#define HAVE_LIBBLURAY 0'
2010-07-05 19:04:46 +02:00
noinputmodules="bluray $noinputmodules"
fi
echores "$_bluray"
2012-08-12 18:40:21 +02:00
2006-11-03 23:03:58 +01:00
echocheck "dvdread"
2012-08-12 18:40:21 +02:00
if test "$_dvdread" = auto ; then
2006-11-03 23:03:58 +01:00
_dvdread=no
2013-08-02 17:08:36 +02:00
pkg_config_add 'dvdread >= 4.1.0' && _dvdread=yes
2001-11-17 04:53:05 +01:00
fi
2012-08-12 18:40:21 +02:00
if test "$_dvdread" = yes ; then
2013-07-16 13:28:28 +02:00
def_dvdread='#define HAVE_DVDREAD 1'
2012-08-12 18:40:21 +02:00
inputmodules="dvdread $inputmodules"
2005-12-14 22:52:41 +01:00
else
2013-07-16 13:28:28 +02:00
def_dvdread='#define HAVE_DVDREAD 0'
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
2005-11-06 18:42:20 +01:00
echocheck "libcdio"
2012-03-21 00:57:58 +01:00
if test "$_libcdio" = auto ; then
2012-02-27 14:51:35 +01:00
_libcdio=no
2013-01-23 22:39:24 +01:00
if pkg_config_add 'libcdio_paranoia' ; then
2012-02-27 14:51:35 +01:00
_libcdio=yes
2005-11-06 18:42:20 +01:00
fi
fi
2012-03-21 00:57:58 +01:00
if test "$_libcdio" = yes ; then
2006-07-06 15:09:45 +02:00
_cdda='yes'
2013-07-16 13:28:28 +02:00
def_cdda='#define HAVE_CDDA 1'
2010-05-09 13:20:15 +02:00
inputmodules="cdda $inputmodules"
2006-10-29 12:38:14 +01:00
else
2012-03-21 00:57:58 +01:00
_libcdio=no
_cdda='no'
2013-07-16 13:28:28 +02:00
def_cdda='#define HAVE_CDDA 0'
2010-05-29 12:43:51 +02:00
noinputmodules="cdda $noinputmodules"
2006-10-29 12:38:14 +01:00
fi
2012-03-21 00:57:58 +01:00
echores "$_libcdio"
2005-11-06 18:42:20 +01:00
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
echocheck "SSA/ASS support"
if test "$_ass" = auto ; then
if pkg_config_add libass ; then
_ass=yes
2013-07-16 13:28:28 +02:00
def_ass='#define HAVE_LIBASS 1'
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
else
die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
fi
else
2013-07-16 13:28:28 +02:00
def_ass='#define HAVE_LIBASS 0'
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
fi
echores "$_ass"
echocheck "libass OSD support"
2012-07-28 22:00:31 +02:00
_dummy_osd=yes
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
if test "$_libass_osd" = auto ; then
_libass_osd=no
if test "$_ass" = yes ; then
_libass_osd=yes
2012-07-28 22:00:31 +02:00
_dummy_osd=no
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
fi
fi
echores "$_libass_osd"
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
2013-07-16 13:28:28 +02:00
def_enca='#define HAVE_ENCA 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lenca"
2004-05-08 19:52:25 +02:00
else
2013-07-16 13:28:28 +02:00
def_enca='#define HAVE_ENCA 0'
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
2013-07-16 13:28:28 +02:00
def_zlib='#define HAVE_ZLIB 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lz"
2001-02-24 21:28:24 +01:00
else
2013-07-08 21:29:01 +02:00
die "Unable to find development files for zlib."
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
2010-06-30 11:55:14 +02:00
echocheck "mpg123 support"
2013-07-16 13:28:28 +02:00
def_mpg123='#define HAVE_MPG123 0'
2010-06-30 11:55:14 +02:00
if test "$_mpg123" = auto; then
_mpg123=no
2013-11-12 22:27:36 +01:00
pkg_config_add 'libmpg123 >= 1.14.0' && _mpg123=yes
2010-06-30 11:55:14 +02:00
fi
if test "$_mpg123" = yes ; then
2013-07-16 13:28:28 +02:00
def_mpg123='#define HAVE_MPG123 1'
2010-06-30 11:55:14 +02:00
codecmodules="mpg123 $codecmodules"
else
nocodecmodules="mpg123 $nocodecmodules"
fi
echores "$_mpg123"
2004-12-23 03:09:52 +01:00
echocheck "LADSPA plugin support"
if test "$_ladspa" = auto ; then
_ladspa=no
2013-07-09 09:28:05 +02:00
if test "$_dl" = yes ; then
statement_check ladspa.h 'LADSPA_Descriptor ld = {0}' && _ladspa=yes
fi
2004-12-23 03:09:52 +01:00
fi
if test "$_ladspa" = yes; then
2013-07-16 13:28:28 +02:00
def_ladspa="#define HAVE_LADSPA 1"
2004-12-23 03:09:52 +01:00
else
2013-07-16 13:28:28 +02:00
def_ladspa="#define HAVE_LADSPA 0"
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
2013-07-16 13:28:28 +02:00
def_libbs2b="#define HAVE_LIBBS2B 0"
test "$_libbs2b" = yes && def_libbs2b="#define HAVE_LIBBS2B 1"
2009-04-02 21:01:23 +02:00
echores "$_libbs2b"
2012-03-31 01:13:38 +02:00
echocheck "LCMS2 support"
if test "$_lcms2" = auto ; then
_lcms2=no
if pkg_config_add lcms2 ; then
_lcms2=yes
fi
fi
if test "$_lcms2" = yes; then
2013-07-16 13:28:28 +02:00
def_lcms2="#define HAVE_LCMS2 1"
2012-03-31 01:13:38 +02:00
else
2013-07-16 13:28:28 +02:00
def_lcms2="#define HAVE_LCMS2 0"
2012-03-31 01:13:38 +02:00
fi
echores "$_lcms2"
2001-12-30 00:34:53 +01:00
2013-11-29 17:39:57 +01:00
all_libav_libs="libavutil >= 52.3.0:libavcodec > 54.34.0:libavformat > 54.19.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
2009-07-26 04:55:40 +02:00
2013-03-09 09:30:26 +01:00
_resampler=no
2013-05-13 00:38:35 +02:00
_avresample=no
_avresample_has_set_channel_mapping=no
2013-07-16 13:28:28 +02:00
def_libswresample='#define HAVE_LIBSWRESAMPLE 0'
def_libavresample='#define HAVE_LIBAVRESAMPLE 0'
2013-03-09 09:30:26 +01:00
echocheck "libavresample >= 1.0.0"
if test "$_disable_avresample" = no ; then
if pkg_config_add "libavresample >= 1.0.0" ; then
_resampler=yes
2013-05-13 00:38:35 +02:00
_avresample=yes
2013-07-16 13:28:28 +02:00
def_libavresample='#define HAVE_LIBAVRESAMPLE 1'
2013-03-09 09:30:26 +01:00
fi
fi
echores "$_resampler"
2013-05-13 00:38:35 +02:00
if test "$_avresample" = yes ; then
echocheck "libavresample avresample_set_channel_mapping() API"
statement_check libavresample/avresample.h 'avresample_set_channel_mapping(NULL, NULL)' && _avresample_has_set_channel_mapping=yes
echores "$_avresample_has_set_channel_mapping"
fi
2013-03-09 09:30:26 +01:00
if test "$_resampler" = no ; then
2013-05-19 14:06:59 +02:00
echocheck "libswresample >= 0.17.102"
if pkg_config_add "libswresample >= 0.17.102" ; then
2013-03-09 09:30:26 +01:00
_resampler=yes
2013-07-16 13:28:28 +02:00
def_libswresample='#define HAVE_LIBSWRESAMPLE 1'
2013-03-09 09:30:26 +01:00
fi
echores "$_resampler"
fi
2013-05-13 00:38:35 +02:00
2013-03-09 09:30:26 +01:00
if test "$_resampler" = no ; then
die "No resampler found. Install libavresample or libswresample (FFmpeg)."
fi
2013-05-13 00:38:35 +02:00
if test "$_avresample_has_set_channel_mapping" = yes ; then
def_avresample_has_set_channel_mapping='#define HAVE_AVRESAMPLE_SET_CHANNEL_MAPPING 1'
else
def_avresample_has_set_channel_mapping='#define HAVE_AVRESAMPLE_SET_CHANNEL_MAPPING 0'
fi
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
echocheck "libavcodec new vdpau API"
_avcodec_new_vdpau_api=no
statement_check libavutil/pixfmt.h 'int x = AV_PIX_FMT_VDPAU' && _avcodec_new_vdpau_api=yes
if test "$_avcodec_new_vdpau_api" = yes ; then
2013-07-16 13:28:28 +02:00
def_avcodec_new_vdpau_api='#define HAVE_AVCODEC_NEW_VDPAU_API 1'
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
else
2013-07-16 13:28:28 +02:00
def_avcodec_new_vdpau_api='#define HAVE_AVCODEC_NEW_VDPAU_API 0'
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
fi
echores "$_avcodec_new_vdpau_api"
2013-07-30 16:21:33 +02:00
_vdpau_dec=no
_vdpau_dec_old=no
if test "$_vdpau" = yes ; then
if test "$_avcodec_new_vdpau_api" = yes ; then
_vdpau_dec=yes
2013-07-16 13:28:28 +02:00
def_vdpau_dec='#define HAVE_VDPAU_HWACCEL 1'
def_vdpau_dec_old='#define HAVE_VDPAU_DECODER 0'
2013-07-30 16:21:33 +02:00
else
_vdpau_dec_old=yes
2013-07-16 13:28:28 +02:00
def_vdpau_dec='#define HAVE_VDPAU_HWACCEL 0'
def_vdpau_dec_old='#define HAVE_VDPAU_DECODER 1'
2013-07-30 16:21:33 +02:00
fi
2013-07-16 13:28:28 +02:00
else
def_vdpau_dec='#define HAVE_VDPAU_HWACCEL 0'
def_vdpau_dec_old='#define HAVE_VDPAU_DECODER 0'
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
fi
2013-03-09 09:30:26 +01:00
2013-06-02 19:38:57 +02:00
2013-07-25 23:02:23 +02:00
echocheck "libavcodec avcodec_enum_to_chroma_pos API"
_avcodec_has_chroma_pos_api=no
statement_check libavcodec/avcodec.h 'int x, y; avcodec_enum_to_chroma_pos(&x, &y, AVCHROMA_LOC_UNSPECIFIED)' && _avcodec_has_chroma_pos_api=yes
if test "$_avcodec_has_chroma_pos_api" = yes ; then
def_avcodec_has_chroma_pos_api='#define HAVE_AVCODEC_CHROMA_POS_API 1'
else
def_avcodec_has_chroma_pos_api='#define HAVE_AVCODEC_CHROMA_POS_API 0'
fi
echores "$_avcodec_has_chroma_pos_api"
2013-03-15 14:21:42 +01:00
echocheck "libavutil QP API"
_avutil_has_qp_api=no
statement_check libavutil/frame.h 'av_frame_get_qp_table(NULL, NULL, NULL)' && _avutil_has_qp_api=yes
if test "$_avutil_has_qp_api" = yes ; then
def_avutil_has_qp_api='#define HAVE_AVUTIL_QP_API 1'
else
def_avutil_has_qp_api='#define HAVE_AVUTIL_QP_API 0'
fi
echores "$_avutil_has_qp_api"
2013-03-09 20:50:06 +01:00
echocheck "libavutil ref-counting API"
_avutil_has_refcounting=no
statement_check libavutil/frame.h 'av_frame_unref(NULL)' && _avutil_has_refcounting=yes
if test "$_avutil_has_refcounting" = yes ; then
def_avutil_has_refcounting='#define HAVE_AVUTIL_REFCOUNTING 1'
else
def_avutil_has_refcounting='#define HAVE_AVUTIL_REFCOUNTING 0'
fi
echores "$_avutil_has_refcounting"
2013-03-11 00:16:34 +01:00
# libavfilter as it can be used by vf_lavfi is 3.45.101 in FFmpeg, and
# 3.5.0 in Libav. Completely useless version numbers.
echocheck "libavfilter"
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
if test "$libavfilter" = auto ; then
libavfilter=no
2013-03-11 00:16:34 +01:00
cat > $TMPC <<EOF
#include <libavfilter/avfilter.h>
void vf_next_query_format() {}
int main(void) {
avfilter_register_all();
vf_next_query_format();
return 0;
}
EOF
if cc_check `$_pkg_config libavfilter --cflags --libs` && pkg_config_add "libavfilter" ; then
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
libavfilter=yes
2013-03-11 00:16:34 +01:00
else
res_comment="not found or broken"
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
fi
fi
if test "$libavfilter" = yes ; then
2013-07-16 13:28:28 +02:00
def_libavfilter='#define HAVE_LIBAVFILTER 1'
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
else
2013-07-16 13:28:28 +02:00
def_libavfilter='#define HAVE_LIBAVFILTER 0'
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
fi
echores "$libavfilter"
2013-03-11 00:16:34 +01:00
echocheck "using libavfilter through vf_lavfi"
if test "$vf_lavfi" = auto ; then
vf_lavfi=no
if test "$libavfilter" = yes ; then
if test "$_avutil_has_refcounting" = no ; then
res_comment="libavutil too old"
else
vf_lavfi=yes
fi
fi
fi
if test "$vf_lavfi" = yes ; then
2013-07-16 13:28:28 +02:00
def_vf_lavfi='#define HAVE_VF_LAVFI 1'
2013-03-11 00:16:34 +01:00
else
2013-07-16 13:28:28 +02:00
def_vf_lavfi='#define HAVE_VF_LAVFI 0'
2013-03-11 00:16:34 +01:00
fi
echores "$vf_lavfi"
2013-05-23 15:11:57 +02:00
echocheck "libavutil av_opt_set_int_list() API"
_avutil_has_opt_set_int_list=no
statement_check libavutil/opt.h 'av_opt_set_int_list(0,0,(int*)0,0,0)' && _avutil_has_opt_set_int_list=yes
echores "$_avutil_has_opt_set_int_list"
echocheck "using libavfilter through af_lavfi"
if test "$af_lavfi" = auto ; then
af_lavfi=no
if test "$libavfilter" = yes ; then
if test "$_avutil_has_opt_set_int_list" = no ; then
res_comment="libavutil too old"
else
af_lavfi=yes
fi
fi
fi
if test "$af_lavfi" = yes ; then
2013-07-16 13:28:28 +02:00
def_af_lavfi='#define HAVE_AF_LAVFI 1'
2013-05-23 15:11:57 +02:00
else
2013-07-16 13:28:28 +02:00
def_af_lavfi='#define HAVE_AF_LAVFI 0'
2013-05-23 15:11:57 +02:00
fi
echores "$af_lavfi"
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
echocheck "libavdevice >= 54.0.0"
if test "$libavdevice" = auto ; then
libavdevice=no
2013-04-23 14:11:43 +02:00
# Usually, libavdevice depends on libavfilter
if test "$libavfilter" = yes && pkg_config_add "libavdevice >= 54.0.0" ; then
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
libavdevice=yes
fi
fi
if test "$libavdevice" = yes ; then
2013-07-16 13:28:28 +02:00
def_libavdevice='#define HAVE_LIBAVDEVICE 1'
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
else
2013-07-16 13:28:28 +02:00
def_libavdevice='#define HAVE_LIBAVDEVICE 0'
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
fi
echores "$libavdevice"
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
2013-07-16 13:28:28 +02:00
def_libpostproc='#define HAVE_LIBPOSTPROC 1'
2012-02-27 17:18:49 +01:00
else
2013-07-16 13:28:28 +02:00
def_libpostproc='#define HAVE_LIBPOSTPROC 0'
2012-02-27 17:18:49 +01:00
fi
echores "$libpostproc"
2010-10-31 02:19:56 +02:00
2013-08-14 15:47:18 +02:00
if darwin ; then
echocheck "VDA"
if test "$_vda" = auto ; then
_vda=no
if test "$_avutil_has_refcounting" = "yes" ; then
header_check VideoDecodeAcceleration/VDADecoder.h &&
2013-08-26 08:10:24 +02:00
statement_check libavcodec/vda.h 'ff_vda_create_decoder(NULL, NULL, NULL)' &&
_vda=yes
2013-08-14 15:47:18 +02:00
else
res_comment="libavutil too old"
fi
fi
if test "$_vda" = yes ; then
2013-07-16 13:28:28 +02:00
def_vda='#define HAVE_VDA_HWACCEL 1'
2013-08-14 15:47:18 +02:00
libs_mplayer="$libs_mplayer -framework VideoDecodeAcceleration -framework QuartzCore -framework IOSurface"
else
2013-07-16 13:28:28 +02:00
def_vda='#define HAVE_VDA_HWACCEL 0'
2013-08-14 15:47:18 +02:00
fi
echores "$_vda"
echocheck "VDA libavcodec refcounting"
_vda_refcounting=no
if test "$_vda" = yes ; then
statement_check libavcodec/vda.h 'struct vda_context a = (struct vda_context) { .use_ref_buffer = 1 }' &&
_vda_refcounting=yes
fi
if test "$_vda_refcounting" = "yes" ; then
def_vda_refcounting='#define HAVE_VDA_LIBAVCODEC_REFCOUNTING 1'
else
def_vda_refcounting='#define HAVE_VDA_LIBAVCODEC_REFCOUNTING 0'
fi
echores "$_vda_refcounting"
2013-07-16 13:28:28 +02:00
else
def_vda='#define HAVE_VDA_HWACCEL 0'
def_vda_refcounting='#define HAVE_VDA_LIBAVCODEC_REFCOUNTING 0'
2013-08-14 15:47:18 +02:00
fi
2001-11-17 04:53:05 +01:00
echocheck "TV interface"
if test "$_tv" = yes ; then
2013-07-16 13:28:28 +02:00
def_tv='#define HAVE_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"
2013-07-16 13:28:28 +02:00
def_tv='#define HAVE_TV 0'
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
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
2013-11-09 02:21:53 +01:00
elif test "$_tv" = yes && freebsd ; then
header_check 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
2013-07-16 13:28:28 +02:00
def_tv_v4l2='#define HAVE_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"
2013-07-16 13:28:28 +02:00
def_tv_v4l2='#define HAVE_TV_V4L2 0'
2003-08-07 14:24:35 +02:00
fi
echores "$_tv_v4l2"
2013-11-09 02:15:12 +01:00
echocheck "libv4l2 support"
if test "$_libv4l2" = auto ; then
_libv4l2=no
if pkg_config_add "libv4l2" ; then
_libv4l2=yes
fi
fi
if test "$_libv4l2" = yes; then
def_libv4l2="#define HAVE_LIBV4L2 1"
else
def_libv4l2="#define HAVE_LIBV4L2 0"
fi
echores "$_libv4l2"
2003-08-07 14:24:35 +02:00
2006-08-28 19:05:18 +02:00
echocheck "Radio interface"
if test "$_radio" = yes ; then
2013-07-16 13:28:28 +02:00
def_radio='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_radio_capture="#define HAVE_RADIO_CAPTURE 1"
2006-08-28 19:05:18 +02:00
else
2013-07-16 13:28:28 +02:00
def_radio_capture="#define HAVE_RADIO_CAPTURE 0"
2006-08-28 19:05:18 +02:00
fi
else
2010-05-29 12:43:51 +02:00
noinputmodules="radio $noinputmodules"
2013-07-16 13:28:28 +02:00
def_radio='#define HAVE_RADIO 0'
def_radio_capture="#define HAVE_RADIO_CAPTURE 0"
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
2013-11-09 02:21:53 +01:00
if test "$_radio" = yes && (linux || freebsd) ; 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
2013-07-16 13:28:28 +02:00
def_radio_v4l2='#define HAVE_RADIO_V4L2 1'
2006-08-28 19:05:18 +02:00
else
2013-07-16 13:28:28 +02:00
def_radio_v4l2='#define HAVE_RADIO_V4L2 0'
2006-08-28 19:05:18 +02:00
fi
echores "$_radio_v4l2"
2013-02-06 21:55:35 +01:00
if test "$_radio_v4l2" = no && test "$_radio" = yes ; then
die "Radio driver requires 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
2013-11-09 02:21:53 +01:00
if test "$_tv_v4l2" = yes ; then
2006-07-10 23:32:19 +02:00
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
2013-07-16 13:28:28 +02:00
def_pvr='#define HAVE_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"
2013-07-16 13:28:28 +02:00
def_pvr='#define HAVE_PVR 0'
2006-07-10 23:32:19 +02:00
fi
echores "$_pvr"
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
# Note: Lua has no official .pc file, so there are different OS-specific ones.
# Also, we support luajit, which is compatible to 5.1.
# The situation is further complicated by distros supporting multiple Lua
# versions, without ensuring libraries linking to conflicting Lua libs don't
# cause issues. This is a real problem with libquvi.
cat > $TMPC << EOF
#include <stdlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
EOF
# abuse $TMPH file as second temp file
cat > $TMPH << EOF
void test_lua(void) {
lua_State *L = luaL_newstate();
lua_pushstring(L, "test");
lua_setglobal(L, "test");
}
void test_other(void) {
EOF
# test all other Lua using packages (hack that gives us time)
if test "$_libquvi4" = yes ; then
echo "#include <quvi/quvi.h>" >> $TMPC
cat >> $TMPH << EOF
quvi_t q;
if (quvi_init(&q) == QUVI_OK)
quvi_supported(q, "http://nope");
EOF
fi
if test "$_libquvi9" = yes ; then
echo "#include <quvi.h>" >> $TMPC
cat >> $TMPH << EOF
quvi_t q = quvi_new();
if (quvi_ok(q))
quvi_supports(q, "http://nope", QUVI_SUPPORTS_MODE_OFFLINE, QUVI_SUPPORTS_TYPE_MEDIA);
EOF
fi
cat >> $TMPH << EOF
}
int main(void) {
test_lua();
test_other();
return 0;
}
EOF
cat $TMPH >> $TMPC
test_lua() {
# changed by pkg_config_add
old_extra_cflags="$extra_cflags"
old_libs_mplayer="$libs_mplayer"
echocheck "Lua $2 ($1)"
if test "$lua" = yes ; then
echores "no"
return 1
fi
if test "x$lua_pkg" != "x" && test "$lua_pkg" != "$1" ; then
echores "no"
return 1
fi
if pkg_config_add "$2" ; then
if test $_cross_compile = no ; then
if cc_check && tmp_run ; then
echo > /dev/null # idiot NOP
else
extra_cflags="$old_extra_cflags"
libs_mplayer="$old_libs_mplayer"
echores "no - does not run"
return 1
fi
fi
lua=yes
fi
echores "$lua"
test "$lua" = yes
return $?
}
if test "$lua" = auto ; then
lua=no
test_lua 51 "lua >= 5.1.0 lua < 5.2.0"
test_lua 51deb "lua5.1 >= 5.1.0" # debian
test_lua luajit "luajit >= 2.0.0"
# assume all our dependencies (libquvi in particular) link with 5.1
test_lua 52 "lua >= 5.2.0"
test_lua 52deb "lua5.2 >= 5.2.0" # debian
fi
if test "$lua" = yes ; then
2013-07-16 13:28:28 +02:00
def_lua='#define HAVE_LUA 1'
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
else
2013-07-16 13:28:28 +02:00
def_lua='#define HAVE_LUA 0'
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
fi
2012-09-14 17:51:26 +02:00
echocheck "encoding"
if test "$_encoding" = yes ; then
2013-07-16 13:28:28 +02:00
def_encoding="#define HAVE_ENCODING 1"
2012-09-14 17:51:26 +02:00
else
2013-07-16 13:28:28 +02:00
def_encoding="#define HAVE_ENCODING 0"
2012-09-14 17:51:26 +02:00
fi
echores "$_encoding"
2002-12-22 22:01:01 +01:00
2013-07-12 18:33:39 +02:00
# needs dlopen on unix, uses winapi on windows
_dlopen="$_dl"
if win32 ; then
_dlopen=yes
fi
if test "$_dlopen" = yes ; then
2013-07-16 13:28:28 +02:00
def_dlopen='#define HAVE_DLOPEN 1'
2013-07-12 18:33:39 +02:00
else
2013-07-16 13:28:28 +02:00
def_dlopen='#define HAVE_DLOPEN 0'
2013-07-12 18:33:39 +02:00
fi
2001-11-17 04:53:05 +01:00
#############################################################################
2001-03-28 14:08:44 +02:00
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
2012-12-19 13:01:56 +01:00
extra_ldflags="$extra_ldflags $_ld_pthread"
libs_mplayer="$libs_mplayer $_ld_dl"
(netbsd || openbsd) && x86_32 && libs_mplayer="$libs_mplayer -li386"
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"
2013-07-16 13:28:28 +02:00
def_joystick='#define HAVE_JOYSTICK 0'
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
2013-07-16 13:28:28 +02:00
def_joystick='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_lirc='#define HAVE_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
2013-07-16 13:28:28 +02:00
def_lirc='#define HAVE_LIRC 0'
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
2013-07-16 13:28:28 +02:00
def_lircc='#define HAVE_LIRCC 1'
2009-05-08 18:21:03 +02:00
libs_mplayer="$libs_mplayer -llircc"
2003-05-30 20:23:55 +02:00
else
2013-07-16 13:28:28 +02:00
def_lircc='#define HAVE_LIRCC 0'
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
2013-04-10 17:15:29 +02:00
if mingw32 ; then
# add this last, so that --libs from pkg-config can't override it
end_ldflags="$end_ldflags -mconsole"
fi
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
2011-10-21 17:44:56 +02:00
CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
2007-03-18 22:58:28 +01:00
2009-02-23 02:39:27 +01:00
# DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
2013-07-16 13:28:28 +02:00
# This is done so waf builds won't conflict with this. In fact, waf and old
# build system can coexist in parallel, at the same time. This is because
# waf always does out-of-tree builds, while this build system does always
# in-tree builds.
if test ! -f Makefile ; then
ln -s old-makefile Makefile
fi
rm -rf old_build
mkdir old_build
BUILDCFLAGS="-Iold_build"
2010-03-17 15:41:32 +01:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-11-18 18:45:23 +01:00
echo "Creating config.mak"
2013-07-16 13:28:28 +02:00
cat > old_build/config.mak << EOF
2001-11-18 18:45:23 +01:00
# -------- 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
2010-04-04 18:48:46 +02:00
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
MANDIR = \$(DESTDIR)$_mandir
2013-09-09 04:23:06 +02:00
DOCDIR = \$(DESTDIR)$_docdir
2002-06-24 10:23:48 +02:00
CONFDIR = \$(DESTDIR)$_confdir
2008-06-02 14:24:28 +02:00
2010-04-04 18:48:46 +02:00
CC = $_cc
CXX = $_cc
2002-12-05 00:29:41 +01:00
INSTALL = $_install
2008-10-04 13:27:39 +02:00
WINDRES = $_windres
2008-06-02 14:24:28 +02:00
2013-07-16 13:28:28 +02:00
CFLAGS = $BUILDCFLAGS $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
CXXFLAGS = $BUILDCFLAGS $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
2013-04-10 17:15:29 +02:00
EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs $libs_mplayer $end_ldflags
2008-06-02 14:24:28 +02:00
GETCH = $_getch
TIMER = $_timer
2012-11-02 14:37:02 +01:00
RST2MAN = $_rst2man
2012-11-14 00:43:55 +01:00
BUILD_MAN = $_build_man
2013-09-09 04:23:06 +02:00
RST2LATEX = $_rst2latex
BUILD_PDF = $_build_pdf
2008-06-02 14:24:28 +02:00
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
2011-01-26 20:00:17 +01:00
NEED_GLOB = $need_glob
2007-01-10 20:07:42 +01:00
2008-06-02 14:24:28 +02:00
# features
2012-02-27 15:29:21 +01:00
ALSA = $_alsa
2013-03-31 17:11:41 +02:00
AUDIO_INPUT = $_audio_input
2008-12-03 15:48:31 +01:00
CACA = $_caca
2006-07-06 15:09:45 +02:00
CDDA = $_cdda
2012-04-03 08:13:12 +02:00
COCOA = $_cocoa
2008-06-02 14:24:28 +02:00
COREAUDIO = $_coreaudio
COREVIDEO = $_corevideo
2008-12-03 15:48:31 +01:00
DIRECT3D = $_direct3d
2013-07-09 09:28:05 +02:00
DL = $_dl
2013-07-12 18:33:39 +02:00
DLOPEN = $_dlopen
2012-12-28 08:07:14 +01:00
SDL = $_sdl
SDL2 = $_sdl2
2012-10-05 15:17:16 +02:00
DSOUND = $_dsound
2013-07-20 19:13:39 +02:00
WASAPI = $_wasapi
2008-06-02 14:24:28 +02:00
DVBIN = $_dvbin
DVDREAD = $_dvdread
2008-12-03 15:48:31 +01:00
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
2013-02-28 19:55:02 +01:00
GL_WAYLAND = $_gl_wayland
2008-10-04 13:06:50 +02:00
HAVE_POSIX_SELECT = $_posix_select
HAVE_SYS_MMAN_H = $_mman
2013-03-09 20:50:06 +01:00
HAVE_AVUTIL_REFCOUNTING = $_avutil_has_refcounting
2008-12-03 13:05:47 +01:00
JACK = $_jack
2008-06-02 14:24:28 +02:00
JOYSTICK = $_joystick
JPEG = $_jpeg
LADSPA = $_ladspa
2008-04-09 20:26:44 +02:00
LIBASS = $_ass
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-03-22 06:26:37 +01:00
LIBASS_OSD = $_libass_osd
2012-07-28 22:00:31 +02:00
DUMMY_OSD = $_dummy_osd
2010-07-05 19:04:46 +02:00
LIBBLURAY = $_bluray
2009-04-02 21:01:23 +02:00
LIBBS2B = $_libbs2b
2012-03-31 01:13:38 +02:00
LCMS2 = $_lcms2
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
LUA = $lua
2012-02-27 17:18:49 +01:00
LIBPOSTPROC = $libpostproc
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
LIBAVDEVICE = $libavdevice
LIBAVFILTER = $libavfilter
2013-03-11 00:16:34 +01:00
VF_LAVFI = $vf_lavfi
2013-05-23 15:11:57 +02:00
AF_LAVFI = $af_lavfi
2008-08-03 17:57:18 +02:00
LIBSMBCLIENT = $_smb
2013-07-05 22:53:59 +02:00
LIBQUVI = $_libquvi4
2013-06-27 18:21:07 +02:00
LIBQUVI9 = $_libquvi9
2013-06-24 23:06:34 +02:00
LIBGUESS = $_libguess
2008-06-02 14:24:28 +02:00
LIRC = $_lirc
2010-06-30 11:55:14 +02:00
MPG123 = $_mpg123
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
2009-02-10 16:34:44 +01:00
PRIORITY = $_priority
2008-12-03 13:05:47 +01:00
PULSE = $_pulse
2012-04-27 11:26:04 +02:00
PORTAUDIO = $_portaudio
2008-06-02 14:24:28 +02:00
PVR = $_pvr
2006-08-28 19:05:18 +02:00
RADIO=$_radio
RADIO_CAPTURE=$_radio_capture
2011-06-24 15:56:43 +02:00
RSOUND = $_rsound
2013-09-28 18:01:12 +02:00
SNDIO = $_sndio
2008-06-02 14:24:28 +02:00
STREAM_CACHE = $_stream_cache
TV = $_tv
TV_V4L2 = $_tv_v4l2
2013-11-09 02:15:12 +01:00
LIBV4L2 = $_libv4l2
2008-06-02 14:24:28 +02:00
VCD = $_vcd
2009-02-16 21:58:13 +01:00
VDPAU = $_vdpau
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
VDPAU_DEC = $_vdpau_dec
VDPAU_DEC_OLD = $_vdpau_dec_old
2013-11-05 22:06:48 +01:00
VDPAU_GL_X11 = $_vdpau_gl_x11
2013-08-14 15:47:18 +02:00
VDA = $_vda
VDA_REFCOUNTING = $_vda_refcounting
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
VAAPI = $_vaapi
2013-09-20 15:55:13 +02:00
VAAPI_VPP = $_vaapi_vpp
2013-11-04 00:02:21 +01:00
VAAPI_GLX = $_vaapi_glx
2013-07-09 09:28:05 +02:00
WIN32 = $_win32
2008-12-03 15:48:31 +01:00
X11 = $_x11
2013-02-28 19:55:02 +01:00
WAYLAND = $_wayland
2008-12-03 15:48:31 +01:00
XV = $_xv
2006-07-12 19:28:14 +02:00
2008-03-31 19:04:06 +02:00
# FFmpeg
2012-09-14 17:51:26 +02:00
ENCODING = $_encoding
2008-03-31 19:04:06 +02:00
2010-04-04 18:48:46 +02:00
CONFIG_VDPAU = $_vdpau
2013-08-14 15:47:18 +02:00
CONFIG_VDA = $_vda
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
CONFIG_VAAPI = $_vaapi
2010-04-04 18:48:46 +02:00
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
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
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
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_CONFDIR "$_confdir"
2007-02-15 19:24:12 +01:00
2002-11-11 19:25:02 +01:00
2008-10-16 22:44:05 +02:00
/* system headers */
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_glob
$def_nanosleep
$def_posix_select
$def_select
2010-03-04 15:46:44 +01:00
$def_setmode
2009-02-08 23:49:52 +01:00
$def_shm
2013-07-22 03:27:58 +02:00
$def_terminfo
2009-02-08 23:49:52 +01:00
$def_termcap
$def_termios
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_dl
2010-02-11 09:52:15 +01:00
$def_dos_paths
2009-02-08 23:49:52 +01:00
$def_iconv
2009-02-10 16:34:44 +01:00
$def_priority
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_stream_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 */
2010-07-10 18:26:58 +02:00
$def_ebx_available
2013-07-07 21:37:31 +02:00
$def_arch_x86
$def_arch_x86_32
$def_arch_x86_64
2001-08-20 23:20:03 +02:00
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
#define HAVE_MMX ARCH_X86
#define HAVE_MMX2 ARCH_X86
#define HAVE_SSE ARCH_X86
#define HAVE_SSE2 ARCH_X86
#define HAVE_SSSE3 ARCH_X86
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
2012-03-21 00:57:58 +01:00
$def_cdda
2009-02-08 23:49:52 +01:00
$def_dvdread
$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 */
2010-06-30 11:55:14 +02:00
$def_mpg123
2009-02-08 23:49:52 +01:00
$def_zlib
2013-03-09 20:50:06 +01:00
$def_avutil_has_refcounting
2013-03-15 14:21:42 +01:00
$def_avutil_has_qp_api
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
2013-07-28 01:49:45 +02:00
$def_avcodec_new_vdpau_api
2013-07-25 23:02:23 +02:00
$def_avcodec_has_chroma_pos_api
2012-02-27 17:18:49 +01:00
$def_libpostproc
demux_lavf: add support for libavdevice
libavdevice supports various "special" video and audio inputs, such
as screen-capture or libavfilter filter graphs.
libavdevice inputs are implemented as demuxers. They don't use the
custom stream callbacks (in AVFormatContext.pb). Instead, input
parameters are passed as filename. This means the mpv stream layer has
to be disabled. Do this by adding the pseudo stream handler avdevice://,
whose only purpose is passing the filename to demux_lavf, without
actually doing anything.
Change the logic how the filename is passed to libavformat. Remove
handling of the filename from demux_open_lavf() and move it to
lavf_check_file(). (This also fixes a possible bug when skipping the
"lavf://" prefix.)
libavdevice now can be invoked by specifying demuxer and args as in:
mpv avdevice://demuxer:args
The args are passed as filename to libavformat. When using libavdevice
demuxers, their actual meaning is highly implementation specific. They
don't refer to actual filenames.
Note:
libavdevice is disabled by default. There is one problem: libavdevice
pulls in libavfilter, which in turn causes symbol clashes with mpv
internals. The problem is that libavfilter includes a mplayer filter
bridge, which is used to interface with a set of nearly unmodified
mplayer filters copied into libavfilter. This filter bridge uses the
same symbol names as mplayer/mpv's filter chain, which results in symbol
clashes at link-time.
This can be prevented by building ffmpeg with --disable-filter=mp, but
unfortunately this is not the default.
This means linking to libavdevice (which in turn forces linking with
libavfilter by default) must be disabled. We try doing this by compiling
a test file that defines one of the clashing symbols (vf_mpi_clear).
To enable libavdevice input, ffmpeg should be built with the options:
--disable-filter=mp
and mpv with:
--enable-libavdevice
Originally, I tried to auto-detect it. But the resulting complications
in configure did't seem worth the trouble.
2012-11-30 18:41:04 +01:00
$def_libavdevice
$def_libavfilter
2013-03-11 00:16:34 +01:00
$def_vf_lavfi
2013-05-23 15:11:57 +02:00
$def_af_lavfi
2001-02-24 21:28:24 +01:00
2013-07-12 18:33:39 +02:00
$def_dlopen
2004-06-26 11:54:02 +02:00
2002-01-12 22:07:17 +01:00
/* Audio output drivers */
2009-02-08 23:49:52 +01:00
$def_alsa
$def_coreaudio
$def_jack
$def_openal
$def_openal_h
$def_ossaudio
$def_ossaudio_devdsp
$def_ossaudio_devmixer
$def_pulse
2012-04-27 11:26:04 +02:00
$def_portaudio
2011-06-24 15:56:43 +02:00
$def_rsound
2013-09-28 18:01:12 +02:00
$def_sndio
2009-02-08 23:49:52 +01:00
$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_joystick
$def_lirc
$def_lircc
$def_pvr
$def_radio
$def_radio_capture
$def_radio_v4l2
$def_tv
$def_tv_v4l2
2013-11-09 02:15:12 +01:00
$def_libv4l2
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_enca
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_smb
2013-07-05 22:53:59 +02:00
$def_libquvi4
2013-06-27 18:21:07 +02:00
$def_libquvi9
2013-06-24 23:06:34 +02:00
$def_libguess
2008-08-29 18:20:35 +02:00
2012-03-31 01:13:38 +02:00
$def_lcms2
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-26 00:41:14 +02:00
$def_lua
2012-03-31 01:13:38 +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_caca
$def_corevideo
2012-04-03 08:13:12 +02:00
$def_cocoa
2009-02-08 23:49:52 +01:00
$def_direct3d
2012-12-28 08:07:14 +01:00
$def_sdl
$def_sdl2
2012-10-05 15:17:16 +02:00
$def_dsound
2013-07-20 19:13:39 +02:00
$def_wasapi
2012-08-25 19:49:01 +02:00
$def_dvb
$def_dvbin
2009-02-08 23:49:52 +01:00
$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
2013-02-28 19:55:02 +01:00
$def_gl_wayland
2009-02-08 23:49:52 +01:00
$def_jpeg
$def_v4l2
2009-02-16 21:58:13 +01:00
$def_vdpau
2013-07-16 13:28:28 +02:00
$def_vdpau_dec
$def_vdpau_dec_old
2013-11-05 22:06:48 +01:00
$def_vdpau_gl_x11
2013-08-14 15:47:18 +02:00
$def_vda
$def_vda_refcounting
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
2013-08-09 14:01:30 +02:00
$def_vaapi
2013-09-20 15:55:13 +02:00
$def_vaapi_vpp
2013-11-04 00:02:21 +01:00
$def_vaapi_glx
2013-07-16 13:28:28 +02:00
$def_vaapi_hwaccel
2009-02-08 23:49:52 +01:00
$def_vm
$def_x11
2013-02-28 19:55:02 +01:00
$def_wayland
2013-07-16 13:28:28 +02:00
$def_xext
2009-02-08 23:49:52 +01:00
$def_xf86keysym
$def_xinerama
$def_xss
$def_xv
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 */
2012-09-14 17:51:26 +02:00
$def_encoding
2013-07-16 13:28:28 +02:00
$def_libavresample
$def_libswresample
2013-05-13 00:38:35 +02:00
$def_avresample_has_set_channel_mapping
2002-11-15 00:49:05 +01:00
2008-12-02 17:40:44 +01:00
$def_fast_64bit
2009-02-08 23:49:52 +01:00
$def_pthreads
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
2012-04-19 16:05:50 +02:00
/* Use these registers in x86 inline asm. No proper detection yet. */
2008-10-04 14:39:16 +02:00
#define HAVE_EBP_AVAILABLE 1
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.
2013-07-16 13:28:28 +02:00
cmp -s "$TMPH" old_build/config.h || mv -f "$TMPH" old_build/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
2001-12-25 22:58:10 +01:00
Config direct.: $_confdir
2001-11-29 02:18:05 +01:00
Enabled optional drivers:
2010-05-09 13:20:15 +02:00
Input: $inputmodules
2012-08-25 19:57:08 +02:00
Codecs: libavcodecs $codecmodules
2010-05-09 13:20:15 +02:00
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.
2012-10-11 02:04:08 +02:00
Note: If you alter theses files (for instance CFLAGS) mpv may no longer
2002-08-04 00:48:41 +02:00
compile *** DO NOT REPORT BUGS if you tweak these files ***
2001-11-17 04:53:05 +01:00
2012-10-11 02:04:08 +02:00
'make' will now compile mpv 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.
Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
your CPU. Your binary will only crash if you try to run it on a
different system that has less features than yours.
This was the default, I think.
c) Runtime detection.
The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.
One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.
Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.
Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.
Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)
Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)
Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-29 17:20:57 +02:00
If you used one of these options and experience a compilation or
2011-10-25 06:05:47 +02:00
linking failure, make sure you have passed the necessary compiler/linker flags
to configure.
2002-01-07 13:17:21 +01:00
2013-07-16 13:28:28 +02:00
WARNING: The ./old-configure + make build system you are using is deprecated in
favour of waf and will be removed in a future version of mpv. Check the
README for instructions on how to build mpv with the new build system.
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
2012-10-11 02:04:08 +02:00
mpv compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
2005-07-10 19:01:49 +02:00
*** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
2012-10-11 02:04:08 +02:00
It is strongly recommended to let mpv choose the correct CFLAGS!
2005-07-10 19:01:49 +02:00
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"