1# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5# Inc. 6# This file is free software; the Free Software Foundation 7# gives unlimited permission to copy and/or distribute it, 8# with or without modifications, as long as this notice is preserved. 9 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13# PARTICULAR PURPOSE. 14 15# =========================================================================== 16# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html 17# =========================================================================== 18# 19# SYNOPSIS 20# 21# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) 22# 23# DESCRIPTION 24# 25# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space 26# added in between. 27# 28# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. 29# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains 30# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly 31# FLAG. 32# 33# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. 34# 35# LICENSE 36# 37# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 38# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> 39# 40# This program is free software: you can redistribute it and/or modify it 41# under the terms of the GNU General Public License as published by the 42# Free Software Foundation, either version 3 of the License, or (at your 43# option) any later version. 44# 45# This program is distributed in the hope that it will be useful, but 46# WITHOUT ANY WARRANTY; without even the implied warranty of 47# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 48# Public License for more details. 49# 50# You should have received a copy of the GNU General Public License along 51# with this program. If not, see <http://www.gnu.org/licenses/>. 52# 53# As a special exception, the respective Autoconf Macro's copyright owner 54# gives unlimited permission to copy, distribute and modify the configure 55# scripts that are the output of Autoconf when processing the Macro. You 56# need not follow the terms of the GNU General Public License when using 57# or distributing such scripts, even though portions of the text of the 58# Macro appear in them. The GNU General Public License (GPL) does govern 59# all other use of the material that constitutes the Autoconf Macro. 60# 61# This special exception to the GPL applies to versions of the Autoconf 62# Macro released by the Autoconf Archive. When you make and distribute a 63# modified version of the Autoconf Macro, you may extend this special 64# exception to the GPL to apply to your modified version as well. 65 66#serial 2 67 68AC_DEFUN([AX_APPEND_FLAG], 69[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX 70AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl 71AS_VAR_SET_IF(FLAGS, 72 [case " AS_VAR_GET(FLAGS) " in 73 *" $1 "*) 74 AC_RUN_LOG([: FLAGS already contains $1]) 75 ;; 76 *) 77 AC_RUN_LOG([: FLAGS="$FLAGS $1"]) 78 AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) 79 ;; 80 esac], 81 [AS_VAR_SET(FLAGS,["$1"])]) 82AS_VAR_POPDEF([FLAGS])dnl 83])dnl AX_APPEND_FLAG 84 85# =========================================================================== 86# http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html 87# =========================================================================== 88# 89# SYNOPSIS 90# 91# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 92# AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 93# AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] 94# 95# DESCRIPTION 96# 97# Try to find a compiler option that enables most reasonable warnings. 98# 99# For the GNU compiler it will be -Wall (and -ansi -pedantic) The result 100# is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default. 101# 102# Currently this macro knows about the GCC, Solaris, Digital Unix, AIX, 103# HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and 104# Intel compilers. For a given compiler, the Fortran flags are much more 105# experimental than their C equivalents. 106# 107# - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS 108# - $2 add-value-if-not-found : nothing 109# - $3 action-if-found : add value to shellvariable 110# - $4 action-if-not-found : nothing 111# 112# NOTE: These macros depend on AX_APPEND_FLAG. 113# 114# LICENSE 115# 116# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 117# Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com> 118# 119# This program is free software; you can redistribute it and/or modify it 120# under the terms of the GNU General Public License as published by the 121# Free Software Foundation; either version 3 of the License, or (at your 122# option) any later version. 123# 124# This program is distributed in the hope that it will be useful, but 125# WITHOUT ANY WARRANTY; without even the implied warranty of 126# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 127# Public License for more details. 128# 129# You should have received a copy of the GNU General Public License along 130# with this program. If not, see <http://www.gnu.org/licenses/>. 131# 132# As a special exception, the respective Autoconf Macro's copyright owner 133# gives unlimited permission to copy, distribute and modify the configure 134# scripts that are the output of Autoconf when processing the Macro. You 135# need not follow the terms of the GNU General Public License when using 136# or distributing such scripts, even though portions of the text of the 137# Macro appear in them. The GNU General Public License (GPL) does govern 138# all other use of the material that constitutes the Autoconf Macro. 139# 140# This special exception to the GPL applies to versions of the Autoconf 141# Macro released by the Autoconf Archive. When you make and distribute a 142# modified version of the Autoconf Macro, you may extend this special 143# exception to the GPL to apply to your modified version as well. 144 145#serial 13 146 147AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl 148AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl 149AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl 150AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], 151VAR,[VAR="no, unknown" 152ac_save_[]FLAGS="$[]FLAGS" 153for ac_arg dnl 154in "-warn all % -warn all" dnl Intel 155 "-pedantic % -Wall" dnl GCC 156 "-xstrconst % -v" dnl Solaris C 157 "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix 158 "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX 159 "-ansi -ansiE % -fullwarn" dnl IRIX 160 "+ESlit % +w1" dnl HP-UX C 161 "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) 162 "-h conform % -h msglevel 2" dnl Cray C (Unicos) 163 # 164do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` 165 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 166 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) 167done 168FLAGS="$ac_save_[]FLAGS" 169]) 170AS_VAR_POPDEF([FLAGS])dnl 171case ".$VAR" in 172 .ok|.ok,*) m4_ifvaln($3,$3) ;; 173 .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;; 174 *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;; 175esac 176AS_VAR_POPDEF([VAR])dnl 177])dnl AX_FLAGS_WARN_ALL 178dnl implementation tactics: 179dnl the for-argument contains a list of options. The first part of 180dnl these does only exist to detect the compiler - usually it is 181dnl a global option to enable -ansi or -extrawarnings. All other 182dnl compilers will fail about it. That was needed since a lot of 183dnl compilers will give false positives for some option-syntax 184dnl like -Woption or -Xoption as they think of it is a pass-through 185dnl to later compile stages or something. The "%" is used as a 186dnl delimiter. A non-option comment can be given after "%%" marks 187dnl which will be shown but not added to the respective C/CXXFLAGS. 188 189AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl 190AC_LANG_PUSH([C]) 191AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 192AC_LANG_POP([C]) 193]) 194 195AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl 196AC_LANG_PUSH([C++]) 197AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 198AC_LANG_POP([C++]) 199]) 200 201AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl 202AC_LANG_PUSH([Fortran]) 203AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 204AC_LANG_POP([Fortran]) 205]) 206 207