From 52f30446ae17c6842ef15b3d4f69fc2596d0b6b5 Mon Sep 17 00:00:00 2001
From: Jorrit Fahlke <joe@dune-project.org>
Date: Wed, 20 Jan 2010 18:48:34 +0000
Subject: [PATCH] Use LDADD instead of LOCAL_LIBS.  LDADD is the standard way
 of doing what LOCAL_LIBS is meant to do.  Also remove the bad example of
 passing preprocessor flags in CXXFLAGS from duneproject.

[[Imported from SVN: r5842]]
---
 bin/duneproject              | 2 +-
 configure.ac                 | 2 +-
 dune/common/Makefile.am      | 2 --
 dune/common/test/Makefile.am | 2 --
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/bin/duneproject b/bin/duneproject
index 9f3b2dbef..190de5fd4 100755
--- a/bin/duneproject
+++ b/bin/duneproject
@@ -496,7 +496,7 @@ noinst_PROGRAMS = ${CMODULE}
 
 ${CMODULE}_SOURCES = $CMODULE.cc
 
-${CMODULE}_CXXFLAGS = \$(AM_CXXFLAGS) \\
+${CMODULE}_CPPFLAGS = \$(AM_CPPFLAGS) \\
 	\$(DUNEMPICPPFLAGS) \\
 	\$(UG_CPPFLAGS) \\
 	\$(AMIRAMESH_CPPFLAGS) \\
diff --git a/configure.ac b/configure.ac
index 606d44321..bec368b0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ DUNE_CHECK_ALL
 AC_SUBST([DUNE_COMMON_ROOT], '$(abs_top_srcdir)')
 AC_SUBST([DUNE_COMMON_BIN], '$(abs_top_srcdir)/bin/')
 AC_SUBST([AM_CPPFLAGS], '-I$(top_srcdir)')
-AC_SUBST([LOCAL_LIBS], '$(top_builddir)/dune/common/libcommon.la')
+AC_SUBST([LDADD], '$(top_builddir)/lib/libdunecommon.la')
 
 # write output
 AC_CONFIG_FILES([Makefile
diff --git a/dune/common/Makefile.am b/dune/common/Makefile.am
index d0bd1c930..24b0d249f 100644
--- a/dune/common/Makefile.am
+++ b/dune/common/Makefile.am
@@ -7,8 +7,6 @@ noinst_LTLIBRARIES = libcommon.la
 
 libcommon_la_SOURCES = stdstreams.cc configparser.cc
 
-AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/..
-
 commonincludedir = $(includedir)/dune/common
 commoninclude_HEADERS = alignment.hh array.hh \
   arraylist.hh bitsetvector.hh debugstream.hh deprecated.hh \
diff --git a/dune/common/test/Makefile.am b/dune/common/test/Makefile.am
index c13e00d24..3b0ef4733 100644
--- a/dune/common/test/Makefile.am
+++ b/dune/common/test/Makefile.am
@@ -39,8 +39,6 @@ check_PROGRAMS = $(TESTPROGS)
 
 noinst_HEADERS = dummyiterator.hh
 
-LDADD = $(LOCAL_LIBS)
-
 # define the programs
 smallobject_SOURCES = smallobject.cc
 
-- 
GitLab