[Mesa-dev] [PATCH 1/2] Sort/Unify CFLAGS and CXXFLAGS.

Johannes Obermayr johannesobermayr at gmx.de
Sat Oct 8 07:44:43 PDT 2011


---
 configure.ac |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 49e81ad..942084b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1875,9 +1875,9 @@ 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 Add user CFLAGS and CXXFLAGS and sort them
+CFLAGS=`echo "$CFLAGS $USER_CFLAGS"|tr " " "\n"|sort -u|tr "\n" " "` 
+CXXFLAGS=`echo "$CXXFLAGS $USER_CXXFLAGS"|tr " " "\n"|sort -u|tr "\n" " "`
 
 dnl Substitute the config
 AC_CONFIG_FILES([configs/autoconf])
-- 
1.7.3.4



More information about the mesa-dev mailing list