summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2014-05-14 20:13:25 +0000
committerStefan Fritsch <sf@apache.org>2014-05-14 20:13:25 +0000
commit4d8845fcb4179fddd89477fee852840593f66025 (patch)
tree123420d230e0af0ab83fd5429cba3e547a923fbe /configure.in
parent277d5dfd9bcc5a0c32ebb8adb9dc2a4fcab47bc6 (diff)
downloadapr-4d8845fcb4179fddd89477fee852840593f66025.tar.gz
Merge non-apr-util parts of r1438957 from trunk:
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. The macros in include/private/apr_support.h (which does not exist in 1.6) were folded into memory/unix/apr_pools.c. All other users of the macros are in apr-util in 1.x and could not use a header that is private to apr, anyway. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1594699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 6763b6a9c..86cad685c 100644
--- a/configure.in
+++ b/configure.in
@@ -833,6 +833,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