1# generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3# Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
24# serial 1 (pkg-config-0.24)
25#
26# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
27#
28# This program is free software; you can redistribute it and/or modify
29# it under the terms of the GNU General Public License as published by
30# the Free Software Foundation; either version 2 of the License, or
31# (at your option) any later version.
32#
33# This program is distributed in the hope that it will be useful, but
34# WITHOUT ANY WARRANTY; without even the implied warranty of
35# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36# General Public License for more details.
37#
38# You should have received a copy of the GNU General Public License
39# along with this program; if not, write to the Free Software
40# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41#
42# As a special exception to the GNU General Public License, if you
43# distribute this file as part of a program that contains a
44# configuration script generated by Autoconf, you may include it under
45# the same distribution terms that you use for the rest of that program.
46
47# PKG_PROG_PKG_CONFIG([MIN-VERSION])
48# ----------------------------------
49AC_DEFUN([PKG_PROG_PKG_CONFIG],
50[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
51m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
52m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
53AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
54AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
55AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
56
57if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
58	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
59fi
60if test -n "$PKG_CONFIG"; then
61	_pkg_min_version=m4_default([$1], [0.9.0])
62	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
63	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
64		AC_MSG_RESULT([yes])
65	else
66		AC_MSG_RESULT([no])
67		PKG_CONFIG=""
68	fi
69fi[]dnl
70])# PKG_PROG_PKG_CONFIG
71
72# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
73#
74# Check to see whether a particular set of modules exists.  Similar
75# to PKG_CHECK_MODULES(), but does not set variables or print errors.
76#
77# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
78# only at the first occurence in configure.ac, so if the first place
79# it's called might be skipped (such as if it is within an "if", you
80# have to call PKG_CHECK_EXISTS manually
81# --------------------------------------------------------------
82AC_DEFUN([PKG_CHECK_EXISTS],
83[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
84if test -n "$PKG_CONFIG" && \
85    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
86  m4_default([$2], [:])
87m4_ifvaln([$3], [else
88  $3])dnl
89fi])
90
91# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
92# ---------------------------------------------
93m4_define([_PKG_CONFIG],
94[if test -n "$$1"; then
95    pkg_cv_[]$1="$$1"
96 elif test -n "$PKG_CONFIG"; then
97    PKG_CHECK_EXISTS([$3],
98                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
99		      test "x$?" != "x0" && pkg_failed=yes ],
100		     [pkg_failed=yes])
101 else
102    pkg_failed=untried
103fi[]dnl
104])# _PKG_CONFIG
105
106# _PKG_SHORT_ERRORS_SUPPORTED
107# -----------------------------
108AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
109[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
111        _pkg_short_errors_supported=yes
112else
113        _pkg_short_errors_supported=no
114fi[]dnl
115])# _PKG_SHORT_ERRORS_SUPPORTED
116
117
118# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
119# [ACTION-IF-NOT-FOUND])
120#
121#
122# Note that if there is a possibility the first call to
123# PKG_CHECK_MODULES might not happen, you should be sure to include an
124# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
125#
126#
127# --------------------------------------------------------------
128AC_DEFUN([PKG_CHECK_MODULES],
129[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
130AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
131AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
132
133pkg_failed=no
134AC_MSG_CHECKING([for $1])
135
136_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
137_PKG_CONFIG([$1][_LIBS], [libs], [$2])
138
139m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
140and $1[]_LIBS to avoid the need to call pkg-config.
141See the pkg-config man page for more details.])
142
143if test $pkg_failed = yes; then
144   	AC_MSG_RESULT([no])
145        _PKG_SHORT_ERRORS_SUPPORTED
146        if test $_pkg_short_errors_supported = yes; then
147	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
148        else
149	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
150        fi
151	# Put the nasty error message in config.log where it belongs
152	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
153
154	m4_default([$4], [AC_MSG_ERROR(
155[Package requirements ($2) were not met:
156
157$$1_PKG_ERRORS
158
159Consider adjusting the PKG_CONFIG_PATH environment variable if you
160installed software in a non-standard prefix.
161
162_PKG_TEXT])[]dnl
163        ])
164elif test $pkg_failed = untried; then
165     	AC_MSG_RESULT([no])
166	m4_default([$4], [AC_MSG_FAILURE(
167[The pkg-config script could not be found or is too old.  Make sure it
168is in your PATH or set the PKG_CONFIG environment variable to the full
169path to pkg-config.
170
171_PKG_TEXT
172
173To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
174        ])
175else
176	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
177	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
178        AC_MSG_RESULT([yes])
179	$3
180fi[]dnl
181])# PKG_CHECK_MODULES
182
183
184# PKG_INSTALLDIR(DIRECTORY)
185# -------------------------
186# Substitutes the variable pkgconfigdir as the location where a module
187# should install pkg-config .pc files. By default the directory is
188# $libdir/pkgconfig, but the default can be changed by passing
189# DIRECTORY. The user can override through the --with-pkgconfigdir
190# parameter.
191AC_DEFUN([PKG_INSTALLDIR],
192[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
193m4_pushdef([pkg_description],
194    [pkg-config installation directory @<:@]pkg_default[@:>@])
195AC_ARG_WITH([pkgconfigdir],
196    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
197    [with_pkgconfigdir=]pkg_default)
198AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
199m4_popdef([pkg_default])
200m4_popdef([pkg_description])
201]) dnl PKG_INSTALLDIR
202
203
204# PKG_NOARCH_INSTALLDIR(DIRECTORY)
205# -------------------------
206# Substitutes the variable noarch_pkgconfigdir as the location where a
207# module should install arch-independent pkg-config .pc files. By
208# default the directory is $datadir/pkgconfig, but the default can be
209# changed by passing DIRECTORY. The user can override through the
210# --with-noarch-pkgconfigdir parameter.
211AC_DEFUN([PKG_NOARCH_INSTALLDIR],
212[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
213m4_pushdef([pkg_description],
214    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
215AC_ARG_WITH([noarch-pkgconfigdir],
216    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
217    [with_noarch_pkgconfigdir=]pkg_default)
218AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
219m4_popdef([pkg_default])
220m4_popdef([pkg_description])
221]) dnl PKG_NOARCH_INSTALLDIR
222
223
224# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
225# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
226# -------------------------------------------
227# Retrieves the value of the pkg-config variable for the given module.
228AC_DEFUN([PKG_CHECK_VAR],
229[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
230AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
231
232_PKG_CONFIG([$1], [variable="][$3]["], [$2])
233AS_VAR_COPY([$1], [pkg_cv_][$1])
234
235AS_VAR_IF([$1], [""], [$5], [$4])dnl
236])# PKG_CHECK_VAR
237
238# ============================================================================
239#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
240# ============================================================================
241#
242# SYNOPSIS
243#
244#   MM_AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
245#
246# DESCRIPTION
247#
248#   Check for baseline language coverage in the compiler for the C++11
249#   standard; if necessary, add switches to CXXFLAGS to enable support.
250#
251#   The first argument, if specified, indicates whether you insist on an
252#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
253#   -std=c++11).  If neither is specified, you get whatever works, with
254#   preference for an extended mode.
255#
256#   The second argument, if specified 'mandatory' or if left unspecified,
257#   indicates that baseline C++11 support is required and that the macro
258#   should error out if no mode with that support is found.  If specified
259#   'optional', then configuration proceeds regardless, after defining
260#   HAVE_CXX11 if and only if a supporting mode is found.
261#
262# LICENSE
263#
264#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
265#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
266#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
267#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
268#
269#   Copying and distribution of this file, with or without modification, are
270#   permitted in any medium without royalty provided the copyright notice
271#   and this notice are preserved. This file is offered as-is, without any
272#   warranty.
273
274# Copied from ax_cxx_compile_stdcxx_11.m4 and added MM_ prefix to avoid
275# possible conflict with AX_CXX_COMPILE_STDCXX_11 in other modules.
276
277#serial 11
278
279m4_define([_MM_AX_CXX_COMPILE_STDCXX_11_testbody], [[
280  template <typename T>
281    struct check
282    {
283      static_assert(sizeof(int) <= sizeof(T), "not big enough");
284    };
285
286    struct Base {
287    virtual void f() {}
288    };
289    struct Child : public Base {
290    virtual void f() override {}
291    };
292
293    typedef check<check<bool>> right_angle_brackets;
294
295    int a;
296    decltype(a) b;
297
298    typedef check<int> check_type;
299    check_type c;
300    check_type&& cr = static_cast<check_type&&>(c);
301
302    auto d = a;
303    auto l = [](){};
304    // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable]
305    struct use_l { use_l() { l(); } };
306
307    // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
308    // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
309    namespace test_template_alias_sfinae {
310        struct foo {};
311
312        template<typename T>
313        using member = typename T::member_type;
314
315        template<typename T>
316        void func(...) {}
317
318        template<typename T>
319        void func(member<T>*) {}
320
321        void test();
322
323        void test() {
324            func<foo>(0);
325        }
326    }
327]])
328
329AC_DEFUN([MM_AX_CXX_COMPILE_STDCXX_11], [dnl
330  m4_if([$1], [], [],
331        [$1], [ext], [],
332        [$1], [noext], [],
333        [m4_fatal([invalid argument `$1' to MM_AX_CXX_COMPILE_STDCXX_11])])dnl
334  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
335        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
336        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
337        [m4_fatal([invalid second argument `$2' to MM_AX_CXX_COMPILE_STDCXX_11])])
338  AC_LANG_PUSH([C++])dnl
339  ac_success=no
340  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
341  ax_cv_cxx_compile_cxx11,
342  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
343    [ax_cv_cxx_compile_cxx11=yes],
344    [ax_cv_cxx_compile_cxx11=no])])
345  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
346    ac_success=yes
347  fi
348
349  m4_if([$1], [noext], [], [dnl
350  if test x$ac_success = xno; then
351    for switch in -std=gnu++11 -std=gnu++0x; do
352      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
353      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
354                     $cachevar,
355        [ac_save_CXXFLAGS="$CXXFLAGS"
356         CXXFLAGS="$CXXFLAGS $switch"
357         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
358          [eval $cachevar=yes],
359          [eval $cachevar=no])
360         CXXFLAGS="$ac_save_CXXFLAGS"])
361      if eval test x\$$cachevar = xyes; then
362        CXXFLAGS="$CXXFLAGS $switch"
363        ac_success=yes
364        break
365      fi
366    done
367  fi])
368
369  m4_if([$1], [ext], [], [dnl
370  if test x$ac_success = xno; then
371    dnl HP's aCC needs +std=c++11 according to:
372    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
373    for switch in -std=c++11 -std=c++0x +std=c++11; do
374      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
375      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
376                     $cachevar,
377        [ac_save_CXXFLAGS="$CXXFLAGS"
378         CXXFLAGS="$CXXFLAGS $switch"
379         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
380          [eval $cachevar=yes],
381          [eval $cachevar=no])
382         CXXFLAGS="$ac_save_CXXFLAGS"])
383      if eval test x\$$cachevar = xyes; then
384        CXXFLAGS="$CXXFLAGS $switch"
385        ac_success=yes
386        break
387      fi
388    done
389  fi])
390  AC_LANG_POP([C++])
391  if test x$ax_cxx_compile_cxx11_required = xtrue; then
392    if test x$ac_success = xno; then
393      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
394    fi
395  else
396    if test x$ac_success = xno; then
397      HAVE_CXX11=0
398      AC_MSG_NOTICE([No compiler with C++11 support was found])
399    else
400      HAVE_CXX11=1
401      AC_DEFINE(HAVE_CXX11,1,
402                [define if the compiler supports basic C++11 syntax])
403    fi
404
405    AC_SUBST(HAVE_CXX11)
406  fi
407])
408
409
410
411#serial 20090814
412
413AC_DEFUN([_MM_PRE_INIT], [m4_pattern_forbid([^_?MM_])])
414
415m4_define([_MM_PREREQ],
416[dnl
417m4_if(m4_quote(m4_version_compare([$2], [$3])), [-1],
418      [m4_fatal([$4 requires $1 $3 (version $2 is installed)])])[]dnl
419])
420
421AC_DEFUN([MM_PREREQ],
422[dnl
423m4_assert([$# >= 1])[]dnl
424AC_REQUIRE([_MM_PRE_INIT])[]dnl
425_MM_PREREQ([mm-common], [0.9.9], [$1], m4_defn([AC_PACKAGE_NAME]))[]dnl
426])
427
428
429#serial 20110327
430
431m4_define([_MM_CONFIG_DOCTOOL_DIR],
432[dnl
433AC_PROVIDE([$0])[]dnl
434AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
435dnl
436AC_MSG_CHECKING([location of documentation utilities])
437AS_IF([test "x$MMDOCTOOLDIR" = x],
438[
439  MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir mm-common-util 2>&AS_MESSAGE_LOG_FD`
440  AS_IF([test "[$]?" -ne 0],
441        [AC_MSG_ERROR([[not found
442The required module mm-common-util could not be found on this system.  If you
443are running a binary distribution and the mm-common package is installed,
444make sure that any separate development package for mm-common is installed
445as well.  If you built mm-common yourself, it may be necessary to adjust
446the PKG_CONFIG_PATH environment variable for pkg-config to find it.
447]])])
448])
449AC_MSG_RESULT([$MMDOCTOOLDIR])[]dnl
450])
451
452AC_DEFUN([MM_CONFIG_DOCTOOL_DIR],
453[dnl
454AC_REQUIRE([_MM_PRE_INIT])[]dnl
455AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
456m4_ifval([$1], [MMDOCTOOLDIR='[$]{top_srcdir}/$1'], [AC_REQUIRE([_MM_CONFIG_DOCTOOL_DIR])])
457AM_CONDITIONAL([DIST_DOCTOOLS], [test 'x$1' != 'x'])dnl
458AC_SUBST([MMDOCTOOLDIR])[]dnl
459])
460
461m4_define([_MM_ARG_ENABLE_DOCUMENTATION],
462[dnl
463AC_PROVIDE([$0])[]dnl
464dnl
465AC_ARG_VAR([DOT], [path to dot utility])[]dnl
466AC_ARG_VAR([DOXYGEN], [path to Doxygen utility])[]dnl
467AC_ARG_VAR([XSLTPROC], [path to xsltproc utility])[]dnl
468dnl
469AC_PATH_PROG([DOT], [dot], [dot])
470AC_PATH_PROG([DOXYGEN], [doxygen], [doxygen])
471AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
472dnl
473AC_ARG_ENABLE([documentation],
474              [AS_HELP_STRING([--disable-documentation],
475                              [do not build or install the documentation])],
476              [ENABLE_DOCUMENTATION=$enableval],
477              [ENABLE_DOCUMENTATION=auto])
478AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
479[
480  mm_err=
481  AS_IF([test "x$MMDOCTOOLDIR" = x], [mm_err='dnl
482The mm-common-util module is available, but the installation of mm-common on this
483machine is missing the shared documentation utilities of the GNOME C++
484bindings.  It may be necessary to upgrade to a more recent release of
485mm-common in order to build '$PACKAGE_NAME' and install the documentation.'],
486        [test "x$PERL" = xperl], [mm_err='Perl is required for installing the documentation.'],
487        [test "x$USE_MAINTAINER_MODE" != xno],
488  [
489    test "x$DOT" != xdot || mm_err=' dot'
490    test "x$DOXYGEN" != xdoxygen || mm_err="$mm_err doxygen"
491    test "x$XSLTPROC" != xxsltproc || mm_err="$mm_err xsltproc"
492    test -z "$mm_err" || mm_err='The documentation cannot be generated because
493not all of the required tools are available:'$mm_err
494  ])
495  AS_IF([test -z "$mm_err"], [ENABLE_DOCUMENTATION=yes],
496        [test "x$ENABLE_DOCUMENTATION" = xyes], [AC_MSG_FAILURE([[$mm_err]])],
497        [ENABLE_DOCUMENTATION=no; AC_MSG_WARN([[$mm_err]])])
498])
499AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "x$ENABLE_DOCUMENTATION" = xyes])
500AC_SUBST([DOXYGEN_TAGFILES], [[]])
501AC_SUBST([DOCINSTALL_FLAGS], [[]])[]dnl
502])
503
504AC_DEFUN([MM_ARG_ENABLE_DOCUMENTATION],
505[dnl
506AC_BEFORE([$0], [MM_ARG_WITH_TAGFILE_DOC])[]dnl
507AC_REQUIRE([_MM_PRE_INIT])[]dnl
508AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
509AC_REQUIRE([MM_PATH_PERL])[]dnl
510AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
511])
512
513m4_define([_MM_TR_URI],
514[dnl
515[`expr "X$1" : 'X\(.*[^\\/]\)[\\/]*' 2>&]AS_MESSAGE_LOG_FD[ |]dnl
516[ sed 's|[\\]|/|g;s| |%20|g;s|^/|file:///|;s|^.:/|file:///&|' 2>&]AS_MESSAGE_LOG_FD[`]dnl
517])
518
519m4_define([_MM_ARG_WITH_TAGFILE_DOC],
520[dnl
521  AC_MSG_CHECKING([for $1 documentation])
522  AC_ARG_WITH([$1-doc],
523              [AS_HELP_STRING([[--with-$1-doc=[TAGFILE@]HTMLREFDIR]],
524                              [Link to external $1 documentation]m4_ifval([$4], [[ [auto]]]))],
525  [
526    mm_htmlrefdir=`[expr "X@$withval" : '.*@\(.*\)' 2>&]AS_MESSAGE_LOG_FD`
527    mm_tagname=`[expr "X/$withval" : '[^@]*[\\/]\([^\\/@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
528    mm_tagpath=`[expr "X$withval" : 'X\([^@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
529    test "x$mm_tagname" != x || mm_tagname="$3"
530    test "x$mm_tagpath" != x || mm_tagpath=$mm_tagname[]dnl
531  ], [
532    mm_htmlrefdir=
533    mm_tagname="$3"
534    mm_tagpath=$mm_tagname[]dnl
535  ])
536  # Prepend working direcory if the tag file path starts with ./ or ../
537  AS_CASE([$mm_tagpath], [[.[\\/]*|..[\\/]*]], [mm_tagpath=`pwd`/$mm_tagpath])
538
539m4_ifval([$4], [dnl
540  # If no local directory was specified, get the default from the .pc file
541  AS_IF([test "x$mm_htmlrefdir" = x],
542  [
543    mm_htmlrefdir=`$PKG_CONFIG --variable=htmlrefdir "$4" 2>&AS_MESSAGE_LOG_FD`dnl
544  ])
545  # If the user specified a Web URL, allow it to override the public location
546  AS_CASE([$mm_htmlrefdir], [[http://*|https://*]], [mm_htmlrefpub=$mm_htmlrefdir],
547  [
548    mm_htmlrefpub=`$PKG_CONFIG --variable=htmlrefpub "$4" 2>&AS_MESSAGE_LOG_FD`
549    test "x$mm_htmlrefpub" != x || mm_htmlrefpub=$mm_htmlrefdir
550    test "x$mm_htmlrefdir" != x || mm_htmlrefdir=$mm_htmlrefpub
551  ])
552  # The user-supplied tag-file name takes precedence if it includes the path
553  AS_CASE([$mm_tagpath], [[*[\\/]*]],,
554  [
555    mm_doxytagfile=`$PKG_CONFIG --variable=doxytagfile "$4" 2>&AS_MESSAGE_LOG_FD`
556    test "x$mm_doxytagfile" = x || mm_tagpath=$mm_doxytagfile
557  ])
558  # Remove trailing slashes and translate to URI
559  mm_htmlrefpub=_MM_TR_URI([$mm_htmlrefpub])
560])[]dnl
561  mm_htmlrefdir=_MM_TR_URI([$mm_htmlrefdir])
562
563  AC_MSG_RESULT([$mm_tagpath@$mm_htmlrefdir])
564
565  AS_IF([test "x$USE_MAINTAINER_MODE" != xno && test ! -f "$mm_tagpath"],
566        [AC_MSG_WARN([Doxygen tag file $3 not found])])
567  AS_IF([test "x$mm_htmlrefdir" = x],
568        [AC_MSG_WARN([Location of external $1 documentation not set])],
569        [AS_IF([test "x$DOCINSTALL_FLAGS" = x],
570               [DOCINSTALL_FLAGS="-l '$mm_tagname@$mm_htmlrefdir/'"],
571               [DOCINSTALL_FLAGS="$DOCINSTALL_FLAGS -l '$mm_tagname@$mm_htmlrefdir/'"])])
572
573  AS_IF([test "x$mm_$2" = x], [mm_val=$mm_tagpath], [mm_val="$mm_tagpath=$mm_$2"])
574  AS_IF([test "x$DOXYGEN_TAGFILES" = x],
575        [DOXYGEN_TAGFILES=[\]"$mm_val[\]"],
576        [DOXYGEN_TAGFILES="$DOXYGEN_TAGFILES "[\]"$mm_val[\]"])[]dnl
577])
578
579AC_DEFUN([MM_ARG_WITH_TAGFILE_DOC],
580[dnl
581m4_assert([$# >= 1])[]dnl
582m4_ifval([$2], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])])[]dnl
583AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
584AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
585dnl
586AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
587      [_MM_ARG_WITH_TAGFILE_DOC(m4_quote(m4_bpatsubst([$1], [[+]*\([-+][0123456789]\|[._]\).*$])),
588                                [htmlref]m4_ifval([$2], [[pub]], [[dir]]), [$1], [$2])])[]dnl
589])
590
591
592#serial 20091228
593
594m4_define([_MM_INIT_MODULE_VERSION],
595[dnl
596m4_ifval([$3],
597[AC_SUBST([$2][_MAJOR_VERSION], [$3])
598AC_DEFINE([$2][_MAJOR_VERSION], [$3], [Major version number of $1.])
599])[]dnl
600m4_ifval([$4],
601[AC_SUBST([$2][_MINOR_VERSION], [$4])
602AC_DEFINE([$2][_MINOR_VERSION], [$4], [Minor version number of $1.])
603])[]dnl
604m4_ifval([$5],
605[AC_SUBST([$2][_MICRO_VERSION], [$5])
606AC_DEFINE([$2][_MICRO_VERSION], [$5], [Micro version number of $1.])
607])[]dnl
608])
609
610m4_define([_MM_INIT_MODULE_SUBST],
611[dnl
612AC_SUBST([$5][_MODULE_NAME], ['$1'])
613AC_SUBST([$5][_VERSION], ['$2'])
614m4_ifval([$4],
615[AC_SUBST([$5][_API_VERSION], ['$4'])
616])[]dnl
617_MM_INIT_MODULE_VERSION([$3], [$5], m4_bpatsubst([$2], [[^0123456789]+], [,]))[]dnl
618])
619
620m4_define([_MM_INIT_MODULE_BASENAME],
621          [_MM_INIT_MODULE_SUBST([$1], [$2], [$3], [$4],
622                                 m4_quote(AS_TR_CPP(m4_quote(m4_translit([$3], [+], [X])))))])
623
624AC_DEFUN([MM_INIT_MODULE],
625[dnl
626m4_assert([$# >= 1])[]dnl
627AC_REQUIRE([_MM_PRE_INIT])[]dnl
628AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
629_MM_INIT_MODULE_BASENAME([$1],
630                 m4_quote(m4_ifval([$2], [$2], m4_defn([AC_PACKAGE_VERSION]))),
631                 m4_quote(m4_bpatsubst([$1], [[-.0123456789]+$])),
632                 m4_quote(m4_bregexp([$1], [-?\([.0123456789]+\)$], [\1])))[]dnl
633])
634
635
636#serial 20090822
637
638m4_define([_MM_CHECK_GNU_MAKE],
639[dnl
640AC_PROVIDE([$0])[]dnl
641AC_MSG_CHECKING([whether [$]{MAKE-make} supports GNU make features])
642cat >conftest.make <<'_MMEOF'
643override reverse = [$](2)[$](subst ,, )[$](1)
644override result := [$](word 2,[$](call reverse,success,failure))
645all: ; test '[$](result)' = success
646.PHONY: all
647_MMEOF
648AS_IF([[$]{MAKE-make} -f conftest.make >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
649      [mm_gnu_make=yes], [mm_gnu_make=no])
650rm -f conftest.make
651AC_MSG_RESULT([$mm_gnu_make])
652AS_IF([test "x$mm_gnu_make" != xyes],
653      [AC_MSG_FAILURE([[The GNU make program is required to build $PACKAGE_NAME.]])])[]dnl
654])
655
656AC_DEFUN([MM_CHECK_GNU_MAKE],
657[dnl
658AC_REQUIRE([_MM_PRE_INIT])[]dnl
659AC_REQUIRE([_MM_CHECK_GNU_MAKE])[]dnl
660])
661
662m4_define([_MM_PATH_PERL],
663[dnl
664AC_PROVIDE([$0])[]dnl
665AC_ARG_VAR([PERL], [path to Perl interpreter])[]dnl
666AC_PATH_PROG([PERL], [perl], [perl])[]dnl
667])
668
669AC_DEFUN([MM_PATH_PERL],
670[dnl
671AC_REQUIRE([_MM_PRE_INIT])[]dnl
672AC_REQUIRE([_MM_PATH_PERL])[]dnl
673])
674
675m4_define([_MM_CHECK_PERL],
676[dnl
677AS_IF([$PERL -e "require v$1; exit 0;" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
678      [$2], m4_ifval([$2$3], [[$3]],
679            [[AC_MSG_FAILURE([[At least Perl ]$1[ is required to build $PACKAGE_NAME.]])]]))[]dnl
680])
681
682AC_DEFUN([MM_CHECK_PERL],
683[dnl
684AC_REQUIRE([_MM_PRE_INIT])[]dnl
685AC_REQUIRE([_MM_PATH_PERL])[]dnl
686_MM_CHECK_PERL(m4_ifval([$1], [[$1]], [[5.6.0]]), [$2], [$3])[]dnl
687])
688
689AC_DEFUN([MM_PKG_CONFIG_SUBST],
690[dnl
691m4_assert([$# >= 2])[]dnl
692AC_REQUIRE([_MM_PRE_INIT])[]dnl
693AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
694AC_MSG_CHECKING([for $1])
695dnl
696AS_IF([test -z "[$]{$1+set}"],
697      [$1=`$PKG_CONFIG $2 2>&AS_MESSAGE_LOG_FD`
698       AS_IF([test "[$]?" -eq 0], [$3], [$4])])
699dnl
700AC_MSG_RESULT([[$]$1])
701AC_SUBST([$1])[]dnl
702])
703
704
705#serial 20091103
706
707m4_define([_MM_ARG_ENABLE_WARNINGS_OPTION],
708[dnl
709AC_PROVIDE([$0])[]dnl
710AC_ARG_ENABLE([warnings],
711              [AS_HELP_STRING([[--enable-warnings[=min|max|fatal|no]]],
712                              [set compiler pedantry level [default=min]])],
713              [mm_enable_warnings=$enableval],
714              [mm_enable_warnings=min])[]dnl
715])
716
717AC_DEFUN([MM_ARG_ENABLE_WARNINGS],
718[dnl
719m4_assert([$# >= 3])[]dnl
720AC_REQUIRE([_MM_PRE_INIT])[]dnl
721AC_REQUIRE([_MM_ARG_ENABLE_WARNINGS_OPTION])[]dnl
722dnl
723AS_CASE([$ac_compile],
724        [[*'$CXXFLAGS '*]], [mm_lang='C++' mm_cc=$CXX mm_conftest="conftest.[$]{ac_ext-cc}"],
725        [[*'$CFLAGS '*]],   [mm_lang=C mm_cc=$CC mm_conftest="conftest.[$]{ac_ext-c}"],
726        [AC_MSG_ERROR([[current language is neither C nor C++]])])
727dnl
728AC_MSG_CHECKING([which $mm_lang compiler warning flags to use])
729m4_ifval([$4], [mm_deprecation_flags=
730])mm_tested_flags=
731dnl
732AS_CASE([$mm_enable_warnings],
733        [no],    [mm_warning_flags=],
734        [max],   [mm_warning_flags="$3"],
735        [fatal], [mm_warning_flags="$3 -Werror"[]m4_ifval([$4], [
736         for mm_prefix in $4
737         do
738           mm_deprecation_flags="$mm_deprecation_flags-D[$]{mm_prefix}_DISABLE_DEPRECATED "
739         done])],
740        [mm_warning_flags="$2"])
741dnl
742AS_IF([test "x$mm_warning_flags" != x],
743[
744  # Keep in mind that the dummy source must be devoid of any
745  # problems that might cause diagnostics.
746  AC_LANG_CONFTEST([AC_LANG_SOURCE([[
747int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }
748]])])
749  for mm_flag in $mm_warning_flags
750  do
751    # Test whether the compiler accepts the flag.  Look at standard output,
752    # since GCC only shows a warning message if an option is not supported.
753    mm_cc_out=`$mm_cc $mm_tested_flags $mm_flag -c "$mm_conftest" 2>&1 || echo failed`
754    rm -f "conftest.[$]{OBJEXT-o}"
755
756    AS_IF([test "x$mm_cc_out" = x],
757          [AS_IF([test "x$mm_tested_flags" = x],
758                 [mm_tested_flags=$mm_flag],
759                 [mm_tested_flags="$mm_tested_flags $mm_flag"])],
760[cat <<_MMEOF >&AS_MESSAGE_LOG_FD
761$mm_cc: $mm_cc_out
762_MMEOF
763])
764  done
765  rm -f "$mm_conftest"
766])
767mm_all_flags=m4_ifval([$4], [$mm_deprecation_flags])$mm_tested_flags
768AC_SUBST([$1], [$mm_all_flags])
769dnl
770test "x$mm_all_flags" != x || mm_all_flags=none
771AC_MSG_RESULT([$mm_all_flags])[]dnl
772])
773
774# Copyright (C) 2002-2014 Free Software Foundation, Inc.
775#
776# This file is free software; the Free Software Foundation
777# gives unlimited permission to copy and/or distribute it,
778# with or without modifications, as long as this notice is preserved.
779
780# AM_AUTOMAKE_VERSION(VERSION)
781# ----------------------------
782# Automake X.Y traces this macro to ensure aclocal.m4 has been
783# generated from the m4 files accompanying Automake X.Y.
784# (This private macro should not be called outside this file.)
785AC_DEFUN([AM_AUTOMAKE_VERSION],
786[am__api_version='1.15'
787dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
788dnl require some minimum version.  Point them to the right macro.
789m4_if([$1], [1.15], [],
790      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
791])
792
793# _AM_AUTOCONF_VERSION(VERSION)
794# -----------------------------
795# aclocal traces this macro to find the Autoconf version.
796# This is a private macro too.  Using m4_define simplifies
797# the logic in aclocal, which can simply ignore this definition.
798m4_define([_AM_AUTOCONF_VERSION], [])
799
800# AM_SET_CURRENT_AUTOMAKE_VERSION
801# -------------------------------
802# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
803# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
804AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
805[AM_AUTOMAKE_VERSION([1.15])dnl
806m4_ifndef([AC_AUTOCONF_VERSION],
807  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
808_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
809
810# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
811
812# Copyright (C) 2001-2014 Free Software Foundation, Inc.
813#
814# This file is free software; the Free Software Foundation
815# gives unlimited permission to copy and/or distribute it,
816# with or without modifications, as long as this notice is preserved.
817
818# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
819# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
820# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
821#
822# Of course, Automake must honor this variable whenever it calls a
823# tool from the auxiliary directory.  The problem is that $srcdir (and
824# therefore $ac_aux_dir as well) can be either absolute or relative,
825# depending on how configure is run.  This is pretty annoying, since
826# it makes $ac_aux_dir quite unusable in subdirectories: in the top
827# source directory, any form will work fine, but in subdirectories a
828# relative path needs to be adjusted first.
829#
830# $ac_aux_dir/missing
831#    fails when called from a subdirectory if $ac_aux_dir is relative
832# $top_srcdir/$ac_aux_dir/missing
833#    fails if $ac_aux_dir is absolute,
834#    fails when called from a subdirectory in a VPATH build with
835#          a relative $ac_aux_dir
836#
837# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
838# are both prefixed by $srcdir.  In an in-source build this is usually
839# harmless because $srcdir is '.', but things will broke when you
840# start a VPATH build or use an absolute $srcdir.
841#
842# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
843# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
844#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
845# and then we would define $MISSING as
846#   MISSING="\${SHELL} $am_aux_dir/missing"
847# This will work as long as MISSING is not called from configure, because
848# unfortunately $(top_srcdir) has no meaning in configure.
849# However there are other variables, like CC, which are often used in
850# configure, and could therefore not use this "fixed" $ac_aux_dir.
851#
852# Another solution, used here, is to always expand $ac_aux_dir to an
853# absolute PATH.  The drawback is that using absolute paths prevent a
854# configured tree to be moved without reconfiguration.
855
856AC_DEFUN([AM_AUX_DIR_EXPAND],
857[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
858# Expand $ac_aux_dir to an absolute path.
859am_aux_dir=`cd "$ac_aux_dir" && pwd`
860])
861
862# AM_CONDITIONAL                                            -*- Autoconf -*-
863
864# Copyright (C) 1997-2014 Free Software Foundation, Inc.
865#
866# This file is free software; the Free Software Foundation
867# gives unlimited permission to copy and/or distribute it,
868# with or without modifications, as long as this notice is preserved.
869
870# AM_CONDITIONAL(NAME, SHELL-CONDITION)
871# -------------------------------------
872# Define a conditional.
873AC_DEFUN([AM_CONDITIONAL],
874[AC_PREREQ([2.52])dnl
875 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
876       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
877AC_SUBST([$1_TRUE])dnl
878AC_SUBST([$1_FALSE])dnl
879_AM_SUBST_NOTMAKE([$1_TRUE])dnl
880_AM_SUBST_NOTMAKE([$1_FALSE])dnl
881m4_define([_AM_COND_VALUE_$1], [$2])dnl
882if $2; then
883  $1_TRUE=
884  $1_FALSE='#'
885else
886  $1_TRUE='#'
887  $1_FALSE=
888fi
889AC_CONFIG_COMMANDS_PRE(
890[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
891  AC_MSG_ERROR([[conditional "$1" was never defined.
892Usually this means the macro was only invoked conditionally.]])
893fi])])
894
895# Copyright (C) 1999-2014 Free Software Foundation, Inc.
896#
897# This file is free software; the Free Software Foundation
898# gives unlimited permission to copy and/or distribute it,
899# with or without modifications, as long as this notice is preserved.
900
901
902# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
903# written in clear, in which case automake, when reading aclocal.m4,
904# will think it sees a *use*, and therefore will trigger all it's
905# C support machinery.  Also note that it means that autoscan, seeing
906# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
907
908
909# _AM_DEPENDENCIES(NAME)
910# ----------------------
911# See how the compiler implements dependency checking.
912# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
913# We try a few techniques and use that to set a single cache variable.
914#
915# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
916# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
917# dependency, and given that the user is not expected to run this macro,
918# just rely on AC_PROG_CC.
919AC_DEFUN([_AM_DEPENDENCIES],
920[AC_REQUIRE([AM_SET_DEPDIR])dnl
921AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
922AC_REQUIRE([AM_MAKE_INCLUDE])dnl
923AC_REQUIRE([AM_DEP_TRACK])dnl
924
925m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
926      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
927      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
928      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
929      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
930      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
931                    [depcc="$$1"   am_compiler_list=])
932
933AC_CACHE_CHECK([dependency style of $depcc],
934               [am_cv_$1_dependencies_compiler_type],
935[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
936  # We make a subdir and do the tests there.  Otherwise we can end up
937  # making bogus files that we don't know about and never remove.  For
938  # instance it was reported that on HP-UX the gcc test will end up
939  # making a dummy file named 'D' -- because '-MD' means "put the output
940  # in D".
941  rm -rf conftest.dir
942  mkdir conftest.dir
943  # Copy depcomp to subdir because otherwise we won't find it if we're
944  # using a relative directory.
945  cp "$am_depcomp" conftest.dir
946  cd conftest.dir
947  # We will build objects and dependencies in a subdirectory because
948  # it helps to detect inapplicable dependency modes.  For instance
949  # both Tru64's cc and ICC support -MD to output dependencies as a
950  # side effect of compilation, but ICC will put the dependencies in
951  # the current directory while Tru64 will put them in the object
952  # directory.
953  mkdir sub
954
955  am_cv_$1_dependencies_compiler_type=none
956  if test "$am_compiler_list" = ""; then
957     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
958  fi
959  am__universal=false
960  m4_case([$1], [CC],
961    [case " $depcc " in #(
962     *\ -arch\ *\ -arch\ *) am__universal=true ;;
963     esac],
964    [CXX],
965    [case " $depcc " in #(
966     *\ -arch\ *\ -arch\ *) am__universal=true ;;
967     esac])
968
969  for depmode in $am_compiler_list; do
970    # Setup a source with many dependencies, because some compilers
971    # like to wrap large dependency lists on column 80 (with \), and
972    # we should not choose a depcomp mode which is confused by this.
973    #
974    # We need to recreate these files for each test, as the compiler may
975    # overwrite some of them when testing with obscure command lines.
976    # This happens at least with the AIX C compiler.
977    : > sub/conftest.c
978    for i in 1 2 3 4 5 6; do
979      echo '#include "conftst'$i'.h"' >> sub/conftest.c
980      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
981      # Solaris 10 /bin/sh.
982      echo '/* dummy */' > sub/conftst$i.h
983    done
984    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
985
986    # We check with '-c' and '-o' for the sake of the "dashmstdout"
987    # mode.  It turns out that the SunPro C++ compiler does not properly
988    # handle '-M -o', and we need to detect this.  Also, some Intel
989    # versions had trouble with output in subdirs.
990    am__obj=sub/conftest.${OBJEXT-o}
991    am__minus_obj="-o $am__obj"
992    case $depmode in
993    gcc)
994      # This depmode causes a compiler race in universal mode.
995      test "$am__universal" = false || continue
996      ;;
997    nosideeffect)
998      # After this tag, mechanisms are not by side-effect, so they'll
999      # only be used when explicitly requested.
1000      if test "x$enable_dependency_tracking" = xyes; then
1001	continue
1002      else
1003	break
1004      fi
1005      ;;
1006    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1007      # This compiler won't grok '-c -o', but also, the minuso test has
1008      # not run yet.  These depmodes are late enough in the game, and
1009      # so weak that their functioning should not be impacted.
1010      am__obj=conftest.${OBJEXT-o}
1011      am__minus_obj=
1012      ;;
1013    none) break ;;
1014    esac
1015    if depmode=$depmode \
1016       source=sub/conftest.c object=$am__obj \
1017       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1018       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1019         >/dev/null 2>conftest.err &&
1020       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1021       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1022       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1023       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1024      # icc doesn't choke on unknown options, it will just issue warnings
1025      # or remarks (even with -Werror).  So we grep stderr for any message
1026      # that says an option was ignored or not supported.
1027      # When given -MP, icc 7.0 and 7.1 complain thusly:
1028      #   icc: Command line warning: ignoring option '-M'; no argument required
1029      # The diagnosis changed in icc 8.0:
1030      #   icc: Command line remark: option '-MP' not supported
1031      if (grep 'ignoring option' conftest.err ||
1032          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1033        am_cv_$1_dependencies_compiler_type=$depmode
1034        break
1035      fi
1036    fi
1037  done
1038
1039  cd ..
1040  rm -rf conftest.dir
1041else
1042  am_cv_$1_dependencies_compiler_type=none
1043fi
1044])
1045AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1046AM_CONDITIONAL([am__fastdep$1], [
1047  test "x$enable_dependency_tracking" != xno \
1048  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1049])
1050
1051
1052# AM_SET_DEPDIR
1053# -------------
1054# Choose a directory name for dependency files.
1055# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1056AC_DEFUN([AM_SET_DEPDIR],
1057[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1058AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1059])
1060
1061
1062# AM_DEP_TRACK
1063# ------------
1064AC_DEFUN([AM_DEP_TRACK],
1065[AC_ARG_ENABLE([dependency-tracking], [dnl
1066AS_HELP_STRING(
1067  [--enable-dependency-tracking],
1068  [do not reject slow dependency extractors])
1069AS_HELP_STRING(
1070  [--disable-dependency-tracking],
1071  [speeds up one-time build])])
1072if test "x$enable_dependency_tracking" != xno; then
1073  am_depcomp="$ac_aux_dir/depcomp"
1074  AMDEPBACKSLASH='\'
1075  am__nodep='_no'
1076fi
1077AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1078AC_SUBST([AMDEPBACKSLASH])dnl
1079_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1080AC_SUBST([am__nodep])dnl
1081_AM_SUBST_NOTMAKE([am__nodep])dnl
1082])
1083
1084# Generate code to set up dependency tracking.              -*- Autoconf -*-
1085
1086# Copyright (C) 1999-2014 Free Software Foundation, Inc.
1087#
1088# This file is free software; the Free Software Foundation
1089# gives unlimited permission to copy and/or distribute it,
1090# with or without modifications, as long as this notice is preserved.
1091
1092
1093# _AM_OUTPUT_DEPENDENCY_COMMANDS
1094# ------------------------------
1095AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1096[{
1097  # Older Autoconf quotes --file arguments for eval, but not when files
1098  # are listed without --file.  Let's play safe and only enable the eval
1099  # if we detect the quoting.
1100  case $CONFIG_FILES in
1101  *\'*) eval set x "$CONFIG_FILES" ;;
1102  *)   set x $CONFIG_FILES ;;
1103  esac
1104  shift
1105  for mf
1106  do
1107    # Strip MF so we end up with the name of the file.
1108    mf=`echo "$mf" | sed -e 's/:.*$//'`
1109    # Check whether this is an Automake generated Makefile or not.
1110    # We used to match only the files named 'Makefile.in', but
1111    # some people rename them; so instead we look at the file content.
1112    # Grep'ing the first line is not enough: some people post-process
1113    # each Makefile.in and add a new line on top of each file to say so.
1114    # Grep'ing the whole file is not good either: AIX grep has a line
1115    # limit of 2048, but all sed's we know have understand at least 4000.
1116    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1117      dirpart=`AS_DIRNAME("$mf")`
1118    else
1119      continue
1120    fi
1121    # Extract the definition of DEPDIR, am__include, and am__quote
1122    # from the Makefile without running 'make'.
1123    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1124    test -z "$DEPDIR" && continue
1125    am__include=`sed -n 's/^am__include = //p' < "$mf"`
1126    test -z "$am__include" && continue
1127    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1128    # Find all dependency output files, they are included files with
1129    # $(DEPDIR) in their names.  We invoke sed twice because it is the
1130    # simplest approach to changing $(DEPDIR) to its actual value in the
1131    # expansion.
1132    for file in `sed -n "
1133      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1134	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1135      # Make sure the directory exists.
1136      test -f "$dirpart/$file" && continue
1137      fdir=`AS_DIRNAME(["$file"])`
1138      AS_MKDIR_P([$dirpart/$fdir])
1139      # echo "creating $dirpart/$file"
1140      echo '# dummy' > "$dirpart/$file"
1141    done
1142  done
1143}
1144])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1145
1146
1147# AM_OUTPUT_DEPENDENCY_COMMANDS
1148# -----------------------------
1149# This macro should only be invoked once -- use via AC_REQUIRE.
1150#
1151# This code is only required when automatic dependency tracking
1152# is enabled.  FIXME.  This creates each '.P' file that we will
1153# need in order to bootstrap the dependency handling code.
1154AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1155[AC_CONFIG_COMMANDS([depfiles],
1156     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1157     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1158])
1159
1160# Do all the work for Automake.                             -*- Autoconf -*-
1161
1162# Copyright (C) 1996-2014 Free Software Foundation, Inc.
1163#
1164# This file is free software; the Free Software Foundation
1165# gives unlimited permission to copy and/or distribute it,
1166# with or without modifications, as long as this notice is preserved.
1167
1168# This macro actually does too much.  Some checks are only needed if
1169# your package does certain things.  But this isn't really a big deal.
1170
1171dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1172m4_define([AC_PROG_CC],
1173m4_defn([AC_PROG_CC])
1174[_AM_PROG_CC_C_O
1175])
1176
1177# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1178# AM_INIT_AUTOMAKE([OPTIONS])
1179# -----------------------------------------------
1180# The call with PACKAGE and VERSION arguments is the old style
1181# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1182# and VERSION should now be passed to AC_INIT and removed from
1183# the call to AM_INIT_AUTOMAKE.
1184# We support both call styles for the transition.  After
1185# the next Automake release, Autoconf can make the AC_INIT
1186# arguments mandatory, and then we can depend on a new Autoconf
1187# release and drop the old call support.
1188AC_DEFUN([AM_INIT_AUTOMAKE],
1189[AC_PREREQ([2.65])dnl
1190dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1191dnl the ones we care about.
1192m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1193AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1194AC_REQUIRE([AC_PROG_INSTALL])dnl
1195if test "`cd $srcdir && pwd`" != "`pwd`"; then
1196  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1197  # is not polluted with repeated "-I."
1198  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1199  # test to see if srcdir already configured
1200  if test -f $srcdir/config.status; then
1201    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1202  fi
1203fi
1204
1205# test whether we have cygpath
1206if test -z "$CYGPATH_W"; then
1207  if (cygpath --version) >/dev/null 2>/dev/null; then
1208    CYGPATH_W='cygpath -w'
1209  else
1210    CYGPATH_W=echo
1211  fi
1212fi
1213AC_SUBST([CYGPATH_W])
1214
1215# Define the identity of the package.
1216dnl Distinguish between old-style and new-style calls.
1217m4_ifval([$2],
1218[AC_DIAGNOSE([obsolete],
1219             [$0: two- and three-arguments forms are deprecated.])
1220m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1221 AC_SUBST([PACKAGE], [$1])dnl
1222 AC_SUBST([VERSION], [$2])],
1223[_AM_SET_OPTIONS([$1])dnl
1224dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1225m4_if(
1226  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1227  [ok:ok],,
1228  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1229 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1230 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1231
1232_AM_IF_OPTION([no-define],,
1233[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1234 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1235
1236# Some tools Automake needs.
1237AC_REQUIRE([AM_SANITY_CHECK])dnl
1238AC_REQUIRE([AC_ARG_PROGRAM])dnl
1239AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1240AM_MISSING_PROG([AUTOCONF], [autoconf])
1241AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1242AM_MISSING_PROG([AUTOHEADER], [autoheader])
1243AM_MISSING_PROG([MAKEINFO], [makeinfo])
1244AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1245AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1246AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1247# For better backward compatibility.  To be removed once Automake 1.9.x
1248# dies out for good.  For more background, see:
1249# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1250# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1251AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1252# We need awk for the "check" target (and possibly the TAP driver).  The
1253# system "awk" is bad on some platforms.
1254AC_REQUIRE([AC_PROG_AWK])dnl
1255AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1256AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1257_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1258	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1259			     [_AM_PROG_TAR([v7])])])
1260_AM_IF_OPTION([no-dependencies],,
1261[AC_PROVIDE_IFELSE([AC_PROG_CC],
1262		  [_AM_DEPENDENCIES([CC])],
1263		  [m4_define([AC_PROG_CC],
1264			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1265AC_PROVIDE_IFELSE([AC_PROG_CXX],
1266		  [_AM_DEPENDENCIES([CXX])],
1267		  [m4_define([AC_PROG_CXX],
1268			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1269AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1270		  [_AM_DEPENDENCIES([OBJC])],
1271		  [m4_define([AC_PROG_OBJC],
1272			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1273AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1274		  [_AM_DEPENDENCIES([OBJCXX])],
1275		  [m4_define([AC_PROG_OBJCXX],
1276			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1277])
1278AC_REQUIRE([AM_SILENT_RULES])dnl
1279dnl The testsuite driver may need to know about EXEEXT, so add the
1280dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1281dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1282AC_CONFIG_COMMANDS_PRE(dnl
1283[m4_provide_if([_AM_COMPILER_EXEEXT],
1284  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1285
1286# POSIX will say in a future version that running "rm -f" with no argument
1287# is OK; and we want to be able to make that assumption in our Makefile
1288# recipes.  So use an aggressive probe to check that the usage we want is
1289# actually supported "in the wild" to an acceptable degree.
1290# See automake bug#10828.
1291# To make any issue more visible, cause the running configure to be aborted
1292# by default if the 'rm' program in use doesn't match our expectations; the
1293# user can still override this though.
1294if rm -f && rm -fr && rm -rf; then : OK; else
1295  cat >&2 <<'END'
1296Oops!
1297
1298Your 'rm' program seems unable to run without file operands specified
1299on the command line, even when the '-f' option is present.  This is contrary
1300to the behaviour of most rm programs out there, and not conforming with
1301the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1302
1303Please tell bug-automake@gnu.org about your system, including the value
1304of your $PATH and any error possibly output before this message.  This
1305can help us improve future automake versions.
1306
1307END
1308  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1309    echo 'Configuration will proceed anyway, since you have set the' >&2
1310    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1311    echo >&2
1312  else
1313    cat >&2 <<'END'
1314Aborting the configuration process, to ensure you take notice of the issue.
1315
1316You can download and install GNU coreutils to get an 'rm' implementation
1317that behaves properly: <http://www.gnu.org/software/coreutils/>.
1318
1319If you want to complete the configuration process using your problematic
1320'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1321to "yes", and re-run configure.
1322
1323END
1324    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1325  fi
1326fi
1327dnl The trailing newline in this macro's definition is deliberate, for
1328dnl backward compatibility and to allow trailing 'dnl'-style comments
1329dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1330])
1331
1332dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1333dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1334dnl mangled by Autoconf and run in a shell conditional statement.
1335m4_define([_AC_COMPILER_EXEEXT],
1336m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1337
1338# When config.status generates a header, we must update the stamp-h file.
1339# This file resides in the same directory as the config header
1340# that is generated.  The stamp files are numbered to have different names.
1341
1342# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1343# loop where config.status creates the headers, so we can generate
1344# our stamp files there.
1345AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1346[# Compute $1's index in $config_headers.
1347_am_arg=$1
1348_am_stamp_count=1
1349for _am_header in $config_headers :; do
1350  case $_am_header in
1351    $_am_arg | $_am_arg:* )
1352      break ;;
1353    * )
1354      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1355  esac
1356done
1357echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1358
1359# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1360#
1361# This file is free software; the Free Software Foundation
1362# gives unlimited permission to copy and/or distribute it,
1363# with or without modifications, as long as this notice is preserved.
1364
1365# AM_PROG_INSTALL_SH
1366# ------------------
1367# Define $install_sh.
1368AC_DEFUN([AM_PROG_INSTALL_SH],
1369[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1370if test x"${install_sh+set}" != xset; then
1371  case $am_aux_dir in
1372  *\ * | *\	*)
1373    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1374  *)
1375    install_sh="\${SHELL} $am_aux_dir/install-sh"
1376  esac
1377fi
1378AC_SUBST([install_sh])])
1379
1380# Copyright (C) 2003-2014 Free Software Foundation, Inc.
1381#
1382# This file is free software; the Free Software Foundation
1383# gives unlimited permission to copy and/or distribute it,
1384# with or without modifications, as long as this notice is preserved.
1385
1386# Check whether the underlying file-system supports filenames
1387# with a leading dot.  For instance MS-DOS doesn't.
1388AC_DEFUN([AM_SET_LEADING_DOT],
1389[rm -rf .tst 2>/dev/null
1390mkdir .tst 2>/dev/null
1391if test -d .tst; then
1392  am__leading_dot=.
1393else
1394  am__leading_dot=_
1395fi
1396rmdir .tst 2>/dev/null
1397AC_SUBST([am__leading_dot])])
1398
1399# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1400# From Jim Meyering
1401
1402# Copyright (C) 1996-2014 Free Software Foundation, Inc.
1403#
1404# This file is free software; the Free Software Foundation
1405# gives unlimited permission to copy and/or distribute it,
1406# with or without modifications, as long as this notice is preserved.
1407
1408# AM_MAINTAINER_MODE([DEFAULT-MODE])
1409# ----------------------------------
1410# Control maintainer-specific portions of Makefiles.
1411# Default is to disable them, unless 'enable' is passed literally.
1412# For symmetry, 'disable' may be passed as well.  Anyway, the user
1413# can override the default with the --enable/--disable switch.
1414AC_DEFUN([AM_MAINTAINER_MODE],
1415[m4_case(m4_default([$1], [disable]),
1416       [enable], [m4_define([am_maintainer_other], [disable])],
1417       [disable], [m4_define([am_maintainer_other], [enable])],
1418       [m4_define([am_maintainer_other], [enable])
1419        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1420AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1421  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1422  AC_ARG_ENABLE([maintainer-mode],
1423    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1424      am_maintainer_other[ make rules and dependencies not useful
1425      (and sometimes confusing) to the casual installer])],
1426    [USE_MAINTAINER_MODE=$enableval],
1427    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1428  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1429  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1430  MAINT=$MAINTAINER_MODE_TRUE
1431  AC_SUBST([MAINT])dnl
1432]
1433)
1434
1435# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1436
1437# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1438#
1439# This file is free software; the Free Software Foundation
1440# gives unlimited permission to copy and/or distribute it,
1441# with or without modifications, as long as this notice is preserved.
1442
1443# AM_MAKE_INCLUDE()
1444# -----------------
1445# Check to see how make treats includes.
1446AC_DEFUN([AM_MAKE_INCLUDE],
1447[am_make=${MAKE-make}
1448cat > confinc << 'END'
1449am__doit:
1450	@echo this is the am__doit target
1451.PHONY: am__doit
1452END
1453# If we don't find an include directive, just comment out the code.
1454AC_MSG_CHECKING([for style of include used by $am_make])
1455am__include="#"
1456am__quote=
1457_am_result=none
1458# First try GNU make style include.
1459echo "include confinc" > confmf
1460# Ignore all kinds of additional output from 'make'.
1461case `$am_make -s -f confmf 2> /dev/null` in #(
1462*the\ am__doit\ target*)
1463  am__include=include
1464  am__quote=
1465  _am_result=GNU
1466  ;;
1467esac
1468# Now try BSD make style include.
1469if test "$am__include" = "#"; then
1470   echo '.include "confinc"' > confmf
1471   case `$am_make -s -f confmf 2> /dev/null` in #(
1472   *the\ am__doit\ target*)
1473     am__include=.include
1474     am__quote="\""
1475     _am_result=BSD
1476     ;;
1477   esac
1478fi
1479AC_SUBST([am__include])
1480AC_SUBST([am__quote])
1481AC_MSG_RESULT([$_am_result])
1482rm -f confinc confmf
1483])
1484
1485# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1486
1487# Copyright (C) 1997-2014 Free Software Foundation, Inc.
1488#
1489# This file is free software; the Free Software Foundation
1490# gives unlimited permission to copy and/or distribute it,
1491# with or without modifications, as long as this notice is preserved.
1492
1493# AM_MISSING_PROG(NAME, PROGRAM)
1494# ------------------------------
1495AC_DEFUN([AM_MISSING_PROG],
1496[AC_REQUIRE([AM_MISSING_HAS_RUN])
1497$1=${$1-"${am_missing_run}$2"}
1498AC_SUBST($1)])
1499
1500# AM_MISSING_HAS_RUN
1501# ------------------
1502# Define MISSING if not defined so far and test if it is modern enough.
1503# If it is, set am_missing_run to use it, otherwise, to nothing.
1504AC_DEFUN([AM_MISSING_HAS_RUN],
1505[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1506AC_REQUIRE_AUX_FILE([missing])dnl
1507if test x"${MISSING+set}" != xset; then
1508  case $am_aux_dir in
1509  *\ * | *\	*)
1510    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1511  *)
1512    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1513  esac
1514fi
1515# Use eval to expand $SHELL
1516if eval "$MISSING --is-lightweight"; then
1517  am_missing_run="$MISSING "
1518else
1519  am_missing_run=
1520  AC_MSG_WARN(['missing' script is too old or missing])
1521fi
1522])
1523
1524# Helper functions for option handling.                     -*- Autoconf -*-
1525
1526# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1527#
1528# This file is free software; the Free Software Foundation
1529# gives unlimited permission to copy and/or distribute it,
1530# with or without modifications, as long as this notice is preserved.
1531
1532# _AM_MANGLE_OPTION(NAME)
1533# -----------------------
1534AC_DEFUN([_AM_MANGLE_OPTION],
1535[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1536
1537# _AM_SET_OPTION(NAME)
1538# --------------------
1539# Set option NAME.  Presently that only means defining a flag for this option.
1540AC_DEFUN([_AM_SET_OPTION],
1541[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1542
1543# _AM_SET_OPTIONS(OPTIONS)
1544# ------------------------
1545# OPTIONS is a space-separated list of Automake options.
1546AC_DEFUN([_AM_SET_OPTIONS],
1547[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1548
1549# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1550# -------------------------------------------
1551# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1552AC_DEFUN([_AM_IF_OPTION],
1553[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1554
1555# Copyright (C) 1999-2014 Free Software Foundation, Inc.
1556#
1557# This file is free software; the Free Software Foundation
1558# gives unlimited permission to copy and/or distribute it,
1559# with or without modifications, as long as this notice is preserved.
1560
1561# _AM_PROG_CC_C_O
1562# ---------------
1563# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1564# to automatically call this.
1565AC_DEFUN([_AM_PROG_CC_C_O],
1566[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1567AC_REQUIRE_AUX_FILE([compile])dnl
1568AC_LANG_PUSH([C])dnl
1569AC_CACHE_CHECK(
1570  [whether $CC understands -c and -o together],
1571  [am_cv_prog_cc_c_o],
1572  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1573  # Make sure it works both with $CC and with simple cc.
1574  # Following AC_PROG_CC_C_O, we do the test twice because some
1575  # compilers refuse to overwrite an existing .o file with -o,
1576  # though they will create one.
1577  am_cv_prog_cc_c_o=yes
1578  for am_i in 1 2; do
1579    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1580         && test -f conftest2.$ac_objext; then
1581      : OK
1582    else
1583      am_cv_prog_cc_c_o=no
1584      break
1585    fi
1586  done
1587  rm -f core conftest*
1588  unset am_i])
1589if test "$am_cv_prog_cc_c_o" != yes; then
1590   # Losing compiler, so override with the script.
1591   # FIXME: It is wrong to rewrite CC.
1592   # But if we don't then we get into trouble of one sort or another.
1593   # A longer-term fix would be to have automake use am__CC in this case,
1594   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1595   CC="$am_aux_dir/compile $CC"
1596fi
1597AC_LANG_POP([C])])
1598
1599# For backward compatibility.
1600AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1601
1602# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1603#
1604# This file is free software; the Free Software Foundation
1605# gives unlimited permission to copy and/or distribute it,
1606# with or without modifications, as long as this notice is preserved.
1607
1608# AM_RUN_LOG(COMMAND)
1609# -------------------
1610# Run COMMAND, save the exit status in ac_status, and log it.
1611# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1612AC_DEFUN([AM_RUN_LOG],
1613[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1614   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1615   ac_status=$?
1616   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1617   (exit $ac_status); }])
1618
1619# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1620
1621# Copyright (C) 1996-2014 Free Software Foundation, Inc.
1622#
1623# This file is free software; the Free Software Foundation
1624# gives unlimited permission to copy and/or distribute it,
1625# with or without modifications, as long as this notice is preserved.
1626
1627# AM_SANITY_CHECK
1628# ---------------
1629AC_DEFUN([AM_SANITY_CHECK],
1630[AC_MSG_CHECKING([whether build environment is sane])
1631# Reject unsafe characters in $srcdir or the absolute working directory
1632# name.  Accept space and tab only in the latter.
1633am_lf='
1634'
1635case `pwd` in
1636  *[[\\\"\#\$\&\'\`$am_lf]]*)
1637    AC_MSG_ERROR([unsafe absolute working directory name]);;
1638esac
1639case $srcdir in
1640  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1641    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1642esac
1643
1644# Do 'set' in a subshell so we don't clobber the current shell's
1645# arguments.  Must try -L first in case configure is actually a
1646# symlink; some systems play weird games with the mod time of symlinks
1647# (eg FreeBSD returns the mod time of the symlink's containing
1648# directory).
1649if (
1650   am_has_slept=no
1651   for am_try in 1 2; do
1652     echo "timestamp, slept: $am_has_slept" > conftest.file
1653     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1654     if test "$[*]" = "X"; then
1655	# -L didn't work.
1656	set X `ls -t "$srcdir/configure" conftest.file`
1657     fi
1658     if test "$[*]" != "X $srcdir/configure conftest.file" \
1659	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1660
1661	# If neither matched, then we have a broken ls.  This can happen
1662	# if, for instance, CONFIG_SHELL is bash and it inherits a
1663	# broken ls alias from the environment.  This has actually
1664	# happened.  Such a system could not be considered "sane".
1665	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1666  alias in your environment])
1667     fi
1668     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1669       break
1670     fi
1671     # Just in case.
1672     sleep 1
1673     am_has_slept=yes
1674   done
1675   test "$[2]" = conftest.file
1676   )
1677then
1678   # Ok.
1679   :
1680else
1681   AC_MSG_ERROR([newly created file is older than distributed files!
1682Check your system clock])
1683fi
1684AC_MSG_RESULT([yes])
1685# If we didn't sleep, we still need to ensure time stamps of config.status and
1686# generated files are strictly newer.
1687am_sleep_pid=
1688if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1689  ( sleep 1 ) &
1690  am_sleep_pid=$!
1691fi
1692AC_CONFIG_COMMANDS_PRE(
1693  [AC_MSG_CHECKING([that generated files are newer than configure])
1694   if test -n "$am_sleep_pid"; then
1695     # Hide warnings about reused PIDs.
1696     wait $am_sleep_pid 2>/dev/null
1697   fi
1698   AC_MSG_RESULT([done])])
1699rm -f conftest.file
1700])
1701
1702# Copyright (C) 2009-2014 Free Software Foundation, Inc.
1703#
1704# This file is free software; the Free Software Foundation
1705# gives unlimited permission to copy and/or distribute it,
1706# with or without modifications, as long as this notice is preserved.
1707
1708# AM_SILENT_RULES([DEFAULT])
1709# --------------------------
1710# Enable less verbose build rules; with the default set to DEFAULT
1711# ("yes" being less verbose, "no" or empty being verbose).
1712AC_DEFUN([AM_SILENT_RULES],
1713[AC_ARG_ENABLE([silent-rules], [dnl
1714AS_HELP_STRING(
1715  [--enable-silent-rules],
1716  [less verbose build output (undo: "make V=1")])
1717AS_HELP_STRING(
1718  [--disable-silent-rules],
1719  [verbose build output (undo: "make V=0")])dnl
1720])
1721case $enable_silent_rules in @%:@ (((
1722  yes) AM_DEFAULT_VERBOSITY=0;;
1723   no) AM_DEFAULT_VERBOSITY=1;;
1724    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1725esac
1726dnl
1727dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1728dnl do not support nested variable expansions.
1729dnl See automake bug#9928 and bug#10237.
1730am_make=${MAKE-make}
1731AC_CACHE_CHECK([whether $am_make supports nested variables],
1732   [am_cv_make_support_nested_variables],
1733   [if AS_ECHO([['TRUE=$(BAR$(V))
1734BAR0=false
1735BAR1=true
1736V=1
1737am__doit:
1738	@$(TRUE)
1739.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1740  am_cv_make_support_nested_variables=yes
1741else
1742  am_cv_make_support_nested_variables=no
1743fi])
1744if test $am_cv_make_support_nested_variables = yes; then
1745  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1746  AM_V='$(V)'
1747  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1748else
1749  AM_V=$AM_DEFAULT_VERBOSITY
1750  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1751fi
1752AC_SUBST([AM_V])dnl
1753AM_SUBST_NOTMAKE([AM_V])dnl
1754AC_SUBST([AM_DEFAULT_V])dnl
1755AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1756AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1757AM_BACKSLASH='\'
1758AC_SUBST([AM_BACKSLASH])dnl
1759_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1760])
1761
1762# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1763#
1764# This file is free software; the Free Software Foundation
1765# gives unlimited permission to copy and/or distribute it,
1766# with or without modifications, as long as this notice is preserved.
1767
1768# AM_PROG_INSTALL_STRIP
1769# ---------------------
1770# One issue with vendor 'install' (even GNU) is that you can't
1771# specify the program used to strip binaries.  This is especially
1772# annoying in cross-compiling environments, where the build's strip
1773# is unlikely to handle the host's binaries.
1774# Fortunately install-sh will honor a STRIPPROG variable, so we
1775# always use install-sh in "make install-strip", and initialize
1776# STRIPPROG with the value of the STRIP variable (set by the user).
1777AC_DEFUN([AM_PROG_INSTALL_STRIP],
1778[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1779# Installed binaries are usually stripped using 'strip' when the user
1780# run "make install-strip".  However 'strip' might not be the right
1781# tool to use in cross-compilation environments, therefore Automake
1782# will honor the 'STRIP' environment variable to overrule this program.
1783dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1784if test "$cross_compiling" != no; then
1785  AC_CHECK_TOOL([STRIP], [strip], :)
1786fi
1787INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1788AC_SUBST([INSTALL_STRIP_PROGRAM])])
1789
1790# Copyright (C) 2006-2014 Free Software Foundation, Inc.
1791#
1792# This file is free software; the Free Software Foundation
1793# gives unlimited permission to copy and/or distribute it,
1794# with or without modifications, as long as this notice is preserved.
1795
1796# _AM_SUBST_NOTMAKE(VARIABLE)
1797# ---------------------------
1798# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1799# This macro is traced by Automake.
1800AC_DEFUN([_AM_SUBST_NOTMAKE])
1801
1802# AM_SUBST_NOTMAKE(VARIABLE)
1803# --------------------------
1804# Public sister of _AM_SUBST_NOTMAKE.
1805AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1806
1807# Check how to create a tarball.                            -*- Autoconf -*-
1808
1809# Copyright (C) 2004-2014 Free Software Foundation, Inc.
1810#
1811# This file is free software; the Free Software Foundation
1812# gives unlimited permission to copy and/or distribute it,
1813# with or without modifications, as long as this notice is preserved.
1814
1815# _AM_PROG_TAR(FORMAT)
1816# --------------------
1817# Check how to create a tarball in format FORMAT.
1818# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1819#
1820# Substitute a variable $(am__tar) that is a command
1821# writing to stdout a FORMAT-tarball containing the directory
1822# $tardir.
1823#     tardir=directory && $(am__tar) > result.tar
1824#
1825# Substitute a variable $(am__untar) that extract such
1826# a tarball read from stdin.
1827#     $(am__untar) < result.tar
1828#
1829AC_DEFUN([_AM_PROG_TAR],
1830[# Always define AMTAR for backward compatibility.  Yes, it's still used
1831# in the wild :-(  We should find a proper way to deprecate it ...
1832AC_SUBST([AMTAR], ['$${TAR-tar}'])
1833
1834# We'll loop over all known methods to create a tar archive until one works.
1835_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1836
1837m4_if([$1], [v7],
1838  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1839
1840  [m4_case([$1],
1841    [ustar],
1842     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1843      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1844      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1845      # and bug#13588).
1846      am_max_uid=2097151 # 2^21 - 1
1847      am_max_gid=$am_max_uid
1848      # The $UID and $GID variables are not portable, so we need to resort
1849      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1850      # below are definitely unexpected, so allow the users to see them
1851      # (that is, avoid stderr redirection).
1852      am_uid=`id -u || echo unknown`
1853      am_gid=`id -g || echo unknown`
1854      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1855      if test $am_uid -le $am_max_uid; then
1856         AC_MSG_RESULT([yes])
1857      else
1858         AC_MSG_RESULT([no])
1859         _am_tools=none
1860      fi
1861      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1862      if test $am_gid -le $am_max_gid; then
1863         AC_MSG_RESULT([yes])
1864      else
1865        AC_MSG_RESULT([no])
1866        _am_tools=none
1867      fi],
1868
1869  [pax],
1870    [],
1871
1872  [m4_fatal([Unknown tar format])])
1873
1874  AC_MSG_CHECKING([how to create a $1 tar archive])
1875
1876  # Go ahead even if we have the value already cached.  We do so because we
1877  # need to set the values for the 'am__tar' and 'am__untar' variables.
1878  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1879
1880  for _am_tool in $_am_tools; do
1881    case $_am_tool in
1882    gnutar)
1883      for _am_tar in tar gnutar gtar; do
1884        AM_RUN_LOG([$_am_tar --version]) && break
1885      done
1886      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1887      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1888      am__untar="$_am_tar -xf -"
1889      ;;
1890    plaintar)
1891      # Must skip GNU tar: if it does not support --format= it doesn't create
1892      # ustar tarball either.
1893      (tar --version) >/dev/null 2>&1 && continue
1894      am__tar='tar chf - "$$tardir"'
1895      am__tar_='tar chf - "$tardir"'
1896      am__untar='tar xf -'
1897      ;;
1898    pax)
1899      am__tar='pax -L -x $1 -w "$$tardir"'
1900      am__tar_='pax -L -x $1 -w "$tardir"'
1901      am__untar='pax -r'
1902      ;;
1903    cpio)
1904      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1905      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1906      am__untar='cpio -i -H $1 -d'
1907      ;;
1908    none)
1909      am__tar=false
1910      am__tar_=false
1911      am__untar=false
1912      ;;
1913    esac
1914
1915    # If the value was cached, stop now.  We just wanted to have am__tar
1916    # and am__untar set.
1917    test -n "${am_cv_prog_tar_$1}" && break
1918
1919    # tar/untar a dummy directory, and stop if the command works.
1920    rm -rf conftest.dir
1921    mkdir conftest.dir
1922    echo GrepMe > conftest.dir/file
1923    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1924    rm -rf conftest.dir
1925    if test -s conftest.tar; then
1926      AM_RUN_LOG([$am__untar <conftest.tar])
1927      AM_RUN_LOG([cat conftest.dir/file])
1928      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1929    fi
1930  done
1931  rm -rf conftest.dir
1932
1933  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1934  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1935
1936AC_SUBST([am__tar])
1937AC_SUBST([am__untar])
1938]) # _AM_PROG_TAR
1939
1940m4_include([build/libtool.m4])
1941m4_include([build/ltoptions.m4])
1942m4_include([build/ltsugar.m4])
1943m4_include([build/ltversion.m4])
1944m4_include([build/lt~obsolete.m4])
1945