do not build leak_detective.o if not enabled
authorMartin Willi <martin@strongswan.org>
Fri, 4 Apr 2008 11:38:16 +0000 (11:38 -0000)
committerMartin Willi <martin@strongswan.org>
Fri, 4 Apr 2008 11:38:16 +0000 (11:38 -0000)
src/libstrongswan/Makefile.am
src/libstrongswan/library.c

index e38f07c..e192c85 100644 (file)
@@ -44,7 +44,6 @@ utils.h utils.c \
 utils/host.c utils/host.h \
 utils/identification.c utils/identification.h \
 utils/iterator.h \
-utils/leak_detective.c utils/leak_detective.h \
 utils/lexparser.c utils/lexparser.h \
 utils/linked_list.c utils/linked_list.h \
 utils/enumerator.c utils/enumerator.h \
@@ -53,11 +52,6 @@ utils/randomizer.c utils/randomizer.h \
 utils/mutex.c utils/mutex.h \
 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
 
-if USE_INTEGRITY_TEST
-  libstrongswan_la_SOURCES += \
-  fips/fips_canister_end.c
-endif
-
 libstrongswan_la_LIBADD = -lpthread -ldl
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
@@ -66,6 +60,12 @@ AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" \
 
 if USE_LEAK_DETECTIVE
   AM_CFLAGS += -DLEAK_DETECTIVE
+  libstrongswan_la_SOURCES += utils/leak_detective.c utils/leak_detective.h
+endif
+
+if USE_INTEGRITY_TEST
+  libstrongswan_la_SOURCES += \
+  fips/fips_canister_end.c
 endif
 
 EXTRA_DIST = asn1/oid.txt asn1/oid.pl
index e265a1a..fe7498f 100644 (file)
@@ -23,7 +23,9 @@
 #include <chunk.h>
 #include <utils/identification.h>
 #include <utils/host.h>
+#ifdef LEAK_DETECTIVE
 #include <utils/leak_detective.h>
+#endif
 
 typedef struct private_library_t private_library_t;