mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
configure: fix --custom-allocator
The custom-allocator logic has been completely defunct since a while, since nothing depends on those targets, they never get used. This updates jemalloc to pkg-config, adds the fallback option for potential arbitrary allocators, and finally actually adds the libraries to LDFLAGS.
This commit is contained in:
parent
3c6516330f
commit
3914abf76e
16
configure
vendored
16
configure
vendored
@ -6358,16 +6358,26 @@ if enabled float16; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$custom_allocator" in
|
case "$custom_allocator" in
|
||||||
|
"")
|
||||||
|
;;
|
||||||
jemalloc)
|
jemalloc)
|
||||||
# jemalloc by default does not use a prefix
|
test -n "$malloc_prefix" ||
|
||||||
require libjemalloc jemalloc/jemalloc.h malloc -ljemalloc
|
malloc_prefix=$($pkg_config --variable=jemalloc_prefix $pkg_config_flags jemalloc 2>/dev/null)
|
||||||
|
require_pkg_config custom_allocator jemalloc jemalloc/jemalloc.h ${malloc_prefix}malloc
|
||||||
;;
|
;;
|
||||||
tcmalloc)
|
tcmalloc)
|
||||||
require_pkg_config libtcmalloc libtcmalloc gperftools/tcmalloc.h tc_malloc
|
require_pkg_config custom_allocator libtcmalloc gperftools/tcmalloc.h tc_malloc
|
||||||
malloc_prefix=tc_
|
malloc_prefix=tc_
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
require_pkg_config custom_allocator "$custom_allocator" stdlib.h malloc
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test -n "$custom_allocator"; then
|
||||||
|
add_extralibs "$custom_allocator_extralibs"
|
||||||
|
fi
|
||||||
|
|
||||||
check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
|
check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
|
||||||
check_func ${malloc_prefix}memalign && enable memalign
|
check_func ${malloc_prefix}memalign && enable memalign
|
||||||
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
|
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
|
||||||
|
Loading…
x
Reference in New Issue
Block a user