Commit Graph

2834 Commits

Author SHA1 Message Date
Diego Biurrun
5e27ef800b build: Add missing zlib dependencies for several protocols 2017-06-03 19:34:08 +02:00
Diego Biurrun
61cec5adaa tls: Hide backend implementation details from users
TLS is currently implemented over either OpenSSL or GnuTLS, with more
backends likely to appear in the future. Currently, those backend libraries
are part of the protocol names used during e.g. the configure stage of a
build. Hide those details behind a generically-named declaration for the
TLS protocol to avoid leaking those details into the configuration stage.
2017-06-02 10:41:52 +02:00
Martin Storsjö
4d444d04c1 configure: Default to _WIN32_WINNT=0x0502 (XP) as minimum, for legacy mingw
This makes the getaddrinfo functions visible, which aren't normally
by default on legacy mingw.

We already force __MSVCRT_VERSION__ to an XP version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-01 13:29:51 +03:00
Martin Storsjö
427f7a1f9e configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-31 13:30:24 +03:00
Luca Barbato
6a7e928555 configure: Do not check for the __builtin_vec_vsx_ld
Clang support for Altivec/VSX uses a different approach.
2017-05-29 13:40:47 +02:00
Martin Storsjö
d7320ca3ed arm: Avoid using .dn register aliases
clang now (in the upcoming 5.0 version) is capable of building our
arm assembly without relying on gas-preprocessor, although clang/LLVM
doesn't support .dn register aliases.

The VC1 MC assembly was only built and used if the chosen assembler
supported the .dn directives though. This was supported as long as
gas-preprocessor was used.

This means that VC1 decoding got a speed regression on clang 5.0,
unless the user manually chose using gas-preprocessor again.

By avoiding using the .dn register aliases, we can build the VC1 MC
assembly with the latest clang version.

Support for the .dn/.qn directives in clang/LLVM isn't actively planned,
see https://bugs.llvm.org/show_bug.cgi?id=18199.

This partially reverts 896a5bff64.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-15 09:52:18 +03:00
Martin Storsjö
59cee42d7d arm: Check for the .arch directive in configure
When targeting windows, the .arch directive isn't available.

So far, when building for windows, we've always used gas-preprocessor,
both when using msvc's armasm and when using clang. Lately, clang/llvm
has implemented the last missing piece (altmacro support) for building
our assembly without gas-preprocessor. This means that we now build
for arm/windows with clang without any extra compatibility layer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-08 14:21:08 +03:00
Diego Biurrun
b5f19f7478 aac: Split function to parse ADTS header data into public and private part
This makes the currently semi-public avpriv_aac_parse_header() function
private to libavcodec and adds a proper public API function to return
the parts of the ADTS header required in libavformat.
2017-05-02 18:50:34 +02:00
Luca Barbato
41262498ff configure: Fix sem_timedwait probe
It requires pthreads.
2017-04-25 00:38:07 +02:00
Luca Barbato
44aafa3325 configure: Properly escape arguments in filter/filter_out helper functions
The arguments may contain '$', which gets interpreted by the shell.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-04-25 00:38:07 +02:00
Paul B Mahol
9227bd8ac2 utvideodec: Reuse the huffyuv add_left
~10% faster when simd is available.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-04-15 15:37:18 +02:00
Diego Biurrun
b62ed68738 configure: Better names for functions that sanitize input 2017-04-03 14:39:08 +02:00
Mark Thompson
0fd91e4bfc vaapi_encode: Add VP9 support 2017-04-02 19:06:33 +01:00
Diego Biurrun
5a969f64b9 jack: Drop support for old (2012) JACK versions 2017-03-28 09:11:00 +02:00
Diego Biurrun
75ef915434 configure: Disable inline assembly for PathScale compilers
These compilers pass the inline assembly check, but fail to compile
our inline assembly in various ways.
2017-03-27 09:47:58 +02:00
Diego Biurrun
d6390090c4 configure: Skip check for inline assembly capabilities when explicitly disabled
Otherwise inline assembly may get enabled when disabled on the command line.
2017-03-24 20:24:08 +01:00
Diego Biurrun
dcc39ee10e lavc: Remove deprecated XvMC support hacks
Deprecated in 11/2013.
2017-03-23 10:09:14 +01:00
Luca Barbato
bd805964f4 configure: Do not treat JACK as a system library
JACK is not commonly installed and should not be picked up as a
dependency unless specifically requested.
2017-03-21 04:23:41 +01:00
Luca Barbato
0d8013b88b configure: Replace -no_weak_symbols with -Werror=partial-availability
Jack uses weak symbols on purpose.
2017-03-15 20:24:52 +01:00
Luca Barbato
81bffae368 configure: Check for -no_weak_imports in ldflags on macOS
Recent versions of macOS provide more POSIX API (in particular,
clock_gettime) than previous versions and recent Apple toolchains
provide all that API, even when targeting older releases without
said API. Disallow linking to functions which might not be available
at runtime.

To actually have an effect, either add
--extra-cflags="-mmacosx-version-min=10.11" (or any other version
prior to 10.12) or set MACOSX_DEPLOYMENT_TARGET=10.11 when running
configure.

As a workaround for libav versions without this fix, one can
also add --extra-cflags="-mmacosx-version-min=10.11
-Werror=partial-availability" while running configure.

The -no_weak_imports flag is new in Xcode 8; in Xcode 7 it is not
supported. This is not an issue since Xcode 7 only ships with the
10.11 macOS SDK, which lacks clock_gettime.

Bug-Id: 1033

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-07 09:48:55 +02:00
Diego Biurrun
57b753b445 build: Prefer NASM assembler over YASM
NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.
2017-03-07 08:32:37 +01:00
Diego Biurrun
f54037da8a build: Make x86 assembler commandline-selectable 2017-03-07 08:32:37 +01:00
Diego Biurrun
51411eb7ff build: Special-case handling of SDL CFLAGS
SDL adds some "special" CFLAGS that interfere with building normal
binaries. Capture those CFLAGS separately and avoid adding them to
the general CFLAGS.
2017-03-07 08:32:37 +01:00
Diego Biurrun
003124ebf4 build: Fix logic of clock_gettime() check
We should only check for clock_gettime() if _POSIX_MONOTONIC_CLOCK is
available and do a full link check for clock_gettime() in all cases.
2017-03-07 08:32:37 +01:00
Diego Biurrun
808ef43597 build: Explicitly set 32-bit/64-bit object formats for nasm/yasm
Consistently use object format names with "32" suffix and set object format
to "win64" on Windows x86_64, which fixes assembling with nasm.
2017-03-05 14:38:56 +01:00
Diego Biurrun
5ff3b5cafc build: Add pthreads to list of avutil extralibs
libavutil uses pthreads in the buffer code (abstracted through a header).
2017-03-01 12:02:11 +01:00
Diego Biurrun
3c0efbd033 build: Allow generating dependencies as a side-effect of assembling 2017-03-01 10:18:15 +01:00
Diego Biurrun
39e208f4d4 build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.
2017-03-01 10:18:15 +01:00
Diego Biurrun
58407b4d74 configure: Fix typo in objcc default setting
Also drop stray duplicate OBJCC config.mak entry.
2017-03-01 09:23:42 +01:00
Diego Biurrun
7cb1d9e2db build: Fine-grained link-time dependency settings
Previously, all link-time dependencies were added for all libraries,
resulting in bogus link-time dependencies since not all dependencies
are shared across libraries. Also, in some cases like libavutil, not
all dependencies were taken into account, resulting in some cases of
underlinking.

To address all this mess a machinery is added for tracking which
dependency belongs to which library component and then leveraged
to determine correct dependencies for all individual libraries.
2017-03-01 09:00:40 +01:00
Diego Biurrun
d154bdd3d0 configure: Simplify dlopen check 2017-03-01 09:00:40 +01:00
Diego Biurrun
21cca00dfe build: Explicitly disable external libraries when not explicitly enabled
Leaving those variables in an undefined state allows them getting implicitly
enabled when they are declared as weak dependencies of other components.
In that case, the library check is not run and required linker flags are not
added, resulting in a failing build.

Fixes linking when enabling libfreetype without libfontconfig.
2017-02-28 13:00:20 +01:00
Diego Biurrun
7208e5b5d6 configure: Restructure the way check_pkg_config() operates
Have check_pkg_config() enable variables and set cflags and extralibs
instead of relegating that task to require_pkg_config. This simplifies
require_pkg_config(), is consistent with what other helper functions
like check_lib() do and allows getting rid of some manual variable
setting in places where check_pkg_config() is used.
2017-02-20 20:16:05 +01:00
Diego Biurrun
54e39b102e configure: Explicitly spell out first require_pkg_config() parameter
This is less confusing than encountering "" in the argument list.
2017-02-20 20:16:05 +01:00
Diego Biurrun
d00a0d8e84 configure: Handle SDL version check through pkg-config 2017-02-16 09:28:33 +01:00
Diego Biurrun
871b4f3654 configure: Check for xcb as well as xcb-shape before enabling libxcb
Newer versions of libxcb have xcb-foo pkg-config files that do not declare
their xcb dependency so that required linker flags will not be generated.
2017-02-15 10:33:34 +01:00
Luca Barbato
0ee78020cd configure: Move up the avbuild directory creation
The early check for inconsistent in-source vs out-of-source build
cannot generate a config.log otherwise.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-02-11 15:47:43 +01:00
Diego Biurrun
c546147db0 configure: Correctly recurse in do_check_deps()
Fixes all sorts of configuration problems introducec by dad7a9c7c0
on non-Linux or non-vanilla configs. Also removes a line made redundant
in that commit.
2017-02-08 21:23:41 +01:00
Diego Biurrun
dad7a9c7c0 configure: Rework dependency handling for conflicting components
This makes the feature more visible and obvious.
2017-02-07 19:06:04 +01:00
Diego Biurrun
9127ac5ebc configure: Add name parameter to require_pkg_config() helper function
This allows distinguishing between the internal variable name for
external libraries and the pkg-config package name. Having both
names available avoids special-casing outside the helper function
when the two identifiers do not match.
2017-02-07 19:06:02 +01:00
Diego Biurrun
71a49fe25f configure: Use cppflags check helper functions where appropriate 2017-02-06 15:43:56 +01:00
Diego Biurrun
0ce3761c78 configure: Add stdlib.h #include to CPPFLAGS check helper functions
This ensures that added CPPFLAGS are validated against libc headers.
2017-02-06 15:43:56 +01:00
Diego Biurrun
bcaedef118 configure: Add require_cpp_condition() convenience function
Simplifies checking for conditions in external library headers and
aborting if said conditions are not met.
2017-02-02 17:49:51 +01:00
Diego Biurrun
aba7fdcc8b configure: Add require_header() convenience function
Simplifies checking for external library headers and aborting if
the external library support was requested, but is not available.
2017-02-02 17:49:51 +01:00
Diego Biurrun
a97563c889 configure: Simplify libxcb check 2017-02-02 17:38:50 +01:00
Diego Biurrun
acfa7a2178 configure: Drop weak dependencies on external libraries for webm muxer
Weak dependencies on external libraries do not obviate having to
explicitly enable these libraries, so the weak dependency does not
simplify the configure command line nor have any real effect.
2017-02-02 14:35:44 +01:00
Diego Biurrun
6698832079 configure: Add proper weak dependency of drawtext filter on libfontconfig 2017-02-02 14:35:44 +01:00
Diego Biurrun
24d5680bbc configure: Simplify inline asm check with appropriate helper function 2017-02-02 14:34:05 +01:00
Diego Biurrun
b3825723dc configure: Merge compiler/libc/os hacks sections 2017-02-02 14:34:05 +01:00
Anton Khirnov
fd9212f2ed Mark some arrays that never change as const. 2017-02-01 10:42:59 +01:00