summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-11-26 10:18:05 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-11-26 10:18:05 +0100
commitd246050de440fae1a7b3eae50c18eca9d41cdda5 (patch)
tree147b57e5253394eab262ee664f03aa1c8c274a38
parente7b0516410b46994e419c99caf45e5ee831cc031 (diff)
downloadratpoison-d246050de440fae1a7b3eae50c18eca9d41cdda5.zip
If asked for, use the Electric Fence library.
-rw-r--r--configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 024f2bc..dc8dd02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,10 @@ AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[build with extra debugging
AC_MSG_RESULT(no)
fi],[AC_MSG_RESULT(no)])
+AC_ARG_WITH([electric-fence],
+ [AS_HELP_STRING([--with-electric-fence],
+ [Use the Electric Fence library (memory allocation debugging).])])
+
AC_ARG_WITH(xterm,AS_HELP_STRING([--with-xterm=PROG],[set the x terminal emulator used by ratpoison]),
term_prog=$withval, term_prog="xterm")
AC_DEFINE_UNQUOTED(TERM_PROG, "$term_prog", X terminal emulator to use)
@@ -138,8 +142,9 @@ AC_SUBST(X_LIBS)
AC_SUBST(X_EXTRA_LIBS)
AC_SUBST(X_CFLAGS)
-dnl Check for electric fence library
-dnl AC_CHECK_LIB(efence,malloc,,)
+AS_IF([test "$with_electric_fence" = yes],
+ [AC_CHECK_LIB([efence], [malloc], [],
+ [AC_MSG_ERROR([Couldn't find the Electric Fence library (-lefence)])])])
dnl Checks for header files.
AC_HEADER_STDC