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