"Fossies" - the Fresh Open Source Software Archive

Member "libsigc++-2.99.13/aclocal.m4" (12 Jun 2019, 88800 Bytes) of package /linux/misc/libsigc++-2.99.13.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "aclocal.m4": 2.99.11_vs_2.99.12.

    1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
    4 
    5 # This file is free software; the Free Software Foundation
    6 # gives unlimited permission to copy and/or distribute it,
    7 # with or without modifications, as long as this notice is preserved.
    8 
    9 # This program is distributed in the hope that it will be useful,
   10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
   11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   12 # PARTICULAR PURPOSE.
   13 
   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'.])])
   22 
   23 dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
   24 dnl serial 11 (pkg-config-0.29.1)
   25 dnl
   26 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
   27 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
   28 dnl
   29 dnl This program is free software; you can redistribute it and/or modify
   30 dnl it under the terms of the GNU General Public License as published by
   31 dnl the Free Software Foundation; either version 2 of the License, or
   32 dnl (at your option) any later version.
   33 dnl
   34 dnl This program is distributed in the hope that it will be useful, but
   35 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
   36 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   37 dnl General Public License for more details.
   38 dnl
   39 dnl You should have received a copy of the GNU General Public License
   40 dnl along with this program; if not, write to the Free Software
   41 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   42 dnl 02111-1307, USA.
   43 dnl
   44 dnl As a special exception to the GNU General Public License, if you
   45 dnl distribute this file as part of a program that contains a
   46 dnl configuration script generated by Autoconf, you may include it under
   47 dnl the same distribution terms that you use for the rest of that
   48 dnl program.
   49 
   50 dnl PKG_PREREQ(MIN-VERSION)
   51 dnl -----------------------
   52 dnl Since: 0.29
   53 dnl
   54 dnl Verify that the version of the pkg-config macros are at least
   55 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
   56 dnl installed version of pkg-config, this checks the developer's version
   57 dnl of pkg.m4 when generating configure.
   58 dnl
   59 dnl To ensure that this macro is defined, also add:
   60 dnl m4_ifndef([PKG_PREREQ],
   61 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
   62 dnl
   63 dnl See the "Since" comment for each macro you use to see what version
   64 dnl of the macros you require.
   65 m4_defun([PKG_PREREQ],
   66 [m4_define([PKG_MACROS_VERSION], [0.29.1])
   67 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
   68     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
   69 ])dnl PKG_PREREQ
   70 
   71 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
   72 dnl ----------------------------------
   73 dnl Since: 0.16
   74 dnl
   75 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
   76 dnl first found in the path. Checks that the version of pkg-config found
   77 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
   78 dnl used since that's the first version where most current features of
   79 dnl pkg-config existed.
   80 AC_DEFUN([PKG_PROG_PKG_CONFIG],
   81 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
   82 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
   83 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
   84 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
   85 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
   86 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
   87 
   88 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
   89 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
   90 fi
   91 if test -n "$PKG_CONFIG"; then
   92 	_pkg_min_version=m4_default([$1], [0.9.0])
   93 	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
   94 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
   95 		AC_MSG_RESULT([yes])
   96 	else
   97 		AC_MSG_RESULT([no])
   98 		PKG_CONFIG=""
   99 	fi
  100 fi[]dnl
  101 ])dnl PKG_PROG_PKG_CONFIG
  102 
  103 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  104 dnl -------------------------------------------------------------------
  105 dnl Since: 0.18
  106 dnl
  107 dnl Check to see whether a particular set of modules exists. Similar to
  108 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  109 dnl
  110 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  111 dnl only at the first occurence in configure.ac, so if the first place
  112 dnl it's called might be skipped (such as if it is within an "if", you
  113 dnl have to call PKG_CHECK_EXISTS manually
  114 AC_DEFUN([PKG_CHECK_EXISTS],
  115 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  116 if test -n "$PKG_CONFIG" && \
  117     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  118   m4_default([$2], [:])
  119 m4_ifvaln([$3], [else
  120   $3])dnl
  121 fi])
  122 
  123 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  124 dnl ---------------------------------------------
  125 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  126 dnl pkg_failed based on the result.
  127 m4_define([_PKG_CONFIG],
  128 [if test -n "$$1"; then
  129     pkg_cv_[]$1="$$1"
  130  elif test -n "$PKG_CONFIG"; then
  131     PKG_CHECK_EXISTS([$3],
  132                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  133 		      test "x$?" != "x0" && pkg_failed=yes ],
  134 		     [pkg_failed=yes])
  135  else
  136     pkg_failed=untried
  137 fi[]dnl
  138 ])dnl _PKG_CONFIG
  139 
  140 dnl _PKG_SHORT_ERRORS_SUPPORTED
  141 dnl ---------------------------
  142 dnl Internal check to see if pkg-config supports short errors.
  143 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  144 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  145 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  146         _pkg_short_errors_supported=yes
  147 else
  148         _pkg_short_errors_supported=no
  149 fi[]dnl
  150 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  151 
  152 
  153 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  154 dnl   [ACTION-IF-NOT-FOUND])
  155 dnl --------------------------------------------------------------
  156 dnl Since: 0.4.0
  157 dnl
  158 dnl Note that if there is a possibility the first call to
  159 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  160 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  161 AC_DEFUN([PKG_CHECK_MODULES],
  162 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  163 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  164 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  165 
  166 pkg_failed=no
  167 AC_MSG_CHECKING([for $1])
  168 
  169 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  170 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  171 
  172 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  173 and $1[]_LIBS to avoid the need to call pkg-config.
  174 See the pkg-config man page for more details.])
  175 
  176 if test $pkg_failed = yes; then
  177    	AC_MSG_RESULT([no])
  178         _PKG_SHORT_ERRORS_SUPPORTED
  179         if test $_pkg_short_errors_supported = yes; then
  180 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  181         else 
  182 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  183         fi
  184 	# Put the nasty error message in config.log where it belongs
  185 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  186 
  187 	m4_default([$4], [AC_MSG_ERROR(
  188 [Package requirements ($2) were not met:
  189 
  190 $$1_PKG_ERRORS
  191 
  192 Consider adjusting the PKG_CONFIG_PATH environment variable if you
  193 installed software in a non-standard prefix.
  194 
  195 _PKG_TEXT])[]dnl
  196         ])
  197 elif test $pkg_failed = untried; then
  198      	AC_MSG_RESULT([no])
  199 	m4_default([$4], [AC_MSG_FAILURE(
  200 [The pkg-config script could not be found or is too old.  Make sure it
  201 is in your PATH or set the PKG_CONFIG environment variable to the full
  202 path to pkg-config.
  203 
  204 _PKG_TEXT
  205 
  206 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  207         ])
  208 else
  209 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  210 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  211         AC_MSG_RESULT([yes])
  212 	$3
  213 fi[]dnl
  214 ])dnl PKG_CHECK_MODULES
  215 
  216 
  217 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  218 dnl   [ACTION-IF-NOT-FOUND])
  219 dnl ---------------------------------------------------------------------
  220 dnl Since: 0.29
  221 dnl
  222 dnl Checks for existence of MODULES and gathers its build flags with
  223 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  224 dnl and VARIABLE-PREFIX_LIBS from --libs.
  225 dnl
  226 dnl Note that if there is a possibility the first call to
  227 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  228 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  229 dnl configure.ac.
  230 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  231 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  232 _save_PKG_CONFIG=$PKG_CONFIG
  233 PKG_CONFIG="$PKG_CONFIG --static"
  234 PKG_CHECK_MODULES($@)
  235 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  236 ])dnl PKG_CHECK_MODULES_STATIC
  237 
  238 
  239 dnl PKG_INSTALLDIR([DIRECTORY])
  240 dnl -------------------------
  241 dnl Since: 0.27
  242 dnl
  243 dnl Substitutes the variable pkgconfigdir as the location where a module
  244 dnl should install pkg-config .pc files. By default the directory is
  245 dnl $libdir/pkgconfig, but the default can be changed by passing
  246 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  247 dnl parameter.
  248 AC_DEFUN([PKG_INSTALLDIR],
  249 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  250 m4_pushdef([pkg_description],
  251     [pkg-config installation directory @<:@]pkg_default[@:>@])
  252 AC_ARG_WITH([pkgconfigdir],
  253     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  254     [with_pkgconfigdir=]pkg_default)
  255 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  256 m4_popdef([pkg_default])
  257 m4_popdef([pkg_description])
  258 ])dnl PKG_INSTALLDIR
  259 
  260 
  261 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  262 dnl --------------------------------
  263 dnl Since: 0.27
  264 dnl
  265 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  266 dnl module should install arch-independent pkg-config .pc files. By
  267 dnl default the directory is $datadir/pkgconfig, but the default can be
  268 dnl changed by passing DIRECTORY. The user can override through the
  269 dnl --with-noarch-pkgconfigdir parameter.
  270 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  271 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  272 m4_pushdef([pkg_description],
  273     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  274 AC_ARG_WITH([noarch-pkgconfigdir],
  275     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  276     [with_noarch_pkgconfigdir=]pkg_default)
  277 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  278 m4_popdef([pkg_default])
  279 m4_popdef([pkg_description])
  280 ])dnl PKG_NOARCH_INSTALLDIR
  281 
  282 
  283 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  284 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  285 dnl -------------------------------------------
  286 dnl Since: 0.28
  287 dnl
  288 dnl Retrieves the value of the pkg-config variable for the given module.
  289 AC_DEFUN([PKG_CHECK_VAR],
  290 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  291 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  292 
  293 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  294 AS_VAR_COPY([$1], [pkg_cv_][$1])
  295 
  296 AS_VAR_IF([$1], [""], [$5], [$4])dnl
  297 ])dnl PKG_CHECK_VAR
  298 
  299 # ===========================================================================
  300 #  https://www.gnu.org/software/autoconf-archive/MM_AX_CXX_COMPILE_STDCXX.html
  301 # ===========================================================================
  302 #
  303 # SYNOPSIS
  304 #
  305 #   MM_AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
  306 #
  307 # DESCRIPTION
  308 #
  309 #   Check for baseline language coverage in the compiler for the specified
  310 #   version of the C++ standard.  If necessary, add switches to CXX and
  311 #   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
  312 #   or '14' (for the C++14 standard).
  313 #
  314 #   The second argument, if specified, indicates whether you insist on an
  315 #   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
  316 #   -std=c++11).  If neither is specified, you get whatever works, with
  317 #   preference for an extended mode.
  318 #
  319 #   The third argument, if specified 'mandatory' or if left unspecified,
  320 #   indicates that baseline support for the specified C++ standard is
  321 #   required and that the macro should error out if no mode with that
  322 #   support is found.  If specified 'optional', then configuration proceeds
  323 #   regardless, after defining HAVE_CXX${VERSION} if and only if a
  324 #   supporting mode is found.
  325 #
  326 # LICENSE
  327 #
  328 #   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
  329 #   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
  330 #   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
  331 #   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
  332 #   Copyright (c) 2015 Paul Norman <penorman@mac.com>
  333 #   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
  334 #   Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
  335 #
  336 #   Copying and distribution of this file, with or without modification, are
  337 #   permitted in any medium without royalty provided the copyright notice
  338 #   and this notice are preserved.  This file is offered as-is, without any
  339 #   warranty.
  340 
  341 #serial 8
  342 
  343 # Copied from ax_cxx_compile_stdcxx.m4 and added MM_ prefix to avoid
  344 # possible conflict with AX_CXX_COMPILE_STDCXX in other modules.
  345 
  346 dnl  This macro is based on the code from the MM_AX_CXX_COMPILE_STDCXX_11 macro
  347 dnl  (serial version number 13).
  348 
  349 AC_DEFUN([MM_AX_CXX_COMPILE_STDCXX], [dnl
  350   m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
  351         [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
  352         [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
  353         [m4_fatal([invalid first argument `$1' to MM_AX_CXX_COMPILE_STDCXX])])dnl
  354   m4_if([$2], [], [],
  355         [$2], [ext], [],
  356         [$2], [noext], [],
  357         [m4_fatal([invalid second argument `$2' to MM_AX_CXX_COMPILE_STDCXX])])dnl
  358   m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
  359         [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
  360         [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
  361         [m4_fatal([invalid third argument `$3' to MM_AX_CXX_COMPILE_STDCXX])])
  362   AC_LANG_PUSH([C++])dnl
  363   ac_success=no
  364   AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
  365   ax_cv_cxx_compile_cxx$1,
  366   [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_testbody_$1])],
  367     [ax_cv_cxx_compile_cxx$1=yes],
  368     [ax_cv_cxx_compile_cxx$1=no])])
  369   if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
  370     ac_success=yes
  371   fi
  372 
  373   m4_if([$2], [noext], [], [dnl
  374   if test x$ac_success = xno; then
  375     for alternative in ${ax_cxx_compile_alternatives}; do
  376       switch="-std=gnu++${alternative}"
  377       cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
  378       AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
  379                      $cachevar,
  380         [ac_save_CXX="$CXX"
  381          CXX="$CXX $switch"
  382          AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_testbody_$1])],
  383           [eval $cachevar=yes],
  384           [eval $cachevar=no])
  385          CXX="$ac_save_CXX"])
  386       if eval test x\$$cachevar = xyes; then
  387         CXX="$CXX $switch"
  388         if test -n "$CXXCPP" ; then
  389           CXXCPP="$CXXCPP $switch"
  390         fi
  391         ac_success=yes
  392         break
  393       fi
  394     done
  395   fi])
  396 
  397   m4_if([$2], [ext], [], [dnl
  398   if test x$ac_success = xno; then
  399     dnl HP's aCC needs +std=c++11 according to:
  400     dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
  401     dnl Cray's crayCC needs "-h std=c++11"
  402     for alternative in ${ax_cxx_compile_alternatives}; do
  403       for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
  404         cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
  405         AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
  406                        $cachevar,
  407           [ac_save_CXX="$CXX"
  408            CXX="$CXX $switch"
  409            AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_testbody_$1])],
  410             [eval $cachevar=yes],
  411             [eval $cachevar=no])
  412            CXX="$ac_save_CXX"])
  413         if eval test x\$$cachevar = xyes; then
  414           CXX="$CXX $switch"
  415           if test -n "$CXXCPP" ; then
  416             CXXCPP="$CXXCPP $switch"
  417           fi
  418           ac_success=yes
  419           break
  420         fi
  421       done
  422       if test x$ac_success = xyes; then
  423         break
  424       fi
  425     done
  426   fi])
  427   AC_LANG_POP([C++])
  428   if test x$ax_cxx_compile_cxx$1_required = xtrue; then
  429     if test x$ac_success = xno; then
  430       AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
  431     fi
  432   fi
  433   if test x$ac_success = xno; then
  434     HAVE_CXX$1=0
  435     AC_MSG_NOTICE([No compiler with C++$1 support was found])
  436   else
  437     HAVE_CXX$1=1
  438     AC_DEFINE(HAVE_CXX$1,1,
  439               [define if the compiler supports basic C++$1 syntax])
  440   fi
  441   AC_SUBST(HAVE_CXX$1)
  442 ])
  443 
  444 
  445 dnl  Test body for checking C++11 support
  446 
  447 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_11],
  448   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
  449 )
  450 
  451 
  452 dnl  Test body for checking C++14 support
  453 
  454 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_14],
  455   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
  456   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
  457 )
  458 
  459 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_17],
  460   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
  461   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
  462   _MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
  463 )
  464 
  465 dnl  Tests for new features in C++11
  466 
  467 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
  468 
  469 // If the compiler admits that it is not ready for C++11, why torture it?
  470 // Hopefully, this will speed up the test.
  471 
  472 #ifndef __cplusplus
  473 
  474 #error "This is not a C++ compiler"
  475 
  476 #elif __cplusplus < 201103L
  477 
  478 #error "This is not a C++11 compiler"
  479 
  480 #else
  481 
  482 namespace cxx11
  483 {
  484 
  485   namespace test_static_assert
  486   {
  487 
  488     template <typename T>
  489     struct check
  490     {
  491       static_assert(sizeof(int) <= sizeof(T), "not big enough");
  492     };
  493 
  494   }
  495 
  496   namespace test_final_override
  497   {
  498 
  499     struct Base
  500     {
  501       virtual void f() {}
  502     };
  503 
  504     struct Derived : public Base
  505     {
  506       virtual void f() override {}
  507     };
  508 
  509   }
  510 
  511   namespace test_double_right_angle_brackets
  512   {
  513 
  514     template < typename T >
  515     struct check {};
  516 
  517     typedef check<void> single_type;
  518     typedef check<check<void>> double_type;
  519     typedef check<check<check<void>>> triple_type;
  520     typedef check<check<check<check<void>>>> quadruple_type;
  521 
  522   }
  523 
  524   namespace test_decltype
  525   {
  526 
  527     int
  528     f()
  529     {
  530       int a = 1;
  531       decltype(a) b = 2;
  532       return a + b;
  533     }
  534 
  535   }
  536 
  537   namespace test_type_deduction
  538   {
  539 
  540     template < typename T1, typename T2 >
  541     struct is_same
  542     {
  543       static const bool value = false;
  544     };
  545 
  546     template < typename T >
  547     struct is_same<T, T>
  548     {
  549       static const bool value = true;
  550     };
  551 
  552     template < typename T1, typename T2 >
  553     auto
  554     add(T1 a1, T2 a2) -> decltype(a1 + a2)
  555     {
  556       return a1 + a2;
  557     }
  558 
  559     int
  560     test(const int c, volatile int v)
  561     {
  562       static_assert(is_same<int, decltype(0)>::value == true, "");
  563       static_assert(is_same<int, decltype(c)>::value == false, "");
  564       static_assert(is_same<int, decltype(v)>::value == false, "");
  565       auto ac = c;
  566       auto av = v;
  567       auto sumi = ac + av + 'x';
  568       auto sumf = ac + av + 1.0;
  569       static_assert(is_same<int, decltype(ac)>::value == true, "");
  570       static_assert(is_same<int, decltype(av)>::value == true, "");
  571       static_assert(is_same<int, decltype(sumi)>::value == true, "");
  572       static_assert(is_same<int, decltype(sumf)>::value == false, "");
  573       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
  574       return (sumf > 0.0) ? sumi : add(c, v);
  575     }
  576 
  577   }
  578 
  579   namespace test_noexcept
  580   {
  581 
  582     int f() { return 0; }
  583     int g() noexcept { return 0; }
  584 
  585     static_assert(noexcept(f()) == false, "");
  586     static_assert(noexcept(g()) == true, "");
  587 
  588   }
  589 
  590   namespace test_constexpr
  591   {
  592 
  593     template < typename CharT >
  594     unsigned long constexpr
  595     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
  596     {
  597       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
  598     }
  599 
  600     template < typename CharT >
  601     unsigned long constexpr
  602     strlen_c(const CharT *const s) noexcept
  603     {
  604       return strlen_c_r(s, 0UL);
  605     }
  606 
  607     static_assert(strlen_c("") == 0UL, "");
  608     static_assert(strlen_c("1") == 1UL, "");
  609     static_assert(strlen_c("example") == 7UL, "");
  610     static_assert(strlen_c("another\0example") == 7UL, "");
  611 
  612   }
  613 
  614   namespace test_rvalue_references
  615   {
  616 
  617     template < int N >
  618     struct answer
  619     {
  620       static constexpr int value = N;
  621     };
  622 
  623     answer<1> f(int&)       { return answer<1>(); }
  624     answer<2> f(const int&) { return answer<2>(); }
  625     answer<3> f(int&&)      { return answer<3>(); }
  626 
  627     void
  628     test()
  629     {
  630       int i = 0;
  631       const int c = 0;
  632       static_assert(decltype(f(i))::value == 1, "");
  633       static_assert(decltype(f(c))::value == 2, "");
  634       static_assert(decltype(f(0))::value == 3, "");
  635     }
  636 
  637   }
  638 
  639   namespace test_uniform_initialization
  640   {
  641 
  642     struct test
  643     {
  644       static const int zero {};
  645       static const int one {1};
  646     };
  647 
  648     static_assert(test::zero == 0, "");
  649     static_assert(test::one == 1, "");
  650 
  651   }
  652 
  653   namespace test_lambdas
  654   {
  655 
  656     void
  657     test1()
  658     {
  659       auto lambda1 = [](){};
  660       auto lambda2 = lambda1;
  661       lambda1();
  662       lambda2();
  663     }
  664 
  665     int
  666     test2()
  667     {
  668       auto a = [](int i, int j){ return i + j; }(1, 2);
  669       auto b = []() -> int { return '0'; }();
  670       auto c = [=](){ return a + b; }();
  671       auto d = [&](){ return c; }();
  672       auto e = [a, &b](int x) mutable {
  673         const auto identity = [](int y){ return y; };
  674         for (auto i = 0; i < a; ++i)
  675           a += b--;
  676         return x + identity(a + b);
  677       }(0);
  678       return a + b + c + d + e;
  679     }
  680 
  681     int
  682     test3()
  683     {
  684       const auto nullary = [](){ return 0; };
  685       const auto unary = [](int x){ return x; };
  686       using nullary_t = decltype(nullary);
  687       using unary_t = decltype(unary);
  688       const auto higher1st = [](nullary_t f){ return f(); };
  689       const auto higher2nd = [unary](nullary_t f1){
  690         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
  691       };
  692       return higher1st(nullary) + higher2nd(nullary)(unary);
  693     }
  694 
  695   }
  696 
  697   namespace test_variadic_templates
  698   {
  699 
  700     template <int...>
  701     struct sum;
  702 
  703     template <int N0, int... N1toN>
  704     struct sum<N0, N1toN...>
  705     {
  706       static constexpr auto value = N0 + sum<N1toN...>::value;
  707     };
  708 
  709     template <>
  710     struct sum<>
  711     {
  712       static constexpr auto value = 0;
  713     };
  714 
  715     static_assert(sum<>::value == 0, "");
  716     static_assert(sum<1>::value == 1, "");
  717     static_assert(sum<23>::value == 23, "");
  718     static_assert(sum<1, 2>::value == 3, "");
  719     static_assert(sum<5, 5, 11>::value == 21, "");
  720     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
  721 
  722   }
  723 
  724   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
  725   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
  726   // because of this.
  727   namespace test_template_alias_sfinae
  728   {
  729 
  730     struct foo {};
  731 
  732     template<typename T>
  733     using member = typename T::member_type;
  734 
  735     template<typename T>
  736     void func(...) {}
  737 
  738     template<typename T>
  739     void func(member<T>*) {}
  740 
  741     void test();
  742 
  743     void test() { func<foo>(0); }
  744 
  745   }
  746 
  747 }  // namespace cxx11
  748 
  749 #endif  // __cplusplus >= 201103L
  750 
  751 ]])
  752 
  753 
  754 dnl  Tests for new features in C++14
  755 
  756 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
  757 
  758 // If the compiler admits that it is not ready for C++14, why torture it?
  759 // Hopefully, this will speed up the test.
  760 
  761 #ifndef __cplusplus
  762 
  763 #error "This is not a C++ compiler"
  764 
  765 #elif __cplusplus < 201402L
  766 
  767 #error "This is not a C++14 compiler"
  768 
  769 #else
  770 
  771 namespace cxx14
  772 {
  773 
  774   namespace test_polymorphic_lambdas
  775   {
  776 
  777     int
  778     test()
  779     {
  780       const auto lambda = [](auto&&... args){
  781         const auto istiny = [](auto x){
  782           return (sizeof(x) == 1UL) ? 1 : 0;
  783         };
  784         const int aretiny[] = { istiny(args)... };
  785         return aretiny[0];
  786       };
  787       return lambda(1, 1L, 1.0f, '1');
  788     }
  789 
  790   }
  791 
  792   namespace test_binary_literals
  793   {
  794 
  795     constexpr auto ivii = 0b0000000000101010;
  796     static_assert(ivii == 42, "wrong value");
  797 
  798   }
  799 
  800   namespace test_generalized_constexpr
  801   {
  802 
  803     template < typename CharT >
  804     constexpr unsigned long
  805     strlen_c(const CharT *const s) noexcept
  806     {
  807       auto length = 0UL;
  808       for (auto p = s; *p; ++p)
  809         ++length;
  810       return length;
  811     }
  812 
  813     static_assert(strlen_c("") == 0UL, "");
  814     static_assert(strlen_c("x") == 1UL, "");
  815     static_assert(strlen_c("test") == 4UL, "");
  816     static_assert(strlen_c("another\0test") == 7UL, "");
  817 
  818   }
  819 
  820   namespace test_lambda_init_capture
  821   {
  822 
  823     int
  824     test()
  825     {
  826       auto x = 0;
  827       const auto lambda1 = [a = x](int b){ return a + b; };
  828       const auto lambda2 = [a = lambda1(x)](){ return a; };
  829       return lambda2();
  830     }
  831 
  832   }
  833 
  834   namespace test_digit_separators
  835   {
  836 
  837     constexpr auto ten_million = 100'000'000;
  838     static_assert(ten_million == 100000000, "");
  839 
  840   }
  841 
  842   namespace test_return_type_deduction
  843   {
  844 
  845     auto f(int& x) { return x; }
  846     decltype(auto) g(int& x) { return x; }
  847 
  848     template < typename T1, typename T2 >
  849     struct is_same
  850     {
  851       static constexpr auto value = false;
  852     };
  853 
  854     template < typename T >
  855     struct is_same<T, T>
  856     {
  857       static constexpr auto value = true;
  858     };
  859 
  860     int
  861     test()
  862     {
  863       auto x = 0;
  864       static_assert(is_same<int, decltype(f(x))>::value, "");
  865       static_assert(is_same<int&, decltype(g(x))>::value, "");
  866       return x;
  867     }
  868 
  869   }
  870 
  871 }  // namespace cxx14
  872 
  873 #endif  // __cplusplus >= 201402L
  874 
  875 ]])
  876 
  877 
  878 dnl  Tests for new features in C++17
  879 
  880 m4_define([_MM_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
  881 
  882 // If the compiler admits that it is not ready for C++17, why torture it?
  883 // Hopefully, this will speed up the test.
  884 
  885 #ifndef __cplusplus
  886 
  887 #error "This is not a C++ compiler"
  888 
  889 #elif __cplusplus <= 201402L
  890 
  891 #error "This is not a C++17 compiler"
  892 
  893 #else
  894 
  895 #if defined(__clang__)
  896   #define REALLY_CLANG
  897 #else
  898   #if defined(__GNUC__)
  899     #define REALLY_GCC
  900   #endif
  901 #endif
  902 
  903 #include <initializer_list>
  904 #include <utility>
  905 #include <type_traits>
  906 
  907 namespace cxx17
  908 {
  909 
  910 #if !defined(REALLY_CLANG)
  911   namespace test_constexpr_lambdas
  912   {
  913 
  914     // TODO: test it with clang++ from git
  915 
  916     constexpr int foo = [](){return 42;}();
  917 
  918   }
  919 #endif // !defined(REALLY_CLANG)
  920 
  921   namespace test::nested_namespace::definitions
  922   {
  923 
  924   }
  925 
  926   namespace test_fold_expression
  927   {
  928 
  929     template<typename... Args>
  930     int multiply(Args... args)
  931     {
  932       return (args * ... * 1);
  933     }
  934 
  935     template<typename... Args>
  936     bool all(Args... args)
  937     {
  938       return (args && ...);
  939     }
  940 
  941   }
  942 
  943   namespace test_extended_static_assert
  944   {
  945 
  946     static_assert (true);
  947 
  948   }
  949 
  950   namespace test_auto_brace_init_list
  951   {
  952 
  953     auto foo = {5};
  954     auto bar {5};
  955 
  956     static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
  957     static_assert(std::is_same<int, decltype(bar)>::value);
  958   }
  959 
  960   namespace test_typename_in_template_template_parameter
  961   {
  962 
  963     template<template<typename> typename X> struct D;
  964 
  965   }
  966 
  967   namespace test_fallthrough_nodiscard_maybe_unused_attributes
  968   {
  969 
  970     int f1()
  971     {
  972       return 42;
  973     }
  974 
  975     [[nodiscard]] int f2()
  976     {
  977       [[maybe_unused]] auto unused = f1();
  978 
  979       switch (f1())
  980       {
  981       case 17:
  982         f1();
  983         [[fallthrough]];
  984       case 42:
  985         f1();
  986       }
  987       return f1();
  988     }
  989 
  990   }
  991 
  992   namespace test_extended_aggregate_initialization
  993   {
  994 
  995     struct base1
  996     {
  997       int b1, b2 = 42;
  998     };
  999 
 1000     struct base2
 1001     {
 1002       base2() {
 1003         b3 = 42;
 1004       }
 1005       int b3;
 1006     };
 1007 
 1008     struct derived : base1, base2
 1009     {
 1010         int d;
 1011     };
 1012 
 1013     derived d1 {{1, 2}, {}, 4};  // full initialization
 1014     derived d2 {{}, {}, 4};      // value-initialized bases
 1015 
 1016   }
 1017 
 1018   namespace test_general_range_based_for_loop
 1019   {
 1020 
 1021     struct iter
 1022     {
 1023       int i;
 1024 
 1025       int& operator* ()
 1026       {
 1027         return i;
 1028       }
 1029 
 1030       const int& operator* () const
 1031       {
 1032         return i;
 1033       }
 1034 
 1035       iter& operator++()
 1036       {
 1037         ++i;
 1038         return *this;
 1039       }
 1040     };
 1041 
 1042     struct sentinel
 1043     {
 1044       int i;
 1045     };
 1046 
 1047     bool operator== (const iter& i, const sentinel& s)
 1048     {
 1049       return i.i == s.i;
 1050     }
 1051 
 1052     bool operator!= (const iter& i, const sentinel& s)
 1053     {
 1054       return !(i == s);
 1055     }
 1056 
 1057     struct range
 1058     {
 1059       iter begin() const
 1060       {
 1061         return {0};
 1062       }
 1063 
 1064       sentinel end() const
 1065       {
 1066         return {5};
 1067       }
 1068     };
 1069 
 1070     void f()
 1071     {
 1072       range r {};
 1073 
 1074       for (auto i : r)
 1075       {
 1076         [[maybe_unused]] auto v = i;
 1077       }
 1078     }
 1079 
 1080   }
 1081 
 1082   namespace test_lambda_capture_asterisk_this_by_value
 1083   {
 1084 
 1085     struct t
 1086     {
 1087       int i;
 1088       int foo()
 1089       {
 1090         return [*this]()
 1091         {
 1092           return i;
 1093         }();
 1094       }
 1095     };
 1096 
 1097   }
 1098 
 1099   namespace test_enum_class_construction
 1100   {
 1101 
 1102     enum class byte : unsigned char
 1103     {};
 1104 
 1105     byte foo {42};
 1106 
 1107   }
 1108 
 1109   namespace test_constexpr_if
 1110   {
 1111 
 1112     template <bool cond>
 1113     int f ()
 1114     {
 1115       if constexpr(cond)
 1116       {
 1117         return 13;
 1118       }
 1119       else
 1120       {
 1121         return 42;
 1122       }
 1123     }
 1124 
 1125   }
 1126 
 1127   namespace test_selection_statement_with_initializer
 1128   {
 1129 
 1130     int f()
 1131     {
 1132       return 13;
 1133     }
 1134 
 1135     int f2()
 1136     {
 1137       if (auto i = f(); i > 0)
 1138       {
 1139         return 3;
 1140       }
 1141 
 1142       switch (auto i = f(); i + 4)
 1143       {
 1144       case 17:
 1145         return 2;
 1146 
 1147       default:
 1148         return 1;
 1149       }
 1150     }
 1151 
 1152   }
 1153 
 1154 #if !defined(REALLY_CLANG)
 1155   namespace test_template_argument_deduction_for_class_templates
 1156   {
 1157 
 1158     // TODO: test it with clang++ from git
 1159 
 1160     template <typename T1, typename T2>
 1161     struct pair
 1162     {
 1163       pair (T1 p1, T2 p2)
 1164         : m1 {p1},
 1165           m2 {p2}
 1166       {}
 1167 
 1168       T1 m1;
 1169       T2 m2;
 1170     };
 1171 
 1172     void f()
 1173     {
 1174       [[maybe_unused]] auto p = pair{13, 42u};
 1175     }
 1176 
 1177   }
 1178 #endif // !defined(REALLY_CLANG)
 1179 
 1180   namespace test_non_type_auto_template_parameters
 1181   {
 1182 
 1183     template <auto n>
 1184     struct B
 1185     {};
 1186 
 1187     B<5> b1;
 1188     B<'a'> b2;
 1189 
 1190   }
 1191 
 1192 #if !defined(REALLY_CLANG)
 1193   namespace test_structured_bindings
 1194   {
 1195 
 1196     // TODO: test it with clang++ from git
 1197 
 1198     int arr[2] = { 1, 2 };
 1199     std::pair<int, int> pr = { 1, 2 };
 1200 
 1201     auto f1() -> int(&)[2]
 1202     {
 1203       return arr;
 1204     }
 1205 
 1206     auto f2() -> std::pair<int, int>&
 1207     {
 1208       return pr;
 1209     }
 1210 
 1211     struct S
 1212     {
 1213       int x1 : 2;
 1214       volatile double y1;
 1215     };
 1216 
 1217     S f3()
 1218     {
 1219       return {};
 1220     }
 1221 
 1222     auto [ x1, y1 ] = f1();
 1223     auto& [ xr1, yr1 ] = f1();
 1224     auto [ x2, y2 ] = f2();
 1225     auto& [ xr2, yr2 ] = f2();
 1226     const auto [ x3, y3 ] = f3();
 1227 
 1228   }
 1229 #endif // !defined(REALLY_CLANG)
 1230 
 1231 #if !defined(REALLY_CLANG)
 1232   namespace test_exception_spec_type_system
 1233   {
 1234 
 1235     // TODO: test it with clang++ from git
 1236 
 1237     struct Good {};
 1238     struct Bad {};
 1239 
 1240     void g1() noexcept;
 1241     void g2();
 1242 
 1243     template<typename T>
 1244     Bad
 1245     f(T*, T*);
 1246 
 1247     template<typename T1, typename T2>
 1248     Good
 1249     f(T1*, T2*);
 1250 
 1251     static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
 1252 
 1253   }
 1254 #endif // !defined(REALLY_CLANG)
 1255 
 1256   namespace test_inline_variables
 1257   {
 1258 
 1259     template<class T> void f(T)
 1260     {}
 1261 
 1262     template<class T> inline T g(T)
 1263     {
 1264       return T{};
 1265     }
 1266 
 1267     template<> inline void f<>(int)
 1268     {}
 1269 
 1270     template<> int g<>(int)
 1271     {
 1272       return 5;
 1273     }
 1274 
 1275   }
 1276 
 1277 }  // namespace cxx17
 1278 
 1279 #endif  // __cplusplus <= 201402L
 1280 
 1281 ]])
 1282 
 1283 
 1284 #serial 20090814
 1285 
 1286 AC_DEFUN([_MM_PRE_INIT], [m4_pattern_forbid([^_?MM_])])
 1287 
 1288 m4_define([_MM_PREREQ],
 1289 [dnl
 1290 m4_if(m4_quote(m4_version_compare([$2], [$3])), [-1],
 1291       [m4_fatal([$4 requires $1 $3 (version $2 is installed)])])[]dnl
 1292 ])
 1293 
 1294 AC_DEFUN([MM_PREREQ],
 1295 [dnl
 1296 m4_assert([$# >= 1])[]dnl
 1297 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1298 _MM_PREREQ([mm-common], [0.9.12], [$1], m4_defn([AC_PACKAGE_NAME]))[]dnl
 1299 ])
 1300 
 1301 
 1302 #serial 20091224
 1303 
 1304 m4_define([_MM_PROG_GCC_VISIBILITY_CHECK],
 1305 [dnl
 1306 AC_PROVIDE([$0])[]dnl
 1307 AC_CACHE_CHECK([for GCC symbol visibility options],
 1308                [mm_cv_gcc_visibility_cxxflags],
 1309 [dnl
 1310 mm_save_CXXFLAGS=$CXXFLAGS
 1311 CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
 1312 dnl
 1313 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 1314 #pragma GCC visibility push(default)
 1315 namespace Mm { void __attribute__((__visibility__("hidden"))) mmfunc(); }
 1316 void Mm::mmfunc() {}
 1317 #pragma GCC visibility pop
 1318 ]], [[Mm::mmfunc();]])],
 1319 [mm_cv_gcc_visibility_cxxflags='-fvisibility=hidden -fvisibility-inlines-hidden'],
 1320 [mm_cv_gcc_visibility_cxxflags=none])
 1321 dnl
 1322 CXXFLAGS=$mm_save_CXXFLAGS])[]dnl
 1323 ])
 1324 
 1325 AC_DEFUN([MM_PROG_GCC_VISIBILITY],
 1326 [dnl
 1327 m4_assert([$# >= 1])[]dnl
 1328 AC_LANG_ASSERT([C++])[]dnl
 1329 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1330 AC_REQUIRE([_MM_PROG_GCC_VISIBILITY_CHECK])[]dnl
 1331 AS_IF([test "x$mm_cv_gcc_visibility_cxxflags" != xnone],
 1332       [$1=$mm_cv_gcc_visibility_cxxflags], [$1=])
 1333 AC_SUBST([$1])[]dnl
 1334 ])
 1335 
 1336 m4_define([_MM_ARG_DISABLE_DEPRECATED_API_OPTION],
 1337 [dnl
 1338 AC_PROVIDE([$0])[]dnl
 1339 AC_ARG_ENABLE([deprecated-api],
 1340               [AS_HELP_STRING([--disable-deprecated-api],
 1341                               [omit deprecated API from the library])],
 1342               [mm_enable_deprecated_api=$enableval],
 1343               [mm_enable_deprecated_api=yes])[]dnl
 1344 AS_IF([test "x$mm_enable_deprecated_api" = xno],
 1345       [AC_MSG_WARN([[Deprecated API will not be built, breaking compatibility.
 1346 Do not use this option for distribution packages.]])],
 1347       [AC_MSG_NOTICE([[Deprecated API will be built, for backwards-compatibility.]])])
 1348 AM_CONDITIONAL([DISABLE_DEPRECATED_API], [test "x$mm_enable_deprecated_api" = xno])[]dnl
 1349 ])
 1350 
 1351 m4_define([_MM_ARG_DISABLE_DEPRECATED_API_DEFINE],
 1352 [m4_foreach_w([mm_prefix], [$1],
 1353 [AC_DEFINE(m4_defn([mm_prefix])[_DISABLE_DEPRECATED], [1],
 1354            [Define to omit deprecated API from the library.])
 1355 ])])
 1356 
 1357 AC_DEFUN([MM_ARG_DISABLE_DEPRECATED_API],
 1358 [dnl
 1359 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1360 AC_REQUIRE([_MM_ARG_DISABLE_DEPRECATED_API_OPTION])[]dnl
 1361 AS_IF([test "x$mm_enable_deprecated_api" = xno],
 1362       [_MM_ARG_DISABLE_DEPRECATED_API_DEFINE(
 1363         m4_ifval([$1], [[$1]], [AS_TR_CPP(m4_defn([AC_PACKAGE_TARNAME]))]))])[]dnl
 1364 ])
 1365 
 1366 
 1367 #serial 20110327
 1368 
 1369 m4_define([_MM_CONFIG_DOCTOOL_DIR],
 1370 [dnl
 1371 AC_PROVIDE([$0])[]dnl
 1372 AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
 1373 dnl
 1374 AC_MSG_CHECKING([location of documentation utilities])
 1375 AS_IF([test "x$MMDOCTOOLDIR" = x],
 1376 [
 1377   MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir mm-common-util 2>&AS_MESSAGE_LOG_FD`
 1378   AS_IF([test "[$]?" -ne 0],
 1379         [AC_MSG_ERROR([[not found
 1380 The required module mm-common-util could not be found on this system.  If you
 1381 are running a binary distribution and the mm-common package is installed,
 1382 make sure that any separate development package for mm-common is installed
 1383 as well.  If you built mm-common yourself, it may be necessary to adjust
 1384 the PKG_CONFIG_PATH environment variable for pkg-config to find it.
 1385 ]])])
 1386 ])
 1387 AC_MSG_RESULT([$MMDOCTOOLDIR])[]dnl
 1388 ])
 1389 
 1390 AC_DEFUN([MM_CONFIG_DOCTOOL_DIR],
 1391 [dnl
 1392 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1393 AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
 1394 m4_ifval([$1], [MMDOCTOOLDIR='[$]{top_srcdir}/$1'], [AC_REQUIRE([_MM_CONFIG_DOCTOOL_DIR])])
 1395 AM_CONDITIONAL([DIST_DOCTOOLS], [test 'x$1' != 'x'])dnl
 1396 AC_SUBST([MMDOCTOOLDIR])[]dnl
 1397 ])
 1398 
 1399 m4_define([_MM_ARG_ENABLE_DOCUMENTATION],
 1400 [dnl
 1401 AC_PROVIDE([$0])[]dnl
 1402 dnl
 1403 AC_ARG_VAR([DOT], [path to dot utility])[]dnl
 1404 AC_ARG_VAR([DOXYGEN], [path to Doxygen utility])[]dnl
 1405 AC_ARG_VAR([XSLTPROC], [path to xsltproc utility])[]dnl
 1406 dnl
 1407 AC_PATH_PROG([DOT], [dot], [dot])
 1408 AC_PATH_PROG([DOXYGEN], [doxygen], [doxygen])
 1409 AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
 1410 dnl
 1411 AC_ARG_ENABLE([documentation],
 1412               [AS_HELP_STRING([--disable-documentation],
 1413                               [do not build or install the documentation])],
 1414               [ENABLE_DOCUMENTATION=$enableval],
 1415               [ENABLE_DOCUMENTATION=auto])
 1416 AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
 1417 [
 1418   mm_err=
 1419   AS_IF([test "x$MMDOCTOOLDIR" = x], [mm_err='dnl
 1420 The mm-common-util module is available, but the installation of mm-common on this
 1421 machine is missing the shared documentation utilities of the GNOME C++
 1422 bindings.  It may be necessary to upgrade to a more recent release of
 1423 mm-common in order to build '$PACKAGE_NAME' and install the documentation.'],
 1424         [test "x$PERL" = xperl], [mm_err='Perl is required for installing the documentation.'],
 1425         [test "x$USE_MAINTAINER_MODE" != xno],
 1426   [
 1427     test "x$DOT" != xdot || mm_err=' dot'
 1428     test "x$DOXYGEN" != xdoxygen || mm_err="$mm_err doxygen"
 1429     test "x$XSLTPROC" != xxsltproc || mm_err="$mm_err xsltproc"
 1430     test -z "$mm_err" || mm_err='The documentation cannot be generated because
 1431 not all of the required tools are available:'$mm_err
 1432   ])
 1433   AS_IF([test -z "$mm_err"], [ENABLE_DOCUMENTATION=yes],
 1434         [test "x$ENABLE_DOCUMENTATION" = xyes], [AC_MSG_FAILURE([[$mm_err]])],
 1435         [ENABLE_DOCUMENTATION=no; AC_MSG_WARN([[$mm_err]])])
 1436 ])
 1437 AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "x$ENABLE_DOCUMENTATION" = xyes])
 1438 AC_SUBST([DOXYGEN_TAGFILES], [[]])
 1439 AC_SUBST([DOCINSTALL_FLAGS], [[]])[]dnl
 1440 ])
 1441 
 1442 AC_DEFUN([MM_ARG_ENABLE_DOCUMENTATION],
 1443 [dnl
 1444 AC_BEFORE([$0], [MM_ARG_WITH_TAGFILE_DOC])[]dnl
 1445 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1446 AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
 1447 AC_REQUIRE([MM_PATH_PERL])[]dnl
 1448 AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
 1449 ])
 1450 
 1451 m4_define([_MM_TR_URI],
 1452 [dnl
 1453 [`expr "X$1" : 'X\(.*[^\\/]\)[\\/]*' 2>&]AS_MESSAGE_LOG_FD[ |]dnl
 1454 [ sed 's|[\\]|/|g;s| |%20|g;s|^/|file:///|;s|^.:/|file:///&|' 2>&]AS_MESSAGE_LOG_FD[`]dnl
 1455 ])
 1456 
 1457 m4_define([_MM_ARG_WITH_TAGFILE_DOC],
 1458 [dnl
 1459   AC_MSG_CHECKING([for $1 documentation])
 1460   AC_ARG_WITH([$1-doc],
 1461               [AS_HELP_STRING([[--with-$1-doc=[TAGFILE@]HTMLREFDIR]],
 1462                               [Link to external $1 documentation]m4_ifval([$4], [[ [auto]]]))],
 1463   [
 1464     mm_htmlrefdir=`[expr "X@$withval" : '.*@\(.*\)' 2>&]AS_MESSAGE_LOG_FD`
 1465     mm_tagname=`[expr "X/$withval" : '[^@]*[\\/]\([^\\/@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
 1466     mm_tagpath=`[expr "X$withval" : 'X\([^@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
 1467     test "x$mm_tagname" != x || mm_tagname="$3"
 1468     test "x$mm_tagpath" != x || mm_tagpath=$mm_tagname[]dnl
 1469   ], [
 1470     mm_htmlrefdir=
 1471     mm_tagname="$3"
 1472     mm_tagpath=$mm_tagname[]dnl
 1473   ])
 1474   # Prepend working direcory if the tag file path starts with ./ or ../
 1475   AS_CASE([$mm_tagpath], [[.[\\/]*|..[\\/]*]], [mm_tagpath=`pwd`/$mm_tagpath])
 1476 
 1477 m4_ifval([$4], [dnl
 1478   # If no local directory was specified, get the default from the .pc file
 1479   AS_IF([test "x$mm_htmlrefdir" = x],
 1480   [
 1481     mm_htmlrefdir=`$PKG_CONFIG --variable=htmlrefdir "$4" 2>&AS_MESSAGE_LOG_FD`dnl
 1482   ])
 1483   # If the user specified a Web URL, allow it to override the public location
 1484   AS_CASE([$mm_htmlrefdir], [[http://*|https://*]], [mm_htmlrefpub=$mm_htmlrefdir],
 1485   [
 1486     mm_htmlrefpub=`$PKG_CONFIG --variable=htmlrefpub "$4" 2>&AS_MESSAGE_LOG_FD`
 1487     test "x$mm_htmlrefpub" != x || mm_htmlrefpub=$mm_htmlrefdir
 1488     test "x$mm_htmlrefdir" != x || mm_htmlrefdir=$mm_htmlrefpub
 1489   ])
 1490   # The user-supplied tag-file name takes precedence if it includes the path
 1491   AS_CASE([$mm_tagpath], [[*[\\/]*]],,
 1492   [
 1493     mm_doxytagfile=`$PKG_CONFIG --variable=doxytagfile "$4" 2>&AS_MESSAGE_LOG_FD`
 1494     test "x$mm_doxytagfile" = x || mm_tagpath=$mm_doxytagfile
 1495   ])
 1496   # Remove trailing slashes and translate to URI
 1497   mm_htmlrefpub=_MM_TR_URI([$mm_htmlrefpub])
 1498 ])[]dnl
 1499   mm_htmlrefdir=_MM_TR_URI([$mm_htmlrefdir])
 1500 
 1501   AC_MSG_RESULT([$mm_tagpath@$mm_htmlrefdir])
 1502 
 1503   AS_IF([test "x$USE_MAINTAINER_MODE" != xno && test ! -f "$mm_tagpath"],
 1504         [AC_MSG_WARN([Doxygen tag file $3 not found])])
 1505   AS_IF([test "x$mm_htmlrefdir" = x],
 1506         [AC_MSG_WARN([Location of external $1 documentation not set])],
 1507         [AS_IF([test "x$DOCINSTALL_FLAGS" = x],
 1508                [DOCINSTALL_FLAGS="-l '$mm_tagname@$mm_htmlrefdir/'"],
 1509                [DOCINSTALL_FLAGS="$DOCINSTALL_FLAGS -l '$mm_tagname@$mm_htmlrefdir/'"])])
 1510 
 1511   AS_IF([test "x$mm_$2" = x], [mm_val=$mm_tagpath], [mm_val="$mm_tagpath=$mm_$2"])
 1512   AS_IF([test "x$DOXYGEN_TAGFILES" = x],
 1513         [DOXYGEN_TAGFILES=[\]"$mm_val[\]"],
 1514         [DOXYGEN_TAGFILES="$DOXYGEN_TAGFILES "[\]"$mm_val[\]"])[]dnl
 1515 ])
 1516 
 1517 AC_DEFUN([MM_ARG_WITH_TAGFILE_DOC],
 1518 [dnl
 1519 m4_assert([$# >= 1])[]dnl
 1520 m4_ifval([$2], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])])[]dnl
 1521 AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
 1522 AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
 1523 dnl
 1524 AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
 1525       [_MM_ARG_WITH_TAGFILE_DOC(m4_quote(m4_bpatsubst([$1], [[+]*\([-+][0123456789]\|[._]\).*$])),
 1526                                 [htmlref]m4_ifval([$2], [[pub]], [[dir]]), [$1], [$2])])[]dnl
 1527 ])
 1528 
 1529 
 1530 #serial 20091228
 1531 
 1532 m4_define([_MM_INIT_MODULE_VERSION],
 1533 [dnl
 1534 m4_ifval([$3],
 1535 [AC_SUBST([$2][_MAJOR_VERSION], [$3])
 1536 AC_DEFINE([$2][_MAJOR_VERSION], [$3], [Major version number of $1.])
 1537 ])[]dnl
 1538 m4_ifval([$4],
 1539 [AC_SUBST([$2][_MINOR_VERSION], [$4])
 1540 AC_DEFINE([$2][_MINOR_VERSION], [$4], [Minor version number of $1.])
 1541 ])[]dnl
 1542 m4_ifval([$5],
 1543 [AC_SUBST([$2][_MICRO_VERSION], [$5])
 1544 AC_DEFINE([$2][_MICRO_VERSION], [$5], [Micro version number of $1.])
 1545 ])[]dnl
 1546 ])
 1547 
 1548 m4_define([_MM_INIT_MODULE_SUBST],
 1549 [dnl
 1550 AC_SUBST([$5][_MODULE_NAME], ['$1'])
 1551 AC_SUBST([$5][_VERSION], ['$2'])
 1552 m4_ifval([$4],
 1553 [AC_SUBST([$5][_API_VERSION], ['$4'])
 1554 ])[]dnl
 1555 _MM_INIT_MODULE_VERSION([$3], [$5], m4_bpatsubst([$2], [[^0123456789]+], [,]))[]dnl
 1556 ])
 1557 
 1558 m4_define([_MM_INIT_MODULE_BASENAME],
 1559           [_MM_INIT_MODULE_SUBST([$1], [$2], [$3], [$4],
 1560                                  m4_quote(AS_TR_CPP(m4_quote(m4_translit([$3], [+], [X])))))])
 1561 
 1562 AC_DEFUN([MM_INIT_MODULE],
 1563 [dnl
 1564 m4_assert([$# >= 1])[]dnl
 1565 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1566 AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
 1567 _MM_INIT_MODULE_BASENAME([$1],
 1568                  m4_quote(m4_ifval([$2], [$2], m4_defn([AC_PACKAGE_VERSION]))),
 1569                  m4_quote(m4_bpatsubst([$1], [[-.0123456789]+$])),
 1570                  m4_quote(m4_bregexp([$1], [-?\([.0123456789]+\)$], [\1])))[]dnl
 1571 ])
 1572 
 1573 
 1574 #serial 20090822
 1575 
 1576 m4_define([_MM_CHECK_GNU_MAKE],
 1577 [dnl
 1578 AC_PROVIDE([$0])[]dnl
 1579 AC_MSG_CHECKING([whether [$]{MAKE-make} supports GNU make features])
 1580 cat >conftest.make <<'_MMEOF'
 1581 override reverse = [$](2)[$](subst ,, )[$](1)
 1582 override result := [$](word 2,[$](call reverse,success,failure))
 1583 all: ; test '[$](result)' = success
 1584 .PHONY: all
 1585 _MMEOF
 1586 AS_IF([[$]{MAKE-make} -f conftest.make >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
 1587       [mm_gnu_make=yes], [mm_gnu_make=no])
 1588 rm -f conftest.make
 1589 AC_MSG_RESULT([$mm_gnu_make])
 1590 AS_IF([test "x$mm_gnu_make" != xyes],
 1591       [AC_MSG_FAILURE([[The GNU make program is required to build $PACKAGE_NAME.]])])[]dnl
 1592 ])
 1593 
 1594 AC_DEFUN([MM_CHECK_GNU_MAKE],
 1595 [dnl
 1596 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1597 AC_REQUIRE([_MM_CHECK_GNU_MAKE])[]dnl
 1598 ])
 1599 
 1600 m4_define([_MM_PATH_PERL],
 1601 [dnl
 1602 AC_PROVIDE([$0])[]dnl
 1603 AC_ARG_VAR([PERL], [path to Perl interpreter])[]dnl
 1604 AC_PATH_PROG([PERL], [perl], [perl])[]dnl
 1605 ])
 1606 
 1607 AC_DEFUN([MM_PATH_PERL],
 1608 [dnl
 1609 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1610 AC_REQUIRE([_MM_PATH_PERL])[]dnl
 1611 ])
 1612 
 1613 m4_define([_MM_CHECK_PERL],
 1614 [dnl
 1615 AS_IF([$PERL -e "require v$1; exit 0;" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
 1616       [$2], m4_ifval([$2$3], [[$3]],
 1617             [[AC_MSG_FAILURE([[At least Perl ]$1[ is required to build $PACKAGE_NAME.]])]]))[]dnl
 1618 ])
 1619 
 1620 AC_DEFUN([MM_CHECK_PERL],
 1621 [dnl
 1622 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1623 AC_REQUIRE([_MM_PATH_PERL])[]dnl
 1624 _MM_CHECK_PERL(m4_ifval([$1], [[$1]], [[5.6.0]]), [$2], [$3])[]dnl
 1625 ])
 1626 
 1627 AC_DEFUN([MM_PKG_CONFIG_SUBST],
 1628 [dnl
 1629 m4_assert([$# >= 2])[]dnl
 1630 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1631 AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
 1632 AC_MSG_CHECKING([for $1])
 1633 dnl
 1634 AS_IF([test -z "[$]{$1+set}"],
 1635       [$1=`$PKG_CONFIG $2 2>&AS_MESSAGE_LOG_FD`
 1636        AS_IF([test "[$]?" -eq 0], [$3], [$4])])
 1637 dnl
 1638 AC_MSG_RESULT([[$]$1])
 1639 AC_SUBST([$1])[]dnl
 1640 ])
 1641 
 1642 
 1643 #serial 20091103
 1644 
 1645 m4_define([_MM_ARG_ENABLE_WARNINGS_OPTION],
 1646 [dnl
 1647 AC_PROVIDE([$0])[]dnl
 1648 AC_ARG_ENABLE([warnings],
 1649               [AS_HELP_STRING([[--enable-warnings[=min|max|fatal|no]]],
 1650                               [set compiler pedantry level [default=min]])],
 1651               [mm_enable_warnings=$enableval],
 1652               [mm_enable_warnings=min])[]dnl
 1653 ])
 1654 
 1655 AC_DEFUN([MM_ARG_ENABLE_WARNINGS],
 1656 [dnl
 1657 m4_assert([$# >= 3])[]dnl
 1658 AC_REQUIRE([_MM_PRE_INIT])[]dnl
 1659 AC_REQUIRE([_MM_ARG_ENABLE_WARNINGS_OPTION])[]dnl
 1660 dnl
 1661 AS_CASE([$ac_compile],
 1662         [[*'$CXXFLAGS '*]], [mm_lang='C++' mm_cc=$CXX mm_conftest="conftest.[$]{ac_ext-cc}"],
 1663         [[*'$CFLAGS '*]],   [mm_lang=C mm_cc=$CC mm_conftest="conftest.[$]{ac_ext-c}"],
 1664         [AC_MSG_ERROR([[current language is neither C nor C++]])])
 1665 dnl
 1666 AC_MSG_CHECKING([which $mm_lang compiler warning flags to use])
 1667 m4_ifval([$4], [mm_deprecation_flags=
 1668 ])mm_tested_flags=
 1669 dnl
 1670 AS_CASE([$mm_enable_warnings],
 1671         [no],    [mm_warning_flags=],
 1672         [max],   [mm_warning_flags="$3"],
 1673         [fatal], [mm_warning_flags="$3 -Werror"[]m4_ifval([$4], [
 1674          for mm_prefix in $4
 1675          do
 1676            mm_deprecation_flags="$mm_deprecation_flags-D[$]{mm_prefix}_DISABLE_DEPRECATED "
 1677          done])],
 1678         [mm_warning_flags="$2"])
 1679 dnl
 1680 AS_IF([test "x$mm_warning_flags" != x],
 1681 [
 1682   # Keep in mind that the dummy source must be devoid of any
 1683   # problems that might cause diagnostics.
 1684   AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 1685 int main(int argc, char** argv) { return !argv ? 0 : argc; }
 1686 ]])])
 1687   for mm_flag in $mm_warning_flags
 1688   do
 1689     # Test whether the compiler accepts the flag.  Look at standard output,
 1690     # since GCC only shows a warning message if an option is not supported.
 1691     mm_cc_out=`$mm_cc $mm_tested_flags $mm_flag -c "$mm_conftest" 2>&1 || echo failed`
 1692     rm -f "conftest.[$]{OBJEXT-o}"
 1693 
 1694     AS_IF([test "x$mm_cc_out" = x],
 1695           [AS_IF([test "x$mm_tested_flags" = x],
 1696                  [mm_tested_flags=$mm_flag],
 1697                  [mm_tested_flags="$mm_tested_flags $mm_flag"])],
 1698 [cat <<_MMEOF >&AS_MESSAGE_LOG_FD
 1699 $mm_cc: $mm_cc_out
 1700 _MMEOF
 1701 ])
 1702   done
 1703   rm -f "$mm_conftest"
 1704 ])
 1705 mm_all_flags=m4_ifval([$4], [$mm_deprecation_flags])$mm_tested_flags
 1706 AC_SUBST([$1], [$mm_all_flags])
 1707 dnl
 1708 test "x$mm_all_flags" != x || mm_all_flags=none
 1709 AC_MSG_RESULT([$mm_all_flags])[]dnl
 1710 ])
 1711 
 1712 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
 1713 #
 1714 # This file is free software; the Free Software Foundation
 1715 # gives unlimited permission to copy and/or distribute it,
 1716 # with or without modifications, as long as this notice is preserved.
 1717 
 1718 # AM_AUTOMAKE_VERSION(VERSION)
 1719 # ----------------------------
 1720 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 1721 # generated from the m4 files accompanying Automake X.Y.
 1722 # (This private macro should not be called outside this file.)
 1723 AC_DEFUN([AM_AUTOMAKE_VERSION],
 1724 [am__api_version='1.16'
 1725 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 1726 dnl require some minimum version.  Point them to the right macro.
 1727 m4_if([$1], [1.16.1], [],
 1728       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 1729 ])
 1730 
 1731 # _AM_AUTOCONF_VERSION(VERSION)
 1732 # -----------------------------
 1733 # aclocal traces this macro to find the Autoconf version.
 1734 # This is a private macro too.  Using m4_define simplifies
 1735 # the logic in aclocal, which can simply ignore this definition.
 1736 m4_define([_AM_AUTOCONF_VERSION], [])
 1737 
 1738 # AM_SET_CURRENT_AUTOMAKE_VERSION
 1739 # -------------------------------
 1740 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 1741 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 1742 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 1743 [AM_AUTOMAKE_VERSION([1.16.1])dnl
 1744 m4_ifndef([AC_AUTOCONF_VERSION],
 1745   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 1746 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 1747 
 1748 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 1749 
 1750 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1751 #
 1752 # This file is free software; the Free Software Foundation
 1753 # gives unlimited permission to copy and/or distribute it,
 1754 # with or without modifications, as long as this notice is preserved.
 1755 
 1756 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 1757 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 1758 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 1759 #
 1760 # Of course, Automake must honor this variable whenever it calls a
 1761 # tool from the auxiliary directory.  The problem is that $srcdir (and
 1762 # therefore $ac_aux_dir as well) can be either absolute or relative,
 1763 # depending on how configure is run.  This is pretty annoying, since
 1764 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
 1765 # source directory, any form will work fine, but in subdirectories a
 1766 # relative path needs to be adjusted first.
 1767 #
 1768 # $ac_aux_dir/missing
 1769 #    fails when called from a subdirectory if $ac_aux_dir is relative
 1770 # $top_srcdir/$ac_aux_dir/missing
 1771 #    fails if $ac_aux_dir is absolute,
 1772 #    fails when called from a subdirectory in a VPATH build with
 1773 #          a relative $ac_aux_dir
 1774 #
 1775 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 1776 # are both prefixed by $srcdir.  In an in-source build this is usually
 1777 # harmless because $srcdir is '.', but things will broke when you
 1778 # start a VPATH build or use an absolute $srcdir.
 1779 #
 1780 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 1781 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 1782 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 1783 # and then we would define $MISSING as
 1784 #   MISSING="\${SHELL} $am_aux_dir/missing"
 1785 # This will work as long as MISSING is not called from configure, because
 1786 # unfortunately $(top_srcdir) has no meaning in configure.
 1787 # However there are other variables, like CC, which are often used in
 1788 # configure, and could therefore not use this "fixed" $ac_aux_dir.
 1789 #
 1790 # Another solution, used here, is to always expand $ac_aux_dir to an
 1791 # absolute PATH.  The drawback is that using absolute paths prevent a
 1792 # configured tree to be moved without reconfiguration.
 1793 
 1794 AC_DEFUN([AM_AUX_DIR_EXPAND],
 1795 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 1796 # Expand $ac_aux_dir to an absolute path.
 1797 am_aux_dir=`cd "$ac_aux_dir" && pwd`
 1798 ])
 1799 
 1800 # AM_CONDITIONAL                                            -*- Autoconf -*-
 1801 
 1802 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
 1803 #
 1804 # This file is free software; the Free Software Foundation
 1805 # gives unlimited permission to copy and/or distribute it,
 1806 # with or without modifications, as long as this notice is preserved.
 1807 
 1808 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 1809 # -------------------------------------
 1810 # Define a conditional.
 1811 AC_DEFUN([AM_CONDITIONAL],
 1812 [AC_PREREQ([2.52])dnl
 1813  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 1814        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 1815 AC_SUBST([$1_TRUE])dnl
 1816 AC_SUBST([$1_FALSE])dnl
 1817 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 1818 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
 1819 m4_define([_AM_COND_VALUE_$1], [$2])dnl
 1820 if $2; then
 1821   $1_TRUE=
 1822   $1_FALSE='#'
 1823 else
 1824   $1_TRUE='#'
 1825   $1_FALSE=
 1826 fi
 1827 AC_CONFIG_COMMANDS_PRE(
 1828 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 1829   AC_MSG_ERROR([[conditional "$1" was never defined.
 1830 Usually this means the macro was only invoked conditionally.]])
 1831 fi])])
 1832 
 1833 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 1834 #
 1835 # This file is free software; the Free Software Foundation
 1836 # gives unlimited permission to copy and/or distribute it,
 1837 # with or without modifications, as long as this notice is preserved.
 1838 
 1839 
 1840 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 1841 # written in clear, in which case automake, when reading aclocal.m4,
 1842 # will think it sees a *use*, and therefore will trigger all it's
 1843 # C support machinery.  Also note that it means that autoscan, seeing
 1844 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 1845 
 1846 
 1847 # _AM_DEPENDENCIES(NAME)
 1848 # ----------------------
 1849 # See how the compiler implements dependency checking.
 1850 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 1851 # We try a few techniques and use that to set a single cache variable.
 1852 #
 1853 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 1854 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 1855 # dependency, and given that the user is not expected to run this macro,
 1856 # just rely on AC_PROG_CC.
 1857 AC_DEFUN([_AM_DEPENDENCIES],
 1858 [AC_REQUIRE([AM_SET_DEPDIR])dnl
 1859 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 1860 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 1861 AC_REQUIRE([AM_DEP_TRACK])dnl
 1862 
 1863 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 1864       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 1865       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 1866       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 1867       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 1868       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 1869                     [depcc="$$1"   am_compiler_list=])
 1870 
 1871 AC_CACHE_CHECK([dependency style of $depcc],
 1872                [am_cv_$1_dependencies_compiler_type],
 1873 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 1874   # We make a subdir and do the tests there.  Otherwise we can end up
 1875   # making bogus files that we don't know about and never remove.  For
 1876   # instance it was reported that on HP-UX the gcc test will end up
 1877   # making a dummy file named 'D' -- because '-MD' means "put the output
 1878   # in D".
 1879   rm -rf conftest.dir
 1880   mkdir conftest.dir
 1881   # Copy depcomp to subdir because otherwise we won't find it if we're
 1882   # using a relative directory.
 1883   cp "$am_depcomp" conftest.dir
 1884   cd conftest.dir
 1885   # We will build objects and dependencies in a subdirectory because
 1886   # it helps to detect inapplicable dependency modes.  For instance
 1887   # both Tru64's cc and ICC support -MD to output dependencies as a
 1888   # side effect of compilation, but ICC will put the dependencies in
 1889   # the current directory while Tru64 will put them in the object
 1890   # directory.
 1891   mkdir sub
 1892 
 1893   am_cv_$1_dependencies_compiler_type=none
 1894   if test "$am_compiler_list" = ""; then
 1895      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 1896   fi
 1897   am__universal=false
 1898   m4_case([$1], [CC],
 1899     [case " $depcc " in #(
 1900      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1901      esac],
 1902     [CXX],
 1903     [case " $depcc " in #(
 1904      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1905      esac])
 1906 
 1907   for depmode in $am_compiler_list; do
 1908     # Setup a source with many dependencies, because some compilers
 1909     # like to wrap large dependency lists on column 80 (with \), and
 1910     # we should not choose a depcomp mode which is confused by this.
 1911     #
 1912     # We need to recreate these files for each test, as the compiler may
 1913     # overwrite some of them when testing with obscure command lines.
 1914     # This happens at least with the AIX C compiler.
 1915     : > sub/conftest.c
 1916     for i in 1 2 3 4 5 6; do
 1917       echo '#include "conftst'$i'.h"' >> sub/conftest.c
 1918       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 1919       # Solaris 10 /bin/sh.
 1920       echo '/* dummy */' > sub/conftst$i.h
 1921     done
 1922     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 1923 
 1924     # We check with '-c' and '-o' for the sake of the "dashmstdout"
 1925     # mode.  It turns out that the SunPro C++ compiler does not properly
 1926     # handle '-M -o', and we need to detect this.  Also, some Intel
 1927     # versions had trouble with output in subdirs.
 1928     am__obj=sub/conftest.${OBJEXT-o}
 1929     am__minus_obj="-o $am__obj"
 1930     case $depmode in
 1931     gcc)
 1932       # This depmode causes a compiler race in universal mode.
 1933       test "$am__universal" = false || continue
 1934       ;;
 1935     nosideeffect)
 1936       # After this tag, mechanisms are not by side-effect, so they'll
 1937       # only be used when explicitly requested.
 1938       if test "x$enable_dependency_tracking" = xyes; then
 1939 	continue
 1940       else
 1941 	break
 1942       fi
 1943       ;;
 1944     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 1945       # This compiler won't grok '-c -o', but also, the minuso test has
 1946       # not run yet.  These depmodes are late enough in the game, and
 1947       # so weak that their functioning should not be impacted.
 1948       am__obj=conftest.${OBJEXT-o}
 1949       am__minus_obj=
 1950       ;;
 1951     none) break ;;
 1952     esac
 1953     if depmode=$depmode \
 1954        source=sub/conftest.c object=$am__obj \
 1955        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 1956        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 1957          >/dev/null 2>conftest.err &&
 1958        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 1959        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 1960        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 1961        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 1962       # icc doesn't choke on unknown options, it will just issue warnings
 1963       # or remarks (even with -Werror).  So we grep stderr for any message
 1964       # that says an option was ignored or not supported.
 1965       # When given -MP, icc 7.0 and 7.1 complain thusly:
 1966       #   icc: Command line warning: ignoring option '-M'; no argument required
 1967       # The diagnosis changed in icc 8.0:
 1968       #   icc: Command line remark: option '-MP' not supported
 1969       if (grep 'ignoring option' conftest.err ||
 1970           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 1971         am_cv_$1_dependencies_compiler_type=$depmode
 1972         break
 1973       fi
 1974     fi
 1975   done
 1976 
 1977   cd ..
 1978   rm -rf conftest.dir
 1979 else
 1980   am_cv_$1_dependencies_compiler_type=none
 1981 fi
 1982 ])
 1983 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 1984 AM_CONDITIONAL([am__fastdep$1], [
 1985   test "x$enable_dependency_tracking" != xno \
 1986   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 1987 ])
 1988 
 1989 
 1990 # AM_SET_DEPDIR
 1991 # -------------
 1992 # Choose a directory name for dependency files.
 1993 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 1994 AC_DEFUN([AM_SET_DEPDIR],
 1995 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 1996 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 1997 ])
 1998 
 1999 
 2000 # AM_DEP_TRACK
 2001 # ------------
 2002 AC_DEFUN([AM_DEP_TRACK],
 2003 [AC_ARG_ENABLE([dependency-tracking], [dnl
 2004 AS_HELP_STRING(
 2005   [--enable-dependency-tracking],
 2006   [do not reject slow dependency extractors])
 2007 AS_HELP_STRING(
 2008   [--disable-dependency-tracking],
 2009   [speeds up one-time build])])
 2010 if test "x$enable_dependency_tracking" != xno; then
 2011   am_depcomp="$ac_aux_dir/depcomp"
 2012   AMDEPBACKSLASH='\'
 2013   am__nodep='_no'
 2014 fi
 2015 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 2016 AC_SUBST([AMDEPBACKSLASH])dnl
 2017 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 2018 AC_SUBST([am__nodep])dnl
 2019 _AM_SUBST_NOTMAKE([am__nodep])dnl
 2020 ])
 2021 
 2022 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 2023 
 2024 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 2025 #
 2026 # This file is free software; the Free Software Foundation
 2027 # gives unlimited permission to copy and/or distribute it,
 2028 # with or without modifications, as long as this notice is preserved.
 2029 
 2030 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 2031 # ------------------------------
 2032 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 2033 [{
 2034   # Older Autoconf quotes --file arguments for eval, but not when files
 2035   # are listed without --file.  Let's play safe and only enable the eval
 2036   # if we detect the quoting.
 2037   # TODO: see whether this extra hack can be removed once we start
 2038   # requiring Autoconf 2.70 or later.
 2039   AS_CASE([$CONFIG_FILES],
 2040           [*\'*], [eval set x "$CONFIG_FILES"],
 2041           [*], [set x $CONFIG_FILES])
 2042   shift
 2043   # Used to flag and report bootstrapping failures.
 2044   am_rc=0
 2045   for am_mf
 2046   do
 2047     # Strip MF so we end up with the name of the file.
 2048     am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
 2049     # Check whether this is an Automake generated Makefile which includes
 2050     # dependency-tracking related rules and includes.
 2051     # Grep'ing the whole file directly is not great: AIX grep has a line
 2052     # limit of 2048, but all sed's we know have understand at least 4000.
 2053     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
 2054       || continue
 2055     am_dirpart=`AS_DIRNAME(["$am_mf"])`
 2056     am_filepart=`AS_BASENAME(["$am_mf"])`
 2057     AM_RUN_LOG([cd "$am_dirpart" \
 2058       && sed -e '/# am--include-marker/d' "$am_filepart" \
 2059         | $MAKE -f - am--depfiles]) || am_rc=$?
 2060   done
 2061   if test $am_rc -ne 0; then
 2062     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
 2063     for automatic dependency tracking.  Try re-running configure with the
 2064     '--disable-dependency-tracking' option to at least be able to build
 2065     the package (albeit without support for automatic dependency tracking).])
 2066   fi
 2067   AS_UNSET([am_dirpart])
 2068   AS_UNSET([am_filepart])
 2069   AS_UNSET([am_mf])
 2070   AS_UNSET([am_rc])
 2071   rm -f conftest-deps.mk
 2072 }
 2073 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 2074 
 2075 
 2076 # AM_OUTPUT_DEPENDENCY_COMMANDS
 2077 # -----------------------------
 2078 # This macro should only be invoked once -- use via AC_REQUIRE.
 2079 #
 2080 # This code is only required when automatic dependency tracking is enabled.
 2081 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
 2082 # order to bootstrap the dependency handling code.
 2083 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 2084 [AC_CONFIG_COMMANDS([depfiles],
 2085      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 2086      [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
 2087 
 2088 # Do all the work for Automake.                             -*- Autoconf -*-
 2089 
 2090 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2091 #
 2092 # This file is free software; the Free Software Foundation
 2093 # gives unlimited permission to copy and/or distribute it,
 2094 # with or without modifications, as long as this notice is preserved.
 2095 
 2096 # This macro actually does too much.  Some checks are only needed if
 2097 # your package does certain things.  But this isn't really a big deal.
 2098 
 2099 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 2100 m4_define([AC_PROG_CC],
 2101 m4_defn([AC_PROG_CC])
 2102 [_AM_PROG_CC_C_O
 2103 ])
 2104 
 2105 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 2106 # AM_INIT_AUTOMAKE([OPTIONS])
 2107 # -----------------------------------------------
 2108 # The call with PACKAGE and VERSION arguments is the old style
 2109 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
 2110 # and VERSION should now be passed to AC_INIT and removed from
 2111 # the call to AM_INIT_AUTOMAKE.
 2112 # We support both call styles for the transition.  After
 2113 # the next Automake release, Autoconf can make the AC_INIT
 2114 # arguments mandatory, and then we can depend on a new Autoconf
 2115 # release and drop the old call support.
 2116 AC_DEFUN([AM_INIT_AUTOMAKE],
 2117 [AC_PREREQ([2.65])dnl
 2118 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 2119 dnl the ones we care about.
 2120 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 2121 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 2122 AC_REQUIRE([AC_PROG_INSTALL])dnl
 2123 if test "`cd $srcdir && pwd`" != "`pwd`"; then
 2124   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 2125   # is not polluted with repeated "-I."
 2126   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 2127   # test to see if srcdir already configured
 2128   if test -f $srcdir/config.status; then
 2129     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 2130   fi
 2131 fi
 2132 
 2133 # test whether we have cygpath
 2134 if test -z "$CYGPATH_W"; then
 2135   if (cygpath --version) >/dev/null 2>/dev/null; then
 2136     CYGPATH_W='cygpath -w'
 2137   else
 2138     CYGPATH_W=echo
 2139   fi
 2140 fi
 2141 AC_SUBST([CYGPATH_W])
 2142 
 2143 # Define the identity of the package.
 2144 dnl Distinguish between old-style and new-style calls.
 2145 m4_ifval([$2],
 2146 [AC_DIAGNOSE([obsolete],
 2147              [$0: two- and three-arguments forms are deprecated.])
 2148 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 2149  AC_SUBST([PACKAGE], [$1])dnl
 2150  AC_SUBST([VERSION], [$2])],
 2151 [_AM_SET_OPTIONS([$1])dnl
 2152 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 2153 m4_if(
 2154   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 2155   [ok:ok],,
 2156   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 2157  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 2158  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 2159 
 2160 _AM_IF_OPTION([no-define],,
 2161 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 2162  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 2163 
 2164 # Some tools Automake needs.
 2165 AC_REQUIRE([AM_SANITY_CHECK])dnl
 2166 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 2167 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 2168 AM_MISSING_PROG([AUTOCONF], [autoconf])
 2169 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 2170 AM_MISSING_PROG([AUTOHEADER], [autoheader])
 2171 AM_MISSING_PROG([MAKEINFO], [makeinfo])
 2172 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 2173 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 2174 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 2175 # For better backward compatibility.  To be removed once Automake 1.9.x
 2176 # dies out for good.  For more background, see:
 2177 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 2178 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 2179 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 2180 # We need awk for the "check" target (and possibly the TAP driver).  The
 2181 # system "awk" is bad on some platforms.
 2182 AC_REQUIRE([AC_PROG_AWK])dnl
 2183 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 2184 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 2185 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 2186 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 2187 			     [_AM_PROG_TAR([v7])])])
 2188 _AM_IF_OPTION([no-dependencies],,
 2189 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 2190 		  [_AM_DEPENDENCIES([CC])],
 2191 		  [m4_define([AC_PROG_CC],
 2192 			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 2193 AC_PROVIDE_IFELSE([AC_PROG_CXX],
 2194 		  [_AM_DEPENDENCIES([CXX])],
 2195 		  [m4_define([AC_PROG_CXX],
 2196 			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 2197 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 2198 		  [_AM_DEPENDENCIES([OBJC])],
 2199 		  [m4_define([AC_PROG_OBJC],
 2200 			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 2201 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 2202 		  [_AM_DEPENDENCIES([OBJCXX])],
 2203 		  [m4_define([AC_PROG_OBJCXX],
 2204 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 2205 ])
 2206 AC_REQUIRE([AM_SILENT_RULES])dnl
 2207 dnl The testsuite driver may need to know about EXEEXT, so add the
 2208 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 2209 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 2210 AC_CONFIG_COMMANDS_PRE(dnl
 2211 [m4_provide_if([_AM_COMPILER_EXEEXT],
 2212   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 2213 
 2214 # POSIX will say in a future version that running "rm -f" with no argument
 2215 # is OK; and we want to be able to make that assumption in our Makefile
 2216 # recipes.  So use an aggressive probe to check that the usage we want is
 2217 # actually supported "in the wild" to an acceptable degree.
 2218 # See automake bug#10828.
 2219 # To make any issue more visible, cause the running configure to be aborted
 2220 # by default if the 'rm' program in use doesn't match our expectations; the
 2221 # user can still override this though.
 2222 if rm -f && rm -fr && rm -rf; then : OK; else
 2223   cat >&2 <<'END'
 2224 Oops!
 2225 
 2226 Your 'rm' program seems unable to run without file operands specified
 2227 on the command line, even when the '-f' option is present.  This is contrary
 2228 to the behaviour of most rm programs out there, and not conforming with
 2229 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 2230 
 2231 Please tell bug-automake@gnu.org about your system, including the value
 2232 of your $PATH and any error possibly output before this message.  This
 2233 can help us improve future automake versions.
 2234 
 2235 END
 2236   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 2237     echo 'Configuration will proceed anyway, since you have set the' >&2
 2238     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 2239     echo >&2
 2240   else
 2241     cat >&2 <<'END'
 2242 Aborting the configuration process, to ensure you take notice of the issue.
 2243 
 2244 You can download and install GNU coreutils to get an 'rm' implementation
 2245 that behaves properly: <https://www.gnu.org/software/coreutils/>.
 2246 
 2247 If you want to complete the configuration process using your problematic
 2248 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 2249 to "yes", and re-run configure.
 2250 
 2251 END
 2252     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 2253   fi
 2254 fi
 2255 dnl The trailing newline in this macro's definition is deliberate, for
 2256 dnl backward compatibility and to allow trailing 'dnl'-style comments
 2257 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 2258 ])
 2259 
 2260 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 2261 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 2262 dnl mangled by Autoconf and run in a shell conditional statement.
 2263 m4_define([_AC_COMPILER_EXEEXT],
 2264 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 2265 
 2266 # When config.status generates a header, we must update the stamp-h file.
 2267 # This file resides in the same directory as the config header
 2268 # that is generated.  The stamp files are numbered to have different names.
 2269 
 2270 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 2271 # loop where config.status creates the headers, so we can generate
 2272 # our stamp files there.
 2273 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 2274 [# Compute $1's index in $config_headers.
 2275 _am_arg=$1
 2276 _am_stamp_count=1
 2277 for _am_header in $config_headers :; do
 2278   case $_am_header in
 2279     $_am_arg | $_am_arg:* )
 2280       break ;;
 2281     * )
 2282       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 2283   esac
 2284 done
 2285 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 2286 
 2287 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2288 #
 2289 # This file is free software; the Free Software Foundation
 2290 # gives unlimited permission to copy and/or distribute it,
 2291 # with or without modifications, as long as this notice is preserved.
 2292 
 2293 # AM_PROG_INSTALL_SH
 2294 # ------------------
 2295 # Define $install_sh.
 2296 AC_DEFUN([AM_PROG_INSTALL_SH],
 2297 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2298 if test x"${install_sh+set}" != xset; then
 2299   case $am_aux_dir in
 2300   *\ * | *\	*)
 2301     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 2302   *)
 2303     install_sh="\${SHELL} $am_aux_dir/install-sh"
 2304   esac
 2305 fi
 2306 AC_SUBST([install_sh])])
 2307 
 2308 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
 2309 #
 2310 # This file is free software; the Free Software Foundation
 2311 # gives unlimited permission to copy and/or distribute it,
 2312 # with or without modifications, as long as this notice is preserved.
 2313 
 2314 # Check whether the underlying file-system supports filenames
 2315 # with a leading dot.  For instance MS-DOS doesn't.
 2316 AC_DEFUN([AM_SET_LEADING_DOT],
 2317 [rm -rf .tst 2>/dev/null
 2318 mkdir .tst 2>/dev/null
 2319 if test -d .tst; then
 2320   am__leading_dot=.
 2321 else
 2322   am__leading_dot=_
 2323 fi
 2324 rmdir .tst 2>/dev/null
 2325 AC_SUBST([am__leading_dot])])
 2326 
 2327 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 2328 # From Jim Meyering
 2329 
 2330 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2331 #
 2332 # This file is free software; the Free Software Foundation
 2333 # gives unlimited permission to copy and/or distribute it,
 2334 # with or without modifications, as long as this notice is preserved.
 2335 
 2336 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 2337 # ----------------------------------
 2338 # Control maintainer-specific portions of Makefiles.
 2339 # Default is to disable them, unless 'enable' is passed literally.
 2340 # For symmetry, 'disable' may be passed as well.  Anyway, the user
 2341 # can override the default with the --enable/--disable switch.
 2342 AC_DEFUN([AM_MAINTAINER_MODE],
 2343 [m4_case(m4_default([$1], [disable]),
 2344        [enable], [m4_define([am_maintainer_other], [disable])],
 2345        [disable], [m4_define([am_maintainer_other], [enable])],
 2346        [m4_define([am_maintainer_other], [enable])
 2347         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 2348 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 2349   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 2350   AC_ARG_ENABLE([maintainer-mode],
 2351     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
 2352       am_maintainer_other[ make rules and dependencies not useful
 2353       (and sometimes confusing) to the casual installer])],
 2354     [USE_MAINTAINER_MODE=$enableval],
 2355     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 2356   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 2357   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 2358   MAINT=$MAINTAINER_MODE_TRUE
 2359   AC_SUBST([MAINT])dnl
 2360 ]
 2361 )
 2362 
 2363 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 2364 
 2365 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2366 #
 2367 # This file is free software; the Free Software Foundation
 2368 # gives unlimited permission to copy and/or distribute it,
 2369 # with or without modifications, as long as this notice is preserved.
 2370 
 2371 # AM_MAKE_INCLUDE()
 2372 # -----------------
 2373 # Check whether make has an 'include' directive that can support all
 2374 # the idioms we need for our automatic dependency tracking code.
 2375 AC_DEFUN([AM_MAKE_INCLUDE],
 2376 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
 2377 cat > confinc.mk << 'END'
 2378 am__doit:
 2379 	@echo this is the am__doit target >confinc.out
 2380 .PHONY: am__doit
 2381 END
 2382 am__include="#"
 2383 am__quote=
 2384 # BSD make does it like this.
 2385 echo '.include "confinc.mk" # ignored' > confmf.BSD
 2386 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
 2387 echo 'include confinc.mk # ignored' > confmf.GNU
 2388 _am_result=no
 2389 for s in GNU BSD; do
 2390   AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
 2391   AS_CASE([$?:`cat confinc.out 2>/dev/null`],
 2392       ['0:this is the am__doit target'],
 2393       [AS_CASE([$s],
 2394           [BSD], [am__include='.include' am__quote='"'],
 2395           [am__include='include' am__quote=''])])
 2396   if test "$am__include" != "#"; then
 2397     _am_result="yes ($s style)"
 2398     break
 2399   fi
 2400 done
 2401 rm -f confinc.* confmf.*
 2402 AC_MSG_RESULT([${_am_result}])
 2403 AC_SUBST([am__include])])
 2404 AC_SUBST([am__quote])])
 2405 
 2406 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 2407 
 2408 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
 2409 #
 2410 # This file is free software; the Free Software Foundation
 2411 # gives unlimited permission to copy and/or distribute it,
 2412 # with or without modifications, as long as this notice is preserved.
 2413 
 2414 # AM_MISSING_PROG(NAME, PROGRAM)
 2415 # ------------------------------
 2416 AC_DEFUN([AM_MISSING_PROG],
 2417 [AC_REQUIRE([AM_MISSING_HAS_RUN])
 2418 $1=${$1-"${am_missing_run}$2"}
 2419 AC_SUBST($1)])
 2420 
 2421 # AM_MISSING_HAS_RUN
 2422 # ------------------
 2423 # Define MISSING if not defined so far and test if it is modern enough.
 2424 # If it is, set am_missing_run to use it, otherwise, to nothing.
 2425 AC_DEFUN([AM_MISSING_HAS_RUN],
 2426 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2427 AC_REQUIRE_AUX_FILE([missing])dnl
 2428 if test x"${MISSING+set}" != xset; then
 2429   case $am_aux_dir in
 2430   *\ * | *\	*)
 2431     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 2432   *)
 2433     MISSING="\${SHELL} $am_aux_dir/missing" ;;
 2434   esac
 2435 fi
 2436 # Use eval to expand $SHELL
 2437 if eval "$MISSING --is-lightweight"; then
 2438   am_missing_run="$MISSING "
 2439 else
 2440   am_missing_run=
 2441   AC_MSG_WARN(['missing' script is too old or missing])
 2442 fi
 2443 ])
 2444 
 2445 # Helper functions for option handling.                     -*- Autoconf -*-
 2446 
 2447 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2448 #
 2449 # This file is free software; the Free Software Foundation
 2450 # gives unlimited permission to copy and/or distribute it,
 2451 # with or without modifications, as long as this notice is preserved.
 2452 
 2453 # _AM_MANGLE_OPTION(NAME)
 2454 # -----------------------
 2455 AC_DEFUN([_AM_MANGLE_OPTION],
 2456 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 2457 
 2458 # _AM_SET_OPTION(NAME)
 2459 # --------------------
 2460 # Set option NAME.  Presently that only means defining a flag for this option.
 2461 AC_DEFUN([_AM_SET_OPTION],
 2462 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 2463 
 2464 # _AM_SET_OPTIONS(OPTIONS)
 2465 # ------------------------
 2466 # OPTIONS is a space-separated list of Automake options.
 2467 AC_DEFUN([_AM_SET_OPTIONS],
 2468 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 2469 
 2470 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 2471 # -------------------------------------------
 2472 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 2473 AC_DEFUN([_AM_IF_OPTION],
 2474 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 2475 
 2476 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 2477 #
 2478 # This file is free software; the Free Software Foundation
 2479 # gives unlimited permission to copy and/or distribute it,
 2480 # with or without modifications, as long as this notice is preserved.
 2481 
 2482 # _AM_PROG_CC_C_O
 2483 # ---------------
 2484 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 2485 # to automatically call this.
 2486 AC_DEFUN([_AM_PROG_CC_C_O],
 2487 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2488 AC_REQUIRE_AUX_FILE([compile])dnl
 2489 AC_LANG_PUSH([C])dnl
 2490 AC_CACHE_CHECK(
 2491   [whether $CC understands -c and -o together],
 2492   [am_cv_prog_cc_c_o],
 2493   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 2494   # Make sure it works both with $CC and with simple cc.
 2495   # Following AC_PROG_CC_C_O, we do the test twice because some
 2496   # compilers refuse to overwrite an existing .o file with -o,
 2497   # though they will create one.
 2498   am_cv_prog_cc_c_o=yes
 2499   for am_i in 1 2; do
 2500     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 2501          && test -f conftest2.$ac_objext; then
 2502       : OK
 2503     else
 2504       am_cv_prog_cc_c_o=no
 2505       break
 2506     fi
 2507   done
 2508   rm -f core conftest*
 2509   unset am_i])
 2510 if test "$am_cv_prog_cc_c_o" != yes; then
 2511    # Losing compiler, so override with the script.
 2512    # FIXME: It is wrong to rewrite CC.
 2513    # But if we don't then we get into trouble of one sort or another.
 2514    # A longer-term fix would be to have automake use am__CC in this case,
 2515    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 2516    CC="$am_aux_dir/compile $CC"
 2517 fi
 2518 AC_LANG_POP([C])])
 2519 
 2520 # For backward compatibility.
 2521 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 2522 
 2523 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2524 #
 2525 # This file is free software; the Free Software Foundation
 2526 # gives unlimited permission to copy and/or distribute it,
 2527 # with or without modifications, as long as this notice is preserved.
 2528 
 2529 # AM_RUN_LOG(COMMAND)
 2530 # -------------------
 2531 # Run COMMAND, save the exit status in ac_status, and log it.
 2532 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 2533 AC_DEFUN([AM_RUN_LOG],
 2534 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 2535    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 2536    ac_status=$?
 2537    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 2538    (exit $ac_status); }])
 2539 
 2540 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 2541 
 2542 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2543 #
 2544 # This file is free software; the Free Software Foundation
 2545 # gives unlimited permission to copy and/or distribute it,
 2546 # with or without modifications, as long as this notice is preserved.
 2547 
 2548 # AM_SANITY_CHECK
 2549 # ---------------
 2550 AC_DEFUN([AM_SANITY_CHECK],
 2551 [AC_MSG_CHECKING([whether build environment is sane])
 2552 # Reject unsafe characters in $srcdir or the absolute working directory
 2553 # name.  Accept space and tab only in the latter.
 2554 am_lf='
 2555 '
 2556 case `pwd` in
 2557   *[[\\\"\#\$\&\'\`$am_lf]]*)
 2558     AC_MSG_ERROR([unsafe absolute working directory name]);;
 2559 esac
 2560 case $srcdir in
 2561   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
 2562     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 2563 esac
 2564 
 2565 # Do 'set' in a subshell so we don't clobber the current shell's
 2566 # arguments.  Must try -L first in case configure is actually a
 2567 # symlink; some systems play weird games with the mod time of symlinks
 2568 # (eg FreeBSD returns the mod time of the symlink's containing
 2569 # directory).
 2570 if (
 2571    am_has_slept=no
 2572    for am_try in 1 2; do
 2573      echo "timestamp, slept: $am_has_slept" > conftest.file
 2574      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 2575      if test "$[*]" = "X"; then
 2576 	# -L didn't work.
 2577 	set X `ls -t "$srcdir/configure" conftest.file`
 2578      fi
 2579      if test "$[*]" != "X $srcdir/configure conftest.file" \
 2580 	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
 2581 
 2582 	# If neither matched, then we have a broken ls.  This can happen
 2583 	# if, for instance, CONFIG_SHELL is bash and it inherits a
 2584 	# broken ls alias from the environment.  This has actually
 2585 	# happened.  Such a system could not be considered "sane".
 2586 	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 2587   alias in your environment])
 2588      fi
 2589      if test "$[2]" = conftest.file || test $am_try -eq 2; then
 2590        break
 2591      fi
 2592      # Just in case.
 2593      sleep 1
 2594      am_has_slept=yes
 2595    done
 2596    test "$[2]" = conftest.file
 2597    )
 2598 then
 2599    # Ok.
 2600    :
 2601 else
 2602    AC_MSG_ERROR([newly created file is older than distributed files!
 2603 Check your system clock])
 2604 fi
 2605 AC_MSG_RESULT([yes])
 2606 # If we didn't sleep, we still need to ensure time stamps of config.status and
 2607 # generated files are strictly newer.
 2608 am_sleep_pid=
 2609 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 2610   ( sleep 1 ) &
 2611   am_sleep_pid=$!
 2612 fi
 2613 AC_CONFIG_COMMANDS_PRE(
 2614   [AC_MSG_CHECKING([that generated files are newer than configure])
 2615    if test -n "$am_sleep_pid"; then
 2616      # Hide warnings about reused PIDs.
 2617      wait $am_sleep_pid 2>/dev/null
 2618    fi
 2619    AC_MSG_RESULT([done])])
 2620 rm -f conftest.file
 2621 ])
 2622 
 2623 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
 2624 #
 2625 # This file is free software; the Free Software Foundation
 2626 # gives unlimited permission to copy and/or distribute it,
 2627 # with or without modifications, as long as this notice is preserved.
 2628 
 2629 # AM_SILENT_RULES([DEFAULT])
 2630 # --------------------------
 2631 # Enable less verbose build rules; with the default set to DEFAULT
 2632 # ("yes" being less verbose, "no" or empty being verbose).
 2633 AC_DEFUN([AM_SILENT_RULES],
 2634 [AC_ARG_ENABLE([silent-rules], [dnl
 2635 AS_HELP_STRING(
 2636   [--enable-silent-rules],
 2637   [less verbose build output (undo: "make V=1")])
 2638 AS_HELP_STRING(
 2639   [--disable-silent-rules],
 2640   [verbose build output (undo: "make V=0")])dnl
 2641 ])
 2642 case $enable_silent_rules in @%:@ (((
 2643   yes) AM_DEFAULT_VERBOSITY=0;;
 2644    no) AM_DEFAULT_VERBOSITY=1;;
 2645     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 2646 esac
 2647 dnl
 2648 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 2649 dnl do not support nested variable expansions.
 2650 dnl See automake bug#9928 and bug#10237.
 2651 am_make=${MAKE-make}
 2652 AC_CACHE_CHECK([whether $am_make supports nested variables],
 2653    [am_cv_make_support_nested_variables],
 2654    [if AS_ECHO([['TRUE=$(BAR$(V))
 2655 BAR0=false
 2656 BAR1=true
 2657 V=1
 2658 am__doit:
 2659 	@$(TRUE)
 2660 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 2661   am_cv_make_support_nested_variables=yes
 2662 else
 2663   am_cv_make_support_nested_variables=no
 2664 fi])
 2665 if test $am_cv_make_support_nested_variables = yes; then
 2666   dnl Using '$V' instead of '$(V)' breaks IRIX make.
 2667   AM_V='$(V)'
 2668   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 2669 else
 2670   AM_V=$AM_DEFAULT_VERBOSITY
 2671   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 2672 fi
 2673 AC_SUBST([AM_V])dnl
 2674 AM_SUBST_NOTMAKE([AM_V])dnl
 2675 AC_SUBST([AM_DEFAULT_V])dnl
 2676 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 2677 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 2678 AM_BACKSLASH='\'
 2679 AC_SUBST([AM_BACKSLASH])dnl
 2680 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 2681 ])
 2682 
 2683 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2684 #
 2685 # This file is free software; the Free Software Foundation
 2686 # gives unlimited permission to copy and/or distribute it,
 2687 # with or without modifications, as long as this notice is preserved.
 2688 
 2689 # AM_PROG_INSTALL_STRIP
 2690 # ---------------------
 2691 # One issue with vendor 'install' (even GNU) is that you can't
 2692 # specify the program used to strip binaries.  This is especially
 2693 # annoying in cross-compiling environments, where the build's strip
 2694 # is unlikely to handle the host's binaries.
 2695 # Fortunately install-sh will honor a STRIPPROG variable, so we
 2696 # always use install-sh in "make install-strip", and initialize
 2697 # STRIPPROG with the value of the STRIP variable (set by the user).
 2698 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 2699 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 2700 # Installed binaries are usually stripped using 'strip' when the user
 2701 # run "make install-strip".  However 'strip' might not be the right
 2702 # tool to use in cross-compilation environments, therefore Automake
 2703 # will honor the 'STRIP' environment variable to overrule this program.
 2704 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 2705 if test "$cross_compiling" != no; then
 2706   AC_CHECK_TOOL([STRIP], [strip], :)
 2707 fi
 2708 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 2709 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 2710 
 2711 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
 2712 #
 2713 # This file is free software; the Free Software Foundation
 2714 # gives unlimited permission to copy and/or distribute it,
 2715 # with or without modifications, as long as this notice is preserved.
 2716 
 2717 # _AM_SUBST_NOTMAKE(VARIABLE)
 2718 # ---------------------------
 2719 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 2720 # This macro is traced by Automake.
 2721 AC_DEFUN([_AM_SUBST_NOTMAKE])
 2722 
 2723 # AM_SUBST_NOTMAKE(VARIABLE)
 2724 # --------------------------
 2725 # Public sister of _AM_SUBST_NOTMAKE.
 2726 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 2727 
 2728 # Check how to create a tarball.                            -*- Autoconf -*-
 2729 
 2730 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
 2731 #
 2732 # This file is free software; the Free Software Foundation
 2733 # gives unlimited permission to copy and/or distribute it,
 2734 # with or without modifications, as long as this notice is preserved.
 2735 
 2736 # _AM_PROG_TAR(FORMAT)
 2737 # --------------------
 2738 # Check how to create a tarball in format FORMAT.
 2739 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
 2740 #
 2741 # Substitute a variable $(am__tar) that is a command
 2742 # writing to stdout a FORMAT-tarball containing the directory
 2743 # $tardir.
 2744 #     tardir=directory && $(am__tar) > result.tar
 2745 #
 2746 # Substitute a variable $(am__untar) that extract such
 2747 # a tarball read from stdin.
 2748 #     $(am__untar) < result.tar
 2749 #
 2750 AC_DEFUN([_AM_PROG_TAR],
 2751 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 2752 # in the wild :-(  We should find a proper way to deprecate it ...
 2753 AC_SUBST([AMTAR], ['$${TAR-tar}'])
 2754 
 2755 # We'll loop over all known methods to create a tar archive until one works.
 2756 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 2757 
 2758 m4_if([$1], [v7],
 2759   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 2760 
 2761   [m4_case([$1],
 2762     [ustar],
 2763      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 2764       # There is notably a 21 bits limit for the UID and the GID.  In fact,
 2765       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 2766       # and bug#13588).
 2767       am_max_uid=2097151 # 2^21 - 1
 2768       am_max_gid=$am_max_uid
 2769       # The $UID and $GID variables are not portable, so we need to resort
 2770       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 2771       # below are definitely unexpected, so allow the users to see them
 2772       # (that is, avoid stderr redirection).
 2773       am_uid=`id -u || echo unknown`
 2774       am_gid=`id -g || echo unknown`
 2775       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 2776       if test $am_uid -le $am_max_uid; then
 2777          AC_MSG_RESULT([yes])
 2778       else
 2779          AC_MSG_RESULT([no])
 2780          _am_tools=none
 2781       fi
 2782       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 2783       if test $am_gid -le $am_max_gid; then
 2784          AC_MSG_RESULT([yes])
 2785       else
 2786         AC_MSG_RESULT([no])
 2787         _am_tools=none
 2788       fi],
 2789 
 2790   [pax],
 2791     [],
 2792 
 2793   [m4_fatal([Unknown tar format])])
 2794 
 2795   AC_MSG_CHECKING([how to create a $1 tar archive])
 2796 
 2797   # Go ahead even if we have the value already cached.  We do so because we
 2798   # need to set the values for the 'am__tar' and 'am__untar' variables.
 2799   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 2800 
 2801   for _am_tool in $_am_tools; do
 2802     case $_am_tool in
 2803     gnutar)
 2804       for _am_tar in tar gnutar gtar; do
 2805         AM_RUN_LOG([$_am_tar --version]) && break
 2806       done
 2807       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 2808       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 2809       am__untar="$_am_tar -xf -"
 2810       ;;
 2811     plaintar)
 2812       # Must skip GNU tar: if it does not support --format= it doesn't create
 2813       # ustar tarball either.
 2814       (tar --version) >/dev/null 2>&1 && continue
 2815       am__tar='tar chf - "$$tardir"'
 2816       am__tar_='tar chf - "$tardir"'
 2817       am__untar='tar xf -'
 2818       ;;
 2819     pax)
 2820       am__tar='pax -L -x $1 -w "$$tardir"'
 2821       am__tar_='pax -L -x $1 -w "$tardir"'
 2822       am__untar='pax -r'
 2823       ;;
 2824     cpio)
 2825       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 2826       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 2827       am__untar='cpio -i -H $1 -d'
 2828       ;;
 2829     none)
 2830       am__tar=false
 2831       am__tar_=false
 2832       am__untar=false
 2833       ;;
 2834     esac
 2835 
 2836     # If the value was cached, stop now.  We just wanted to have am__tar
 2837     # and am__untar set.
 2838     test -n "${am_cv_prog_tar_$1}" && break
 2839 
 2840     # tar/untar a dummy directory, and stop if the command works.
 2841     rm -rf conftest.dir
 2842     mkdir conftest.dir
 2843     echo GrepMe > conftest.dir/file
 2844     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 2845     rm -rf conftest.dir
 2846     if test -s conftest.tar; then
 2847       AM_RUN_LOG([$am__untar <conftest.tar])
 2848       AM_RUN_LOG([cat conftest.dir/file])
 2849       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 2850     fi
 2851   done
 2852   rm -rf conftest.dir
 2853 
 2854   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 2855   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 2856 
 2857 AC_SUBST([am__tar])
 2858 AC_SUBST([am__untar])
 2859 ]) # _AM_PROG_TAR
 2860 
 2861 m4_include([build/ax_boost_base.m4])
 2862 m4_include([build/ax_boost_system.m4])
 2863 m4_include([build/ax_boost_timer.m4])
 2864 m4_include([build/libtool.m4])
 2865 m4_include([build/ltoptions.m4])
 2866 m4_include([build/ltsugar.m4])
 2867 m4_include([build/ltversion.m4])
 2868 m4_include([build/lt~obsolete.m4])