- # Check what compiler we are using
- AC_MSG_CHECKING([for GNU C++])
- if test "$GXX" = "yes"; then
- AC_MSG_RESULT([yes])
- FLAGS="-Wall -W"
- # -pedantic
- test "$DEBUG" = "yes" && FLAGS="$FLAGS -g -fno-inline"
- else
- AC_MSG_RESULT([no, trying other compilers])
- AC_MSG_CHECKING(for MIPSpro)
- mips_pro_ver=`$CXX -version 2>&1 | grep -i mipspro | cut -f4 -d ' '`
- if test -z "$mips_pro_ver"; then
- AC_MSG_RESULT([no])
- else
- AC_MSG_RESULT([yes, version $mips_pro_ver.])
- AC_MSG_CHECKING(for -LANG:std in CXXFLAGS)
- lang_std_not_set=`echo $CXXFLAGS | grep "\-LANG:std"`
- if test "x$lang_std_not_set" = "x"; then
- AC_MSG_RESULT([not set, setting.])
- FLAGS="-LANG:std"
- else
- AC_MSG_RESULT([already set.])
- fi
+ # Check what compiler we are using
+ AC_MSG_CHECKING([for GNU CC])
+ if test "$GCC" = "yes"; then
+ AC_MSG_RESULT([yes])
+ if test "$DEBUG" = "yes"; then
+ FLAGS="-g -fno-inline"
+ FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
+ FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith"
+ # for Python.h
+ #FLAGS="$FLAGS -Wno-long-long"
+ fi
+ if test "$STRICT" = "yes"; then
+ FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
+ fi