From de353c92973fabecbe3ccbb3ca6a6e696cec1006 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 10 Dec 2014 13:51:54 +1100 Subject: [PATCH] build: switch from LT libraries to pure static We only ever supported static libraries, and this greatly simplifies argument management compiling/linking for MinGW --- Makefile.am | 15 +++++++++------ configure.ac | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index fbfa5483..140524f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,6 @@ ACLOCAL_AMFLAGS = -I m4 AM_CXXFLAGS = $(BOOST_CPPFLAGS) $(ZLIB_CFLAGS) -AM_LDFLAGS = $(BOOST_LDFLAGS) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(ZLIB_LIBS) SUBDIRS = test @@ -182,18 +181,22 @@ SUFFIXES = .cpp .cpp.rl ############################################################################### ## Library definition -lib_LTLIBRARIES = libutil.la -libutil_la_SOURCES = $(UTIL_FILES) -libutil_la_CXXFLAGS = $(AM_CXXFLAGS) -libutil_la_LIBADD = $(BOOST_SYSTEM_LIB) +lib_LIBRARIES = libutil.a +libutil_a_SOURCES = $(UTIL_FILES) +libutil_a_CXXFLAGS = $(AM_CXXFLAGS) ############################################################################### ## Utility programs AM_DEFAULT_SOURCE_EXT = .cpp -LDADD = $(top_builddir)/libutil.la + +AM_LDFLAGS = $(BOOST_LDFLAGS) +LDADD = $(top_builddir)/libutil.a $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(ZLIB_LIBS) + bin_PROGRAMS = \ tools/hash \ tools/json-clean \ tools/json-validate \ tools/json-schema + +tools_hash_LDADD = $(top_builddir)/libutil.a $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(ZLIB_LIBS) diff --git a/configure.ac b/configure.ac index d0ef1d35..03a8f234 100644 --- a/configure.ac +++ b/configure.ac @@ -14,14 +14,14 @@ AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AC_CANONICAL_HOST +LT_INIT AC_LANG([C++]) AC_PROG_CXX AC_PROG_CXXCPP +AC_PROG_RANLIB AX_CXX_COMPILE_STDCXX_11([noext]) -LT_INIT - AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-xz foreign subdir-objects]) AM_SILENT_RULES([yes])