Applied patch from Simon Hausmann <hausmann@kde.org> to enable automake1.5
compilation, except for the use of $(EXEEXT) which generates annoying warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@34 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/ChangeLog b/ChangeLog
index 68e75b3..ba6f261 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-03-26  Simon Hausmann <hausmann@kde.org>
+
+	* configure.in: Substitute AS and ASFLAGS.
+	* demangle/Makefile.am: Don't use INCLUDES += when it's the first
+	assignment to it.
+	* Makefile.am: Don't use INCLUDES += when it's the first assignment to
+	it. Use $(EXEEXT) for the explicit valgrin[d,q].so targets.
+
 2002-03-24  Frederic Gobry  <gobry@puck.ch>
 
 	* Makefile.am: added a bzdist target that creates a bzip2 archive
diff --git a/Makefile.am b/Makefile.am
index 0bdc471..95255d7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/addrcheck/Makefile.am b/addrcheck/Makefile.am
index 0bdc471..95255d7 100644
--- a/addrcheck/Makefile.am
+++ b/addrcheck/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
index 0bdc471..95255d7 100644
--- a/cachegrind/Makefile.am
+++ b/cachegrind/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/configure.in b/configure.in
index 270e856..b8cd6cb 100644
--- a/configure.in
+++ b/configure.in
@@ -16,6 +16,11 @@
    AC_MSG_ERROR([Valgrind relies on GCC to be compiled])
 fi
 
+AS="${CC}"
+AC_SUBST(AS)
+ASFLAGS=""
+AC_SUBST(ASFLAGS)
+
 # We don't want gcc 2.7
 AC_MSG_CHECKING([for a supported version of gcc])
 
diff --git a/corecheck/Makefile.am b/corecheck/Makefile.am
index 0bdc471..95255d7 100644
--- a/corecheck/Makefile.am
+++ b/corecheck/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 0bdc471..95255d7 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/coregrind/demangle/Makefile.am b/coregrind/demangle/Makefile.am
index b0bf902..070eacd 100644
--- a/coregrind/demangle/Makefile.am
+++ b/coregrind/demangle/Makefile.am
@@ -1,10 +1,10 @@
-INCLUDES += -I$(top_srcdir)
+INCLUDES = -I$(top_srcdir)
 
 noinst_HEADERS = \
 	ansidecl.h     \
-        dyn-string.h   \
-        demangle.h     \
-        safe-ctype.h 
+	dyn-string.h   \
+	demangle.h     \
+	safe-ctype.h 
 
 noinst_LIBRARIES = libdemangle.a
 
diff --git a/demangle/Makefile.am b/demangle/Makefile.am
index b0bf902..070eacd 100644
--- a/demangle/Makefile.am
+++ b/demangle/Makefile.am
@@ -1,10 +1,10 @@
-INCLUDES += -I$(top_srcdir)
+INCLUDES = -I$(top_srcdir)
 
 noinst_HEADERS = \
 	ansidecl.h     \
-        dyn-string.h   \
-        demangle.h     \
-        safe-ctype.h 
+	dyn-string.h   \
+	demangle.h     \
+	safe-ctype.h 
 
 noinst_LIBRARIES = libdemangle.a
 
diff --git a/helgrind/Makefile.am b/helgrind/Makefile.am
index 0bdc471..95255d7 100644
--- a/helgrind/Makefile.am
+++ b/helgrind/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/lackey/Makefile.am b/lackey/Makefile.am
index 0bdc471..95255d7 100644
--- a/lackey/Makefile.am
+++ b/lackey/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/memcheck/Makefile.am b/memcheck/Makefile.am
index 0bdc471..95255d7 100644
--- a/memcheck/Makefile.am
+++ b/memcheck/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind
 
diff --git a/none/Makefile.am b/none/Makefile.am
index 0bdc471..95255d7 100644
--- a/none/Makefile.am
+++ b/none/Makefile.am
@@ -4,7 +4,7 @@
 
 LDFLAGS = -Wl,-z -Wl,initfirst
 
-INCLUDES += -I$(srcdir)/demangle
+INCLUDES = -I$(srcdir)/demangle
 
 bin_SCRIPTS = valgrind