From: warlord Date: Fri, 18 Oct 2002 20:15:30 +0000 (+0000) Subject: configure.ac: add --with-dmalloc= option to compile with (some) dmalloc support X-Git-Tag: 2.4~2676 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=ddd84bca7f45e36f225e2c9067462eed592c76b6;p=shibboleth%2Fsp.git configure.ac: add --with-dmalloc= option to compile with (some) dmalloc support add dmalloc.h to a couple of server-side files, if DMALLOC is turned on. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@157 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/configure.ac b/configure.ac index 3c89907..f4e84a2 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,16 @@ else CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi +AC_ARG_WITH(dmalloc, + AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]), + [if test x_$with_dmalloc != x_/usr; then + LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS" + CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS" + fi + AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,, + AC_MSG_ERROR([unable to find dmallocxx library])) + ]) + AC_ARG_WITH(xerces, AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]), [if test x_$with_xerces != x_/usr; then diff --git a/shib-target/shib-ccache.cpp b/shib-target/shib-ccache.cpp index 264ac26..422e61a 100644 --- a/shib-target/shib-ccache.cpp +++ b/shib-target/shib-ccache.cpp @@ -66,6 +66,10 @@ #include #include +#ifdef HAVE_LIBDMALLOCXX +#include +#endif + using namespace std; using namespace saml; using namespace shibboleth; diff --git a/shib-target/shibrpc-server.cpp b/shib-target/shibrpc-server.cpp index aeb7b0c..ac3b1e2 100644 --- a/shib-target/shibrpc-server.cpp +++ b/shib-target/shibrpc-server.cpp @@ -14,12 +14,15 @@ #include #include +#ifdef HAVE_LIBDMALLOCXX +#include +#endif + using namespace std; using namespace saml; using namespace shibboleth; using namespace shibtarget; - static std::string get_threadid (const char* proc) { static u_long counter = 0;