Changeset 378ede7
- Timestamp:
- Jun 25, 2011, 5:46:42 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 650fb2c
- Parents:
- f2a96c0
- git-author:
- Anders Kaseorg <andersk@mit.edu> (06/25/11 05:41:16)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (06/25/11 05:46:42)
- Location:
- m4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
m4/ax_cflags_warn_all.m4
r8073852 r378ede7 1 1 # =========================================================================== 2 # http://autoconf-archive.cryp.to/ax_cflags_warn_all.html2 # http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html 3 3 # =========================================================================== 4 4 # 5 5 # SYNOPSIS 6 6 # 7 # AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 7 # AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 8 # AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 9 # AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 8 10 # 9 11 # DESCRIPTION 10 12 # 11 13 # Try to find a compiler option that enables most reasonable warnings. 12 # This macro is directly derived from VL_PROG_CC_WARNINGS which is split13 # up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI14 14 # 15 # For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The16 # result is added to the shellvar beingCFLAGS by default.15 # For the GNU compiler it will be -Wall (and -ansi -pedantic) The result 16 # is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default. 17 17 # 18 # Currently this macro knows about GCC, Solaris C compiler, Digital Unix C19 # compiler, C for AIX Compiler, HP-UX C compiler, IRIX C compiler, NEC20 # SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos 10.0.0.8) C21 # compiler.18 # Currently this macro knows about the GCC, Solaris, Digital Unix, AIX, 19 # HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and 20 # Intel compilers. For a given compiler, the Fortran flags are much more 21 # experimental than their C equivalents. 22 22 # 23 # - $1 shell-variable-to-add-to : CFLAGS 23 # - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS 24 24 # - $2 add-value-if-not-found : nothing 25 25 # - $3 action-if-found : add value to shellvariable … … 29 29 # 30 30 # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 31 # Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com> 31 32 # 32 33 # This program is free software; you can redistribute it and/or modify it 33 34 # under the terms of the GNU General Public License as published by the 34 # Free Software Foundation; either version 2of the License, or (at your35 # Free Software Foundation; either version 3 of the License, or (at your 35 36 # option) any later version. 36 37 # … … 56 57 # exception to the GPL to apply to your modified version as well. 57 58 59 #serial 10 60 58 61 AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl 59 62 AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl … … 61 64 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], 62 65 VAR,[VAR="no, unknown" 63 AC_LANG_SAVE 64 AC_LANG_C 66 AC_LANG_PUSH([C]) 65 67 ac_save_[]FLAGS="$[]FLAGS" 66 68 for ac_arg dnl … … 75 77 # 76 78 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` 77 AC_ TRY_COMPILE([],[return 0;],78 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])79 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 80 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) 79 81 done 80 82 FLAGS="$ac_save_[]FLAGS" 81 AC_LANG_ RESTORE83 AC_LANG_POP([C]) 82 84 ]) 83 85 case ".$VAR" in … … 101 103 AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl 102 104 AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl 103 AS_VAR_PUSHDEF([VAR],[a c_cv_cxxflags_warn_all])dnl105 AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_warn_all])dnl 104 106 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], 105 107 VAR,[VAR="no, unknown" 106 AC_LANG_SAVE 107 AC_LANG_CPLUSPLUS 108 AC_LANG_PUSH([C++]) 108 109 ac_save_[]FLAGS="$[]FLAGS" 109 110 for ac_arg dnl … … 118 119 # 119 120 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` 120 AC_ TRY_COMPILE([],[return 0;],121 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])121 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 122 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) 122 123 done 123 124 FLAGS="$ac_save_[]FLAGS" 124 AC_LANG_RESTORE 125 AC_LANG_POP([C++]) 126 ]) 127 case ".$VAR" in 128 .ok|.ok,*) m4_ifvaln($3,$3) ;; 129 .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ 130 AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) 131 m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; 132 *) m4_ifvaln($3,$3,[ 133 if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null 134 then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) 135 else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) 136 m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" 137 fi ]) ;; 138 esac 139 AS_VAR_POPDEF([VAR])dnl 140 AS_VAR_POPDEF([FLAGS])dnl 141 ]) 142 143 dnl the only difference - the LANG selection... and the default FLAGS 144 145 AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl 146 AS_VAR_PUSHDEF([FLAGS],[FCFLAGS])dnl 147 AS_VAR_PUSHDEF([VAR],[ax_cv_fcflags_warn_all])dnl 148 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], 149 VAR,[VAR="no, unknown" 150 AC_LANG_PUSH([Fortran]) 151 ac_save_[]FLAGS="$[]FLAGS" 152 for ac_arg dnl 153 in "-warn all % -warn all" dnl Intel 154 "-pedantic % -Wall" dnl GCC 155 "-xstrconst % -v" dnl Solaris C 156 "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix 157 "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX 158 "-ansi -ansiE % -fullwarn" dnl IRIX 159 "+ESlit % +w1" dnl HP-UX C 160 "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) 161 "-h conform % -h msglevel 2" dnl Cray C (Unicos) 162 # 163 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` 164 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 165 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) 166 done 167 FLAGS="$ac_save_[]FLAGS" 168 AC_LANG_POP([Fortran]) 125 169 ]) 126 170 case ".$VAR" in … … 148 192 dnl like -Woption or -Xoption as they think of it is a pass-through 149 193 dnl to later compile stages or something. The "%" is used as a 150 dnl delimi miter. A non-option comment can be given after "%%" marks194 dnl delimiter. A non-option comment can be given after "%%" marks 151 195 dnl which will be shown but not added to the respective C/CXXFLAGS. -
m4/ax_prog_perl_modules.m4
r2d3ed95 r378ede7 1 1 # =========================================================================== 2 # http://www.nongnu.org/autoconf-archive/ax_prog_perl_modules.html2 # http://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html 3 3 # =========================================================================== 4 4 # … … 33 33 # warranty. 34 34 35 #serial 635 #serial 7 36 36 37 37 AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES])
Note: See TracChangeset
for help on using the changeset viewer.