mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
configure.c: fix AX_GCC_FUNC_ATTRIBUTE detection on custom CFLAGS
AX_GCC_FUNC_ATTRIBUTE detect attribute feature by compiler warnings. Custom or unrecognized CFLAGS can causes extra warnings so attribute check failed. Reset CFLAGS and restore after AX_GCC_FUNC_ATTRIBUTE call. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9f4e2b945f
commit
ee013b383f
@ -45,7 +45,13 @@ if test "x$enable_werror" = xyes; then
|
||||
mc_CHECK_ONE_CFLAG([-Werror])
|
||||
fi
|
||||
|
||||
dnl Compiler can generate warnings for unrecognized flags added to CFLAGS
|
||||
dnl which causes attribute checks to fail
|
||||
ax_gcc_func_attribute_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS=
|
||||
AX_GCC_FUNC_ATTRIBUTE([fallthrough])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_gcc_func_attribute_save_flags
|
||||
unset ax_gcc_func_attribute_save_flags
|
||||
|
||||
LT_INIT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user