configure: use c++11 and fallback to c++0x for c++ files
authorMarton Balint <cus@passwd.hu>
Sat, 25 Mar 2017 16:36:39 +0000 (17:36 +0100)
committerMarton Balint <cus@passwd.hu>
Tue, 28 Mar 2017 19:57:54 +0000 (21:57 +0200)
Needed for the C+11 atomics. Also change add_cxxflags to check_cxxflags.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
configure

index dc968bcfd836deac7ba4c24e93defb2bb914a1d2..a84b12656fb5ce1451006a7cff3dd65c76afa8ee 100755 (executable)
--- a/configure
+++ b/configure
@@ -4649,7 +4649,7 @@ fi
 
 add_cppflags -D_ISOC99_SOURCE
 add_cxxflags -D__STDC_CONSTANT_MACROS
-add_cxxflags -std=c++98
+check_cxxflags -std=c++11 || check_cxxflags -std=c++0x
 
 # some compilers silently accept -std=c11, so we also need to check that the
 # version macro is defined properly