# HG changeset patch # User Matti Hamalainen # Date 1412598235 -10800 # Node ID 9694eb987bf30e90e00186ae1daf9d00484689ec # Parent 51d5549a1bdc86bc5fd516ab47ec73e522450baf Add check int configure for C++11 support. diff -r 51d5549a1bdc -r 9694eb987bf3 configure --- a/configure Mon Oct 06 15:23:36 2014 +0300 +++ b/configure Mon Oct 06 15:23:55 2014 +0300 @@ -401,6 +401,31 @@ exit 1 fi + +# +# Does C++ compiler support -std=c++11 ? +# +printf "checking whether the C++ compiler supports C++11..." +cat > $cdir/$cbasename << _EOF_ +#include +int main(int argc, char *argv[]) +{ + std::shared_ptr sp(new int(5)); + (void) argc; + (void) argv; + return 0; +} +_EOF_ +if (cd $cdir && $CXX -std=c++11 -c $cbasename >$cout 2>&1) +then + echo " yes" +else + echo " no" + sed 's/^/> /' $cdir/$cout + echo "error: looks like the C++ compiler does not support C++11" 1>&2 + exit 1 +fi + # # Create the directory where the build-specific files go #