|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"http://www.w3.org/TR/html4/strict.dtd">
|
|
Packit |
0b5880 |
<html lang="en">
|
|
Packit |
0b5880 |
<head>
|
|
Packit |
0b5880 |
<title>
|
|
Packit |
0b5880 |
Autoconf Macro: ax_cflags_warn_all_ansi
|
|
Packit |
0b5880 |
</title>
|
|
Packit |
0b5880 |
<link rel="stylesheet" type="text/css" href="autoconf-archive.css">
|
|
Packit |
0b5880 |
</head>
|
|
Packit |
0b5880 |
<body>
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"http://autoconf-archive.cryp.to/ax_cflags_warn_all_ansi.m4">Download M4
|
|
Packit |
0b5880 |
Source
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"http://git.cryp.to/autoconf-archive?a=history;f=ax_cflags_warn_all_ansi.m4">
|
|
Packit |
0b5880 |
Macro History
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Category Index
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
<form method="get" action="http://www.google.com/search">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"hidden">Search:
|
|
Packit |
0b5880 |
size="10" maxlength="255" type="text">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
</form>
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
ax_cflags_warn_all_ansi
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Synopsis
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
AX_CFLAGS_WARN_ALL_ANSI [(shellvar [,default, [A/NA]])]
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Description
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Try to find a compiler option that enables most reasonable warnings. This
|
|
Packit |
0b5880 |
macro is directly derived from
|
|
Packit |
0b5880 |
"vl_prog_cc_warnings.html">VL_PROG_CC_WARNINGS which is split up into
|
|
Packit |
0b5880 |
two AX_CFLAGS_WARN_ALL and
|
|
Packit |
0b5880 |
AX_CFLAGS_WARN_ALL_ANSI
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The result
|
|
Packit |
0b5880 |
is added to the shellvar being CFLAGS by default.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Currently this macro knows about GCC, Solaris C compiler, Digital Unix C
|
|
Packit |
0b5880 |
compiler, C for AIX Compiler, HP-UX C compiler, IRIX C compiler, NEC SX-5
|
|
Packit |
0b5880 |
(Super-UX 10) C compiler, and Cray J90 (Unicos 10.0.0.8) C compiler.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
- $1 shell-variable-to-add-to : CFLAGS
|
|
Packit |
0b5880 |
- $2 add-value-if-not-found : nothing
|
|
Packit |
0b5880 |
- $3 action-if-found : add value to shellvariable
|
|
Packit |
0b5880 |
- $4 action-if-not-found : nothing
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Author
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Guido U. Draheim <guidod@gmx.de>
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Last Modified
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
2008-04-12
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Cross References
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"group8" name="group8">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
coords=
|
|
Packit |
0b5880 |
"1234,172 1230,165 1219,158 1203,153 1182,149 1159,148 1135,149 1115,153 1098,158 1087,165 1084,172 1087,179 1098,186 1115,191 1135,195 1159,196 1182,195 1203,191 1219,186 1230,179">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_aix_option" alt="" coords=
|
|
Packit |
0b5880 |
"274,275 268,267 249,261 219,255 181,252 140,251 99,252 61,255 31,261 12,267 6,275 12,282 31,289 61,294 99,297 140,299 181,297 219,294 249,289 268,282">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_gcc_option" alt="" coords=
|
|
Packit |
0b5880 |
"602,275 595,267 576,261 545,255 506,252 463,251 420,252 381,255 350,261 330,267 323,275 330,282 350,289 381,294 420,297 463,299 506,297 545,294 576,289 595,282">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_warn_all" alt="" coords=
|
|
Packit |
0b5880 |
"1280,347 1274,339 1257,333 1230,327 1196,324 1159,323 1121,324 1087,327 1060,333 1043,339 1037,347 1043,354 1060,361 1087,366 1121,369 1159,371 1196,369 1230,366 1257,361 1274,354">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_hpux_option" alt="" coords=
|
|
Packit |
0b5880 |
"965,203 958,195 937,189 905,183 865,180 820,179 775,180 735,183 703,189 682,195 675,203 682,210 703,217 735,222 775,225 820,227 865,225 905,222 937,217 958,210">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_irix_option" alt="" coords=
|
|
Packit |
0b5880 |
"954,275 948,267 929,261 899,255 861,252 820,251 779,252 741,255 711,261 692,267 686,275 692,282 711,289 741,294 779,297 820,299 861,297 899,294 929,289 948,282">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_sun_option" alt="" coords=
|
|
Packit |
0b5880 |
"959,347 952,339 932,333 901,327 863,324 820,323 777,324 739,327 708,333 688,339 681,347 688,354 708,361 739,366 777,369 820,371 863,369 901,366 932,361 952,354">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cflags_warn_all_ansi" alt="" coords=
|
|
Packit |
0b5880 |
"1632,347 1625,339 1603,333 1569,327 1527,324 1480,323 1433,324 1391,327 1357,333 1335,339 1328,347 1335,354 1357,361 1391,366 1433,369 1480,371 1527,369 1569,366 1603,361 1625,354">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"vl_prog_cc_warnings" alt="" coords=
|
|
Packit |
0b5880 |
"1949,316 1942,309 1923,302 1894,297 1856,293 1815,292 1773,293 1736,297 1706,302 1687,309 1681,316 1687,323 1706,330 1736,335 1773,339 1815,340 1856,339 1894,335 1923,330 1942,323">
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
"ax_cxx_gcc_abi_demangle" alt="" coords=
|
|
Packit |
0b5880 |
"989,29 981,22 957,15 919,10 872,7 820,5 768,7 721,10 683,15 659,22 651,29 659,37 683,43 721,49 768,52 820,53 872,52 919,49 957,43 981,37">
|
|
Packit |
0b5880 |
</map>
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
M4 Source Code
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
|
|
Packit |
0b5880 |
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
|
Packit |
0b5880 |
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
|
|
Packit |
0b5880 |
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
|
|
Packit |
0b5880 |
VAR,[VAR="no, unknown"
|
|
Packit |
0b5880 |
AC_LANG_SAVE
|
|
Packit |
0b5880 |
AC_LANG_C
|
|
Packit |
0b5880 |
ac_save_[]FLAGS="$[]FLAGS"
|
|
Packit |
0b5880 |
# IRIX C compiler:
|
|
Packit |
0b5880 |
# -use_readonly_const is the default for IRIX C,
|
|
Packit |
0b5880 |
# puts them into .rodata, but they are copied later.
|
|
Packit |
0b5880 |
# need to be "-G0 -rdatashared" for strictmode but
|
|
Packit |
0b5880 |
# I am not sure what effect that has really. - guidod
|
|
Packit |
0b5880 |
for ac_arg dnl
|
|
Packit |
0b5880 |
in "-pedantic % -Wall -ansi -pedantic" dnl GCC
|
|
Packit |
0b5880 |
"-xstrconst % -v -Xc" dnl Solaris C
|
|
Packit |
0b5880 |
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
|
|
Packit |
0b5880 |
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
|
Packit |
0b5880 |
" % -ansi -ansiE -fullwarn" dnl IRIX
|
|
Packit |
0b5880 |
"+ESlit % +w1 -Aa" dnl HP-UX C
|
|
Packit |
0b5880 |
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
|
|
Packit |
0b5880 |
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
|
|
Packit |
0b5880 |
#
|
|
Packit |
0b5880 |
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
|
Packit |
0b5880 |
AC_TRY_COMPILE([],[return 0;],
|
|
Packit |
0b5880 |
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
|
Packit |
0b5880 |
done
|
|
Packit |
0b5880 |
FLAGS="$ac_save_[]FLAGS"
|
|
Packit |
0b5880 |
AC_LANG_RESTORE
|
|
Packit |
0b5880 |
])
|
|
Packit |
0b5880 |
case ".$VAR" in
|
|
Packit |
0b5880 |
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
|
Packit |
0b5880 |
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
|
Packit |
0b5880 |
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
|
Packit |
0b5880 |
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
|
Packit |
0b5880 |
*) m4_ifvaln($3,$3,[
|
|
Packit |
0b5880 |
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
|
Packit |
0b5880 |
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
|
Packit |
0b5880 |
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
|
Packit |
0b5880 |
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
|
Packit |
0b5880 |
fi ]) ;;
|
|
Packit |
0b5880 |
esac
|
|
Packit |
0b5880 |
AS_VAR_POPDEF([VAR])dnl
|
|
Packit |
0b5880 |
AS_VAR_POPDEF([FLAGS])dnl
|
|
Packit |
0b5880 |
])
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
dnl the only difference - the LANG selection... and the default FLAGS
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
|
|
Packit |
0b5880 |
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
|
Packit |
0b5880 |
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
|
|
Packit |
0b5880 |
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
|
|
Packit |
0b5880 |
VAR,[VAR="no, unknown"
|
|
Packit |
0b5880 |
AC_LANG_SAVE
|
|
Packit |
0b5880 |
AC_LANG_CPLUSPLUS
|
|
Packit |
0b5880 |
ac_save_[]FLAGS="$[]FLAGS"
|
|
Packit |
0b5880 |
# IRIX C compiler:
|
|
Packit |
0b5880 |
# -use_readonly_const is the default for IRIX C,
|
|
Packit |
0b5880 |
# puts them into .rodata, but they are copied later.
|
|
Packit |
0b5880 |
# need to be "-G0 -rdatashared" for strictmode but
|
|
Packit |
0b5880 |
# I am not sure what effect that has really. - guidod
|
|
Packit |
0b5880 |
for ac_arg dnl
|
|
Packit |
0b5880 |
in "-pedantic % -Wall -ansi -pedantic" dnl GCC
|
|
Packit |
0b5880 |
"-xstrconst % -v -Xc" dnl Solaris C
|
|
Packit |
0b5880 |
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
|
|
Packit |
0b5880 |
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
|
Packit |
0b5880 |
" % -ansi -ansiE -fullwarn" dnl IRIX
|
|
Packit |
0b5880 |
"+ESlit % +w1 -Aa" dnl HP-UX C
|
|
Packit |
0b5880 |
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
|
|
Packit |
0b5880 |
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
|
|
Packit |
0b5880 |
#
|
|
Packit |
0b5880 |
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
|
Packit |
0b5880 |
AC_TRY_COMPILE([],[return 0;],
|
|
Packit |
0b5880 |
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
|
Packit |
0b5880 |
done
|
|
Packit |
0b5880 |
FLAGS="$ac_save_[]FLAGS"
|
|
Packit |
0b5880 |
AC_LANG_RESTORE
|
|
Packit |
0b5880 |
])
|
|
Packit |
0b5880 |
case ".$VAR" in
|
|
Packit |
0b5880 |
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
|
Packit |
0b5880 |
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
|
Packit |
0b5880 |
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
|
Packit |
0b5880 |
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
|
Packit |
0b5880 |
*) m4_ifvaln($3,$3,[
|
|
Packit |
0b5880 |
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
|
Packit |
0b5880 |
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
|
Packit |
0b5880 |
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
|
Packit |
0b5880 |
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
|
Packit |
0b5880 |
fi ]) ;;
|
|
Packit |
0b5880 |
esac
|
|
Packit |
0b5880 |
AS_VAR_POPDEF([VAR])dnl
|
|
Packit |
0b5880 |
AS_VAR_POPDEF([FLAGS])dnl
|
|
Packit |
0b5880 |
])
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
License
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
Copyright © 2008 Guido U. Draheim
|
|
Packit |
0b5880 |
<guidod@gmx.de>
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
This program is free software; you can redistribute it and/or modify it
|
|
Packit |
0b5880 |
under the terms of the GNU General Public License as published by the Free
|
|
Packit |
0b5880 |
Software Foundation; either version 2 of the License, or (at your option)
|
|
Packit |
0b5880 |
any later version.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit |
0b5880 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
Packit |
0b5880 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
Packit |
0b5880 |
more details.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
You should have received a copy of the GNU General Public License along
|
|
Packit |
0b5880 |
with this program. If not, see <
|
|
Packit |
0b5880 |
"http://www.gnu.org/licenses/">http://www.gnu.org/licenses/>.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
As a special exception, the respective Autoconf Macro's copyright owner
|
|
Packit |
0b5880 |
gives unlimited permission to copy, distribute and modify the configure
|
|
Packit |
0b5880 |
scripts that are the output of Autoconf when processing the Macro. You need
|
|
Packit |
0b5880 |
not follow the terms of the GNU General Public License when using or
|
|
Packit |
0b5880 |
distributing such scripts, even though portions of the text of the Macro
|
|
Packit |
0b5880 |
appear in them. The GNU General Public License (GPL) does govern all other
|
|
Packit |
0b5880 |
use of the material that constitutes the Autoconf Macro.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
This special exception to the GPL applies to versions of the Autoconf Macro
|
|
Packit |
0b5880 |
released by the Autoconf Macro Archive. When you make and distribute a
|
|
Packit |
0b5880 |
modified version of the Autoconf Macro, you may extend this special
|
|
Packit |
0b5880 |
exception to the GPL to apply to your modified version as well.
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
</body>
|
|
Packit |
0b5880 |
</html>
|