summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-01-24 12:18:18 +0000
committerstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-01-24 12:18:18 +0000
commit15884a7d0f4f491bad32f5a800ca73b841393784 (patch)
tree775d36ed1a0d13f9ddbac7784e4d62cae3906acd /configure.in
parenta3819ce4e48e40fb4628f262a9226631bb618802 (diff)
downloadlibapr-15884a7d0f4f491bad32f5a800ca73b841393784.tar.gz
Introduce a new configure option: --enable-pool-debug
This allows us to select the pools debug mode at configure time without messing about in source files. At the same time we switch to a flag system, so different debug features can be switched on or off. e.g.: --enable-pool-debug="verbose lifetime" git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in41
1 files changed, 41 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index fdb409ada..105261c8a 100644
--- a/configure.in
+++ b/configure.in
@@ -188,6 +188,47 @@ AC_ARG_ENABLE(profile,[ --enable-profile Turn on profiling for the build
fi
)dnl
+AC_ARG_ENABLE(pool-debug,
+ [ --enable-pool-debug[[=yes|no|verbose|lifetime|owner|all]] Turn on pools debugging],
+ [ if test -z "$enableval"; then
+ APR_ADDTO(CPPFLAGS, -DAPR_POOL_DEBUG=1)
+ elif test ! "$enableval" = "no"; then
+ apr_pool_debug=1
+
+ for i in $enableval
+ do
+ flag=0
+
+ case $i in
+ yes)
+ flag=1
+ ;;
+ verbose)
+ flag=2
+ ;;
+ lifetime)
+ flag=4
+ ;;
+ owner)
+ flag=8
+ ;;
+ all)
+ apr_pool_debug=15
+ ;;
+ *)
+ ;;
+ esac
+
+ if test $flag -gt 0; then
+ apr_pool_debug=`expr '(' $apr_pool_debug - $apr_pool_debug % \
+ '(' $flag '*' 2 ')' ')' + $flag + $apr_pool_debug % $flag`
+ fi
+ done
+
+ APR_ADDTO(CPPFLAGS, -DAPR_POOL_DEBUG=$apr_pool_debug)
+ fi
+ ])
+
dnl Electric Fence malloc checker.
dnl --with-efence specifies the path to Electric Fence
AC_ARG_WITH(efence,