Browse Source

[master] Merged trac5049 (configure displays C++ standard)

Francis Dupont 8 years ago
parent
commit
dad932d544
1 changed files with 12 additions and 0 deletions
  1. 12 0
      configure.ac

+ 12 - 0
configure.ac

@@ -116,6 +116,17 @@ if test $? -eq 0; then
   GNU_SED=yes
 fi
 
+# Display the C++ version
+AC_MSG_CHECKING([C++ version])
+cat > conftest.cpp << EOF
+long v = __cplusplus;
+EOF
+CXX_STANDARD=`$CXX $CXXFLAGS -E -o - conftest.cpp | grep '^long v = ' | $SED -e 's/^long v = //' -e 's/[[^0-9]]*$//' 2> /dev/null`
+if test -z "$CXX_STANDARD"; then
+	CXX_STANDARD="unknown"
+fi
+AC_MSG_RESULT([$CXX_STANDARD])
+
 # Linker options
 
 # check -R, "-Wl,-R" or -rpath
@@ -1622,6 +1633,7 @@ Package:
 C++ Compiler:
   CXX:             ${CXX}
   CXX_VERSION:     ${CXX_VERSION}
+  CXX_STANDARD:    ${CXX_STANDARD}
   DEFS:            ${DEFS}
   CPPFLAGS:        ${CPPFLAGS}
   CXXFLAGS:        ${CXXFLAGS}