Re: [FFmpeg-devel] [PATCH 1/2] configure: use custom allocator extralibs when testing memalign and posix_memalign

2018-12-16 Thread Peter Ross
On Sun, Dec 09, 2018 at 09:27:54AM +1100, Peter Ross wrote:
> the memalign and posix_memalign tests currently fail when using a custom 
> allocator,
> because configure does not include the custom allocator library.

is any one using custom allocators? should i just apply these?

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] configure: use custom allocator extralibs when testing memalign and posix_memalign

2018-12-08 Thread Peter Ross
the memalign and posix_memalign tests currently fail when using a custom 
allocator,
because configure does not include the custom allocator library.
---
 configure | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 026aee6b25..4d7b2b37c3 100755
--- a/configure
+++ b/configure
@@ -5852,20 +5852,23 @@ check_builtin gmtime_r time.h "time_t *time; struct tm 
*tm; gmtime_r(time, tm)"
 check_builtin localtime_r time.h "time_t *time; struct tm *tm; 
localtime_r(time, tm)"
 check_builtin x264_csp_bgr "stdint.h x264.h" "X264_CSP_BGR"
 
+malloc_extralibs=
 case "$custom_allocator" in
 jemalloc)
 # jemalloc by default does not use a prefix
 require libjemalloc jemalloc/jemalloc.h malloc -ljemalloc
+malloc_extralibs=-ljemalloc
 ;;
 tcmalloc)
 require_pkg_config libtcmalloc libtcmalloc gperftools/tcmalloc.h 
tc_malloc
 malloc_prefix=tc_
+malloc_extralibs=${libtcmalloc_extralibs}
 ;;
 esac
 
 check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
-check_func  ${malloc_prefix}memalign&& enable memalign
-check_func  ${malloc_prefix}posix_memalign  && enable posix_memalign
+check_func  ${malloc_prefix}memalign ${malloc_extralibs} && enable memalign
+check_func  ${malloc_prefix}posix_memalign ${malloc_extralibs} && enable 
posix_memalign
 
 check_func  access
 check_func_headers stdlib.h arc4random
-- 
2.17.1

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel