conftools: Use -Werror when checking compile flags
This commit is contained in:
parent
ef1f2a1931
commit
21381bf35e
@ -5,6 +5,8 @@ NOTE: We are looking for help with a few things:
|
|||||||
Release x.x.x xxx xxxxxxxxx xx xxxx
|
Release x.x.x xxx xxxxxxxxx xx xxxx
|
||||||
Other changes:
|
Other changes:
|
||||||
#396 Windows: Drop support for Visual Studio <=8.0/2005
|
#396 Windows: Drop support for Visual Studio <=8.0/2005
|
||||||
|
#383 #392 Autotools: Use -Werror while configure tests the compiler
|
||||||
|
for supported compile flags to avoid false positives
|
||||||
#383 #393 Autotools: Improve handling of user (C|CPP|CXX|LD)FLAGS,
|
#383 #393 Autotools: Improve handling of user (C|CPP|CXX|LD)FLAGS,
|
||||||
e.g. ensure that they have the last word over flags added
|
e.g. ensure that they have the last word over flags added
|
||||||
while running ./configure
|
while running ./configure
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
#
|
#
|
||||||
# Check whether the given FLAG works with the current language's compiler
|
# Check whether the given FLAG plus -Werror works with the current
|
||||||
# or gives an error. (Warnings, however, are ignored)
|
# language's compiler or gives an error.
|
||||||
#
|
#
|
||||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||||
# success/failure.
|
# success/failure.
|
||||||
@ -28,6 +28,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||||
|
# Copyright (c) 2020 Sebastian Pipping <sebastian@pipping.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# This program is free software: you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by the
|
# under the terms of the GNU General Public License as published by the
|
||||||
@ -55,14 +56,14 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 4
|
#serial 5
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 -Werror $1"
|
||||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||||
[AS_VAR_SET(CACHEVAR,[no])])
|
[AS_VAR_SET(CACHEVAR,[no])])
|
||||||
|
Loading…
Reference in New Issue
Block a user