]> git.ipfire.org Git - thirdparty/strongswan.git/commit - configure.ac
configure: Add option to build with extended compiler warnings and -Werror
authorTobias Brunner <tobias@strongswan.org>
Fri, 15 Jul 2022 08:42:56 +0000 (10:42 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 18 Jul 2022 10:42:24 +0000 (12:42 +0200)
commit1f242e772b7076b32136d86d403e77874a8f83e4
treec785d65ffeddba0776956b7929a1b0a661c8769c
parent9c86787de5c5a80733aa80482b143f1a2f08a7e1
configure: Add option to build with extended compiler warnings and -Werror

Setting -Werror in CFLAGS passed to configure is not ideal as that affects
all the checks performed by the script.

This caused an issue with newer versions of Autoconf and the AC_PROG_LEX
macro that insisted on finding a lexer library.  But due to warnings from
the generated test lexer (misleading indentation) that got turned into
errors no library was found (none would have been necessary), so LEX was
not set and no lexers were built.

With this option enabled, we add -Werror to CFLAGS after all tests ran.
It also enables additional warnings via -Wextra.

The option is auto-enabled when building from the repository.
configure.ac
scripts/git-version
scripts/test.sh