From 04472c5a8595f67555fcf2917d1f57e31aa506fd Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 6 Apr 2012 09:10:22 +0200 Subject: [PATCH] Fixed *NIX build --- base/Makefile.am | 4 ++-- base/application.cpp | 2 +- configfilecomponent/Makefile.am | 7 +++++-- configrpccomponent/Makefile.am | 5 ++++- icinga/Makefile.am | 4 +++- icinga/endpointmanager.cpp | 2 +- jsonrpc/Makefile.am | 4 +++- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/base/Makefile.am b/base/Makefile.am index 1be3ec21e..34afd6292 100644 --- a/base/Makefile.am +++ b/base/Makefile.am @@ -50,5 +50,5 @@ libbase_la_SOURCES = \ libbase_la_LIBADD=$(LIBLTDL) -AM_CFLAGS=$(LTDLINCL) -AM_CXXFLAGS=$(LTDLINCL) +libbase_la_CFLAGS=$(LTDLINCL) -DI2_BASE_BUILD +libbase_la_CXXFLAGS=$(LTDLINCL) -DI2_BASE_BUILD diff --git a/base/application.cpp b/base/application.cpp index 1f50c454f..c829a3c27 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -386,7 +386,7 @@ int application_main(int argc, char **argv, Application::Ptr instance) #ifndef _WIN32 struct sigaction sa; memset(&sa, 0, sizeof(sa)); - sa.sa_handler = sigint_handler; + sa.sa_handler = application_sigint_handler; sigaction(SIGINT, &sa, NULL); #endif /* _WIN32 */ diff --git a/configfilecomponent/Makefile.am b/configfilecomponent/Makefile.am index f148af252..6f3ac1e8e 100644 --- a/configfilecomponent/Makefile.am +++ b/configfilecomponent/Makefile.am @@ -8,7 +8,10 @@ libconfigfilecomponent_la_SOURCES = \ configfilecomponent.h \ i2-configfilecomponent.h -libconfigfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base -I${top_srcdir}/jsonrpc +libconfigfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base \ + -I${top_srcdir}/jsonrpc \ + -I${top_srcdir}/cJSON libconfigfilecomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -libconfigfilecomponent_la_LIBADD = ${top_builddir}/base/libbase.la ${top_builddir}/cJSON/libcJSON.la \ No newline at end of file +libconfigfilecomponent_la_LIBADD = ${top_builddir}/base/libbase.la \ + ${top_builddir}/cJSON/libcJSON.la \ No newline at end of file diff --git a/configrpccomponent/Makefile.am b/configrpccomponent/Makefile.am index 8a57eb2cb..001e14624 100644 --- a/configrpccomponent/Makefile.am +++ b/configrpccomponent/Makefile.am @@ -8,7 +8,10 @@ libconfigrpccomponent_la_SOURCES = \ configrpccomponent.h \ i2-configrpccomponent.h -libconfigrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base -I${top_srcdir}/jsonrpc -I${top_srcdir}/icinga +libconfigrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base \ + -I${top_srcdir}/jsonrpc \ + -I${top_srcdir}/cJSON \ + -I${top_srcdir}/icinga libconfigrpccomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -pthread libconfigrpccomponent_la_LIBADD = ${top_builddir}/base/libbase.la \ diff --git a/icinga/Makefile.am b/icinga/Makefile.am index 17173c70c..a6856e7da 100644 --- a/icinga/Makefile.am +++ b/icinga/Makefile.am @@ -18,7 +18,9 @@ icinga_SOURCES = \ virtualendpoint.h icinga_CXXFLAGS = -I${top_srcdir}/base \ - -I${top_srcdir}/jsonrpc -I${top_srcdir} + -I${top_srcdir}/jsonrpc \ + -I${top_srcdir}/cJSON \ + -I${top_srcdir} icinga_LDFLAGS = $(top_builddir)/jsonrpc/libjsonrpc.la \ $(top_builddir)/base/libbase.la \ diff --git a/icinga/endpointmanager.cpp b/icinga/endpointmanager.cpp index a4875a9d6..3eb1c072f 100644 --- a/icinga/endpointmanager.cpp +++ b/icinga/endpointmanager.cpp @@ -124,7 +124,7 @@ void EndpointManager::UnregisterEndpoint(Endpoint::Ptr endpoint) void EndpointManager::SendMessage(Endpoint::Ptr source, Endpoint::Ptr destination, JsonRpcMessage::Ptr message) { if (destination) { - destination->SendMessageA(source, message); + destination->SendMessage(source, message); } else { for (list::iterator i = m_Endpoints.begin(); i != m_Endpoints.end(); i++) { diff --git a/jsonrpc/Makefile.am b/jsonrpc/Makefile.am index bef23d8dd..85cedf405 100644 --- a/jsonrpc/Makefile.am +++ b/jsonrpc/Makefile.am @@ -15,4 +15,6 @@ libjsonrpc_la_SOURCES = \ netstring.cpp \ netstring.h -libjsonrpc_la_CXXFLAGS = -I${top_srcdir}/base +libjsonrpc_la_CFLAGS = -DI2_JSONRPC_BUILD +libjsonrpc_la_CXXFLAGS = -DI2_JSONRPC_BUILD -I${top_srcdir}/base \ + -I${top_srcdir}/cJSON