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]
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]
2012-11-13 23:41:38 +01:00
--localedir=DIR directory for gettext locales [PREFIX/share/locale]
2001-10-23 20:32:55 +02:00
Optional features:
2012-09-14 17:51:26 +02:00
--disable-encoding disable encoding functionality [enable]
2001-11-17 10:57:54 +01:00
--enable-termcap use termcap database for key codes [autodetect]
2004-04-14 01:26:31 +02:00
--enable-termios use termios database for key codes [autodetect]
2006-11-06 01:09:07 +01:00
--disable-iconv disable iconv for encoding conversion [autodetect]
2001-11-17 12:26:26 +01:00
--enable-lirc enable LIRC (remote control) support [autodetect]
2003-05-30 20:23:55 +02:00
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
2002-09-09 21:23:06 +02:00
--enable-joystick enable joystick support [disable]
2007-08-14 16:29:22 +02:00
--enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
2008-05-18 13:53:00 +02:00
--enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
2006-11-06 01:09:07 +01:00
--disable-vm disable X video mode extensions [autodetect]
--disable-xf86keysym disable support for multimedia keys [autodetect]
--enable-radio enable radio interface [disable]
--enable-radio-capture enable radio capture (through PCI/line-in) [disable]
--disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
--disable-tv disable TV interface (TV/DVB grabbers) [enable]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
2010-07-17 15:14:53 +02:00
--disable-networking disable networking [enable]
2008-08-29 22:05:08 +02:00
--enable-winsock2_h enable winsock2_h [autodetect]
2006-11-06 01:09:07 +01:00
--enable-smb enable Samba (SMB) input [autodetect]
2012-03-02 20:24:34 +01:00
--enable-libquvi enable libquvi [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]
2006-12-04 21:20:32 +01:00
--disable-cddb disable cddb [autodetect]
2006-11-06 01:09:07 +01:00
--disable-enca disable ENCA charset oracle library [autodetect]
2008-08-03 18:16:10 +02:00
--enable-macosx-finder enable Mac OS X Finder invocation parameter
parsing [disabled]
2006-11-06 01:09:07 +01:00
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
--disable-inet6 disable IPv6 support [autodetect]
--disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
--disable-ftp disable FTP support [enabled]
--disable-vstream disable TiVo vstream client support [autodetect]
--disable-pthreads disable Posix threads support [autodetect]
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]
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 enable libavdevice demuxers [disabled]
--enable-libavfilter enable libavfilter [disabled] [unused]
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-mng enable MNG input support [autodetect]
--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
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]
2012-12-28 08:07:14 +01:00
--enable-sdl enable SDL audio output [autodetect]
--enable-sdl2 enable SDL 2.0+ audio and video output [autodetect]
2006-11-06 01:09:07 +01:00
--enable-xv enable Xv video output [autodetect]
2009-02-16 21:58:13 +01:00
--enable-vdpau enable VDPAU acceleration [autodetect]
2006-11-06 01:09:07 +01:00
--enable-vm enable XF86VidMode support [autodetect]
--enable-xinerama enable Xinerama support [autodetect]
--enable-x11 enable X11 video output [autodetect]
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]
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]
2012-10-05 15:17:16 +02:00
--disable-dsound disable DirectSound 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
2012-11-13 23:41:38 +01:00
Localization options:
--enable-gettext enable gettext() usage [disable]
2009-06-14 16:55:01 +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]
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
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
2008-11-18 13:23:42 +01:00
_direct3d=auto
2012-12-28 08:07:14 +01:00
_sdl=auto
_sdl2=auto
2012-10-05 15:17:16 +02:00
_dsound=auto
2008-11-30 14:22:34 +01:00
_mng=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
_alsa=auto
_select=yes
_radio=no
_radio_capture=no
_radio_v4l2=auto
_tv=yes
_tv_v4l2=auto
_pvr=auto
2010-07-17 15:14:53 +02:00
networking=yes
2008-08-29 22:05:08 +02:00
_winsock2_h=auto
2008-08-03 17:57:18 +02:00
_smb=auto
2012-03-02 20:24:34 +01:00
_libquvi=auto
2007-01-31 00:18:51 +01:00
_joystick=no
_lirc=auto
_lircc=auto
2007-08-14 16:29:22 +02:00
_apple_remote=auto
2008-05-18 13:53:00 +02:00
_apple_ir=auto
2007-01-31 00:18:51 +01:00
_termcap=auto
_termios=auto
_shm=auto
2012-11-13 23:41:38 +01:00
_gettext=no
2012-03-21 00:57:58 +01:00
_cdda=auto
2007-01-31 00:18:51 +01:00
_cddb=auto
2009-04-25 19:48:48 +02:00
_coreaudio=auto
_corevideo=auto
2011-10-15 18:44:00 +02:00
_cocoa=auto
2008-08-03 18:16:10 +02:00
_macosx_finder=no
2007-01-31 00:18:51 +01:00
_macosx_bundle=auto
_enca=auto
_inet6=auto
_gethostbyname2=auto
2010-09-22 00:26:44 +02:00
_ftp=auto
2007-01-31 00:18:51 +01:00
_vstream=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
2012-02-27 17:18:49 +01:00
libpostproc=auto
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=no
libavdevice=no
2007-02-27 18:13:17 +01:00
_stream_cache=yes
2009-02-10 16:34:44 +01:00
_priority=no
2009-02-04 19:22:28 +01:00
def_dos_paths="#define HAVE_DOS_PATHS 0"
2009-02-08 23:49:52 +01:00
def_stream_cache="#define CONFIG_STREAM_CACHE 1"
2009-02-10 16:34:44 +01:00
def_priority="#undef CONFIG_PRIORITY"
2009-02-08 23:49:52 +01:00
def_pthread_cache="#undef PTHREAD_CACHE"
2011-01-26 20:00:17 +01:00
need_shmem=yes
2012-11-14 00:43:55 +01:00
_build_man=auto
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
;;
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
;;
2010-03-08 21:48:50 +01:00
--localedir=*)
_localedir=$(echo $ac_option | cut -d '=' -f 2)
;;
2007-01-31 00:59:39 +01:00
--with-install=*)
2009-04-15 22:00:26 +02:00
_install=$(echo $ac_option | cut -d '=' -f 2 )
2007-01-31 00:59:39 +01:00
;;
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=
;;
2012-11-13 23:41:38 +01:00
--enable-gettext) _gettext=yes ;;
--disable-gettext) _gettext=no ;;
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 ;;
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 ;;
2010-01-04 13:24:07 +01:00
--enable-mng) _mng=yes ;;
--disable-mng) _mng=no ;;
--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 ;;
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 ;;
--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 ;;
2010-07-17 15:14:53 +02:00
--enable-networking) networking=yes ;;
--disable-networking) networking=no ;;
2010-01-04 13:24:07 +01:00
--enable-winsock2_h) _winsock2_h=yes ;;
--disable-winsock2_h) _winsock2_h=no ;;
--enable-smb) _smb=yes ;;
--disable-smb) _smb=no ;;
2012-03-02 20:24:34 +01:00
--enable-libquvi) _libquvi=yes ;;
--disable-libquvi) _libquvi=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 ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
--enable-apple-remote) _apple_remote=yes ;;
--disable-apple-remote) _apple_remote=no ;;
2008-05-18 13:53:00 +02:00
--enable-apple-ir) _apple_ir=yes ;;
--disable-apple-ir) _apple_ir=no ;;
2010-01-04 13:24:07 +01:00
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
2007-01-31 00:18:51 +01:00
--disable-termios) _termios=no ;;
2010-01-04 13:24:07 +01:00
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
--enable-cddb) _cddb=yes ;;
--disable-cddb) _cddb=no ;;
2007-01-31 00:18:51 +01:00
--enable-ftp) _ftp=yes ;;
--disable-ftp) _ftp=no ;;
--enable-vstream) _vstream=yes ;;
--disable-vstream) _vstream=no ;;
--enable-pthreads) _pthreads=yes ;;
--disable-pthreads) _pthreads=no ;;
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 ;;
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
2010-01-04 13:24:07 +01:00
--enable-inet6) _inet6=yes ;;
--disable-inet6) _inet6=no ;;
2007-01-31 00:18:51 +01:00
2010-01-04 13:24:07 +01:00
--enable-gethostbyname2) _gethostbyname2=yes ;;
--disable-gethostbyname2) _gethostbyname2=no ;;
2007-01-31 00:18:51 +01:00
2009-04-25 19:48:48 +02:00
--enable-coreaudio) _coreaudio=yes ;;
--disable-coreaudio) _coreaudio=no ;;
--enable-corevideo) _corevideo=yes ;;
--disable-corevideo) _corevideo=no ;;
2011-10-15 18:44:00 +02:00
--enable-cocoa) _cocoa=yes ;;
--disable-cocoa) _cocoa=no ;;
2008-08-03 18:16:10 +02:00
--enable-macosx-finder) _macosx_finder=yes ;;
--disable-macosx-finder) _macosx_finder=no ;;
2010-01-04 13:24:07 +01:00
--enable-macosx-bundle) _macosx_bundle=yes ;;
--disable-macosx-bundle) _macosx_bundle=no ;;
2007-01-31 00:18:51 +01:00
2012-11-14 00:43:55 +01:00
--enable-manpage) _build_man=yes ;;
--disable-manpage) _build_man=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"
2012-10-11 02:04:08 +02:00
test -z "$_confdir" && _confdir="$_prefix/etc/mpv"
2010-03-08 21:48:50 +01:00
test -z "$_localedir" && _localedir="$_prefix/share/locale"
2007-01-31 00:18:51 +01:00
2012-01-31 08:29:53 +01:00
for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
test "$tmpdir" && break
done
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
2009-03-25 20:48:05 +01:00
extra_cflags="-I. $extra_cflags"
2008-04-08 20:03:14 +02:00
_timer=timer-linux.c
_getch=getch2.c
2008-03-27 03:04:03 +01:00
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
2007-01-28 23:31:53 +01:00
if win32 ; then
_exesuf=".exe"
2012-09-30 14:32:55 +02:00
extra_cflags="$extra_cflags -fno-common -DWINVER=0x0500"
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"
2009-02-10 16:34:44 +01:00
def_priority="#define CONFIG_PRIORITY 1"
2007-01-28 23:31:53 +01:00
fi
2007-02-27 18:13:17 +01:00
if mingw32 ; then
2008-04-08 20:03:14 +02:00
_getch=getch2-win.c
2011-01-26 20:00:17 +01:00
need_shmem=no
2012-01-31 08:31:04 +01:00
extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
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"
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'
2010-03-17 15:09:09 +01:00
arch_all='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
2010-03-17 14:20:06 +01:00
subarch_all='X86_32 X86_64 PPC64'
2007-01-31 00:18:51 +01:00
case "$host_arch" in
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
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'
iproc=486
proc=i486
2003-12-25 13:05:28 +01:00
;;
2007-01-31 00:18:51 +01:00
ia64)
2010-03-17 14:41:54 +01:00
arch='ia64'
2008-12-02 17:40:44 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
2007-01-31 00:18:51 +01:00
iproc='ia64'
2006-11-25 18:58:33 +01:00
;;
2007-01-31 00:18:51 +01:00
x86_64|amd64)
2010-03-17 14:41:54 +01:00
arch='x86'
subarch='x86_64'
2008-12-02 17:40:44 +01:00
def_fast_64bit='#define HAVE_FAST_64BIT 1'
2007-01-31 00:18:51 +01:00
iproc='x86_64'
;;
2001-08-14 16:34:27 +02:00
2008-10-04 11:38:10 +02:00
sparc|sparc64)
2010-03-17 14:41:54 +01:00
arch='sparc'
2007-01-31 00:18:51 +01:00
iproc='sparc'
;;
2010-01-17 00:22:43 +01:00
arm*)
2010-03-17 14:41:54 +01:00
arch='arm'
2007-01-31 00:18:51 +01:00
iproc='arm'
2007-07-26 10:21:42 +02:00
;;
2009-02-16 18:02:16 +01:00
avr32)
2010-03-17 14:41:54 +01:00
arch='avr32'
2009-02-16 18:02:16 +01:00
iproc='avr32'
;;
2009-01-15 16:41:29 +01:00
sh|sh4)
2010-03-17 14:41:54 +01:00
arch='sh4'
2009-01-15 16:41:29 +01:00
iproc='sh4'
2007-01-31 00:18:51 +01:00
;;
2001-11-19 01:38:41 +01:00
2008-08-05 00:38:57 +02:00
ppc|ppc64|powerpc|powerpc64)
2010-03-17 14:41:54 +01:00
arch='ppc'
2007-01-31 00:18:51 +01:00
iproc='ppc'
;;
2009-02-21 23:08:50 +01:00
alpha*)
2010-03-17 14:41:54 +01:00
arch='alpha'
2007-01-31 00:18:51 +01:00
iproc='alpha'
;;
2010-10-21 14:58:21 +02:00
mips*)
2010-03-17 15:09:09 +01:00
arch='mips'
iproc='mips'
2007-01-31 00:18:51 +01:00
;;
hppa)
2010-03-17 14:41:54 +01:00
arch='pa_risc'
2007-01-31 00:18:51 +01:00
iproc='PA-RISC'
;;
s390)
2010-03-17 14:41:54 +01:00
arch='s390'
2007-01-31 00:18:51 +01:00
iproc='390'
;;
s390x)
2010-03-17 14:41:54 +01:00
arch='s390x'
2007-01-31 00:18:51 +01:00
iproc='390x'
;;
2004-05-08 19:52:25 +02:00
2007-01-31 00:18:51 +01:00
vax)
2010-03-17 14:41:54 +01:00
arch='vax'
2007-01-31 00:18:51 +01:00
iproc='vax'
;;
2003-03-26 12:35:13 +01:00
2007-12-11 23:37:36 +01:00
xtensa)
2010-03-17 14:41:54 +01:00
arch='xtensa'
2007-12-11 23:37:36 +01:00
iproc='xtensa'
;;
2007-01-31 00:18:51 +01:00
generic)
2010-03-17 14:41:54 +01:00
arch='generic'
2007-01-31 00:18:51 +01:00
;;
2003-03-26 12:35:13 +01:00
2007-01-31 00:18:51 +01:00
*)
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
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
2012-11-15 14:34:34 +01:00
CFLAGS="$_opt $_debug $_pipe -fomit-frame-pointer"
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"
2012-11-12 23:24:01 +01:00
WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
2011-07-07 21:51:23 +02:00
ERRORFLAGS="-Werror=implicit-function-declaration"
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
2012-11-15 14:34:34 +01:00
CFLAGS="$_opt $_debug $_pipe -ffast-math -fomit-frame-pointer"
2010-09-12 01:30:52 +02:00
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2011-07-06 09:53:41 +02:00
ERRORFLAGS="-Werror-implicit-function-declaration"
2009-03-25 20:48:05 +01:00
extra_ldflags="$extra_ldflags -ffast-math"
2007-01-31 00:18:51 +01:00
fi
else
2010-07-02 00:19:57 +02:00
warn_cflags=yes
2007-01-31 00:18:51 +01:00
fi
2009-04-10 20:29:01 +02:00
if test "$cc_vendor" = "gnu" ; then
2010-09-12 01:30:52 +02:00
cflag_check -Wundef && WARNFLAGS="-Wundef $WARNFLAGS"
# -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
# that's the only variable specific to C now, and this option is not valid
# for C++.
cflag_check -std=gnu99 && WARN_CFLAGS="-std=gnu99 $WARN_CFLAGS"
cflag_check -Wno-pointer-sign && WARN_CFLAGS="-Wno-pointer-sign $WARN_CFLAGS"
cflag_check -Wdisabled-optimization && WARN_CFLAGS="-Wdisabled-optimization $WARN_CFLAGS"
cflag_check -Wmissing-prototypes && WARN_CFLAGS="-Wmissing-prototypes $WARN_CFLAGS"
cflag_check -Wstrict-prototypes && WARN_CFLAGS="-Wstrict-prototypes $WARN_CFLAGS"
2009-04-10 20:29:01 +02:00
else
CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
fi
2010-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
2012-11-13 23:41:38 +01:00
echocheck "gettext support"
if test "$_gettext" = yes; then
def_gettext="#define CONFIG_GETTEXT 1"
2010-03-08 21:48:50 +01:00
else
2012-11-13 23:41:38 +01:00
def_gettext="#undef CONFIG_GETTEXT"
2010-03-08 21:48:50 +01:00
fi
2012-11-13 23:41:38 +01:00
echores "$_gettext"
2004-08-05 02:14:16 +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
2009-02-08 23:49:52 +01:00
def_nanosleep='#undef HAVE_NANOSLEEP'
2001-11-23 19:25:09 +01:00
fi
echores "$_nanosleep"
2001-11-17 04:53:05 +01:00
echocheck "socklib"
# for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <netdb.h>
2005-10-15 12:46:24 +02:00
#include <sys/socket.h>
2010-09-14 12:05:46 +02:00
int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2006-10-11 16:06:38 +02:00
_socklib=no
2006-10-11 16:09:30 +02:00
for _ld_tmp in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2006-10-11 16:06:38 +02:00
cc_check $_ld_tmp && _ld_sock="$_ld_tmp" && _socklib=yes && break
2005-10-03 21:36:32 +02:00
done
2009-12-09 18:55:34 +01:00
test $_socklib = yes && test $_winsock2_h = auto && _winsock2_h=no
if test $_winsock2_h = auto ; then
2008-08-29 22:05:08 +02:00
_winsock2_h=no
2010-09-27 02:02:59 +02:00
statement_check winsock2.h 'gethostbyname(0)' -lws2_32 && _ld_sock="-lws2_32" && _winsock2_h=yes
2003-06-11 18:48:09 +02:00
fi
2010-05-09 13:20:15 +02:00
test "$_ld_sock" && res_comment="using $_ld_sock"
2006-10-11 16:06:38 +02:00
echores "$_socklib"
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
2008-08-29 22:05:08 +02:00
if test $_winsock2_h = yes ; then
2003-06-11 18:48:09 +02:00
_ld_sock="-lws2_32"
2008-10-15 01:00:04 +02:00
def_winsock2_h='#define HAVE_WINSOCK2_H 1'
2003-06-11 18:48:09 +02:00
else
2009-02-01 14:42:27 +01:00
def_winsock2_h='#define HAVE_WINSOCK2_H 0'
2003-06-11 18:48:09 +02:00
fi
2001-12-30 20:38:28 +01:00
echocheck "inet_pton()"
2009-02-01 15:38:28 +01:00
def_inet_pton='#define HAVE_INET_PTON 0'
inet_pton=no
2009-02-01 15:57:01 +01:00
for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do
2010-09-27 02:02:59 +02:00
statement_check arpa/inet.h 'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton=yes && break
2009-02-01 15:57:01 +01:00
done
if test $inet_pton = yes ; then
2010-05-09 13:20:15 +02:00
test "$_ld_tmp" && res_comment="using $_ld_tmp"
2009-02-01 15:38:28 +01:00
def_inet_pton='#define HAVE_INET_PTON 1'
fi
echores "$inet_pton"
2008-05-03 22:14:50 +02:00
2009-02-01 15:57:01 +01:00
2009-02-01 15:39:33 +01:00
echocheck "inet_aton()"
2009-02-01 15:38:28 +01:00
def_inet_aton='#define HAVE_INET_ATON 0'
inet_aton=no
2009-02-01 15:57:01 +01:00
for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do
2010-09-27 02:02:59 +02:00
statement_check arpa/inet.h 'inet_aton(0, 0)' $_ld_tmp && inet_aton=yes && break
2009-02-01 15:57:01 +01:00
done
if test $inet_aton = yes ; then
2010-05-09 13:20:15 +02:00
test "$_ld_tmp" && res_comment="using $_ld_tmp"
2009-02-01 15:39:33 +01:00
def_inet_aton='#define HAVE_INET_ATON 1'
2002-08-29 09:07:12 +02:00
fi
2009-02-01 15:38:28 +01:00
echores "$inet_aton"
2002-03-15 21:48:42 +01:00
2008-07-30 11:42:37 +02:00
echocheck "socklen_t"
2008-08-01 07:35:30 +02:00
_socklen_t=no
2008-11-18 10:41:31 +01:00
for header in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
2010-09-27 02:46:28 +02:00
statement_check $header 'socklen_t v = 0' && _socklen_t=yes && break
2008-07-30 20:16:57 +02:00
done
2008-07-30 11:42:37 +02:00
if test "$_socklen_t" = yes ; then
2009-02-08 23:49:52 +01:00
def_socklen_t='#define HAVE_SOCKLEN_T 1'
2008-07-30 11:42:37 +02:00
else
2009-02-08 23:49:52 +01:00
def_socklen_t='#define HAVE_SOCKLEN_T 0'
2008-07-30 11:42:37 +02:00
fi
echores "$_socklen_t"
2008-08-29 18:20:35 +02:00
echocheck "closesocket()"
_closesocket=no
2010-09-27 02:02:59 +02:00
statement_check winsock2.h 'closesocket(~0)' $_ld_sock && _closesocket=yes
2008-08-29 18:20:35 +02:00
if test "$_closesocket" = yes ; then
2009-02-08 23:49:52 +01:00
def_closesocket='#define HAVE_CLOSESOCKET 1'
2008-08-29 18:20:35 +02:00
else
2009-02-08 23:49:52 +01:00
def_closesocket='#define HAVE_CLOSESOCKET 0'
2008-08-29 18:20:35 +02:00
fi
echores "$_closesocket"
2010-07-17 15:14:53 +02:00
echocheck "networking"
2009-02-01 15:38:28 +01:00
test $_winsock2_h = no && test $inet_pton = no &&
2010-07-17 15:14:53 +02:00
test $inet_aton = no && networking=no
if test "$networking" = yes ; then
2009-02-08 23:49:52 +01:00
def_network='#define CONFIG_NETWORK 1'
2010-07-17 15:14:53 +02:00
def_networking='#define CONFIG_NETWORKING 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer $_ld_sock"
2010-07-17 15:14:53 +02:00
inputmodules="networking $inputmodules"
2007-01-30 19:29:02 +01:00
else
2010-07-17 15:14:53 +02:00
noinputmodules="networking $noinputmodules"
2010-10-05 11:49:17 +02:00
def_network='#define CONFIG_NETWORK 0'
2010-07-17 15:14:53 +02:00
def_networking='#undef CONFIG_NETWORKING'
2007-01-30 19:29:02 +01:00
fi
2010-07-17 15:14:53 +02:00
echores "$networking"
2002-11-11 19:25:02 +01:00
2009-01-11 13:58:06 +01:00
echocheck "inet6"
if test "$_inet6" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
2010-12-19 23:02:52 +01:00
#if !defined(_WIN32)
2009-01-11 13:58:06 +01:00
#include <sys/socket.h>
#include <netinet/in.h>
#else
#include <ws2tcpip.h>
#endif
int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
EOF
_inet6=no
if cc_check $_ld_sock ; then
_inet6=yes
fi
fi
if test "$_inet6" = yes ; then
2009-02-08 23:49:52 +01:00
def_inet6='#define HAVE_AF_INET6 1'
2009-01-11 13:58:06 +01:00
else
2009-02-08 23:49:52 +01:00
def_inet6='#undef HAVE_AF_INET6'
2009-01-11 13:58:06 +01:00
fi
echores "$_inet6"
echocheck "gethostbyname2"
if test "$_gethostbyname2" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main(void) { gethostbyname2("", AF_INET); return 0; }
EOF
_gethostbyname2=no
if cc_check ; then
_gethostbyname2=yes
fi
fi
if test "$_gethostbyname2" = yes ; then
2009-02-08 23:49:52 +01:00
def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1'
2009-01-11 13:58:06 +01:00
else
2009-02-08 23:49:52 +01:00
def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2'
2009-01-11 13:58:06 +01:00
fi
echores "$_gethostbyname2"
2001-11-17 04:53:05 +01:00
echocheck "mman.h"
_mman=no
2010-09-27 02:02:59 +02:00
statement_check sys/mman.h 'mmap(0, 0, 0, 0, 0, 0)' && _mman=yes
2001-11-17 04:53:05 +01:00
if test "$_mman" = yes ; then
2008-10-15 01:00:04 +02:00
def_mman_h='#define HAVE_SYS_MMAN_H 1'
2001-11-17 04:53:05 +01:00
else
2008-10-15 01:00:04 +02:00
def_mman_h='#undef HAVE_SYS_MMAN_H'
2001-11-17 04:53:05 +01:00
fi
echores "$_mman"
2001-07-12 17:35:52 +02:00
2005-01-21 22:32:15 +01:00
_mman_has_map_failed=no
2010-09-27 02:46:28 +02:00
statement_check sys/mman.h 'void *p = MAP_FAILED' && _mman_has_map_failed=yes
2005-01-21 22:32:15 +01:00
if test "$_mman_has_map_failed" = yes ; then
2009-02-08 23:49:52 +01:00
def_mman_has_map_failed=''
2005-01-21 22:32:15 +01:00
else
2009-02-08 23:49:52 +01:00
def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)'
2005-01-21 22:32:15 +01:00
fi
2001-11-18 18:45:23 +01:00
echocheck "dynamic loader"
2001-11-17 04:53:05 +01:00
_dl=no
2010-09-14 12:05:46 +02:00
for _ld_tmp in "" "-ldl"; do
2010-09-27 02:02:59 +02:00
statement_check dlfcn.h 'dlopen("", 0)' $_ld_tmp && _ld_dl="$_ld_tmp" && _dl=yes && break
2005-10-03 21:36:32 +02:00
done
2001-11-17 04:53:05 +01:00
if test "$_dl" = yes ; then
2009-02-08 23:49:52 +01:00
def_dl='#define HAVE_LIBDL 1'
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_dl='#undef HAVE_LIBDL'
2001-11-17 04:53:05 +01:00
fi
echores "$_dl"
2001-07-12 17:35:52 +02:00
2001-11-19 16:54:43 +01:00
2009-03-15 10:17:42 +01:00
def_threads='#define HAVE_THREADS 0'
2001-11-20 16:11:49 +01:00
2001-11-18 18:45:23 +01:00
echocheck "pthread"
2009-04-10 19:39:44 +02:00
if linux ; then
THREAD_CFLAGS=-D_REENTRANT
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'
def_threads='#define HAVE_THREADS 1'
2009-04-10 19:39:44 +02:00
extra_cflags="$extra_cflags $THREAD_CFLAGS"
2004-03-27 21:19:57 +01:00
else
2013-01-13 16:20:59 +01:00
res_comment="v4l2 disabled"
2009-02-08 23:49:52 +01:00
def_pthreads='#undef HAVE_PTHREADS'
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
2008-11-28 18:04:36 +01:00
if cygwin ; then
if test "$_pthreads" = yes ; then
2009-02-08 23:49:52 +01:00
def_pthread_cache="#define PTHREAD_CACHE 1"
2008-11-28 18:04:36 +01:00
else
_stream_cache=no
2009-02-08 23:49:52 +01:00
def_stream_cache="#undef CONFIG_STREAM_CACHE"
2008-11-28 18:04:36 +01:00
fi
fi
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
2009-02-08 23:49:52 +01:00
def_iconv='#define CONFIG_ICONV 1'
2005-07-30 03:07:27 +02:00
else
2009-02-08 23:49:52 +01:00
def_iconv='#undef CONFIG_ICONV'
2005-07-30 03:07:27 +02:00
fi
echores "$_iconv"
2002-04-28 00:42:27 +02:00
echocheck "soundcard.h"
2007-07-11 12:43:25 +02:00
_soundcard_h=no
2008-10-15 01:00:04 +02:00
def_soundcard_h='#undef HAVE_SOUNDCARD_H'
def_sys_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H'
2007-07-11 12:43:25 +02:00
for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do
2010-06-24 10:03:41 +02:00
header_check $_soundcard_header && _soundcard_h=yes &&
res_comment="$_soundcard_header" && break
2007-07-11 12:43:25 +02:00
done
if test "$_soundcard_h" = yes ; then
if test $_soundcard_header = "sys/soundcard.h"; then
2008-10-15 01:00:04 +02:00
def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1'
2007-07-11 12:43:25 +02:00
else
2008-10-15 01:00:04 +02:00
def_soundcard_h='#define HAVE_SOUNDCARD_H 1'
2007-07-11 12:43:25 +02:00
fi
2002-04-28 00:42:27 +02:00
fi
2007-07-11 12:43:25 +02:00
echores "$_soundcard_h"
2001-11-17 04:53:05 +01:00
2002-11-11 19:25:02 +01:00
2011-06-29 06:19:49 +02:00
echocheck "sys/videoio.h"
sys_videoio_h=no
def_sys_videoio_h='#undef HAVE_SYS_VIDEOIO_H'
header_check sys/videoio.h && sys_videoio_h=yes &&
def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1'
echores "$sys_videoio_h"
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
2009-02-08 23:49:52 +01:00
def_termcap='#undef HAVE_TERMCAP'
2001-11-17 04:53:05 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_termcap"
2001-11-14 20:02:39 +01:00
2001-06-09 01:30:09 +02:00
2001-11-19 17:42:01 +01:00
echocheck "termios"
2009-02-08 23:49:52 +01:00
def_termios='#undef HAVE_TERMIOS'
2008-10-15 01:00:04 +02:00
def_termios_h='#undef HAVE_TERMIOS_H'
def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
2001-11-19 17:42:01 +01:00
if test "$_termios" = auto ; then
2007-07-13 19:54:45 +02:00
_termios=no
2010-05-14 17:34:30 +02:00
for _termios_header in "termios.h" "sys/termios.h"; do
2010-06-24 10:03:41 +02:00
header_check $_termios_header && _termios=yes &&
res_comment="using $_termios_header" && break
2007-07-13 19:54:45 +02:00
done
2001-12-03 16:22:03 +01:00
fi
2001-11-19 17:42:01 +01:00
if test "$_termios" = yes ; then
2009-02-08 23:49:52 +01:00
def_termios='#define HAVE_TERMIOS 1'
2007-07-13 19:54:45 +02:00
if test "$_termios_header" = "termios.h" ; then
2008-10-15 01:00:04 +02:00
def_termios_h='#define HAVE_TERMIOS_H 1'
2007-07-13 19:54:45 +02:00
else
2008-10-15 01:00:04 +02:00
def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1'
2001-12-03 16:22:03 +01:00
fi
2001-11-19 17:42:01 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_termios"
2001-11-19 17:42:01 +01:00
2001-11-19 16:54:43 +01:00
echocheck "shm"
2001-11-19 17:06:33 +01:00
if test "$_shm" = auto ; then
2001-11-27 18:58:29 +01:00
_shm=no
2011-01-05 16:59:43 +01:00
statement_check sys/shm.h 'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm=yes
2001-11-19 17:06:33 +01:00
fi
2001-11-19 16:54:43 +01:00
if test "$_shm" = yes ; then
2009-02-08 23:49:52 +01:00
def_shm='#define HAVE_SHM 1'
2001-11-19 16:54:43 +01:00
else
2009-02-08 23:49:52 +01:00
def_shm='#undef HAVE_SHM'
2001-11-19 16:54:43 +01:00
fi
echores "$_shm"
2002-03-15 21:48:42 +01:00
2006-05-12 11:13:05 +02:00
echocheck "POSIX select()"
2003-04-04 21:15:24 +02:00
cat > $TMPC << EOF
2003-04-11 18:33:29 +02:00
#include <stdio.h>
#include <stdlib.h>
2003-04-04 21:15:24 +02:00
#include <sys/types.h>
2003-04-11 18:33:29 +02:00
#include <string.h>
#include <sys/time.h>
2003-04-04 21:15:24 +02:00
#include <unistd.h>
2010-09-16 20:58:21 +02:00
int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
2003-04-04 21:15:24 +02:00
EOF
_posix_select=no
2009-02-08 23:49:52 +01:00
def_posix_select='#undef HAVE_POSIX_SELECT'
2012-04-06 15:58:39 +02:00
cc_check && _posix_select=yes &&
2011-01-02 12:49:48 +01:00
def_posix_select='#define HAVE_POSIX_SELECT 1'
2003-04-04 21:15:24 +02:00
echores "$_posix_select"
2009-01-11 13:58:06 +01:00
echocheck "audio select()"
if test "$_select" = no ; then
2009-02-08 23:49:52 +01:00
def_select='#undef HAVE_AUDIO_SELECT'
2009-01-11 13:58:06 +01:00
elif test "$_select" = yes ; then
2009-02-08 23:49:52 +01:00
def_select='#define HAVE_AUDIO_SELECT 1'
2009-01-11 13:58:06 +01:00
fi
echores "$_select"
2003-04-04 21:15:24 +02:00
echocheck "glob()"
_glob=no
2010-09-27 02:02:59 +02:00
statement_check glob.h 'glob("filename", 0, 0, 0)' && _glob=yes
2011-06-11 18:40:10 +02:00
need_glob=no
2003-04-04 21:15:24 +02:00
if test "$_glob" = yes ; then
2009-02-08 23:49:52 +01:00
def_glob='#define HAVE_GLOB 1'
2003-04-04 21:15:24 +02:00
else
2009-02-08 23:49:52 +01:00
def_glob='#undef HAVE_GLOB'
2011-06-11 18:40:10 +02:00
# HACK! need_glob currently enables compilation of a
# win32-specific glob()-replacement.
# Other OS neither need it nor can they use it (mf:// is disabled for them).
win32 && need_glob=yes
2003-04-04 21:15:24 +02:00
fi
echores "$_glob"
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
2008-10-15 01:00:04 +02:00
def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H'
2002-08-21 23:31:20 +02:00
fi
echores "$_sys_sysinfo"
2001-10-25 13:46:50 +02:00
2006-06-18 13:21:23 +02:00
if darwin; then
2004-11-10 17:43:40 +01:00
echocheck "Mac OS X Finder Support"
2009-05-05 10:46:37 +02:00
def_macosx_finder='#undef CONFIG_MACOSX_FINDER'
2009-05-07 23:34:56 +02:00
if test "$_macosx_finder" = yes ; then
2009-02-08 23:49:52 +01:00
def_macosx_finder='#define CONFIG_MACOSX_FINDER 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -framework Cocoa"
2008-05-03 22:14:50 +02:00
fi
2008-08-03 18:16:10 +02:00
echores "$_macosx_finder"
2003-02-19 18:26:59 +01:00
2005-04-13 13:46:35 +02:00
echocheck "Mac OS X Bundle file locations"
2009-05-05 10:46:37 +02:00
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
test "$_macosx_bundle" = auto && _macosx_bundle=$_macosx_finder
2009-05-07 23:34:56 +02:00
if test "$_macosx_bundle" = yes ; then
2013-01-16 00:31:46 +01:00
extra_ldflags="$extra_ldflags -headerpad_max_install_names"
2009-02-08 23:49:52 +01:00
def_macosx_bundle='#define CONFIG_MACOSX_BUNDLE 1'
2008-05-03 22:14:50 +02:00
fi
2005-04-13 13:46:35 +02:00
echores "$_macosx_bundle"
2007-08-14 16:29:22 +02:00
echocheck "Apple Remote"
if test "$_apple_remote" = auto ; then
_apple_remote=no
cat > $TMPC <<EOF
#include <stdio.h>
#include <IOKit/IOCFPlugIn.h>
2008-05-03 22:07:04 +02:00
int main(void) {
2007-08-14 16:29:22 +02:00
io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
CFMutableDictionaryRef hidMatchDictionary;
IOReturn ioReturnValue;
// Set up a matching dictionary to search the I/O Registry by class.
// name for all HID class devices
hidMatchDictionary = IOServiceMatching("AppleIRController");
// Now search I/O Registry for matching devices.
ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
hidMatchDictionary, &hidObjectIterator);
// If search is unsuccessful, return nonzero.
if (ioReturnValue != kIOReturnSuccess ||
!IOIteratorIsValid(hidObjectIterator)) {
return 1;
}
return 0;
}
EOF
2010-09-12 02:11:26 +02:00
cc_check -framework IOKit && _apple_remote=yes
2007-08-14 16:29:22 +02:00
fi
if test "$_apple_remote" = yes ; then
2009-02-08 23:49:52 +01:00
def_apple_remote='#define CONFIG_APPLE_REMOTE 1'
2009-05-08 15:58:42 +02:00
libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa"
2007-08-14 16:29:22 +02:00
else
2009-02-08 23:49:52 +01:00
def_apple_remote='#undef CONFIG_APPLE_REMOTE'
2007-08-14 16:29:22 +02:00
fi
echores "$_apple_remote"
2006-06-18 13:21:23 +02:00
fi #if darwin
2008-05-18 13:53:00 +02:00
if linux; then
echocheck "Apple IR"
if test "$_apple_ir" = auto ; then
_apple_ir=no
2011-01-05 16:59:43 +01:00
statement_check linux/input.h 'struct input_event ev; struct input_id id' && _apple_ir=yes
2008-05-18 13:53:00 +02:00
fi
if test "$_apple_ir" = yes ; then
2009-02-08 23:49:52 +01:00
def_apple_ir='#define CONFIG_APPLE_IR 1'
2008-05-18 13:53:00 +02:00
else
2009-02-08 23:49:52 +01:00
def_apple_ir='#undef CONFIG_APPLE_IR'
2008-05-18 13:53:00 +02:00
fi
echores "$_apple_ir"
fi #if linux
2006-06-18 13:21:23 +02:00
2006-10-31 10:25:40 +01:00
echocheck "pkg-config"
2009-04-15 22:00:26 +02:00
if $($_pkg_config --version > /dev/null 2>&1); then
2007-07-20 23:57:59 +02:00
if test "$_ld_static"; then
_pkg_config="$_pkg_config --static"
fi
2006-10-31 10:25:40 +01:00
echores "yes"
else
_pkg_config=false
echores "no"
fi
2003-03-21 17:06:11 +01:00
echocheck "Samba support (libsmbclient)"
2008-08-03 17:57:18 +02:00
if test "$_smb" = yes; then
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lsmbclient"
2003-11-16 10:12:03 +01:00
fi
2008-08-03 17:57:18 +02:00
if test "$_smb" = auto; then
2010-09-14 12:05:46 +02:00
_smb=no
2005-10-03 21:36:32 +02:00
for _ld_tmp in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
2010-09-27 02:02:59 +02:00
statement_check libsmbclient.h 'smbc_opendir("smb://")' $_ld_tmp &&
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer $_ld_tmp" && _smb=yes && break
2005-10-03 21:36:32 +02:00
done
2003-03-21 17:06:11 +01:00
fi
2008-08-03 17:57:18 +02:00
if test "$_smb" = yes; then
2009-10-28 14:55:18 +01:00
def_smb="#define CONFIG_LIBSMBCLIENT 1"
2010-05-09 13:20:15 +02:00
inputmodules="smb $inputmodules"
2003-03-21 17:06:11 +01:00
else
2009-02-08 23:49:52 +01:00
def_smb="#undef CONFIG_LIBSMBCLIENT"
2010-05-29 12:43:51 +02:00
noinputmodules="smb $noinputmodules"
2003-03-21 17:06:11 +01:00
fi
2008-08-03 17:57:18 +02:00
echores "$_smb"
2003-03-21 17:06:11 +01:00
2012-03-02 20:24:34 +01:00
echocheck "libquvi support"
if test "$_libquvi" = auto ; then
_libquvi=no
2012-09-02 20:45:11 +02:00
if pkg_config_add 'libquvi >= 0.4.1' ; then
2012-03-02 20:24:34 +01:00
_libquvi=yes
fi
fi
if test "$_libquvi" = yes; then
def_libquvi="#define CONFIG_LIBQUVI 1"
else
def_libquvi="#undef CONFIG_LIBQUVI"
fi
echores "$_libquvi"
2003-03-21 17:06:11 +01:00
2001-11-17 12:26:26 +01:00
#########
# VIDEO #
#########
2002-03-15 21:48:42 +01:00
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"
2012-04-16 08:33:42 +02:00
def_cocoa='#define CONFIG_COCOA 1'
else
def_cocoa='#undef CONFIG_COCOA'
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"
def_corevideo='#define CONFIG_COREVIDEO 1'
else
novomodules="corevideo $novomodules"
def_corevideo='#undef CONFIG_COREVIDEO'
fi
echores "$_corevideo"
depends_on_application_services(){
test "$_corevideo" = yes
}
fi #if darwin
2013-02-28 19:55:02 +01:00
echocheck "Wayland"
if test "$_wayland" != no; then
_wayland="no"
2013-03-02 12:08:24 +01:00
pkg_config_add "wayland-client >= 1.0.0 wayland-egl >= 9.0.0 wayland-cursor >= 1.0.0 xkbcommon >= 0.2.0" \
2013-02-28 19:55:02 +01:00
&& _wayland="yes"
res_comment=""
else
_wayland="no"
res_comment=""
fi
echores "$_wayland"
2012-04-16 08:33:42 +02:00
2002-05-25 23:43:02 +02:00
echocheck "X11 headers presence"
2007-07-17 13:16:15 +02:00
_x11_headers="no"
2010-05-09 13:20:15 +02:00
res_comment="check if the dev(el) packages are installed"
2009-04-15 22:00:26 +02:00
for I in $(echo $extra_cflags | sed s/-I//g) /usr/include ; do
2006-08-05 01:57:04 +02:00
if test -f "$I/X11/Xlib.h" ; then
2007-07-17 13:16:15 +02:00
_x11_headers="yes"
2010-05-09 13:20:15 +02:00
res_comment=""
2007-07-17 13:16:15 +02:00
break
fi
done
2008-03-26 01:14:51 +01:00
if test $_cross_compile = no; then
2010-01-10 22:47:50 +01:00
for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/X11R6/include \
2009-03-14 17:00:21 +01:00
/usr/include/X11R6 /usr/openwin/include ; do
2008-03-26 01:15:43 +01:00
if test -f "$I/X11/Xlib.h" ; then
2009-03-25 20:48:05 +01:00
extra_cflags="$extra_cflags -I$I"
2008-03-26 01:15:43 +01:00
_x11_headers="yes"
2010-05-09 13:20:15 +02:00
res_comment="using $I"
2008-03-26 01:15:43 +01:00
break
fi
done
2008-03-26 01:14:51 +01:00
fi
2006-05-07 16:00:07 +02:00
echores "$_x11_headers"
2002-05-25 23:43:02 +02:00
2001-11-17 04:53:05 +01:00
echocheck "X11"
2007-07-17 13:16:15 +02:00
if test "$_x11" = auto && test "$_x11_headers" = yes ; then
2010-01-10 22:47:50 +01:00
for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \
-L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \
2009-03-14 17:00:21 +01:00
-L/usr/lib ; do
2005-06-03 19:24:30 +02:00
if netbsd; then
2009-04-15 22:00:26 +02:00
_ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
2006-11-21 17:13:11 +01:00
else
2007-01-30 19:29:02 +01:00
_ld_tmp="$I -lXext -lX11 $_ld_pthread"
2005-06-03 19:24:30 +02:00
fi
2010-09-27 02:46:28 +02:00
statement_check X11/Xutil.h 'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
2012-04-16 08:33:42 +02:00
_x11=yes
# Check that there aren't conflicting headers between ApplicationServices
# and X11. On versions of Mac OSX prior to 10.7 the deprecated QuickDraw API
# is included by -framework ApplicationServices and clashes with the X11
# definition of the "Cursor" type.
if darwin && depends_on_application_services && test "$_x11" = yes ; then
_x11=no
header_check_broken ApplicationServices/ApplicationServices.h \
X11/Xutil.h $_ld_tmp && _x11=yes
fi
if test "$_x11" = yes ; then
libs_mplayer="$libs_mplayer $_ld_tmp"
break
fi
2005-06-03 19:24:30 +02:00
done
2001-11-17 04:53:05 +01:00
fi
if test "$_x11" = yes ; then
2009-02-08 23:49:52 +01:00
def_x11='#define CONFIG_X11 1'
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
2009-02-08 23:49:52 +01:00
def_x11='#undef CONFIG_X11'
2010-05-09 13:20:15 +02:00
novomodules="x11 $novomodules"
res_comment="check if the dev(el) packages are installed"
2001-11-17 04:53:05 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_x11"
2001-02-24 21:28:24 +01:00
2007-12-22 12:09:43 +01:00
echocheck "Xss screensaver extensions"
if test "$_xss" = auto ; then
_xss=no
2011-01-02 12:49:48 +01:00
statement_check "X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss=yes
2007-12-22 12:09:43 +01:00
fi
if test "$_xss" = yes ; then
2009-02-08 23:49:52 +01:00
def_xss='#define CONFIG_XSS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXss"
2007-12-22 12:09:43 +01:00
else
2009-02-08 23:49:52 +01:00
def_xss='#undef CONFIG_XSS'
2007-12-22 12:09:43 +01:00
fi
echores "$_xss"
2001-06-05 20:40:44 +02:00
2001-11-17 10:57:54 +01:00
echocheck "DPMS"
2001-11-17 04:53:05 +01:00
_xdpms3=no
2005-10-03 21:36:32 +02:00
_xdpms4=no
2001-11-17 04:53:05 +01:00
if test "$_x11" = yes ; then
cat > $TMPC <<EOF
#include <X11/Xmd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/dpms.h>
2010-09-14 12:05:46 +02:00
int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
2001-06-04 10:07:57 +02:00
EOF
2006-11-22 17:42:04 +01:00
cc_check -lXdpms && _xdpms3=yes
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/dpms.h 'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4=yes
2001-06-04 11:38:18 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xdpms4" = yes ; then
2009-02-08 23:49:52 +01:00
def_xdpms='#define CONFIG_XDPMS 1'
2010-05-09 13:20:15 +02:00
res_comment="using Xdpms 4"
2006-05-07 16:00:07 +02:00
echores "yes"
2001-11-17 04:53:05 +01:00
elif test "$_xdpms3" = yes ; then
2009-02-08 23:49:52 +01:00
def_xdpms='#define CONFIG_XDPMS 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXdpms"
2010-05-09 13:20:15 +02:00
res_comment="using Xdpms 3"
2006-05-07 16:00:07 +02:00
echores "yes"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xdpms='#undef CONFIG_XDPMS'
2001-11-17 04:53:05 +01:00
echores "no"
2001-06-04 10:07:57 +02:00
fi
2001-06-04 22:12:41 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Xv"
2011-05-05 12:25:17 +02:00
if test "$_xv" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_xv=no
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/Xvlib.h 'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv=yes
2001-06-04 10:07:57 +02:00
fi
2006-08-19 21:10:27 +02:00
2001-11-17 04:53:05 +01:00
if test "$_xv" = yes ; then
2009-02-08 23:49:52 +01:00
def_xv='#define CONFIG_XV 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXv"
2010-05-09 13:20:15 +02:00
vomodules="xv $vomodules"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xv='#undef CONFIG_XV'
2010-05-09 13:20:15 +02:00
novomodules="xv $novomodules"
2001-06-04 10:07:57 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xv"
2001-06-04 10:07:57 +02:00
2001-07-28 23:35:55 +02:00
2009-02-16 21:58:13 +01:00
echocheck "VDPAU"
2011-05-05 12:25:17 +02:00
if test "$_vdpau" = auto && test "$_x11" = yes ; then
2009-02-16 21:58:13 +01:00
_vdpau=no
if test "$_dl" = yes ; then
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
def_vdpau='#define CONFIG_VDPAU 1'
2010-05-09 13:20:15 +02:00
vomodules="vdpau $vomodules"
2009-02-16 21:58:13 +01:00
else
def_vdpau='#define CONFIG_VDPAU 0'
2010-05-09 13:20:15 +02:00
novomodules="vdpau $novomodules"
2009-02-16 21:58:13 +01:00
fi
echores "$_vdpau"
2001-11-17 04:53:05 +01:00
echocheck "Xinerama"
2011-05-05 12:25:17 +02:00
if test "$_xinerama" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_xinerama=no
2010-09-27 02:46:28 +02:00
statement_check X11/extensions/Xinerama.h 'XineramaIsActive(0)' -lXinerama && _xinerama=yes
2001-07-28 23:35:55 +02:00
fi
2006-08-19 21:10:27 +02:00
2001-11-17 04:53:05 +01:00
if test "$_xinerama" = yes ; then
2009-02-08 23:49:52 +01:00
def_xinerama='#define CONFIG_XINERAMA 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXinerama"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_xinerama='#undef CONFIG_XINERAMA'
2001-07-28 23:35:55 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xinerama"
2001-07-28 23:35:55 +02:00
2001-06-04 10:07:57 +02:00
2001-11-17 04:53:05 +01:00
# Note: the -lXxf86vm library is the VideoMode extension and though it's not
# needed for DGA, AFAIK every distribution packages together with DGA stuffs
# named 'X extensions' or something similar.
# This check may be useful for future mplayer versions (to change resolution)
# If you run into problems, remove '-lXxf86vm'.
echocheck "Xxf86vm"
2011-05-05 12:25:17 +02:00
if test "$_vm" = auto && test "$_x11" = yes ; then
2001-11-17 04:53:05 +01:00
_vm=no
2010-10-03 15:49:57 +02:00
statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm=yes
2001-04-15 22:31:58 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_vm" = yes ; then
2009-02-08 23:49:52 +01:00
def_vm='#define CONFIG_XF86VM 1'
2009-03-25 20:48:05 +01:00
libs_mplayer="$libs_mplayer -lXxf86vm"
2001-11-17 04:53:05 +01:00
else
2009-02-08 23:49:52 +01:00
def_vm='#undef CONFIG_XF86VM'
2001-11-17 04:53:05 +01:00
fi
echores "$_vm"
2001-04-15 22:31:58 +02:00
2005-02-02 15:07:13 +01:00
# Check for the presence of special keycodes, like audio control buttons
# that XFree86 might have. Used to be bundled with the xf86vm check, but
# has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
# have these new keycodes.
echocheck "XF86keysym"
2011-05-05 12:25:17 +02:00
if test "$_xf86keysym" = auto && test "$_x11" = yes ; then
2005-02-02 15:07:13 +01:00
_xf86keysym=no
2011-01-20 12:21:34 +01:00
return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes
2005-02-02 15:07:13 +01:00
fi
if test "$_xf86keysym" = yes ; then
2009-02-08 23:49:52 +01:00
def_xf86keysym='#define CONFIG_XF86XK 1'
2005-02-02 15:07:13 +01:00
else
2009-02-08 23:49:52 +01:00
def_xf86keysym='#undef CONFIG_XF86XK'
2005-02-02 15:07:13 +01:00
fi
echores "$_xf86keysym"
2001-08-29 14:15:09 +02:00
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
2009-02-08 23:49:52 +01:00
def_caca='#define CONFIG_CACA 1'
2010-05-09 13:20:15 +02:00
vomodules="caca $vomodules"
2004-04-06 02:04:48 +02:00
else
2009-02-08 23:49:52 +01:00
def_caca='#undef CONFIG_CACA'
2010-05-09 13:20:15 +02:00
novomodules="caca $novomodules"
2004-04-06 02:04:48 +02:00
fi
echores "$_caca"
2001-08-20 23:20:03 +02:00
2001-11-17 04:53:05 +01:00
echocheck "DVB"
2006-08-04 01:41:35 +02:00
if test "$_dvb" = auto ; then
2001-11-17 04:53:05 +01:00
_dvb=no
2002-04-04 15:21:13 +02:00
cat >$TMPC << EOF
2008-08-14 17:54:53 +02:00
#include <poll.h>
2002-04-04 15:21:13 +02:00
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
2002-12-28 13:04:58 +01:00
#include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h>
#include <linux/dvb/video.h>
#include <linux/dvb/audio.h>
int main(void) {return 0;}
EOF
2006-08-27 23:05:42 +02:00
for _inc_tmp in "" "-I/usr/src/DVB/include" ; do
2011-01-02 12:49:48 +01:00
cc_check $_inc_tmp && _dvb=yes &&
2009-03-25 20:48:05 +01:00
extra_cflags="$extra_cflags $_inc_tmp" && break
2006-08-05 01:57:04 +02:00
done
2006-08-04 01:43:15 +02:00
fi
2010-03-02 20:57:17 +01:00
echores "$_dvb"
if test "$_dvb" = yes ; then
_dvbin=yes
2010-05-09 13:20:15 +02:00
inputmodules="dvb $inputmodules"
2009-02-08 23:49:52 +01:00
def_dvb='#define CONFIG_DVB 1'
def_dvbin='#define CONFIG_DVBIN 1'
2010-03-02 20:57:17 +01:00
else
_dvbin=no
2010-05-29 12:43:51 +02:00
noinputmodules="dvb $noinputmodules"
2009-02-08 23:49:52 +01:00
def_dvb='#undef CONFIG_DVB'
def_dvbin='#undef CONFIG_DVBIN '
2001-11-03 22:25:55 +01:00
fi
2007-07-14 17:11:08 +02:00
2008-11-30 14:22:34 +01:00
echocheck "MNG support"
if test "$_mng" = auto ; then
_mng=no
2011-01-20 12:21:34 +01:00
return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng=yes
2008-11-30 14:22:34 +01:00
fi
echores "$_mng"
if test "$_mng" = yes ; then
2009-02-08 23:49:52 +01:00
def_mng='#define CONFIG_MNG 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lmng -lz"
2008-11-30 14:22:34 +01:00
else
2009-02-08 23:49:52 +01:00
def_mng='#undef CONFIG_MNG'
2008-11-30 14:22:34 +01:00
fi
2002-03-10 23:49:18 +01:00
echocheck "JPEG support"
2006-06-16 23:17:47 +02:00
if test "$_jpeg" = auto ; then
_jpeg=no
2010-09-26 20:22:06 +02:00
header_check_broken stdio.h jpeglib.h -ljpeg $_ld_lm && _jpeg=yes
2002-03-10 23:49:18 +01:00
fi
2006-06-16 23:17:47 +02:00
echores "$_jpeg"
2002-03-11 01:13:05 +01:00
2006-06-16 23:17:47 +02:00
if test "$_jpeg" = yes ; then
2009-02-08 23:49:52 +01:00
def_jpeg='#define CONFIG_JPEG 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -ljpeg"
2002-03-10 23:49:18 +01:00
else
2009-02-08 23:49:52 +01:00
def_jpeg='#undef CONFIG_JPEG'
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-02-28 19:55:02 +01:00
if test "$_wayland" = yes && cc_check -DGL_WAYLAND -lGL -lEGL ; then
_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
2010-04-30 21:04:13 +02:00
else
_gl=no
fi
if test "$_gl" = yes ; then
def_gl='#define CONFIG_GL 1'
2010-05-09 13:20:15 +02:00
res_comment="backends:"
2011-10-15 18:44:00 +02:00
if test "$_gl_cocoa" = yes ; then
def_gl_cocoa='#define CONFIG_GL_COCOA 1'
res_comment="$res_comment cocoa"
fi
2010-04-30 21:04:13 +02:00
if test "$_gl_win32" = yes ; then
def_gl_win32='#define CONFIG_GL_WIN32 1'
2010-05-09 13:20:15 +02:00
res_comment="$res_comment win32"
2010-04-30 21:04:13 +02:00
fi
if test "$_gl_x11" = yes ; then
def_gl_x11='#define CONFIG_GL_X11 1'
2010-05-09 13:20:15 +02:00
res_comment="$res_comment x11"
2010-04-30 21:04:13 +02:00
fi
2013-02-28 19:55:02 +01:00
if test "$_gl_wayland" = yes ; then
def_gl_wayland='#define CONFIG_GL_WAYLAND'
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
def_gl='#undef CONFIG_GL'
2011-10-15 18:44:00 +02:00
def_gl_cocoa='#undef CONFIG_GL_COCOA'
2010-04-30 21:04:13 +02:00
def_gl_win32='#undef CONFIG_GL_WIN32'
def_gl_x11='#undef CONFIG_GL_X11'
2013-02-28 19:55:02 +01:00
def_gl_wayland='#undef CONFIG_GL_WAYLAND'
2010-05-09 13:20:15 +02:00
novomodules="opengl $novomodules"
2010-04-30 21:04:13 +02:00
fi
echores "$_gl"
2006-06-18 13:21:23 +02:00
if win32; then
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
2009-02-08 23:49:52 +01:00
def_direct3d='#define CONFIG_DIRECT3D 1'
2010-05-09 13:20:15 +02:00
vomodules="direct3d $vomodules"
2008-11-18 13:23:42 +01:00
else
2009-02-08 23:49:52 +01:00
def_direct3d='#undef CONFIG_DIRECT3D'
2010-05-09 13:20:15 +02:00
novomodules="direct3d $novomodules"
2008-11-18 13:23:42 +01:00
fi
echores "$_direct3d"
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
def_dsound='#define CONFIG_DSOUND 1'
aomodules="dsound $aomodules"
else
def_dsound='#undef CONFIG_DSOUND'
noaomodules="dsound $noaomodules"
fi
echores "$_dsound"
2006-06-18 13:21:23 +02:00
fi #if win32; then
2012-12-28 08:07:14 +01:00
echocheck "SDL 2.0"
if test "$_sdl2" = auto ; then
pkg_config_add 'sdl2' && _sdl2=yes
fi
if test "$_sdl2" = yes ; then
_sdl=yes # sdl2 implies sdl
def_sdl='#define CONFIG_SDL 1'
def_sdl2='#define CONFIG_SDL2 1'
vomodules="sdl $vomodules"
aomodules="sdl $aomodules"
echores "$_sdl2"
else
def_sdl2='#undef CONFIG_SDL2'
echores "$_sdl2"
echocheck "SDL"
if test "$_sdl" = auto ; then
pkg_config_add 'sdl' && _sdl=yes
fi
if test "$_sdl" = yes ; then
def_sdl='#define CONFIG_SDL 1'
novomodules="sdl $novomodules"
aomodules="sdl $aomodules"
else
def_sdl='#undef CONFIG_SDL'
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
2009-02-08 23:49:52 +01:00
def_ossaudio='#define CONFIG_OSS_AUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="oss $aomodules"
2010-06-14 17:19:38 +02:00
cat > $TMPC << EOF
2007-07-11 12:43:25 +02:00
#include <$_soundcard_header>
2003-01-19 16:43:12 +01:00
#ifdef OPEN_SOUND_SYSTEM
int main(void) { return 0; }
#else
#error Not the real thing
#endif
EOF
2010-06-14 17:19:38 +02:00
_real_ossaudio=no
cc_check && _real_ossaudio=yes
if test "$_real_ossaudio" = yes; then
def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
# Check for OSS4 headers (override default headers)
# Does not apply to systems where OSS4 is native (e.g. FreeBSD)
if test -f /etc/oss.conf; then
. /etc/oss.conf
_ossinc="$OSSLIBDIR/include"
if test -f "$_ossinc/sys/soundcard.h"; then
extra_cflags="-I$_ossinc $extra_cflags"
2009-06-23 06:31:13 +02:00
fi
2002-04-28 00:42:27 +02:00
fi
2010-06-14 17:19:38 +02:00
elif netbsd || openbsd ; then
def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
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
2009-02-08 23:49:52 +01:00
def_ossaudio='#undef CONFIG_OSS_AUDIO'
def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
2010-05-09 13:20:15 +02:00
noaomodules="oss $noaomodules"
2001-04-26 22:23:24 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_ossaudio"
2001-04-26 22:23:24 +02:00
2001-11-17 04:53:05 +01:00
2011-06-24 15:56:43 +02:00
echocheck "RSound"
if test "$_rsound" = auto ; then
_rsound=no
statement_check rsound.h 'rsd_init(NULL);' -lrsound && _rsound=yes
fi
echores "$_rsound"
if test "$_rsound" = yes ; then
def_rsound='#define CONFIG_RSOUND 1'
aomodules="rsound $aomodules"
libs_mplayer="$libs_mplayer -lrsound"
else
def_rsound='#undef CONFIG_RSOUND'
noaomodules="rsound $noaomodules"
fi
2009-01-11 13:58:06 +01:00
2007-10-18 15:34:26 +02:00
echocheck "pulse"
if test "$_pulse" = auto ; then
_pulse=no
2012-02-27 14:51:35 +01:00
if pkg_config_add 'libpulse >= 0.9' ; then
2010-06-24 10:03:41 +02:00
_pulse=yes
2004-11-06 20:35:24 +01:00
fi
fi
2007-10-18 15:34:26 +02:00
echores "$_pulse"
2004-11-06 20:35:24 +01:00
2007-10-18 15:34:26 +02:00
if test "$_pulse" = yes ; then
2009-02-08 23:49:52 +01:00
def_pulse='#define CONFIG_PULSE 1'
2010-05-09 13:20:15 +02:00
aomodules="pulse $aomodules"
2004-11-06 20:35:24 +01:00
else
2009-02-08 23:49:52 +01:00
def_pulse='#undef CONFIG_PULSE'
2010-05-09 13:20:15 +02:00
noaomodules="pulse $noaomodules"
2004-11-06 20:35:24 +01:00
fi
2004-06-25 20:11:15 +02:00
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
def_portaudio='#define CONFIG_PORTAUDIO 1'
aomodules="portaudio $aomodules"
else
def_portaudio='#undef CONFIG_PORTAUDIO'
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
2009-02-08 23:49:52 +01:00
def_jack='#define CONFIG_JACK 1'
2010-05-09 13:20:15 +02:00
aomodules="jack $aomodules"
2004-06-25 20:11:15 +02:00
else
2010-05-09 13:20:15 +02:00
noaomodules="jack $noaomodules"
2004-06-25 20:11:15 +02:00
fi
echores "$_jack"
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
2009-02-08 23:49:52 +01:00
def_openal='#define CONFIG_OPENAL 1'
2010-05-09 13:20:15 +02:00
aomodules="openal $aomodules"
2006-02-16 21:45:25 +01:00
else
2012-11-23 15:29:21 +01:00
def_openal='#undef CONFIG_OPENAL'
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
2009-02-08 23:49:52 +01:00
def_alsa='#undef CONFIG_ALSA'
2012-02-27 15:29:21 +01:00
if test "$_alsa" = yes ; then
2010-05-09 13:20:15 +02:00
aomodules="alsa $aomodules"
2009-02-08 23:49:52 +01:00
def_alsa='#define CONFIG_ALSA 1'
2002-03-12 08:16:29 +01:00
else
2012-02-27 15:29:21 +01:00
noaomodules="alsa $noaomodules"
2001-02-24 21:28:24 +01:00
fi
2005-09-12 12:05:06 +02:00
echores "$_alsa"
2001-02-24 21:28:24 +01:00
2001-10-10 03:48:54 +02:00
2009-05-05 19:57:44 +02:00
if darwin; then
echocheck "CoreAudio"
if test "$_coreaudio" = auto ; then
cat > $TMPC <<EOF
#include <CoreAudio/CoreAudio.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AudioUnit.h>
int main(void) { return 0; }
EOF
_coreaudio=no
cc_check -framework CoreAudio -framework AudioUnit -framework AudioToolbox && _coreaudio=yes
fi
if test "$_coreaudio" = yes ; then
libs_mplayer="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
def_coreaudio='#define CONFIG_COREAUDIO 1'
2010-05-09 13:20:15 +02:00
aomodules="coreaudio $aomodules"
2009-05-05 19:57:44 +02:00
else
def_coreaudio='#undef CONFIG_COREAUDIO'
2010-05-09 13:20:15 +02:00
noaomodules="coreaudio $noaomodules"
2009-05-05 19:57:44 +02:00
fi
echores $_coreaudio
fi #if darwin
2008-10-21 09:02:25 +02:00
# set default CD/DVD devices
2012-04-06 15:58:39 +02:00
if win32 ; then
2008-10-21 09:02:25 +02:00
default_cdrom_device="D:"
elif darwin ; then
default_cdrom_device="/dev/disk1"
elif dragonfly ; then
default_cdrom_device="/dev/cd0"
elif freebsd ; then
default_cdrom_device="/dev/acd0"
elif openbsd ; then
2010-08-03 10:57:48 +02:00
default_cdrom_device="/dev/rcd0c"
2008-10-21 09:02:25 +02:00
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
2010-06-24 10:03:41 +02:00
header_check ddk/ntddcdrm.h && _vcd=yes
2009-05-05 19:17:17 +02:00
fi
2009-03-28 19:53:26 +01:00
fi
if test "$_vcd" = yes; then
2010-05-09 13:20:15 +02:00
inputmodules="vcd $inputmodules"
2009-02-08 23:49:52 +01:00
def_vcd='#define CONFIG_VCD 1'
2001-11-28 00:17:58 +01:00
else
2009-02-08 23:49:52 +01:00
def_vcd='#undef CONFIG_VCD'
2010-05-29 12:43:51 +02:00
noinputmodules="vcd $noinputmodules"
2010-05-09 13:20:15 +02:00
res_comment="not supported on this OS"
2001-11-28 00:17:58 +01:00
fi
2006-05-07 16:00:07 +02:00
echores "$_vcd"
2001-11-28 00:17:58 +01:00
2002-01-04 14:08:14 +01:00
2010-07-05 19:04:46 +02:00
echocheck "Blu-ray support"
if test "$_bluray" = auto ; then
_bluray=no
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
def_bluray='#define CONFIG_LIBBLURAY 1'
inputmodules="bluray $inputmodules"
else
def_bluray='#undef CONFIG_LIBBLURAY'
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
2012-08-12 18:40:21 +02:00
pkg_config_add 'dvdread >= 4.2.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
2009-02-08 23:49:52 +01:00
def_dvdread='#define CONFIG_DVDREAD 1'
2012-08-12 18:40:21 +02:00
inputmodules="dvdread $inputmodules"
2005-12-14 22:52:41 +01:00
else
2009-02-08 23:49:52 +01:00
def_dvdread='#undef CONFIG_DVDREAD'
2010-05-29 12:43:51 +02:00
noinputmodules="dvdread $noinputmodules"
2005-12-14 22:52:41 +01:00
fi
2006-11-03 23:03:58 +01:00
echores "$_dvdread"
2005-12-14 22:52:41 +01:00
2002-03-28 21:40:21 +01:00
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'
2012-03-21 00:57:58 +01:00
def_cdda='#define CONFIG_CDDA 1'
2010-07-17 15:14:53 +02:00
test $_cddb = auto && test $networking = yes && _cddb=yes
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'
def_cdda='#undef CONFIG_CDDA'
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
2006-12-04 21:20:32 +01:00
if test "$_cddb" = yes ; then
2009-10-28 14:55:18 +01:00
def_cddb='#define CONFIG_CDDB 1'
2010-05-09 13:20:15 +02:00
inputmodules="cddb $inputmodules"
2006-12-04 21:20:32 +01:00
else
_cddb=no
2009-02-08 23:49:52 +01:00
def_cddb='#undef CONFIG_CDDB'
2010-05-29 12:43:51 +02:00
noinputmodules="cddb $noinputmodules"
2006-12-04 21:20:32 +01:00
fi
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
def_ass='#define CONFIG_ASS 1'
else
die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
fi
else
def_ass='#undef CONFIG_ASS'
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
2010-01-04 13:24:07 +01:00
def_enca='#define CONFIG_ENCA 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lenca"
2004-05-08 19:52:25 +02:00
else
2010-01-04 13:24:07 +01:00
def_enca='#undef CONFIG_ENCA'
2004-05-08 19:52:25 +02:00
fi
echores "$_enca"
2001-11-17 04:53:05 +01:00
echocheck "zlib"
_zlib=no
2010-09-27 02:02:59 +02:00
statement_check zlib.h 'inflate(0, Z_NO_FLUSH)' -lz && _zlib=yes
2001-11-17 04:53:05 +01:00
if test "$_zlib" = yes ; then
2009-02-08 23:49:52 +01:00
def_zlib='#define CONFIG_ZLIB 1'
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lz"
2001-02-24 21:28:24 +01:00
else
2009-02-08 23:49:52 +01:00
def_zlib='#define CONFIG_ZLIB 0'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_zlib"
2001-02-24 21:28:24 +01:00
2001-07-03 16:22:23 +02:00
2012-05-06 18:29:14 +02:00
# Any version of libmpg123 that knows MPG123_RESYNC_LIMIT shall be fine.
# That is, 1.2.0 onwards. Recommened is 1.14 onwards, though.
2010-06-30 11:55:14 +02:00
echocheck "mpg123 support"
def_mpg123='#undef CONFIG_MPG123'
if test "$_mpg123" = auto; then
_mpg123=no
2012-05-06 18:29:14 +02:00
pkg_config_add 'libmpg123 >= 1.2.0' && _mpg123=yes
2010-06-30 11:55:14 +02:00
fi
if test "$_mpg123" = yes ; then
def_mpg123='#define CONFIG_MPG123 1'
codecmodules="mpg123 $codecmodules"
else
nocodecmodules="mpg123 $nocodecmodules"
fi
echores "$_mpg123"
2004-12-23 03:09:52 +01:00
echocheck "LADSPA plugin support"
if test "$_ladspa" = auto ; then
_ladspa=no
2010-09-27 02:46:28 +02:00
statement_check ladspa.h 'LADSPA_Descriptor ld = {0}' && _ladspa=yes
2004-12-23 03:09:52 +01:00
fi
if test "$_ladspa" = yes; then
2009-10-28 14:55:18 +01:00
def_ladspa="#define CONFIG_LADSPA 1"
2004-12-23 03:09:52 +01:00
else
2009-02-08 23:49:52 +01:00
def_ladspa="#undef CONFIG_LADSPA"
2004-12-23 03:09:52 +01:00
fi
echores "$_ladspa"
2009-04-02 21:01:23 +02:00
echocheck "libbs2b audio filter support"
if test "$_libbs2b" = auto ; then
2012-02-27 14:51:35 +01:00
_libbs2b=no
if pkg_config_add libbs2b ; then
2009-04-02 21:01:23 +02:00
_libbs2b=yes
2012-02-27 14:51:35 +01:00
fi
2009-04-02 21:01:23 +02:00
fi
def_libbs2b="#undef CONFIG_LIBBS2B"
2009-10-28 14:55:18 +01:00
test "$_libbs2b" = yes && def_libbs2b="#define CONFIG_LIBBS2B 1"
2009-04-02 21:01:23 +02:00
echores "$_libbs2b"
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
def_lcms2="#define CONFIG_LCMS2 1"
else
def_lcms2="#undef CONFIG_LCMS2"
fi
echores "$_lcms2"
2001-12-30 00:34:53 +01:00
2012-01-28 12:41:36 +01:00
# Test with > against Libav 0.8 versions which will NOT work rather than
# specify minimum version, to allow (future) point releases to possibly work.
2012-11-14 02:31:57 +01:00
all_libav_libs="libavutil > 51.22.0:libavcodec >= 53.35.0:libavformat > 53.20.0:libswscale >= 2.0.0"
2011-08-20 23:36:23 +02:00
echocheck "Libav ($all_libav_libs)"
2010-10-31 02:19:56 +02:00
if test "$ffmpeg" = auto ; then
2011-12-22 00:07:12 +01:00
IFS=":" # shell should not be used for programming
2012-03-04 20:53:42 +01:00
if ! pkg_config_add $all_libav_libs ; then
2011-12-11 06:48:26 +01:00
die "Unable to find development files for some of the required Libav libraries above. Aborting."
2006-01-22 19:11:35 +01:00
fi
fi
2011-12-22 00:07:12 +01:00
echores "yes"
2006-01-22 19:11:35 +01:00
2009-07-26 04:55:40 +02:00
2012-11-14 02:31:57 +01:00
echocheck "Libav 0.8 compatibility hack"
if test "$_encoding" = yes && $_pkg_config "libavcodec >= 54.0.0" ; then
echores "no"
else
_encoding=no
echores "yes"
fi
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 15:15:19 +01:00
echocheck "libavcodec AVCodecDescriptor API"
_avcodec_codec_desc_api=no
2013-02-11 01:02:28 +01:00
statement_check libavcodec/avcodec.h 'const AVCodecDescriptor *desc = avcodec_descriptor_get_by_name("c")' && _avcodec_codec_desc_api=yes
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 15:15:19 +01:00
if test "$_avcodec_codec_desc_api" = yes ; then
def_avcodec_codec_desc_api='#define HAVE_AVCODEC_CODEC_DESC_API 1'
else
def_avcodec_codec_desc_api='#define HAVE_AVCODEC_CODEC_DESC_API 0'
fi
echores "$_avcodec_codec_desc_api"
echocheck "libavcodec av_codec_is_decoder API"
_avcodec_is_decoder_api=no
2013-02-11 01:02:28 +01:00
statement_check libavcodec/avcodec.h 'av_codec_is_decoder(NULL)' && _avcodec_is_decoder_api=yes
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 15:15:19 +01:00
if test "$_avcodec_is_decoder_api" = yes ; then
def_avcodec_is_decoder_api='#define HAVE_AVCODEC_IS_DECODER_API 1'
else
def_avcodec_is_decoder_api='#define HAVE_AVCODEC_IS_DECODER_API 0'
fi
echores "$_avcodec_is_decoder_api"
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 "libavfilter >= 3.17.0"
if test "$libavfilter" = auto ; then
libavfilter=no
if pkg_config_add "libavfilter >= 3.17.0" ; then
libavfilter=yes
fi
fi
if test "$libavfilter" = yes ; then
def_libavfilter='#define CONFIG_LIBAVFILTER 1'
else
def_libavfilter='#undef CONFIG_LIBAVFILTER'
fi
echores "$libavfilter"
echocheck "libavdevice >= 54.0.0"
if test "$libavdevice" = auto ; then
libavdevice=no
if pkg_config_add "libavdevice >= 54.0.0" ; then
libavdevice=yes
fi
fi
if test "$libavdevice" = yes ; then
def_libavdevice='#define CONFIG_LIBAVDEVICE 1'
else
def_libavdevice='#undef CONFIG_LIBAVDEVICE'
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
def_libpostproc='#define CONFIG_LIBPOSTPROC 1'
else
def_libpostproc='#undef CONFIG_LIBPOSTPROC'
fi
echores "$libpostproc"
2010-10-31 02:19:56 +02:00
2009-07-26 04:55:40 +02:00
2001-11-17 04:53:05 +01:00
echocheck "TV interface"
if test "$_tv" = yes ; then
2009-02-08 23:49:52 +01:00
def_tv='#define CONFIG_TV 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv $inputmodules"
2001-02-24 21:28:24 +01:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv='#undef CONFIG_TV'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_tv"
2001-02-24 21:28:24 +01:00
2006-06-18 13:21:23 +02:00
2003-08-07 14:24:35 +02:00
echocheck "Video 4 Linux 2 TV interface"
if test "$_tv_v4l2" = auto ; then
2007-08-01 11:32:37 +02:00
_tv_v4l2=no
if test "$_tv" = yes && linux ; then
2011-01-02 12:49:48 +01:00
header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes
2011-06-29 06:19:49 +02:00
elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
_tv_v4l2=yes
2007-08-01 11:32:37 +02:00
fi
2003-08-07 14:24:35 +02:00
fi
if test "$_tv_v4l2" = yes ; then
2007-04-23 09:28:48 +02:00
_audio_input=yes
2009-02-08 23:49:52 +01:00
def_tv_v4l2='#define CONFIG_TV_V4L2 1'
2010-05-09 13:20:15 +02:00
inputmodules="tv-v4l2 $inputmodules"
2003-08-07 14:24:35 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="tv-v4l2 $noinputmodules"
2009-02-08 23:49:52 +01:00
def_tv_v4l2='#undef CONFIG_TV_V4L2'
2003-08-07 14:24:35 +02:00
fi
echores "$_tv_v4l2"
2006-08-28 19:05:18 +02:00
echocheck "Radio interface"
if test "$_radio" = yes ; then
2009-02-08 23:49:52 +01:00
def_radio='#define CONFIG_RADIO 1'
2010-05-09 13:20:15 +02:00
inputmodules="radio $inputmodules"
2012-02-27 15:29:21 +01:00
if test "$_alsa" != yes -a "$_ossaudio" != yes ; then
2006-08-28 19:05:18 +02:00
_radio_capture=no
fi
if test "$_radio_capture" = yes ; then
2007-04-22 22:43:28 +02:00
_audio_input=yes
2009-02-08 23:49:52 +01:00
def_radio_capture="#define CONFIG_RADIO_CAPTURE 1"
2006-08-28 19:05:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
2006-08-28 19:05:18 +02:00
fi
else
2010-05-29 12:43:51 +02:00
noinputmodules="radio $noinputmodules"
2009-02-08 23:49:52 +01:00
def_radio='#undef CONFIG_RADIO'
def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
2006-08-28 19:05:18 +02:00
_radio_capture=no
fi
echores "$_radio"
echocheck "Capture for Radio interface"
echores "$_radio_capture"
echocheck "Video 4 Linux 2 Radio interface"
if test "$_radio_v4l2" = auto ; then
2006-08-31 20:35:32 +02:00
_radio_v4l2=no
if test "$_radio" = yes && linux ; then
2010-06-24 10:03:41 +02:00
header_check linux/videodev2.h && _radio_v4l2=yes
2006-08-31 20:35:32 +02:00
fi
2006-08-28 19:05:18 +02:00
fi
if test "$_radio_v4l2" = yes ; then
2009-02-08 23:49:52 +01:00
def_radio_v4l2='#define CONFIG_RADIO_V4L2 1'
2006-08-28 19:05:18 +02:00
else
2009-02-08 23:49:52 +01:00
def_radio_v4l2='#undef CONFIG_RADIO_V4L2'
2006-08-28 19:05:18 +02:00
fi
echores "$_radio_v4l2"
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
if test "$_tv_v4l2" = yes && linux ; then
cat > $TMPC <<EOF
2011-01-02 12:49:48 +01:00
#include <sys/time.h>
2006-07-10 23:32:19 +02:00
#include <linux/videodev2.h>
2009-08-14 11:31:16 +02:00
int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
2006-07-10 23:32:19 +02:00
EOF
cc_check && _pvr=yes
fi
fi
if test "$_pvr" = yes ; then
2009-02-08 23:49:52 +01:00
def_pvr='#define CONFIG_PVR 1'
2010-05-09 13:20:15 +02:00
inputmodules="pvr $inputmodules"
2006-07-10 23:32:19 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="pvr $noinputmodules"
2009-02-08 23:49:52 +01:00
def_pvr='#undef CONFIG_PVR'
2006-07-10 23:32:19 +02:00
fi
echores "$_pvr"
2003-08-15 21:13:23 +02:00
echocheck "ftp"
2010-09-22 00:26:44 +02:00
if test "$_ftp" = "auto" ; then
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
test "$networking" = "yes" && _ftp=yes
2010-09-22 00:26:44 +02:00
fi
if test "$_ftp" = yes ; then
2009-02-08 23:49:52 +01:00
def_ftp='#define CONFIG_FTP 1'
2010-05-09 13:20:15 +02:00
inputmodules="ftp $inputmodules"
2003-08-15 21:13:23 +02:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="ftp $noinputmodules"
2009-02-08 23:49:52 +01:00
def_ftp='#undef CONFIG_FTP'
2003-08-15 21:13:23 +02:00
fi
echores "$_ftp"
2005-02-27 05:25:12 +01:00
echocheck "vstream client"
if test "$_vstream" = auto ; then
_vstream=no
cat > $TMPC <<EOF
#include <vstream-client.h>
void vstream_error(const char *format, ... ) {}
int main(void) { vstream_start(); return 0; }
EOF
cc_check -lvstream-client && _vstream=yes
fi
if test "$_vstream" = yes ; then
2009-02-08 23:49:52 +01:00
def_vstream='#define CONFIG_VSTREAM 1'
2010-05-09 13:20:15 +02:00
inputmodules="vstream $inputmodules"
2012-12-19 13:01:56 +01:00
libs_mplayer="$libs_mplayer -lvstream-client"
2005-02-27 05:25:12 +01:00
else
2010-05-29 12:43:51 +02:00
noinputmodules="vstream $noinputmodules"
2009-02-08 23:49:52 +01:00
def_vstream='#undef CONFIG_VSTREAM'
2005-02-27 05:25:12 +01:00
fi
echores "$_vstream"
2001-02-24 21:28:24 +01:00
2012-09-14 17:51:26 +02:00
echocheck "encoding"
if test "$_encoding" = yes ; then
def_encoding="#define CONFIG_ENCODING 1"
else
def_encoding="#undef CONFIG_ENCODING"
fi
echores "$_encoding"
2002-12-22 22:01:01 +01:00
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"
2009-02-08 23:49:52 +01:00
def_joystick='#undef CONFIG_JOYSTICK'
2002-08-28 17:55:58 +02:00
if test "$_joystick" = yes ; then
2010-11-03 09:09:31 +01:00
if linux || freebsd ; then
2002-08-28 17:55:58 +02:00
# TODO add some check
2009-02-08 23:49:52 +01:00
def_joystick='#define CONFIG_JOYSTICK 1'
2002-08-28 17:55:58 +02:00
else
2008-02-28 19:19:10 +01:00
_joystick="no"
2010-05-09 13:20:15 +02:00
res_comment="unsupported under $system_name"
2002-02-03 13:43:18 +01:00
fi
fi
2005-11-17 12:06:38 +01:00
echores "$_joystick"
2002-02-03 13:43:18 +01:00
2002-02-23 22:20:16 +01:00
echocheck "lirc"
if test "$_lirc" = auto ; then
_lirc=no
2010-06-24 10:03:41 +02:00
header_check lirc/lirc_client.h -llirc_client && _lirc=yes
2002-02-23 22:20:16 +01:00
fi
if test "$_lirc" = yes ; then
2009-02-08 23:49:52 +01:00
def_lirc='#define CONFIG_LIRC 1'
2009-05-08 18:21:03 +02:00
libs_mplayer="$libs_mplayer -llirc_client"
2002-02-23 22:20:16 +01:00
else
2009-02-08 23:49:52 +01:00
def_lirc='#undef CONFIG_LIRC'
2002-02-23 22:20:16 +01:00
fi
echores "$_lirc"
2003-05-30 20:23:55 +02:00
echocheck "lircc"
if test "$_lircc" = auto ; then
_lircc=no
2010-06-24 10:03:41 +02:00
header_check lirc/lircc.h -llircc && _lircc=yes
2003-05-30 20:23:55 +02:00
fi
if test "$_lircc" = yes ; then
2009-02-08 23:49:52 +01:00
def_lircc='#define CONFIG_LIRCC 1'
2009-05-08 18:21:03 +02:00
libs_mplayer="$libs_mplayer -llircc"
2003-05-30 20:23:55 +02:00
else
2009-02-08 23:49:52 +01:00
def_lircc='#undef CONFIG_LIRCC'
2003-05-30 20:23:55 +02:00
fi
echores "$_lircc"
2002-02-23 22:20:16 +01:00
2008-07-28 19:21:36 +02:00
#############################################################################
2008-07-28 19:33:08 +02:00
2011-04-23 17:00:43 +02:00
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
2007-03-18 21:33:20 +01:00
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).
2010-03-17 15:41:32 +01:00
mak_enable () {
list=$(echo $1 | tr '[a-z]' '[A-Z]')
item=$(echo $2 | tr '[a-z]' '[A-Z]')
nprefix=$3;
for part in $list; do
if $(echo $item | grep -q -E "(^| )$part($| )"); then
echo "${nprefix}_$part = yes"
fi
done
}
2001-11-17 04:53:05 +01:00
#############################################################################
2001-11-18 18:45:23 +01:00
echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------
2001-11-17 04:53:05 +01:00
2008-06-02 14:55:24 +02:00
# Ensure that locale settings do not interfere with shell commands.
2008-06-07 15:54:49 +02:00
export LC_ALL = C
2008-06-02 14:55:24 +02:00
2010-06-09 11:27:29 +02:00
CONFIGURATION = $configuration
2009-05-04 13:44:36 +02:00
2010-04-04 18:48:46 +02:00
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
MANDIR = \$(DESTDIR)$_mandir
2002-06-24 10:23:48 +02:00
CONFDIR = \$(DESTDIR)$_confdir
2010-03-08 21:48:50 +01:00
LOCALEDIR = \$(DESTDIR)$_localedir
2008-06-02 14:24:28 +02:00
2010-04-04 18:48:46 +02:00
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
2011-07-06 09:53:41 +02:00
CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
CXXFLAGS = $WARNFLAGS $ERRORFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
2010-07-02 01:18:16 +02:00
DEPFLAGS = $DEPFLAGS
2010-04-04 18:48:46 +02:00
2012-11-09 01:06:43 +01:00
EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs $libs_mplayer
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
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
2010-03-17 14:55:59 +01:00
ARCH = $arch
2010-03-17 15:41:32 +01:00
$(mak_enable "$arch_all" "$arch" ARCH)
$(mak_enable "$subarch_all" "$subarch" ARCH)
2006-10-31 13:52:05 +01:00
2011-01-26 20:00:17 +01:00
NEED_GLOB = $need_glob
NEED_SHMEM = $need_shmem
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
2008-05-18 13:53:00 +02:00
APPLE_IR = $_apple_ir
2007-08-14 16:29:22 +02:00
APPLE_REMOTE = $_apple_remote
2007-04-22 22:43:28 +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
2006-11-27 23:02:06 +01:00
CDDB = $_cddb
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
2012-12-28 08:07:14 +01:00
SDL = $_sdl
SDL2 = $_sdl2
2012-10-05 15:17:16 +02:00
DSOUND = $_dsound
2008-06-02 14:24:28 +02:00
DVBIN = $_dvbin
DVDREAD = $_dvdread
2008-12-03 15:48:31 +01:00
DXR3 = $_dxr3
2008-06-02 14:24:28 +02:00
FTP = $_ftp
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
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
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
2008-08-03 17:57:18 +02:00
LIBSMBCLIENT = $_smb
2012-03-02 20:24:34 +01:00
LIBQUVI = $_libquvi
2008-06-02 14:24:28 +02:00
LIBTHEORA = $_theora
LIRC = $_lirc
2008-08-03 18:16:10 +02:00
MACOSX_FINDER = $_macosx_finder
2012-12-09 15:05:21 +01:00
MACOSX_BUNDLE = $_macosx_bundle
2008-11-30 14:22:34 +01:00
MNG = $_mng
2010-06-30 11:55:14 +02:00
MPG123 = $_mpg123
2010-07-17 15:14:53 +02:00
NETWORKING = $networking
2008-12-03 13:05:47 +01:00
OPENAL = $_openal
2008-10-04 13:06:50 +02:00
OSS = $_ossaudio
2008-06-02 14:24:28 +02:00
PE_EXECUTABLE = $_pe_executable
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
2008-06-02 14:24:28 +02:00
STREAM_CACHE = $_stream_cache
TV = $_tv
TV_V4L2 = $_tv_v4l2
VCD = $_vcd
2009-02-16 21:58:13 +01:00
VDPAU = $_vdpau
2008-06-02 14:24:28 +02:00
VSTREAM = $_vstream
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
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
ff_config_enable () {
2010-03-17 14:34:33 +01:00
list=$(echo $1 | tr '[a-z]' '[A-Z]')
item=$(echo $2 | tr '[a-z]' '[A-Z]')
2007-06-19 15:54:48 +02:00
_nprefix=$3;
test -z "$_nprefix" && _nprefix='CONFIG'
2010-03-17 14:34:33 +01:00
for part in $list; do
if $(echo $item | grep -q -E "(^| )$part($| )"); then
2007-06-19 15:54:48 +02:00
echo "#define ${_nprefix}_$part 1"
2006-12-23 03:47:38 +01:00
else
2009-01-15 16:56:24 +01:00
echo "#define ${_nprefix}_$part 0"
2006-12-23 03:47:38 +01:00
fi
done
}
2001-11-18 18:45:23 +01:00
echo "Creating config.h"
2007-08-27 13:40:25 +02:00
cat > $TMPH << EOF
2008-10-04 15:07:31 +02:00
/*----------------------------------------------------------------------------
** This file has been automatically generated by configure any changes in it
** will be lost when you run configure again.
** Instead of modifying definitions here, use the --enable/--disable options
** of the configure script! See ./configure --help for details.
*---------------------------------------------------------------------------*/
2001-02-24 21:28:24 +01:00
2003-11-02 14:45:24 +01:00
#ifndef MPLAYER_CONFIG_H
2008-02-21 17:35:00 +01:00
#define MPLAYER_CONFIG_H
2003-11-02 14:45:24 +01:00
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"
2010-03-08 21:48:50 +01:00
#define MPLAYER_LOCALEDIR "$_localedir"
2012-11-13 23:41:38 +01:00
$def_gettext
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_gethostbyname2
$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
$def_sysi86
$def_sysi86_iv
$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
$def_macosx_bundle
$def_macosx_finder
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
$def_pthread_cache
2001-08-17 02:38:10 +02:00
2005-11-06 18:42:20 +01:00
2008-10-16 22:44:05 +02:00
/* CPU stuff */
#define __CPU__ $iproc
2010-07-10 18:26:58 +02:00
$def_ebx_available
2010-03-17 11:10:47 +01:00
$(ff_config_enable "$arch_all" "$arch" "ARCH")
2010-03-17 14:20:06 +01:00
$(ff_config_enable "$subarch_all" "$subarch" "ARCH")
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
2009-02-08 23:49:52 +01:00
$def_bsdi_dvd
2012-03-21 00:57:58 +01:00
$def_cdda
2009-02-08 23:49:52 +01:00
$def_cddb
$def_cdio
$def_cdrom
$def_dvd
$def_dvd_bsd
$def_dvd_darwin
$def_dvd_linux
$def_dvd_openbsd
$def_dvdio
$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
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 15:15:19 +01:00
$def_avcodec_codec_desc_api
$def_avcodec_is_decoder_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
2001-02-24 21:28:24 +01:00
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
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_apple_ir
$def_apple_remote
$def_joystick
$def_lirc
$def_lircc
$def_pvr
$def_radio
$def_radio_capture
$def_radio_v4l2
$def_tv
$def_tv_v4l2
2006-08-28 19:05:18 +02:00
2002-05-12 03:07:25 +02:00
2008-10-16 22:44:05 +02:00
/* font stuff */
2009-02-08 23:49:52 +01:00
$def_ass
$def_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_closesocket
$def_ftp
$def_inet6
2009-02-01 15:38:28 +01:00
$def_inet_aton
$def_inet_pton
2010-07-17 15:14:53 +02:00
$def_networking
2009-02-08 23:49:52 +01:00
$def_smb
2012-03-02 20:24:34 +01:00
$def_libquvi
2009-02-08 23:49:52 +01:00
$def_socklen_t
$def_vstream
2008-08-29 18:20:35 +02:00
2012-03-31 01:13:38 +02:00
$def_lcms2
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
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_mng
$def_v4l2
2009-02-16 21:58:13 +01:00
$def_vdpau
2009-02-08 23:49:52 +01:00
$def_vm
$def_x11
2013-02-28 19:55:02 +01:00
$def_wayland
2009-02-08 23:49:52 +01:00
$def_xdpms
$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
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
$def_threads
2009-04-20 02:10:09 +02:00
$def_xform_asm
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.
2007-11-22 17:46:48 +01:00
cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
2007-08-27 13:40:25 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
cat << EOF
2010-06-09 11:27:29 +02:00
Config files successfully generated by ./configure $configuration !
2001-10-13 18:53:37 +02:00
2001-11-17 04:53:05 +01:00
Install prefix: $_prefix
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
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"