lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [4788] Use '-std=c++0x' for gcc versions that understand i


From: Greg Chicares
Subject: [lmi-commits] [4788] Use '-std=c++0x' for gcc versions that understand it (VS)
Date: Thu, 18 Mar 2010 23:16:35 +0000

Revision: 4788
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4788
Author:   chicares
Date:     2010-03-18 23:16:35 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
Use '-std=c++0x' for gcc versions that understand it (VS)

Modified Paths:
--------------
    lmi/trunk/configure.ac

Modified: lmi/trunk/configure.ac
===================================================================
--- lmi/trunk/configure.ac      2010-03-18 22:30:25 UTC (rev 4787)
+++ lmi/trunk/configure.ac      2010-03-18 23:16:35 UTC (rev 4788)
@@ -558,7 +558,7 @@
 fi
 
 if test "x$GXX" == "xyes"; then
-    CXXFLAGS="$CXXFLAGS $CFLAGS_gcc_common -std=c++98 \
+    CXXFLAGS="$CXXFLAGS $CFLAGS_gcc_common \
         -Wctor-dtor-privacy \
         -Wdeprecated \
         -Wnon-template-friend \
@@ -566,6 +566,15 @@
         -Wpmf-conversions \
         -Wsynth"
 
+    dnl g++ 4.4 doesn't compile wxWidgets code that relies on use of empty
+    dnl macro arguments, because it's behavior undefined by the standard
+    dnl prior to C++0x or C99; if the compiler is too old to understand
+    dnl -std=c++0x, it's also too old to complain about this and so we can
+    dnl use -std=c++98
+    AX_CXX_CHECK_FLAG([-std=c++0x],[],[],
+                      [CXXFLAGS="$CXXFLAGS -std=c++0x"],
+                      [CXXFLAGS="$CXXFLAGS -std=c++98"])
+
     dnl we need to use this option with g++ 4.3 to prevent its complaints
     dnl about "-funit-at-a-time is required for inlining of functions that are
     dnl only called once" in debug builds





reply via email to

[Prev in Thread] Current Thread [Next in Thread]