From 31788277f9f55312d8ff618cbf0e1cf93637ff43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 10 Jul 2012 13:38:33 +0200 Subject: [PATCH 1/2] Don't link in Fortran support libraries This is an experiment, not strictly sanctioned by the AX_LAPACK macro documentation, to avoid linker errors related to missing symbol MAIN__ in the (GFortran) run-time support libraries. Strictly speaking, we should be using the method outlined in the Autoconf manual, but we'll try the easier way for now. This commit is more or less equivalent to forward-porting commits dd6e0fd3, c437eba2, and 9e885dc7 from the "ert" branch. --- Makefile.am | 2 +- examples/Makefile.am | 2 +- tests/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index c98eb7ce..1ffe69a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,7 @@ $(BOOST_FILESYSTEM_LIB) \ $(BOOST_SYSTEM_LIB) \ $(BOOST_DATE_TIME_LIB) \ $(BOOST_UNIT_TEST_FRAMEWORK_LIB) \ -$(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FLIBS) +$(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) # ---------------------------------------------------------------------- # Library constituents. SOURCES followed by HEADERS. diff --git a/examples/Makefile.am b/examples/Makefile.am index e4538e80..6d664bdf 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -42,5 +42,5 @@ noinst_PROGRAMS += spu_2p spu_2p_SOURCES = spu_2p.cpp spu_2p_LDADD = \ $(LDADD) \ -$(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FLIBS) +$(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 756c4b3a..2921f278 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -43,7 +43,7 @@ test_column_extract_SOURCES = test_column_extract.cpp test_column_extract_LDADD = $(LDADD) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) test_lapack_SOURCES = test_lapack.cpp -test_lapack_LDADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FLIBS) +test_lapack_LDADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) test_readpolymer_SOURCES = test_readpolymer.cpp test_read_vag_SOURCES = test_read_vag.cpp From 6c35b9679bb73780bde03731b86a8981c1115130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 10 Jul 2012 13:46:30 +0200 Subject: [PATCH 2/2] Don't clobber LDFLAGS user variable Fix a misunderstanding that's been present since the inception. The LDFLAGS variable is entirely at the builder's disposal. Flags needed for system-internal settings must go in the AM_* equivalents. --- tests/Makefile.am | 2 +- tutorials/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 2921f278..a82a1dc3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ $(OPM_BOOST_CPPFLAGS) -LDFLAGS = $(OPM_BOOST_LDFLAGS) +AM_LDFLAGS = $(OPM_BOOST_LDFLAGS) LDADD = $(top_builddir)/lib/libopmcore.la diff --git a/tutorials/Makefile.am b/tutorials/Makefile.am index f9e8b5a5..a5e42569 100644 --- a/tutorials/Makefile.am +++ b/tutorials/Makefile.am @@ -2,7 +2,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ $(OPM_BOOST_CPPFLAGS) -LDFLAGS = $(OPM_BOOST_LDFLAGS) +AM_LDFLAGS = $(OPM_BOOST_LDFLAGS) LDADD = $(top_builddir)/lib/libopmcore.la