]> granicus.if.org Git - icinga2/commitdiff
Fix libdl detection on FreeBSD.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 30 Oct 2013 11:29:21 +0000 (12:29 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 30 Oct 2013 12:01:50 +0000 (13:01 +0100)
Refs #4977

components/demo/Makefile.am
configure.ac
lib/base/Makefile.am
lib/icinga/Makefile.am

index f9d520540be7aaabf9a407e2e15f1342611c9007..9e99c4b9e5bc2646b9dbf34faccd21eeed948b71 100644 (file)
@@ -6,7 +6,7 @@ pkglib_LTLIBRARIES = \
 BUILT_SOURCES = \
        demo.th
 
-nodist_libdemo_SOURCES = $(BUILT_SOURCES)
+nodist_libdemo_la_SOURCES = $(BUILT_SOURCES)
 
 CLEANFILES = \
        demo-type.cpp
index 0d8c46669f46b886ee43b50266cfe5f9cc0d0a66..718faa5d0b80c46954c2c781907f253edf98c7ae 100644 (file)
@@ -112,6 +112,9 @@ AC_CHECK_LIB(ws2_32, getsockname)
 AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
 AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2 pthread_set_name_np pthread_setname_np])
 
+AC_CHECK_LIB(c, dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
+AC_SUBST([LIBDL])
+
 AC_TRY_LINK([#include <openssl/evp.h>
 #include <openssl/bio.h>
 #include <openssl/comp.h>], [BIO_f_zlib();], ac_cv_lib_biozlib="yes")
index 04e09b61e2378c097bb7546799fdc7b41b3795d9..91e02b88f727dbfda9e642fb26208f1725ec51a4 100644 (file)
@@ -142,7 +142,7 @@ libbase_la_LDFLAGS = \
        @VERSION_INFO@
 
 libbase_la_LIBADD = \
-       -ldl \
+       $(LIBDL) \
        $(OPENSSL_LIBS) \
        $(BOOST_SIGNALS_LIB) \
        $(BOOST_THREAD_LIB) \
index c14eadf86cd34b8a55000ad88973169d141b60c3..66b960e00e09f3f5d79b2a727c74b4c5b89e4767 100644 (file)
@@ -20,7 +20,7 @@ BUILT_SOURCES = \
        user.th \
        usergroup.th
 
-nodist_libicinga_SOURCES = $(BUILT_SOURCES)
+nodist_libicinga_la_SOURCES = $(BUILT_SOURCES)
 
 CLEANFILES = \
        icinga-type.cpp