Force link of checksum builder against libhydra/libcharon
[strongswan.git] / src / checksum / checksum_builder.c
index dc1de99..94b04c6 100644 (file)
@@ -19,6 +19,8 @@
 #include <dlfcn.h>
 
 #include <library.h>
+#include <hydra.h>
+#include <daemon.h>
 #include <utils/enumerator.h>
 
 /* we need to fake the pluto symbol to dlopen() the xauth plugin */
@@ -127,6 +129,10 @@ int main(int argc, char* argv[])
 {
        int i;
 
+       /* forces link against libhydra/libcharon */
+       hydra = NULL;
+       charon = NULL;
+
        /* avoid confusing leak reports in build process */
        setenv("LEAK_DETECTIVE_DISABLE", "1", 0);
        library_init(NULL);
@@ -149,9 +155,15 @@ int main(int argc, char* argv[])
                build_binary_checksum(argv[i]);
        }
        build_plugin_checksums(S_PLUGINS, S_PATH);
+#ifdef H_PLUGINS
        build_plugin_checksums(H_PLUGINS, H_PATH);
+#endif
+#ifdef P_PLUGINS
        build_plugin_checksums(P_PLUGINS, P_PATH);
+#endif
+#ifdef C_PLUGINS
        build_plugin_checksums(C_PLUGINS, C_PATH);
+#endif
 
        printf("};\n");
        printf("\n");