mirror of https://github.com/Icinga/icinga2.git
Removed PCH support (as it's clearly not working properly).
This commit is contained in:
parent
4306c6c07a
commit
404b1807e6
|
@ -186,12 +186,6 @@ do
|
|||
automake --add-missing --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
|
||||
if ! patch --dry-run -p0 < libtool-pch.patch >/dev/null; then
|
||||
echo "Warning: Libtool patch did not apply cleanly."
|
||||
else
|
||||
patch -p0 < libtool-pch.patch
|
||||
fi
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -91,7 +91,7 @@ String CompatComponent::GetCommandPath(void) const
|
|||
void CompatComponent::Start(void)
|
||||
{
|
||||
m_StatusTimer = boost::make_shared<Timer>();
|
||||
m_StatusTimer->SetInterval(30);
|
||||
m_StatusTimer->SetInterval(60);
|
||||
m_StatusTimer->OnTimerExpired.connect(boost::bind(&CompatComponent::StatusTimerHandler, this));
|
||||
m_StatusTimer->Start();
|
||||
m_StatusTimer->Reschedule(0);
|
||||
|
@ -359,12 +359,12 @@ void CompatComponent::DumpServiceStatusAttrs(ofstream& fp, const Service::Ptr& s
|
|||
else
|
||||
state = 1;
|
||||
|
||||
if (Host::IsReachable(host))
|
||||
if (!Host::IsReachable(host))
|
||||
state = 2;
|
||||
}
|
||||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
ObjectLock olock(service);
|
||||
|
||||
fp << "\t" << "check_interval=" << service->GetCheckInterval() / 60.0 << "\n"
|
||||
<< "\t" << "retry_interval=" << service->GetRetryInterval() / 60.0 << "\n"
|
||||
|
|
|
@ -92,15 +92,6 @@ if test "x$enable_debug" = "xyes"; then
|
|||
fi
|
||||
AC_MSG_RESULT($enable_debug)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable GCC precompiled headers)
|
||||
AC_ARG_ENABLE(pch, [ --enable-pch=[no/yes] enable GCC precompiled headers (default=no)],, enable_pch=no)
|
||||
AM_CONDITIONAL([USE_PCH], [test "x$enable_pch" = "xyes"])
|
||||
if test "x$enable_pch" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -fpch-deps -fpch-preprocess -Winvalid-pch"
|
||||
CXXFLAGS="$CXXFLAGS -fpch-deps -fpch-preprocess -Winvalid-pch"
|
||||
fi
|
||||
AC_MSG_RESULT($enable_pch)
|
||||
|
||||
AS_AC_EXPAND([ICINGA_PREFIX], $prefix)
|
||||
AC_DEFINE_UNQUOTED([ICINGA_PREFIX], "$ICINGA_PREFIX", [The installation prefix.])
|
||||
|
||||
|
|
|
@ -106,16 +106,3 @@ libbase_la_LIBADD = \
|
|||
${top_builddir}/third-party/mmatch/libmmatch.la \
|
||||
${top_builddir}/third-party/cJSON/libcJSON.la \
|
||||
${top_builddir}/third-party/popen-noshell/libpopen_noshell.la
|
||||
|
||||
if USE_PCH
|
||||
BUILT_SOURCES = i2-base.h.gch
|
||||
|
||||
i2-base.h.gch: i2-base.h
|
||||
$(AM_V_CXX)$(LTCXXCOMPILE) $(libbase_la_CPPFLAGS) -o $@ $^
|
||||
|
||||
libbase_la_DEPENDENCIES = \
|
||||
i2-base.h.gch
|
||||
|
||||
clean-local:
|
||||
rm -f i2-base.h.gch
|
||||
endif
|
||||
|
|
|
@ -24,7 +24,7 @@ using namespace icinga;
|
|||
double DynamicObject::m_CurrentTx = 0;
|
||||
set<DynamicObject::WeakPtr> DynamicObject::m_ModifiedObjects;
|
||||
boost::mutex DynamicObject::m_TransactionMutex;
|
||||
boost::once_flag DynamicObject::m_TransactionOnce;
|
||||
boost::once_flag DynamicObject::m_TransactionOnce = BOOST_ONCE_INIT;
|
||||
Timer::Ptr DynamicObject::m_TransactionTimer;
|
||||
|
||||
signals2::signal<void (const DynamicObject::Ptr&)> DynamicObject::OnRegistered;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
boost::once_flag Process::m_ThreadOnce;
|
||||
boost::once_flag Process::m_ThreadOnce = BOOST_ONCE_INIT;
|
||||
boost::mutex Process::m_Mutex;
|
||||
deque<Process::Ptr> Process::m_Tasks;
|
||||
double Process::m_LastReport = 0;
|
||||
|
|
|
@ -46,17 +46,3 @@ libconfig_la_LDFLAGS = \
|
|||
|
||||
libconfig_la_LIBADD = \
|
||||
${top_builddir}/lib/base/libbase.la
|
||||
|
||||
if USE_PCH
|
||||
BUILT_SOURCES += i2-config.h.gch
|
||||
|
||||
i2-config.h.gch: i2-config.h
|
||||
$(AM_V_CXX)$(LTCXXCOMPILE) $(libconfig_la_CPPFLAGS) -o $@ $^
|
||||
|
||||
libconfig_la_DEPENDENCIES = \
|
||||
i2-config.h.gch
|
||||
|
||||
clean-local:
|
||||
rm -f i2-config.h.gch
|
||||
endif
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
boost::mutex ConfigItem::m_Mutex;
|
||||
recursive_mutex ConfigItem::m_Mutex;
|
||||
ConfigItem::ItemMap ConfigItem::m_Items;
|
||||
signals2::signal<void (const ConfigItem::Ptr&)> ConfigItem::OnCommitted;
|
||||
signals2::signal<void (const ConfigItem::Ptr&)> ConfigItem::OnRemoved;
|
||||
|
@ -181,7 +181,7 @@ DynamicObject::Ptr ConfigItem::Commit(const ConfigItem::Ptr& self)
|
|||
BOOST_THROW_EXCEPTION(runtime_error("Type '" + type + "' does not exist."));
|
||||
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_Mutex);
|
||||
recursive_mutex::scoped_lock lock(m_Mutex);
|
||||
|
||||
/* Try to find an existing item with the same type and name. */
|
||||
pair<String, String> ikey = make_pair(type, name);
|
||||
|
@ -368,16 +368,14 @@ DynamicObject::Ptr ConfigItem::GetDynamicObject(void) const
|
|||
*/
|
||||
ConfigItem::Ptr ConfigItem::GetObject(const String& type, const String& name)
|
||||
{
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_Mutex);
|
||||
recursive_mutex::scoped_lock lock(m_Mutex);
|
||||
|
||||
ConfigItem::ItemMap::iterator it;
|
||||
ConfigItem::ItemMap::iterator it;
|
||||
|
||||
it = m_Items.find(make_pair(type, name));
|
||||
it = m_Items.find(make_pair(type, name));
|
||||
|
||||
if (it != m_Items.end())
|
||||
return it->second;
|
||||
}
|
||||
if (it != m_Items.end())
|
||||
return it->second;
|
||||
|
||||
return ConfigItem::Ptr();
|
||||
}
|
||||
|
@ -416,7 +414,7 @@ void ConfigItem::Dump(ostream& fp) const
|
|||
*/
|
||||
void ConfigItem::UnloadUnit(const String& unit)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_Mutex);
|
||||
recursive_mutex::scoped_lock lock(m_Mutex);
|
||||
|
||||
Logger::Write(LogInformation, "config", "Unloading config items from compilation unit '" + unit + "'");
|
||||
|
||||
|
|
|
@ -90,10 +90,13 @@ private:
|
|||
set<ConfigItem::WeakPtr> m_ChildObjects; /**< Instantiated items
|
||||
* that inherit from this item */
|
||||
|
||||
static boost::mutex m_Mutex;
|
||||
static recursive_mutex m_Mutex;
|
||||
|
||||
typedef map<pair<String, String>, ConfigItem::Ptr> ItemMap;
|
||||
static ItemMap m_Items; /**< All registered configuration items. */
|
||||
|
||||
static ConfigItem::Ptr GetObjectUnlocked(const String& type,
|
||||
const String& name);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -61,17 +61,3 @@ libicinga_la_LIBADD = \
|
|||
${top_builddir}/lib/base/libbase.la \
|
||||
${top_builddir}/lib/config/libconfig.la \
|
||||
${top_builddir}/lib/remoting/libremoting.la
|
||||
|
||||
if USE_PCH
|
||||
BUILT_SOURCES = i2-icinga.h.gch
|
||||
|
||||
i2-icinga.h.gch: i2-icinga.h
|
||||
$(AM_V_CXX)$(LTCXXCOMPILE) $(libicinga_la_CPPFLAGS) -o $@ $^
|
||||
|
||||
libicinga_la_DEPENDENCIES = \
|
||||
i2-icinga.h.gch
|
||||
|
||||
clean-local:
|
||||
rm -f i2-icinga.h.gch
|
||||
endif
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
boost::once_flag ExternalCommandProcessor::m_InitializeOnce;
|
||||
boost::once_flag ExternalCommandProcessor::m_InitializeOnce = BOOST_ONCE_INIT;
|
||||
boost::mutex ExternalCommandProcessor::m_Mutex;
|
||||
map<String, ExternalCommandProcessor::Callback> ExternalCommandProcessor::m_Commands;
|
||||
|
||||
|
|
|
@ -160,6 +160,8 @@ bool Host::IsReachable(const Host::Ptr& self)
|
|||
hc = host->GetHostCheckService();
|
||||
}
|
||||
|
||||
ObjectLock olock(hc);
|
||||
|
||||
/* ignore hosts that are up */
|
||||
if (hc && hc->GetState() == StateOK)
|
||||
continue;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
******************************************************************************/
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include "i2-icinga.h"
|
||||
|
||||
using namespace icinga;
|
||||
|
|
|
@ -32,18 +32,4 @@ libpython_la_LIBADD = \
|
|||
${top_builddir}/lib/base/libbase.la \
|
||||
${top_builddir}/lib/config/libconfig.la \
|
||||
${top_builddir}/lib/remoting/libremoting.la
|
||||
|
||||
if USE_PCH
|
||||
BUILT_SOURCES = i2-python.h.gch
|
||||
|
||||
i2-python.h.gch: i2-python.h
|
||||
$(AM_V_CXX)$(LTCXXCOMPILE) $(libpython_la_CPPFLAGS) -o $@ $^
|
||||
|
||||
libpython_la_DEPENDENCIES = \
|
||||
i2-python.h.gch
|
||||
|
||||
clean-local:
|
||||
rm -f i2-python.h.gch
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
|
@ -35,17 +35,3 @@ libremoting_la_LDFLAGS = \
|
|||
libremoting_la_LIBADD = \
|
||||
${top_builddir}/lib/base/libbase.la \
|
||||
${top_builddir}/lib/config/libconfig.la
|
||||
|
||||
if USE_PCH
|
||||
BUILT_SOURCES = i2-remoting.h.gch
|
||||
|
||||
i2-remoting.h.gch: i2-remoting.h
|
||||
$(AM_V_CXX)$(LTCXXCOMPILE) $(libremoting_la_CPPFLAGS) -o $@ $^
|
||||
|
||||
libremoting_la_DEPENDENCIES = \
|
||||
i2-remoting.h.gch
|
||||
|
||||
clean-local:
|
||||
rm -f i2-remoting.h.gch
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
--- m4/ltmain.sh 2013-02-21 11:23:30.000000000 +0100
|
||||
+++ m4/ltmain.sh 2013-02-21 11:36:37.000000000 +0100
|
||||
@@ -2507,6 +2507,7 @@
|
||||
|
||||
case $libobj in
|
||||
*.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
|
||||
+ *.gch) obj=$libobj ;;
|
||||
*)
|
||||
func_fatal_error "cannot determine name of library object from \`$libobj'"
|
||||
;;
|
||||
@@ -2717,7 +2718,14 @@
|
||||
fi
|
||||
|
||||
$opt_dry_run || {
|
||||
- func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
|
||||
+ case $libobj in
|
||||
+ *.gch)
|
||||
+ ln -sF "$objdir/$objname" "$libobj"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
# Unlock the critical section if it was locked
|
||||
if test "$need_locks" != no; then
|
Loading…
Reference in New Issue