configure.ac: add --with-dmalloc= option to compile with (some) dmalloc support
authorwarlord <warlord@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 18 Oct 2002 20:15:30 +0000 (20:15 +0000)
committerwarlord <warlord@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 18 Oct 2002 20:15:30 +0000 (20:15 +0000)
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

configure.ac
shib-target/shib-ccache.cpp
shib-target/shibrpc-server.cpp

index 3c89907..f4e84a2 100644 (file)
@@ -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
index 264ac26..422e61a 100644 (file)
 #include <sstream>
 #include <stdexcept>
 
+#ifdef HAVE_LIBDMALLOCXX
+#include <dmalloc.h>
+#endif
+
 using namespace std;
 using namespace saml;
 using namespace shibboleth;
index aeb7b0c..ac3b1e2 100644 (file)
 #include <log4cpp/Category.hh>
 #include <sstream>
 
+#ifdef HAVE_LIBDMALLOCXX
+#include <dmalloc.h>
+#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;