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