summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2016-12-08 12:51:23 +0200
committerPanu Matilainen <pmatilai@redhat.com>2016-12-08 12:53:54 +0200
commitbd3eb213360df1843182b881659d9a3eeff309bb (patch)
treeebd648759331a31e8cece5cc62bdbf8fa21dbfbe
parent0584101e15539dc022db27bba801e5d6e8d4679b (diff)
downloadrpm-bd3eb213360df1843182b881659d9a3eeff309bb.tar.gz
Stop messing with CFLAGS from configure
CFLAGS is a user variable that software is supposed to honor but not touch, that's what AM_CFLAGS and friends are for. rpm.am is included by all our makefiles so that's a handy place to set defaults centrally, do so by AC_SUBST'ing the rpm cflags into AM_CFLAGS there.
-rw-r--r--configure.ac6
-rw-r--r--rpm.am.in (renamed from rpm.am)2
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 0e5188646..e08096dc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,9 +50,9 @@ if test "$GCC" = yes; then
],[])
CFLAGS=$old_cflags
done
- CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS"
+ RPMCFLAGS="-fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS"
fi
-export CFLAGS
+AC_SUBST(RPMCFLAGS)
AC_SYS_LARGEFILE
@@ -892,7 +892,7 @@ AC_PATH_PROG(AUTOM4TE,autom4te,:)
AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp])
-AC_CONFIG_FILES([Makefile
+AC_CONFIG_FILES([Makefile rpm.am
rpmio/Makefile lib/Makefile build/Makefile sign/Makefile
po/Makefile.in scripts/Makefile fileattrs/Makefile
misc/Makefile
diff --git a/rpm.am b/rpm.am.in
index 1f43ad8a0..c91bebf61 100644
--- a/rpm.am
+++ b/rpm.am.in
@@ -8,3 +8,5 @@ rpmconfigdir = $(prefix)/lib/rpm
# Libtool version (current-revision-age) for all our libraries
rpm_version_info = 7:0:0
+
+AM_CFLAGS = @RPMCFLAGS@