| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1 | # generated automatically by aclocal 1.15 -*- Autoconf -*- | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 3 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 4 |  | 
|  | 5 | # This file is free software; the Free Software Foundation | 
|  | 6 | # gives unlimited permission to copy and/or distribute it, | 
|  | 7 | # with or without modifications, as long as this notice is preserved. | 
|  | 8 |  | 
|  | 9 | # This program is distributed in the hope that it will be useful, | 
|  | 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | 
|  | 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | 
|  | 12 | # PARTICULAR PURPOSE. | 
|  | 13 |  | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 15 | m4_ifndef([AC_AUTOCONF_VERSION], | 
|  | 16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 
|  | 17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | 
|  | 18 | [m4_warning([this file was generated for autoconf 2.69. | 
|  | 19 | You have another version of autoconf.  It may work, but is not guaranteed to. | 
|  | 20 | If you have problems, you may need to regenerate the build system entirely. | 
|  | 21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | 
|  | 22 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 23 | # ============================================================================ | 
|  | 24 | #  https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html | 
|  | 25 | # ============================================================================ | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 26 | # | 
|  | 27 | # SYNOPSIS | 
|  | 28 | # | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 29 | #   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 30 | # | 
|  | 31 | # DESCRIPTION | 
|  | 32 | # | 
|  | 33 | #   For every FLAG1, FLAG2 it is checked whether the compiler works with the | 
|  | 34 | #   flag.  If it does, the flag is added FLAGS-VARIABLE | 
|  | 35 | # | 
|  | 36 | #   If FLAGS-VARIABLE is not specified, the current language's flags (e.g. | 
|  | 37 | #   CFLAGS) is used.  During the check the flag is always added to the | 
|  | 38 | #   current language's flags. | 
|  | 39 | # | 
|  | 40 | #   If EXTRA-FLAGS is defined, it is added to the current language's default | 
|  | 41 | #   flags (e.g. CFLAGS) when the check is done.  The check is thus made with | 
|  | 42 | #   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to | 
|  | 43 | #   force the compiler to issue an error when a bad flag is given. | 
|  | 44 | # | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 45 | #   INPUT gives an alternative input source to AC_COMPILE_IFELSE. | 
|  | 46 | # | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 47 | #   NOTE: This macro depends on the AX_APPEND_FLAG and | 
|  | 48 | #   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with | 
|  | 49 | #   AX_APPEND_LINK_FLAGS. | 
|  | 50 | # | 
|  | 51 | # LICENSE | 
|  | 52 | # | 
|  | 53 | #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | 
|  | 54 | # | 
|  | 55 | #   This program is free software: you can redistribute it and/or modify it | 
|  | 56 | #   under the terms of the GNU General Public License as published by the | 
|  | 57 | #   Free Software Foundation, either version 3 of the License, or (at your | 
|  | 58 | #   option) any later version. | 
|  | 59 | # | 
|  | 60 | #   This program is distributed in the hope that it will be useful, but | 
|  | 61 | #   WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 62 | #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 
|  | 63 | #   Public License for more details. | 
|  | 64 | # | 
|  | 65 | #   You should have received a copy of the GNU General Public License along | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 66 | #   with this program. If not, see <https://www.gnu.org/licenses/>. | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 67 | # | 
|  | 68 | #   As a special exception, the respective Autoconf Macro's copyright owner | 
|  | 69 | #   gives unlimited permission to copy, distribute and modify the configure | 
|  | 70 | #   scripts that are the output of Autoconf when processing the Macro. You | 
|  | 71 | #   need not follow the terms of the GNU General Public License when using | 
|  | 72 | #   or distributing such scripts, even though portions of the text of the | 
|  | 73 | #   Macro appear in them. The GNU General Public License (GPL) does govern | 
|  | 74 | #   all other use of the material that constitutes the Autoconf Macro. | 
|  | 75 | # | 
|  | 76 | #   This special exception to the GPL applies to versions of the Autoconf | 
|  | 77 | #   Macro released by the Autoconf Archive. When you make and distribute a | 
|  | 78 | #   modified version of the Autoconf Macro, you may extend this special | 
|  | 79 | #   exception to the GPL to apply to your modified version as well. | 
|  | 80 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 81 | #serial 6 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 82 |  | 
|  | 83 | AC_DEFUN([AX_APPEND_COMPILE_FLAGS], | 
|  | 84 | [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) | 
|  | 85 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 86 | for flag in $1; do | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 87 | AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4]) | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 88 | done | 
|  | 89 | ])dnl AX_APPEND_COMPILE_FLAGS | 
|  | 90 |  | 
|  | 91 | # =========================================================================== | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 92 | #   https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 93 | # =========================================================================== | 
|  | 94 | # | 
|  | 95 | # SYNOPSIS | 
|  | 96 | # | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 97 | #   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 98 | # | 
|  | 99 | # DESCRIPTION | 
|  | 100 | # | 
|  | 101 | #   For every FLAG1, FLAG2 it is checked whether the linker works with the | 
|  | 102 | #   flag.  If it does, the flag is added FLAGS-VARIABLE | 
|  | 103 | # | 
|  | 104 | #   If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is | 
|  | 105 | #   used. During the check the flag is always added to the linker's flags. | 
|  | 106 | # | 
|  | 107 | #   If EXTRA-FLAGS is defined, it is added to the linker's default flags | 
|  | 108 | #   when the check is done.  The check is thus made with the flags: "LDFLAGS | 
|  | 109 | #   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to | 
|  | 110 | #   issue an error when a bad flag is given. | 
|  | 111 | # | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 112 | #   INPUT gives an alternative input source to AC_COMPILE_IFELSE. | 
|  | 113 | # | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 114 | #   NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. | 
|  | 115 | #   Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. | 
|  | 116 | # | 
|  | 117 | # LICENSE | 
|  | 118 | # | 
|  | 119 | #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | 
|  | 120 | # | 
|  | 121 | #   This program is free software: you can redistribute it and/or modify it | 
|  | 122 | #   under the terms of the GNU General Public License as published by the | 
|  | 123 | #   Free Software Foundation, either version 3 of the License, or (at your | 
|  | 124 | #   option) any later version. | 
|  | 125 | # | 
|  | 126 | #   This program is distributed in the hope that it will be useful, but | 
|  | 127 | #   WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 128 | #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 
|  | 129 | #   Public License for more details. | 
|  | 130 | # | 
|  | 131 | #   You should have received a copy of the GNU General Public License along | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 132 | #   with this program. If not, see <https://www.gnu.org/licenses/>. | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 133 | # | 
|  | 134 | #   As a special exception, the respective Autoconf Macro's copyright owner | 
|  | 135 | #   gives unlimited permission to copy, distribute and modify the configure | 
|  | 136 | #   scripts that are the output of Autoconf when processing the Macro. You | 
|  | 137 | #   need not follow the terms of the GNU General Public License when using | 
|  | 138 | #   or distributing such scripts, even though portions of the text of the | 
|  | 139 | #   Macro appear in them. The GNU General Public License (GPL) does govern | 
|  | 140 | #   all other use of the material that constitutes the Autoconf Macro. | 
|  | 141 | # | 
|  | 142 | #   This special exception to the GPL applies to versions of the Autoconf | 
|  | 143 | #   Macro released by the Autoconf Archive. When you make and distribute a | 
|  | 144 | #   modified version of the Autoconf Macro, you may extend this special | 
|  | 145 | #   exception to the GPL to apply to your modified version as well. | 
|  | 146 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 147 | #serial 6 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 148 |  | 
|  | 149 | AC_DEFUN([AX_APPEND_LINK_FLAGS], | 
|  | 150 | [AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) | 
|  | 151 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 152 | for flag in $1; do | 
| Cristy | 1971efd | 2016-03-31 07:25:49 -0400 | [diff] [blame] | 153 | AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 154 | done | 
|  | 155 | ])dnl AX_APPEND_LINK_FLAGS | 
|  | 156 |  | 
|  | 157 | # =========================================================================== | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 158 | #    https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 159 | # =========================================================================== | 
|  | 160 | # | 
|  | 161 | # SYNOPSIS | 
|  | 162 | # | 
|  | 163 | #   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | 
|  | 164 | # | 
|  | 165 | # DESCRIPTION | 
|  | 166 | # | 
|  | 167 | #   Check whether the given FLAG works with the linker or gives an error. | 
|  | 168 | #   (Warnings, however, are ignored) | 
|  | 169 | # | 
|  | 170 | #   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | 
|  | 171 | #   success/failure. | 
|  | 172 | # | 
|  | 173 | #   If EXTRA-FLAGS is defined, it is added to the linker's default flags | 
|  | 174 | #   when the check is done.  The check is thus made with the flags: "LDFLAGS | 
|  | 175 | #   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to | 
|  | 176 | #   issue an error when a bad flag is given. | 
|  | 177 | # | 
|  | 178 | #   INPUT gives an alternative input source to AC_LINK_IFELSE. | 
|  | 179 | # | 
|  | 180 | #   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | 
|  | 181 | #   macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. | 
|  | 182 | # | 
|  | 183 | # LICENSE | 
|  | 184 | # | 
|  | 185 | #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | 
|  | 186 | #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | 
|  | 187 | # | 
|  | 188 | #   This program is free software: you can redistribute it and/or modify it | 
|  | 189 | #   under the terms of the GNU General Public License as published by the | 
|  | 190 | #   Free Software Foundation, either version 3 of the License, or (at your | 
|  | 191 | #   option) any later version. | 
|  | 192 | # | 
|  | 193 | #   This program is distributed in the hope that it will be useful, but | 
|  | 194 | #   WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 195 | #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 
|  | 196 | #   Public License for more details. | 
|  | 197 | # | 
|  | 198 | #   You should have received a copy of the GNU General Public License along | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 199 | #   with this program. If not, see <https://www.gnu.org/licenses/>. | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 200 | # | 
|  | 201 | #   As a special exception, the respective Autoconf Macro's copyright owner | 
|  | 202 | #   gives unlimited permission to copy, distribute and modify the configure | 
|  | 203 | #   scripts that are the output of Autoconf when processing the Macro. You | 
|  | 204 | #   need not follow the terms of the GNU General Public License when using | 
|  | 205 | #   or distributing such scripts, even though portions of the text of the | 
|  | 206 | #   Macro appear in them. The GNU General Public License (GPL) does govern | 
|  | 207 | #   all other use of the material that constitutes the Autoconf Macro. | 
|  | 208 | # | 
|  | 209 | #   This special exception to the GPL applies to versions of the Autoconf | 
|  | 210 | #   Macro released by the Autoconf Archive. When you make and distribute a | 
|  | 211 | #   modified version of the Autoconf Macro, you may extend this special | 
|  | 212 | #   exception to the GPL to apply to your modified version as well. | 
|  | 213 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 214 | #serial 5 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 215 |  | 
|  | 216 | AC_DEFUN([AX_CHECK_LINK_FLAG], | 
|  | 217 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | 
|  | 218 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl | 
|  | 219 | AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ | 
|  | 220 | ax_check_save_flags=$LDFLAGS | 
|  | 221 | LDFLAGS="$LDFLAGS $4 $1" | 
|  | 222 | AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | 
|  | 223 | [AS_VAR_SET(CACHEVAR,[yes])], | 
|  | 224 | [AS_VAR_SET(CACHEVAR,[no])]) | 
|  | 225 | LDFLAGS=$ax_check_save_flags]) | 
|  | 226 | AS_VAR_IF(CACHEVAR,yes, | 
|  | 227 | [m4_default([$2], :)], | 
|  | 228 | [m4_default([$3], :)]) | 
|  | 229 | AS_VAR_POPDEF([CACHEVAR])dnl | 
|  | 230 | ])dnl AX_CHECK_LINK_FLAGS | 
|  | 231 |  | 
|  | 232 | # =========================================================================== | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 233 | #    https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 234 | # =========================================================================== | 
|  | 235 | # | 
|  | 236 | # SYNOPSIS | 
|  | 237 | # | 
|  | 238 | #   AX_COMPILER_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [IS-RELEASE], [EXTRA-BASE-CFLAGS], [EXTRA-YES-CFLAGS], [UNUSED], [UNUSED], [UNUSED], [EXTRA-BASE-LDFLAGS], [EXTRA-YES-LDFLAGS], [UNUSED], [UNUSED], [UNUSED]) | 
|  | 239 | # | 
|  | 240 | # DESCRIPTION | 
|  | 241 | # | 
|  | 242 | #   Check for the presence of an --enable-compile-warnings option to | 
|  | 243 | #   configure, defaulting to "error" in normal operation, or "yes" if | 
|  | 244 | #   IS-RELEASE is equal to "yes".  Return the value in the variable | 
|  | 245 | #   $ax_enable_compile_warnings. | 
|  | 246 | # | 
|  | 247 | #   Depending on the value of --enable-compile-warnings, different compiler | 
|  | 248 | #   warnings are checked to see if they work with the current compiler and, | 
|  | 249 | #   if so, are appended to CFLAGS-VARIABLE and LDFLAGS-VARIABLE.  This | 
|  | 250 | #   allows a consistent set of baseline compiler warnings to be used across | 
|  | 251 | #   a code base, irrespective of any warnings enabled locally by individual | 
|  | 252 | #   developers.  By standardising the warnings used by all developers of a | 
|  | 253 | #   project, the project can commit to a zero-warnings policy, using -Werror | 
|  | 254 | #   to prevent compilation if new warnings are introduced.  This makes | 
|  | 255 | #   catching bugs which are flagged by warnings a lot easier. | 
|  | 256 | # | 
|  | 257 | #   By providing a consistent --enable-compile-warnings argument across all | 
|  | 258 | #   projects using this macro, continuous integration systems can easily be | 
|  | 259 | #   configured the same for all projects.  Automated systems or build | 
|  | 260 | #   systems aimed at beginners may want to pass the --disable-Werror | 
|  | 261 | #   argument to unconditionally prevent warnings being fatal. | 
|  | 262 | # | 
|  | 263 | #   --enable-compile-warnings can take the values: | 
|  | 264 | # | 
|  | 265 | #    * no:      Base compiler warnings only; not even -Wall. | 
|  | 266 | #    * yes:     The above, plus a broad range of useful warnings. | 
|  | 267 | #    * error:   The above, plus -Werror so that all warnings are fatal. | 
|  | 268 | #               Use --disable-Werror to override this and disable fatal | 
|  | 269 | #               warnings. | 
|  | 270 | # | 
|  | 271 | #   The set of base and enabled flags can be augmented using the | 
|  | 272 | #   EXTRA-*-CFLAGS and EXTRA-*-LDFLAGS variables, which are tested and | 
|  | 273 | #   appended to the output variable if --enable-compile-warnings is not | 
|  | 274 | #   "no". Flags should not be disabled using these arguments, as the entire | 
|  | 275 | #   point of AX_COMPILER_FLAGS is to enforce a consistent set of useful | 
|  | 276 | #   compiler warnings on code, using warnings which have been chosen for low | 
|  | 277 | #   false positive rates.  If a compiler emits false positives for a | 
|  | 278 | #   warning, a #pragma should be used in the code to disable the warning | 
|  | 279 | #   locally. See: | 
|  | 280 | # | 
|  | 281 | #     https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas | 
|  | 282 | # | 
|  | 283 | #   The EXTRA-* variables should only be used to supply extra warning flags, | 
|  | 284 | #   and not general purpose compiler flags, as they are controlled by | 
|  | 285 | #   configure options such as --disable-Werror. | 
|  | 286 | # | 
|  | 287 | #   IS-RELEASE can be used to disable -Werror when making a release, which | 
|  | 288 | #   is useful for those hairy moments when you just want to get the release | 
|  | 289 | #   done as quickly as possible.  Set it to "yes" to disable -Werror. By | 
|  | 290 | #   default, it uses the value of $ax_is_release, so if you are using the | 
|  | 291 | #   AX_IS_RELEASE macro, there is no need to pass this parameter. For | 
|  | 292 | #   example: | 
|  | 293 | # | 
|  | 294 | #     AX_IS_RELEASE([git-directory]) | 
|  | 295 | #     AX_COMPILER_FLAGS() | 
|  | 296 | # | 
|  | 297 | #   CFLAGS-VARIABLE defaults to WARN_CFLAGS, and LDFLAGS-VARIABLE defaults | 
|  | 298 | #   to WARN_LDFLAGS.  Both variables are AC_SUBST-ed by this macro, but must | 
|  | 299 | #   be manually added to the CFLAGS and LDFLAGS variables for each target in | 
|  | 300 | #   the code base. | 
|  | 301 | # | 
|  | 302 | #   If C++ language support is enabled with AC_PROG_CXX, which must occur | 
|  | 303 | #   before this macro in configure.ac, warning flags for the C++ compiler | 
|  | 304 | #   are AC_SUBST-ed as WARN_CXXFLAGS, and must be manually added to the | 
|  | 305 | #   CXXFLAGS variables for each target in the code base.  EXTRA-*-CFLAGS can | 
|  | 306 | #   be used to augment the base and enabled flags. | 
|  | 307 | # | 
|  | 308 | #   Warning flags for g-ir-scanner (from GObject Introspection) are | 
|  | 309 | #   AC_SUBST-ed as WARN_SCANNERFLAGS.  This variable must be manually added | 
|  | 310 | #   to the SCANNERFLAGS variable for each GIR target in the code base.  If | 
|  | 311 | #   extra g-ir-scanner flags need to be enabled, the AX_COMPILER_FLAGS_GIR | 
|  | 312 | #   macro must be invoked manually. | 
|  | 313 | # | 
|  | 314 | #   AX_COMPILER_FLAGS may add support for other tools in future, in addition | 
|  | 315 | #   to the compiler and linker.  No extra EXTRA-* variables will be added | 
|  | 316 | #   for those tools, and all extra support will still use the single | 
|  | 317 | #   --enable-compile-warnings configure option.  For finer grained control | 
|  | 318 | #   over the flags for individual tools, use AX_COMPILER_FLAGS_CFLAGS, | 
|  | 319 | #   AX_COMPILER_FLAGS_LDFLAGS and AX_COMPILER_FLAGS_* for new tools. | 
|  | 320 | # | 
|  | 321 | #   The UNUSED variables date from a previous version of this macro, and are | 
|  | 322 | #   automatically appended to the preceding non-UNUSED variable. They should | 
|  | 323 | #   be left empty in new uses of the macro. | 
|  | 324 | # | 
|  | 325 | # LICENSE | 
|  | 326 | # | 
|  | 327 | #   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk> | 
|  | 328 | #   Copyright (c) 2015 David King <amigadave@amigadave.com> | 
|  | 329 | # | 
|  | 330 | #   Copying and distribution of this file, with or without modification, are | 
|  | 331 | #   permitted in any medium without royalty provided the copyright notice | 
|  | 332 | #   and this notice are preserved.  This file is offered as-is, without any | 
|  | 333 | #   warranty. | 
|  | 334 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 335 | #serial 14 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 336 |  | 
|  | 337 | # _AX_COMPILER_FLAGS_LANG([LANGNAME]) | 
|  | 338 | m4_defun([_AX_COMPILER_FLAGS_LANG], | 
|  | 339 | [m4_ifdef([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [], | 
|  | 340 | [m4_define([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [])dnl | 
|  | 341 | AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_]$1[FLAGS])])dnl | 
|  | 342 | ]) | 
|  | 343 |  | 
|  | 344 | AC_DEFUN([AX_COMPILER_FLAGS],[ | 
|  | 345 | # C support is enabled by default. | 
|  | 346 | _AX_COMPILER_FLAGS_LANG([C]) | 
|  | 347 | # Only enable C++ support if AC_PROG_CXX is called. The redefinition of | 
|  | 348 | # AC_PROG_CXX is so that a fatal error is emitted if this macro is called | 
|  | 349 | # before AC_PROG_CXX, which would otherwise cause no C++ warnings to be | 
|  | 350 | # checked. | 
|  | 351 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | 
|  | 352 | [_AX_COMPILER_FLAGS_LANG([CXX])], | 
|  | 353 | [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AX_COMPILER_FLAGS_LANG([CXX])])]) | 
|  | 354 | AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_LDFLAGS]) | 
|  | 355 |  | 
|  | 356 | # Default value for IS-RELEASE is $ax_is_release | 
|  | 357 | ax_compiler_flags_is_release=m4_tolower(m4_normalize(ifelse([$3],, | 
|  | 358 | [$ax_is_release], | 
|  | 359 | [$3]))) | 
|  | 360 |  | 
|  | 361 | AC_ARG_ENABLE([compile-warnings], | 
|  | 362 | AS_HELP_STRING([--enable-compile-warnings=@<:@no/yes/error@:>@], | 
|  | 363 | [Enable compiler warnings and errors]),, | 
|  | 364 | [AS_IF([test "$ax_compiler_flags_is_release" = "yes"], | 
|  | 365 | [enable_compile_warnings="yes"], | 
|  | 366 | [enable_compile_warnings="error"])]) | 
|  | 367 | AC_ARG_ENABLE([Werror], | 
|  | 368 | AS_HELP_STRING([--disable-Werror], | 
|  | 369 | [Unconditionally make all compiler warnings non-fatal]),, | 
|  | 370 | [enable_Werror=maybe]) | 
|  | 371 |  | 
|  | 372 | # Return the user's chosen warning level | 
|  | 373 | AS_IF([test "$enable_Werror" = "no" -a \ | 
|  | 374 | "$enable_compile_warnings" = "error"],[ | 
|  | 375 | enable_compile_warnings="yes" | 
|  | 376 | ]) | 
|  | 377 |  | 
|  | 378 | ax_enable_compile_warnings=$enable_compile_warnings | 
|  | 379 |  | 
|  | 380 | AX_COMPILER_FLAGS_CFLAGS([$1],[$ax_compiler_flags_is_release], | 
|  | 381 | [$4],[$5 $6 $7 $8]) | 
|  | 382 | m4_ifdef([_AX_COMPILER_FLAGS_LANG_CXX_enabled], | 
|  | 383 | [AX_COMPILER_FLAGS_CXXFLAGS([WARN_CXXFLAGS], | 
|  | 384 | [$ax_compiler_flags_is_release], | 
|  | 385 | [$4],[$5 $6 $7 $8])]) | 
|  | 386 | AX_COMPILER_FLAGS_LDFLAGS([$2],[$ax_compiler_flags_is_release], | 
|  | 387 | [$9],[$10 $11 $12 $13]) | 
|  | 388 | AX_COMPILER_FLAGS_GIR([WARN_SCANNERFLAGS],[$ax_compiler_flags_is_release]) | 
|  | 389 | ])dnl AX_COMPILER_FLAGS | 
|  | 390 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 391 | # ============================================================================= | 
|  | 392 | #  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html | 
|  | 393 | # ============================================================================= | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 394 | # | 
|  | 395 | # SYNOPSIS | 
|  | 396 | # | 
|  | 397 | #   AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) | 
|  | 398 | # | 
|  | 399 | # DESCRIPTION | 
|  | 400 | # | 
|  | 401 | #   Add warning flags for the C compiler to VARIABLE, which defaults to | 
|  | 402 | #   WARN_CFLAGS.  VARIABLE is AC_SUBST-ed by this macro, but must be | 
|  | 403 | #   manually added to the CFLAGS variable for each target in the code base. | 
|  | 404 | # | 
|  | 405 | #   This macro depends on the environment set up by AX_COMPILER_FLAGS. | 
|  | 406 | #   Specifically, it uses the value of $ax_enable_compile_warnings to decide | 
|  | 407 | #   which flags to enable. | 
|  | 408 | # | 
|  | 409 | # LICENSE | 
|  | 410 | # | 
|  | 411 | #   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk> | 
|  | 412 | # | 
|  | 413 | #   Copying and distribution of this file, with or without modification, are | 
|  | 414 | #   permitted in any medium without royalty provided the copyright notice | 
|  | 415 | #   and this notice are preserved.  This file is offered as-is, without any | 
|  | 416 | #   warranty. | 
|  | 417 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 418 | #serial 14 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 419 |  | 
|  | 420 | AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ | 
|  | 421 | AC_REQUIRE([AC_PROG_SED]) | 
|  | 422 | AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) | 
|  | 423 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 424 | AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) | 
|  | 425 |  | 
|  | 426 | # Variable names | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 427 | m4_define([ax_warn_cflags_variable], | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 428 | [m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))]) | 
|  | 429 |  | 
|  | 430 | AC_LANG_PUSH([C]) | 
|  | 431 |  | 
|  | 432 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad | 
|  | 433 | # flags, otherwise they are always appended to the warn_cflags variable, and | 
|  | 434 | # Clang warns on them for every compilation unit. | 
|  | 435 | # If this is passed to GCC, it will explode, so the flag must be enabled | 
|  | 436 | # conditionally. | 
|  | 437 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ | 
|  | 438 | ax_compiler_flags_test="-Werror=unknown-warning-option" | 
|  | 439 | ],[ | 
|  | 440 | ax_compiler_flags_test="" | 
|  | 441 | ]) | 
|  | 442 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 443 | # Check that -Wno-suggest-attribute=format is supported | 
|  | 444 | AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[ | 
|  | 445 | ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" | 
|  | 446 | ],[ | 
|  | 447 | ax_compiler_no_suggest_attribute_flags="" | 
|  | 448 | ]) | 
|  | 449 |  | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 450 | # Base flags | 
|  | 451 | AX_APPEND_COMPILE_FLAGS([ dnl | 
|  | 452 | -fno-strict-aliasing dnl | 
|  | 453 | $3 dnl | 
|  | 454 | ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) | 
|  | 455 |  | 
|  | 456 | AS_IF([test "$ax_enable_compile_warnings" != "no"],[ | 
|  | 457 | # "yes" flags | 
|  | 458 | AX_APPEND_COMPILE_FLAGS([ dnl | 
|  | 459 | -Wall dnl | 
|  | 460 | -Wextra dnl | 
|  | 461 | -Wundef dnl | 
|  | 462 | -Wnested-externs dnl | 
|  | 463 | -Wwrite-strings dnl | 
|  | 464 | -Wpointer-arith dnl | 
|  | 465 | -Wmissing-declarations dnl | 
|  | 466 | -Wmissing-prototypes dnl | 
|  | 467 | -Wstrict-prototypes dnl | 
|  | 468 | -Wredundant-decls dnl | 
|  | 469 | -Wno-unused-parameter dnl | 
|  | 470 | -Wno-missing-field-initializers dnl | 
|  | 471 | -Wdeclaration-after-statement dnl | 
|  | 472 | -Wformat=2 dnl | 
|  | 473 | -Wold-style-definition dnl | 
|  | 474 | -Wcast-align dnl | 
|  | 475 | -Wformat-nonliteral dnl | 
|  | 476 | -Wformat-security dnl | 
|  | 477 | -Wsign-compare dnl | 
|  | 478 | -Wstrict-aliasing dnl | 
|  | 479 | -Wshadow dnl | 
|  | 480 | -Winline dnl | 
|  | 481 | -Wpacked dnl | 
|  | 482 | -Wmissing-format-attribute dnl | 
|  | 483 | -Wmissing-noreturn dnl | 
|  | 484 | -Winit-self dnl | 
|  | 485 | -Wredundant-decls dnl | 
|  | 486 | -Wmissing-include-dirs dnl | 
|  | 487 | -Wunused-but-set-variable dnl | 
|  | 488 | -Warray-bounds dnl | 
|  | 489 | -Wimplicit-function-declaration dnl | 
|  | 490 | -Wreturn-type dnl | 
|  | 491 | -Wswitch-enum dnl | 
|  | 492 | -Wswitch-default dnl | 
|  | 493 | $4 dnl | 
|  | 494 | $5 dnl | 
|  | 495 | $6 dnl | 
|  | 496 | $7 dnl | 
|  | 497 | ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) | 
|  | 498 | ]) | 
|  | 499 | AS_IF([test "$ax_enable_compile_warnings" = "error"],[ | 
|  | 500 | # "error" flags; -Werror has to be appended unconditionally because | 
|  | 501 | # it's not possible to test for | 
|  | 502 | # | 
|  | 503 | # suggest-attribute=format is disabled because it gives too many false | 
|  | 504 | # positives | 
|  | 505 | AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable) | 
|  | 506 |  | 
|  | 507 | AX_APPEND_COMPILE_FLAGS([ dnl | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 508 | [$ax_compiler_no_suggest_attribute_flags] dnl | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 509 | ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) | 
|  | 510 | ]) | 
|  | 511 |  | 
|  | 512 | # In the flags below, when disabling specific flags, always add *both* | 
|  | 513 | # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) | 
|  | 514 | # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall, | 
|  | 515 | # which effectively turns that flag back on again as an error. | 
|  | 516 | for flag in $ax_warn_cflags_variable; do | 
|  | 517 | AS_CASE([$flag], | 
|  | 518 | [-Wno-*=*],[], | 
|  | 519 | [-Wno-*],[ | 
|  | 520 | AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], | 
|  | 521 | ax_warn_cflags_variable, | 
|  | 522 | [$ax_compiler_flags_test]) | 
|  | 523 | ]) | 
|  | 524 | done | 
|  | 525 |  | 
|  | 526 | AC_LANG_POP([C]) | 
|  | 527 |  | 
|  | 528 | # Substitute the variables | 
|  | 529 | AC_SUBST(ax_warn_cflags_variable) | 
|  | 530 | ])dnl AX_COMPILER_FLAGS | 
|  | 531 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 532 | # =============================================================================== | 
|  | 533 | #  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html | 
|  | 534 | # =============================================================================== | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 535 | # | 
|  | 536 | # SYNOPSIS | 
|  | 537 | # | 
|  | 538 | #   AX_COMPILER_FLAGS_CXXFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) | 
|  | 539 | # | 
|  | 540 | # DESCRIPTION | 
|  | 541 | # | 
|  | 542 | #   Add warning flags for the C++ compiler to VARIABLE, which defaults to | 
|  | 543 | #   WARN_CXXFLAGS.  VARIABLE is AC_SUBST-ed by this macro, but must be | 
|  | 544 | #   manually added to the CXXFLAGS variable for each target in the code | 
|  | 545 | #   base. | 
|  | 546 | # | 
|  | 547 | #   This macro depends on the environment set up by AX_COMPILER_FLAGS. | 
|  | 548 | #   Specifically, it uses the value of $ax_enable_compile_warnings to decide | 
|  | 549 | #   which flags to enable. | 
|  | 550 | # | 
|  | 551 | # LICENSE | 
|  | 552 | # | 
|  | 553 | #   Copyright (c) 2015 David King <amigadave@amigadave.com> | 
|  | 554 | # | 
|  | 555 | #   Copying and distribution of this file, with or without modification, are | 
|  | 556 | #   permitted in any medium without royalty provided the copyright notice | 
|  | 557 | #   and this notice are preserved.  This file is offered as-is, without any | 
|  | 558 | #   warranty. | 
|  | 559 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 560 | #serial 10 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 561 |  | 
|  | 562 | AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ | 
|  | 563 | AC_REQUIRE([AC_PROG_SED]) | 
|  | 564 | AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) | 
|  | 565 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 566 | AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) | 
|  | 567 |  | 
|  | 568 | # Variable names | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 569 | m4_define([ax_warn_cxxflags_variable], | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 570 | [m4_normalize(ifelse([$1],,[WARN_CXXFLAGS],[$1]))]) | 
|  | 571 |  | 
|  | 572 | AC_LANG_PUSH([C++]) | 
|  | 573 |  | 
|  | 574 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad | 
|  | 575 | # flags, otherwise they are always appended to the warn_cxxflags variable, | 
|  | 576 | # and Clang warns on them for every compilation unit. | 
|  | 577 | # If this is passed to GCC, it will explode, so the flag must be enabled | 
|  | 578 | # conditionally. | 
|  | 579 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ | 
|  | 580 | ax_compiler_flags_test="-Werror=unknown-warning-option" | 
|  | 581 | ],[ | 
|  | 582 | ax_compiler_flags_test="" | 
|  | 583 | ]) | 
|  | 584 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 585 | # Check that -Wno-suggest-attribute=format is supported | 
|  | 586 | AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[ | 
|  | 587 | ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" | 
|  | 588 | ],[ | 
|  | 589 | ax_compiler_no_suggest_attribute_flags="" | 
|  | 590 | ]) | 
|  | 591 |  | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 592 | # Base flags | 
|  | 593 | AX_APPEND_COMPILE_FLAGS([ dnl | 
|  | 594 | -fno-strict-aliasing dnl | 
|  | 595 | $3 dnl | 
|  | 596 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) | 
|  | 597 |  | 
|  | 598 | AS_IF([test "$ax_enable_compile_warnings" != "no"],[ | 
|  | 599 | # "yes" flags | 
|  | 600 | AX_APPEND_COMPILE_FLAGS([ dnl | 
|  | 601 | -Wall dnl | 
|  | 602 | -Wextra dnl | 
|  | 603 | -Wundef dnl | 
|  | 604 | -Wwrite-strings dnl | 
|  | 605 | -Wpointer-arith dnl | 
|  | 606 | -Wmissing-declarations dnl | 
|  | 607 | -Wredundant-decls dnl | 
|  | 608 | -Wno-unused-parameter dnl | 
|  | 609 | -Wno-missing-field-initializers dnl | 
|  | 610 | -Wformat=2 dnl | 
|  | 611 | -Wcast-align dnl | 
|  | 612 | -Wformat-nonliteral dnl | 
|  | 613 | -Wformat-security dnl | 
|  | 614 | -Wsign-compare dnl | 
|  | 615 | -Wstrict-aliasing dnl | 
|  | 616 | -Wshadow dnl | 
|  | 617 | -Winline dnl | 
|  | 618 | -Wpacked dnl | 
|  | 619 | -Wmissing-format-attribute dnl | 
|  | 620 | -Wmissing-noreturn dnl | 
|  | 621 | -Winit-self dnl | 
|  | 622 | -Wredundant-decls dnl | 
|  | 623 | -Wmissing-include-dirs dnl | 
|  | 624 | -Wunused-but-set-variable dnl | 
|  | 625 | -Warray-bounds dnl | 
|  | 626 | -Wreturn-type dnl | 
|  | 627 | -Wno-overloaded-virtual dnl | 
|  | 628 | -Wswitch-enum dnl | 
|  | 629 | -Wswitch-default dnl | 
|  | 630 | $4 dnl | 
|  | 631 | $5 dnl | 
|  | 632 | $6 dnl | 
|  | 633 | $7 dnl | 
|  | 634 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) | 
|  | 635 | ]) | 
|  | 636 | AS_IF([test "$ax_enable_compile_warnings" = "error"],[ | 
|  | 637 | # "error" flags; -Werror has to be appended unconditionally because | 
|  | 638 | # it's not possible to test for | 
|  | 639 | # | 
|  | 640 | # suggest-attribute=format is disabled because it gives too many false | 
|  | 641 | # positives | 
|  | 642 | AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable) | 
|  | 643 |  | 
|  | 644 | AX_APPEND_COMPILE_FLAGS([ dnl | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 645 | [$ax_compiler_no_suggest_attribute_flags] dnl | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 646 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) | 
|  | 647 | ]) | 
|  | 648 |  | 
|  | 649 | # In the flags below, when disabling specific flags, always add *both* | 
|  | 650 | # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) | 
|  | 651 | # we enable -Werror, disable a flag, and a build bot passes CXXFLAGS=-Wall, | 
|  | 652 | # which effectively turns that flag back on again as an error. | 
|  | 653 | for flag in $ax_warn_cxxflags_variable; do | 
|  | 654 | AS_CASE([$flag], | 
|  | 655 | [-Wno-*=*],[], | 
|  | 656 | [-Wno-*],[ | 
|  | 657 | AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], | 
|  | 658 | ax_warn_cxxflags_variable, | 
|  | 659 | [$ax_compiler_flags_test]) | 
|  | 660 | ]) | 
|  | 661 | done | 
|  | 662 |  | 
|  | 663 | AC_LANG_POP([C++]) | 
|  | 664 |  | 
|  | 665 | # Substitute the variables | 
|  | 666 | AC_SUBST(ax_warn_cxxflags_variable) | 
|  | 667 | ])dnl AX_COMPILER_FLAGS_CXXFLAGS | 
|  | 668 |  | 
|  | 669 | # =========================================================================== | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 670 | #  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 671 | # =========================================================================== | 
|  | 672 | # | 
|  | 673 | # SYNOPSIS | 
|  | 674 | # | 
|  | 675 | #   AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) | 
|  | 676 | # | 
|  | 677 | # DESCRIPTION | 
|  | 678 | # | 
|  | 679 | #   Add warning flags for the g-ir-scanner (from GObject Introspection) to | 
|  | 680 | #   VARIABLE, which defaults to WARN_SCANNERFLAGS.  VARIABLE is AC_SUBST-ed | 
|  | 681 | #   by this macro, but must be manually added to the SCANNERFLAGS variable | 
|  | 682 | #   for each GIR target in the code base. | 
|  | 683 | # | 
|  | 684 | #   This macro depends on the environment set up by AX_COMPILER_FLAGS. | 
|  | 685 | #   Specifically, it uses the value of $ax_enable_compile_warnings to decide | 
|  | 686 | #   which flags to enable. | 
|  | 687 | # | 
|  | 688 | # LICENSE | 
|  | 689 | # | 
|  | 690 | #   Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk> | 
|  | 691 | # | 
|  | 692 | #   Copying and distribution of this file, with or without modification, are | 
|  | 693 | #   permitted in any medium without royalty provided the copyright notice | 
|  | 694 | #   and this notice are preserved.  This file is offered as-is, without any | 
|  | 695 | #   warranty. | 
|  | 696 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 697 | #serial 6 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 698 |  | 
|  | 699 | AC_DEFUN([AX_COMPILER_FLAGS_GIR],[ | 
|  | 700 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 701 |  | 
|  | 702 | # Variable names | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 703 | m4_define([ax_warn_scannerflags_variable], | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 704 | [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))]) | 
|  | 705 |  | 
|  | 706 | # Base flags | 
|  | 707 | AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable) | 
|  | 708 |  | 
|  | 709 | AS_IF([test "$ax_enable_compile_warnings" != "no"],[ | 
|  | 710 | # "yes" flags | 
|  | 711 | AX_APPEND_FLAG([ dnl | 
|  | 712 | --warn-all dnl | 
|  | 713 | $4 dnl | 
|  | 714 | $5 dnl | 
|  | 715 | $6 dnl | 
|  | 716 | $7 dnl | 
|  | 717 | ],ax_warn_scannerflags_variable) | 
|  | 718 | ]) | 
|  | 719 | AS_IF([test "$ax_enable_compile_warnings" = "error"],[ | 
|  | 720 | # "error" flags | 
|  | 721 | AX_APPEND_FLAG([ dnl | 
|  | 722 | --warn-error dnl | 
|  | 723 | ],ax_warn_scannerflags_variable) | 
|  | 724 | ]) | 
|  | 725 |  | 
|  | 726 | # Substitute the variables | 
|  | 727 | AC_SUBST(ax_warn_scannerflags_variable) | 
|  | 728 | ])dnl AX_COMPILER_FLAGS | 
|  | 729 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 730 | # ============================================================================== | 
|  | 731 | #  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html | 
|  | 732 | # ============================================================================== | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 733 | # | 
|  | 734 | # SYNOPSIS | 
|  | 735 | # | 
|  | 736 | #   AX_COMPILER_FLAGS_LDFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) | 
|  | 737 | # | 
|  | 738 | # DESCRIPTION | 
|  | 739 | # | 
|  | 740 | #   Add warning flags for the linker to VARIABLE, which defaults to | 
|  | 741 | #   WARN_LDFLAGS.  VARIABLE is AC_SUBST-ed by this macro, but must be | 
|  | 742 | #   manually added to the LDFLAGS variable for each target in the code base. | 
|  | 743 | # | 
|  | 744 | #   This macro depends on the environment set up by AX_COMPILER_FLAGS. | 
|  | 745 | #   Specifically, it uses the value of $ax_enable_compile_warnings to decide | 
|  | 746 | #   which flags to enable. | 
|  | 747 | # | 
|  | 748 | # LICENSE | 
|  | 749 | # | 
|  | 750 | #   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk> | 
|  | 751 | # | 
|  | 752 | #   Copying and distribution of this file, with or without modification, are | 
|  | 753 | #   permitted in any medium without royalty provided the copyright notice | 
|  | 754 | #   and this notice are preserved.  This file is offered as-is, without any | 
|  | 755 | #   warranty. | 
|  | 756 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 757 | #serial 8 | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 758 |  | 
|  | 759 | AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ | 
|  | 760 | AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS]) | 
|  | 761 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | 
|  | 762 | AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 763 | AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 764 |  | 
|  | 765 | # Variable names | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 766 | m4_define([ax_warn_ldflags_variable], | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 767 | [m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))]) | 
|  | 768 |  | 
|  | 769 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad | 
|  | 770 | # flags, otherwise they are always appended to the warn_ldflags variable, | 
|  | 771 | # and Clang warns on them for every compilation unit. | 
|  | 772 | # If this is passed to GCC, it will explode, so the flag must be enabled | 
|  | 773 | # conditionally. | 
|  | 774 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ | 
|  | 775 | ax_compiler_flags_test="-Werror=unknown-warning-option" | 
|  | 776 | ],[ | 
|  | 777 | ax_compiler_flags_test="" | 
|  | 778 | ]) | 
|  | 779 |  | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 780 | # macOS linker does not have --as-needed | 
|  | 781 | AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [ | 
|  | 782 | ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" | 
|  | 783 | ], [ | 
|  | 784 | ax_compiler_flags_as_needed_option="" | 
|  | 785 | ]) | 
|  | 786 |  | 
|  | 787 | # macOS linker speaks with a different accent | 
|  | 788 | ax_compiler_flags_fatal_warnings_option="" | 
|  | 789 | AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [ | 
|  | 790 | ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings" | 
|  | 791 | ]) | 
|  | 792 | AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [ | 
|  | 793 | ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings" | 
|  | 794 | ]) | 
|  | 795 |  | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 796 | # Base flags | 
|  | 797 | AX_APPEND_LINK_FLAGS([ dnl | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 798 | $ax_compiler_flags_as_needed_option dnl | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 799 | $3 dnl | 
|  | 800 | ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) | 
|  | 801 |  | 
|  | 802 | AS_IF([test "$ax_enable_compile_warnings" != "no"],[ | 
|  | 803 | # "yes" flags | 
|  | 804 | AX_APPEND_LINK_FLAGS([$4 $5 $6 $7], | 
|  | 805 | ax_warn_ldflags_variable, | 
|  | 806 | [$ax_compiler_flags_test]) | 
|  | 807 | ]) | 
|  | 808 | AS_IF([test "$ax_enable_compile_warnings" = "error"],[ | 
|  | 809 | # "error" flags; -Werror has to be appended unconditionally because | 
|  | 810 | # it's not possible to test for | 
|  | 811 | # | 
|  | 812 | # suggest-attribute=format is disabled because it gives too many false | 
|  | 813 | # positives | 
|  | 814 | AX_APPEND_LINK_FLAGS([ dnl | 
| Cristy | f9c18b6 | 2017-04-01 12:51:20 -0400 | [diff] [blame] | 815 | $ax_compiler_flags_fatal_warnings_option dnl | 
| Cristy | 6720ed7 | 2016-02-09 09:27:35 -0500 | [diff] [blame] | 816 | ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) | 
|  | 817 | ]) | 
|  | 818 |  | 
|  | 819 | # Substitute the variables | 
|  | 820 | AC_SUBST(ax_warn_ldflags_variable) | 
|  | 821 | ])dnl AX_COMPILER_FLAGS | 
|  | 822 |  | 
| cristy | 5ed9c6e | 2013-07-14 21:20:31 +0000 | [diff] [blame] | 823 | # longlong.m4 serial 17 | 
| Cristy | 223ee63 | 2016-09-23 12:23:53 -0400 | [diff] [blame] | 824 | dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc. | 
| cristy | 5ed9c6e | 2013-07-14 21:20:31 +0000 | [diff] [blame] | 825 | dnl This file is free software; the Free Software Foundation | 
|  | 826 | dnl gives unlimited permission to copy and/or distribute it, | 
|  | 827 | dnl with or without modifications, as long as this notice is preserved. | 
|  | 828 |  | 
|  | 829 | dnl From Paul Eggert. | 
|  | 830 |  | 
|  | 831 | # Define HAVE_LONG_LONG_INT if 'long long int' works. | 
|  | 832 | # This fixes a bug in Autoconf 2.61, and can be faster | 
|  | 833 | # than what's in Autoconf 2.62 through 2.68. | 
|  | 834 |  | 
|  | 835 | # Note: If the type 'long long int' exists but is only 32 bits large | 
|  | 836 | # (as on some very old compilers), HAVE_LONG_LONG_INT will not be | 
|  | 837 | # defined. In this case you can treat 'long long int' like 'long int'. | 
|  | 838 |  | 
|  | 839 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], | 
|  | 840 | [ | 
|  | 841 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) | 
|  | 842 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], | 
|  | 843 | [ac_cv_type_long_long_int=yes | 
|  | 844 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | 
|  | 845 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | 
|  | 846 | if test $ac_cv_type_long_long_int = yes; then | 
|  | 847 | dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. | 
|  | 848 | dnl If cross compiling, assume the bug is not important, since | 
|  | 849 | dnl nobody cross compiles for this platform as far as we know. | 
|  | 850 | AC_RUN_IFELSE( | 
|  | 851 | [AC_LANG_PROGRAM( | 
|  | 852 | [[@%:@include <limits.h> | 
|  | 853 | @%:@ifndef LLONG_MAX | 
|  | 854 | @%:@ define HALF \ | 
|  | 855 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | 
|  | 856 | @%:@ define LLONG_MAX (HALF - 1 + HALF) | 
|  | 857 | @%:@endif]], | 
|  | 858 | [[long long int n = 1; | 
|  | 859 | int i; | 
|  | 860 | for (i = 0; ; i++) | 
|  | 861 | { | 
|  | 862 | long long int m = n << i; | 
|  | 863 | if (m >> i != n) | 
|  | 864 | return 1; | 
|  | 865 | if (LLONG_MAX / 2 < m) | 
|  | 866 | break; | 
|  | 867 | } | 
|  | 868 | return 0;]])], | 
|  | 869 | [], | 
|  | 870 | [ac_cv_type_long_long_int=no], | 
|  | 871 | [:]) | 
|  | 872 | fi | 
|  | 873 | fi]) | 
|  | 874 | if test $ac_cv_type_long_long_int = yes; then | 
|  | 875 | AC_DEFINE([HAVE_LONG_LONG_INT], [1], | 
|  | 876 | [Define to 1 if the system has the type 'long long int'.]) | 
|  | 877 | fi | 
|  | 878 | ]) | 
|  | 879 |  | 
|  | 880 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. | 
|  | 881 | # This fixes a bug in Autoconf 2.61, and can be faster | 
|  | 882 | # than what's in Autoconf 2.62 through 2.68. | 
|  | 883 |  | 
|  | 884 | # Note: If the type 'unsigned long long int' exists but is only 32 bits | 
|  | 885 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT | 
|  | 886 | # will not be defined. In this case you can treat 'unsigned long long int' | 
|  | 887 | # like 'unsigned long int'. | 
|  | 888 |  | 
|  | 889 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], | 
|  | 890 | [ | 
|  | 891 | AC_CACHE_CHECK([for unsigned long long int], | 
|  | 892 | [ac_cv_type_unsigned_long_long_int], | 
|  | 893 | [ac_cv_type_unsigned_long_long_int=yes | 
|  | 894 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | 
|  | 895 | AC_LINK_IFELSE( | 
|  | 896 | [_AC_TYPE_LONG_LONG_SNIPPET], | 
|  | 897 | [], | 
|  | 898 | [ac_cv_type_unsigned_long_long_int=no]) | 
|  | 899 | fi]) | 
|  | 900 | if test $ac_cv_type_unsigned_long_long_int = yes; then | 
|  | 901 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], | 
|  | 902 | [Define to 1 if the system has the type 'unsigned long long int'.]) | 
|  | 903 | fi | 
|  | 904 | ]) | 
|  | 905 |  | 
|  | 906 | # Expands to a C program that can be used to test for simultaneous support | 
|  | 907 | # of 'long long' and 'unsigned long long'. We don't want to say that | 
|  | 908 | # 'long long' is available if 'unsigned long long' is not, or vice versa, | 
|  | 909 | # because too many programs rely on the symmetry between signed and unsigned | 
|  | 910 | # integer types (excluding 'bool'). | 
|  | 911 | AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], | 
|  | 912 | [ | 
|  | 913 | AC_LANG_PROGRAM( | 
|  | 914 | [[/* For now, do not test the preprocessor; as of 2007 there are too many | 
|  | 915 | implementations with broken preprocessors.  Perhaps this can | 
|  | 916 | be revisited in 2012.  In the meantime, code should not expect | 
|  | 917 | #if to work with literals wider than 32 bits.  */ | 
|  | 918 | /* Test literals.  */ | 
|  | 919 | long long int ll = 9223372036854775807ll; | 
|  | 920 | long long int nll = -9223372036854775807LL; | 
|  | 921 | unsigned long long int ull = 18446744073709551615ULL; | 
|  | 922 | /* Test constant expressions.   */ | 
|  | 923 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | 
|  | 924 | ? 1 : -1)]; | 
|  | 925 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | 
|  | 926 | ? 1 : -1)]; | 
|  | 927 | int i = 63;]], | 
|  | 928 | [[/* Test availability of runtime routines for shift and division.  */ | 
|  | 929 | long long int llmax = 9223372036854775807ll; | 
|  | 930 | unsigned long long int ullmax = 18446744073709551615ull; | 
|  | 931 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | 
|  | 932 | | (llmax / ll) | (llmax % ll) | 
|  | 933 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | 
|  | 934 | | (ullmax / ull) | (ullmax % ull));]]) | 
|  | 935 | ]) | 
|  | 936 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 937 | # Copyright (C) 2002-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 938 | # | 
|  | 939 | # This file is free software; the Free Software Foundation | 
|  | 940 | # gives unlimited permission to copy and/or distribute it, | 
|  | 941 | # with or without modifications, as long as this notice is preserved. | 
|  | 942 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 943 | # AM_AUTOMAKE_VERSION(VERSION) | 
|  | 944 | # ---------------------------- | 
|  | 945 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | 
|  | 946 | # generated from the m4 files accompanying Automake X.Y. | 
|  | 947 | # (This private macro should not be called outside this file.) | 
|  | 948 | AC_DEFUN([AM_AUTOMAKE_VERSION], | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 949 | [am__api_version='1.15' | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 950 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | 
|  | 951 | dnl require some minimum version.  Point them to the right macro. | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 952 | m4_if([$1], [1.15], [], | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 953 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | 
|  | 954 | ]) | 
|  | 955 |  | 
|  | 956 | # _AM_AUTOCONF_VERSION(VERSION) | 
|  | 957 | # ----------------------------- | 
|  | 958 | # aclocal traces this macro to find the Autoconf version. | 
|  | 959 | # This is a private macro too.  Using m4_define simplifies | 
|  | 960 | # the logic in aclocal, which can simply ignore this definition. | 
|  | 961 | m4_define([_AM_AUTOCONF_VERSION], []) | 
|  | 962 |  | 
|  | 963 | # AM_SET_CURRENT_AUTOMAKE_VERSION | 
|  | 964 | # ------------------------------- | 
|  | 965 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | 
|  | 966 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | 
|  | 967 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 968 | [AM_AUTOMAKE_VERSION([1.15])dnl | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 969 | m4_ifndef([AC_AUTOCONF_VERSION], | 
|  | 970 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 
|  | 971 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | 
|  | 972 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 973 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. | 
| cristy | 9e007fe | 2015-01-03 16:05:07 +0000 | [diff] [blame] | 974 | # | 
|  | 975 | # This file is free software; the Free Software Foundation | 
|  | 976 | # gives unlimited permission to copy and/or distribute it, | 
|  | 977 | # with or without modifications, as long as this notice is preserved. | 
|  | 978 |  | 
|  | 979 | # AM_PROG_AR([ACT-IF-FAIL]) | 
|  | 980 | # ------------------------- | 
|  | 981 | # Try to determine the archiver interface, and trigger the ar-lib wrapper | 
|  | 982 | # if it is needed.  If the detection of archiver interface fails, run | 
|  | 983 | # ACT-IF-FAIL (default is to abort configure with a proper error message). | 
|  | 984 | AC_DEFUN([AM_PROG_AR], | 
|  | 985 | [AC_BEFORE([$0], [LT_INIT])dnl | 
|  | 986 | AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl | 
|  | 987 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 
|  | 988 | AC_REQUIRE_AUX_FILE([ar-lib])dnl | 
|  | 989 | AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) | 
|  | 990 | : ${AR=ar} | 
|  | 991 |  | 
|  | 992 | AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], | 
|  | 993 | [AC_LANG_PUSH([C]) | 
|  | 994 | am_cv_ar_interface=ar | 
|  | 995 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], | 
|  | 996 | [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' | 
|  | 997 | AC_TRY_EVAL([am_ar_try]) | 
|  | 998 | if test "$ac_status" -eq 0; then | 
|  | 999 | am_cv_ar_interface=ar | 
|  | 1000 | else | 
|  | 1001 | am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' | 
|  | 1002 | AC_TRY_EVAL([am_ar_try]) | 
|  | 1003 | if test "$ac_status" -eq 0; then | 
|  | 1004 | am_cv_ar_interface=lib | 
|  | 1005 | else | 
|  | 1006 | am_cv_ar_interface=unknown | 
|  | 1007 | fi | 
|  | 1008 | fi | 
|  | 1009 | rm -f conftest.lib libconftest.a | 
|  | 1010 | ]) | 
|  | 1011 | AC_LANG_POP([C])]) | 
|  | 1012 |  | 
|  | 1013 | case $am_cv_ar_interface in | 
|  | 1014 | ar) | 
|  | 1015 | ;; | 
|  | 1016 | lib) | 
|  | 1017 | # Microsoft lib, so override with the ar-lib wrapper script. | 
|  | 1018 | # FIXME: It is wrong to rewrite AR. | 
|  | 1019 | # But if we don't then we get into trouble of one sort or another. | 
|  | 1020 | # A longer-term fix would be to have automake use am__AR in this case, | 
|  | 1021 | # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something | 
|  | 1022 | # similar. | 
|  | 1023 | AR="$am_aux_dir/ar-lib $AR" | 
|  | 1024 | ;; | 
|  | 1025 | unknown) | 
|  | 1026 | m4_default([$1], | 
|  | 1027 | [AC_MSG_ERROR([could not determine $AR interface])]) | 
|  | 1028 | ;; | 
|  | 1029 | esac | 
|  | 1030 | AC_SUBST([AR])dnl | 
|  | 1031 | ]) | 
|  | 1032 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1033 | # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*- | 
|  | 1034 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1035 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1036 | # | 
|  | 1037 | # This file is free software; the Free Software Foundation | 
|  | 1038 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1039 | # with or without modifications, as long as this notice is preserved. | 
|  | 1040 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1041 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | 
|  | 1042 | # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to | 
|  | 1043 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'. | 
|  | 1044 | # | 
|  | 1045 | # Of course, Automake must honor this variable whenever it calls a | 
|  | 1046 | # tool from the auxiliary directory.  The problem is that $srcdir (and | 
|  | 1047 | # therefore $ac_aux_dir as well) can be either absolute or relative, | 
|  | 1048 | # depending on how configure is run.  This is pretty annoying, since | 
|  | 1049 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | 
|  | 1050 | # source directory, any form will work fine, but in subdirectories a | 
|  | 1051 | # relative path needs to be adjusted first. | 
|  | 1052 | # | 
|  | 1053 | # $ac_aux_dir/missing | 
|  | 1054 | #    fails when called from a subdirectory if $ac_aux_dir is relative | 
|  | 1055 | # $top_srcdir/$ac_aux_dir/missing | 
|  | 1056 | #    fails if $ac_aux_dir is absolute, | 
|  | 1057 | #    fails when called from a subdirectory in a VPATH build with | 
|  | 1058 | #          a relative $ac_aux_dir | 
|  | 1059 | # | 
|  | 1060 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | 
|  | 1061 | # are both prefixed by $srcdir.  In an in-source build this is usually | 
|  | 1062 | # harmless because $srcdir is '.', but things will broke when you | 
|  | 1063 | # start a VPATH build or use an absolute $srcdir. | 
|  | 1064 | # | 
|  | 1065 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | 
|  | 1066 | # iff we strip the leading $srcdir from $ac_aux_dir.  That would be: | 
|  | 1067 | #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | 
|  | 1068 | # and then we would define $MISSING as | 
|  | 1069 | #   MISSING="\${SHELL} $am_aux_dir/missing" | 
|  | 1070 | # This will work as long as MISSING is not called from configure, because | 
|  | 1071 | # unfortunately $(top_srcdir) has no meaning in configure. | 
|  | 1072 | # However there are other variables, like CC, which are often used in | 
|  | 1073 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | 
|  | 1074 | # | 
|  | 1075 | # Another solution, used here, is to always expand $ac_aux_dir to an | 
|  | 1076 | # absolute PATH.  The drawback is that using absolute paths prevent a | 
|  | 1077 | # configured tree to be moved without reconfiguration. | 
|  | 1078 |  | 
|  | 1079 | AC_DEFUN([AM_AUX_DIR_EXPAND], | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1080 | [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | 
|  | 1081 | # Expand $ac_aux_dir to an absolute path. | 
|  | 1082 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1083 | ]) | 
|  | 1084 |  | 
|  | 1085 | # AM_CONDITIONAL                                            -*- Autoconf -*- | 
|  | 1086 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1087 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1088 | # | 
|  | 1089 | # This file is free software; the Free Software Foundation | 
|  | 1090 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1091 | # with or without modifications, as long as this notice is preserved. | 
|  | 1092 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1093 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | 
|  | 1094 | # ------------------------------------- | 
|  | 1095 | # Define a conditional. | 
|  | 1096 | AC_DEFUN([AM_CONDITIONAL], | 
|  | 1097 | [AC_PREREQ([2.52])dnl | 
|  | 1098 | m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])], | 
|  | 1099 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | 
|  | 1100 | AC_SUBST([$1_TRUE])dnl | 
|  | 1101 | AC_SUBST([$1_FALSE])dnl | 
|  | 1102 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | 
|  | 1103 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | 
|  | 1104 | m4_define([_AM_COND_VALUE_$1], [$2])dnl | 
|  | 1105 | if $2; then | 
|  | 1106 | $1_TRUE= | 
|  | 1107 | $1_FALSE='#' | 
|  | 1108 | else | 
|  | 1109 | $1_TRUE='#' | 
|  | 1110 | $1_FALSE= | 
|  | 1111 | fi | 
|  | 1112 | AC_CONFIG_COMMANDS_PRE( | 
|  | 1113 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | 
|  | 1114 | AC_MSG_ERROR([[conditional "$1" was never defined. | 
|  | 1115 | Usually this means the macro was only invoked conditionally.]]) | 
|  | 1116 | fi])]) | 
|  | 1117 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1118 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1119 | # | 
|  | 1120 | # This file is free software; the Free Software Foundation | 
|  | 1121 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1122 | # with or without modifications, as long as this notice is preserved. | 
|  | 1123 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1124 |  | 
|  | 1125 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be | 
|  | 1126 | # written in clear, in which case automake, when reading aclocal.m4, | 
|  | 1127 | # will think it sees a *use*, and therefore will trigger all it's | 
|  | 1128 | # C support machinery.  Also note that it means that autoscan, seeing | 
|  | 1129 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | 
|  | 1130 |  | 
|  | 1131 |  | 
|  | 1132 | # _AM_DEPENDENCIES(NAME) | 
|  | 1133 | # ---------------------- | 
|  | 1134 | # See how the compiler implements dependency checking. | 
|  | 1135 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". | 
|  | 1136 | # We try a few techniques and use that to set a single cache variable. | 
|  | 1137 | # | 
|  | 1138 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | 
|  | 1139 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | 
|  | 1140 | # dependency, and given that the user is not expected to run this macro, | 
|  | 1141 | # just rely on AC_PROG_CC. | 
|  | 1142 | AC_DEFUN([_AM_DEPENDENCIES], | 
|  | 1143 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | 
|  | 1144 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | 
|  | 1145 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | 
|  | 1146 | AC_REQUIRE([AM_DEP_TRACK])dnl | 
|  | 1147 |  | 
|  | 1148 | m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=], | 
|  | 1149 | [$1], [CXX],  [depcc="$CXX"  am_compiler_list=], | 
|  | 1150 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | 
|  | 1151 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], | 
|  | 1152 | [$1], [UPC],  [depcc="$UPC"  am_compiler_list=], | 
|  | 1153 | [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'], | 
|  | 1154 | [depcc="$$1"   am_compiler_list=]) | 
|  | 1155 |  | 
|  | 1156 | AC_CACHE_CHECK([dependency style of $depcc], | 
|  | 1157 | [am_cv_$1_dependencies_compiler_type], | 
|  | 1158 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | 
|  | 1159 | # We make a subdir and do the tests there.  Otherwise we can end up | 
|  | 1160 | # making bogus files that we don't know about and never remove.  For | 
|  | 1161 | # instance it was reported that on HP-UX the gcc test will end up | 
|  | 1162 | # making a dummy file named 'D' -- because '-MD' means "put the output | 
|  | 1163 | # in D". | 
|  | 1164 | rm -rf conftest.dir | 
|  | 1165 | mkdir conftest.dir | 
|  | 1166 | # Copy depcomp to subdir because otherwise we won't find it if we're | 
|  | 1167 | # using a relative directory. | 
|  | 1168 | cp "$am_depcomp" conftest.dir | 
|  | 1169 | cd conftest.dir | 
|  | 1170 | # We will build objects and dependencies in a subdirectory because | 
|  | 1171 | # it helps to detect inapplicable dependency modes.  For instance | 
|  | 1172 | # both Tru64's cc and ICC support -MD to output dependencies as a | 
|  | 1173 | # side effect of compilation, but ICC will put the dependencies in | 
|  | 1174 | # the current directory while Tru64 will put them in the object | 
|  | 1175 | # directory. | 
|  | 1176 | mkdir sub | 
|  | 1177 |  | 
|  | 1178 | am_cv_$1_dependencies_compiler_type=none | 
|  | 1179 | if test "$am_compiler_list" = ""; then | 
|  | 1180 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | 
|  | 1181 | fi | 
|  | 1182 | am__universal=false | 
|  | 1183 | m4_case([$1], [CC], | 
|  | 1184 | [case " $depcc " in #( | 
|  | 1185 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | 
|  | 1186 | esac], | 
|  | 1187 | [CXX], | 
|  | 1188 | [case " $depcc " in #( | 
|  | 1189 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | 
|  | 1190 | esac]) | 
|  | 1191 |  | 
|  | 1192 | for depmode in $am_compiler_list; do | 
|  | 1193 | # Setup a source with many dependencies, because some compilers | 
|  | 1194 | # like to wrap large dependency lists on column 80 (with \), and | 
|  | 1195 | # we should not choose a depcomp mode which is confused by this. | 
|  | 1196 | # | 
|  | 1197 | # We need to recreate these files for each test, as the compiler may | 
|  | 1198 | # overwrite some of them when testing with obscure command lines. | 
|  | 1199 | # This happens at least with the AIX C compiler. | 
|  | 1200 | : > sub/conftest.c | 
|  | 1201 | for i in 1 2 3 4 5 6; do | 
|  | 1202 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | 
|  | 1203 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | 
|  | 1204 | # Solaris 10 /bin/sh. | 
|  | 1205 | echo '/* dummy */' > sub/conftst$i.h | 
|  | 1206 | done | 
|  | 1207 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | 
|  | 1208 |  | 
|  | 1209 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | 
|  | 1210 | # mode.  It turns out that the SunPro C++ compiler does not properly | 
|  | 1211 | # handle '-M -o', and we need to detect this.  Also, some Intel | 
|  | 1212 | # versions had trouble with output in subdirs. | 
|  | 1213 | am__obj=sub/conftest.${OBJEXT-o} | 
|  | 1214 | am__minus_obj="-o $am__obj" | 
|  | 1215 | case $depmode in | 
|  | 1216 | gcc) | 
|  | 1217 | # This depmode causes a compiler race in universal mode. | 
|  | 1218 | test "$am__universal" = false || continue | 
|  | 1219 | ;; | 
|  | 1220 | nosideeffect) | 
|  | 1221 | # After this tag, mechanisms are not by side-effect, so they'll | 
|  | 1222 | # only be used when explicitly requested. | 
|  | 1223 | if test "x$enable_dependency_tracking" = xyes; then | 
|  | 1224 | continue | 
|  | 1225 | else | 
|  | 1226 | break | 
|  | 1227 | fi | 
|  | 1228 | ;; | 
|  | 1229 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | 
|  | 1230 | # This compiler won't grok '-c -o', but also, the minuso test has | 
|  | 1231 | # not run yet.  These depmodes are late enough in the game, and | 
|  | 1232 | # so weak that their functioning should not be impacted. | 
|  | 1233 | am__obj=conftest.${OBJEXT-o} | 
|  | 1234 | am__minus_obj= | 
|  | 1235 | ;; | 
|  | 1236 | none) break ;; | 
|  | 1237 | esac | 
|  | 1238 | if depmode=$depmode \ | 
|  | 1239 | source=sub/conftest.c object=$am__obj \ | 
|  | 1240 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | 
|  | 1241 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | 
|  | 1242 | >/dev/null 2>conftest.err && | 
|  | 1243 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | 
|  | 1244 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | 
|  | 1245 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | 
|  | 1246 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | 
|  | 1247 | # icc doesn't choke on unknown options, it will just issue warnings | 
|  | 1248 | # or remarks (even with -Werror).  So we grep stderr for any message | 
|  | 1249 | # that says an option was ignored or not supported. | 
|  | 1250 | # When given -MP, icc 7.0 and 7.1 complain thusly: | 
|  | 1251 | #   icc: Command line warning: ignoring option '-M'; no argument required | 
|  | 1252 | # The diagnosis changed in icc 8.0: | 
|  | 1253 | #   icc: Command line remark: option '-MP' not supported | 
|  | 1254 | if (grep 'ignoring option' conftest.err || | 
|  | 1255 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | 
|  | 1256 | am_cv_$1_dependencies_compiler_type=$depmode | 
|  | 1257 | break | 
|  | 1258 | fi | 
|  | 1259 | fi | 
|  | 1260 | done | 
|  | 1261 |  | 
|  | 1262 | cd .. | 
|  | 1263 | rm -rf conftest.dir | 
|  | 1264 | else | 
|  | 1265 | am_cv_$1_dependencies_compiler_type=none | 
|  | 1266 | fi | 
|  | 1267 | ]) | 
|  | 1268 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | 
|  | 1269 | AM_CONDITIONAL([am__fastdep$1], [ | 
|  | 1270 | test "x$enable_dependency_tracking" != xno \ | 
|  | 1271 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | 
|  | 1272 | ]) | 
|  | 1273 |  | 
|  | 1274 |  | 
|  | 1275 | # AM_SET_DEPDIR | 
|  | 1276 | # ------------- | 
|  | 1277 | # Choose a directory name for dependency files. | 
|  | 1278 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES. | 
|  | 1279 | AC_DEFUN([AM_SET_DEPDIR], | 
|  | 1280 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | 
|  | 1281 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | 
|  | 1282 | ]) | 
|  | 1283 |  | 
|  | 1284 |  | 
|  | 1285 | # AM_DEP_TRACK | 
|  | 1286 | # ------------ | 
|  | 1287 | AC_DEFUN([AM_DEP_TRACK], | 
|  | 1288 | [AC_ARG_ENABLE([dependency-tracking], [dnl | 
|  | 1289 | AS_HELP_STRING( | 
|  | 1290 | [--enable-dependency-tracking], | 
|  | 1291 | [do not reject slow dependency extractors]) | 
|  | 1292 | AS_HELP_STRING( | 
|  | 1293 | [--disable-dependency-tracking], | 
|  | 1294 | [speeds up one-time build])]) | 
|  | 1295 | if test "x$enable_dependency_tracking" != xno; then | 
|  | 1296 | am_depcomp="$ac_aux_dir/depcomp" | 
|  | 1297 | AMDEPBACKSLASH='\' | 
|  | 1298 | am__nodep='_no' | 
|  | 1299 | fi | 
|  | 1300 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | 
|  | 1301 | AC_SUBST([AMDEPBACKSLASH])dnl | 
|  | 1302 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | 
|  | 1303 | AC_SUBST([am__nodep])dnl | 
|  | 1304 | _AM_SUBST_NOTMAKE([am__nodep])dnl | 
|  | 1305 | ]) | 
|  | 1306 |  | 
|  | 1307 | # Generate code to set up dependency tracking.              -*- Autoconf -*- | 
|  | 1308 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1309 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1310 | # | 
|  | 1311 | # This file is free software; the Free Software Foundation | 
|  | 1312 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1313 | # with or without modifications, as long as this notice is preserved. | 
|  | 1314 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1315 |  | 
|  | 1316 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | 
|  | 1317 | # ------------------------------ | 
|  | 1318 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | 
|  | 1319 | [{ | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1320 | # Older Autoconf quotes --file arguments for eval, but not when files | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1321 | # are listed without --file.  Let's play safe and only enable the eval | 
|  | 1322 | # if we detect the quoting. | 
|  | 1323 | case $CONFIG_FILES in | 
|  | 1324 | *\'*) eval set x "$CONFIG_FILES" ;; | 
|  | 1325 | *)   set x $CONFIG_FILES ;; | 
|  | 1326 | esac | 
|  | 1327 | shift | 
|  | 1328 | for mf | 
|  | 1329 | do | 
|  | 1330 | # Strip MF so we end up with the name of the file. | 
|  | 1331 | mf=`echo "$mf" | sed -e 's/:.*$//'` | 
|  | 1332 | # Check whether this is an Automake generated Makefile or not. | 
|  | 1333 | # We used to match only the files named 'Makefile.in', but | 
|  | 1334 | # some people rename them; so instead we look at the file content. | 
|  | 1335 | # Grep'ing the first line is not enough: some people post-process | 
|  | 1336 | # each Makefile.in and add a new line on top of each file to say so. | 
|  | 1337 | # Grep'ing the whole file is not good either: AIX grep has a line | 
|  | 1338 | # limit of 2048, but all sed's we know have understand at least 4000. | 
|  | 1339 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | 
|  | 1340 | dirpart=`AS_DIRNAME("$mf")` | 
|  | 1341 | else | 
|  | 1342 | continue | 
|  | 1343 | fi | 
|  | 1344 | # Extract the definition of DEPDIR, am__include, and am__quote | 
|  | 1345 | # from the Makefile without running 'make'. | 
|  | 1346 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | 
|  | 1347 | test -z "$DEPDIR" && continue | 
|  | 1348 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | 
| cristy | bced814 | 2013-05-31 01:23:57 +0000 | [diff] [blame] | 1349 | test -z "$am__include" && continue | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1350 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | 
|  | 1351 | # Find all dependency output files, they are included files with | 
|  | 1352 | # $(DEPDIR) in their names.  We invoke sed twice because it is the | 
|  | 1353 | # simplest approach to changing $(DEPDIR) to its actual value in the | 
|  | 1354 | # expansion. | 
|  | 1355 | for file in `sed -n " | 
|  | 1356 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | 
|  | 1357 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | 
|  | 1358 | # Make sure the directory exists. | 
|  | 1359 | test -f "$dirpart/$file" && continue | 
|  | 1360 | fdir=`AS_DIRNAME(["$file"])` | 
|  | 1361 | AS_MKDIR_P([$dirpart/$fdir]) | 
|  | 1362 | # echo "creating $dirpart/$file" | 
|  | 1363 | echo '# dummy' > "$dirpart/$file" | 
|  | 1364 | done | 
|  | 1365 | done | 
|  | 1366 | } | 
|  | 1367 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | 
|  | 1368 |  | 
|  | 1369 |  | 
|  | 1370 | # AM_OUTPUT_DEPENDENCY_COMMANDS | 
|  | 1371 | # ----------------------------- | 
|  | 1372 | # This macro should only be invoked once -- use via AC_REQUIRE. | 
|  | 1373 | # | 
|  | 1374 | # This code is only required when automatic dependency tracking | 
|  | 1375 | # is enabled.  FIXME.  This creates each '.P' file that we will | 
|  | 1376 | # need in order to bootstrap the dependency handling code. | 
|  | 1377 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | 
|  | 1378 | [AC_CONFIG_COMMANDS([depfiles], | 
|  | 1379 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | 
|  | 1380 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | 
|  | 1381 | ]) | 
|  | 1382 |  | 
|  | 1383 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1384 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1385 | # | 
|  | 1386 | # This file is free software; the Free Software Foundation | 
|  | 1387 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1388 | # with or without modifications, as long as this notice is preserved. | 
|  | 1389 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1390 | AC_DEFUN([AM_WITH_DMALLOC], | 
|  | 1391 | [AC_MSG_CHECKING([if malloc debugging is wanted]) | 
|  | 1392 | AC_ARG_WITH([dmalloc], | 
|  | 1393 | [AS_HELP_STRING([--with-dmalloc], | 
|  | 1394 | [use dmalloc, as in http://www.dmalloc.com])], | 
|  | 1395 | [if test "$withval" = yes; then | 
|  | 1396 | AC_MSG_RESULT([yes]) | 
|  | 1397 | AC_DEFINE([WITH_DMALLOC], [1], | 
|  | 1398 | [Define if using the dmalloc debugging malloc package]) | 
|  | 1399 | LIBS="$LIBS -ldmalloc" | 
|  | 1400 | LDFLAGS="$LDFLAGS -g" | 
|  | 1401 | else | 
|  | 1402 | AC_MSG_RESULT([no]) | 
|  | 1403 | fi], [AC_MSG_RESULT([no])]) | 
|  | 1404 | ]) | 
|  | 1405 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1406 | # Do all the work for Automake.                             -*- Autoconf -*- | 
|  | 1407 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1408 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1409 | # | 
|  | 1410 | # This file is free software; the Free Software Foundation | 
|  | 1411 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1412 | # with or without modifications, as long as this notice is preserved. | 
|  | 1413 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1414 | # This macro actually does too much.  Some checks are only needed if | 
|  | 1415 | # your package does certain things.  But this isn't really a big deal. | 
|  | 1416 |  | 
| cristy | a5bda01 | 2013-11-03 18:05:38 +0000 | [diff] [blame] | 1417 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | 
|  | 1418 | m4_define([AC_PROG_CC], | 
|  | 1419 | m4_defn([AC_PROG_CC]) | 
|  | 1420 | [_AM_PROG_CC_C_O | 
|  | 1421 | ]) | 
|  | 1422 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1423 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | 
|  | 1424 | # AM_INIT_AUTOMAKE([OPTIONS]) | 
|  | 1425 | # ----------------------------------------------- | 
|  | 1426 | # The call with PACKAGE and VERSION arguments is the old style | 
|  | 1427 | # call (pre autoconf-2.50), which is being phased out.  PACKAGE | 
|  | 1428 | # and VERSION should now be passed to AC_INIT and removed from | 
|  | 1429 | # the call to AM_INIT_AUTOMAKE. | 
|  | 1430 | # We support both call styles for the transition.  After | 
|  | 1431 | # the next Automake release, Autoconf can make the AC_INIT | 
|  | 1432 | # arguments mandatory, and then we can depend on a new Autoconf | 
|  | 1433 | # release and drop the old call support. | 
|  | 1434 | AC_DEFUN([AM_INIT_AUTOMAKE], | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1435 | [AC_PREREQ([2.65])dnl | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1436 | dnl Autoconf wants to disallow AM_ names.  We explicitly allow | 
|  | 1437 | dnl the ones we care about. | 
|  | 1438 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | 
|  | 1439 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | 
|  | 1440 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 
|  | 1441 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | 
|  | 1442 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | 
|  | 1443 | # is not polluted with repeated "-I." | 
|  | 1444 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | 
|  | 1445 | # test to see if srcdir already configured | 
|  | 1446 | if test -f $srcdir/config.status; then | 
|  | 1447 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | 
|  | 1448 | fi | 
|  | 1449 | fi | 
|  | 1450 |  | 
|  | 1451 | # test whether we have cygpath | 
|  | 1452 | if test -z "$CYGPATH_W"; then | 
|  | 1453 | if (cygpath --version) >/dev/null 2>/dev/null; then | 
|  | 1454 | CYGPATH_W='cygpath -w' | 
|  | 1455 | else | 
|  | 1456 | CYGPATH_W=echo | 
|  | 1457 | fi | 
|  | 1458 | fi | 
|  | 1459 | AC_SUBST([CYGPATH_W]) | 
|  | 1460 |  | 
|  | 1461 | # Define the identity of the package. | 
|  | 1462 | dnl Distinguish between old-style and new-style calls. | 
|  | 1463 | m4_ifval([$2], | 
|  | 1464 | [AC_DIAGNOSE([obsolete], | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1465 | [$0: two- and three-arguments forms are deprecated.]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1466 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | 
|  | 1467 | AC_SUBST([PACKAGE], [$1])dnl | 
|  | 1468 | AC_SUBST([VERSION], [$2])], | 
|  | 1469 | [_AM_SET_OPTIONS([$1])dnl | 
|  | 1470 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | 
|  | 1471 | m4_if( | 
|  | 1472 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | 
|  | 1473 | [ok:ok],, | 
|  | 1474 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | 
|  | 1475 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | 
|  | 1476 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | 
|  | 1477 |  | 
|  | 1478 | _AM_IF_OPTION([no-define],, | 
|  | 1479 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) | 
|  | 1480 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl | 
|  | 1481 |  | 
|  | 1482 | # Some tools Automake needs. | 
|  | 1483 | AC_REQUIRE([AM_SANITY_CHECK])dnl | 
|  | 1484 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | 
|  | 1485 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) | 
|  | 1486 | AM_MISSING_PROG([AUTOCONF], [autoconf]) | 
|  | 1487 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) | 
|  | 1488 | AM_MISSING_PROG([AUTOHEADER], [autoheader]) | 
|  | 1489 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) | 
|  | 1490 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | 
|  | 1491 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | 
|  | 1492 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | 
|  | 1493 | # For better backward compatibility.  To be removed once Automake 1.9.x | 
|  | 1494 | # dies out for good.  For more background, see: | 
|  | 1495 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | 
|  | 1496 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | 
|  | 1497 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1498 | # We need awk for the "check" target (and possibly the TAP driver).  The | 
|  | 1499 | # system "awk" is bad on some platforms. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1500 | AC_REQUIRE([AC_PROG_AWK])dnl | 
|  | 1501 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | 
|  | 1502 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | 
|  | 1503 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | 
|  | 1504 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | 
|  | 1505 | [_AM_PROG_TAR([v7])])]) | 
|  | 1506 | _AM_IF_OPTION([no-dependencies],, | 
|  | 1507 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | 
|  | 1508 | [_AM_DEPENDENCIES([CC])], | 
|  | 1509 | [m4_define([AC_PROG_CC], | 
|  | 1510 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl | 
|  | 1511 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | 
|  | 1512 | [_AM_DEPENDENCIES([CXX])], | 
|  | 1513 | [m4_define([AC_PROG_CXX], | 
|  | 1514 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl | 
|  | 1515 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], | 
|  | 1516 | [_AM_DEPENDENCIES([OBJC])], | 
|  | 1517 | [m4_define([AC_PROG_OBJC], | 
|  | 1518 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1519 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1520 | [_AM_DEPENDENCIES([OBJCXX])], | 
|  | 1521 | [m4_define([AC_PROG_OBJCXX], | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1522 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1523 | ]) | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1524 | AC_REQUIRE([AM_SILENT_RULES])dnl | 
|  | 1525 | dnl The testsuite driver may need to know about EXEEXT, so add the | 
|  | 1526 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This | 
|  | 1527 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1528 | AC_CONFIG_COMMANDS_PRE(dnl | 
|  | 1529 | [m4_provide_if([_AM_COMPILER_EXEEXT], | 
|  | 1530 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | 
| cristy | a5bda01 | 2013-11-03 18:05:38 +0000 | [diff] [blame] | 1531 |  | 
|  | 1532 | # POSIX will say in a future version that running "rm -f" with no argument | 
|  | 1533 | # is OK; and we want to be able to make that assumption in our Makefile | 
|  | 1534 | # recipes.  So use an aggressive probe to check that the usage we want is | 
|  | 1535 | # actually supported "in the wild" to an acceptable degree. | 
|  | 1536 | # See automake bug#10828. | 
|  | 1537 | # To make any issue more visible, cause the running configure to be aborted | 
|  | 1538 | # by default if the 'rm' program in use doesn't match our expectations; the | 
|  | 1539 | # user can still override this though. | 
|  | 1540 | if rm -f && rm -fr && rm -rf; then : OK; else | 
|  | 1541 | cat >&2 <<'END' | 
|  | 1542 | Oops! | 
|  | 1543 |  | 
|  | 1544 | Your 'rm' program seems unable to run without file operands specified | 
|  | 1545 | on the command line, even when the '-f' option is present.  This is contrary | 
|  | 1546 | to the behaviour of most rm programs out there, and not conforming with | 
|  | 1547 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | 
|  | 1548 |  | 
|  | 1549 | Please tell bug-automake@gnu.org about your system, including the value | 
|  | 1550 | of your $PATH and any error possibly output before this message.  This | 
|  | 1551 | can help us improve future automake versions. | 
|  | 1552 |  | 
|  | 1553 | END | 
|  | 1554 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | 
|  | 1555 | echo 'Configuration will proceed anyway, since you have set the' >&2 | 
|  | 1556 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | 
|  | 1557 | echo >&2 | 
|  | 1558 | else | 
|  | 1559 | cat >&2 <<'END' | 
|  | 1560 | Aborting the configuration process, to ensure you take notice of the issue. | 
|  | 1561 |  | 
|  | 1562 | You can download and install GNU coreutils to get an 'rm' implementation | 
|  | 1563 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | 
|  | 1564 |  | 
|  | 1565 | If you want to complete the configuration process using your problematic | 
|  | 1566 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | 
|  | 1567 | to "yes", and re-run configure. | 
|  | 1568 |  | 
|  | 1569 | END | 
|  | 1570 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | 
|  | 1571 | fi | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1572 | fi | 
|  | 1573 | dnl The trailing newline in this macro's definition is deliberate, for | 
|  | 1574 | dnl backward compatibility and to allow trailing 'dnl'-style comments | 
|  | 1575 | dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. | 
|  | 1576 | ]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1577 |  | 
|  | 1578 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not | 
|  | 1579 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | 
|  | 1580 | dnl mangled by Autoconf and run in a shell conditional statement. | 
|  | 1581 | m4_define([_AC_COMPILER_EXEEXT], | 
|  | 1582 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | 
|  | 1583 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1584 | # When config.status generates a header, we must update the stamp-h file. | 
|  | 1585 | # This file resides in the same directory as the config header | 
|  | 1586 | # that is generated.  The stamp files are numbered to have different names. | 
|  | 1587 |  | 
|  | 1588 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | 
|  | 1589 | # loop where config.status creates the headers, so we can generate | 
|  | 1590 | # our stamp files there. | 
|  | 1591 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | 
|  | 1592 | [# Compute $1's index in $config_headers. | 
|  | 1593 | _am_arg=$1 | 
|  | 1594 | _am_stamp_count=1 | 
|  | 1595 | for _am_header in $config_headers :; do | 
|  | 1596 | case $_am_header in | 
|  | 1597 | $_am_arg | $_am_arg:* ) | 
|  | 1598 | break ;; | 
|  | 1599 | * ) | 
|  | 1600 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | 
|  | 1601 | esac | 
|  | 1602 | done | 
|  | 1603 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | 
|  | 1604 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1605 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1606 | # | 
|  | 1607 | # This file is free software; the Free Software Foundation | 
|  | 1608 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1609 | # with or without modifications, as long as this notice is preserved. | 
|  | 1610 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1611 | # AM_PROG_INSTALL_SH | 
|  | 1612 | # ------------------ | 
|  | 1613 | # Define $install_sh. | 
|  | 1614 | AC_DEFUN([AM_PROG_INSTALL_SH], | 
|  | 1615 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1616 | if test x"${install_sh+set}" != xset; then | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1617 | case $am_aux_dir in | 
|  | 1618 | *\ * | *\	*) | 
|  | 1619 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | 
|  | 1620 | *) | 
|  | 1621 | install_sh="\${SHELL} $am_aux_dir/install-sh" | 
|  | 1622 | esac | 
|  | 1623 | fi | 
|  | 1624 | AC_SUBST([install_sh])]) | 
|  | 1625 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1626 | # Copyright (C) 2003-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1627 | # | 
|  | 1628 | # This file is free software; the Free Software Foundation | 
|  | 1629 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1630 | # with or without modifications, as long as this notice is preserved. | 
|  | 1631 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1632 | # Check whether the underlying file-system supports filenames | 
|  | 1633 | # with a leading dot.  For instance MS-DOS doesn't. | 
|  | 1634 | AC_DEFUN([AM_SET_LEADING_DOT], | 
|  | 1635 | [rm -rf .tst 2>/dev/null | 
|  | 1636 | mkdir .tst 2>/dev/null | 
|  | 1637 | if test -d .tst; then | 
|  | 1638 | am__leading_dot=. | 
|  | 1639 | else | 
|  | 1640 | am__leading_dot=_ | 
|  | 1641 | fi | 
|  | 1642 | rmdir .tst 2>/dev/null | 
|  | 1643 | AC_SUBST([am__leading_dot])]) | 
|  | 1644 |  | 
|  | 1645 | # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*- | 
|  | 1646 | # From Jim Meyering | 
|  | 1647 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1648 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1649 | # | 
|  | 1650 | # This file is free software; the Free Software Foundation | 
|  | 1651 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1652 | # with or without modifications, as long as this notice is preserved. | 
|  | 1653 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1654 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) | 
|  | 1655 | # ---------------------------------- | 
|  | 1656 | # Control maintainer-specific portions of Makefiles. | 
|  | 1657 | # Default is to disable them, unless 'enable' is passed literally. | 
|  | 1658 | # For symmetry, 'disable' may be passed as well.  Anyway, the user | 
|  | 1659 | # can override the default with the --enable/--disable switch. | 
|  | 1660 | AC_DEFUN([AM_MAINTAINER_MODE], | 
|  | 1661 | [m4_case(m4_default([$1], [disable]), | 
|  | 1662 | [enable], [m4_define([am_maintainer_other], [disable])], | 
|  | 1663 | [disable], [m4_define([am_maintainer_other], [enable])], | 
|  | 1664 | [m4_define([am_maintainer_other], [enable]) | 
|  | 1665 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) | 
|  | 1666 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | 
|  | 1667 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed | 
|  | 1668 | AC_ARG_ENABLE([maintainer-mode], | 
|  | 1669 | [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], | 
|  | 1670 | am_maintainer_other[ make rules and dependencies not useful | 
|  | 1671 | (and sometimes confusing) to the casual installer])], | 
|  | 1672 | [USE_MAINTAINER_MODE=$enableval], | 
|  | 1673 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) | 
|  | 1674 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | 
|  | 1675 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) | 
|  | 1676 | MAINT=$MAINTAINER_MODE_TRUE | 
|  | 1677 | AC_SUBST([MAINT])dnl | 
|  | 1678 | ] | 
|  | 1679 | ) | 
|  | 1680 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1681 | # Check to see how 'make' treats includes.	            -*- Autoconf -*- | 
|  | 1682 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1683 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1684 | # | 
|  | 1685 | # This file is free software; the Free Software Foundation | 
|  | 1686 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1687 | # with or without modifications, as long as this notice is preserved. | 
|  | 1688 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1689 | # AM_MAKE_INCLUDE() | 
|  | 1690 | # ----------------- | 
|  | 1691 | # Check to see how make treats includes. | 
|  | 1692 | AC_DEFUN([AM_MAKE_INCLUDE], | 
|  | 1693 | [am_make=${MAKE-make} | 
|  | 1694 | cat > confinc << 'END' | 
|  | 1695 | am__doit: | 
|  | 1696 | @echo this is the am__doit target | 
|  | 1697 | .PHONY: am__doit | 
|  | 1698 | END | 
|  | 1699 | # If we don't find an include directive, just comment out the code. | 
|  | 1700 | AC_MSG_CHECKING([for style of include used by $am_make]) | 
|  | 1701 | am__include="#" | 
|  | 1702 | am__quote= | 
|  | 1703 | _am_result=none | 
|  | 1704 | # First try GNU make style include. | 
|  | 1705 | echo "include confinc" > confmf | 
|  | 1706 | # Ignore all kinds of additional output from 'make'. | 
|  | 1707 | case `$am_make -s -f confmf 2> /dev/null` in #( | 
|  | 1708 | *the\ am__doit\ target*) | 
|  | 1709 | am__include=include | 
|  | 1710 | am__quote= | 
|  | 1711 | _am_result=GNU | 
|  | 1712 | ;; | 
|  | 1713 | esac | 
|  | 1714 | # Now try BSD make style include. | 
|  | 1715 | if test "$am__include" = "#"; then | 
|  | 1716 | echo '.include "confinc"' > confmf | 
|  | 1717 | case `$am_make -s -f confmf 2> /dev/null` in #( | 
|  | 1718 | *the\ am__doit\ target*) | 
|  | 1719 | am__include=.include | 
|  | 1720 | am__quote="\"" | 
|  | 1721 | _am_result=BSD | 
|  | 1722 | ;; | 
|  | 1723 | esac | 
|  | 1724 | fi | 
|  | 1725 | AC_SUBST([am__include]) | 
|  | 1726 | AC_SUBST([am__quote]) | 
|  | 1727 | AC_MSG_RESULT([$_am_result]) | 
|  | 1728 | rm -f confinc confmf | 
|  | 1729 | ]) | 
|  | 1730 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1731 | # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*- | 
|  | 1732 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1733 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1734 | # | 
|  | 1735 | # This file is free software; the Free Software Foundation | 
|  | 1736 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1737 | # with or without modifications, as long as this notice is preserved. | 
|  | 1738 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1739 | # AM_MISSING_PROG(NAME, PROGRAM) | 
|  | 1740 | # ------------------------------ | 
|  | 1741 | AC_DEFUN([AM_MISSING_PROG], | 
|  | 1742 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | 
|  | 1743 | $1=${$1-"${am_missing_run}$2"} | 
|  | 1744 | AC_SUBST($1)]) | 
|  | 1745 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1746 | # AM_MISSING_HAS_RUN | 
|  | 1747 | # ------------------ | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1748 | # Define MISSING if not defined so far and test if it is modern enough. | 
|  | 1749 | # If it is, set am_missing_run to use it, otherwise, to nothing. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1750 | AC_DEFUN([AM_MISSING_HAS_RUN], | 
|  | 1751 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 
|  | 1752 | AC_REQUIRE_AUX_FILE([missing])dnl | 
|  | 1753 | if test x"${MISSING+set}" != xset; then | 
|  | 1754 | case $am_aux_dir in | 
|  | 1755 | *\ * | *\	*) | 
|  | 1756 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | 
|  | 1757 | *) | 
|  | 1758 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | 
|  | 1759 | esac | 
|  | 1760 | fi | 
|  | 1761 | # Use eval to expand $SHELL | 
| cristy | 58d34aa | 2013-01-24 15:11:54 +0000 | [diff] [blame] | 1762 | if eval "$MISSING --is-lightweight"; then | 
|  | 1763 | am_missing_run="$MISSING " | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1764 | else | 
|  | 1765 | am_missing_run= | 
|  | 1766 | AC_MSG_WARN(['missing' script is too old or missing]) | 
|  | 1767 | fi | 
|  | 1768 | ]) | 
|  | 1769 |  | 
|  | 1770 | # Helper functions for option handling.                     -*- Autoconf -*- | 
|  | 1771 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1772 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1773 | # | 
|  | 1774 | # This file is free software; the Free Software Foundation | 
|  | 1775 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1776 | # with or without modifications, as long as this notice is preserved. | 
|  | 1777 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1778 | # _AM_MANGLE_OPTION(NAME) | 
|  | 1779 | # ----------------------- | 
|  | 1780 | AC_DEFUN([_AM_MANGLE_OPTION], | 
|  | 1781 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | 
|  | 1782 |  | 
|  | 1783 | # _AM_SET_OPTION(NAME) | 
|  | 1784 | # -------------------- | 
|  | 1785 | # Set option NAME.  Presently that only means defining a flag for this option. | 
|  | 1786 | AC_DEFUN([_AM_SET_OPTION], | 
|  | 1787 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) | 
|  | 1788 |  | 
|  | 1789 | # _AM_SET_OPTIONS(OPTIONS) | 
|  | 1790 | # ------------------------ | 
|  | 1791 | # OPTIONS is a space-separated list of Automake options. | 
|  | 1792 | AC_DEFUN([_AM_SET_OPTIONS], | 
|  | 1793 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | 
|  | 1794 |  | 
|  | 1795 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | 
|  | 1796 | # ------------------------------------------- | 
|  | 1797 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | 
|  | 1798 | AC_DEFUN([_AM_IF_OPTION], | 
|  | 1799 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | 
|  | 1800 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1801 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 
| cristy | a5bda01 | 2013-11-03 18:05:38 +0000 | [diff] [blame] | 1802 | # | 
|  | 1803 | # This file is free software; the Free Software Foundation | 
|  | 1804 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1805 | # with or without modifications, as long as this notice is preserved. | 
|  | 1806 |  | 
|  | 1807 | # _AM_PROG_CC_C_O | 
|  | 1808 | # --------------- | 
|  | 1809 | # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC | 
|  | 1810 | # to automatically call this. | 
|  | 1811 | AC_DEFUN([_AM_PROG_CC_C_O], | 
|  | 1812 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 
|  | 1813 | AC_REQUIRE_AUX_FILE([compile])dnl | 
|  | 1814 | AC_LANG_PUSH([C])dnl | 
|  | 1815 | AC_CACHE_CHECK( | 
|  | 1816 | [whether $CC understands -c and -o together], | 
|  | 1817 | [am_cv_prog_cc_c_o], | 
|  | 1818 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | 
|  | 1819 | # Make sure it works both with $CC and with simple cc. | 
|  | 1820 | # Following AC_PROG_CC_C_O, we do the test twice because some | 
|  | 1821 | # compilers refuse to overwrite an existing .o file with -o, | 
|  | 1822 | # though they will create one. | 
|  | 1823 | am_cv_prog_cc_c_o=yes | 
|  | 1824 | for am_i in 1 2; do | 
|  | 1825 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | 
|  | 1826 | && test -f conftest2.$ac_objext; then | 
|  | 1827 | : OK | 
|  | 1828 | else | 
|  | 1829 | am_cv_prog_cc_c_o=no | 
|  | 1830 | break | 
|  | 1831 | fi | 
|  | 1832 | done | 
|  | 1833 | rm -f core conftest* | 
|  | 1834 | unset am_i]) | 
|  | 1835 | if test "$am_cv_prog_cc_c_o" != yes; then | 
|  | 1836 | # Losing compiler, so override with the script. | 
|  | 1837 | # FIXME: It is wrong to rewrite CC. | 
|  | 1838 | # But if we don't then we get into trouble of one sort or another. | 
|  | 1839 | # A longer-term fix would be to have automake use am__CC in this case, | 
|  | 1840 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | 
|  | 1841 | CC="$am_aux_dir/compile $CC" | 
|  | 1842 | fi | 
|  | 1843 | AC_LANG_POP([C])]) | 
|  | 1844 |  | 
|  | 1845 | # For backward compatibility. | 
|  | 1846 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | 
|  | 1847 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1848 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | a5bda01 | 2013-11-03 18:05:38 +0000 | [diff] [blame] | 1849 | # | 
|  | 1850 | # This file is free software; the Free Software Foundation | 
|  | 1851 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1852 | # with or without modifications, as long as this notice is preserved. | 
|  | 1853 |  | 
|  | 1854 | # AM_RUN_LOG(COMMAND) | 
|  | 1855 | # ------------------- | 
|  | 1856 | # Run COMMAND, save the exit status in ac_status, and log it. | 
|  | 1857 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | 
|  | 1858 | AC_DEFUN([AM_RUN_LOG], | 
|  | 1859 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | 
|  | 1860 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | 
|  | 1861 | ac_status=$? | 
|  | 1862 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | 
|  | 1863 | (exit $ac_status); }]) | 
|  | 1864 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1865 | # Check to make sure that the build environment is sane.    -*- Autoconf -*- | 
|  | 1866 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1867 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1868 | # | 
|  | 1869 | # This file is free software; the Free Software Foundation | 
|  | 1870 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1871 | # with or without modifications, as long as this notice is preserved. | 
|  | 1872 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1873 | # AM_SANITY_CHECK | 
|  | 1874 | # --------------- | 
|  | 1875 | AC_DEFUN([AM_SANITY_CHECK], | 
|  | 1876 | [AC_MSG_CHECKING([whether build environment is sane]) | 
|  | 1877 | # Reject unsafe characters in $srcdir or the absolute working directory | 
|  | 1878 | # name.  Accept space and tab only in the latter. | 
|  | 1879 | am_lf=' | 
|  | 1880 | ' | 
|  | 1881 | case `pwd` in | 
|  | 1882 | *[[\\\"\#\$\&\'\`$am_lf]]*) | 
|  | 1883 | AC_MSG_ERROR([unsafe absolute working directory name]);; | 
|  | 1884 | esac | 
|  | 1885 | case $srcdir in | 
|  | 1886 | *[[\\\"\#\$\&\'\`$am_lf\ \	]]*) | 
|  | 1887 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; | 
|  | 1888 | esac | 
|  | 1889 |  | 
|  | 1890 | # Do 'set' in a subshell so we don't clobber the current shell's | 
|  | 1891 | # arguments.  Must try -L first in case configure is actually a | 
|  | 1892 | # symlink; some systems play weird games with the mod time of symlinks | 
|  | 1893 | # (eg FreeBSD returns the mod time of the symlink's containing | 
|  | 1894 | # directory). | 
|  | 1895 | if ( | 
|  | 1896 | am_has_slept=no | 
|  | 1897 | for am_try in 1 2; do | 
|  | 1898 | echo "timestamp, slept: $am_has_slept" > conftest.file | 
|  | 1899 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | 
|  | 1900 | if test "$[*]" = "X"; then | 
|  | 1901 | # -L didn't work. | 
|  | 1902 | set X `ls -t "$srcdir/configure" conftest.file` | 
|  | 1903 | fi | 
|  | 1904 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | 
|  | 1905 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | 
|  | 1906 |  | 
|  | 1907 | # If neither matched, then we have a broken ls.  This can happen | 
|  | 1908 | # if, for instance, CONFIG_SHELL is bash and it inherits a | 
|  | 1909 | # broken ls alias from the environment.  This has actually | 
|  | 1910 | # happened.  Such a system could not be considered "sane". | 
|  | 1911 | AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken | 
|  | 1912 | alias in your environment]) | 
|  | 1913 | fi | 
|  | 1914 | if test "$[2]" = conftest.file || test $am_try -eq 2; then | 
|  | 1915 | break | 
|  | 1916 | fi | 
|  | 1917 | # Just in case. | 
|  | 1918 | sleep 1 | 
|  | 1919 | am_has_slept=yes | 
|  | 1920 | done | 
|  | 1921 | test "$[2]" = conftest.file | 
|  | 1922 | ) | 
|  | 1923 | then | 
|  | 1924 | # Ok. | 
|  | 1925 | : | 
|  | 1926 | else | 
|  | 1927 | AC_MSG_ERROR([newly created file is older than distributed files! | 
|  | 1928 | Check your system clock]) | 
|  | 1929 | fi | 
|  | 1930 | AC_MSG_RESULT([yes]) | 
|  | 1931 | # If we didn't sleep, we still need to ensure time stamps of config.status and | 
|  | 1932 | # generated files are strictly newer. | 
|  | 1933 | am_sleep_pid= | 
|  | 1934 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | 
|  | 1935 | ( sleep 1 ) & | 
|  | 1936 | am_sleep_pid=$! | 
|  | 1937 | fi | 
|  | 1938 | AC_CONFIG_COMMANDS_PRE( | 
|  | 1939 | [AC_MSG_CHECKING([that generated files are newer than configure]) | 
|  | 1940 | if test -n "$am_sleep_pid"; then | 
|  | 1941 | # Hide warnings about reused PIDs. | 
|  | 1942 | wait $am_sleep_pid 2>/dev/null | 
|  | 1943 | fi | 
|  | 1944 | AC_MSG_RESULT([done])]) | 
|  | 1945 | rm -f conftest.file | 
|  | 1946 | ]) | 
|  | 1947 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 1948 | # Copyright (C) 2009-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1949 | # | 
|  | 1950 | # This file is free software; the Free Software Foundation | 
|  | 1951 | # gives unlimited permission to copy and/or distribute it, | 
|  | 1952 | # with or without modifications, as long as this notice is preserved. | 
|  | 1953 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 1954 | # AM_SILENT_RULES([DEFAULT]) | 
|  | 1955 | # -------------------------- | 
|  | 1956 | # Enable less verbose build rules; with the default set to DEFAULT | 
|  | 1957 | # ("yes" being less verbose, "no" or empty being verbose). | 
|  | 1958 | AC_DEFUN([AM_SILENT_RULES], | 
|  | 1959 | [AC_ARG_ENABLE([silent-rules], [dnl | 
|  | 1960 | AS_HELP_STRING( | 
|  | 1961 | [--enable-silent-rules], | 
|  | 1962 | [less verbose build output (undo: "make V=1")]) | 
|  | 1963 | AS_HELP_STRING( | 
|  | 1964 | [--disable-silent-rules], | 
|  | 1965 | [verbose build output (undo: "make V=0")])dnl | 
|  | 1966 | ]) | 
|  | 1967 | case $enable_silent_rules in @%:@ ((( | 
|  | 1968 | yes) AM_DEFAULT_VERBOSITY=0;; | 
|  | 1969 | no) AM_DEFAULT_VERBOSITY=1;; | 
|  | 1970 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | 
|  | 1971 | esac | 
|  | 1972 | dnl | 
|  | 1973 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | 
|  | 1974 | dnl do not support nested variable expansions. | 
|  | 1975 | dnl See automake bug#9928 and bug#10237. | 
|  | 1976 | am_make=${MAKE-make} | 
|  | 1977 | AC_CACHE_CHECK([whether $am_make supports nested variables], | 
|  | 1978 | [am_cv_make_support_nested_variables], | 
|  | 1979 | [if AS_ECHO([['TRUE=$(BAR$(V)) | 
|  | 1980 | BAR0=false | 
|  | 1981 | BAR1=true | 
|  | 1982 | V=1 | 
|  | 1983 | am__doit: | 
|  | 1984 | @$(TRUE) | 
|  | 1985 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | 
|  | 1986 | am_cv_make_support_nested_variables=yes | 
|  | 1987 | else | 
|  | 1988 | am_cv_make_support_nested_variables=no | 
|  | 1989 | fi]) | 
|  | 1990 | if test $am_cv_make_support_nested_variables = yes; then | 
|  | 1991 | dnl Using '$V' instead of '$(V)' breaks IRIX make. | 
|  | 1992 | AM_V='$(V)' | 
|  | 1993 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | 
|  | 1994 | else | 
|  | 1995 | AM_V=$AM_DEFAULT_VERBOSITY | 
|  | 1996 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | 
|  | 1997 | fi | 
|  | 1998 | AC_SUBST([AM_V])dnl | 
|  | 1999 | AM_SUBST_NOTMAKE([AM_V])dnl | 
|  | 2000 | AC_SUBST([AM_DEFAULT_V])dnl | 
|  | 2001 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | 
|  | 2002 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | 
|  | 2003 | AM_BACKSLASH='\' | 
|  | 2004 | AC_SUBST([AM_BACKSLASH])dnl | 
|  | 2005 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | 
|  | 2006 | ]) | 
|  | 2007 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 2008 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2009 | # | 
|  | 2010 | # This file is free software; the Free Software Foundation | 
|  | 2011 | # gives unlimited permission to copy and/or distribute it, | 
|  | 2012 | # with or without modifications, as long as this notice is preserved. | 
|  | 2013 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2014 | # AM_PROG_INSTALL_STRIP | 
|  | 2015 | # --------------------- | 
|  | 2016 | # One issue with vendor 'install' (even GNU) is that you can't | 
|  | 2017 | # specify the program used to strip binaries.  This is especially | 
|  | 2018 | # annoying in cross-compiling environments, where the build's strip | 
|  | 2019 | # is unlikely to handle the host's binaries. | 
|  | 2020 | # Fortunately install-sh will honor a STRIPPROG variable, so we | 
|  | 2021 | # always use install-sh in "make install-strip", and initialize | 
|  | 2022 | # STRIPPROG with the value of the STRIP variable (set by the user). | 
|  | 2023 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | 
|  | 2024 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | 
|  | 2025 | # Installed binaries are usually stripped using 'strip' when the user | 
|  | 2026 | # run "make install-strip".  However 'strip' might not be the right | 
|  | 2027 | # tool to use in cross-compilation environments, therefore Automake | 
|  | 2028 | # will honor the 'STRIP' environment variable to overrule this program. | 
|  | 2029 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. | 
|  | 2030 | if test "$cross_compiling" != no; then | 
|  | 2031 | AC_CHECK_TOOL([STRIP], [strip], :) | 
|  | 2032 | fi | 
|  | 2033 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | 
|  | 2034 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | 
|  | 2035 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 2036 | # Copyright (C) 2006-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2037 | # | 
|  | 2038 | # This file is free software; the Free Software Foundation | 
|  | 2039 | # gives unlimited permission to copy and/or distribute it, | 
|  | 2040 | # with or without modifications, as long as this notice is preserved. | 
|  | 2041 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2042 | # _AM_SUBST_NOTMAKE(VARIABLE) | 
|  | 2043 | # --------------------------- | 
|  | 2044 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | 
|  | 2045 | # This macro is traced by Automake. | 
|  | 2046 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | 
|  | 2047 |  | 
|  | 2048 | # AM_SUBST_NOTMAKE(VARIABLE) | 
|  | 2049 | # -------------------------- | 
|  | 2050 | # Public sister of _AM_SUBST_NOTMAKE. | 
|  | 2051 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | 
|  | 2052 |  | 
|  | 2053 | # Check how to create a tarball.                            -*- Autoconf -*- | 
|  | 2054 |  | 
| cristy | ead532a | 2015-06-05 00:49:30 +0000 | [diff] [blame] | 2055 | # Copyright (C) 2004-2014 Free Software Foundation, Inc. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2056 | # | 
|  | 2057 | # This file is free software; the Free Software Foundation | 
|  | 2058 | # gives unlimited permission to copy and/or distribute it, | 
|  | 2059 | # with or without modifications, as long as this notice is preserved. | 
|  | 2060 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2061 | # _AM_PROG_TAR(FORMAT) | 
|  | 2062 | # -------------------- | 
|  | 2063 | # Check how to create a tarball in format FORMAT. | 
|  | 2064 | # FORMAT should be one of 'v7', 'ustar', or 'pax'. | 
|  | 2065 | # | 
|  | 2066 | # Substitute a variable $(am__tar) that is a command | 
|  | 2067 | # writing to stdout a FORMAT-tarball containing the directory | 
|  | 2068 | # $tardir. | 
|  | 2069 | #     tardir=directory && $(am__tar) > result.tar | 
|  | 2070 | # | 
|  | 2071 | # Substitute a variable $(am__untar) that extract such | 
|  | 2072 | # a tarball read from stdin. | 
|  | 2073 | #     $(am__untar) < result.tar | 
| cristy | e69bdbe | 2013-05-03 21:40:44 +0000 | [diff] [blame] | 2074 | # | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2075 | AC_DEFUN([_AM_PROG_TAR], | 
|  | 2076 | [# Always define AMTAR for backward compatibility.  Yes, it's still used | 
|  | 2077 | # in the wild :-(  We should find a proper way to deprecate it ... | 
|  | 2078 | AC_SUBST([AMTAR], ['$${TAR-tar}']) | 
| cristy | e69bdbe | 2013-05-03 21:40:44 +0000 | [diff] [blame] | 2079 |  | 
|  | 2080 | # We'll loop over all known methods to create a tar archive until one works. | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2081 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2082 |  | 
| cristy | e69bdbe | 2013-05-03 21:40:44 +0000 | [diff] [blame] | 2083 | m4_if([$1], [v7], | 
|  | 2084 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2085 |  | 
| cristy | e69bdbe | 2013-05-03 21:40:44 +0000 | [diff] [blame] | 2086 | [m4_case([$1], | 
|  | 2087 | [ustar], | 
|  | 2088 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields. | 
|  | 2089 | # There is notably a 21 bits limit for the UID and the GID.  In fact, | 
|  | 2090 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 | 
|  | 2091 | # and bug#13588). | 
|  | 2092 | am_max_uid=2097151 # 2^21 - 1 | 
|  | 2093 | am_max_gid=$am_max_uid | 
|  | 2094 | # The $UID and $GID variables are not portable, so we need to resort | 
|  | 2095 | # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls | 
|  | 2096 | # below are definitely unexpected, so allow the users to see them | 
|  | 2097 | # (that is, avoid stderr redirection). | 
|  | 2098 | am_uid=`id -u || echo unknown` | 
|  | 2099 | am_gid=`id -g || echo unknown` | 
|  | 2100 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) | 
|  | 2101 | if test $am_uid -le $am_max_uid; then | 
|  | 2102 | AC_MSG_RESULT([yes]) | 
|  | 2103 | else | 
|  | 2104 | AC_MSG_RESULT([no]) | 
|  | 2105 | _am_tools=none | 
|  | 2106 | fi | 
|  | 2107 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) | 
|  | 2108 | if test $am_gid -le $am_max_gid; then | 
|  | 2109 | AC_MSG_RESULT([yes]) | 
|  | 2110 | else | 
|  | 2111 | AC_MSG_RESULT([no]) | 
|  | 2112 | _am_tools=none | 
|  | 2113 | fi], | 
|  | 2114 |  | 
|  | 2115 | [pax], | 
|  | 2116 | [], | 
|  | 2117 |  | 
|  | 2118 | [m4_fatal([Unknown tar format])]) | 
|  | 2119 |  | 
|  | 2120 | AC_MSG_CHECKING([how to create a $1 tar archive]) | 
|  | 2121 |  | 
|  | 2122 | # Go ahead even if we have the value already cached.  We do so because we | 
|  | 2123 | # need to set the values for the 'am__tar' and 'am__untar' variables. | 
|  | 2124 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | 
|  | 2125 |  | 
|  | 2126 | for _am_tool in $_am_tools; do | 
|  | 2127 | case $_am_tool in | 
|  | 2128 | gnutar) | 
|  | 2129 | for _am_tar in tar gnutar gtar; do | 
|  | 2130 | AM_RUN_LOG([$_am_tar --version]) && break | 
|  | 2131 | done | 
|  | 2132 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | 
|  | 2133 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | 
|  | 2134 | am__untar="$_am_tar -xf -" | 
|  | 2135 | ;; | 
|  | 2136 | plaintar) | 
|  | 2137 | # Must skip GNU tar: if it does not support --format= it doesn't create | 
|  | 2138 | # ustar tarball either. | 
|  | 2139 | (tar --version) >/dev/null 2>&1 && continue | 
|  | 2140 | am__tar='tar chf - "$$tardir"' | 
|  | 2141 | am__tar_='tar chf - "$tardir"' | 
|  | 2142 | am__untar='tar xf -' | 
|  | 2143 | ;; | 
|  | 2144 | pax) | 
|  | 2145 | am__tar='pax -L -x $1 -w "$$tardir"' | 
|  | 2146 | am__tar_='pax -L -x $1 -w "$tardir"' | 
|  | 2147 | am__untar='pax -r' | 
|  | 2148 | ;; | 
|  | 2149 | cpio) | 
|  | 2150 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | 
|  | 2151 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | 
|  | 2152 | am__untar='cpio -i -H $1 -d' | 
|  | 2153 | ;; | 
|  | 2154 | none) | 
|  | 2155 | am__tar=false | 
|  | 2156 | am__tar_=false | 
|  | 2157 | am__untar=false | 
|  | 2158 | ;; | 
|  | 2159 | esac | 
|  | 2160 |  | 
|  | 2161 | # If the value was cached, stop now.  We just wanted to have am__tar | 
|  | 2162 | # and am__untar set. | 
|  | 2163 | test -n "${am_cv_prog_tar_$1}" && break | 
|  | 2164 |  | 
|  | 2165 | # tar/untar a dummy directory, and stop if the command works. | 
|  | 2166 | rm -rf conftest.dir | 
|  | 2167 | mkdir conftest.dir | 
|  | 2168 | echo GrepMe > conftest.dir/file | 
|  | 2169 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | 
|  | 2170 | rm -rf conftest.dir | 
|  | 2171 | if test -s conftest.tar; then | 
|  | 2172 | AM_RUN_LOG([$am__untar <conftest.tar]) | 
|  | 2173 | AM_RUN_LOG([cat conftest.dir/file]) | 
|  | 2174 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | 
|  | 2175 | fi | 
|  | 2176 | done | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2177 | rm -rf conftest.dir | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2178 |  | 
| cristy | e69bdbe | 2013-05-03 21:40:44 +0000 | [diff] [blame] | 2179 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | 
|  | 2180 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | 
| cristy | bced814 | 2013-05-31 01:23:57 +0000 | [diff] [blame] | 2181 |  | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2182 | AC_SUBST([am__tar]) | 
|  | 2183 | AC_SUBST([am__untar]) | 
|  | 2184 | ]) # _AM_PROG_TAR | 
|  | 2185 |  | 
|  | 2186 | m4_include([m4/ac_func_fseeko.m4]) | 
| cristy | 17491be | 2014-06-24 01:10:53 +0000 | [diff] [blame] | 2187 | m4_include([m4/ax_append_flag.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2188 | m4_include([m4/ax_c___attribute__.m4]) | 
|  | 2189 | m4_include([m4/ax_cflags_warn_all.m4]) | 
| cristy | a045997 | 2013-11-03 18:09:35 +0000 | [diff] [blame] | 2190 | m4_include([m4/ax_check_compile_flag.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2191 | m4_include([m4/ax_compare_version.m4]) | 
| cristy | 016e8b8 | 2012-12-26 12:11:06 +0000 | [diff] [blame] | 2192 | m4_include([m4/ax_compiler_vendor.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2193 | m4_include([m4/ax_cxx_bool.m4]) | 
|  | 2194 | m4_include([m4/ax_cxx_namespace_std.m4]) | 
|  | 2195 | m4_include([m4/ax_cxx_namespaces.m4]) | 
| cristy | a045997 | 2013-11-03 18:09:35 +0000 | [diff] [blame] | 2196 | m4_include([m4/ax_gcc_archflag.m4]) | 
|  | 2197 | m4_include([m4/ax_gcc_x86_cpuid.m4]) | 
| cristy | 75314cc | 2012-09-15 23:08:29 +0000 | [diff] [blame] | 2198 | m4_include([m4/ax_lang_compiler_ms.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2199 | m4_include([m4/ax_opencl.m4]) | 
|  | 2200 | m4_include([m4/ax_prefix_config_h.m4]) | 
|  | 2201 | m4_include([m4/ax_prog_perl_version.m4]) | 
|  | 2202 | m4_include([m4/ax_pthread.m4]) | 
| cristy | 17491be | 2014-06-24 01:10:53 +0000 | [diff] [blame] | 2203 | m4_include([m4/ax_require_defined.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2204 | m4_include([m4/cxx_have_std_libs.m4]) | 
|  | 2205 | m4_include([m4/framework.m4]) | 
| cristy | 9b86f20 | 2012-11-28 21:55:35 +0000 | [diff] [blame] | 2206 | m4_include([m4/ld-version-script.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2207 | m4_include([m4/libtool.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2208 | m4_include([m4/ltoptions.m4]) | 
|  | 2209 | m4_include([m4/ltsugar.m4]) | 
|  | 2210 | m4_include([m4/ltversion.m4]) | 
|  | 2211 | m4_include([m4/lt~obsolete.m4]) | 
| cristy | 854a7b3 | 2012-09-04 17:30:26 +0000 | [diff] [blame] | 2212 | m4_include([m4/pkg.m4]) |