summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/configure.ac')
-rw-r--r--sca-cpp/trunk/configure.ac42
1 files changed, 41 insertions, 1 deletions
diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac
index cb85c3930e..6adf807db2 100644
--- a/sca-cpp/trunk/configure.ac
+++ b/sca-cpp/trunk/configure.ac
@@ -123,7 +123,6 @@ if test "${want_maintainer_mode}" = "true"; then
else
cxxflags="${cxxflags} -O2 -Wlogical-op -Wconversion"
fi
- ldflags="${ldflags} -pg"
AM_CONDITIONAL([WANT_MAINTAINER_MODE], true)
AC_DEFINE([WANT_MAINTAINER_MODE], 1, [compile with debugging and compile-time warnings])
else
@@ -158,6 +157,47 @@ else
AM_CONDITIONAL([WANT_PROFILING], false)
fi
+# Enable memory checking with electric fence.
+AC_MSG_CHECKING([whether to enable electric fence])
+AC_ARG_ENABLE(efence, [AS_HELP_STRING([--enable-efence], [link with electric fence [default=no]])],
+[ case "${enableval}" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ want_efence=true
+ ;;
+ esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_efence}" = "true"; then
+ ldflags="${ldflags} -lefence"
+ AM_CONDITIONAL([WANT_EFENCE], true)
+ AC_DEFINE([WANT_EFENCE], 1, [link with electric fence])
+else
+ AM_CONDITIONAL([WANT_EFENCE], false)
+fi
+
+# Enable usage of mmap for memory allocation.
+AC_MSG_CHECKING([whether to use mmap for memory allocation])
+AC_ARG_ENABLE(malloc-mmap, [AS_HELP_STRING([--enable-malloc-mmap], [use mmap for memory allocation [default=no]])],
+[ case "${enableval}" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ want_malloc_mmap=true
+ ;;
+ esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_efence}" = "true"; then
+ AM_CONDITIONAL([WANT_MALLOC_MMAP], true)
+ AC_DEFINE([WANT_MALLOC_MMAP], 1, [use mmap for memory allocation])
+else
+ AM_CONDITIONAL([WANT_MALLOC_MMAP], false)
+fi
+
# Enable multi-threading support.
AC_MSG_CHECKING([whether to compile for multi-threaded execution])
AC_ARG_ENABLE(threads, [AS_HELP_STRING([--enable-threads], [compile for multi-threaded execution [default=no]])],