1
dnl Copyright (C) 2009 Sun Microsystems
2
dnl This file is free software; Sun Microsystems
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
7
dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
8
AS_IF([test "$GCC" = "yes"],
9
[AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
10
[AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
11
[CXX_STANDARD="-std=gnu++0x"],
12
[CXX_STANDARD="-std=gnu++98"])
15
AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}"
17
save_CXXFLAGS="${CXXFLAGS}"
18
CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}"
19
AC_CXX_HEADER_STDCXX_98
20
CXXFLAGS="${save_CXXFLAGS}"
22
AC_SUBST([CXX_STANDARD])
1
AC_DEFUN([AC_CXX_CHECK_STANDARD],[
2
AC_CACHE_CHECK([what C++ standard the compiler supports],
5
save_CXXFLAGS="${CXXFLAGS}"
6
CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"
14
string foo("test string");
16
[ac_cv_cxx_standard="gnu++0x"],
17
[ac_cv_cxx_standard="gnu++98"])
18
CXXFLAGS="${save_CXXFLAGS}"
21
CXXFLAGS="-std=${ac_cv_cxx_standard} ${CXXFLAGS}"