annotate src/libsndfile-1.0.27/aclocal.m4 @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 1df64224f5ac
children
rev   line source
Chris@40 1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
Chris@40 2
Chris@40 3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
Chris@40 4
Chris@40 5 # This file is free software; the Free Software Foundation
Chris@40 6 # gives unlimited permission to copy and/or distribute it,
Chris@40 7 # with or without modifications, as long as this notice is preserved.
Chris@40 8
Chris@40 9 # This program is distributed in the hope that it will be useful,
Chris@40 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
Chris@40 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
Chris@40 12 # PARTICULAR PURPOSE.
Chris@40 13
Chris@40 14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
Chris@40 15 m4_ifndef([AC_AUTOCONF_VERSION],
Chris@40 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
Chris@40 17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
Chris@40 18 [m4_warning([this file was generated for autoconf 2.69.
Chris@40 19 You have another version of autoconf. It may work, but is not guaranteed to.
Chris@40 20 If you have problems, you may need to regenerate the build system entirely.
Chris@40 21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
Chris@40 22
Chris@40 23 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
Chris@40 24 dnl serial 11 (pkg-config-0.29)
Chris@40 25 dnl
Chris@40 26 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
Chris@40 27 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
Chris@40 28 dnl
Chris@40 29 dnl This program is free software; you can redistribute it and/or modify
Chris@40 30 dnl it under the terms of the GNU General Public License as published by
Chris@40 31 dnl the Free Software Foundation; either version 2 of the License, or
Chris@40 32 dnl (at your option) any later version.
Chris@40 33 dnl
Chris@40 34 dnl This program is distributed in the hope that it will be useful, but
Chris@40 35 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@40 36 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Chris@40 37 dnl General Public License for more details.
Chris@40 38 dnl
Chris@40 39 dnl You should have received a copy of the GNU General Public License
Chris@40 40 dnl along with this program; if not, write to the Free Software
Chris@40 41 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@40 42 dnl 02111-1307, USA.
Chris@40 43 dnl
Chris@40 44 dnl As a special exception to the GNU General Public License, if you
Chris@40 45 dnl distribute this file as part of a program that contains a
Chris@40 46 dnl configuration script generated by Autoconf, you may include it under
Chris@40 47 dnl the same distribution terms that you use for the rest of that
Chris@40 48 dnl program.
Chris@40 49
Chris@40 50 dnl PKG_PREREQ(MIN-VERSION)
Chris@40 51 dnl -----------------------
Chris@40 52 dnl Since: 0.29
Chris@40 53 dnl
Chris@40 54 dnl Verify that the version of the pkg-config macros are at least
Chris@40 55 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
Chris@40 56 dnl installed version of pkg-config, this checks the developer's version
Chris@40 57 dnl of pkg.m4 when generating configure.
Chris@40 58 dnl
Chris@40 59 dnl To ensure that this macro is defined, also add:
Chris@40 60 dnl m4_ifndef([PKG_PREREQ],
Chris@40 61 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
Chris@40 62 dnl
Chris@40 63 dnl See the "Since" comment for each macro you use to see what version
Chris@40 64 dnl of the macros you require.
Chris@40 65 m4_defun([PKG_PREREQ],
Chris@40 66 [m4_define([PKG_MACROS_VERSION], [0.29])
Chris@40 67 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
Chris@40 68 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
Chris@40 69 ])dnl PKG_PREREQ
Chris@40 70
Chris@40 71 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
Chris@40 72 dnl ----------------------------------
Chris@40 73 dnl Since: 0.16
Chris@40 74 dnl
Chris@40 75 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
Chris@40 76 dnl first found in the path. Checks that the version of pkg-config found
Chris@40 77 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
Chris@40 78 dnl used since that's the first version where most current features of
Chris@40 79 dnl pkg-config existed.
Chris@40 80 AC_DEFUN([PKG_PROG_PKG_CONFIG],
Chris@40 81 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
Chris@40 82 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
Chris@40 83 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
Chris@40 84 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
Chris@40 85 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
Chris@40 86 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
Chris@40 87
Chris@40 88 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
Chris@40 89 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
Chris@40 90 fi
Chris@40 91 if test -n "$PKG_CONFIG"; then
Chris@40 92 _pkg_min_version=m4_default([$1], [0.9.0])
Chris@40 93 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
Chris@40 94 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Chris@40 95 AC_MSG_RESULT([yes])
Chris@40 96 else
Chris@40 97 AC_MSG_RESULT([no])
Chris@40 98 PKG_CONFIG=""
Chris@40 99 fi
Chris@40 100 fi[]dnl
Chris@40 101 ])dnl PKG_PROG_PKG_CONFIG
Chris@40 102
Chris@40 103 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
Chris@40 104 dnl -------------------------------------------------------------------
Chris@40 105 dnl Since: 0.18
Chris@40 106 dnl
Chris@40 107 dnl Check to see whether a particular set of modules exists. Similar to
Chris@40 108 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
Chris@40 109 dnl
Chris@40 110 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
Chris@40 111 dnl only at the first occurence in configure.ac, so if the first place
Chris@40 112 dnl it's called might be skipped (such as if it is within an "if", you
Chris@40 113 dnl have to call PKG_CHECK_EXISTS manually
Chris@40 114 AC_DEFUN([PKG_CHECK_EXISTS],
Chris@40 115 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Chris@40 116 if test -n "$PKG_CONFIG" && \
Chris@40 117 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
Chris@40 118 m4_default([$2], [:])
Chris@40 119 m4_ifvaln([$3], [else
Chris@40 120 $3])dnl
Chris@40 121 fi])
Chris@40 122
Chris@40 123 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
Chris@40 124 dnl ---------------------------------------------
Chris@40 125 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
Chris@40 126 dnl pkg_failed based on the result.
Chris@40 127 m4_define([_PKG_CONFIG],
Chris@40 128 [if test -n "$$1"; then
Chris@40 129 pkg_cv_[]$1="$$1"
Chris@40 130 elif test -n "$PKG_CONFIG"; then
Chris@40 131 PKG_CHECK_EXISTS([$3],
Chris@40 132 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
Chris@40 133 test "x$?" != "x0" && pkg_failed=yes ],
Chris@40 134 [pkg_failed=yes])
Chris@40 135 else
Chris@40 136 pkg_failed=untried
Chris@40 137 fi[]dnl
Chris@40 138 ])dnl _PKG_CONFIG
Chris@40 139
Chris@40 140 dnl _PKG_SHORT_ERRORS_SUPPORTED
Chris@40 141 dnl ---------------------------
Chris@40 142 dnl Internal check to see if pkg-config supports short errors.
Chris@40 143 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
Chris@40 144 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
Chris@40 145 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
Chris@40 146 _pkg_short_errors_supported=yes
Chris@40 147 else
Chris@40 148 _pkg_short_errors_supported=no
Chris@40 149 fi[]dnl
Chris@40 150 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
Chris@40 151
Chris@40 152
Chris@40 153 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
Chris@40 154 dnl [ACTION-IF-NOT-FOUND])
Chris@40 155 dnl --------------------------------------------------------------
Chris@40 156 dnl Since: 0.4.0
Chris@40 157 dnl
Chris@40 158 dnl Note that if there is a possibility the first call to
Chris@40 159 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
Chris@40 160 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
Chris@40 161 AC_DEFUN([PKG_CHECK_MODULES],
Chris@40 162 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Chris@40 163 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
Chris@40 164 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
Chris@40 165
Chris@40 166 pkg_failed=no
Chris@40 167 AC_MSG_CHECKING([for $1])
Chris@40 168
Chris@40 169 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
Chris@40 170 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
Chris@40 171
Chris@40 172 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
Chris@40 173 and $1[]_LIBS to avoid the need to call pkg-config.
Chris@40 174 See the pkg-config man page for more details.])
Chris@40 175
Chris@40 176 if test $pkg_failed = yes; then
Chris@40 177 AC_MSG_RESULT([no])
Chris@40 178 _PKG_SHORT_ERRORS_SUPPORTED
Chris@40 179 if test $_pkg_short_errors_supported = yes; then
Chris@40 180 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
Chris@40 181 else
Chris@40 182 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
Chris@40 183 fi
Chris@40 184 # Put the nasty error message in config.log where it belongs
Chris@40 185 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
Chris@40 186
Chris@40 187 m4_default([$4], [AC_MSG_ERROR(
Chris@40 188 [Package requirements ($2) were not met:
Chris@40 189
Chris@40 190 $$1_PKG_ERRORS
Chris@40 191
Chris@40 192 Consider adjusting the PKG_CONFIG_PATH environment variable if you
Chris@40 193 installed software in a non-standard prefix.
Chris@40 194
Chris@40 195 _PKG_TEXT])[]dnl
Chris@40 196 ])
Chris@40 197 elif test $pkg_failed = untried; then
Chris@40 198 AC_MSG_RESULT([no])
Chris@40 199 m4_default([$4], [AC_MSG_FAILURE(
Chris@40 200 [The pkg-config script could not be found or is too old. Make sure it
Chris@40 201 is in your PATH or set the PKG_CONFIG environment variable to the full
Chris@40 202 path to pkg-config.
Chris@40 203
Chris@40 204 _PKG_TEXT
Chris@40 205
Chris@40 206 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
Chris@40 207 ])
Chris@40 208 else
Chris@40 209 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
Chris@40 210 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
Chris@40 211 AC_MSG_RESULT([yes])
Chris@40 212 $3
Chris@40 213 fi[]dnl
Chris@40 214 ])dnl PKG_CHECK_MODULES
Chris@40 215
Chris@40 216
Chris@40 217 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
Chris@40 218 dnl [ACTION-IF-NOT-FOUND])
Chris@40 219 dnl ---------------------------------------------------------------------
Chris@40 220 dnl Since: 0.29
Chris@40 221 dnl
Chris@40 222 dnl Checks for existence of MODULES and gathers its build flags with
Chris@40 223 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
Chris@40 224 dnl and VARIABLE-PREFIX_LIBS from --libs.
Chris@40 225 dnl
Chris@40 226 dnl Note that if there is a possibility the first call to
Chris@40 227 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
Chris@40 228 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
Chris@40 229 dnl configure.ac.
Chris@40 230 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
Chris@40 231 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Chris@40 232 _save_PKG_CONFIG=$PKG_CONFIG
Chris@40 233 PKG_CONFIG="$PKG_CONFIG --static"
Chris@40 234 PKG_CHECK_MODULES($@)
Chris@40 235 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
Chris@40 236 ])dnl PKG_CHECK_MODULES_STATIC
Chris@40 237
Chris@40 238
Chris@40 239 dnl PKG_INSTALLDIR([DIRECTORY])
Chris@40 240 dnl -------------------------
Chris@40 241 dnl Since: 0.27
Chris@40 242 dnl
Chris@40 243 dnl Substitutes the variable pkgconfigdir as the location where a module
Chris@40 244 dnl should install pkg-config .pc files. By default the directory is
Chris@40 245 dnl $libdir/pkgconfig, but the default can be changed by passing
Chris@40 246 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
Chris@40 247 dnl parameter.
Chris@40 248 AC_DEFUN([PKG_INSTALLDIR],
Chris@40 249 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
Chris@40 250 m4_pushdef([pkg_description],
Chris@40 251 [pkg-config installation directory @<:@]pkg_default[@:>@])
Chris@40 252 AC_ARG_WITH([pkgconfigdir],
Chris@40 253 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
Chris@40 254 [with_pkgconfigdir=]pkg_default)
Chris@40 255 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
Chris@40 256 m4_popdef([pkg_default])
Chris@40 257 m4_popdef([pkg_description])
Chris@40 258 ])dnl PKG_INSTALLDIR
Chris@40 259
Chris@40 260
Chris@40 261 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
Chris@40 262 dnl --------------------------------
Chris@40 263 dnl Since: 0.27
Chris@40 264 dnl
Chris@40 265 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
Chris@40 266 dnl module should install arch-independent pkg-config .pc files. By
Chris@40 267 dnl default the directory is $datadir/pkgconfig, but the default can be
Chris@40 268 dnl changed by passing DIRECTORY. The user can override through the
Chris@40 269 dnl --with-noarch-pkgconfigdir parameter.
Chris@40 270 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
Chris@40 271 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
Chris@40 272 m4_pushdef([pkg_description],
Chris@40 273 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
Chris@40 274 AC_ARG_WITH([noarch-pkgconfigdir],
Chris@40 275 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
Chris@40 276 [with_noarch_pkgconfigdir=]pkg_default)
Chris@40 277 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
Chris@40 278 m4_popdef([pkg_default])
Chris@40 279 m4_popdef([pkg_description])
Chris@40 280 ])dnl PKG_NOARCH_INSTALLDIR
Chris@40 281
Chris@40 282
Chris@40 283 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
Chris@40 284 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
Chris@40 285 dnl -------------------------------------------
Chris@40 286 dnl Since: 0.28
Chris@40 287 dnl
Chris@40 288 dnl Retrieves the value of the pkg-config variable for the given module.
Chris@40 289 AC_DEFUN([PKG_CHECK_VAR],
Chris@40 290 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Chris@40 291 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
Chris@40 292
Chris@40 293 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
Chris@40 294 AS_VAR_COPY([$1], [pkg_cv_][$1])
Chris@40 295
Chris@40 296 AS_VAR_IF([$1], [""], [$5], [$4])dnl
Chris@40 297 ])dnl PKG_CHECK_VAR
Chris@40 298
Chris@40 299 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
Chris@40 300 #
Chris@40 301 # This file is free software; the Free Software Foundation
Chris@40 302 # gives unlimited permission to copy and/or distribute it,
Chris@40 303 # with or without modifications, as long as this notice is preserved.
Chris@40 304
Chris@40 305 # AM_AUTOMAKE_VERSION(VERSION)
Chris@40 306 # ----------------------------
Chris@40 307 # Automake X.Y traces this macro to ensure aclocal.m4 has been
Chris@40 308 # generated from the m4 files accompanying Automake X.Y.
Chris@40 309 # (This private macro should not be called outside this file.)
Chris@40 310 AC_DEFUN([AM_AUTOMAKE_VERSION],
Chris@40 311 [am__api_version='1.15'
Chris@40 312 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
Chris@40 313 dnl require some minimum version. Point them to the right macro.
Chris@40 314 m4_if([$1], [1.15], [],
Chris@40 315 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
Chris@40 316 ])
Chris@40 317
Chris@40 318 # _AM_AUTOCONF_VERSION(VERSION)
Chris@40 319 # -----------------------------
Chris@40 320 # aclocal traces this macro to find the Autoconf version.
Chris@40 321 # This is a private macro too. Using m4_define simplifies
Chris@40 322 # the logic in aclocal, which can simply ignore this definition.
Chris@40 323 m4_define([_AM_AUTOCONF_VERSION], [])
Chris@40 324
Chris@40 325 # AM_SET_CURRENT_AUTOMAKE_VERSION
Chris@40 326 # -------------------------------
Chris@40 327 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
Chris@40 328 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
Chris@40 329 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
Chris@40 330 [AM_AUTOMAKE_VERSION([1.15])dnl
Chris@40 331 m4_ifndef([AC_AUTOCONF_VERSION],
Chris@40 332 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
Chris@40 333 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
Chris@40 334
Chris@40 335 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
Chris@40 336
Chris@40 337 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 338 #
Chris@40 339 # This file is free software; the Free Software Foundation
Chris@40 340 # gives unlimited permission to copy and/or distribute it,
Chris@40 341 # with or without modifications, as long as this notice is preserved.
Chris@40 342
Chris@40 343 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
Chris@40 344 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
Chris@40 345 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
Chris@40 346 #
Chris@40 347 # Of course, Automake must honor this variable whenever it calls a
Chris@40 348 # tool from the auxiliary directory. The problem is that $srcdir (and
Chris@40 349 # therefore $ac_aux_dir as well) can be either absolute or relative,
Chris@40 350 # depending on how configure is run. This is pretty annoying, since
Chris@40 351 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
Chris@40 352 # source directory, any form will work fine, but in subdirectories a
Chris@40 353 # relative path needs to be adjusted first.
Chris@40 354 #
Chris@40 355 # $ac_aux_dir/missing
Chris@40 356 # fails when called from a subdirectory if $ac_aux_dir is relative
Chris@40 357 # $top_srcdir/$ac_aux_dir/missing
Chris@40 358 # fails if $ac_aux_dir is absolute,
Chris@40 359 # fails when called from a subdirectory in a VPATH build with
Chris@40 360 # a relative $ac_aux_dir
Chris@40 361 #
Chris@40 362 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
Chris@40 363 # are both prefixed by $srcdir. In an in-source build this is usually
Chris@40 364 # harmless because $srcdir is '.', but things will broke when you
Chris@40 365 # start a VPATH build or use an absolute $srcdir.
Chris@40 366 #
Chris@40 367 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
Chris@40 368 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
Chris@40 369 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
Chris@40 370 # and then we would define $MISSING as
Chris@40 371 # MISSING="\${SHELL} $am_aux_dir/missing"
Chris@40 372 # This will work as long as MISSING is not called from configure, because
Chris@40 373 # unfortunately $(top_srcdir) has no meaning in configure.
Chris@40 374 # However there are other variables, like CC, which are often used in
Chris@40 375 # configure, and could therefore not use this "fixed" $ac_aux_dir.
Chris@40 376 #
Chris@40 377 # Another solution, used here, is to always expand $ac_aux_dir to an
Chris@40 378 # absolute PATH. The drawback is that using absolute paths prevent a
Chris@40 379 # configured tree to be moved without reconfiguration.
Chris@40 380
Chris@40 381 AC_DEFUN([AM_AUX_DIR_EXPAND],
Chris@40 382 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@40 383 # Expand $ac_aux_dir to an absolute path.
Chris@40 384 am_aux_dir=`cd "$ac_aux_dir" && pwd`
Chris@40 385 ])
Chris@40 386
Chris@40 387 # AM_CONDITIONAL -*- Autoconf -*-
Chris@40 388
Chris@40 389 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
Chris@40 390 #
Chris@40 391 # This file is free software; the Free Software Foundation
Chris@40 392 # gives unlimited permission to copy and/or distribute it,
Chris@40 393 # with or without modifications, as long as this notice is preserved.
Chris@40 394
Chris@40 395 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
Chris@40 396 # -------------------------------------
Chris@40 397 # Define a conditional.
Chris@40 398 AC_DEFUN([AM_CONDITIONAL],
Chris@40 399 [AC_PREREQ([2.52])dnl
Chris@40 400 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
Chris@40 401 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
Chris@40 402 AC_SUBST([$1_TRUE])dnl
Chris@40 403 AC_SUBST([$1_FALSE])dnl
Chris@40 404 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
Chris@40 405 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
Chris@40 406 m4_define([_AM_COND_VALUE_$1], [$2])dnl
Chris@40 407 if $2; then
Chris@40 408 $1_TRUE=
Chris@40 409 $1_FALSE='#'
Chris@40 410 else
Chris@40 411 $1_TRUE='#'
Chris@40 412 $1_FALSE=
Chris@40 413 fi
Chris@40 414 AC_CONFIG_COMMANDS_PRE(
Chris@40 415 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
Chris@40 416 AC_MSG_ERROR([[conditional "$1" was never defined.
Chris@40 417 Usually this means the macro was only invoked conditionally.]])
Chris@40 418 fi])])
Chris@40 419
Chris@40 420 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
Chris@40 421 #
Chris@40 422 # This file is free software; the Free Software Foundation
Chris@40 423 # gives unlimited permission to copy and/or distribute it,
Chris@40 424 # with or without modifications, as long as this notice is preserved.
Chris@40 425
Chris@40 426
Chris@40 427 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
Chris@40 428 # written in clear, in which case automake, when reading aclocal.m4,
Chris@40 429 # will think it sees a *use*, and therefore will trigger all it's
Chris@40 430 # C support machinery. Also note that it means that autoscan, seeing
Chris@40 431 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
Chris@40 432
Chris@40 433
Chris@40 434 # _AM_DEPENDENCIES(NAME)
Chris@40 435 # ----------------------
Chris@40 436 # See how the compiler implements dependency checking.
Chris@40 437 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
Chris@40 438 # We try a few techniques and use that to set a single cache variable.
Chris@40 439 #
Chris@40 440 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
Chris@40 441 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
Chris@40 442 # dependency, and given that the user is not expected to run this macro,
Chris@40 443 # just rely on AC_PROG_CC.
Chris@40 444 AC_DEFUN([_AM_DEPENDENCIES],
Chris@40 445 [AC_REQUIRE([AM_SET_DEPDIR])dnl
Chris@40 446 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
Chris@40 447 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
Chris@40 448 AC_REQUIRE([AM_DEP_TRACK])dnl
Chris@40 449
Chris@40 450 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
Chris@40 451 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
Chris@40 452 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
Chris@40 453 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
Chris@40 454 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
Chris@40 455 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
Chris@40 456 [depcc="$$1" am_compiler_list=])
Chris@40 457
Chris@40 458 AC_CACHE_CHECK([dependency style of $depcc],
Chris@40 459 [am_cv_$1_dependencies_compiler_type],
Chris@40 460 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
Chris@40 461 # We make a subdir and do the tests there. Otherwise we can end up
Chris@40 462 # making bogus files that we don't know about and never remove. For
Chris@40 463 # instance it was reported that on HP-UX the gcc test will end up
Chris@40 464 # making a dummy file named 'D' -- because '-MD' means "put the output
Chris@40 465 # in D".
Chris@40 466 rm -rf conftest.dir
Chris@40 467 mkdir conftest.dir
Chris@40 468 # Copy depcomp to subdir because otherwise we won't find it if we're
Chris@40 469 # using a relative directory.
Chris@40 470 cp "$am_depcomp" conftest.dir
Chris@40 471 cd conftest.dir
Chris@40 472 # We will build objects and dependencies in a subdirectory because
Chris@40 473 # it helps to detect inapplicable dependency modes. For instance
Chris@40 474 # both Tru64's cc and ICC support -MD to output dependencies as a
Chris@40 475 # side effect of compilation, but ICC will put the dependencies in
Chris@40 476 # the current directory while Tru64 will put them in the object
Chris@40 477 # directory.
Chris@40 478 mkdir sub
Chris@40 479
Chris@40 480 am_cv_$1_dependencies_compiler_type=none
Chris@40 481 if test "$am_compiler_list" = ""; then
Chris@40 482 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
Chris@40 483 fi
Chris@40 484 am__universal=false
Chris@40 485 m4_case([$1], [CC],
Chris@40 486 [case " $depcc " in #(
Chris@40 487 *\ -arch\ *\ -arch\ *) am__universal=true ;;
Chris@40 488 esac],
Chris@40 489 [CXX],
Chris@40 490 [case " $depcc " in #(
Chris@40 491 *\ -arch\ *\ -arch\ *) am__universal=true ;;
Chris@40 492 esac])
Chris@40 493
Chris@40 494 for depmode in $am_compiler_list; do
Chris@40 495 # Setup a source with many dependencies, because some compilers
Chris@40 496 # like to wrap large dependency lists on column 80 (with \), and
Chris@40 497 # we should not choose a depcomp mode which is confused by this.
Chris@40 498 #
Chris@40 499 # We need to recreate these files for each test, as the compiler may
Chris@40 500 # overwrite some of them when testing with obscure command lines.
Chris@40 501 # This happens at least with the AIX C compiler.
Chris@40 502 : > sub/conftest.c
Chris@40 503 for i in 1 2 3 4 5 6; do
Chris@40 504 echo '#include "conftst'$i'.h"' >> sub/conftest.c
Chris@40 505 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
Chris@40 506 # Solaris 10 /bin/sh.
Chris@40 507 echo '/* dummy */' > sub/conftst$i.h
Chris@40 508 done
Chris@40 509 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
Chris@40 510
Chris@40 511 # We check with '-c' and '-o' for the sake of the "dashmstdout"
Chris@40 512 # mode. It turns out that the SunPro C++ compiler does not properly
Chris@40 513 # handle '-M -o', and we need to detect this. Also, some Intel
Chris@40 514 # versions had trouble with output in subdirs.
Chris@40 515 am__obj=sub/conftest.${OBJEXT-o}
Chris@40 516 am__minus_obj="-o $am__obj"
Chris@40 517 case $depmode in
Chris@40 518 gcc)
Chris@40 519 # This depmode causes a compiler race in universal mode.
Chris@40 520 test "$am__universal" = false || continue
Chris@40 521 ;;
Chris@40 522 nosideeffect)
Chris@40 523 # After this tag, mechanisms are not by side-effect, so they'll
Chris@40 524 # only be used when explicitly requested.
Chris@40 525 if test "x$enable_dependency_tracking" = xyes; then
Chris@40 526 continue
Chris@40 527 else
Chris@40 528 break
Chris@40 529 fi
Chris@40 530 ;;
Chris@40 531 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
Chris@40 532 # This compiler won't grok '-c -o', but also, the minuso test has
Chris@40 533 # not run yet. These depmodes are late enough in the game, and
Chris@40 534 # so weak that their functioning should not be impacted.
Chris@40 535 am__obj=conftest.${OBJEXT-o}
Chris@40 536 am__minus_obj=
Chris@40 537 ;;
Chris@40 538 none) break ;;
Chris@40 539 esac
Chris@40 540 if depmode=$depmode \
Chris@40 541 source=sub/conftest.c object=$am__obj \
Chris@40 542 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
Chris@40 543 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
Chris@40 544 >/dev/null 2>conftest.err &&
Chris@40 545 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
Chris@40 546 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
Chris@40 547 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
Chris@40 548 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
Chris@40 549 # icc doesn't choke on unknown options, it will just issue warnings
Chris@40 550 # or remarks (even with -Werror). So we grep stderr for any message
Chris@40 551 # that says an option was ignored or not supported.
Chris@40 552 # When given -MP, icc 7.0 and 7.1 complain thusly:
Chris@40 553 # icc: Command line warning: ignoring option '-M'; no argument required
Chris@40 554 # The diagnosis changed in icc 8.0:
Chris@40 555 # icc: Command line remark: option '-MP' not supported
Chris@40 556 if (grep 'ignoring option' conftest.err ||
Chris@40 557 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
Chris@40 558 am_cv_$1_dependencies_compiler_type=$depmode
Chris@40 559 break
Chris@40 560 fi
Chris@40 561 fi
Chris@40 562 done
Chris@40 563
Chris@40 564 cd ..
Chris@40 565 rm -rf conftest.dir
Chris@40 566 else
Chris@40 567 am_cv_$1_dependencies_compiler_type=none
Chris@40 568 fi
Chris@40 569 ])
Chris@40 570 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
Chris@40 571 AM_CONDITIONAL([am__fastdep$1], [
Chris@40 572 test "x$enable_dependency_tracking" != xno \
Chris@40 573 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
Chris@40 574 ])
Chris@40 575
Chris@40 576
Chris@40 577 # AM_SET_DEPDIR
Chris@40 578 # -------------
Chris@40 579 # Choose a directory name for dependency files.
Chris@40 580 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
Chris@40 581 AC_DEFUN([AM_SET_DEPDIR],
Chris@40 582 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Chris@40 583 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
Chris@40 584 ])
Chris@40 585
Chris@40 586
Chris@40 587 # AM_DEP_TRACK
Chris@40 588 # ------------
Chris@40 589 AC_DEFUN([AM_DEP_TRACK],
Chris@40 590 [AC_ARG_ENABLE([dependency-tracking], [dnl
Chris@40 591 AS_HELP_STRING(
Chris@40 592 [--enable-dependency-tracking],
Chris@40 593 [do not reject slow dependency extractors])
Chris@40 594 AS_HELP_STRING(
Chris@40 595 [--disable-dependency-tracking],
Chris@40 596 [speeds up one-time build])])
Chris@40 597 if test "x$enable_dependency_tracking" != xno; then
Chris@40 598 am_depcomp="$ac_aux_dir/depcomp"
Chris@40 599 AMDEPBACKSLASH='\'
Chris@40 600 am__nodep='_no'
Chris@40 601 fi
Chris@40 602 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
Chris@40 603 AC_SUBST([AMDEPBACKSLASH])dnl
Chris@40 604 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
Chris@40 605 AC_SUBST([am__nodep])dnl
Chris@40 606 _AM_SUBST_NOTMAKE([am__nodep])dnl
Chris@40 607 ])
Chris@40 608
Chris@40 609 # Generate code to set up dependency tracking. -*- Autoconf -*-
Chris@40 610
Chris@40 611 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
Chris@40 612 #
Chris@40 613 # This file is free software; the Free Software Foundation
Chris@40 614 # gives unlimited permission to copy and/or distribute it,
Chris@40 615 # with or without modifications, as long as this notice is preserved.
Chris@40 616
Chris@40 617
Chris@40 618 # _AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@40 619 # ------------------------------
Chris@40 620 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@40 621 [{
Chris@40 622 # Older Autoconf quotes --file arguments for eval, but not when files
Chris@40 623 # are listed without --file. Let's play safe and only enable the eval
Chris@40 624 # if we detect the quoting.
Chris@40 625 case $CONFIG_FILES in
Chris@40 626 *\'*) eval set x "$CONFIG_FILES" ;;
Chris@40 627 *) set x $CONFIG_FILES ;;
Chris@40 628 esac
Chris@40 629 shift
Chris@40 630 for mf
Chris@40 631 do
Chris@40 632 # Strip MF so we end up with the name of the file.
Chris@40 633 mf=`echo "$mf" | sed -e 's/:.*$//'`
Chris@40 634 # Check whether this is an Automake generated Makefile or not.
Chris@40 635 # We used to match only the files named 'Makefile.in', but
Chris@40 636 # some people rename them; so instead we look at the file content.
Chris@40 637 # Grep'ing the first line is not enough: some people post-process
Chris@40 638 # each Makefile.in and add a new line on top of each file to say so.
Chris@40 639 # Grep'ing the whole file is not good either: AIX grep has a line
Chris@40 640 # limit of 2048, but all sed's we know have understand at least 4000.
Chris@40 641 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
Chris@40 642 dirpart=`AS_DIRNAME("$mf")`
Chris@40 643 else
Chris@40 644 continue
Chris@40 645 fi
Chris@40 646 # Extract the definition of DEPDIR, am__include, and am__quote
Chris@40 647 # from the Makefile without running 'make'.
Chris@40 648 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
Chris@40 649 test -z "$DEPDIR" && continue
Chris@40 650 am__include=`sed -n 's/^am__include = //p' < "$mf"`
Chris@40 651 test -z "$am__include" && continue
Chris@40 652 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
Chris@40 653 # Find all dependency output files, they are included files with
Chris@40 654 # $(DEPDIR) in their names. We invoke sed twice because it is the
Chris@40 655 # simplest approach to changing $(DEPDIR) to its actual value in the
Chris@40 656 # expansion.
Chris@40 657 for file in `sed -n "
Chris@40 658 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
Chris@40 659 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
Chris@40 660 # Make sure the directory exists.
Chris@40 661 test -f "$dirpart/$file" && continue
Chris@40 662 fdir=`AS_DIRNAME(["$file"])`
Chris@40 663 AS_MKDIR_P([$dirpart/$fdir])
Chris@40 664 # echo "creating $dirpart/$file"
Chris@40 665 echo '# dummy' > "$dirpart/$file"
Chris@40 666 done
Chris@40 667 done
Chris@40 668 }
Chris@40 669 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@40 670
Chris@40 671
Chris@40 672 # AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@40 673 # -----------------------------
Chris@40 674 # This macro should only be invoked once -- use via AC_REQUIRE.
Chris@40 675 #
Chris@40 676 # This code is only required when automatic dependency tracking
Chris@40 677 # is enabled. FIXME. This creates each '.P' file that we will
Chris@40 678 # need in order to bootstrap the dependency handling code.
Chris@40 679 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@40 680 [AC_CONFIG_COMMANDS([depfiles],
Chris@40 681 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@40 682 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
Chris@40 683 ])
Chris@40 684
Chris@40 685 # Do all the work for Automake. -*- Autoconf -*-
Chris@40 686
Chris@40 687 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
Chris@40 688 #
Chris@40 689 # This file is free software; the Free Software Foundation
Chris@40 690 # gives unlimited permission to copy and/or distribute it,
Chris@40 691 # with or without modifications, as long as this notice is preserved.
Chris@40 692
Chris@40 693 # This macro actually does too much. Some checks are only needed if
Chris@40 694 # your package does certain things. But this isn't really a big deal.
Chris@40 695
Chris@40 696 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
Chris@40 697 m4_define([AC_PROG_CC],
Chris@40 698 m4_defn([AC_PROG_CC])
Chris@40 699 [_AM_PROG_CC_C_O
Chris@40 700 ])
Chris@40 701
Chris@40 702 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
Chris@40 703 # AM_INIT_AUTOMAKE([OPTIONS])
Chris@40 704 # -----------------------------------------------
Chris@40 705 # The call with PACKAGE and VERSION arguments is the old style
Chris@40 706 # call (pre autoconf-2.50), which is being phased out. PACKAGE
Chris@40 707 # and VERSION should now be passed to AC_INIT and removed from
Chris@40 708 # the call to AM_INIT_AUTOMAKE.
Chris@40 709 # We support both call styles for the transition. After
Chris@40 710 # the next Automake release, Autoconf can make the AC_INIT
Chris@40 711 # arguments mandatory, and then we can depend on a new Autoconf
Chris@40 712 # release and drop the old call support.
Chris@40 713 AC_DEFUN([AM_INIT_AUTOMAKE],
Chris@40 714 [AC_PREREQ([2.65])dnl
Chris@40 715 dnl Autoconf wants to disallow AM_ names. We explicitly allow
Chris@40 716 dnl the ones we care about.
Chris@40 717 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
Chris@40 718 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
Chris@40 719 AC_REQUIRE([AC_PROG_INSTALL])dnl
Chris@40 720 if test "`cd $srcdir && pwd`" != "`pwd`"; then
Chris@40 721 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
Chris@40 722 # is not polluted with repeated "-I."
Chris@40 723 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
Chris@40 724 # test to see if srcdir already configured
Chris@40 725 if test -f $srcdir/config.status; then
Chris@40 726 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
Chris@40 727 fi
Chris@40 728 fi
Chris@40 729
Chris@40 730 # test whether we have cygpath
Chris@40 731 if test -z "$CYGPATH_W"; then
Chris@40 732 if (cygpath --version) >/dev/null 2>/dev/null; then
Chris@40 733 CYGPATH_W='cygpath -w'
Chris@40 734 else
Chris@40 735 CYGPATH_W=echo
Chris@40 736 fi
Chris@40 737 fi
Chris@40 738 AC_SUBST([CYGPATH_W])
Chris@40 739
Chris@40 740 # Define the identity of the package.
Chris@40 741 dnl Distinguish between old-style and new-style calls.
Chris@40 742 m4_ifval([$2],
Chris@40 743 [AC_DIAGNOSE([obsolete],
Chris@40 744 [$0: two- and three-arguments forms are deprecated.])
Chris@40 745 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
Chris@40 746 AC_SUBST([PACKAGE], [$1])dnl
Chris@40 747 AC_SUBST([VERSION], [$2])],
Chris@40 748 [_AM_SET_OPTIONS([$1])dnl
Chris@40 749 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
Chris@40 750 m4_if(
Chris@40 751 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
Chris@40 752 [ok:ok],,
Chris@40 753 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
Chris@40 754 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
Chris@40 755 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
Chris@40 756
Chris@40 757 _AM_IF_OPTION([no-define],,
Chris@40 758 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
Chris@40 759 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
Chris@40 760
Chris@40 761 # Some tools Automake needs.
Chris@40 762 AC_REQUIRE([AM_SANITY_CHECK])dnl
Chris@40 763 AC_REQUIRE([AC_ARG_PROGRAM])dnl
Chris@40 764 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
Chris@40 765 AM_MISSING_PROG([AUTOCONF], [autoconf])
Chris@40 766 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
Chris@40 767 AM_MISSING_PROG([AUTOHEADER], [autoheader])
Chris@40 768 AM_MISSING_PROG([MAKEINFO], [makeinfo])
Chris@40 769 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
Chris@40 770 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
Chris@40 771 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
Chris@40 772 # For better backward compatibility. To be removed once Automake 1.9.x
Chris@40 773 # dies out for good. For more background, see:
Chris@40 774 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
Chris@40 775 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
Chris@40 776 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
Chris@40 777 # We need awk for the "check" target (and possibly the TAP driver). The
Chris@40 778 # system "awk" is bad on some platforms.
Chris@40 779 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@40 780 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
Chris@40 781 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Chris@40 782 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
Chris@40 783 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
Chris@40 784 [_AM_PROG_TAR([v7])])])
Chris@40 785 _AM_IF_OPTION([no-dependencies],,
Chris@40 786 [AC_PROVIDE_IFELSE([AC_PROG_CC],
Chris@40 787 [_AM_DEPENDENCIES([CC])],
Chris@40 788 [m4_define([AC_PROG_CC],
Chris@40 789 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
Chris@40 790 AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@40 791 [_AM_DEPENDENCIES([CXX])],
Chris@40 792 [m4_define([AC_PROG_CXX],
Chris@40 793 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
Chris@40 794 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
Chris@40 795 [_AM_DEPENDENCIES([OBJC])],
Chris@40 796 [m4_define([AC_PROG_OBJC],
Chris@40 797 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
Chris@40 798 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
Chris@40 799 [_AM_DEPENDENCIES([OBJCXX])],
Chris@40 800 [m4_define([AC_PROG_OBJCXX],
Chris@40 801 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
Chris@40 802 ])
Chris@40 803 AC_REQUIRE([AM_SILENT_RULES])dnl
Chris@40 804 dnl The testsuite driver may need to know about EXEEXT, so add the
Chris@40 805 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
Chris@40 806 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
Chris@40 807 AC_CONFIG_COMMANDS_PRE(dnl
Chris@40 808 [m4_provide_if([_AM_COMPILER_EXEEXT],
Chris@40 809 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
Chris@40 810
Chris@40 811 # POSIX will say in a future version that running "rm -f" with no argument
Chris@40 812 # is OK; and we want to be able to make that assumption in our Makefile
Chris@40 813 # recipes. So use an aggressive probe to check that the usage we want is
Chris@40 814 # actually supported "in the wild" to an acceptable degree.
Chris@40 815 # See automake bug#10828.
Chris@40 816 # To make any issue more visible, cause the running configure to be aborted
Chris@40 817 # by default if the 'rm' program in use doesn't match our expectations; the
Chris@40 818 # user can still override this though.
Chris@40 819 if rm -f && rm -fr && rm -rf; then : OK; else
Chris@40 820 cat >&2 <<'END'
Chris@40 821 Oops!
Chris@40 822
Chris@40 823 Your 'rm' program seems unable to run without file operands specified
Chris@40 824 on the command line, even when the '-f' option is present. This is contrary
Chris@40 825 to the behaviour of most rm programs out there, and not conforming with
Chris@40 826 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Chris@40 827
Chris@40 828 Please tell bug-automake@gnu.org about your system, including the value
Chris@40 829 of your $PATH and any error possibly output before this message. This
Chris@40 830 can help us improve future automake versions.
Chris@40 831
Chris@40 832 END
Chris@40 833 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
Chris@40 834 echo 'Configuration will proceed anyway, since you have set the' >&2
Chris@40 835 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
Chris@40 836 echo >&2
Chris@40 837 else
Chris@40 838 cat >&2 <<'END'
Chris@40 839 Aborting the configuration process, to ensure you take notice of the issue.
Chris@40 840
Chris@40 841 You can download and install GNU coreutils to get an 'rm' implementation
Chris@40 842 that behaves properly: <http://www.gnu.org/software/coreutils/>.
Chris@40 843
Chris@40 844 If you want to complete the configuration process using your problematic
Chris@40 845 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
Chris@40 846 to "yes", and re-run configure.
Chris@40 847
Chris@40 848 END
Chris@40 849 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
Chris@40 850 fi
Chris@40 851 fi
Chris@40 852 dnl The trailing newline in this macro's definition is deliberate, for
Chris@40 853 dnl backward compatibility and to allow trailing 'dnl'-style comments
Chris@40 854 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
Chris@40 855 ])
Chris@40 856
Chris@40 857 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
Chris@40 858 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
Chris@40 859 dnl mangled by Autoconf and run in a shell conditional statement.
Chris@40 860 m4_define([_AC_COMPILER_EXEEXT],
Chris@40 861 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
Chris@40 862
Chris@40 863 # When config.status generates a header, we must update the stamp-h file.
Chris@40 864 # This file resides in the same directory as the config header
Chris@40 865 # that is generated. The stamp files are numbered to have different names.
Chris@40 866
Chris@40 867 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
Chris@40 868 # loop where config.status creates the headers, so we can generate
Chris@40 869 # our stamp files there.
Chris@40 870 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
Chris@40 871 [# Compute $1's index in $config_headers.
Chris@40 872 _am_arg=$1
Chris@40 873 _am_stamp_count=1
Chris@40 874 for _am_header in $config_headers :; do
Chris@40 875 case $_am_header in
Chris@40 876 $_am_arg | $_am_arg:* )
Chris@40 877 break ;;
Chris@40 878 * )
Chris@40 879 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
Chris@40 880 esac
Chris@40 881 done
Chris@40 882 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
Chris@40 883
Chris@40 884 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 885 #
Chris@40 886 # This file is free software; the Free Software Foundation
Chris@40 887 # gives unlimited permission to copy and/or distribute it,
Chris@40 888 # with or without modifications, as long as this notice is preserved.
Chris@40 889
Chris@40 890 # AM_PROG_INSTALL_SH
Chris@40 891 # ------------------
Chris@40 892 # Define $install_sh.
Chris@40 893 AC_DEFUN([AM_PROG_INSTALL_SH],
Chris@40 894 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Chris@40 895 if test x"${install_sh+set}" != xset; then
Chris@40 896 case $am_aux_dir in
Chris@40 897 *\ * | *\ *)
Chris@40 898 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
Chris@40 899 *)
Chris@40 900 install_sh="\${SHELL} $am_aux_dir/install-sh"
Chris@40 901 esac
Chris@40 902 fi
Chris@40 903 AC_SUBST([install_sh])])
Chris@40 904
Chris@40 905 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
Chris@40 906 #
Chris@40 907 # This file is free software; the Free Software Foundation
Chris@40 908 # gives unlimited permission to copy and/or distribute it,
Chris@40 909 # with or without modifications, as long as this notice is preserved.
Chris@40 910
Chris@40 911 # Check whether the underlying file-system supports filenames
Chris@40 912 # with a leading dot. For instance MS-DOS doesn't.
Chris@40 913 AC_DEFUN([AM_SET_LEADING_DOT],
Chris@40 914 [rm -rf .tst 2>/dev/null
Chris@40 915 mkdir .tst 2>/dev/null
Chris@40 916 if test -d .tst; then
Chris@40 917 am__leading_dot=.
Chris@40 918 else
Chris@40 919 am__leading_dot=_
Chris@40 920 fi
Chris@40 921 rmdir .tst 2>/dev/null
Chris@40 922 AC_SUBST([am__leading_dot])])
Chris@40 923
Chris@40 924 # Check to see how 'make' treats includes. -*- Autoconf -*-
Chris@40 925
Chris@40 926 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 927 #
Chris@40 928 # This file is free software; the Free Software Foundation
Chris@40 929 # gives unlimited permission to copy and/or distribute it,
Chris@40 930 # with or without modifications, as long as this notice is preserved.
Chris@40 931
Chris@40 932 # AM_MAKE_INCLUDE()
Chris@40 933 # -----------------
Chris@40 934 # Check to see how make treats includes.
Chris@40 935 AC_DEFUN([AM_MAKE_INCLUDE],
Chris@40 936 [am_make=${MAKE-make}
Chris@40 937 cat > confinc << 'END'
Chris@40 938 am__doit:
Chris@40 939 @echo this is the am__doit target
Chris@40 940 .PHONY: am__doit
Chris@40 941 END
Chris@40 942 # If we don't find an include directive, just comment out the code.
Chris@40 943 AC_MSG_CHECKING([for style of include used by $am_make])
Chris@40 944 am__include="#"
Chris@40 945 am__quote=
Chris@40 946 _am_result=none
Chris@40 947 # First try GNU make style include.
Chris@40 948 echo "include confinc" > confmf
Chris@40 949 # Ignore all kinds of additional output from 'make'.
Chris@40 950 case `$am_make -s -f confmf 2> /dev/null` in #(
Chris@40 951 *the\ am__doit\ target*)
Chris@40 952 am__include=include
Chris@40 953 am__quote=
Chris@40 954 _am_result=GNU
Chris@40 955 ;;
Chris@40 956 esac
Chris@40 957 # Now try BSD make style include.
Chris@40 958 if test "$am__include" = "#"; then
Chris@40 959 echo '.include "confinc"' > confmf
Chris@40 960 case `$am_make -s -f confmf 2> /dev/null` in #(
Chris@40 961 *the\ am__doit\ target*)
Chris@40 962 am__include=.include
Chris@40 963 am__quote="\""
Chris@40 964 _am_result=BSD
Chris@40 965 ;;
Chris@40 966 esac
Chris@40 967 fi
Chris@40 968 AC_SUBST([am__include])
Chris@40 969 AC_SUBST([am__quote])
Chris@40 970 AC_MSG_RESULT([$_am_result])
Chris@40 971 rm -f confinc confmf
Chris@40 972 ])
Chris@40 973
Chris@40 974 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
Chris@40 975
Chris@40 976 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
Chris@40 977 #
Chris@40 978 # This file is free software; the Free Software Foundation
Chris@40 979 # gives unlimited permission to copy and/or distribute it,
Chris@40 980 # with or without modifications, as long as this notice is preserved.
Chris@40 981
Chris@40 982 # AM_MISSING_PROG(NAME, PROGRAM)
Chris@40 983 # ------------------------------
Chris@40 984 AC_DEFUN([AM_MISSING_PROG],
Chris@40 985 [AC_REQUIRE([AM_MISSING_HAS_RUN])
Chris@40 986 $1=${$1-"${am_missing_run}$2"}
Chris@40 987 AC_SUBST($1)])
Chris@40 988
Chris@40 989 # AM_MISSING_HAS_RUN
Chris@40 990 # ------------------
Chris@40 991 # Define MISSING if not defined so far and test if it is modern enough.
Chris@40 992 # If it is, set am_missing_run to use it, otherwise, to nothing.
Chris@40 993 AC_DEFUN([AM_MISSING_HAS_RUN],
Chris@40 994 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Chris@40 995 AC_REQUIRE_AUX_FILE([missing])dnl
Chris@40 996 if test x"${MISSING+set}" != xset; then
Chris@40 997 case $am_aux_dir in
Chris@40 998 *\ * | *\ *)
Chris@40 999 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
Chris@40 1000 *)
Chris@40 1001 MISSING="\${SHELL} $am_aux_dir/missing" ;;
Chris@40 1002 esac
Chris@40 1003 fi
Chris@40 1004 # Use eval to expand $SHELL
Chris@40 1005 if eval "$MISSING --is-lightweight"; then
Chris@40 1006 am_missing_run="$MISSING "
Chris@40 1007 else
Chris@40 1008 am_missing_run=
Chris@40 1009 AC_MSG_WARN(['missing' script is too old or missing])
Chris@40 1010 fi
Chris@40 1011 ])
Chris@40 1012
Chris@40 1013 # Helper functions for option handling. -*- Autoconf -*-
Chris@40 1014
Chris@40 1015 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 1016 #
Chris@40 1017 # This file is free software; the Free Software Foundation
Chris@40 1018 # gives unlimited permission to copy and/or distribute it,
Chris@40 1019 # with or without modifications, as long as this notice is preserved.
Chris@40 1020
Chris@40 1021 # _AM_MANGLE_OPTION(NAME)
Chris@40 1022 # -----------------------
Chris@40 1023 AC_DEFUN([_AM_MANGLE_OPTION],
Chris@40 1024 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
Chris@40 1025
Chris@40 1026 # _AM_SET_OPTION(NAME)
Chris@40 1027 # --------------------
Chris@40 1028 # Set option NAME. Presently that only means defining a flag for this option.
Chris@40 1029 AC_DEFUN([_AM_SET_OPTION],
Chris@40 1030 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
Chris@40 1031
Chris@40 1032 # _AM_SET_OPTIONS(OPTIONS)
Chris@40 1033 # ------------------------
Chris@40 1034 # OPTIONS is a space-separated list of Automake options.
Chris@40 1035 AC_DEFUN([_AM_SET_OPTIONS],
Chris@40 1036 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
Chris@40 1037
Chris@40 1038 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
Chris@40 1039 # -------------------------------------------
Chris@40 1040 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
Chris@40 1041 AC_DEFUN([_AM_IF_OPTION],
Chris@40 1042 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
Chris@40 1043
Chris@40 1044 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
Chris@40 1045 #
Chris@40 1046 # This file is free software; the Free Software Foundation
Chris@40 1047 # gives unlimited permission to copy and/or distribute it,
Chris@40 1048 # with or without modifications, as long as this notice is preserved.
Chris@40 1049
Chris@40 1050 # _AM_PROG_CC_C_O
Chris@40 1051 # ---------------
Chris@40 1052 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
Chris@40 1053 # to automatically call this.
Chris@40 1054 AC_DEFUN([_AM_PROG_CC_C_O],
Chris@40 1055 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Chris@40 1056 AC_REQUIRE_AUX_FILE([compile])dnl
Chris@40 1057 AC_LANG_PUSH([C])dnl
Chris@40 1058 AC_CACHE_CHECK(
Chris@40 1059 [whether $CC understands -c and -o together],
Chris@40 1060 [am_cv_prog_cc_c_o],
Chris@40 1061 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
Chris@40 1062 # Make sure it works both with $CC and with simple cc.
Chris@40 1063 # Following AC_PROG_CC_C_O, we do the test twice because some
Chris@40 1064 # compilers refuse to overwrite an existing .o file with -o,
Chris@40 1065 # though they will create one.
Chris@40 1066 am_cv_prog_cc_c_o=yes
Chris@40 1067 for am_i in 1 2; do
Chris@40 1068 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
Chris@40 1069 && test -f conftest2.$ac_objext; then
Chris@40 1070 : OK
Chris@40 1071 else
Chris@40 1072 am_cv_prog_cc_c_o=no
Chris@40 1073 break
Chris@40 1074 fi
Chris@40 1075 done
Chris@40 1076 rm -f core conftest*
Chris@40 1077 unset am_i])
Chris@40 1078 if test "$am_cv_prog_cc_c_o" != yes; then
Chris@40 1079 # Losing compiler, so override with the script.
Chris@40 1080 # FIXME: It is wrong to rewrite CC.
Chris@40 1081 # But if we don't then we get into trouble of one sort or another.
Chris@40 1082 # A longer-term fix would be to have automake use am__CC in this case,
Chris@40 1083 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
Chris@40 1084 CC="$am_aux_dir/compile $CC"
Chris@40 1085 fi
Chris@40 1086 AC_LANG_POP([C])])
Chris@40 1087
Chris@40 1088 # For backward compatibility.
Chris@40 1089 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
Chris@40 1090
Chris@40 1091 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 1092 #
Chris@40 1093 # This file is free software; the Free Software Foundation
Chris@40 1094 # gives unlimited permission to copy and/or distribute it,
Chris@40 1095 # with or without modifications, as long as this notice is preserved.
Chris@40 1096
Chris@40 1097 # AM_RUN_LOG(COMMAND)
Chris@40 1098 # -------------------
Chris@40 1099 # Run COMMAND, save the exit status in ac_status, and log it.
Chris@40 1100 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
Chris@40 1101 AC_DEFUN([AM_RUN_LOG],
Chris@40 1102 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
Chris@40 1103 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
Chris@40 1104 ac_status=$?
Chris@40 1105 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@40 1106 (exit $ac_status); }])
Chris@40 1107
Chris@40 1108 # Check to make sure that the build environment is sane. -*- Autoconf -*-
Chris@40 1109
Chris@40 1110 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
Chris@40 1111 #
Chris@40 1112 # This file is free software; the Free Software Foundation
Chris@40 1113 # gives unlimited permission to copy and/or distribute it,
Chris@40 1114 # with or without modifications, as long as this notice is preserved.
Chris@40 1115
Chris@40 1116 # AM_SANITY_CHECK
Chris@40 1117 # ---------------
Chris@40 1118 AC_DEFUN([AM_SANITY_CHECK],
Chris@40 1119 [AC_MSG_CHECKING([whether build environment is sane])
Chris@40 1120 # Reject unsafe characters in $srcdir or the absolute working directory
Chris@40 1121 # name. Accept space and tab only in the latter.
Chris@40 1122 am_lf='
Chris@40 1123 '
Chris@40 1124 case `pwd` in
Chris@40 1125 *[[\\\"\#\$\&\'\`$am_lf]]*)
Chris@40 1126 AC_MSG_ERROR([unsafe absolute working directory name]);;
Chris@40 1127 esac
Chris@40 1128 case $srcdir in
Chris@40 1129 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
Chris@40 1130 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
Chris@40 1131 esac
Chris@40 1132
Chris@40 1133 # Do 'set' in a subshell so we don't clobber the current shell's
Chris@40 1134 # arguments. Must try -L first in case configure is actually a
Chris@40 1135 # symlink; some systems play weird games with the mod time of symlinks
Chris@40 1136 # (eg FreeBSD returns the mod time of the symlink's containing
Chris@40 1137 # directory).
Chris@40 1138 if (
Chris@40 1139 am_has_slept=no
Chris@40 1140 for am_try in 1 2; do
Chris@40 1141 echo "timestamp, slept: $am_has_slept" > conftest.file
Chris@40 1142 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
Chris@40 1143 if test "$[*]" = "X"; then
Chris@40 1144 # -L didn't work.
Chris@40 1145 set X `ls -t "$srcdir/configure" conftest.file`
Chris@40 1146 fi
Chris@40 1147 if test "$[*]" != "X $srcdir/configure conftest.file" \
Chris@40 1148 && test "$[*]" != "X conftest.file $srcdir/configure"; then
Chris@40 1149
Chris@40 1150 # If neither matched, then we have a broken ls. This can happen
Chris@40 1151 # if, for instance, CONFIG_SHELL is bash and it inherits a
Chris@40 1152 # broken ls alias from the environment. This has actually
Chris@40 1153 # happened. Such a system could not be considered "sane".
Chris@40 1154 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
Chris@40 1155 alias in your environment])
Chris@40 1156 fi
Chris@40 1157 if test "$[2]" = conftest.file || test $am_try -eq 2; then
Chris@40 1158 break
Chris@40 1159 fi
Chris@40 1160 # Just in case.
Chris@40 1161 sleep 1
Chris@40 1162 am_has_slept=yes
Chris@40 1163 done
Chris@40 1164 test "$[2]" = conftest.file
Chris@40 1165 )
Chris@40 1166 then
Chris@40 1167 # Ok.
Chris@40 1168 :
Chris@40 1169 else
Chris@40 1170 AC_MSG_ERROR([newly created file is older than distributed files!
Chris@40 1171 Check your system clock])
Chris@40 1172 fi
Chris@40 1173 AC_MSG_RESULT([yes])
Chris@40 1174 # If we didn't sleep, we still need to ensure time stamps of config.status and
Chris@40 1175 # generated files are strictly newer.
Chris@40 1176 am_sleep_pid=
Chris@40 1177 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
Chris@40 1178 ( sleep 1 ) &
Chris@40 1179 am_sleep_pid=$!
Chris@40 1180 fi
Chris@40 1181 AC_CONFIG_COMMANDS_PRE(
Chris@40 1182 [AC_MSG_CHECKING([that generated files are newer than configure])
Chris@40 1183 if test -n "$am_sleep_pid"; then
Chris@40 1184 # Hide warnings about reused PIDs.
Chris@40 1185 wait $am_sleep_pid 2>/dev/null
Chris@40 1186 fi
Chris@40 1187 AC_MSG_RESULT([done])])
Chris@40 1188 rm -f conftest.file
Chris@40 1189 ])
Chris@40 1190
Chris@40 1191 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
Chris@40 1192 #
Chris@40 1193 # This file is free software; the Free Software Foundation
Chris@40 1194 # gives unlimited permission to copy and/or distribute it,
Chris@40 1195 # with or without modifications, as long as this notice is preserved.
Chris@40 1196
Chris@40 1197 # AM_SILENT_RULES([DEFAULT])
Chris@40 1198 # --------------------------
Chris@40 1199 # Enable less verbose build rules; with the default set to DEFAULT
Chris@40 1200 # ("yes" being less verbose, "no" or empty being verbose).
Chris@40 1201 AC_DEFUN([AM_SILENT_RULES],
Chris@40 1202 [AC_ARG_ENABLE([silent-rules], [dnl
Chris@40 1203 AS_HELP_STRING(
Chris@40 1204 [--enable-silent-rules],
Chris@40 1205 [less verbose build output (undo: "make V=1")])
Chris@40 1206 AS_HELP_STRING(
Chris@40 1207 [--disable-silent-rules],
Chris@40 1208 [verbose build output (undo: "make V=0")])dnl
Chris@40 1209 ])
Chris@40 1210 case $enable_silent_rules in @%:@ (((
Chris@40 1211 yes) AM_DEFAULT_VERBOSITY=0;;
Chris@40 1212 no) AM_DEFAULT_VERBOSITY=1;;
Chris@40 1213 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
Chris@40 1214 esac
Chris@40 1215 dnl
Chris@40 1216 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
Chris@40 1217 dnl do not support nested variable expansions.
Chris@40 1218 dnl See automake bug#9928 and bug#10237.
Chris@40 1219 am_make=${MAKE-make}
Chris@40 1220 AC_CACHE_CHECK([whether $am_make supports nested variables],
Chris@40 1221 [am_cv_make_support_nested_variables],
Chris@40 1222 [if AS_ECHO([['TRUE=$(BAR$(V))
Chris@40 1223 BAR0=false
Chris@40 1224 BAR1=true
Chris@40 1225 V=1
Chris@40 1226 am__doit:
Chris@40 1227 @$(TRUE)
Chris@40 1228 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
Chris@40 1229 am_cv_make_support_nested_variables=yes
Chris@40 1230 else
Chris@40 1231 am_cv_make_support_nested_variables=no
Chris@40 1232 fi])
Chris@40 1233 if test $am_cv_make_support_nested_variables = yes; then
Chris@40 1234 dnl Using '$V' instead of '$(V)' breaks IRIX make.
Chris@40 1235 AM_V='$(V)'
Chris@40 1236 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
Chris@40 1237 else
Chris@40 1238 AM_V=$AM_DEFAULT_VERBOSITY
Chris@40 1239 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
Chris@40 1240 fi
Chris@40 1241 AC_SUBST([AM_V])dnl
Chris@40 1242 AM_SUBST_NOTMAKE([AM_V])dnl
Chris@40 1243 AC_SUBST([AM_DEFAULT_V])dnl
Chris@40 1244 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
Chris@40 1245 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
Chris@40 1246 AM_BACKSLASH='\'
Chris@40 1247 AC_SUBST([AM_BACKSLASH])dnl
Chris@40 1248 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
Chris@40 1249 ])
Chris@40 1250
Chris@40 1251 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
Chris@40 1252 #
Chris@40 1253 # This file is free software; the Free Software Foundation
Chris@40 1254 # gives unlimited permission to copy and/or distribute it,
Chris@40 1255 # with or without modifications, as long as this notice is preserved.
Chris@40 1256
Chris@40 1257 # AM_PROG_INSTALL_STRIP
Chris@40 1258 # ---------------------
Chris@40 1259 # One issue with vendor 'install' (even GNU) is that you can't
Chris@40 1260 # specify the program used to strip binaries. This is especially
Chris@40 1261 # annoying in cross-compiling environments, where the build's strip
Chris@40 1262 # is unlikely to handle the host's binaries.
Chris@40 1263 # Fortunately install-sh will honor a STRIPPROG variable, so we
Chris@40 1264 # always use install-sh in "make install-strip", and initialize
Chris@40 1265 # STRIPPROG with the value of the STRIP variable (set by the user).
Chris@40 1266 AC_DEFUN([AM_PROG_INSTALL_STRIP],
Chris@40 1267 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
Chris@40 1268 # Installed binaries are usually stripped using 'strip' when the user
Chris@40 1269 # run "make install-strip". However 'strip' might not be the right
Chris@40 1270 # tool to use in cross-compilation environments, therefore Automake
Chris@40 1271 # will honor the 'STRIP' environment variable to overrule this program.
Chris@40 1272 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
Chris@40 1273 if test "$cross_compiling" != no; then
Chris@40 1274 AC_CHECK_TOOL([STRIP], [strip], :)
Chris@40 1275 fi
Chris@40 1276 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
Chris@40 1277 AC_SUBST([INSTALL_STRIP_PROGRAM])])
Chris@40 1278
Chris@40 1279 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
Chris@40 1280 #
Chris@40 1281 # This file is free software; the Free Software Foundation
Chris@40 1282 # gives unlimited permission to copy and/or distribute it,
Chris@40 1283 # with or without modifications, as long as this notice is preserved.
Chris@40 1284
Chris@40 1285 # _AM_SUBST_NOTMAKE(VARIABLE)
Chris@40 1286 # ---------------------------
Chris@40 1287 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
Chris@40 1288 # This macro is traced by Automake.
Chris@40 1289 AC_DEFUN([_AM_SUBST_NOTMAKE])
Chris@40 1290
Chris@40 1291 # AM_SUBST_NOTMAKE(VARIABLE)
Chris@40 1292 # --------------------------
Chris@40 1293 # Public sister of _AM_SUBST_NOTMAKE.
Chris@40 1294 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
Chris@40 1295
Chris@40 1296 # Check how to create a tarball. -*- Autoconf -*-
Chris@40 1297
Chris@40 1298 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
Chris@40 1299 #
Chris@40 1300 # This file is free software; the Free Software Foundation
Chris@40 1301 # gives unlimited permission to copy and/or distribute it,
Chris@40 1302 # with or without modifications, as long as this notice is preserved.
Chris@40 1303
Chris@40 1304 # _AM_PROG_TAR(FORMAT)
Chris@40 1305 # --------------------
Chris@40 1306 # Check how to create a tarball in format FORMAT.
Chris@40 1307 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
Chris@40 1308 #
Chris@40 1309 # Substitute a variable $(am__tar) that is a command
Chris@40 1310 # writing to stdout a FORMAT-tarball containing the directory
Chris@40 1311 # $tardir.
Chris@40 1312 # tardir=directory && $(am__tar) > result.tar
Chris@40 1313 #
Chris@40 1314 # Substitute a variable $(am__untar) that extract such
Chris@40 1315 # a tarball read from stdin.
Chris@40 1316 # $(am__untar) < result.tar
Chris@40 1317 #
Chris@40 1318 AC_DEFUN([_AM_PROG_TAR],
Chris@40 1319 [# Always define AMTAR for backward compatibility. Yes, it's still used
Chris@40 1320 # in the wild :-( We should find a proper way to deprecate it ...
Chris@40 1321 AC_SUBST([AMTAR], ['$${TAR-tar}'])
Chris@40 1322
Chris@40 1323 # We'll loop over all known methods to create a tar archive until one works.
Chris@40 1324 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
Chris@40 1325
Chris@40 1326 m4_if([$1], [v7],
Chris@40 1327 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
Chris@40 1328
Chris@40 1329 [m4_case([$1],
Chris@40 1330 [ustar],
Chris@40 1331 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
Chris@40 1332 # There is notably a 21 bits limit for the UID and the GID. In fact,
Chris@40 1333 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
Chris@40 1334 # and bug#13588).
Chris@40 1335 am_max_uid=2097151 # 2^21 - 1
Chris@40 1336 am_max_gid=$am_max_uid
Chris@40 1337 # The $UID and $GID variables are not portable, so we need to resort
Chris@40 1338 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
Chris@40 1339 # below are definitely unexpected, so allow the users to see them
Chris@40 1340 # (that is, avoid stderr redirection).
Chris@40 1341 am_uid=`id -u || echo unknown`
Chris@40 1342 am_gid=`id -g || echo unknown`
Chris@40 1343 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
Chris@40 1344 if test $am_uid -le $am_max_uid; then
Chris@40 1345 AC_MSG_RESULT([yes])
Chris@40 1346 else
Chris@40 1347 AC_MSG_RESULT([no])
Chris@40 1348 _am_tools=none
Chris@40 1349 fi
Chris@40 1350 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
Chris@40 1351 if test $am_gid -le $am_max_gid; then
Chris@40 1352 AC_MSG_RESULT([yes])
Chris@40 1353 else
Chris@40 1354 AC_MSG_RESULT([no])
Chris@40 1355 _am_tools=none
Chris@40 1356 fi],
Chris@40 1357
Chris@40 1358 [pax],
Chris@40 1359 [],
Chris@40 1360
Chris@40 1361 [m4_fatal([Unknown tar format])])
Chris@40 1362
Chris@40 1363 AC_MSG_CHECKING([how to create a $1 tar archive])
Chris@40 1364
Chris@40 1365 # Go ahead even if we have the value already cached. We do so because we
Chris@40 1366 # need to set the values for the 'am__tar' and 'am__untar' variables.
Chris@40 1367 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
Chris@40 1368
Chris@40 1369 for _am_tool in $_am_tools; do
Chris@40 1370 case $_am_tool in
Chris@40 1371 gnutar)
Chris@40 1372 for _am_tar in tar gnutar gtar; do
Chris@40 1373 AM_RUN_LOG([$_am_tar --version]) && break
Chris@40 1374 done
Chris@40 1375 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
Chris@40 1376 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
Chris@40 1377 am__untar="$_am_tar -xf -"
Chris@40 1378 ;;
Chris@40 1379 plaintar)
Chris@40 1380 # Must skip GNU tar: if it does not support --format= it doesn't create
Chris@40 1381 # ustar tarball either.
Chris@40 1382 (tar --version) >/dev/null 2>&1 && continue
Chris@40 1383 am__tar='tar chf - "$$tardir"'
Chris@40 1384 am__tar_='tar chf - "$tardir"'
Chris@40 1385 am__untar='tar xf -'
Chris@40 1386 ;;
Chris@40 1387 pax)
Chris@40 1388 am__tar='pax -L -x $1 -w "$$tardir"'
Chris@40 1389 am__tar_='pax -L -x $1 -w "$tardir"'
Chris@40 1390 am__untar='pax -r'
Chris@40 1391 ;;
Chris@40 1392 cpio)
Chris@40 1393 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
Chris@40 1394 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
Chris@40 1395 am__untar='cpio -i -H $1 -d'
Chris@40 1396 ;;
Chris@40 1397 none)
Chris@40 1398 am__tar=false
Chris@40 1399 am__tar_=false
Chris@40 1400 am__untar=false
Chris@40 1401 ;;
Chris@40 1402 esac
Chris@40 1403
Chris@40 1404 # If the value was cached, stop now. We just wanted to have am__tar
Chris@40 1405 # and am__untar set.
Chris@40 1406 test -n "${am_cv_prog_tar_$1}" && break
Chris@40 1407
Chris@40 1408 # tar/untar a dummy directory, and stop if the command works.
Chris@40 1409 rm -rf conftest.dir
Chris@40 1410 mkdir conftest.dir
Chris@40 1411 echo GrepMe > conftest.dir/file
Chris@40 1412 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
Chris@40 1413 rm -rf conftest.dir
Chris@40 1414 if test -s conftest.tar; then
Chris@40 1415 AM_RUN_LOG([$am__untar <conftest.tar])
Chris@40 1416 AM_RUN_LOG([cat conftest.dir/file])
Chris@40 1417 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
Chris@40 1418 fi
Chris@40 1419 done
Chris@40 1420 rm -rf conftest.dir
Chris@40 1421
Chris@40 1422 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
Chris@40 1423 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
Chris@40 1424
Chris@40 1425 AC_SUBST([am__tar])
Chris@40 1426 AC_SUBST([am__untar])
Chris@40 1427 ]) # _AM_PROG_TAR
Chris@40 1428
Chris@40 1429 m4_include([M4/add_cflags.m4])
Chris@40 1430 m4_include([M4/add_cxxflags.m4])
Chris@40 1431 m4_include([M4/clang.m4])
Chris@40 1432 m4_include([M4/clip_mode.m4])
Chris@40 1433 m4_include([M4/endian.m4])
Chris@40 1434 m4_include([M4/extra_pkg.m4])
Chris@40 1435 m4_include([M4/gcc_version.m4])
Chris@40 1436 m4_include([M4/libtool.m4])
Chris@40 1437 m4_include([M4/lrint.m4])
Chris@40 1438 m4_include([M4/lrintf.m4])
Chris@40 1439 m4_include([M4/ltoptions.m4])
Chris@40 1440 m4_include([M4/ltsugar.m4])
Chris@40 1441 m4_include([M4/ltversion.m4])
Chris@40 1442 m4_include([M4/lt~obsolete.m4])
Chris@40 1443 m4_include([M4/mkoctfile_version.m4])
Chris@40 1444 m4_include([M4/octave.m4])
Chris@40 1445 m4_include([M4/really_gcc.m4])
Chris@40 1446 m4_include([M4/stack_protect.m4])