From ef55412855adf54899c6a1a7fe3526becafb36bb Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 30 Oct 2013 12:29:21 +0100 Subject: [PATCH] Fix libdl detection on FreeBSD. Refs #4977 --- components/demo/Makefile.am | 2 +- configure.ac | 3 +++ lib/base/Makefile.am | 2 +- lib/icinga/Makefile.am | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/demo/Makefile.am b/components/demo/Makefile.am index f9d520540..9e99c4b9e 100644 --- a/components/demo/Makefile.am +++ b/components/demo/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 0d8c46669..718faa5d0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 #include #include ], [BIO_f_zlib();], ac_cv_lib_biozlib="yes") diff --git a/lib/base/Makefile.am b/lib/base/Makefile.am index 04e09b61e..91e02b88f 100644 --- a/lib/base/Makefile.am +++ b/lib/base/Makefile.am @@ -142,7 +142,7 @@ libbase_la_LDFLAGS = \ @VERSION_INFO@ libbase_la_LIBADD = \ - -ldl \ + $(LIBDL) \ $(OPENSSL_LIBS) \ $(BOOST_SIGNALS_LIB) \ $(BOOST_THREAD_LIB) \ diff --git a/lib/icinga/Makefile.am b/lib/icinga/Makefile.am index c14eadf86..66b960e00 100644 --- a/lib/icinga/Makefile.am +++ b/lib/icinga/Makefile.am @@ -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