From 4acc8989ce04ce23532435c75d3a4406ed246f04 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 23 May 2006 08:00:29 +0000 Subject: [PATCH] - fixed build when using --enable-leak-detective --- configure.in | 1 - src/libstrongswan/Makefile.am | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index e9d6f19c0..938c161f0 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/src/libstrongswan/Makefile.am b/src/libstrongswan/Makefile.am index f7586e22e..84430998c 100644 --- a/src/libstrongswan/Makefile.am +++ b/src/libstrongswan/Makefile.am @@ -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