From: Marco Bettini Date: Mon, 2 May 2022 11:13:41 +0000 (+0000) Subject: m4: adding check for clang -Wstrict-bool availability X-Git-Tag: 2.3.20~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f8682fc0d185c30475cf6618fa264a4d1042e71;p=thirdparty%2Fdovecot%2Fcore.git m4: adding check for clang -Wstrict-bool availability --- diff --git a/configure.ac b/configure.ac index 82f83915c7..f082dcd43b 100644 --- a/configure.ac +++ b/configure.ac @@ -316,6 +316,7 @@ AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h \ sys/utsname.h glob.h linux/falloc.h ucred.h sys/ucred.h crypt.h) CC_CLANG +CC_STRICT_BOOL AC_LD_WHOLE_ARCHIVE DC_DOVECOT_HARDENING DC_DOVECOT_FUZZER diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index 037d5e40e6..8092bf57c2 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -421,6 +421,7 @@ AC_DEFUN([DC_DOVECOT],[ ]) CC_CLANG + CC_STRICT_BOOL DC_DOVECOT_CFLAGS DC_DOVECOT_HARDENING @@ -566,6 +567,15 @@ AC_DEFUN([CC_CLANG],[ AC_MSG_RESULT([$have_clang]) ]) +AC_DEFUN([CC_STRICT_BOOL], [ + AS_IF([test $have_clang = yes], [ + AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) + gl_COMPILER_OPTION_IF([-Wstrict-bool], [ + AC_DEFINE(HAVE_STRICT_BOOL,, [we have strict bool]) + ]) + ]) +]) + AC_DEFUN([DOVECOT_WANT_UBSAN], [ AC_ARG_ENABLE(ubsan, AS_HELP_STRING([--enable-ubsan], [Enable undefined behaviour sanitizes (default=no)]),