if test -z "$NO_LIBTOOLIZE" ; then
echo "Running $LIBTOOLIZE..."
$LIBTOOLIZE --force --copy
- find third-party/ltdl \! -perm u=w -exec chmod u+w '{}' ';'
fi
fi
echo "Running aclocal $aclocalinclude ..."
checker-type.conf
libchecker_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
jsonrpc.h
libcluster_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
compat-type.conf
libcompat_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
idomysqlconnection.ti
libdb_ido_mysql_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
$(MYSQL_CFLAGS) \
-I${top_srcdir}/lib \
demo-type.conf
libdemo_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
table.h
liblivestatus_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
notification-type.conf
libnotification_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
perfdata-type.conf
libperfdata_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
AC_INIT([icinga2], [0.0.3])
AC_CONFIG_AUX_DIR([m4])
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects])
AX_SET_VERSION_INFO
LDFLAGS="$LDFLAGS -L/opt/local/lib"
LT_INIT([dlopen disable-static win32-dll])
-LT_CONFIG_LTDL_DIR([third-party/ltdl])
-LTDL_INIT
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
;;
esac
-if ! test -z "$LTDLDEPS"; then
- ltdl_msg="bundled"
-else
- ltdl_msg="system-provided"
-fi
-
AM_COND_IF([MYSQL_USE], [mysql_msg="enabled"], [mysql_msg="disabled"])
AM_COND_IF([PYTHON_USE], [python_msg="enabled"], [python_msg="disabled"])
echo "
-Libraries:
- ltdl: $ltdl_msg
-
Features:
MySQL: $mysql_msg
Python: $python_msg
icinga.cpp
icinga2_CPPFLAGS = \
- -DI2_ICINGALAUNCHER_BUILD \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
-export-dynamic
icinga2_LDADD = \
- $(LIBLTDL) \
$(BOOST_SIGNALS_LIB) \
$(BOOST_THREAD_LIB) \
$(BOOST_SYSTEM_LIB) \
$(BOOST_PROGRAM_OPTIONS_LIB) \
${top_builddir}/lib/base/libbase.la \
- ${top_builddir}/lib/config/libconfig.la \
- -dlopen ${top_builddir}/lib/icinga/libicinga.la \
- -dlopen ${top_builddir}/components/checker/libchecker.la \
- -dlopen ${top_builddir}/components/cluster/libcluster.la \
- -dlopen ${top_builddir}/components/compat/libcompat.la \
- -dlopen ${top_builddir}/components/demo/libdemo.la \
- -dlopen ${top_builddir}/components/livestatus/liblivestatus.la \
- -dlopen ${top_builddir}/components/notification/libnotification.la \
- -dlopen ${top_builddir}/components/perfdata/libperfdata.la
+ ${top_builddir}/lib/config/libconfig.la
-if PYTHON_USE
-icinga2_LDADD += \
- -dlopen ${top_builddir}/lib/python/libpython.la
-endif
-
-if MYSQL_USE
-icinga2_LDADD += \
- -dlopen ${top_builddir}/components/db_ido_mysql/libdb_ido_mysql.la
-endif
#include <boost/foreach.hpp>
#ifndef _WIN32
-# include <ltdl.h>
# include <sys/types.h>
# include <pwd.h>
# include <grp.h>
{
Application::SetStartTime(Utility::GetTime());
-#ifndef _WIN32
- LTDL_SET_PRELOADED_SYMBOLS();
-#endif /* _WIN32 */
-
-#ifndef _WIN32
- lt_dlinit();
-#endif /* _WIN32 */
-
/* Set thread title. */
Utility::SetThreadName("Main Thread", false);
Log(LogInformation, "icinga-app", "Icinga application loader (version: " + Application::GetVersion() + ")");
- String searchDir = Application::GetPkgLibDir();
- Log(LogInformation, "base", "Adding library search dir: " + searchDir);
-
-#ifdef _WIN32
- SetDllDirectory(searchDir.CStr());
-#else /* _WIN32 */
- lt_dladdsearchdir(searchDir.CStr());
-#endif /* _WIN32 */
-
(void) Utility::LoadExtensionLibrary("icinga");
if (g_AppParams.count("library")) {
BuildRequires: %{apachename}
%if "%{_vendor}" == "redhat"
-BuildRequires: libtool-ltdl-devel
%if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5"
# el5 requires EPEL
BuildRequires: boost%{el5_boost_version}-devel
libbase_la_CPPFLAGS = \
-DI2_BASE_BUILD \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
$(OPENSSL_INCLUDES) \
-I${top_srcdir}/lib \
@VERSION_INFO@
libbase_la_LIBADD = \
- $(LIBLTDL) \
+ -ldl \
$(OPENSSL_LIBS) \
$(BOOST_SIGNALS_LIB) \
$(BOOST_THREAD_LIB) \
#include <sys/file.h>
#include <sys/wait.h>
#include <glob.h>
-#include <ltdl.h>
#include <dlfcn.h>
typedef int SOCKET;
#ifdef _WIN32
HMODULE
#else /* _WIN32 */
-lt_dlhandle
+void *
#endif /* _WIN32 */
Utility::LoadExtensionLibrary(const String& library)
{
String path;
#ifdef _WIN32
- path = library + ".dll";
+ path = Application::GetPkgLibDir() + "/" + library + ".dll";
#else /* _WIN32 */
- path = "lib" + library + ".la";
+ path = Application::GetPkgLibDir() + "/lib" + library + ".so";
#endif /* _WIN32 */
Log(LogInformation, "base", "Loading library '" + path + "'");
<< boost::errinfo_file_name(path));
}
#else /* _WIN32 */
- lt_dlhandle hModule = lt_dlopen(path.CStr());
+ void *hModule = dlopen(path.CStr(), RTLD_NOW);
if (hModule == NULL) {
- BOOST_THROW_EXCEPTION(std::runtime_error("Could not load library '" + path + "': " + lt_dlerror()));
+ BOOST_THROW_EXCEPTION(std::runtime_error("Could not load library '" + path + "': " + dlerror()));
}
#endif /* _WIN32 */
#ifdef _WIN32
HMODULE
#else /* _WIN32 */
- lt_dlhandle
+ void *
#endif /* _WIN32 */
LoadExtensionLibrary(const String& library);
libconfig_la_CPPFLAGS = \
-DI2_CONFIG_BUILD \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib
usergroupdbobject.h
libdb_ido_la_CPPFLAGS = \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib
libicinga_la_CPPFLAGS = \
-DI2_ICINGA_BUILD \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib
libpython_la_CPPFLAGS = \
-DI2_PYTHON_BUILD \
- $(LTDLINCL) \
$(BOOST_CPPFLAGS) \
@PYTHON_CSPEC@ \
-I${top_srcdir}/lib
## Process this file with automake to produce Makefile.in
SUBDIRS = \
- ltdl \
cJSON \
execvpe \
mmatch