configure.ac: enable C++ warnings
This commit is contained in:
parent
2571accfc3
commit
768504e956
25
configure.ac
25
configure.ac
@ -21,7 +21,6 @@ dnl Programs
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_CXX
|
||||
AC_CXX_COMPILE_STDCXX_0X
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AC_PROG_INSTALL
|
||||
@ -110,6 +109,19 @@ if test -z "$prefix" || test "x$prefix" = xNONE; then
|
||||
done
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Language Checks
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_CXX_COMPILE_STDCXX_0X
|
||||
if test "$ax_cv_cxx_compile_cxx0x_native" != yes; then
|
||||
if test "$ax_cv_cxx_compile_cxx0x_gxx" = yes; then
|
||||
AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++0x"
|
||||
elif test "$ax_cv_cxx_compile_cxx0x_cxx" = yes; then
|
||||
AM_CXXFLAGS="$AM_CXXFLAGS -std=c++0x"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Header/Library Checks
|
||||
dnl ---------------------------------------------------------------------------
|
||||
@ -1487,6 +1499,17 @@ then
|
||||
AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
|
||||
AX_APPEND_COMPILE_FLAGS([-pedantic])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wall])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-declarations])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wshadow])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wsign-compare])
|
||||
AC_LANG_POP
|
||||
fi
|
||||
|
||||
dnl ---------------------------- warnings as errors ---------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user