base \
jsonrpc \
icinga \
- icinga-app \
- components
+ components \
+ icinga-app
icinga2docdir = ${prefix}/share/doc/icinga2
icinga2doc_DATA = \
WSADATA wsaData;
WSAStartup(MAKEWORD(1, 1), &wsaData);
#else /* _WIN32 */
+ LTDL_SET_PRELOADED_SYMBOLS();
+
lt_dlinit();
#endif /* _WIN32 */
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(); \
}
{
}
-EXPORT_COMPONENT(ConfigFileComponent);
+EXPORT_COMPONENT(configfile, ConfigFileComponent);
return 0;
}
-EXPORT_COMPONENT(ConfigRpcComponent);
+EXPORT_COMPONENT(configrpc, ConfigRpcComponent);
return 0;
}
-EXPORT_COMPONENT(DemoComponent);
+EXPORT_COMPONENT(demo, DemoComponent);
return 0;
}
-EXPORT_COMPONENT(DiscoveryComponent);
+EXPORT_COMPONENT(discovery, DiscoveryComponent);
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
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