]> granicus.if.org Git - icinga2/commitdiff
Added support for --disable-shared.
authorGunnar Beutner <gunnar@beutner.name>
Sat, 12 May 2012 14:12:26 +0000 (16:12 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Sat, 12 May 2012 14:12:26 +0000 (16:12 +0200)
Makefile.am
base/application.cpp
base/component.h
components/configfile/configfilecomponent.cpp
components/configrpc/configrpccomponent.cpp
components/demo/democomponent.cpp
components/discovery/discoverycomponent.cpp
configure.ac
icinga-app/Makefile.am

index f9d566af06d882792fa70423dd33bbd4ebe2ae97..643922b408d7c06aca2a19c02c6fb7c5c7453aec 100644 (file)
@@ -7,8 +7,8 @@ SUBDIRS = ltdl \
        base \
        jsonrpc \
        icinga \
-       icinga-app \
-       components
+       components \
+       icinga-app
 
 icinga2docdir = ${prefix}/share/doc/icinga2
 icinga2doc_DATA = \
index 6fd6fb64bd7f93d26c0b6275b3dd7087e4d11be2..e9a5a1fcaceb65355decaa776b93a6779a8a9e7d 100644 (file)
@@ -38,6 +38,8 @@ Application::Application(void)
        WSADATA wsaData;
        WSAStartup(MAKEWORD(1, 1), &wsaData);
 #else /* _WIN32 */
+       LTDL_SET_PRELOADED_SYMBOLS();
+
        lt_dlinit();
 #endif /* _WIN32 */
 
index 822f59dd2892ada33f018f7c85ef2ff8946fa92b..054a5872c4fb2f95035e4556f834a86be9e68212 100644 (file)
@@ -46,8 +46,14 @@ public:
 
 typedef Component *(*CreateComponentFunction)(void);
 
-#define EXPORT_COMPONENT(klass) \
-       extern "C" I2_EXPORT icinga::Component *CreateComponent(void)   \
+#ifdef _WIN32
+#      define SYM_CREATECOMPONENT(component) CreateComponent
+#else /* _WIN32 */
+#      define SYM_CREATECOMPONENT(component) component ## _LTX_CreateComponent
+#endif /* _WIN32 */
+
+#define EXPORT_COMPONENT(component, klass) \
+       extern "C" I2_EXPORT icinga::Component *SYM_CREATECOMPONENT(component)(void) \
        {                                                               \
                return new klass();                                     \
        }
index e709e0098ae2b12be327086132aa980dac4bad89..59fb080dacb825abce58731b97214d51e0709569 100644 (file)
@@ -104,4 +104,4 @@ void ConfigFileComponent::Stop(void)
 {
 }
 
-EXPORT_COMPONENT(ConfigFileComponent);
+EXPORT_COMPONENT(configfile, ConfigFileComponent);
index a81d5cab6842ef838d3f979b4bcda5ae2c9e9f51..86dbd8d1c1712bf2512ac407f15802d76ebcf0c9 100644 (file)
@@ -225,4 +225,4 @@ int ConfigRpcComponent::RemoteObjectRemovedHandler(const NewRequestEventArgs& ea
        return 0;
 }
 
-EXPORT_COMPONENT(ConfigRpcComponent);
+EXPORT_COMPONENT(configrpc, ConfigRpcComponent);
index cc31aa27fe678674ca2313ba95324825fecd366c..ef3f683beccc06ef0b0a3e71e92a15562a3feccb 100644 (file)
@@ -102,4 +102,4 @@ int DemoComponent::HelloWorldRequestHandler(const NewRequestEventArgs& nrea)
        return 0;
 }
 
-EXPORT_COMPONENT(DemoComponent);
+EXPORT_COMPONENT(demo, DemoComponent);
index 974a171f3bf24544ca19d228bdd368afb03d89e7..c13bbcbce60a03dd76d89e7488cf8be775f98180 100644 (file)
@@ -604,4 +604,4 @@ int DiscoveryComponent::DiscoveryTimerHandler(const TimerEventArgs& tea)
        return 0;
 }
 
-EXPORT_COMPONENT(DiscoveryComponent);
+EXPORT_COMPONENT(discovery, DiscoveryComponent);
index 6071c9fcee7b9eec1887750adcf8a6159dd15dde..fed66a4f8a8b38d6693db4901bb37bc67711e4d2 100644 (file)
@@ -36,7 +36,7 @@ fi
 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], []), [], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application]) ])
 
 
-LT_INIT([disable-static])
+LT_INIT([dlopen, disable-static])
 LT_CONFIG_LTDL_DIR([ltdl])
 LTDL_INIT
 
index 1fe4fbacfcc77ff3889cf6d313c25f4c2ee127bf..62625069792ee6ac1194fda5ac71460b1b4a6c0d 100644 (file)
@@ -17,4 +17,11 @@ icinga_CXXFLAGS = \
 
 icinga_LDADD = \
        ${top_builddir}/base/libbase.la \
-       ${top_builddir}/icinga/libicinga.la
+       ${top_builddir}/icinga/libicinga.la \
+       -dlopen ${top_builddir}/components/configfile/configfile.la \
+       -dlopen ${top_builddir}/components/configrpc/configrpc.la \
+       -dlopen ${top_builddir}/components/demo/demo.la \
+       -dlopen ${top_builddir}/components/discovery/discovery.la
+
+icinga_DEPENDENCIES = \
+       ${top_builddir}/components/configfile/configfile.la