Remove libltdl dependency.

Refs #4964
This commit is contained in:
Gunnar Beutner 2013-10-30 11:58:45 +01:00
parent e74586e6a9
commit 9f1c4539dc
22 changed files with 9 additions and 74 deletions

View File

@ -174,7 +174,6 @@ do
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 ..."

View File

@ -22,7 +22,6 @@ libchecker_la_SOURCES = \
checker-type.conf
libchecker_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -28,7 +28,6 @@ libcluster_la_SOURCES = \
jsonrpc.h
libcluster_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -34,7 +34,6 @@ libcompat_la_SOURCES = \
compat-type.conf
libcompat_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -27,7 +27,6 @@ libdb_ido_mysql_la_SOURCES = \
idomysqlconnection.ti
libdb_ido_mysql_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
$(MYSQL_CFLAGS) \
-I${top_srcdir}/lib \

View File

@ -22,7 +22,6 @@ libdemo_la_SOURCES = \
demo-type.conf
libdemo_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -82,7 +82,6 @@ liblivestatus_la_SOURCES = \
table.h
liblivestatus_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -22,7 +22,6 @@ libnotification_la_SOURCES = \
notification-type.conf
libnotification_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -27,7 +27,6 @@ libperfdata_la_SOURCES = \
perfdata-type.conf
libperfdata_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components

View File

@ -19,6 +19,7 @@
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
@ -79,8 +80,6 @@ CXXFLAGS="$CXXFLAGS -I/opt/local/include"
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)
@ -226,19 +225,10 @@ case ${host} in
;;
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

View File

@ -7,8 +7,6 @@ icinga2_SOURCES = \
icinga.cpp
icinga2_CPPFLAGS = \
-DI2_ICINGALAUNCHER_BUILD \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib \
-I${top_srcdir}/components
@ -18,28 +16,10 @@ icinga2_LDFLAGS = \
-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

View File

@ -32,7 +32,6 @@
#include <boost/foreach.hpp>
#ifndef _WIN32
# include <ltdl.h>
# include <sys/types.h>
# include <pwd.h>
# include <grp.h>
@ -162,14 +161,6 @@ int main(int argc, char **argv)
{
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);
@ -321,15 +312,6 @@ int main(int argc, char **argv)
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")) {

View File

@ -67,7 +67,6 @@ BuildRequires: bison
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

View File

@ -125,7 +125,6 @@ libbase_la_SOURCES = \
libbase_la_CPPFLAGS = \
-DI2_BASE_BUILD \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
$(OPENSSL_INCLUDES) \
-I${top_srcdir}/lib \
@ -141,7 +140,7 @@ libbase_la_LDFLAGS = \
@VERSION_INFO@
libbase_la_LIBADD = \
$(LIBLTDL) \
-ldl \
$(OPENSSL_LIBS) \
$(BOOST_SIGNALS_LIB) \
$(BOOST_THREAD_LIB) \

View File

@ -34,7 +34,6 @@
#include <sys/file.h>
#include <sys/wait.h>
#include <glob.h>
#include <ltdl.h>
#include <dlfcn.h>
typedef int SOCKET;

View File

@ -246,15 +246,15 @@ void Utility::Sleep(double timeout)
#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 + "'");
@ -269,10 +269,10 @@ Utility::LoadExtensionLibrary(const String& library)
<< 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 */

View File

@ -79,7 +79,7 @@ public:
#ifdef _WIN32
HMODULE
#else /* _WIN32 */
lt_dlhandle
void *
#endif /* _WIN32 */
LoadExtensionLibrary(const String& library);

View File

@ -53,7 +53,6 @@ libconfig_la_SOURCES = \
libconfig_la_CPPFLAGS = \
-DI2_CONFIG_BUILD \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib

View File

@ -48,7 +48,6 @@ libdb_ido_la_SOURCES = \
usergroupdbobject.h
libdb_ido_la_CPPFLAGS = \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib

View File

@ -109,7 +109,6 @@ libicinga_la_SOURCES = \
libicinga_la_CPPFLAGS = \
-DI2_ICINGA_BUILD \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
-I${top_srcdir}/lib

View File

@ -12,7 +12,6 @@ libpython_la_SOURCES = \
libpython_la_CPPFLAGS = \
-DI2_PYTHON_BUILD \
$(LTDLINCL) \
$(BOOST_CPPFLAGS) \
@PYTHON_CSPEC@ \
-I${top_srcdir}/lib

View File

@ -1,7 +1,6 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = \
ltdl \
cJSON \
execvpe \
mmatch