aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2013-05-04 10:25:41 +0200
committerReinhard Tartler <siretart@tauware.de>2013-05-04 12:17:51 +0200
commitb1ee8eec849f17fce2f411a297de9cbf2edaeb3a (patch)
tree3f8118ac46f7578e0b9cb79b90affc9c95f3e341 /configure
parent95e8ac60f8b7317ce23c648250fdc8fb68d65a07 (diff)
downloadffmpeg-b1ee8eec849f17fce2f411a297de9cbf2edaeb3a.tar.gz
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index 269c70887d..5deb69ea0d 100755
--- a/configure
+++ b/configure
@@ -2210,6 +2210,10 @@ case "$toolchain" in
add_cflags -fsanitize=thread -pie
add_ldflags -fsanitize=thread -pie
;;
+ valgrind-memcheck)
+ target_exec_default="valgrind"
+ target_exec_args="--track-origins=yes --leak-check=full"
+ ;;
msvc)
cc_default="c99wrap cl"
ld_default="c99wrap link"
@@ -2226,7 +2230,7 @@ case "$toolchain" in
;;
esac
-set_default arch cc pkg_config sysinclude target_os
+set_default arch cc pkg_config sysinclude target_exec target_os
enabled cross_compile || host_cc_default=$cc
set_default host_cc
@@ -4024,7 +4028,7 @@ HOSTCC_DEPFLAGS=$HOSTCC_DEPFLAGS
HOSTCC_C=$HOSTCC_C
HOSTCC_O=$HOSTCC_O
HOSTLD_O=$HOSTLD_O
-TARGET_EXEC=$target_exec
+TARGET_EXEC=$target_exec $target_exec_args
TARGET_PATH=$target_path
LIBS-avplay=$sdl_libs
CFLAGS-avplay=$sdl_cflags