aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-02-03 07:25:10 +0000
committerPeter Palfrader <peter@palfrader.org>2005-02-03 07:25:10 +0000
commitddd724ef94cbd77564ecba6662147eff99dd7dc1 (patch)
tree340fa84af0ef540fcd6fe5c9e56db1fa20dbf249 /configure.in
parentdfa3a0220f5c4fd03c9f26b6303bf10ee578404f (diff)
downloadtor-ddd724ef94cbd77564ecba6662147eff99dd7dc1.tar
tor-ddd724ef94cbd77564ecba6662147eff99dd7dc1.tar.gz
Add --with-dmalloc configure option
svn:r3508
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index e33dab3fa..5fdbeec67 100644
--- a/configure.in
+++ b/configure.in
@@ -214,6 +214,25 @@ if test $tor_cv_null_is_zero = yes; then
[Define to 1 iff memset(0) sets pointers to NULL])
fi
+# Whether we should use the dmalloc memory allocation debugging library.
+AC_MSG_CHECKING(wether to use dmalloc (debug memory allocation library))
+AC_ARG_WITH(dmalloc,
+[ --with-dmalloc Use debug memory allocation library. ],
+[if [[ "$withval" = "yes" ]]; then
+ dmalloc=1
+ AC_MSG_RESULT(yes)
+else
+ dmalloc=1
+ AC_MSG_RESULT(no)
+fi], [ dmalloc=0; AC_MSG_RESULT(no) ]
+)
+
+if [[ $dmalloc -eq 1 ]]; then
+ AC_SEARCH_LIBS(dmalloc_malloc, [dmalloc], , AC_MSG_ERROR(Libdmalloc library not found. If you enable it you better have it installed.))
+ AC_DEFINE(USE_DMALLOC, 1, [Debug memory allocation library])
+ AC_DEFINE(DMALLOC_FUNC_CHECK, 1, [Enable dmalloc's malloc function check])
+fi
+
# $prefix stores the value of the --prefix command line option, or
# NONE if the option wasn't set. In the case that it wasn't set, make
# it be the default, so that we can use it to expand directories now.