diff options
Diffstat (limited to 'build/cxx/gnu/configure')
-rwxr-xr-x | build/cxx/gnu/configure | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build/cxx/gnu/configure b/build/cxx/gnu/configure index 81848f7..c551713 100755 --- a/build/cxx/gnu/configure +++ b/build/cxx/gnu/configure @@ -29,6 +29,18 @@ $echo cxx_gnu=`read_path --command g++` +# Determine the C++ standard. +# +cxx_gnu_standard=`echo "$3" | sed -e 's/.*-std=\([^ ]*\).*/\1/' -e t -e d` + +if [ -z "$cxx_gnu_standard" ]; then + cxx_gnu_standard="gnu++98" +elif [ "$cxx_gnu_standard" = "c++0x" ]; then + cxx_gnu_standard="c++11" +elif [ "$cxx_gnu_standard" = "gnu++0x" ]; then + cxx_gnu_standard="gnu++11" +fi + # Pass cxx_extra_options and cxx_ld_extra_options since those # can affect the search paths (e.g., -m32) and target. # @@ -76,6 +88,7 @@ if [ "$2" == "y" ]; then fi echo "cxx_gnu := $cxx_gnu" > $1 +echo "cxx_gnu_standard := $cxx_gnu_standard" >> $1 echo "cxx_gnu_libraries := $cxx_gnu_libraries" >> $1 echo "cxx_gnu_optimization_options := $optimization" >> $1 echo "cxx_gnu_target := $cxx_gnu_target" >> $1 |