/usr/share/dune/aclocal/cxx0x_compiler.m4 is in libdune-common-dev 2.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # whether compiler accepts -std=c++11 or -std=c++0x
# can be disabled by --disable-gxx0xcheck
AC_DEFUN([GXX0X],[
ac_save_CXX="$CXX"
# try flag -std=c++11
AC_CACHE_CHECK([whether $CXX accepts -std=c++11], dune_cv_gplusplus_accepts_cplusplus11, [
AC_REQUIRE([AC_PROG_CXX])
AC_ARG_ENABLE(gxx0xcheck,
AC_HELP_STRING([--disable-gxx0xcheck],
[Skip test whether compiler supports flag -std=c++11 and -std=c++0x to enable C++11 features (with this option C++11 features will not be activated)]),
[gxx0xcheck=$enableval],
[gxx0xcheck=yes])
if test "x$GXX" = xyes && test "x$gxx0xcheck" = xyes; then
AC_LANG_PUSH([C++])
CXX="$CXX -std=c++11"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <iostream>
#include <array>
]], [])],
dune_cv_gplusplus_accepts_cplusplus11=yes,
dune_cv_gplusplus_accepts_cplusplus11=no)
AC_LANG_POP([C++])
fi
])
if test "x$dune_cv_gplusplus_accepts_cplusplus11" == "xyes" ; then
CXX="$ac_save_CXX -std=c++11"
CXXCPP="$CXXCPP -std=c++11"
else
CXX="$ac_save_CXX"
# try flag -std=c++0x instead
AC_CACHE_CHECK([whether $CXX accepts -std=c++0x], dune_cv_gplusplus_accepts_cplusplus0x, [
AC_REQUIRE([AC_PROG_CXX])
if test "x$GXX" = xyes && test "x$gxx0xcheck" = xyes; then
AC_LANG_PUSH([C++])
CXX="$CXX -std=c++0x"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <iostream>
#include <array>
]], [])],
dune_cv_gplusplus_accepts_cplusplus0x=yes,
dune_cv_gplusplus_accepts_cplusplus0x=no)
AC_LANG_POP([C++])
fi
])
if test "x$dune_cv_gplusplus_accepts_cplusplus0x" == "xyes" ; then
CXX="$ac_save_CXX -std=c++0x"
CXXCPP="$CXXCPP -std=c++0x"
else
CXX="$ac_save_CXX"
fi
fi
])
|