blob: fd0bbfe7cc62fb0b959360407d0e67df73927a2c [file] [log] [blame]
cristyead532a2015-06-05 00:49:30 +00001# generated automatically by aclocal 1.15 -*- Autoconf -*-
cristy854a7b32012-09-04 17:30:26 +00002
cristyead532a2015-06-05 00:49:30 +00003# Copyright (C) 1996-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00004
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
cristy58d34aa2013-01-24 15:11:54 +000014m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
cristy854a7b32012-09-04 17:30:26 +000015m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
Cristy6720ed72016-02-09 09:27:35 -050023# ===========================================================================
24# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
25# ===========================================================================
26#
27# SYNOPSIS
28#
Cristy1971efd2016-03-31 07:25:49 -040029# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
Cristy6720ed72016-02-09 09:27:35 -050030#
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#
Cristy1971efd2016-03-31 07:25:49 -040045# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
46#
Cristy6720ed72016-02-09 09:27:35 -050047# 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
66# with this program. If not, see <http://www.gnu.org/licenses/>.
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
Cristy1971efd2016-03-31 07:25:49 -040081#serial 5
Cristy6720ed72016-02-09 09:27:35 -050082
83AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
84[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
85AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
86for flag in $1; do
Cristy1971efd2016-03-31 07:25:49 -040087 AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
Cristy6720ed72016-02-09 09:27:35 -050088done
89])dnl AX_APPEND_COMPILE_FLAGS
90
91# ===========================================================================
92# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
93# ===========================================================================
94#
95# SYNOPSIS
96#
Cristy1971efd2016-03-31 07:25:49 -040097# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
Cristy6720ed72016-02-09 09:27:35 -050098#
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#
Cristy1971efd2016-03-31 07:25:49 -0400112# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
113#
Cristy6720ed72016-02-09 09:27:35 -0500114# 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
132# with this program. If not, see <http://www.gnu.org/licenses/>.
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
Cristy1971efd2016-03-31 07:25:49 -0400147#serial 5
Cristy6720ed72016-02-09 09:27:35 -0500148
149AC_DEFUN([AX_APPEND_LINK_FLAGS],
150[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
151AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
152for flag in $1; do
Cristy1971efd2016-03-31 07:25:49 -0400153 AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
Cristy6720ed72016-02-09 09:27:35 -0500154done
155])dnl AX_APPEND_LINK_FLAGS
156
157# ===========================================================================
158# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
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
199# with this program. If not, see <http://www.gnu.org/licenses/>.
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
214#serial 4
215
216AC_DEFUN([AX_CHECK_LINK_FLAG],
217[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
218AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
219AC_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])
226AS_VAR_IF(CACHEVAR,yes,
227 [m4_default([$2], :)],
228 [m4_default([$3], :)])
229AS_VAR_POPDEF([CACHEVAR])dnl
230])dnl AX_CHECK_LINK_FLAGS
231
232# ===========================================================================
233# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
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
335#serial 13
336
337# _AX_COMPILER_FLAGS_LANG([LANGNAME])
338m4_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
344AC_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
391# ============================================================================
392# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html
393# ============================================================================
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
418#serial 11
419
420AC_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
427 m4_define(ax_warn_cflags_variable,
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
443 # Base flags
444 AX_APPEND_COMPILE_FLAGS([ dnl
445 -fno-strict-aliasing dnl
446 $3 dnl
447 ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
448
449 AS_IF([test "$ax_enable_compile_warnings" != "no"],[
450 # "yes" flags
451 AX_APPEND_COMPILE_FLAGS([ dnl
452 -Wall dnl
453 -Wextra dnl
454 -Wundef dnl
455 -Wnested-externs dnl
456 -Wwrite-strings dnl
457 -Wpointer-arith dnl
458 -Wmissing-declarations dnl
459 -Wmissing-prototypes dnl
460 -Wstrict-prototypes dnl
461 -Wredundant-decls dnl
462 -Wno-unused-parameter dnl
463 -Wno-missing-field-initializers dnl
464 -Wdeclaration-after-statement dnl
465 -Wformat=2 dnl
466 -Wold-style-definition dnl
467 -Wcast-align dnl
468 -Wformat-nonliteral dnl
469 -Wformat-security dnl
470 -Wsign-compare dnl
471 -Wstrict-aliasing dnl
472 -Wshadow dnl
473 -Winline dnl
474 -Wpacked dnl
475 -Wmissing-format-attribute dnl
476 -Wmissing-noreturn dnl
477 -Winit-self dnl
478 -Wredundant-decls dnl
479 -Wmissing-include-dirs dnl
480 -Wunused-but-set-variable dnl
481 -Warray-bounds dnl
482 -Wimplicit-function-declaration dnl
483 -Wreturn-type dnl
484 -Wswitch-enum dnl
485 -Wswitch-default dnl
486 $4 dnl
487 $5 dnl
488 $6 dnl
489 $7 dnl
490 ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
491 ])
492 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
493 # "error" flags; -Werror has to be appended unconditionally because
494 # it's not possible to test for
495 #
496 # suggest-attribute=format is disabled because it gives too many false
497 # positives
498 AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
499
500 AX_APPEND_COMPILE_FLAGS([ dnl
501 -Wno-suggest-attribute=format dnl
502 ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
503 ])
504
505 # In the flags below, when disabling specific flags, always add *both*
506 # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example)
507 # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall,
508 # which effectively turns that flag back on again as an error.
509 for flag in $ax_warn_cflags_variable; do
510 AS_CASE([$flag],
511 [-Wno-*=*],[],
512 [-Wno-*],[
513 AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')],
514 ax_warn_cflags_variable,
515 [$ax_compiler_flags_test])
516 ])
517 done
518
519 AC_LANG_POP([C])
520
521 # Substitute the variables
522 AC_SUBST(ax_warn_cflags_variable)
523])dnl AX_COMPILER_FLAGS
524
525# ==============================================================================
526# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html
527# ==============================================================================
528#
529# SYNOPSIS
530#
531# AX_COMPILER_FLAGS_CXXFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
532#
533# DESCRIPTION
534#
535# Add warning flags for the C++ compiler to VARIABLE, which defaults to
536# WARN_CXXFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be
537# manually added to the CXXFLAGS variable for each target in the code
538# base.
539#
540# This macro depends on the environment set up by AX_COMPILER_FLAGS.
541# Specifically, it uses the value of $ax_enable_compile_warnings to decide
542# which flags to enable.
543#
544# LICENSE
545#
546# Copyright (c) 2015 David King <amigadave@amigadave.com>
547#
548# Copying and distribution of this file, with or without modification, are
549# permitted in any medium without royalty provided the copyright notice
550# and this notice are preserved. This file is offered as-is, without any
551# warranty.
552
553#serial 7
554
555AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[
556 AC_REQUIRE([AC_PROG_SED])
557 AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS])
558 AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
559 AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
560
561 # Variable names
562 m4_define(ax_warn_cxxflags_variable,
563 [m4_normalize(ifelse([$1],,[WARN_CXXFLAGS],[$1]))])
564
565 AC_LANG_PUSH([C++])
566
567 # Always pass -Werror=unknown-warning-option to get Clang to fail on bad
568 # flags, otherwise they are always appended to the warn_cxxflags variable,
569 # and Clang warns on them for every compilation unit.
570 # If this is passed to GCC, it will explode, so the flag must be enabled
571 # conditionally.
572 AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
573 ax_compiler_flags_test="-Werror=unknown-warning-option"
574 ],[
575 ax_compiler_flags_test=""
576 ])
577
578 # Base flags
579 AX_APPEND_COMPILE_FLAGS([ dnl
580 -fno-strict-aliasing dnl
581 $3 dnl
582 ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test])
583
584 AS_IF([test "$ax_enable_compile_warnings" != "no"],[
585 # "yes" flags
586 AX_APPEND_COMPILE_FLAGS([ dnl
587 -Wall dnl
588 -Wextra dnl
589 -Wundef dnl
590 -Wwrite-strings dnl
591 -Wpointer-arith dnl
592 -Wmissing-declarations dnl
593 -Wredundant-decls dnl
594 -Wno-unused-parameter dnl
595 -Wno-missing-field-initializers dnl
596 -Wformat=2 dnl
597 -Wcast-align dnl
598 -Wformat-nonliteral dnl
599 -Wformat-security dnl
600 -Wsign-compare dnl
601 -Wstrict-aliasing dnl
602 -Wshadow dnl
603 -Winline dnl
604 -Wpacked dnl
605 -Wmissing-format-attribute dnl
606 -Wmissing-noreturn dnl
607 -Winit-self dnl
608 -Wredundant-decls dnl
609 -Wmissing-include-dirs dnl
610 -Wunused-but-set-variable dnl
611 -Warray-bounds dnl
612 -Wreturn-type dnl
613 -Wno-overloaded-virtual dnl
614 -Wswitch-enum dnl
615 -Wswitch-default dnl
616 $4 dnl
617 $5 dnl
618 $6 dnl
619 $7 dnl
620 ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test])
621 ])
622 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
623 # "error" flags; -Werror has to be appended unconditionally because
624 # it's not possible to test for
625 #
626 # suggest-attribute=format is disabled because it gives too many false
627 # positives
628 AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable)
629
630 AX_APPEND_COMPILE_FLAGS([ dnl
631 -Wno-suggest-attribute=format dnl
632 ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test])
633 ])
634
635 # In the flags below, when disabling specific flags, always add *both*
636 # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example)
637 # we enable -Werror, disable a flag, and a build bot passes CXXFLAGS=-Wall,
638 # which effectively turns that flag back on again as an error.
639 for flag in $ax_warn_cxxflags_variable; do
640 AS_CASE([$flag],
641 [-Wno-*=*],[],
642 [-Wno-*],[
643 AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')],
644 ax_warn_cxxflags_variable,
645 [$ax_compiler_flags_test])
646 ])
647 done
648
649 AC_LANG_POP([C++])
650
651 # Substitute the variables
652 AC_SUBST(ax_warn_cxxflags_variable)
653])dnl AX_COMPILER_FLAGS_CXXFLAGS
654
655# ===========================================================================
656# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
657# ===========================================================================
658#
659# SYNOPSIS
660#
661# AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
662#
663# DESCRIPTION
664#
665# Add warning flags for the g-ir-scanner (from GObject Introspection) to
666# VARIABLE, which defaults to WARN_SCANNERFLAGS. VARIABLE is AC_SUBST-ed
667# by this macro, but must be manually added to the SCANNERFLAGS variable
668# for each GIR target in the code base.
669#
670# This macro depends on the environment set up by AX_COMPILER_FLAGS.
671# Specifically, it uses the value of $ax_enable_compile_warnings to decide
672# which flags to enable.
673#
674# LICENSE
675#
676# Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
677#
678# Copying and distribution of this file, with or without modification, are
679# permitted in any medium without royalty provided the copyright notice
680# and this notice are preserved. This file is offered as-is, without any
681# warranty.
682
683#serial 4
684
685AC_DEFUN([AX_COMPILER_FLAGS_GIR],[
686 AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
687
688 # Variable names
689 m4_define(ax_warn_scannerflags_variable,
690 [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))])
691
692 # Base flags
693 AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable)
694
695 AS_IF([test "$ax_enable_compile_warnings" != "no"],[
696 # "yes" flags
697 AX_APPEND_FLAG([ dnl
698 --warn-all dnl
699 $4 dnl
700 $5 dnl
701 $6 dnl
702 $7 dnl
703 ],ax_warn_scannerflags_variable)
704 ])
705 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
706 # "error" flags
707 AX_APPEND_FLAG([ dnl
708 --warn-error dnl
709 ],ax_warn_scannerflags_variable)
710 ])
711
712 # Substitute the variables
713 AC_SUBST(ax_warn_scannerflags_variable)
714])dnl AX_COMPILER_FLAGS
715
716# =============================================================================
717# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html
718# =============================================================================
719#
720# SYNOPSIS
721#
722# AX_COMPILER_FLAGS_LDFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
723#
724# DESCRIPTION
725#
726# Add warning flags for the linker to VARIABLE, which defaults to
727# WARN_LDFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be
728# manually added to the LDFLAGS variable for each target in the code base.
729#
730# This macro depends on the environment set up by AX_COMPILER_FLAGS.
731# Specifically, it uses the value of $ax_enable_compile_warnings to decide
732# which flags to enable.
733#
734# LICENSE
735#
736# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
737#
738# Copying and distribution of this file, with or without modification, are
739# permitted in any medium without royalty provided the copyright notice
740# and this notice are preserved. This file is offered as-is, without any
741# warranty.
742
743#serial 5
744
745AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
746 AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS])
747 AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
748 AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
749
750 # Variable names
751 m4_define(ax_warn_ldflags_variable,
752 [m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))])
753
754 # Always pass -Werror=unknown-warning-option to get Clang to fail on bad
755 # flags, otherwise they are always appended to the warn_ldflags variable,
756 # and Clang warns on them for every compilation unit.
757 # If this is passed to GCC, it will explode, so the flag must be enabled
758 # conditionally.
759 AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
760 ax_compiler_flags_test="-Werror=unknown-warning-option"
761 ],[
762 ax_compiler_flags_test=""
763 ])
764
765 # Base flags
766 AX_APPEND_LINK_FLAGS([ dnl
767 -Wl,--no-as-needed dnl
768 $3 dnl
769 ],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
770
771 AS_IF([test "$ax_enable_compile_warnings" != "no"],[
772 # "yes" flags
773 AX_APPEND_LINK_FLAGS([$4 $5 $6 $7],
774 ax_warn_ldflags_variable,
775 [$ax_compiler_flags_test])
776 ])
777 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
778 # "error" flags; -Werror has to be appended unconditionally because
779 # it's not possible to test for
780 #
781 # suggest-attribute=format is disabled because it gives too many false
782 # positives
783 AX_APPEND_LINK_FLAGS([ dnl
784 -Wl,--fatal-warnings dnl
785 ],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
786 ])
787
788 # Substitute the variables
789 AC_SUBST(ax_warn_ldflags_variable)
790])dnl AX_COMPILER_FLAGS
791
cristy5ed9c6e2013-07-14 21:20:31 +0000792# longlong.m4 serial 17
Cristy15f22012015-11-14 17:51:30 -0500793dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc.
cristy5ed9c6e2013-07-14 21:20:31 +0000794dnl This file is free software; the Free Software Foundation
795dnl gives unlimited permission to copy and/or distribute it,
796dnl with or without modifications, as long as this notice is preserved.
797
798dnl From Paul Eggert.
799
800# Define HAVE_LONG_LONG_INT if 'long long int' works.
801# This fixes a bug in Autoconf 2.61, and can be faster
802# than what's in Autoconf 2.62 through 2.68.
803
804# Note: If the type 'long long int' exists but is only 32 bits large
805# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
806# defined. In this case you can treat 'long long int' like 'long int'.
807
808AC_DEFUN([AC_TYPE_LONG_LONG_INT],
809[
810 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
811 AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
812 [ac_cv_type_long_long_int=yes
813 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
814 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
815 if test $ac_cv_type_long_long_int = yes; then
816 dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
817 dnl If cross compiling, assume the bug is not important, since
818 dnl nobody cross compiles for this platform as far as we know.
819 AC_RUN_IFELSE(
820 [AC_LANG_PROGRAM(
821 [[@%:@include <limits.h>
822 @%:@ifndef LLONG_MAX
823 @%:@ define HALF \
824 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
825 @%:@ define LLONG_MAX (HALF - 1 + HALF)
826 @%:@endif]],
827 [[long long int n = 1;
828 int i;
829 for (i = 0; ; i++)
830 {
831 long long int m = n << i;
832 if (m >> i != n)
833 return 1;
834 if (LLONG_MAX / 2 < m)
835 break;
836 }
837 return 0;]])],
838 [],
839 [ac_cv_type_long_long_int=no],
840 [:])
841 fi
842 fi])
843 if test $ac_cv_type_long_long_int = yes; then
844 AC_DEFINE([HAVE_LONG_LONG_INT], [1],
845 [Define to 1 if the system has the type 'long long int'.])
846 fi
847])
848
849# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
850# This fixes a bug in Autoconf 2.61, and can be faster
851# than what's in Autoconf 2.62 through 2.68.
852
853# Note: If the type 'unsigned long long int' exists but is only 32 bits
854# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
855# will not be defined. In this case you can treat 'unsigned long long int'
856# like 'unsigned long int'.
857
858AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
859[
860 AC_CACHE_CHECK([for unsigned long long int],
861 [ac_cv_type_unsigned_long_long_int],
862 [ac_cv_type_unsigned_long_long_int=yes
863 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
864 AC_LINK_IFELSE(
865 [_AC_TYPE_LONG_LONG_SNIPPET],
866 [],
867 [ac_cv_type_unsigned_long_long_int=no])
868 fi])
869 if test $ac_cv_type_unsigned_long_long_int = yes; then
870 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
871 [Define to 1 if the system has the type 'unsigned long long int'.])
872 fi
873])
874
875# Expands to a C program that can be used to test for simultaneous support
876# of 'long long' and 'unsigned long long'. We don't want to say that
877# 'long long' is available if 'unsigned long long' is not, or vice versa,
878# because too many programs rely on the symmetry between signed and unsigned
879# integer types (excluding 'bool').
880AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
881[
882 AC_LANG_PROGRAM(
883 [[/* For now, do not test the preprocessor; as of 2007 there are too many
884 implementations with broken preprocessors. Perhaps this can
885 be revisited in 2012. In the meantime, code should not expect
886 #if to work with literals wider than 32 bits. */
887 /* Test literals. */
888 long long int ll = 9223372036854775807ll;
889 long long int nll = -9223372036854775807LL;
890 unsigned long long int ull = 18446744073709551615ULL;
891 /* Test constant expressions. */
892 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
893 ? 1 : -1)];
894 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
895 ? 1 : -1)];
896 int i = 63;]],
897 [[/* Test availability of runtime routines for shift and division. */
898 long long int llmax = 9223372036854775807ll;
899 unsigned long long int ullmax = 18446744073709551615ull;
900 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
901 | (llmax / ll) | (llmax % ll)
902 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
903 | (ullmax / ull) | (ullmax % ull));]])
904])
905
cristyead532a2015-06-05 00:49:30 +0000906# Copyright (C) 2002-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +0000907#
908# This file is free software; the Free Software Foundation
909# gives unlimited permission to copy and/or distribute it,
910# with or without modifications, as long as this notice is preserved.
911
cristy854a7b32012-09-04 17:30:26 +0000912# AM_AUTOMAKE_VERSION(VERSION)
913# ----------------------------
914# Automake X.Y traces this macro to ensure aclocal.m4 has been
915# generated from the m4 files accompanying Automake X.Y.
916# (This private macro should not be called outside this file.)
917AC_DEFUN([AM_AUTOMAKE_VERSION],
cristyead532a2015-06-05 00:49:30 +0000918[am__api_version='1.15'
cristy854a7b32012-09-04 17:30:26 +0000919dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
920dnl require some minimum version. Point them to the right macro.
cristyead532a2015-06-05 00:49:30 +0000921m4_if([$1], [1.15], [],
cristy854a7b32012-09-04 17:30:26 +0000922 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
923])
924
925# _AM_AUTOCONF_VERSION(VERSION)
926# -----------------------------
927# aclocal traces this macro to find the Autoconf version.
928# This is a private macro too. Using m4_define simplifies
929# the logic in aclocal, which can simply ignore this definition.
930m4_define([_AM_AUTOCONF_VERSION], [])
931
932# AM_SET_CURRENT_AUTOMAKE_VERSION
933# -------------------------------
934# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
935# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
936AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
cristyead532a2015-06-05 00:49:30 +0000937[AM_AUTOMAKE_VERSION([1.15])dnl
cristy854a7b32012-09-04 17:30:26 +0000938m4_ifndef([AC_AUTOCONF_VERSION],
939 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
940_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
941
cristyead532a2015-06-05 00:49:30 +0000942# Copyright (C) 2011-2014 Free Software Foundation, Inc.
cristy9e007fe2015-01-03 16:05:07 +0000943#
944# This file is free software; the Free Software Foundation
945# gives unlimited permission to copy and/or distribute it,
946# with or without modifications, as long as this notice is preserved.
947
948# AM_PROG_AR([ACT-IF-FAIL])
949# -------------------------
950# Try to determine the archiver interface, and trigger the ar-lib wrapper
951# if it is needed. If the detection of archiver interface fails, run
952# ACT-IF-FAIL (default is to abort configure with a proper error message).
953AC_DEFUN([AM_PROG_AR],
954[AC_BEFORE([$0], [LT_INIT])dnl
955AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
956AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
957AC_REQUIRE_AUX_FILE([ar-lib])dnl
958AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
959: ${AR=ar}
960
961AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
962 [AC_LANG_PUSH([C])
963 am_cv_ar_interface=ar
964 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
965 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
966 AC_TRY_EVAL([am_ar_try])
967 if test "$ac_status" -eq 0; then
968 am_cv_ar_interface=ar
969 else
970 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
971 AC_TRY_EVAL([am_ar_try])
972 if test "$ac_status" -eq 0; then
973 am_cv_ar_interface=lib
974 else
975 am_cv_ar_interface=unknown
976 fi
977 fi
978 rm -f conftest.lib libconftest.a
979 ])
980 AC_LANG_POP([C])])
981
982case $am_cv_ar_interface in
983ar)
984 ;;
985lib)
986 # Microsoft lib, so override with the ar-lib wrapper script.
987 # FIXME: It is wrong to rewrite AR.
988 # But if we don't then we get into trouble of one sort or another.
989 # A longer-term fix would be to have automake use am__AR in this case,
990 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
991 # similar.
992 AR="$am_aux_dir/ar-lib $AR"
993 ;;
994unknown)
995 m4_default([$1],
996 [AC_MSG_ERROR([could not determine $AR interface])])
997 ;;
998esac
999AC_SUBST([AR])dnl
1000])
1001
cristy854a7b32012-09-04 17:30:26 +00001002# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1003
cristyead532a2015-06-05 00:49:30 +00001004# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001005#
1006# This file is free software; the Free Software Foundation
1007# gives unlimited permission to copy and/or distribute it,
1008# with or without modifications, as long as this notice is preserved.
1009
cristy854a7b32012-09-04 17:30:26 +00001010# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1011# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1012# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1013#
1014# Of course, Automake must honor this variable whenever it calls a
1015# tool from the auxiliary directory. The problem is that $srcdir (and
1016# therefore $ac_aux_dir as well) can be either absolute or relative,
1017# depending on how configure is run. This is pretty annoying, since
1018# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1019# source directory, any form will work fine, but in subdirectories a
1020# relative path needs to be adjusted first.
1021#
1022# $ac_aux_dir/missing
1023# fails when called from a subdirectory if $ac_aux_dir is relative
1024# $top_srcdir/$ac_aux_dir/missing
1025# fails if $ac_aux_dir is absolute,
1026# fails when called from a subdirectory in a VPATH build with
1027# a relative $ac_aux_dir
1028#
1029# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1030# are both prefixed by $srcdir. In an in-source build this is usually
1031# harmless because $srcdir is '.', but things will broke when you
1032# start a VPATH build or use an absolute $srcdir.
1033#
1034# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1035# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1036# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1037# and then we would define $MISSING as
1038# MISSING="\${SHELL} $am_aux_dir/missing"
1039# This will work as long as MISSING is not called from configure, because
1040# unfortunately $(top_srcdir) has no meaning in configure.
1041# However there are other variables, like CC, which are often used in
1042# configure, and could therefore not use this "fixed" $ac_aux_dir.
1043#
1044# Another solution, used here, is to always expand $ac_aux_dir to an
1045# absolute PATH. The drawback is that using absolute paths prevent a
1046# configured tree to be moved without reconfiguration.
1047
1048AC_DEFUN([AM_AUX_DIR_EXPAND],
cristyead532a2015-06-05 00:49:30 +00001049[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1050# Expand $ac_aux_dir to an absolute path.
1051am_aux_dir=`cd "$ac_aux_dir" && pwd`
cristy854a7b32012-09-04 17:30:26 +00001052])
1053
1054# AM_CONDITIONAL -*- Autoconf -*-
1055
cristyead532a2015-06-05 00:49:30 +00001056# Copyright (C) 1997-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001057#
1058# This file is free software; the Free Software Foundation
1059# gives unlimited permission to copy and/or distribute it,
1060# with or without modifications, as long as this notice is preserved.
1061
cristy854a7b32012-09-04 17:30:26 +00001062# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1063# -------------------------------------
1064# Define a conditional.
1065AC_DEFUN([AM_CONDITIONAL],
1066[AC_PREREQ([2.52])dnl
1067 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1068 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1069AC_SUBST([$1_TRUE])dnl
1070AC_SUBST([$1_FALSE])dnl
1071_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1072_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1073m4_define([_AM_COND_VALUE_$1], [$2])dnl
1074if $2; then
1075 $1_TRUE=
1076 $1_FALSE='#'
1077else
1078 $1_TRUE='#'
1079 $1_FALSE=
1080fi
1081AC_CONFIG_COMMANDS_PRE(
1082[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1083 AC_MSG_ERROR([[conditional "$1" was never defined.
1084Usually this means the macro was only invoked conditionally.]])
1085fi])])
1086
cristyead532a2015-06-05 00:49:30 +00001087# Copyright (C) 1999-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001088#
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
cristy854a7b32012-09-04 17:30:26 +00001093
1094# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1095# written in clear, in which case automake, when reading aclocal.m4,
1096# will think it sees a *use*, and therefore will trigger all it's
1097# C support machinery. Also note that it means that autoscan, seeing
1098# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1099
1100
1101# _AM_DEPENDENCIES(NAME)
1102# ----------------------
1103# See how the compiler implements dependency checking.
1104# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1105# We try a few techniques and use that to set a single cache variable.
1106#
1107# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1108# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1109# dependency, and given that the user is not expected to run this macro,
1110# just rely on AC_PROG_CC.
1111AC_DEFUN([_AM_DEPENDENCIES],
1112[AC_REQUIRE([AM_SET_DEPDIR])dnl
1113AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1114AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1115AC_REQUIRE([AM_DEP_TRACK])dnl
1116
1117m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1118 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1119 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1120 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1121 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1122 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1123 [depcc="$$1" am_compiler_list=])
1124
1125AC_CACHE_CHECK([dependency style of $depcc],
1126 [am_cv_$1_dependencies_compiler_type],
1127[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1128 # We make a subdir and do the tests there. Otherwise we can end up
1129 # making bogus files that we don't know about and never remove. For
1130 # instance it was reported that on HP-UX the gcc test will end up
1131 # making a dummy file named 'D' -- because '-MD' means "put the output
1132 # in D".
1133 rm -rf conftest.dir
1134 mkdir conftest.dir
1135 # Copy depcomp to subdir because otherwise we won't find it if we're
1136 # using a relative directory.
1137 cp "$am_depcomp" conftest.dir
1138 cd conftest.dir
1139 # We will build objects and dependencies in a subdirectory because
1140 # it helps to detect inapplicable dependency modes. For instance
1141 # both Tru64's cc and ICC support -MD to output dependencies as a
1142 # side effect of compilation, but ICC will put the dependencies in
1143 # the current directory while Tru64 will put them in the object
1144 # directory.
1145 mkdir sub
1146
1147 am_cv_$1_dependencies_compiler_type=none
1148 if test "$am_compiler_list" = ""; then
1149 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1150 fi
1151 am__universal=false
1152 m4_case([$1], [CC],
1153 [case " $depcc " in #(
1154 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1155 esac],
1156 [CXX],
1157 [case " $depcc " in #(
1158 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1159 esac])
1160
1161 for depmode in $am_compiler_list; do
1162 # Setup a source with many dependencies, because some compilers
1163 # like to wrap large dependency lists on column 80 (with \), and
1164 # we should not choose a depcomp mode which is confused by this.
1165 #
1166 # We need to recreate these files for each test, as the compiler may
1167 # overwrite some of them when testing with obscure command lines.
1168 # This happens at least with the AIX C compiler.
1169 : > sub/conftest.c
1170 for i in 1 2 3 4 5 6; do
1171 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1172 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1173 # Solaris 10 /bin/sh.
1174 echo '/* dummy */' > sub/conftst$i.h
1175 done
1176 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1177
1178 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1179 # mode. It turns out that the SunPro C++ compiler does not properly
1180 # handle '-M -o', and we need to detect this. Also, some Intel
1181 # versions had trouble with output in subdirs.
1182 am__obj=sub/conftest.${OBJEXT-o}
1183 am__minus_obj="-o $am__obj"
1184 case $depmode in
1185 gcc)
1186 # This depmode causes a compiler race in universal mode.
1187 test "$am__universal" = false || continue
1188 ;;
1189 nosideeffect)
1190 # After this tag, mechanisms are not by side-effect, so they'll
1191 # only be used when explicitly requested.
1192 if test "x$enable_dependency_tracking" = xyes; then
1193 continue
1194 else
1195 break
1196 fi
1197 ;;
1198 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1199 # This compiler won't grok '-c -o', but also, the minuso test has
1200 # not run yet. These depmodes are late enough in the game, and
1201 # so weak that their functioning should not be impacted.
1202 am__obj=conftest.${OBJEXT-o}
1203 am__minus_obj=
1204 ;;
1205 none) break ;;
1206 esac
1207 if depmode=$depmode \
1208 source=sub/conftest.c object=$am__obj \
1209 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1210 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1211 >/dev/null 2>conftest.err &&
1212 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1213 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1214 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1215 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1216 # icc doesn't choke on unknown options, it will just issue warnings
1217 # or remarks (even with -Werror). So we grep stderr for any message
1218 # that says an option was ignored or not supported.
1219 # When given -MP, icc 7.0 and 7.1 complain thusly:
1220 # icc: Command line warning: ignoring option '-M'; no argument required
1221 # The diagnosis changed in icc 8.0:
1222 # icc: Command line remark: option '-MP' not supported
1223 if (grep 'ignoring option' conftest.err ||
1224 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1225 am_cv_$1_dependencies_compiler_type=$depmode
1226 break
1227 fi
1228 fi
1229 done
1230
1231 cd ..
1232 rm -rf conftest.dir
1233else
1234 am_cv_$1_dependencies_compiler_type=none
1235fi
1236])
1237AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1238AM_CONDITIONAL([am__fastdep$1], [
1239 test "x$enable_dependency_tracking" != xno \
1240 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1241])
1242
1243
1244# AM_SET_DEPDIR
1245# -------------
1246# Choose a directory name for dependency files.
1247# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1248AC_DEFUN([AM_SET_DEPDIR],
1249[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1250AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1251])
1252
1253
1254# AM_DEP_TRACK
1255# ------------
1256AC_DEFUN([AM_DEP_TRACK],
1257[AC_ARG_ENABLE([dependency-tracking], [dnl
1258AS_HELP_STRING(
1259 [--enable-dependency-tracking],
1260 [do not reject slow dependency extractors])
1261AS_HELP_STRING(
1262 [--disable-dependency-tracking],
1263 [speeds up one-time build])])
1264if test "x$enable_dependency_tracking" != xno; then
1265 am_depcomp="$ac_aux_dir/depcomp"
1266 AMDEPBACKSLASH='\'
1267 am__nodep='_no'
1268fi
1269AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1270AC_SUBST([AMDEPBACKSLASH])dnl
1271_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1272AC_SUBST([am__nodep])dnl
1273_AM_SUBST_NOTMAKE([am__nodep])dnl
1274])
1275
1276# Generate code to set up dependency tracking. -*- Autoconf -*-
1277
cristyead532a2015-06-05 00:49:30 +00001278# Copyright (C) 1999-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001279#
1280# This file is free software; the Free Software Foundation
1281# gives unlimited permission to copy and/or distribute it,
1282# with or without modifications, as long as this notice is preserved.
1283
cristy854a7b32012-09-04 17:30:26 +00001284
1285# _AM_OUTPUT_DEPENDENCY_COMMANDS
1286# ------------------------------
1287AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1288[{
cristy58d34aa2013-01-24 15:11:54 +00001289 # Older Autoconf quotes --file arguments for eval, but not when files
cristy854a7b32012-09-04 17:30:26 +00001290 # are listed without --file. Let's play safe and only enable the eval
1291 # if we detect the quoting.
1292 case $CONFIG_FILES in
1293 *\'*) eval set x "$CONFIG_FILES" ;;
1294 *) set x $CONFIG_FILES ;;
1295 esac
1296 shift
1297 for mf
1298 do
1299 # Strip MF so we end up with the name of the file.
1300 mf=`echo "$mf" | sed -e 's/:.*$//'`
1301 # Check whether this is an Automake generated Makefile or not.
1302 # We used to match only the files named 'Makefile.in', but
1303 # some people rename them; so instead we look at the file content.
1304 # Grep'ing the first line is not enough: some people post-process
1305 # each Makefile.in and add a new line on top of each file to say so.
1306 # Grep'ing the whole file is not good either: AIX grep has a line
1307 # limit of 2048, but all sed's we know have understand at least 4000.
1308 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1309 dirpart=`AS_DIRNAME("$mf")`
1310 else
1311 continue
1312 fi
1313 # Extract the definition of DEPDIR, am__include, and am__quote
1314 # from the Makefile without running 'make'.
1315 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1316 test -z "$DEPDIR" && continue
1317 am__include=`sed -n 's/^am__include = //p' < "$mf"`
cristybced8142013-05-31 01:23:57 +00001318 test -z "$am__include" && continue
cristy854a7b32012-09-04 17:30:26 +00001319 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1320 # Find all dependency output files, they are included files with
1321 # $(DEPDIR) in their names. We invoke sed twice because it is the
1322 # simplest approach to changing $(DEPDIR) to its actual value in the
1323 # expansion.
1324 for file in `sed -n "
1325 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1326 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1327 # Make sure the directory exists.
1328 test -f "$dirpart/$file" && continue
1329 fdir=`AS_DIRNAME(["$file"])`
1330 AS_MKDIR_P([$dirpart/$fdir])
1331 # echo "creating $dirpart/$file"
1332 echo '# dummy' > "$dirpart/$file"
1333 done
1334 done
1335}
1336])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1337
1338
1339# AM_OUTPUT_DEPENDENCY_COMMANDS
1340# -----------------------------
1341# This macro should only be invoked once -- use via AC_REQUIRE.
1342#
1343# This code is only required when automatic dependency tracking
1344# is enabled. FIXME. This creates each '.P' file that we will
1345# need in order to bootstrap the dependency handling code.
1346AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1347[AC_CONFIG_COMMANDS([depfiles],
1348 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1349 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1350])
1351
1352
cristyead532a2015-06-05 00:49:30 +00001353# Copyright (C) 1996-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001354#
1355# This file is free software; the Free Software Foundation
1356# gives unlimited permission to copy and/or distribute it,
1357# with or without modifications, as long as this notice is preserved.
1358
cristy854a7b32012-09-04 17:30:26 +00001359AC_DEFUN([AM_WITH_DMALLOC],
1360[AC_MSG_CHECKING([if malloc debugging is wanted])
1361AC_ARG_WITH([dmalloc],
1362[AS_HELP_STRING([--with-dmalloc],
1363 [use dmalloc, as in http://www.dmalloc.com])],
1364[if test "$withval" = yes; then
1365 AC_MSG_RESULT([yes])
1366 AC_DEFINE([WITH_DMALLOC], [1],
1367 [Define if using the dmalloc debugging malloc package])
1368 LIBS="$LIBS -ldmalloc"
1369 LDFLAGS="$LDFLAGS -g"
1370else
1371 AC_MSG_RESULT([no])
1372fi], [AC_MSG_RESULT([no])])
1373])
1374
cristy854a7b32012-09-04 17:30:26 +00001375# Do all the work for Automake. -*- Autoconf -*-
1376
cristyead532a2015-06-05 00:49:30 +00001377# Copyright (C) 1996-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001378#
1379# This file is free software; the Free Software Foundation
1380# gives unlimited permission to copy and/or distribute it,
1381# with or without modifications, as long as this notice is preserved.
1382
cristy854a7b32012-09-04 17:30:26 +00001383# This macro actually does too much. Some checks are only needed if
1384# your package does certain things. But this isn't really a big deal.
1385
cristya5bda012013-11-03 18:05:38 +00001386dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1387m4_define([AC_PROG_CC],
1388m4_defn([AC_PROG_CC])
1389[_AM_PROG_CC_C_O
1390])
1391
cristy854a7b32012-09-04 17:30:26 +00001392# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1393# AM_INIT_AUTOMAKE([OPTIONS])
1394# -----------------------------------------------
1395# The call with PACKAGE and VERSION arguments is the old style
1396# call (pre autoconf-2.50), which is being phased out. PACKAGE
1397# and VERSION should now be passed to AC_INIT and removed from
1398# the call to AM_INIT_AUTOMAKE.
1399# We support both call styles for the transition. After
1400# the next Automake release, Autoconf can make the AC_INIT
1401# arguments mandatory, and then we can depend on a new Autoconf
1402# release and drop the old call support.
1403AC_DEFUN([AM_INIT_AUTOMAKE],
cristy58d34aa2013-01-24 15:11:54 +00001404[AC_PREREQ([2.65])dnl
cristy854a7b32012-09-04 17:30:26 +00001405dnl Autoconf wants to disallow AM_ names. We explicitly allow
1406dnl the ones we care about.
1407m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1408AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1409AC_REQUIRE([AC_PROG_INSTALL])dnl
1410if test "`cd $srcdir && pwd`" != "`pwd`"; then
1411 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1412 # is not polluted with repeated "-I."
1413 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1414 # test to see if srcdir already configured
1415 if test -f $srcdir/config.status; then
1416 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1417 fi
1418fi
1419
1420# test whether we have cygpath
1421if test -z "$CYGPATH_W"; then
1422 if (cygpath --version) >/dev/null 2>/dev/null; then
1423 CYGPATH_W='cygpath -w'
1424 else
1425 CYGPATH_W=echo
1426 fi
1427fi
1428AC_SUBST([CYGPATH_W])
1429
1430# Define the identity of the package.
1431dnl Distinguish between old-style and new-style calls.
1432m4_ifval([$2],
1433[AC_DIAGNOSE([obsolete],
cristy58d34aa2013-01-24 15:11:54 +00001434 [$0: two- and three-arguments forms are deprecated.])
cristy854a7b32012-09-04 17:30:26 +00001435m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1436 AC_SUBST([PACKAGE], [$1])dnl
1437 AC_SUBST([VERSION], [$2])],
1438[_AM_SET_OPTIONS([$1])dnl
1439dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1440m4_if(
1441 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1442 [ok:ok],,
1443 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1444 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1445 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1446
1447_AM_IF_OPTION([no-define],,
1448[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1449 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1450
1451# Some tools Automake needs.
1452AC_REQUIRE([AM_SANITY_CHECK])dnl
1453AC_REQUIRE([AC_ARG_PROGRAM])dnl
1454AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1455AM_MISSING_PROG([AUTOCONF], [autoconf])
1456AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1457AM_MISSING_PROG([AUTOHEADER], [autoheader])
1458AM_MISSING_PROG([MAKEINFO], [makeinfo])
1459AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1460AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1461AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1462# For better backward compatibility. To be removed once Automake 1.9.x
1463# dies out for good. For more background, see:
1464# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1465# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1466AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
cristyead532a2015-06-05 00:49:30 +00001467# We need awk for the "check" target (and possibly the TAP driver). The
1468# system "awk" is bad on some platforms.
cristy854a7b32012-09-04 17:30:26 +00001469AC_REQUIRE([AC_PROG_AWK])dnl
1470AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1471AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1472_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1473 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1474 [_AM_PROG_TAR([v7])])])
1475_AM_IF_OPTION([no-dependencies],,
1476[AC_PROVIDE_IFELSE([AC_PROG_CC],
1477 [_AM_DEPENDENCIES([CC])],
1478 [m4_define([AC_PROG_CC],
1479 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1480AC_PROVIDE_IFELSE([AC_PROG_CXX],
1481 [_AM_DEPENDENCIES([CXX])],
1482 [m4_define([AC_PROG_CXX],
1483 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1484AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1485 [_AM_DEPENDENCIES([OBJC])],
1486 [m4_define([AC_PROG_OBJC],
1487 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
cristy58d34aa2013-01-24 15:11:54 +00001488AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
cristy854a7b32012-09-04 17:30:26 +00001489 [_AM_DEPENDENCIES([OBJCXX])],
1490 [m4_define([AC_PROG_OBJCXX],
cristy58d34aa2013-01-24 15:11:54 +00001491 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
cristy854a7b32012-09-04 17:30:26 +00001492])
cristy58d34aa2013-01-24 15:11:54 +00001493AC_REQUIRE([AM_SILENT_RULES])dnl
1494dnl The testsuite driver may need to know about EXEEXT, so add the
1495dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1496dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
cristy854a7b32012-09-04 17:30:26 +00001497AC_CONFIG_COMMANDS_PRE(dnl
1498[m4_provide_if([_AM_COMPILER_EXEEXT],
1499 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
cristya5bda012013-11-03 18:05:38 +00001500
1501# POSIX will say in a future version that running "rm -f" with no argument
1502# is OK; and we want to be able to make that assumption in our Makefile
1503# recipes. So use an aggressive probe to check that the usage we want is
1504# actually supported "in the wild" to an acceptable degree.
1505# See automake bug#10828.
1506# To make any issue more visible, cause the running configure to be aborted
1507# by default if the 'rm' program in use doesn't match our expectations; the
1508# user can still override this though.
1509if rm -f && rm -fr && rm -rf; then : OK; else
1510 cat >&2 <<'END'
1511Oops!
1512
1513Your 'rm' program seems unable to run without file operands specified
1514on the command line, even when the '-f' option is present. This is contrary
1515to the behaviour of most rm programs out there, and not conforming with
1516the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1517
1518Please tell bug-automake@gnu.org about your system, including the value
1519of your $PATH and any error possibly output before this message. This
1520can help us improve future automake versions.
1521
1522END
1523 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1524 echo 'Configuration will proceed anyway, since you have set the' >&2
1525 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1526 echo >&2
1527 else
1528 cat >&2 <<'END'
1529Aborting the configuration process, to ensure you take notice of the issue.
1530
1531You can download and install GNU coreutils to get an 'rm' implementation
1532that behaves properly: <http://www.gnu.org/software/coreutils/>.
1533
1534If you want to complete the configuration process using your problematic
1535'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1536to "yes", and re-run configure.
1537
1538END
1539 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1540 fi
cristyead532a2015-06-05 00:49:30 +00001541fi
1542dnl The trailing newline in this macro's definition is deliberate, for
1543dnl backward compatibility and to allow trailing 'dnl'-style comments
1544dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1545])
cristy854a7b32012-09-04 17:30:26 +00001546
1547dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1548dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1549dnl mangled by Autoconf and run in a shell conditional statement.
1550m4_define([_AC_COMPILER_EXEEXT],
1551m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1552
cristy854a7b32012-09-04 17:30:26 +00001553# When config.status generates a header, we must update the stamp-h file.
1554# This file resides in the same directory as the config header
1555# that is generated. The stamp files are numbered to have different names.
1556
1557# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1558# loop where config.status creates the headers, so we can generate
1559# our stamp files there.
1560AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1561[# Compute $1's index in $config_headers.
1562_am_arg=$1
1563_am_stamp_count=1
1564for _am_header in $config_headers :; do
1565 case $_am_header in
1566 $_am_arg | $_am_arg:* )
1567 break ;;
1568 * )
1569 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1570 esac
1571done
1572echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1573
cristyead532a2015-06-05 00:49:30 +00001574# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001575#
1576# This file is free software; the Free Software Foundation
1577# gives unlimited permission to copy and/or distribute it,
1578# with or without modifications, as long as this notice is preserved.
1579
cristy854a7b32012-09-04 17:30:26 +00001580# AM_PROG_INSTALL_SH
1581# ------------------
1582# Define $install_sh.
1583AC_DEFUN([AM_PROG_INSTALL_SH],
1584[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
cristyead532a2015-06-05 00:49:30 +00001585if test x"${install_sh+set}" != xset; then
cristy854a7b32012-09-04 17:30:26 +00001586 case $am_aux_dir in
1587 *\ * | *\ *)
1588 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1589 *)
1590 install_sh="\${SHELL} $am_aux_dir/install-sh"
1591 esac
1592fi
1593AC_SUBST([install_sh])])
1594
cristyead532a2015-06-05 00:49:30 +00001595# Copyright (C) 2003-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001596#
1597# This file is free software; the Free Software Foundation
1598# gives unlimited permission to copy and/or distribute it,
1599# with or without modifications, as long as this notice is preserved.
1600
cristy854a7b32012-09-04 17:30:26 +00001601# Check whether the underlying file-system supports filenames
1602# with a leading dot. For instance MS-DOS doesn't.
1603AC_DEFUN([AM_SET_LEADING_DOT],
1604[rm -rf .tst 2>/dev/null
1605mkdir .tst 2>/dev/null
1606if test -d .tst; then
1607 am__leading_dot=.
1608else
1609 am__leading_dot=_
1610fi
1611rmdir .tst 2>/dev/null
1612AC_SUBST([am__leading_dot])])
1613
1614# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1615# From Jim Meyering
1616
cristyead532a2015-06-05 00:49:30 +00001617# Copyright (C) 1996-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001618#
1619# This file is free software; the Free Software Foundation
1620# gives unlimited permission to copy and/or distribute it,
1621# with or without modifications, as long as this notice is preserved.
1622
cristy854a7b32012-09-04 17:30:26 +00001623# AM_MAINTAINER_MODE([DEFAULT-MODE])
1624# ----------------------------------
1625# Control maintainer-specific portions of Makefiles.
1626# Default is to disable them, unless 'enable' is passed literally.
1627# For symmetry, 'disable' may be passed as well. Anyway, the user
1628# can override the default with the --enable/--disable switch.
1629AC_DEFUN([AM_MAINTAINER_MODE],
1630[m4_case(m4_default([$1], [disable]),
1631 [enable], [m4_define([am_maintainer_other], [disable])],
1632 [disable], [m4_define([am_maintainer_other], [enable])],
1633 [m4_define([am_maintainer_other], [enable])
1634 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1635AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1636 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1637 AC_ARG_ENABLE([maintainer-mode],
1638 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1639 am_maintainer_other[ make rules and dependencies not useful
1640 (and sometimes confusing) to the casual installer])],
1641 [USE_MAINTAINER_MODE=$enableval],
1642 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1643 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1644 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1645 MAINT=$MAINTAINER_MODE_TRUE
1646 AC_SUBST([MAINT])dnl
1647]
1648)
1649
cristy854a7b32012-09-04 17:30:26 +00001650# Check to see how 'make' treats includes. -*- Autoconf -*-
1651
cristyead532a2015-06-05 00:49:30 +00001652# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001653#
1654# This file is free software; the Free Software Foundation
1655# gives unlimited permission to copy and/or distribute it,
1656# with or without modifications, as long as this notice is preserved.
1657
cristy854a7b32012-09-04 17:30:26 +00001658# AM_MAKE_INCLUDE()
1659# -----------------
1660# Check to see how make treats includes.
1661AC_DEFUN([AM_MAKE_INCLUDE],
1662[am_make=${MAKE-make}
1663cat > confinc << 'END'
1664am__doit:
1665 @echo this is the am__doit target
1666.PHONY: am__doit
1667END
1668# If we don't find an include directive, just comment out the code.
1669AC_MSG_CHECKING([for style of include used by $am_make])
1670am__include="#"
1671am__quote=
1672_am_result=none
1673# First try GNU make style include.
1674echo "include confinc" > confmf
1675# Ignore all kinds of additional output from 'make'.
1676case `$am_make -s -f confmf 2> /dev/null` in #(
1677*the\ am__doit\ target*)
1678 am__include=include
1679 am__quote=
1680 _am_result=GNU
1681 ;;
1682esac
1683# Now try BSD make style include.
1684if test "$am__include" = "#"; then
1685 echo '.include "confinc"' > confmf
1686 case `$am_make -s -f confmf 2> /dev/null` in #(
1687 *the\ am__doit\ target*)
1688 am__include=.include
1689 am__quote="\""
1690 _am_result=BSD
1691 ;;
1692 esac
1693fi
1694AC_SUBST([am__include])
1695AC_SUBST([am__quote])
1696AC_MSG_RESULT([$_am_result])
1697rm -f confinc confmf
1698])
1699
cristy854a7b32012-09-04 17:30:26 +00001700# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1701
cristyead532a2015-06-05 00:49:30 +00001702# Copyright (C) 1997-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001703#
1704# This file is free software; the Free Software Foundation
1705# gives unlimited permission to copy and/or distribute it,
1706# with or without modifications, as long as this notice is preserved.
1707
cristy854a7b32012-09-04 17:30:26 +00001708# AM_MISSING_PROG(NAME, PROGRAM)
1709# ------------------------------
1710AC_DEFUN([AM_MISSING_PROG],
1711[AC_REQUIRE([AM_MISSING_HAS_RUN])
1712$1=${$1-"${am_missing_run}$2"}
1713AC_SUBST($1)])
1714
cristy854a7b32012-09-04 17:30:26 +00001715# AM_MISSING_HAS_RUN
1716# ------------------
cristy58d34aa2013-01-24 15:11:54 +00001717# Define MISSING if not defined so far and test if it is modern enough.
1718# If it is, set am_missing_run to use it, otherwise, to nothing.
cristy854a7b32012-09-04 17:30:26 +00001719AC_DEFUN([AM_MISSING_HAS_RUN],
1720[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1721AC_REQUIRE_AUX_FILE([missing])dnl
1722if test x"${MISSING+set}" != xset; then
1723 case $am_aux_dir in
1724 *\ * | *\ *)
1725 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1726 *)
1727 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1728 esac
1729fi
1730# Use eval to expand $SHELL
cristy58d34aa2013-01-24 15:11:54 +00001731if eval "$MISSING --is-lightweight"; then
1732 am_missing_run="$MISSING "
cristy854a7b32012-09-04 17:30:26 +00001733else
1734 am_missing_run=
1735 AC_MSG_WARN(['missing' script is too old or missing])
1736fi
1737])
1738
1739# Helper functions for option handling. -*- Autoconf -*-
1740
cristyead532a2015-06-05 00:49:30 +00001741# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001742#
1743# This file is free software; the Free Software Foundation
1744# gives unlimited permission to copy and/or distribute it,
1745# with or without modifications, as long as this notice is preserved.
1746
cristy854a7b32012-09-04 17:30:26 +00001747# _AM_MANGLE_OPTION(NAME)
1748# -----------------------
1749AC_DEFUN([_AM_MANGLE_OPTION],
1750[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1751
1752# _AM_SET_OPTION(NAME)
1753# --------------------
1754# Set option NAME. Presently that only means defining a flag for this option.
1755AC_DEFUN([_AM_SET_OPTION],
1756[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1757
1758# _AM_SET_OPTIONS(OPTIONS)
1759# ------------------------
1760# OPTIONS is a space-separated list of Automake options.
1761AC_DEFUN([_AM_SET_OPTIONS],
1762[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1763
1764# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1765# -------------------------------------------
1766# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1767AC_DEFUN([_AM_IF_OPTION],
1768[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1769
cristyead532a2015-06-05 00:49:30 +00001770# Copyright (C) 1999-2014 Free Software Foundation, Inc.
cristya5bda012013-11-03 18:05:38 +00001771#
1772# This file is free software; the Free Software Foundation
1773# gives unlimited permission to copy and/or distribute it,
1774# with or without modifications, as long as this notice is preserved.
1775
1776# _AM_PROG_CC_C_O
1777# ---------------
1778# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1779# to automatically call this.
1780AC_DEFUN([_AM_PROG_CC_C_O],
1781[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1782AC_REQUIRE_AUX_FILE([compile])dnl
1783AC_LANG_PUSH([C])dnl
1784AC_CACHE_CHECK(
1785 [whether $CC understands -c and -o together],
1786 [am_cv_prog_cc_c_o],
1787 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1788 # Make sure it works both with $CC and with simple cc.
1789 # Following AC_PROG_CC_C_O, we do the test twice because some
1790 # compilers refuse to overwrite an existing .o file with -o,
1791 # though they will create one.
1792 am_cv_prog_cc_c_o=yes
1793 for am_i in 1 2; do
1794 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1795 && test -f conftest2.$ac_objext; then
1796 : OK
1797 else
1798 am_cv_prog_cc_c_o=no
1799 break
1800 fi
1801 done
1802 rm -f core conftest*
1803 unset am_i])
1804if test "$am_cv_prog_cc_c_o" != yes; then
1805 # Losing compiler, so override with the script.
1806 # FIXME: It is wrong to rewrite CC.
1807 # But if we don't then we get into trouble of one sort or another.
1808 # A longer-term fix would be to have automake use am__CC in this case,
1809 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1810 CC="$am_aux_dir/compile $CC"
1811fi
1812AC_LANG_POP([C])])
1813
1814# For backward compatibility.
1815AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1816
cristyead532a2015-06-05 00:49:30 +00001817# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristya5bda012013-11-03 18:05:38 +00001818#
1819# This file is free software; the Free Software Foundation
1820# gives unlimited permission to copy and/or distribute it,
1821# with or without modifications, as long as this notice is preserved.
1822
1823# AM_RUN_LOG(COMMAND)
1824# -------------------
1825# Run COMMAND, save the exit status in ac_status, and log it.
1826# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1827AC_DEFUN([AM_RUN_LOG],
1828[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1829 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1830 ac_status=$?
1831 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1832 (exit $ac_status); }])
1833
cristy854a7b32012-09-04 17:30:26 +00001834# Check to make sure that the build environment is sane. -*- Autoconf -*-
1835
cristyead532a2015-06-05 00:49:30 +00001836# Copyright (C) 1996-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001837#
1838# This file is free software; the Free Software Foundation
1839# gives unlimited permission to copy and/or distribute it,
1840# with or without modifications, as long as this notice is preserved.
1841
cristy854a7b32012-09-04 17:30:26 +00001842# AM_SANITY_CHECK
1843# ---------------
1844AC_DEFUN([AM_SANITY_CHECK],
1845[AC_MSG_CHECKING([whether build environment is sane])
1846# Reject unsafe characters in $srcdir or the absolute working directory
1847# name. Accept space and tab only in the latter.
1848am_lf='
1849'
1850case `pwd` in
1851 *[[\\\"\#\$\&\'\`$am_lf]]*)
1852 AC_MSG_ERROR([unsafe absolute working directory name]);;
1853esac
1854case $srcdir in
1855 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1856 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1857esac
1858
1859# Do 'set' in a subshell so we don't clobber the current shell's
1860# arguments. Must try -L first in case configure is actually a
1861# symlink; some systems play weird games with the mod time of symlinks
1862# (eg FreeBSD returns the mod time of the symlink's containing
1863# directory).
1864if (
1865 am_has_slept=no
1866 for am_try in 1 2; do
1867 echo "timestamp, slept: $am_has_slept" > conftest.file
1868 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1869 if test "$[*]" = "X"; then
1870 # -L didn't work.
1871 set X `ls -t "$srcdir/configure" conftest.file`
1872 fi
1873 if test "$[*]" != "X $srcdir/configure conftest.file" \
1874 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1875
1876 # If neither matched, then we have a broken ls. This can happen
1877 # if, for instance, CONFIG_SHELL is bash and it inherits a
1878 # broken ls alias from the environment. This has actually
1879 # happened. Such a system could not be considered "sane".
1880 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1881 alias in your environment])
1882 fi
1883 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1884 break
1885 fi
1886 # Just in case.
1887 sleep 1
1888 am_has_slept=yes
1889 done
1890 test "$[2]" = conftest.file
1891 )
1892then
1893 # Ok.
1894 :
1895else
1896 AC_MSG_ERROR([newly created file is older than distributed files!
1897Check your system clock])
1898fi
1899AC_MSG_RESULT([yes])
1900# If we didn't sleep, we still need to ensure time stamps of config.status and
1901# generated files are strictly newer.
1902am_sleep_pid=
1903if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1904 ( sleep 1 ) &
1905 am_sleep_pid=$!
1906fi
1907AC_CONFIG_COMMANDS_PRE(
1908 [AC_MSG_CHECKING([that generated files are newer than configure])
1909 if test -n "$am_sleep_pid"; then
1910 # Hide warnings about reused PIDs.
1911 wait $am_sleep_pid 2>/dev/null
1912 fi
1913 AC_MSG_RESULT([done])])
1914rm -f conftest.file
1915])
1916
cristyead532a2015-06-05 00:49:30 +00001917# Copyright (C) 2009-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001918#
1919# This file is free software; the Free Software Foundation
1920# gives unlimited permission to copy and/or distribute it,
1921# with or without modifications, as long as this notice is preserved.
1922
cristy854a7b32012-09-04 17:30:26 +00001923# AM_SILENT_RULES([DEFAULT])
1924# --------------------------
1925# Enable less verbose build rules; with the default set to DEFAULT
1926# ("yes" being less verbose, "no" or empty being verbose).
1927AC_DEFUN([AM_SILENT_RULES],
1928[AC_ARG_ENABLE([silent-rules], [dnl
1929AS_HELP_STRING(
1930 [--enable-silent-rules],
1931 [less verbose build output (undo: "make V=1")])
1932AS_HELP_STRING(
1933 [--disable-silent-rules],
1934 [verbose build output (undo: "make V=0")])dnl
1935])
1936case $enable_silent_rules in @%:@ (((
1937 yes) AM_DEFAULT_VERBOSITY=0;;
1938 no) AM_DEFAULT_VERBOSITY=1;;
1939 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1940esac
1941dnl
1942dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1943dnl do not support nested variable expansions.
1944dnl See automake bug#9928 and bug#10237.
1945am_make=${MAKE-make}
1946AC_CACHE_CHECK([whether $am_make supports nested variables],
1947 [am_cv_make_support_nested_variables],
1948 [if AS_ECHO([['TRUE=$(BAR$(V))
1949BAR0=false
1950BAR1=true
1951V=1
1952am__doit:
1953 @$(TRUE)
1954.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1955 am_cv_make_support_nested_variables=yes
1956else
1957 am_cv_make_support_nested_variables=no
1958fi])
1959if test $am_cv_make_support_nested_variables = yes; then
1960 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1961 AM_V='$(V)'
1962 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1963else
1964 AM_V=$AM_DEFAULT_VERBOSITY
1965 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1966fi
1967AC_SUBST([AM_V])dnl
1968AM_SUBST_NOTMAKE([AM_V])dnl
1969AC_SUBST([AM_DEFAULT_V])dnl
1970AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1971AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1972AM_BACKSLASH='\'
1973AC_SUBST([AM_BACKSLASH])dnl
1974_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1975])
1976
cristyead532a2015-06-05 00:49:30 +00001977# Copyright (C) 2001-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00001978#
1979# This file is free software; the Free Software Foundation
1980# gives unlimited permission to copy and/or distribute it,
1981# with or without modifications, as long as this notice is preserved.
1982
cristy854a7b32012-09-04 17:30:26 +00001983# AM_PROG_INSTALL_STRIP
1984# ---------------------
1985# One issue with vendor 'install' (even GNU) is that you can't
1986# specify the program used to strip binaries. This is especially
1987# annoying in cross-compiling environments, where the build's strip
1988# is unlikely to handle the host's binaries.
1989# Fortunately install-sh will honor a STRIPPROG variable, so we
1990# always use install-sh in "make install-strip", and initialize
1991# STRIPPROG with the value of the STRIP variable (set by the user).
1992AC_DEFUN([AM_PROG_INSTALL_STRIP],
1993[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1994# Installed binaries are usually stripped using 'strip' when the user
1995# run "make install-strip". However 'strip' might not be the right
1996# tool to use in cross-compilation environments, therefore Automake
1997# will honor the 'STRIP' environment variable to overrule this program.
1998dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1999if test "$cross_compiling" != no; then
2000 AC_CHECK_TOOL([STRIP], [strip], :)
2001fi
2002INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2003AC_SUBST([INSTALL_STRIP_PROGRAM])])
2004
cristyead532a2015-06-05 00:49:30 +00002005# Copyright (C) 2006-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00002006#
2007# This file is free software; the Free Software Foundation
2008# gives unlimited permission to copy and/or distribute it,
2009# with or without modifications, as long as this notice is preserved.
2010
cristy854a7b32012-09-04 17:30:26 +00002011# _AM_SUBST_NOTMAKE(VARIABLE)
2012# ---------------------------
2013# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2014# This macro is traced by Automake.
2015AC_DEFUN([_AM_SUBST_NOTMAKE])
2016
2017# AM_SUBST_NOTMAKE(VARIABLE)
2018# --------------------------
2019# Public sister of _AM_SUBST_NOTMAKE.
2020AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2021
2022# Check how to create a tarball. -*- Autoconf -*-
2023
cristyead532a2015-06-05 00:49:30 +00002024# Copyright (C) 2004-2014 Free Software Foundation, Inc.
cristy854a7b32012-09-04 17:30:26 +00002025#
2026# This file is free software; the Free Software Foundation
2027# gives unlimited permission to copy and/or distribute it,
2028# with or without modifications, as long as this notice is preserved.
2029
cristy854a7b32012-09-04 17:30:26 +00002030# _AM_PROG_TAR(FORMAT)
2031# --------------------
2032# Check how to create a tarball in format FORMAT.
2033# FORMAT should be one of 'v7', 'ustar', or 'pax'.
2034#
2035# Substitute a variable $(am__tar) that is a command
2036# writing to stdout a FORMAT-tarball containing the directory
2037# $tardir.
2038# tardir=directory && $(am__tar) > result.tar
2039#
2040# Substitute a variable $(am__untar) that extract such
2041# a tarball read from stdin.
2042# $(am__untar) < result.tar
cristye69bdbe2013-05-03 21:40:44 +00002043#
cristy854a7b32012-09-04 17:30:26 +00002044AC_DEFUN([_AM_PROG_TAR],
2045[# Always define AMTAR for backward compatibility. Yes, it's still used
2046# in the wild :-( We should find a proper way to deprecate it ...
2047AC_SUBST([AMTAR], ['$${TAR-tar}'])
cristye69bdbe2013-05-03 21:40:44 +00002048
2049# We'll loop over all known methods to create a tar archive until one works.
cristy854a7b32012-09-04 17:30:26 +00002050_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
cristy854a7b32012-09-04 17:30:26 +00002051
cristye69bdbe2013-05-03 21:40:44 +00002052m4_if([$1], [v7],
2053 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
cristy854a7b32012-09-04 17:30:26 +00002054
cristye69bdbe2013-05-03 21:40:44 +00002055 [m4_case([$1],
2056 [ustar],
2057 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2058 # There is notably a 21 bits limit for the UID and the GID. In fact,
2059 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2060 # and bug#13588).
2061 am_max_uid=2097151 # 2^21 - 1
2062 am_max_gid=$am_max_uid
2063 # The $UID and $GID variables are not portable, so we need to resort
2064 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2065 # below are definitely unexpected, so allow the users to see them
2066 # (that is, avoid stderr redirection).
2067 am_uid=`id -u || echo unknown`
2068 am_gid=`id -g || echo unknown`
2069 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2070 if test $am_uid -le $am_max_uid; then
2071 AC_MSG_RESULT([yes])
2072 else
2073 AC_MSG_RESULT([no])
2074 _am_tools=none
2075 fi
2076 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2077 if test $am_gid -le $am_max_gid; then
2078 AC_MSG_RESULT([yes])
2079 else
2080 AC_MSG_RESULT([no])
2081 _am_tools=none
2082 fi],
2083
2084 [pax],
2085 [],
2086
2087 [m4_fatal([Unknown tar format])])
2088
2089 AC_MSG_CHECKING([how to create a $1 tar archive])
2090
2091 # Go ahead even if we have the value already cached. We do so because we
2092 # need to set the values for the 'am__tar' and 'am__untar' variables.
2093 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2094
2095 for _am_tool in $_am_tools; do
2096 case $_am_tool in
2097 gnutar)
2098 for _am_tar in tar gnutar gtar; do
2099 AM_RUN_LOG([$_am_tar --version]) && break
2100 done
2101 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2102 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2103 am__untar="$_am_tar -xf -"
2104 ;;
2105 plaintar)
2106 # Must skip GNU tar: if it does not support --format= it doesn't create
2107 # ustar tarball either.
2108 (tar --version) >/dev/null 2>&1 && continue
2109 am__tar='tar chf - "$$tardir"'
2110 am__tar_='tar chf - "$tardir"'
2111 am__untar='tar xf -'
2112 ;;
2113 pax)
2114 am__tar='pax -L -x $1 -w "$$tardir"'
2115 am__tar_='pax -L -x $1 -w "$tardir"'
2116 am__untar='pax -r'
2117 ;;
2118 cpio)
2119 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2120 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2121 am__untar='cpio -i -H $1 -d'
2122 ;;
2123 none)
2124 am__tar=false
2125 am__tar_=false
2126 am__untar=false
2127 ;;
2128 esac
2129
2130 # If the value was cached, stop now. We just wanted to have am__tar
2131 # and am__untar set.
2132 test -n "${am_cv_prog_tar_$1}" && break
2133
2134 # tar/untar a dummy directory, and stop if the command works.
2135 rm -rf conftest.dir
2136 mkdir conftest.dir
2137 echo GrepMe > conftest.dir/file
2138 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2139 rm -rf conftest.dir
2140 if test -s conftest.tar; then
2141 AM_RUN_LOG([$am__untar <conftest.tar])
2142 AM_RUN_LOG([cat conftest.dir/file])
2143 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2144 fi
2145 done
cristy854a7b32012-09-04 17:30:26 +00002146 rm -rf conftest.dir
cristy854a7b32012-09-04 17:30:26 +00002147
cristye69bdbe2013-05-03 21:40:44 +00002148 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2149 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
cristybced8142013-05-31 01:23:57 +00002150
cristy854a7b32012-09-04 17:30:26 +00002151AC_SUBST([am__tar])
2152AC_SUBST([am__untar])
2153]) # _AM_PROG_TAR
2154
2155m4_include([m4/ac_func_fseeko.m4])
cristy17491be2014-06-24 01:10:53 +00002156m4_include([m4/ax_append_flag.m4])
cristy854a7b32012-09-04 17:30:26 +00002157m4_include([m4/ax_c___attribute__.m4])
2158m4_include([m4/ax_cflags_warn_all.m4])
cristya0459972013-11-03 18:09:35 +00002159m4_include([m4/ax_check_compile_flag.m4])
cristy854a7b32012-09-04 17:30:26 +00002160m4_include([m4/ax_compare_version.m4])
cristy016e8b82012-12-26 12:11:06 +00002161m4_include([m4/ax_compiler_vendor.m4])
cristy854a7b32012-09-04 17:30:26 +00002162m4_include([m4/ax_cxx_bool.m4])
2163m4_include([m4/ax_cxx_namespace_std.m4])
2164m4_include([m4/ax_cxx_namespaces.m4])
cristya0459972013-11-03 18:09:35 +00002165m4_include([m4/ax_gcc_archflag.m4])
2166m4_include([m4/ax_gcc_x86_cpuid.m4])
cristy75314cc2012-09-15 23:08:29 +00002167m4_include([m4/ax_lang_compiler_ms.m4])
cristy854a7b32012-09-04 17:30:26 +00002168m4_include([m4/ax_opencl.m4])
2169m4_include([m4/ax_prefix_config_h.m4])
2170m4_include([m4/ax_prog_perl_version.m4])
2171m4_include([m4/ax_pthread.m4])
cristy17491be2014-06-24 01:10:53 +00002172m4_include([m4/ax_require_defined.m4])
cristy854a7b32012-09-04 17:30:26 +00002173m4_include([m4/cxx_have_std_libs.m4])
2174m4_include([m4/framework.m4])
cristy9b86f202012-11-28 21:55:35 +00002175m4_include([m4/ld-version-script.m4])
cristy854a7b32012-09-04 17:30:26 +00002176m4_include([m4/libtool.m4])
cristy854a7b32012-09-04 17:30:26 +00002177m4_include([m4/ltoptions.m4])
2178m4_include([m4/ltsugar.m4])
2179m4_include([m4/ltversion.m4])
2180m4_include([m4/lt~obsolete.m4])
cristy854a7b32012-09-04 17:30:26 +00002181m4_include([m4/pkg.m4])