Mesa (master): configure: allow C{,XX}FLAGS override

Brian Paul brianp at kemper.freedesktop.org
Thu Jul 14 09:34:29 PDT 2011


Module: Mesa
Branch: master
Commit: ff2efdf5997d20b41f7a82b77118366e6fbd23bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff2efdf5997d20b41f7a82b77118366e6fbd23bc

Author: Marcin Baczyński <marbacz at gmail.com>
Date:   Wed Jul 13 21:26:49 2011 +0200

configure: allow C{,XX}FLAGS override

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Brian Paul <brianp at vmware.com>

---

 configure.ac |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 949faa4..7125694 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,10 @@ AC_INIT([Mesa],[mesa_version],
 AC_CONFIG_AUX_DIR([bin])
 AC_CANONICAL_HOST
 
+dnl Save user CFLAGS and CXXFLAGS so one can override the default ones
+USER_CFLAGS="$CFLAGS"
+USER_CXXFLAGS="$CXXFLAGS"
+
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.24
@@ -2022,6 +2026,10 @@ dnl Restore LDFLAGS and CPPFLAGS
 LDFLAGS="$_SAVE_LDFLAGS"
 CPPFLAGS="$_SAVE_CPPFLAGS"
 
+dnl Add user CFLAGS and CXXFLAGS
+CFLAGS="$CFLAGS $USER_CFLAGS"
+CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
+
 dnl Substitute the config
 AC_CONFIG_FILES([configs/autoconf])
 



More information about the mesa-commit mailing list