FS-9109: [build] attempt to fix misleading indentation errors on gcc 6.0

This commit is contained in:
Michael Jerris 2016-04-28 13:06:35 -05:00
parent 6869888845
commit 0742defa9b
1 changed files with 13 additions and 0 deletions

View File

@ -377,6 +377,16 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then
[ac_cv_gcc_supports_w_no_unused_result=no])]) [ac_cv_gcc_supports_w_no_unused_result=no])])
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
AC_MSG_RESULT($ac_cv_gcc_supports_w_no_unused_result) AC_MSG_RESULT($ac_cv_gcc_supports_w_no_unused_result)
saved_CFLAGS="$CFLAGS"
AC_CACHE_CHECK([whether compiler supports -Wno-misleading-indentation],
[ac_cv_gcc_supports_w_no_misleading_indentation], [
CFLAGS="$CFLAGS -Wno-misleading-indentation -Wno-error=misleading-indentation"
AC_TRY_COMPILE([],[return 0;],
[ac_cv_gcc_supports_w_no_misleading_indentation=yes],
[ac_cv_gcc_supports_w_no_misleading_indentation=no])])
CFLAGS="$saved_CFLAGS"
AC_MSG_RESULT($ac_cv_gcc_supports_w_no_misleading_indentation)
fi fi
# tweak compiler specific flags # tweak compiler specific flags
@ -413,6 +423,9 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result) APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)
fi fi
if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
fi
if test "${enable_64}" = "yes"; then if test "${enable_64}" = "yes"; then
case "$host" in case "$host" in
*darwin*) *darwin*)