aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4175e8fe2..351356282 100644
--- a/configure.ac
+++ b/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
@@ -111,6 +110,19 @@ if test -z "$prefix" || test "x$prefix" = xNONE; then
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 ---------------------------------------------------------------------------
AC_CHECK_FUNCS(daemon fork)
@@ -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 ---------------------------