summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-02-23 03:25:50 +0000
committerStef Walter <stef@memberwebs.com>2006-02-23 03:25:50 +0000
commitb3c5a880acf988f8792573b93f5b32cd36c0e917 (patch)
tree971091e88597d09af7acc7f838b77aebb118c6fa
parent05aae9da0ad2ba2e59c625d903fe646b6072336e (diff)
Add dmalloc support
-rw-r--r--configure.in27
1 files changed, 19 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index fa1a2b5..3f19d18 100644
--- a/configure.in
+++ b/configure.in
@@ -53,8 +53,8 @@ AC_PROG_MAKE_SET
# Debug mode
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],
- [Compile binaries in debug mode]))
+ AC_HELP_STRING([--enable-debug],
+ [Compile binaries in debug mode]))
if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -g -O0 -Wall"
@@ -76,11 +76,11 @@ AC_CHECK_LIB(nsl, getaddrinfo)
AC_HEADER_STDC
AC_CHECK_HEADERS([limits.h err.h paths.h],,)
AC_CHECK_HEADERS([unistd.h stdio.h stddef.h fcntl.h stdlib.h assert.h errno.h stdarg.h string.h netdb.h], ,
- [echo "ERROR: Required C header missing"; exit 1])
+ [echo "ERROR: Required C header missing"; exit 1])
# Check for linux type transparent proxy support
AC_CHECK_HEADERS([linux/netfilter_ipv4.h],
- AC_DEFINE(LINUX_TRANSPARENT_PROXY, 1, [Whether the system supports a linux type transparent proxy]),
+ AC_DEFINE(LINUX_TRANSPARENT_PROXY, 1, [Whether the system supports a linux type transparent proxy]),
,
[[
#ifdef HAVE_LIMITS_H
@@ -94,8 +94,8 @@ AC_TYPE_SIZE_T
# We use error checking mutexes whenever possible
AC_CHECK_DECL(PTHREAD_MUTEX_ERRORCHECK_NP, [AC_DEFINE(HAVE_ERR_MUTEX, 1, "Error Mutex Type")],
- [AC_CHECK_DECL(PTHREAD_MUTEX_ERRORCHECK, [AC_DEFINE(HAVE_ERR_MUTEX, 2)], ,
- [ #include <pthread.h> ])], [ #include <pthread.h> ])
+ [AC_CHECK_DECL(PTHREAD_MUTEX_ERRORCHECK, [AC_DEFINE(HAVE_ERR_MUTEX, 2)], ,
+ [ #include <pthread.h> ])], [ #include <pthread.h> ])
# Required Variables
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
@@ -105,13 +105,24 @@ AC_CHECK_GLOBAL(__argv)
# Required Functions
AC_CHECK_FUNCS([memset strerror malloc realloc getopt strchr tolower getaddrinfo], ,
- [echo "ERROR: Required function missing"; exit 1])
+ [echo "ERROR: Required function missing"; exit 1])
AC_CHECK_FUNCS([strlwr strlcat strlcpy strncat strncpy setenv daemon])
AC_CHECK_FUNCS([getline getdelim flockfile])
+# DMALLOC memory debugging
+AC_ARG_ENABLE(dmalloc,
+ AC_HELP_STRING([--enable-dmalloc],
+ [malloc memory debugging (default: no)]))
+
+if test "$enable_dmalloc" = "yes"; then
+ AC_DEFINE_UNQUOTED(WITH_DMALLOC, 1, [malloc memory debugging])
+ LIBS="${LIBS} -ldmalloc"
+ echo "enabling dmalloc memory debugging"
+fi
+
# Have to resolve this for the path below
if test "${prefix}" = "NONE"; then
- prefix=$ac_default_prefix
+ prefix=$ac_default_prefix
fi
AC_DEFINE_UNQUOTED(CONF_PREFIX, "`eval echo ${sysconfdir}`", [Installation Prefix] )