- fixed build when using --enable-leak-detective
authorMartin Willi <martin@strongswan.org>
Tue, 23 May 2006 08:00:29 +0000 (08:00 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 23 May 2006 08:00:29 +0000 (08:00 -0000)
configure.in
src/libstrongswan/Makefile.am

index e9d6f19..938c161 100644 (file)
@@ -77,7 +77,6 @@ AC_ARG_ENABLE(
     [leak-detective],
     AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
     leak_detective=true
-    AC_DEFINE(LEAK_DETECTIVE)
 )
 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
 
index f7586e2..8443099 100644 (file)
@@ -20,6 +20,12 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan
 EXTRA_DIST = asn1/oid.txt asn1/oid.pl
 DISTCLEANFILES = asn1/oid.c asn1/oid.h
 
+if USE_LEAK_DETECTIVE
+  libstrongswan_la_LIBADD += -ldl
+  AM_CFLAGS = -DLEAK_DETECTIVE
+endif
+
+
 # TODO: get perl from ./configure
 PERL=perl