diff --git a/configure.in b/configure.in index fc6e5228..834ffe86 100644 --- a/configure.in +++ b/configure.in @@ -50,10 +50,40 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]])], AC_MSG_RESULT([yes]) std_cpp0x="-std=c++0x", AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support C++0x, please upgrade (GCC >= 4.4)]]) + AC_MSG_ERROR([[Your compiler doesn't seem to support C++0x, please upgrade (GCC >= 4.5)]]) ) CXXFLAGS="$old_CXXFLAGS $std_cpp0x" +dnl ========================================== +dnl = checking for initializer lists support = +dnl ========================================== +AC_MSG_CHECKING([whether compiler supports initializer lists]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[std::vector test = { 1, 2, 3 }; test.push_back(4);]])], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + AC_MSG_ERROR([[Your compiler doesn't seem to support initializer lists, please upgrade (GCC >= 4.5)]]) +) + +dnl ===================================== +dnl = checking for auto keyword support = +dnl ===================================== +AC_MSG_CHECKING([whether compiler supports auto keyword]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[auto test = new int; *test = 1;]])], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + AC_MSG_ERROR([[Your compiler doesn't seem to support auto keyword, please upgrade (GCC >= 4.5)]]) +) + +dnl ========================================= +dnl = checking for lambda functions support = +dnl ========================================= +AC_MSG_CHECKING([whether compiler supports lambda functions]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[int a = 5; std::function f = [&a](int b) { return a + b; }; f(8);]])], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + AC_MSG_ERROR([[Your compiler doesn't seem to support lambda functions, please upgrade (GCC >= 4.5)]]) +) + dnl ============================== dnl = checking for regex (win32) = dnl ==============================