Commit 1042a8da authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

libtool: surrender to Debian's castrated libtool

The libtool version distributed by Debian is patched to *not* propagate
dependencies (i.e., if libA depends on libB, then linking against libA
will not automatically link against libB, it has to be explicit),
contrary to what the Libtool manual document.  So now we explicitly
link against both libA and libB in such case.

* configure.ac: Remove the workaround that does not work for
MinGW.
* doc/org/compile.org: Mention the issue.
* bin/Makefile.am, tests/Makefile.am, spot/ltsmin/Makefile.am,
spot/gen/Makefile.am, doc/org/g++wrap.in: Make the dependencies
explicit.
parent 4de44b42
......@@ -25,7 +25,8 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = \
libcommon.a \
$(top_builddir)/lib/libgnu.la \
$(top_builddir)/spot/libspot.la
$(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = \
......
......@@ -171,12 +171,6 @@ AC_CHECK_FUNCS([times kill alarm sigaction])
LT_CONFIG_LTDL_DIR([ltdl])
LT_INIT([win32-dll])
LTDL_INIT([subproject convenience])
# Debian resets this to no, but this break both Spot and the libtool
# test suite itself. Instead of requiring developer to install a
# non-patched version of Libtool on any Debian they use, we just
# cancel the effect of Debian's patch here.
link_all_deplibs=yes
link_all_deplibs_CXX=yes
AX_BSYMBOLIC
......
......@@ -210,8 +210,10 @@ library. This should be as simple as adding =-lbddx= after =-lspot=
in the first three cases.
In the fourth case where =libtool= is used to link against
=libspot.la= linking against =libbddx.la= is not necessary because
Libtool already handles such dependencies.
=libspot.la= linking against =libbddx.la= should not be necessary because
Libtool already handles such dependencies. However the version of =libtool=
distributed with Debian is patched to ignore those dependencies, so in this
case you 2
* Additional suggestions
......
......@@ -7,7 +7,8 @@
# would go undetected.
@top_builddir@/libtool link @CXX@ @CXXFLAGS@ -Wall -Werror \
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
"$@" @abs_top_builddir@/spot/libspot.la 2> errors.$$
"$@" @abs_top_builddir@/spot/libspot.la \
@abs_top_builddir@/buddy/src/libbddx.la 2> errors.$$
code=$?
if test $code -ne 0 && test -s errors.$$; then
cat errors.$$ >>org.errors
......
......@@ -25,8 +25,11 @@ spotgen_HEADERS = automata.hh formulas.hh
lib_LTLIBRARIES = libspotgen.la
libspotgen_la_SOURCES = automata.cc formulas.cc
libspotgen_la_LDFLAGS = ../libspot.la -no-undefined $(SYMBOLIC_LDFLAGS)
libspotgen_la_LIBADD = \
$(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la
libspotgen_la_DEPENDENCIES = $(libspotgen_la_LIBADD)
libspotgen_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS)
EXTRA_DIST = $(srcdir)/libspotgen.pc.in
pkgconfigdir = $(libdir)/pkgconfig
......
......@@ -28,9 +28,11 @@ ltsmin_HEADERS = ltsmin.hh
lib_LTLIBRARIES = libspotltsmin.la
libspotltsmin_la_DEPENDENCIES = \
$(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la \
$(LTDLDEPS)
libspotltsmin_la_LIBADD = \
$(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la \
$(LIBLTDL) -lpthread
libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS)
libspotltsmin_la_SOURCES = ltsmin.cc
......
......@@ -24,7 +24,8 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = $(top_builddir)/spot/libspot.la
LDADD = $(top_builddir)/spot/libspot.la $(top_builddir)/buddy/src/libbddx.la
# Explicitely set it to avoid default value ".test"
TEST_EXTENSIONS =
......@@ -391,7 +392,7 @@ if USE_LTSMIN
check_PROGRAMS += ltsmin/modelcheck
ltsmin_modelcheck_SOURCES = ltsmin/modelcheck.cc
ltsmin_modelcheck_LDADD = $(top_builddir)/spot/ltsmin/libspotltsmin.la
ltsmin_modelcheck_LDADD = $(top_builddir)/spot/ltsmin/libspotltsmin.la $(LDADD)
check_SCRIPTS += ltsmin/defs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment