Commit Graph

2950 Commits

Author SHA1 Message Date
Steve Lhomme
abf806f7f1 random_seed: use bcrypt instead of the old wincrypt API
Remove the wincrypt API calls since we don't support XP anymore and
bcrypt is available since Vista, even on Windows Store builds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-04-19 10:54:26 +03:00
wm4
c7ab6aff66 w32pthreads: always use Vista+ API, drop XP support
This removes the XP compatibility code, and switches entirely to SRW
locks, which are available starting at Windows Vista.

This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.

Windows XP is hereby not a supported build target anymore.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-04-09 21:58:39 +02:00
Diego Biurrun
e744281c49 configure: Revert some incorrect uses of check_cc() 2018-03-30 10:12:13 +02:00
Sven Dueking
a2fc8dbae8 Add Haivision SRT protocol
The protocol requires libsrt (https://github.com/Haivision/srt) to be
installed

Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-28 16:16:41 +02:00
Diego Biurrun
2124a97a49 configure: Drop unused helper function test_cflags_cpp() 2018-03-27 13:38:20 +02:00
Diego Biurrun
434b44cd6f configure: Simplify vararg check 2018-03-26 18:59:44 +02:00
Diego Biurrun
8c7554e6a9 configure: Add check_x86asm() helper function to simplify some expressions 2018-03-26 18:59:43 +02:00
Diego Biurrun
17ee5b0c13 configure: Use indirection for the -o assembler flag also for x86asm
Similar indirections are used for the -o compiler/assembler flag to
account for differences in compiler/assembler syntax. For x86asm half
the infrastructure for doing the same currently exists unused.
Finish and use that infrastructure for consistency.
2018-03-26 18:54:56 +02:00
Diego Biurrun
b9ea301e02 configure: Use a more sensible suffix for x86 assembly tempfiles 2018-03-26 18:52:04 +02:00
Diego Biurrun
5292e97c42 configure: Document available options for the --toolchain parameter 2018-03-26 18:52:04 +02:00
Martin Storsjö
ea2f72a2c1 configure: Don't assume a 16 byte aligned stack on BSDs on i386
With GCC, request it to maintain 16 byte alignment, and the existing
entry points already align it via attribute_align_arg.

With clang, do the same as for mingw; disable the aligned stack
and let the assembly functions that require it do the alignment
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-17 22:27:42 +02:00
Martin Storsjö
847190ebd9 configure: Don't assume an aligned stack on clang on windows
If we'd enable a 16 byte aligned stack, clang/llvm would also assume
that alignment everywhere and produce code that strictly requires it.
That would require adding realignment (via attribute_align_arg) on every
single public library function or enable -mstackrealign (which does the
same on every single function).

Also relatedly; the parameter currently tested (-mllvm
-stack-alignment=16) hasn't actually been supported for quite some
time; current clang versions use -mstack-alignment=16 for the same.
Actually testing for that parameter would be a different change
though, since it has a real risk of changing behaviour on any other
platform where clang is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-13 15:25:12 +02:00
Luca Barbato
43778a501f Support AV1 encoding using libaom 2018-03-12 12:10:33 +01:00
Luca Barbato
c438899a70 Add AV1 video decoding support through libaom
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-12 08:12:43 +01:00
Diego Biurrun
dd7e63af93 configure: Restore original endianness test
Previously the bit pattern for the endianness test was declared as a
global, instead of a local, variable. This ensures that the pattern
appears unchanged in the object file and is not optimized out.
2018-03-08 14:02:30 +01:00
Diego Biurrun
31a53ab34e configure: Add check_as() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
18dc1ff0fb configure: Add check_ld() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
9c37d765ef configure: Add check_cc/require_cc helper functions to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
83fef16b6a configure: Add check_cpp_condition() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
a5e011c8dc configure: Add check_cmd() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
49804dc2ba configure: Use test_ prefix for helper functions that do not set variables 2018-03-07 13:55:06 +01:00
Diego Biurrun
8c893aa3cd configure: Drop unnecessary variables, shifts, and quotes in helper functions 2018-03-07 13:55:06 +01:00
Diego Biurrun
121314895f configure: Fix logic of AMF external library check
Fail if AMF is requested but unavailable, as we do for all
other external libraries that need to be explicitly enabled.
2018-03-07 13:53:27 +01:00
Martin Storsjö
cc1c94dacd configure: Pass the right machine types to dlltool for arm and arm64 mingw
These are supported by llvm-dlltool.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:41 +02:00
Martin Storsjö
97eee953e6 Revert "configure: Stop using dlltool to create an import library"
This reverts commit 67c72f08a4.

While the linker produced import libraries might work with MSVC in
simple test cases, they don't if e.g. linking to multiple GNU ld
produced import libraries at the same time. (They end up importing
functions from the wrong libraries.) The ones produced by dlltool
work fine though.

This issue was pointed out by Hendrik Leppkes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:09 +02:00
Diego Biurrun
fd36cf6bf6 configure: Factorize check_64_bit() 2018-02-06 11:13:19 +01:00
Diego Biurrun
38434a9ff5 configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
2018-02-06 11:13:10 +01:00
Diego Biurrun
bca41545b3 configure: Group code that sets the license string with licensing checks
This also moves the setting of the licensing string out of a block that
is skipped when quiet operation is requested.
2018-02-06 10:03:15 +01:00
Michael Wootton
34c113335b Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-04 18:15:56 +01:00
Mark Thompson
2a4d34d462 lavc: Delete all fake hwaccels
They are now unused.
2017-12-19 23:22:35 +00:00
Mark Thompson
433522a1b9 lavc: Remove register mechanism for hwaccels
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
2017-12-19 23:22:35 +00:00
Martin Storsjö
3152058bf1 libavcodec: Don't use dllexport, only dllimport when building DLLs
The only purpose of dllexport (which is set while building the library
that exports the symbols) is to have the linker automatically
export such symbols into a DLL without using a def file - it doesn't
affect the generated code.

For both MSVC and mingw builds, this isn't essential since we override
what symbols to export via an autogenerated def file instead.

Update a comment in configure to refer to the right concept.

With lld, this avoids warnings about duplicate export directives,
when some symbols are requested to be exported both via dllexport
attributes and via the autogenerated def file.

This also reduces the number of lines of code marginally.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-11-19 22:01:38 +02:00
Martin Storsjö
bad7ce1d82 makedef: Pass EXTERN_PREFIX from configure to makedef
This avoids having to use either "dumpbin -headers" to find out
the current architecture, or pass $ARCH from configure to deduce it.

When configuring with --disable-asm, ARCH is equal to "c", which doesn't
give any indication of what symbol prefix is to be used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-11-16 16:54:08 +02:00
Diego Biurrun
d070b9b703 configure: Coalesce some arch configuration and PIC handling 2017-11-15 13:29:41 +01:00
Diego Biurrun
9e48de3cc8 configure: Miscellaneous minor changes
- Move a variable closer to where it is used
- Add an explanatory comment
- Simplify a crosscompile check
- Minor SHFLAGS simplification
- Coalesce some threads tests
2017-11-15 13:29:41 +01:00
James Almer
b72ac6dbb8 configure: fix writing library dependencies to config.sh
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-12 23:02:31 -03:00
Diego Biurrun
17b6c7efb4 build: Add missing config.sh dependency for pkg-config files
Also only update config.sh when it changed to avoid spurious rebuilds.
2017-11-09 15:22:03 +01:00
Diego Biurrun
8e0febe28e configure: Use right variable and right value for AIX ar flags 2017-11-04 22:26:23 +01:00
Diego Biurrun
2cf3c0ab0d Revert "configure: Detect AIX ar command instead of hardcoding it in the OS section"
This reverts commit 4822ee3ca6.
AIX is a fringe oddity. Do not clutter the main codepath with AIX workarounds.
2017-11-03 16:46:27 +01:00
Diego Biurrun
9b0aff51a7 configure: Simplify MIPS instruction set handling 2017-11-02 11:00:25 +01:00
Diego Biurrun
192fe52e42 configure: Miscellaneous minor changes to config file handling
- Move generating config.fate to a more sensible place.
- Move printing warnings to a more appropriate place.
- Improve "generated by" comment in libavutil/avconfig.h.
- Drop pointless informative output about generating config files.
- Write a standard comment header to config.asm as well.
2017-11-02 11:00:24 +01:00
Diego Biurrun
14bba662d4 configure: Remove unused apply() helper function 2017-11-02 10:55:47 +01:00
Diego Biurrun
61a17423d3 configure: Miscellaneous small changes to helper functions
- Reuse sanitize_var_name() where appropriate
- Add some quotes to enabled()/disabled() to ease readability
- Fix logged names of some helper functions
- Filter LDFLAGS also in test_ldflags()
2017-11-02 10:55:47 +01:00
Martin Storsjö
67c72f08a4 configure: Stop using dlltool to create an import library
There shouldn't be any functional difference between the import
library created by dlltool and the one produced by the linker itself.
Keep installing it with both names though, for compatibility with users
that expect both to exist.

The dlltool step was added in ec10a9ab4; prior to that, a MSVC
compatible import library was generated using lib.exe. After that
commit, there was no functional difference between the two import
libraries (and since MSVC 2012, link.exe works just fine with the
GNU binutils generated one).

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-10-30 21:22:24 +02:00
Diego Biurrun
9dc79b2943 configure: Drop support for legacy PGI compiler 2017-10-25 13:39:58 +02:00
Diego Biurrun
0af8a72174 build: Drop support for legacy TI ARM compiler 2017-10-25 13:39:58 +02:00
Mark Thompson
a126b67e1b configure: Add config option for libva2 (VAAPI 1) 2017-10-24 23:53:44 +01:00
Diego Biurrun
68649bfed3 configure: Group system feature variables and system libraries together 2017-10-22 05:53:03 +02:00
Diego Biurrun
62be1caf16 configure: Bail out early if neither static nor shared libs are built 2017-10-19 18:09:39 +02:00
Diego Biurrun
c6496de334 configure: Move enabling libc_type into probe_libc() function 2017-10-19 18:09:39 +02:00