Add built-in debug malloc wrapper.
[srvx.git] / configure.in
index 26ef7dd08e71511e2bdd62c4fcdbfdba63800ce2..81dd91dc3bff4a7836f14ae3062215a7c56ad981 100644 (file)
@@ -152,7 +152,7 @@ dnl Optional features.
 AC_MSG_CHECKING(which malloc to use)
 AC_ARG_WITH(malloc,
 [  --with-malloc=type      Enables use of a special malloc library; one of:
-                          system (the default), boehm-gc, dmalloc, mpatrol],
+                          system (the default), boehm-gc, dmalloc, mpatrol, srvx],
 [],
 [withval="system"])
 if test "x$withval" = "xsystem" ; then
@@ -176,6 +176,10 @@ elif test "x$withval" = "xboehm-gc" ; then
   AC_CHECK_LIB(dl, dlopen, , AC_MSG_ERROR([libdl library is missing.  boehm-gc build will fail.]))
   AC_CHECK_LIB(gc, GC_gcollect, , AC_MSG_ERROR([Boehm GC library is missing.  boehm-gc build will fail.]))
   AC_DEFINE(WITH_MALLOC_BOEHM_GC, 1, [Define if using the Boehm GC to garbage collect and check memory leaks])
+elif test "x$withval" = "xsrvx" ; then
+  AC_MSG_RESULT(srvx)
+  AC_DEFINE(WITH_MALLOC_SRVX, 1, [Define if using the srvx internal debug allocator])
+  MODULE_OBJS="$MODULE_OBJS alloc-srvx.\$(OBJEXT)"
 else
   AC_MSG_ERROR([Unknown malloc type $withval])
 fi