]> granicus.if.org Git - icinga2/commitdiff
Remove libltdl dependency.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 30 Oct 2013 10:58:45 +0000 (11:58 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 30 Oct 2013 11:00:55 +0000 (12:00 +0100)
Refs #4964

22 files changed:
autogen.sh
components/checker/Makefile.am
components/cluster/Makefile.am
components/compat/Makefile.am
components/db_ido_mysql/Makefile.am
components/demo/Makefile.am
components/livestatus/Makefile.am
components/notification/Makefile.am
components/perfdata/Makefile.am
configure.ac
icinga-app/Makefile.am
icinga-app/icinga.cpp
icinga2.spec.in
lib/base/Makefile.am
lib/base/unix.h
lib/base/utility.cpp
lib/base/utility.h
lib/config/Makefile.am
lib/db_ido/Makefile.am
lib/icinga/Makefile.am
lib/python/Makefile.am
third-party/Makefile.am

index 62eab3a6c7caabd3ac9dce86d6c0f854b196a7ed..00ce9e442b7b4c280b0049ac57be11db5fe639df 100755 (executable)
@@ -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 ..."
index 22945b025a13b8819df885ea3a544c0aa27e31ea..202754518345892895924160df653e35f0e4a5a1 100644 (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
index 89eec5be8884fb4419ecf06634ddb6eb548a9b5a..08dbb881e837e7c4335bd4fd093f9d39707f3af6 100644 (file)
@@ -28,7 +28,6 @@ libcluster_la_SOURCES = \
        jsonrpc.h
 
 libcluster_la_CPPFLAGS = \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib \
        -I${top_srcdir}/components
index 279689fe6eb146f11d71980de58c4485bfca4e49..9a1f6dc139b94a74581f155bde0fc2664b6be815 100644 (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
index 6e8b8137cd4b3c49c913e3e33bfc9ab2c77aa146..a43e3db88bf09b85a6614d245a598d75efe4dab6 100644 (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 \
index 3151556eaac5e0bee1e9bd0611dc4c6995a1a48b..2d94d831fb50bbaccb554b35284d684e53c4cb57 100644 (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
index 91775b984fd91c8643d62aee75060fe7433944fe..e62482f7a014b98eb662c69f224aca65bb71a248 100644 (file)
@@ -82,7 +82,6 @@ liblivestatus_la_SOURCES = \
        table.h
 
 liblivestatus_la_CPPFLAGS = \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib \
        -I${top_srcdir}/components
index 69134f368fe655b8f2a022eb3383ca3d7349fa74..5132b6699596e6d883f3cd61e0b3855c17a15744 100644 (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
index 67c5b829298504b385530de027d4d268ecb07c77..aeb073e99710a479727f3e88ffa349fd052e3f5f 100644 (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
index 7957084b2905beaa3cf01c15784012d23b301b91..0d8c46669f46b886ee43b50266cfe5f9cc0d0a66 100644 (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
index 9a791c15bfa0ab2b22420573a59d6d4c9926e71a..a4dd42f634c32ef9f6405a35cfc27e95b01a4605 100644 (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
index 958ce5122ed1066d413d1d5fd9e662afe1d791af..0c3a6d6ef20052d1da6fd8e3797da328b9d17ecd 100644 (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")) {
index 7f969dd0413777a5535a8ecd82f212ff11da695f..865dd662f1e35bbd5c641bcbde13f2bfc762359f 100644 (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
index 0fea3da058a3f770dbd6de79995d3b9116d549e5..80d08278e378491cddc27f1b23ff6d7b4cf502eb 100644 (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) \
index c81067604a70e451bb1693bfb433e1e705bc7a10..38d0a83426f7bbb7d478928159e91f9f1bfab4d8 100644 (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;
index b5b8636a231adea5aaf65aa5039ab5388421dcf1..80a5b6ef4463c6d7cc2c1a1e4ab27834dd8ff6a9 100644 (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 */
 
index 8c9d587af9c218912f6aae10c2849936f9c73277..ddffa4b448cc4ef2cfb3698de7bb8b541782aa44 100644 (file)
@@ -79,7 +79,7 @@ public:
 #ifdef _WIN32
        HMODULE
 #else /* _WIN32 */
-       lt_dlhandle
+       void *
 #endif /* _WIN32 */
        LoadExtensionLibrary(const String& library);
 
index b9f1669c39efe8c32166cdb05679f2e4086c89e0..7b8ed55326915eea8d642366570cbe545d97097f 100644 (file)
@@ -53,7 +53,6 @@ libconfig_la_SOURCES = \
 
 libconfig_la_CPPFLAGS = \
        -DI2_CONFIG_BUILD \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib
 
index a2b1e850a4af4359e94c95ff245a76888a9f81d7..f192a9d9d11139b0b95bb93c74c28e9344db57c4 100644 (file)
@@ -48,7 +48,6 @@ libdb_ido_la_SOURCES = \
        usergroupdbobject.h
 
 libdb_ido_la_CPPFLAGS = \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib
 
index f644fedf6f7eab022f980b3c06a2d41973ce6e9e..63a072eeb9129d07df42160724dac216311f6393 100644 (file)
@@ -109,7 +109,6 @@ libicinga_la_SOURCES =  \
 
 libicinga_la_CPPFLAGS = \
        -DI2_ICINGA_BUILD \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib
 
index d306ff734268329b6d9533e3130173c4143f09f4..056a79a2e4cd2342e5b00589596acf9554478511 100644 (file)
@@ -12,7 +12,6 @@ libpython_la_SOURCES =  \
 
 libpython_la_CPPFLAGS = \
        -DI2_PYTHON_BUILD \
-       $(LTDLINCL) \
        $(BOOST_CPPFLAGS) \
        @PYTHON_CSPEC@ \
        -I${top_srcdir}/lib
index 3dfdcacd39ad0bc2f572ce0ff273024e1e3310e8..17b2736d463bcf821366123fa295bc9002e256f3 100644 (file)
@@ -1,7 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = \
-       ltdl \
        cJSON \
        execvpe \
        mmatch