Get rid of all the duplicated settings of AM_CFLAGS in the makefiles
for the various core modules and use a single global setting so that
the flags are actually consistent everywhere.

Also get rid of most the USE_PIE blocks in the makefiles by having
configure pass expand a variable in the new global AM_CFLAGS to one
of "-fpie" or "" depending on whether PIE is in use.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3760 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index f7db980..11f2073 100644
--- a/configure.in
+++ b/configure.in
@@ -335,6 +335,7 @@
 fi
 
 # Check for PIE support in the compiler and linker
+AC_SUBST(PIE_AM_CFLAGS)
 AC_CACHE_CHECK([for PIE support], vg_cv_pie,
 	       [AC_ARG_ENABLE(pie, [  --enable-pie            platform supports PIE linking],
 		[vg_cv_pie=$enableval],
@@ -350,6 +351,7 @@
                  LDFLAGS=$safe_LDFLAGS])])
 if test "$vg_cv_pie" = yes; then
 AC_DEFINE([HAVE_PIE], 1, [can create position-independent executables])
+PIE_AM_CFLAGS="-fpie"
 fi
 AM_CONDITIONAL(USE_PIE, test "$vg_cv_pie" = "yes")