1 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
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.
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
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
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'.])])
23 dnl -*- mode: autoconf -*-
24 dnl Copyright 2009 Johan Dahlin
26 dnl This file is free software; the author(s) gives unlimited
27 dnl permission to copy and/or distribute it, with or without
28 dnl modifications, as long as this notice is preserved.
33 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
35 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
36 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
37 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
39 dnl enable/disable introspection
40 m4_if([$2], [require],
42 enable_introspection=yes
44 AC_ARG_ENABLE(introspection,
45 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
46 [Enable introspection for this build]),,
47 [enable_introspection=auto])
50 AC_MSG_CHECKING([for gobject-introspection])
52 dnl presence/version checking
53 AS_CASE([$enable_introspection],
55 found_introspection="no (disabled, use --enable-introspection to enable)"
58 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
59 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
60 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
61 found_introspection=yes,
62 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
65 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
66 dnl Canonicalize enable_introspection
67 enable_introspection=$found_introspection
70 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
73 AC_MSG_RESULT([$found_introspection])
75 INTROSPECTION_SCANNER=
76 INTROSPECTION_COMPILER=
77 INTROSPECTION_GENERATE=
79 INTROSPECTION_TYPELIBDIR=
80 if test "x$found_introspection" = "xyes"; then
81 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
82 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
83 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
84 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
85 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
86 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
87 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
88 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
90 AC_SUBST(INTROSPECTION_SCANNER)
91 AC_SUBST(INTROSPECTION_COMPILER)
92 AC_SUBST(INTROSPECTION_GENERATE)
93 AC_SUBST(INTROSPECTION_GIRDIR)
94 AC_SUBST(INTROSPECTION_TYPELIBDIR)
95 AC_SUBST(INTROSPECTION_CFLAGS)
96 AC_SUBST(INTROSPECTION_LIBS)
97 AC_SUBST(INTROSPECTION_MAKEFILE)
99 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
104 dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
106 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
108 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
112 dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
115 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
117 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
120 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
121 dnl serial 11 (pkg-config-0.29)
123 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
124 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
126 dnl This program is free software; you can redistribute it and/or modify
127 dnl it under the terms of the GNU General Public License as published by
128 dnl the Free Software Foundation; either version 2 of the License, or
129 dnl (at your option) any later version.
131 dnl This program is distributed in the hope that it will be useful, but
132 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
133 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
134 dnl General Public License for more details.
136 dnl You should have received a copy of the GNU General Public License
137 dnl along with this program; if not, write to the Free Software
138 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
141 dnl As a special exception to the GNU General Public License, if you
142 dnl distribute this file as part of a program that contains a
143 dnl configuration script generated by Autoconf, you may include it under
144 dnl the same distribution terms that you use for the rest of that
147 dnl PKG_PREREQ(MIN-VERSION)
148 dnl -----------------------
151 dnl Verify that the version of the pkg-config macros are at least
152 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
153 dnl installed version of pkg-config, this checks the developer's version
154 dnl of pkg.m4 when generating configure.
156 dnl To ensure that this macro is defined, also add:
157 dnl m4_ifndef([PKG_PREREQ],
158 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
160 dnl See the "Since" comment for each macro you use to see what version
161 dnl of the macros you require.
162 m4_defun([PKG_PREREQ],
163 [m4_define([PKG_MACROS_VERSION], [0.29])
164 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
165 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
168 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
169 dnl ----------------------------------
172 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
173 dnl first found in the path. Checks that the version of pkg-config found
174 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
175 dnl used since that's the first version where most current features of
176 dnl pkg-config existed.
177 AC_DEFUN([PKG_PROG_PKG_CONFIG],
178 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
179 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
180 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
181 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
182 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
183 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
185 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
186 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
188 if test -n "$PKG_CONFIG"; then
189 _pkg_min_version=m4_default([$1], [0.9.0])
190 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
191 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
198 ])dnl PKG_PROG_PKG_CONFIG
200 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
201 dnl -------------------------------------------------------------------
204 dnl Check to see whether a particular set of modules exists. Similar to
205 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
207 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
208 dnl only at the first occurence in configure.ac, so if the first place
209 dnl it's called might be skipped (such as if it is within an "if", you
210 dnl have to call PKG_CHECK_EXISTS manually
211 AC_DEFUN([PKG_CHECK_EXISTS],
212 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
213 if test -n "$PKG_CONFIG" && \
214 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
215 m4_default([$2], [:])
216 m4_ifvaln([$3], [else
220 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
221 dnl ---------------------------------------------
222 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
223 dnl pkg_failed based on the result.
224 m4_define([_PKG_CONFIG],
225 [if test -n "$$1"; then
227 elif test -n "$PKG_CONFIG"; then
228 PKG_CHECK_EXISTS([$3],
229 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
230 test "x$?" != "x0" && pkg_failed=yes ],
237 dnl _PKG_SHORT_ERRORS_SUPPORTED
238 dnl ---------------------------
239 dnl Internal check to see if pkg-config supports short errors.
240 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
241 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
242 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
243 _pkg_short_errors_supported=yes
245 _pkg_short_errors_supported=no
247 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
250 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
251 dnl [ACTION-IF-NOT-FOUND])
252 dnl --------------------------------------------------------------
255 dnl Note that if there is a possibility the first call to
256 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
257 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
258 AC_DEFUN([PKG_CHECK_MODULES],
259 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
260 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
261 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
264 AC_MSG_CHECKING([for $1])
266 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
267 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
269 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
270 and $1[]_LIBS to avoid the need to call pkg-config.
271 See the pkg-config man page for more details.])
273 if test $pkg_failed = yes; then
275 _PKG_SHORT_ERRORS_SUPPORTED
276 if test $_pkg_short_errors_supported = yes; then
277 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
279 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
281 # Put the nasty error message in config.log where it belongs
282 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
284 m4_default([$4], [AC_MSG_ERROR(
285 [Package requirements ($2) were not met:
289 Consider adjusting the PKG_CONFIG_PATH environment variable if you
290 installed software in a non-standard prefix.
294 elif test $pkg_failed = untried; then
296 m4_default([$4], [AC_MSG_FAILURE(
297 [The pkg-config script could not be found or is too old. Make sure it
298 is in your PATH or set the PKG_CONFIG environment variable to the full
303 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
306 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
307 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
311 ])dnl PKG_CHECK_MODULES
314 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
315 dnl [ACTION-IF-NOT-FOUND])
316 dnl ---------------------------------------------------------------------
319 dnl Checks for existence of MODULES and gathers its build flags with
320 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
321 dnl and VARIABLE-PREFIX_LIBS from --libs.
323 dnl Note that if there is a possibility the first call to
324 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
325 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
327 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
328 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
329 _save_PKG_CONFIG=$PKG_CONFIG
330 PKG_CONFIG="$PKG_CONFIG --static"
331 PKG_CHECK_MODULES($@)
332 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
333 ])dnl PKG_CHECK_MODULES_STATIC
336 dnl PKG_INSTALLDIR([DIRECTORY])
337 dnl -------------------------
340 dnl Substitutes the variable pkgconfigdir as the location where a module
341 dnl should install pkg-config .pc files. By default the directory is
342 dnl $libdir/pkgconfig, but the default can be changed by passing
343 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
345 AC_DEFUN([PKG_INSTALLDIR],
346 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
347 m4_pushdef([pkg_description],
348 [pkg-config installation directory @<:@]pkg_default[@:>@])
349 AC_ARG_WITH([pkgconfigdir],
350 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
351 [with_pkgconfigdir=]pkg_default)
352 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
353 m4_popdef([pkg_default])
354 m4_popdef([pkg_description])
358 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
359 dnl --------------------------------
362 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
363 dnl module should install arch-independent pkg-config .pc files. By
364 dnl default the directory is $datadir/pkgconfig, but the default can be
365 dnl changed by passing DIRECTORY. The user can override through the
366 dnl --with-noarch-pkgconfigdir parameter.
367 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
368 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
369 m4_pushdef([pkg_description],
370 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
371 AC_ARG_WITH([noarch-pkgconfigdir],
372 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
373 [with_noarch_pkgconfigdir=]pkg_default)
374 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
375 m4_popdef([pkg_default])
376 m4_popdef([pkg_description])
377 ])dnl PKG_NOARCH_INSTALLDIR
380 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
381 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
382 dnl -------------------------------------------
385 dnl Retrieves the value of the pkg-config variable for the given module.
386 AC_DEFUN([PKG_CHECK_VAR],
387 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
388 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
390 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
391 AS_VAR_COPY([$1], [pkg_cv_][$1])
393 AS_VAR_IF([$1], [""], [$5], [$4])dnl
396 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
398 # This file is free software; the Free Software Foundation
399 # gives unlimited permission to copy and/or distribute it,
400 # with or without modifications, as long as this notice is preserved.
402 # AM_AUTOMAKE_VERSION(VERSION)
403 # ----------------------------
404 # Automake X.Y traces this macro to ensure aclocal.m4 has been
405 # generated from the m4 files accompanying Automake X.Y.
406 # (This private macro should not be called outside this file.)
407 AC_DEFUN([AM_AUTOMAKE_VERSION],
408 [am__api_version='1.15'
409 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
410 dnl require some minimum version. Point them to the right macro.
411 m4_if([$1], [1.15.1], [],
412 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
415 # _AM_AUTOCONF_VERSION(VERSION)
416 # -----------------------------
417 # aclocal traces this macro to find the Autoconf version.
418 # This is a private macro too. Using m4_define simplifies
419 # the logic in aclocal, which can simply ignore this definition.
420 m4_define([_AM_AUTOCONF_VERSION], [])
422 # AM_SET_CURRENT_AUTOMAKE_VERSION
423 # -------------------------------
424 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
425 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
426 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
427 [AM_AUTOMAKE_VERSION([1.15.1])dnl
428 m4_ifndef([AC_AUTOCONF_VERSION],
429 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
430 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
432 # Copyright (C) 2011-2017 Free Software Foundation, Inc.
434 # This file is free software; the Free Software Foundation
435 # gives unlimited permission to copy and/or distribute it,
436 # with or without modifications, as long as this notice is preserved.
438 # AM_PROG_AR([ACT-IF-FAIL])
439 # -------------------------
440 # Try to determine the archiver interface, and trigger the ar-lib wrapper
441 # if it is needed. If the detection of archiver interface fails, run
442 # ACT-IF-FAIL (default is to abort configure with a proper error message).
443 AC_DEFUN([AM_PROG_AR],
444 [AC_BEFORE([$0], [LT_INIT])dnl
445 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
446 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
447 AC_REQUIRE_AUX_FILE([ar-lib])dnl
448 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
451 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
453 am_cv_ar_interface=ar
454 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
455 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
456 AC_TRY_EVAL([am_ar_try])
457 if test "$ac_status" -eq 0; then
458 am_cv_ar_interface=ar
460 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
461 AC_TRY_EVAL([am_ar_try])
462 if test "$ac_status" -eq 0; then
463 am_cv_ar_interface=lib
465 am_cv_ar_interface=unknown
468 rm -f conftest.lib libconftest.a
472 case $am_cv_ar_interface in
476 # Microsoft lib, so override with the ar-lib wrapper script.
477 # FIXME: It is wrong to rewrite AR.
478 # But if we don't then we get into trouble of one sort or another.
479 # A longer-term fix would be to have automake use am__AR in this case,
480 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
482 AR="$am_aux_dir/ar-lib $AR"
486 [AC_MSG_ERROR([could not determine $AR interface])])
492 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
494 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
496 # This file is free software; the Free Software Foundation
497 # gives unlimited permission to copy and/or distribute it,
498 # with or without modifications, as long as this notice is preserved.
500 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
501 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
502 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
504 # Of course, Automake must honor this variable whenever it calls a
505 # tool from the auxiliary directory. The problem is that $srcdir (and
506 # therefore $ac_aux_dir as well) can be either absolute or relative,
507 # depending on how configure is run. This is pretty annoying, since
508 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
509 # source directory, any form will work fine, but in subdirectories a
510 # relative path needs to be adjusted first.
512 # $ac_aux_dir/missing
513 # fails when called from a subdirectory if $ac_aux_dir is relative
514 # $top_srcdir/$ac_aux_dir/missing
515 # fails if $ac_aux_dir is absolute,
516 # fails when called from a subdirectory in a VPATH build with
517 # a relative $ac_aux_dir
519 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
520 # are both prefixed by $srcdir. In an in-source build this is usually
521 # harmless because $srcdir is '.', but things will broke when you
522 # start a VPATH build or use an absolute $srcdir.
524 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
525 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
526 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
527 # and then we would define $MISSING as
528 # MISSING="\${SHELL} $am_aux_dir/missing"
529 # This will work as long as MISSING is not called from configure, because
530 # unfortunately $(top_srcdir) has no meaning in configure.
531 # However there are other variables, like CC, which are often used in
532 # configure, and could therefore not use this "fixed" $ac_aux_dir.
534 # Another solution, used here, is to always expand $ac_aux_dir to an
535 # absolute PATH. The drawback is that using absolute paths prevent a
536 # configured tree to be moved without reconfiguration.
538 AC_DEFUN([AM_AUX_DIR_EXPAND],
539 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
540 # Expand $ac_aux_dir to an absolute path.
541 am_aux_dir=`cd "$ac_aux_dir" && pwd`
544 # AM_CONDITIONAL -*- Autoconf -*-
546 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
548 # This file is free software; the Free Software Foundation
549 # gives unlimited permission to copy and/or distribute it,
550 # with or without modifications, as long as this notice is preserved.
552 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
553 # -------------------------------------
554 # Define a conditional.
555 AC_DEFUN([AM_CONDITIONAL],
556 [AC_PREREQ([2.52])dnl
557 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
558 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
559 AC_SUBST([$1_TRUE])dnl
560 AC_SUBST([$1_FALSE])dnl
561 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
562 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
563 m4_define([_AM_COND_VALUE_$1], [$2])dnl
571 AC_CONFIG_COMMANDS_PRE(
572 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
573 AC_MSG_ERROR([[conditional "$1" was never defined.
574 Usually this means the macro was only invoked conditionally.]])
577 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
579 # This file is free software; the Free Software Foundation
580 # gives unlimited permission to copy and/or distribute it,
581 # with or without modifications, as long as this notice is preserved.
584 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
585 # written in clear, in which case automake, when reading aclocal.m4,
586 # will think it sees a *use*, and therefore will trigger all it's
587 # C support machinery. Also note that it means that autoscan, seeing
588 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
591 # _AM_DEPENDENCIES(NAME)
592 # ----------------------
593 # See how the compiler implements dependency checking.
594 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
595 # We try a few techniques and use that to set a single cache variable.
597 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
598 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
599 # dependency, and given that the user is not expected to run this macro,
600 # just rely on AC_PROG_CC.
601 AC_DEFUN([_AM_DEPENDENCIES],
602 [AC_REQUIRE([AM_SET_DEPDIR])dnl
603 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
604 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
605 AC_REQUIRE([AM_DEP_TRACK])dnl
607 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
608 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
609 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
610 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
611 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
612 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
613 [depcc="$$1" am_compiler_list=])
615 AC_CACHE_CHECK([dependency style of $depcc],
616 [am_cv_$1_dependencies_compiler_type],
617 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
618 # We make a subdir and do the tests there. Otherwise we can end up
619 # making bogus files that we don't know about and never remove. For
620 # instance it was reported that on HP-UX the gcc test will end up
621 # making a dummy file named 'D' -- because '-MD' means "put the output
625 # Copy depcomp to subdir because otherwise we won't find it if we're
626 # using a relative directory.
627 cp "$am_depcomp" conftest.dir
629 # We will build objects and dependencies in a subdirectory because
630 # it helps to detect inapplicable dependency modes. For instance
631 # both Tru64's cc and ICC support -MD to output dependencies as a
632 # side effect of compilation, but ICC will put the dependencies in
633 # the current directory while Tru64 will put them in the object
637 am_cv_$1_dependencies_compiler_type=none
638 if test "$am_compiler_list" = ""; then
639 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
643 [case " $depcc " in #(
644 *\ -arch\ *\ -arch\ *) am__universal=true ;;
647 [case " $depcc " in #(
648 *\ -arch\ *\ -arch\ *) am__universal=true ;;
651 for depmode in $am_compiler_list; do
652 # Setup a source with many dependencies, because some compilers
653 # like to wrap large dependency lists on column 80 (with \), and
654 # we should not choose a depcomp mode which is confused by this.
656 # We need to recreate these files for each test, as the compiler may
657 # overwrite some of them when testing with obscure command lines.
658 # This happens at least with the AIX C compiler.
660 for i in 1 2 3 4 5 6; do
661 echo '#include "conftst'$i'.h"' >> sub/conftest.c
662 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
663 # Solaris 10 /bin/sh.
664 echo '/* dummy */' > sub/conftst$i.h
666 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
668 # We check with '-c' and '-o' for the sake of the "dashmstdout"
669 # mode. It turns out that the SunPro C++ compiler does not properly
670 # handle '-M -o', and we need to detect this. Also, some Intel
671 # versions had trouble with output in subdirs.
672 am__obj=sub/conftest.${OBJEXT-o}
673 am__minus_obj="-o $am__obj"
676 # This depmode causes a compiler race in universal mode.
677 test "$am__universal" = false || continue
680 # After this tag, mechanisms are not by side-effect, so they'll
681 # only be used when explicitly requested.
682 if test "x$enable_dependency_tracking" = xyes; then
688 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
689 # This compiler won't grok '-c -o', but also, the minuso test has
690 # not run yet. These depmodes are late enough in the game, and
691 # so weak that their functioning should not be impacted.
692 am__obj=conftest.${OBJEXT-o}
697 if depmode=$depmode \
698 source=sub/conftest.c object=$am__obj \
699 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
700 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
701 >/dev/null 2>conftest.err &&
702 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
703 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
704 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
705 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
706 # icc doesn't choke on unknown options, it will just issue warnings
707 # or remarks (even with -Werror). So we grep stderr for any message
708 # that says an option was ignored or not supported.
709 # When given -MP, icc 7.0 and 7.1 complain thusly:
710 # icc: Command line warning: ignoring option '-M'; no argument required
711 # The diagnosis changed in icc 8.0:
712 # icc: Command line remark: option '-MP' not supported
713 if (grep 'ignoring option' conftest.err ||
714 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
715 am_cv_$1_dependencies_compiler_type=$depmode
724 am_cv_$1_dependencies_compiler_type=none
727 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
728 AM_CONDITIONAL([am__fastdep$1], [
729 test "x$enable_dependency_tracking" != xno \
730 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
736 # Choose a directory name for dependency files.
737 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
738 AC_DEFUN([AM_SET_DEPDIR],
739 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
740 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
746 AC_DEFUN([AM_DEP_TRACK],
747 [AC_ARG_ENABLE([dependency-tracking], [dnl
749 [--enable-dependency-tracking],
750 [do not reject slow dependency extractors])
752 [--disable-dependency-tracking],
753 [speeds up one-time build])])
754 if test "x$enable_dependency_tracking" != xno; then
755 am_depcomp="$ac_aux_dir/depcomp"
759 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
760 AC_SUBST([AMDEPBACKSLASH])dnl
761 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
762 AC_SUBST([am__nodep])dnl
763 _AM_SUBST_NOTMAKE([am__nodep])dnl
766 # Generate code to set up dependency tracking. -*- Autoconf -*-
768 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
770 # This file is free software; the Free Software Foundation
771 # gives unlimited permission to copy and/or distribute it,
772 # with or without modifications, as long as this notice is preserved.
775 # _AM_OUTPUT_DEPENDENCY_COMMANDS
776 # ------------------------------
777 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
779 # Older Autoconf quotes --file arguments for eval, but not when files
780 # are listed without --file. Let's play safe and only enable the eval
781 # if we detect the quoting.
782 case $CONFIG_FILES in
783 *\'*) eval set x "$CONFIG_FILES" ;;
784 *) set x $CONFIG_FILES ;;
789 # Strip MF so we end up with the name of the file.
790 mf=`echo "$mf" | sed -e 's/:.*$//'`
791 # Check whether this is an Automake generated Makefile or not.
792 # We used to match only the files named 'Makefile.in', but
793 # some people rename them; so instead we look at the file content.
794 # Grep'ing the first line is not enough: some people post-process
795 # each Makefile.in and add a new line on top of each file to say so.
796 # Grep'ing the whole file is not good either: AIX grep has a line
797 # limit of 2048, but all sed's we know have understand at least 4000.
798 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
799 dirpart=`AS_DIRNAME("$mf")`
803 # Extract the definition of DEPDIR, am__include, and am__quote
804 # from the Makefile without running 'make'.
805 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
806 test -z "$DEPDIR" && continue
807 am__include=`sed -n 's/^am__include = //p' < "$mf"`
808 test -z "$am__include" && continue
809 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
810 # Find all dependency output files, they are included files with
811 # $(DEPDIR) in their names. We invoke sed twice because it is the
812 # simplest approach to changing $(DEPDIR) to its actual value in the
814 for file in `sed -n "
815 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
816 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
817 # Make sure the directory exists.
818 test -f "$dirpart/$file" && continue
819 fdir=`AS_DIRNAME(["$file"])`
820 AS_MKDIR_P([$dirpart/$fdir])
821 # echo "creating $dirpart/$file"
822 echo '# dummy' > "$dirpart/$file"
826 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
829 # AM_OUTPUT_DEPENDENCY_COMMANDS
830 # -----------------------------
831 # This macro should only be invoked once -- use via AC_REQUIRE.
833 # This code is only required when automatic dependency tracking
834 # is enabled. FIXME. This creates each '.P' file that we will
835 # need in order to bootstrap the dependency handling code.
836 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
837 [AC_CONFIG_COMMANDS([depfiles],
838 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
839 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
842 # Do all the work for Automake. -*- Autoconf -*-
844 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
846 # This file is free software; the Free Software Foundation
847 # gives unlimited permission to copy and/or distribute it,
848 # with or without modifications, as long as this notice is preserved.
850 # This macro actually does too much. Some checks are only needed if
851 # your package does certain things. But this isn't really a big deal.
853 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
854 m4_define([AC_PROG_CC],
855 m4_defn([AC_PROG_CC])
859 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
860 # AM_INIT_AUTOMAKE([OPTIONS])
861 # -----------------------------------------------
862 # The call with PACKAGE and VERSION arguments is the old style
863 # call (pre autoconf-2.50), which is being phased out. PACKAGE
864 # and VERSION should now be passed to AC_INIT and removed from
865 # the call to AM_INIT_AUTOMAKE.
866 # We support both call styles for the transition. After
867 # the next Automake release, Autoconf can make the AC_INIT
868 # arguments mandatory, and then we can depend on a new Autoconf
869 # release and drop the old call support.
870 AC_DEFUN([AM_INIT_AUTOMAKE],
871 [AC_PREREQ([2.65])dnl
872 dnl Autoconf wants to disallow AM_ names. We explicitly allow
873 dnl the ones we care about.
874 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
875 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
876 AC_REQUIRE([AC_PROG_INSTALL])dnl
877 if test "`cd $srcdir && pwd`" != "`pwd`"; then
878 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
879 # is not polluted with repeated "-I."
880 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
881 # test to see if srcdir already configured
882 if test -f $srcdir/config.status; then
883 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
887 # test whether we have cygpath
888 if test -z "$CYGPATH_W"; then
889 if (cygpath --version) >/dev/null 2>/dev/null; then
890 CYGPATH_W='cygpath -w'
895 AC_SUBST([CYGPATH_W])
897 # Define the identity of the package.
898 dnl Distinguish between old-style and new-style calls.
900 [AC_DIAGNOSE([obsolete],
901 [$0: two- and three-arguments forms are deprecated.])
902 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
903 AC_SUBST([PACKAGE], [$1])dnl
904 AC_SUBST([VERSION], [$2])],
905 [_AM_SET_OPTIONS([$1])dnl
906 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
908 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
910 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
911 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
912 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
914 _AM_IF_OPTION([no-define],,
915 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
916 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
918 # Some tools Automake needs.
919 AC_REQUIRE([AM_SANITY_CHECK])dnl
920 AC_REQUIRE([AC_ARG_PROGRAM])dnl
921 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
922 AM_MISSING_PROG([AUTOCONF], [autoconf])
923 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
924 AM_MISSING_PROG([AUTOHEADER], [autoheader])
925 AM_MISSING_PROG([MAKEINFO], [makeinfo])
926 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
927 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
928 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
929 # For better backward compatibility. To be removed once Automake 1.9.x
930 # dies out for good. For more background, see:
931 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
932 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
933 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
934 # We need awk for the "check" target (and possibly the TAP driver). The
935 # system "awk" is bad on some platforms.
936 AC_REQUIRE([AC_PROG_AWK])dnl
937 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
938 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
939 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
940 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
941 [_AM_PROG_TAR([v7])])])
942 _AM_IF_OPTION([no-dependencies],,
943 [AC_PROVIDE_IFELSE([AC_PROG_CC],
944 [_AM_DEPENDENCIES([CC])],
945 [m4_define([AC_PROG_CC],
946 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
947 AC_PROVIDE_IFELSE([AC_PROG_CXX],
948 [_AM_DEPENDENCIES([CXX])],
949 [m4_define([AC_PROG_CXX],
950 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
951 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
952 [_AM_DEPENDENCIES([OBJC])],
953 [m4_define([AC_PROG_OBJC],
954 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
955 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
956 [_AM_DEPENDENCIES([OBJCXX])],
957 [m4_define([AC_PROG_OBJCXX],
958 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
960 AC_REQUIRE([AM_SILENT_RULES])dnl
961 dnl The testsuite driver may need to know about EXEEXT, so add the
962 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
963 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
964 AC_CONFIG_COMMANDS_PRE(dnl
965 [m4_provide_if([_AM_COMPILER_EXEEXT],
966 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
968 # POSIX will say in a future version that running "rm -f" with no argument
969 # is OK; and we want to be able to make that assumption in our Makefile
970 # recipes. So use an aggressive probe to check that the usage we want is
971 # actually supported "in the wild" to an acceptable degree.
972 # See automake bug#10828.
973 # To make any issue more visible, cause the running configure to be aborted
974 # by default if the 'rm' program in use doesn't match our expectations; the
975 # user can still override this though.
976 if rm -f && rm -fr && rm -rf; then : OK; else
980 Your 'rm' program seems unable to run without file operands specified
981 on the command line, even when the '-f' option is present. This is contrary
982 to the behaviour of most rm programs out there, and not conforming with
983 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
985 Please tell bug-automake@gnu.org about your system, including the value
986 of your $PATH and any error possibly output before this message. This
987 can help us improve future automake versions.
990 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
991 echo 'Configuration will proceed anyway, since you have set the' >&2
992 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
996 Aborting the configuration process, to ensure you take notice of the issue.
998 You can download and install GNU coreutils to get an 'rm' implementation
999 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1001 If you want to complete the configuration process using your problematic
1002 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1003 to "yes", and re-run configure.
1006 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1009 dnl The trailing newline in this macro's definition is deliberate, for
1010 dnl backward compatibility and to allow trailing 'dnl'-style comments
1011 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1014 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1015 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1016 dnl mangled by Autoconf and run in a shell conditional statement.
1017 m4_define([_AC_COMPILER_EXEEXT],
1018 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1020 # When config.status generates a header, we must update the stamp-h file.
1021 # This file resides in the same directory as the config header
1022 # that is generated. The stamp files are numbered to have different names.
1024 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1025 # loop where config.status creates the headers, so we can generate
1026 # our stamp files there.
1027 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1028 [# Compute $1's index in $config_headers.
1031 for _am_header in $config_headers :; do
1033 $_am_arg | $_am_arg:* )
1036 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1039 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1041 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1043 # This file is free software; the Free Software Foundation
1044 # gives unlimited permission to copy and/or distribute it,
1045 # with or without modifications, as long as this notice is preserved.
1047 # AM_PROG_INSTALL_SH
1048 # ------------------
1049 # Define $install_sh.
1050 AC_DEFUN([AM_PROG_INSTALL_SH],
1051 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1052 if test x"${install_sh+set}" != xset; then
1055 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1057 install_sh="\${SHELL} $am_aux_dir/install-sh"
1060 AC_SUBST([install_sh])])
1062 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
1064 # This file is free software; the Free Software Foundation
1065 # gives unlimited permission to copy and/or distribute it,
1066 # with or without modifications, as long as this notice is preserved.
1068 # Check whether the underlying file-system supports filenames
1069 # with a leading dot. For instance MS-DOS doesn't.
1070 AC_DEFUN([AM_SET_LEADING_DOT],
1071 [rm -rf .tst 2>/dev/null
1072 mkdir .tst 2>/dev/null
1073 if test -d .tst; then
1078 rmdir .tst 2>/dev/null
1079 AC_SUBST([am__leading_dot])])
1081 # Check to see how 'make' treats includes. -*- Autoconf -*-
1083 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1085 # This file is free software; the Free Software Foundation
1086 # gives unlimited permission to copy and/or distribute it,
1087 # with or without modifications, as long as this notice is preserved.
1091 # Check to see how make treats includes.
1092 AC_DEFUN([AM_MAKE_INCLUDE],
1093 [am_make=${MAKE-make}
1094 cat > confinc << 'END'
1096 @echo this is the am__doit target
1099 # If we don't find an include directive, just comment out the code.
1100 AC_MSG_CHECKING([for style of include used by $am_make])
1104 # First try GNU make style include.
1105 echo "include confinc" > confmf
1106 # Ignore all kinds of additional output from 'make'.
1107 case `$am_make -s -f confmf 2> /dev/null` in #(
1108 *the\ am__doit\ target*)
1114 # Now try BSD make style include.
1115 if test "$am__include" = "#"; then
1116 echo '.include "confinc"' > confmf
1117 case `$am_make -s -f confmf 2> /dev/null` in #(
1118 *the\ am__doit\ target*)
1119 am__include=.include
1125 AC_SUBST([am__include])
1126 AC_SUBST([am__quote])
1127 AC_MSG_RESULT([$_am_result])
1128 rm -f confinc confmf
1131 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1133 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
1135 # This file is free software; the Free Software Foundation
1136 # gives unlimited permission to copy and/or distribute it,
1137 # with or without modifications, as long as this notice is preserved.
1139 # AM_MISSING_PROG(NAME, PROGRAM)
1140 # ------------------------------
1141 AC_DEFUN([AM_MISSING_PROG],
1142 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1143 $1=${$1-"${am_missing_run}$2"}
1146 # AM_MISSING_HAS_RUN
1147 # ------------------
1148 # Define MISSING if not defined so far and test if it is modern enough.
1149 # If it is, set am_missing_run to use it, otherwise, to nothing.
1150 AC_DEFUN([AM_MISSING_HAS_RUN],
1151 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1152 AC_REQUIRE_AUX_FILE([missing])dnl
1153 if test x"${MISSING+set}" != xset; then
1156 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1158 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1161 # Use eval to expand $SHELL
1162 if eval "$MISSING --is-lightweight"; then
1163 am_missing_run="$MISSING "
1166 AC_MSG_WARN(['missing' script is too old or missing])
1170 # Helper functions for option handling. -*- Autoconf -*-
1172 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1174 # This file is free software; the Free Software Foundation
1175 # gives unlimited permission to copy and/or distribute it,
1176 # with or without modifications, as long as this notice is preserved.
1178 # _AM_MANGLE_OPTION(NAME)
1179 # -----------------------
1180 AC_DEFUN([_AM_MANGLE_OPTION],
1181 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1183 # _AM_SET_OPTION(NAME)
1184 # --------------------
1185 # Set option NAME. Presently that only means defining a flag for this option.
1186 AC_DEFUN([_AM_SET_OPTION],
1187 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1189 # _AM_SET_OPTIONS(OPTIONS)
1190 # ------------------------
1191 # OPTIONS is a space-separated list of Automake options.
1192 AC_DEFUN([_AM_SET_OPTIONS],
1193 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1195 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1196 # -------------------------------------------
1197 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1198 AC_DEFUN([_AM_IF_OPTION],
1199 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1201 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
1203 # This file is free software; the Free Software Foundation
1204 # gives unlimited permission to copy and/or distribute it,
1205 # with or without modifications, as long as this notice is preserved.
1209 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1210 # to automatically call this.
1211 AC_DEFUN([_AM_PROG_CC_C_O],
1212 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1213 AC_REQUIRE_AUX_FILE([compile])dnl
1214 AC_LANG_PUSH([C])dnl
1216 [whether $CC understands -c and -o together],
1217 [am_cv_prog_cc_c_o],
1218 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1219 # Make sure it works both with $CC and with simple cc.
1220 # Following AC_PROG_CC_C_O, we do the test twice because some
1221 # compilers refuse to overwrite an existing .o file with -o,
1222 # though they will create one.
1223 am_cv_prog_cc_c_o=yes
1225 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1226 && test -f conftest2.$ac_objext; then
1229 am_cv_prog_cc_c_o=no
1233 rm -f core conftest*
1235 if test "$am_cv_prog_cc_c_o" != yes; then
1236 # Losing compiler, so override with the script.
1237 # FIXME: It is wrong to rewrite CC.
1238 # But if we don't then we get into trouble of one sort or another.
1239 # A longer-term fix would be to have automake use am__CC in this case,
1240 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1241 CC="$am_aux_dir/compile $CC"
1245 # For backward compatibility.
1246 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1248 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1250 # This file is free software; the Free Software Foundation
1251 # gives unlimited permission to copy and/or distribute it,
1252 # with or without modifications, as long as this notice is preserved.
1254 # AM_RUN_LOG(COMMAND)
1255 # -------------------
1256 # Run COMMAND, save the exit status in ac_status, and log it.
1257 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1258 AC_DEFUN([AM_RUN_LOG],
1259 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1260 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1262 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1263 (exit $ac_status); }])
1265 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1267 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1269 # This file is free software; the Free Software Foundation
1270 # gives unlimited permission to copy and/or distribute it,
1271 # with or without modifications, as long as this notice is preserved.
1275 AC_DEFUN([AM_SANITY_CHECK],
1276 [AC_MSG_CHECKING([whether build environment is sane])
1277 # Reject unsafe characters in $srcdir or the absolute working directory
1278 # name. Accept space and tab only in the latter.
1282 *[[\\\"\#\$\&\'\`$am_lf]]*)
1283 AC_MSG_ERROR([unsafe absolute working directory name]);;
1286 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1287 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1290 # Do 'set' in a subshell so we don't clobber the current shell's
1291 # arguments. Must try -L first in case configure is actually a
1292 # symlink; some systems play weird games with the mod time of symlinks
1293 # (eg FreeBSD returns the mod time of the symlink's containing
1297 for am_try in 1 2; do
1298 echo "timestamp, slept: $am_has_slept" > conftest.file
1299 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1300 if test "$[*]" = "X"; then
1302 set X `ls -t "$srcdir/configure" conftest.file`
1304 if test "$[*]" != "X $srcdir/configure conftest.file" \
1305 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1307 # If neither matched, then we have a broken ls. This can happen
1308 # if, for instance, CONFIG_SHELL is bash and it inherits a
1309 # broken ls alias from the environment. This has actually
1310 # happened. Such a system could not be considered "sane".
1311 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1312 alias in your environment])
1314 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1321 test "$[2]" = conftest.file
1327 AC_MSG_ERROR([newly created file is older than distributed files!
1328 Check your system clock])
1330 AC_MSG_RESULT([yes])
1331 # If we didn't sleep, we still need to ensure time stamps of config.status and
1332 # generated files are strictly newer.
1334 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1338 AC_CONFIG_COMMANDS_PRE(
1339 [AC_MSG_CHECKING([that generated files are newer than configure])
1340 if test -n "$am_sleep_pid"; then
1341 # Hide warnings about reused PIDs.
1342 wait $am_sleep_pid 2>/dev/null
1344 AC_MSG_RESULT([done])])
1348 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
1350 # This file is free software; the Free Software Foundation
1351 # gives unlimited permission to copy and/or distribute it,
1352 # with or without modifications, as long as this notice is preserved.
1354 # AM_SILENT_RULES([DEFAULT])
1355 # --------------------------
1356 # Enable less verbose build rules; with the default set to DEFAULT
1357 # ("yes" being less verbose, "no" or empty being verbose).
1358 AC_DEFUN([AM_SILENT_RULES],
1359 [AC_ARG_ENABLE([silent-rules], [dnl
1361 [--enable-silent-rules],
1362 [less verbose build output (undo: "make V=1")])
1364 [--disable-silent-rules],
1365 [verbose build output (undo: "make V=0")])dnl
1367 case $enable_silent_rules in @%:@ (((
1368 yes) AM_DEFAULT_VERBOSITY=0;;
1369 no) AM_DEFAULT_VERBOSITY=1;;
1370 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1373 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1374 dnl do not support nested variable expansions.
1375 dnl See automake bug#9928 and bug#10237.
1376 am_make=${MAKE-make}
1377 AC_CACHE_CHECK([whether $am_make supports nested variables],
1378 [am_cv_make_support_nested_variables],
1379 [if AS_ECHO([['TRUE=$(BAR$(V))
1385 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1386 am_cv_make_support_nested_variables=yes
1388 am_cv_make_support_nested_variables=no
1390 if test $am_cv_make_support_nested_variables = yes; then
1391 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1393 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1395 AM_V=$AM_DEFAULT_VERBOSITY
1396 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1399 AM_SUBST_NOTMAKE([AM_V])dnl
1400 AC_SUBST([AM_DEFAULT_V])dnl
1401 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1402 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1404 AC_SUBST([AM_BACKSLASH])dnl
1405 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1408 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
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.
1414 # AM_PROG_INSTALL_STRIP
1415 # ---------------------
1416 # One issue with vendor 'install' (even GNU) is that you can't
1417 # specify the program used to strip binaries. This is especially
1418 # annoying in cross-compiling environments, where the build's strip
1419 # is unlikely to handle the host's binaries.
1420 # Fortunately install-sh will honor a STRIPPROG variable, so we
1421 # always use install-sh in "make install-strip", and initialize
1422 # STRIPPROG with the value of the STRIP variable (set by the user).
1423 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1424 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1425 # Installed binaries are usually stripped using 'strip' when the user
1426 # run "make install-strip". However 'strip' might not be the right
1427 # tool to use in cross-compilation environments, therefore Automake
1428 # will honor the 'STRIP' environment variable to overrule this program.
1429 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1430 if test "$cross_compiling" != no; then
1431 AC_CHECK_TOOL([STRIP], [strip], :)
1433 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1434 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1436 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
1438 # This file is free software; the Free Software Foundation
1439 # gives unlimited permission to copy and/or distribute it,
1440 # with or without modifications, as long as this notice is preserved.
1442 # _AM_SUBST_NOTMAKE(VARIABLE)
1443 # ---------------------------
1444 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1445 # This macro is traced by Automake.
1446 AC_DEFUN([_AM_SUBST_NOTMAKE])
1448 # AM_SUBST_NOTMAKE(VARIABLE)
1449 # --------------------------
1450 # Public sister of _AM_SUBST_NOTMAKE.
1451 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1453 # Check how to create a tarball. -*- Autoconf -*-
1455 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
1457 # This file is free software; the Free Software Foundation
1458 # gives unlimited permission to copy and/or distribute it,
1459 # with or without modifications, as long as this notice is preserved.
1461 # _AM_PROG_TAR(FORMAT)
1462 # --------------------
1463 # Check how to create a tarball in format FORMAT.
1464 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1466 # Substitute a variable $(am__tar) that is a command
1467 # writing to stdout a FORMAT-tarball containing the directory
1469 # tardir=directory && $(am__tar) > result.tar
1471 # Substitute a variable $(am__untar) that extract such
1472 # a tarball read from stdin.
1473 # $(am__untar) < result.tar
1475 AC_DEFUN([_AM_PROG_TAR],
1476 [# Always define AMTAR for backward compatibility. Yes, it's still used
1477 # in the wild :-( We should find a proper way to deprecate it ...
1478 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1480 # We'll loop over all known methods to create a tar archive until one works.
1481 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1484 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1488 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1489 # There is notably a 21 bits limit for the UID and the GID. In fact,
1490 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1492 am_max_uid=2097151 # 2^21 - 1
1493 am_max_gid=$am_max_uid
1494 # The $UID and $GID variables are not portable, so we need to resort
1495 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1496 # below are definitely unexpected, so allow the users to see them
1497 # (that is, avoid stderr redirection).
1498 am_uid=`id -u || echo unknown`
1499 am_gid=`id -g || echo unknown`
1500 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1501 if test $am_uid -le $am_max_uid; then
1502 AC_MSG_RESULT([yes])
1507 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1508 if test $am_gid -le $am_max_gid; then
1509 AC_MSG_RESULT([yes])
1518 [m4_fatal([Unknown tar format])])
1520 AC_MSG_CHECKING([how to create a $1 tar archive])
1522 # Go ahead even if we have the value already cached. We do so because we
1523 # need to set the values for the 'am__tar' and 'am__untar' variables.
1524 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1526 for _am_tool in $_am_tools; do
1529 for _am_tar in tar gnutar gtar; do
1530 AM_RUN_LOG([$_am_tar --version]) && break
1532 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1533 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1534 am__untar="$_am_tar -xf -"
1537 # Must skip GNU tar: if it does not support --format= it doesn't create
1538 # ustar tarball either.
1539 (tar --version) >/dev/null 2>&1 && continue
1540 am__tar='tar chf - "$$tardir"'
1541 am__tar_='tar chf - "$tardir"'
1542 am__untar='tar xf -'
1545 am__tar='pax -L -x $1 -w "$$tardir"'
1546 am__tar_='pax -L -x $1 -w "$tardir"'
1550 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1551 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1552 am__untar='cpio -i -H $1 -d'
1561 # If the value was cached, stop now. We just wanted to have am__tar
1562 # and am__untar set.
1563 test -n "${am_cv_prog_tar_$1}" && break
1565 # tar/untar a dummy directory, and stop if the command works.
1568 echo GrepMe > conftest.dir/file
1569 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1571 if test -s conftest.tar; then
1572 AM_RUN_LOG([$am__untar <conftest.tar])
1573 AM_RUN_LOG([cat conftest.dir/file])
1574 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1579 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1580 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1583 AC_SUBST([am__untar])
1586 m4_include([m4/ax_check_link_flag.m4])
1587 m4_include([m4/ax_code_coverage.m4])
1588 m4_include([m4/ax_pthread.m4])
1589 m4_include([m4/gtk-doc.m4])
1590 m4_include([m4/libtool.m4])
1591 m4_include([m4/ltoptions.m4])
1592 m4_include([m4/ltsugar.m4])
1593 m4_include([m4/ltversion.m4])
1594 m4_include([m4/lt~obsolete.m4])