From 343fdf40d687a69950baf359bc4ca21a1313da8a Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Fri, 1 Jun 2012 11:24:53 +0200 Subject: [PATCH] Fix bug #1870 GNU binutils-gold build failure. Use some extra libtool magic to determine what lib to use to get dlopen and friends for loading plugins from libbac. --- bacula/autoconf/Make.common.in | 1 + bacula/autoconf/aclocal.m4 | 1 + bacula/autoconf/configure.in | 1 + bacula/src/lib/Makefile.in | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bacula/autoconf/Make.common.in b/bacula/autoconf/Make.common.in index fdcd3a2c7b..17467bbb7f 100644 --- a/bacula/autoconf/Make.common.in +++ b/bacula/autoconf/Make.common.in @@ -90,6 +90,7 @@ DLIB = @DLIB@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_INC = @PYTHON_INCDIR@ OPENSSL_LIBS = @OPENSSL_LIBS@ +DLLIBS = @LIBADD_DLOPEN@ # Windows (cygwin) flags diff --git a/bacula/autoconf/aclocal.m4 b/bacula/autoconf/aclocal.m4 index 8188873dfa..de6977daea 100644 --- a/bacula/autoconf/aclocal.m4 +++ b/bacula/autoconf/aclocal.m4 @@ -16,6 +16,7 @@ m4_include([libtool/ltoptions.m4]) m4_include([libtool/ltsugar.m4]) m4_include([libtool/ltversion.m4]) m4_include([libtool/lt~obsolete.m4]) +m4_include([libtool/ltdl.m4]) m4_include([gettext-macros/codeset.m4]) m4_include([gettext-macros/gettext.m4]) m4_include([gettext-macros/glibc2.m4]) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 6ee6577ee0..9fd2f39755 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -178,6 +178,7 @@ AC_ARG_ENABLE(libtool, ] ) LT_INIT([shared disable-static]) +LT_LIB_DLLOAD LT_LANG([C++]) if test x$use_libtool != xno; then diff --git a/bacula/src/lib/Makefile.in b/bacula/src/lib/Makefile.in index 487fc593d3..009f15742c 100644 --- a/bacula/src/lib/Makefile.in +++ b/bacula/src/lib/Makefile.in @@ -120,7 +120,7 @@ libbac.a: $(LIBBAC_OBJS) libbac.la: Makefile $(LIBBAC_LOBJS) @echo "Making $@ ..." - $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(OPENSSL_LIBS) $(LIBS) + $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(OPENSSL_LIBS) $(LIBS) $(DLLIBS) libbaccfg.a: $(LIBBACCFG_OBJS) @echo "Making $@ ..." -- 2.39.5