From: Karl Fleischmann Date: Wed, 27 Jul 2022 13:11:25 +0000 (+0200) Subject: m4: dovecot.m4 - Fix formatting X-Git-Tag: 2.4.0~3726 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b8dfbd84809ffef1b0a78d4ea29866b3f82e23e;p=thirdparty%2Fdovecot%2Fcore.git m4: dovecot.m4 - Fix formatting Replace indentation of C99 checks from tabs/arbitrary numbered spaces to consistent indenting with 2 spaces per level. --- diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index 69eb1c7d04..fdcca09c7d 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -30,56 +30,55 @@ AC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[ dnl * gcc specific options AC_DEFUN([DC_DOVECOT_CFLAGS],[ - AC_PROG_CC_C99 - AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [ - AC_MSG_ERROR(C99 capable compiler required) - ]) + AC_PROG_CC_C99 + AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [ + AC_MSG_ERROR(C99 capable compiler required) + ]) - AC_MSG_CHECKING([Which $CC -std flag to use]) - old_cflags=$CFLAGS - std= - for mystd in gnu11 gnu99 c11 c99; do - CFLAGS="-std=$mystd" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM() - ], [ - CFLAGS="$CFLAGS $old_cflags" - std=$mystd - break - ], [ - CFLAGS="$old_cflags" - ]) - done - AC_MSG_RESULT($std) - - AS_IF([test "x$ac_cv_c_compiler_gnu" = "xyes"], [ - dnl -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings - dnl -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems - dnl -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings - CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" - - AS_IF([test "$have_clang" = "yes"], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3) - # error new clang - #endif - ]], [[]])],[],[ - dnl clang 3.3+ unfortunately this gives warnings with hash.h - CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier" - ]) - ], [ - dnl This is simply to avoid warning when building strftime() wrappers.. - CFLAGS="$CFLAGS -fno-builtin-strftime" - ]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #if __GNUC__ < 4 - # error old gcc - #endif - ]], [[]])],[ - dnl gcc4 - CFLAGS="$CFLAGS -Wstrict-aliasing=2" - ],[]) + AC_MSG_CHECKING([Which $CC -std flag to use]) + old_cflags=$CFLAGS + std= + for mystd in gnu11 gnu99 c11 c99; do + CFLAGS="-std=$mystd" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM() + ], [ + CFLAGS="$CFLAGS $old_cflags" + std=$mystd + break + ], [ + CFLAGS="$old_cflags" + ]) + done + AC_MSG_RESULT($std) + + AS_IF([test "x$ac_cv_c_compiler_gnu" = "xyes"], [ + dnl -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings + dnl -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems + dnl -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings + CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" + + AS_IF([test "$have_clang" = "yes"], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3) + # error new clang + #endif + ]], [[]])],[],[ + dnl clang 3.3+ unfortunately this gives warnings with hash.h + CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier" + ]) + ], [ + dnl This is simply to avoid warning when building strftime() wrappers.. + CFLAGS="$CFLAGS -fno-builtin-strftime" + ]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #if __GNUC__ < 4 + # error old gcc + #endif + ]], [[]])],[ + dnl gcc4 + CFLAGS="$CFLAGS -Wstrict-aliasing=2" + ],[]) ]) ])