diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2013-01-26 20:41:15 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2013-01-26 20:41:15 +0000 |
commit | cf12f66566b736bafe4857066baec5141150b592 (patch) | |
tree | 41f9d0959c73d69c03934f89c50bfc485ac146aa /configure.in | |
parent | 7c1397a7f6f63d6f7cf1053d60fab3872eb55616 (diff) | |
download | libapr-cf12f66566b736bafe4857066baec5141150b592.tar.gz |
Add valgrind support
Teach valgrind about apr pools, allocators, and bucket allocators
if --with-valgrind is passed to configure.
This has less impact on program behavior and performance than compiling
with complete pool-debugging. Even with valgrind support compiled in,
the performance impact if not running under valgrind should be minimal.
It may make sense to use pool-debugging together with valgrind support
because pool-debugging does not help with allocators and bucket
allocators.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1438957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 84ba990c1..914616846 100644 --- a/configure.in +++ b/configure.in @@ -839,6 +839,22 @@ AC_ARG_WITH(efence, [ AC_MSG_ERROR(Electric Fence requested but not detected) ]) ]) +AC_ARG_WITH(valgrind, + [ --with-valgrind[[=DIR]] Enable code to teach valgrind about apr pools + (optionally: set path to valgrind headers) ], + [ if test "$withval" != no; then + if test "$withval" = yes; then + withval=/usr/include/valgrind + fi + APR_ADDTO(CPPFLAGS, -I$withval) + AC_CHECK_HEADERS(valgrind.h memcheck.h) + APR_IFALLYES(header:valgrind.h header:memcheck.h, + [AC_DEFINE(HAVE_VALGRIND, 1, [Compile in valgrind support]) ], + [AC_MSG_ERROR(valgrind headers not found) ] + ) + fi ] +) + AC_CHECK_FUNCS(sigsuspend, [ have_sigsuspend="1" ], [ have_sigsuspend="0" ]) AC_CHECK_FUNCS(sigwait, [ have_sigwait="1" ], [ have_sigwait="0" ]) dnl AC_CHECK_FUNCS doesn't work for this on Tru64 since the function |