From: Marco van Wieringen Date: Fri, 1 Jun 2012 09:24:53 +0000 (+0200) Subject: Fix bug #1870 GNU binutils-gold build failure. X-Git-Tag: Release-7.0.0~221 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39f8541d58e0c7291f22b6675ef993491b218f95;p=bacula%2Fbacula 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. --- 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 $@ ..."