Commit Graph

2249 Commits

Author SHA1 Message Date
Martin Storsjö ef5b70affc configure: Check for support for labels in the inline assembly
Use this for enabling the ppc timer.h implementation only on
assemblers that support labels in the inline assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-11 18:53:02 +03:00
Luca Barbato d3635f3ab0 compat: wrap math.h to avoid AIX-specific clashes
AIX defines a class() function in its math.h header without any
guard.
2013-07-04 21:54:32 +02:00
Alex Smith 4f6b192e2e configure: Do not omit frame pointers for msvc/icl debug builds
Because O1 or O2 are required to build libav with msvc/icl, this must be
explicitly set instead of just omitting Oy.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 18:51:30 -04:00
Alex Smith 9f4a16c52e configure: Do not explicitly set Oy for msvc/icl
It is implied by O1 or O2, both of which are required to build libav
with msvc/icl.  Silences warnings when targeting x64 with icl.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 18:51:20 -04:00
Diego Biurrun ace87c19ed configure: whitespace cosmetics 2013-06-23 12:24:31 +02:00
Diego Biurrun 6dc6598692 configure: Simplify an expression with enabled_all. 2013-06-23 12:00:08 +02:00
Alex Smith f11e4045b9 configure: More msvc/icl combining
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-22 17:00:57 -04:00
Alex Smith e0d6e2fc67 configure: Remove unneeded icl inline compatibility definition
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-19 10:53:27 +03:00
Anton Khirnov 84d3ff50cd lavc: add a libwavpack encoder wrapper 2013-06-10 21:33:48 +02:00
Martin Storsjö 3965d404cc configure: Don't add -fPIC on windows targets
This avoids warnings about this option not having any effect on
this platform.

We still want to enable the pic configure item for these platforms
(if detected via the compiler builtin define __PIC__) to get proper
inline assembly workarounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:13 +03:00
Martin Storsjö 3fd0d166aa configure: Don't explicitly disable PIC for windows targets
This reverts e08c946c6 and 05165c2f7a. The actual intention of
e08c946c6 was to fix shared library builds for arm/win32, which
can also be accomplished in other ways.

Disabling pic on those platforms broke inline assembly on cygwin/64
(since some inline assembly requires knowing whether we are building
as PIC or not), and might also break inline assembly on other
compilers on windows.

As a side-effect, this unfortunately brings back all the warnings
about PIC not having any effect on that platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:10 +03:00
Martin Storsjö 2aa3325454 configure: arm: Don't try to enable pic for shared libraries on win32
The object file format doesn't support PIC loads in ARM assembly,
there are no relocation types in PE/COFF that correspond to
BFD_RELOC_32_PCREL (R_ARM_REL32 in ELF).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:06 +03:00
Kostya Shishkov 2d66a58ccd Go2Webinar decoder 2013-06-03 09:24:55 +02:00
Alex Smith 60f09c04d8 configure: icl: Merge -Qdiag-error parameters
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-05-31 14:39:30 -04:00
Alex Smith 14fb9d3d8c configure: Separate commonalities in msvc and icl flags
Allows for easier handling of flags that may be specific to icl or msvc.
Furthermore, simplify the handling of warnings and remarks thanks to
icl's support of -Wall on Windows.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-05-31 14:39:14 -04:00
Martin Storsjö 9f30fb5a77 configure: Don't pass -mthumb or -march= to MSVC
The modern MSVC for ARM always builds for thumb, and it can't be
disabled.

Also just use the default arch instead of trying to map the -march
parameter to MSVC's -arch parameter (which only takes the values
ARMv7VE and VFPv4).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-29 00:53:11 +03:00
Luca Barbato 0ba49d28a1 configure: support gcc-4.8 instrumentation
Since version 4.8 gcc sports asan and tsan integration that can
be leveraged when hunting bugs.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-28 17:22:16 +02:00
Martin Storsjö ba13606ca6 fate: Add a --target-samples path parameter
This allows having the samples accessible via different paths
on the target and on the host.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 17:16:54 +03:00
Anton Khirnov a3fc62e89e configure: make jack depend on pthreads 2013-05-27 21:56:14 +02:00
Alex Smith 322e4194dd msvc/icl: Intel Compiler support on Windows
Initial support for the ICL compiler on windows. Requires a new
c99wrap with ICL support (1.0.2+).

Currently not much different speed wise compared to msvc. In the
future with a few changes it can be made to support the inline asm.
This would be the primary reason for using it.

Passed all fate tests, versions tested:
    13.1.1.171 (2013 Update 3) x86 and x64
    12.1.5.344 (2011 Update 11) x86 and x64

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-25 17:52:44 +02:00
Laurent 9495cd170b configure: Fix check_exec_crash for ICL support
Change the check_exec_crash test to use a function pointer instead of
simply calling the function. The EBP availability test will crash when
compiled with ICL likely due to compiler optimization shenanigans.

Originally the check_exec_crash code was moved out of main to fix a
problem with gcc's treatment of non-leaf main on x86_32. Libav already
moved the code out of main but the addition of the function pointer will
prevent any inlining which fixes the remaining problem.

A function pointer is used since it is compiler agnostic (as opposed to
say __attribute__ ((noinline)) which would only work with gcc compatible
compilers).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-25 12:07:56 +02:00
Martin Storsjö 5b2b0b912d configure: Enable the strtod workaround when building for bionic
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-21 19:37:07 +03:00
Martin Storsjö 0b6899f154 configure: msvc: Set the target windows version to XP if no target is set
MSVC 2010 (or more precisely, Windows SDK 7.0 which comes with MSVC
2010) sets _WIN32_WINNT to the constant for Windows 7 if nothing is
set. This could lead to the libav configure script detecting and
using functions only present in Windows 7 or newer, which in most
cases isn't desired. If the caller explicitly wants this, the caller
can add the _WIN32_WINNT define via --extra-cflags, setting the desired
version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-19 18:22:32 +03:00
Luca Barbato edfe609fc9 configure: Add basic valgrind-massif support
With the parameter --toolchain valgrind-massif, the configure
script sets reasonable defaults that can be overridden as explained
in the documentation.
2013-05-18 21:29:17 +02:00
Kostya Shishkov 1232a1647a Apple Intermediate Codec decoder 2013-05-17 06:31:05 +02:00
Alex Smith 225a5f91cc configure: Use linker hardening flags on mingw
This makes it consistent with the msvc builds which automatically set
the DEP and ASLR flags by default.  There really is no good reason why
they shouldn't be set.

The fact that binutils does not set them on by default boggles the mind.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 14:42:08 +03:00
Martin Storsjö 05165c2f7a configure: Disable PIC for cygwin just as for win32/mingw
If this is explicitly disabled for win32/mingw, it should also
be disabled for cygwin, for consistency and for the same reasons
as for win32/mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-13 20:20:55 +03:00
Diego Biurrun 2c2c48a9bd configure: x86: Only enable cpunop on i686
The assembler may insert nopl instructions for cpunop, which are not
(universally) supported on i586 CPUs.
2013-05-12 21:23:38 +02:00
Diego Biurrun f54b55058a configure: Rename cmov processor capability to i686
The goal is to make the capapility slightly more general and have it
cover the availability of the nopl instruction in addition to cmov.
2013-05-12 21:23:38 +02:00
Martin Storsjö e08c946c68 configure: Explicitly disable PIC when targeting win32/mingw
These platforms do not have any notion of PIC. On some compilers,
enabling pic produces a number of warnings.

This avoids trying to produce PIC loads in the ARM assembly - there
are no relocation types in PE/COFF that correspond to
BFD_RELOC_32_PCREL (R_ARM_REL32 in ELF).

As a side-effect, this avoids enabling PIC on mingw64, getting rid
of the warnings about PIC not having any effect on that platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-12 19:45:33 +03:00
Martin Storsjö b1803c79dc configure: Use enable_weak when enabling pic
This allows it to be overridden, either by the user on the command
line, or by other sections of the configure script.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-12 19:45:26 +03:00
Martin Storsjö 06122c2533 msvc: Move linker pragma from config.h to libavutil/internal.h
This makes linking succeed for tools that include config.h but
don't link to libavutil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-08 01:28:25 +03:00
Anton Khirnov 9779f93066 configure: add dependencies to lavfi .pc file
The scale filter depends on sws, resample on lavr, and movie on lavf and
lavc.

Fixes Bug 502.
2013-05-07 12:32:14 +02:00
Anton Khirnov bce70f8170 configure: make avconv select (a)trim filters
They are now used for -ss/-t
2013-05-07 12:32:03 +02:00
Martin Storsjö 2cca96e670 configure: Check for getenv
When targeting the "windows store application" (metro) API subset
(or the windows phone API subset), the getenv function isn't
available. If it is unavailable, just define getenv to NULL.

The check uses check_func_headers, since the function actually
might exist in the libraries, but is hidden in the headers.

The fallback is in config.h since msvc can't do -D defines with
parameters on the command line, and it's used both within the
libraries and the frontend applications (so a libavutil internal
header wouldn't be enough).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-04 23:58:59 +03:00
Reinhard Tartler b1ee8eec84 configure: Add basic valgrind-memcheck support
With the parameter --valgrind-memcheck, the configure script sets
reasonable defaults that can be overridden as explained in the
documentation.

The idea of using set_defaults is from Luca Barbato.
2013-05-04 12:17:51 +02:00
Martin Storsjö 769d921f3e compat: msvc: Make sure the object files are included when linking statically
If building libav with -MD in the cflags (for making the MSVC compiler
generate code for using a dynamically linked libc), the system headers
that declare strtod, snprintf and vsnprintf declare the functions as
imported from a DLL. To hook up wrappers of our own for these functions,
the function names are defined to avpriv_*, so that the calling code
within libav calls the wrappers instead. Since these functions
are declared to be imported from DLLs, the calling code expects to
load them from DLL import function pointers (creating references to
_imp__avpriv_strtod instead of directly to avpriv_strtod). If the
libav libraries are not built as DLLs, no such function pointers (as
the calling code expects) are created.

The linker can fix this up automatically in some cases (producing
warnings LNK4217 and LNK4049), if the object files are already
included. By telling the linker to try to include those symbols
(without the _imp prefix as the calling code ends up using),
we get the object files included, so that the linker can do the
automatic fixup. This is done via config.h, so that all (or at least
most) of the object files in our libraries force including the compat
files, to make sure they are included regardless of what files from our
static libraries actually are included.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-03 13:34:34 +03:00
Martin Storsjö ffb068ce8e configure: Don't do enable_deep_weak on disabled variables
This avoids cases where configure tries to weakly enable an item
which actually is disabled, ending up still enabling dependencies
of the item which itself is only enabled weakly.

More concretely, the h264 decoder suggests error resilience, which
is then enabled weakly (unless manually disabled). Previously,
dsputil, which is a dependency of error resilience, was enabled
even if error resilience wasn't enabled in the end.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-02 22:31:57 +03:00
Martin Storsjö 4d810ad2e9 configure: Use a different variable name in push/popvar
The variable name 'var' is commonly used to iterate through arguments
in other functions. When the pushvar function internally uses the
variable 'var', it makes pushing/popping the variable 'var' not
work as intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-02 22:31:55 +03:00
Ronald S. Bultje 28bc406c84 mjpeg: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:38 +03:00
Ronald S. Bultje 1277dc07fb svq1enc: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:32 +03:00
Ronald S. Bultje 2f6bc5f7c1 svq3: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:27 +03:00
Ronald S. Bultje f4fed5a2f9 mpegvideo: Use hpeldsp instead of dsputil for half-pel functions
This also converts vc1, since that is mpegvideo-based.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:21 +03:00
Ronald S. Bultje 6caa44aa7d svq1: Use hpeldsp instead of dsputil for half-pel functions
This makes svq1 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:14 +03:00
Ronald S. Bultje c10470035e mimic: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:08 +03:00
Ronald S. Bultje 8071264f21 interplayvideo: Use hpeldsp instead of dsputil for half-pel functions
This makes interplayvideo independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:02 +03:00
Ronald S. Bultje 0f0a11d576 bink: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:56 +03:00
Ronald S. Bultje 8f992dc8c7 indeo3: Use hpeldsp instead of dsputil for half-pel functions
This makes the Indeo 3 decoder independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:50 +03:00
Ronald S. Bultje cb7ecb7563 vp56: Use hpeldsp instead of dsputil for half-pel functions
This makes vp5 and vp6 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:33 +03:00
Ronald S. Bultje 3bd062bf7f vp3: Use hpeldsp instead of dsputil for half-pel functions
This makes vp3 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:26 +03:00