… | |
… | |
24 | AC_PROG_CXX |
24 | AC_PROG_CXX |
25 | AC_PROG_INSTALL |
25 | AC_PROG_INSTALL |
26 | |
26 | |
27 | AC_USE_SYSTEM_EXTENSIONS |
27 | AC_USE_SYSTEM_EXTENSIONS |
28 | AC_LANG(C++) |
28 | AC_LANG(C++) |
29 | |
|
|
30 | if test "$ac_prog_cxx_stdcxx" != cxx11; then |
|
|
31 | AC_MSG_ERROR([the compiler does not support C++11]) |
|
|
32 | fi |
|
|
33 | |
29 | |
34 | LINKER="$CXX" |
30 | LINKER="$CXX" |
35 | dnl check whether we can link with gcc -lsupc++ |
31 | dnl check whether we can link with gcc -lsupc++ |
36 | if test x$GCC = xyes && test x$GXX = xyes; then |
32 | if test x$GCC = xyes && test x$GXX = xyes; then |
37 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
33 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
… | |
… | |
174 | support_warnings=yes |
170 | support_warnings=yes |
175 | fi]) |
171 | fi]) |
176 | if test x$GXX = xyes; then |
172 | if test x$GXX = xyes; then |
177 | if test $support_warnings = yes; then |
173 | if test $support_warnings = yes; then |
178 | save_CXXFLAGS="$CXXFLAGS" |
174 | save_CXXFLAGS="$CXXFLAGS" |
179 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value" |
175 | for warning in \ |
|
|
176 | -Wall \ |
|
|
177 | -Wno-parentheses \ |
|
|
178 | -Wno-reorder \ |
|
|
179 | -Wno-sign-compare \ |
|
|
180 | -Wno-unused-value \ |
|
|
181 | ; do |
|
|
182 | CXXFLAGS="$CXXFLAGS $warning" |
|
|
183 | done |
180 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
184 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
181 | else |
185 | else |
182 | CXXFLAGS="$CXXFLAGS -w" |
186 | CXXFLAGS="$CXXFLAGS -w" |
183 | fi |
187 | fi |
184 | fi |
188 | fi |