Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 593 Lines • ▼ Show 20 Lines | |||||
AC_SUBST(API__OFF_T) | AC_SUBST(API__OFF_T) | ||||
AM_SUBST_NOTMAKE(API__OFF_T) | AM_SUBST_NOTMAKE(API__OFF_T) | ||||
AC_SUBST(API__SSIZE_T) | AC_SUBST(API__SSIZE_T) | ||||
AM_SUBST_NOTMAKE(API__SSIZE_T) | AM_SUBST_NOTMAKE(API__SSIZE_T) | ||||
# Checks for compiler features. | # Checks for compiler features. | ||||
if test "$GCC" = yes; then | if test "$GCC" = yes; then | ||||
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" | CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" | ||||
if test "$USE_MAINTAINER_MODE" = "yes"; then | |||||
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" | CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" | ||||
# If -Wno-missing-field-initializers is supported we can enable a | # If -Wno-missing-field-initializers is supported we can enable a | ||||
# a bunch of really useful warnings. | # a bunch of really useful warnings. | ||||
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) | AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) | ||||
_gcc_cflags_save=$CFLAGS | _gcc_cflags_save=$CFLAGS | ||||
CFLAGS="-Wno-missing-field-initializers" | CFLAGS="-Wno-missing-field-initializers" | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) | ||||
AC_MSG_RESULT($_gcc_wopt) | AC_MSG_RESULT($_gcc_wopt) | ||||
CFLAGS=$_gcc_cflags_save; | CFLAGS=$_gcc_cflags_save; | ||||
if test x"$_gcc_wopt" = xyes ; then | if test x"$_gcc_wopt" = xyes ; then | ||||
CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" | CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" | ||||
CFLAGS="$CFLAGS -Wwrite-strings" | CFLAGS="$CFLAGS -Wwrite-strings" | ||||
CFLAGS="$CFLAGS -Wdeclaration-after-statement" | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | ||||
CFLAGS="$CFLAGS -Wno-missing-field-initializers" | CFLAGS="$CFLAGS -Wno-missing-field-initializers" | ||||
CFLAGS="$CFLAGS -Wno-sign-compare" | CFLAGS="$CFLAGS -Wno-sign-compare" | ||||
CFLAGS="$CFLAGS -Wno-format-zero-length" | CFLAGS="$CFLAGS -Wno-format-zero-length" | ||||
CFLAGS="$CFLAGS -Wno-format-truncation" | CFLAGS="$CFLAGS -Wno-format-truncation" | ||||
CFLAGS="$CFLAGS -Wno-sizeof-pointer-div" | CFLAGS="$CFLAGS -Wno-sizeof-pointer-div" | ||||
fi | fi | ||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" | CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" | ||||
AC_MSG_CHECKING([if gcc supports -Wpointer-arith]) | AC_MSG_CHECKING([if gcc supports -Wpointer-arith]) | ||||
_gcc_cflags_save=$CFLAGS | _gcc_cflags_save=$CFLAGS | ||||
CFLAGS="-Wpointer-arith" | CFLAGS="-Wpointer-arith" | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) | ||||
AC_MSG_RESULT($_gcc_wopt) | AC_MSG_RESULT($_gcc_wopt) | ||||
CFLAGS=$_gcc_cflags_save; | CFLAGS=$_gcc_cflags_save; | ||||
if test x"$_gcc_wopt" = xyes ; then | if test x"$_gcc_wopt" = xyes ; then | ||||
CFLAGS="$CFLAGS -Wpointer-arith" | CFLAGS="$CFLAGS -Wpointer-arith" | ||||
fi | fi | ||||
fi | |||||
if test "$have_w32_system" = yes; then | if test "$have_w32_system" = yes; then | ||||
CFLAGS="$CFLAGS -mms-bitfields" | CFLAGS="$CFLAGS -mms-bitfields" | ||||
fi | fi | ||||
fi | fi | ||||
# Only used for debugging, so no serious test needed (for actual | # Only used for debugging, so no serious test needed (for actual | ||||
# functionality you have to test libc as well, this only tests the | # functionality you have to test libc as well, this only tests the | ||||
# compiler). | # compiler). | ||||
▲ Show 20 Lines • Show All 303 Lines • Show Last 20 Lines |