mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-14 21:45:13 -05:00
23 lines
605 B
Plaintext
23 lines
605 B
Plaintext
|
# AC_COMPILE_STDCXX_11
|
||
|
AC_DEFUN([AC_COMPILE_STDCXX_11], [
|
||
|
|
||
|
AC_CACHE_CHECK(if g++ supports C++11 features with -std=c++0x,
|
||
|
ac_cv_cxx_compile_cxx11_cxx,
|
||
|
[AC_LANG_SAVE
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||
|
CXXFLAGS="$CXXFLAGS -std=gnu++0x"
|
||
|
AC_TRY_COMPILE([
|
||
|
#include <functional>
|
||
|
std::function<int (int, int)> func;
|
||
|
],,
|
||
|
ac_cv_cxx_compile_cxx11_cxx=yes, ac_cv_cxx_compile_cxx11_cxx=no)
|
||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||
|
AC_LANG_RESTORE
|
||
|
])
|
||
|
|
||
|
if test "$ac_cv_cxx_compile_cxx11_cxx" = yes; then
|
||
|
AC_DEFINE(HAVE_STDCXX_11,,[Define if g++ supports C++11 features. ])
|
||
|
fi
|
||
|
])
|