515bcc28d959ca41eb81a497dd012261776234b6
[platform/upstream/python-gobject.git] / aclocal.m4
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
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # 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 # ----------------------------------
49 AC_DEFUN([PKG_PROG_PKG_CONFIG],
50 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
51 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
52 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
53 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
54 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
55 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
56
57 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
58         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
59 fi
60 if 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
69 fi[]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 # --------------------------------------------------------------
82 AC_DEFUN([PKG_CHECK_EXISTS],
83 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
84 if test -n "$PKG_CONFIG" && \
85     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
86   m4_default([$2], [:])
87 m4_ifvaln([$3], [else
88   $3])dnl
89 fi])
90
91 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
92 # ---------------------------------------------
93 m4_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
103 fi[]dnl
104 ])# _PKG_CONFIG
105
106 # _PKG_SHORT_ERRORS_SUPPORTED
107 # -----------------------------
108 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
109 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
111         _pkg_short_errors_supported=yes
112 else
113         _pkg_short_errors_supported=no
114 fi[]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 # --------------------------------------------------------------
128 AC_DEFUN([PKG_CHECK_MODULES],
129 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
130 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
131 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
132
133 pkg_failed=no
134 AC_MSG_CHECKING([for $1])
135
136 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
137 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
138
139 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
140 and $1[]_LIBS to avoid the need to call pkg-config.
141 See the pkg-config man page for more details.])
142
143 if 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
159 Consider adjusting the PKG_CONFIG_PATH environment variable if you
160 installed software in a non-standard prefix.
161
162 _PKG_TEXT])[]dnl
163         ])
164 elif 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
168 is in your PATH or set the PKG_CONFIG environment variable to the full
169 path to pkg-config.
170
171 _PKG_TEXT
172
173 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
174         ])
175 else
176         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
177         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
178         AC_MSG_RESULT([yes])
179         $3
180 fi[]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.
191 AC_DEFUN([PKG_INSTALLDIR],
192 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
193 m4_pushdef([pkg_description],
194     [pkg-config installation directory @<:@]pkg_default[@:>@])
195 AC_ARG_WITH([pkgconfigdir],
196     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
197     [with_pkgconfigdir=]pkg_default)
198 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
199 m4_popdef([pkg_default])
200 m4_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.
211 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
212 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
213 m4_pushdef([pkg_description],
214     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
215 AC_ARG_WITH([noarch-pkgconfigdir],
216     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
217     [with_noarch_pkgconfigdir=]pkg_default)
218 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
219 m4_popdef([pkg_default])
220 m4_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.
228 AC_DEFUN([PKG_CHECK_VAR],
229 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
230 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
231
232 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
233 AS_VAR_COPY([$1], [pkg_cv_][$1])
234
235 AS_VAR_IF([$1], [""], [$5], [$4])dnl
236 ])# PKG_CHECK_VAR
237
238 # SYNOPSIS
239 #
240 #   AX_CODE_COVERAGE()
241 #
242 # DESCRIPTION
243 #
244 #   Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
245 #   included in the CFLAGS and LIBS/LDFLAGS variables of every build target
246 #   (program or library) which should be built with code coverage support.
247 #   Also defines CODE_COVERAGE_RULES which should be substituted in your
248 #   Makefile; and $enable_code_coverage which can be used in subsequent
249 #   configure output. CODE_COVERAGE_ENABLED is defined and substituted, and
250 #   corresponds to the value of the --enable-code-coverage option, which
251 #   defaults to being disabled.
252 #
253 #   Note that all optimisation flags in CFLAGS must be disabled when code
254 #   coverage is enabled.
255 #
256 #   Usage example:
257 #   configure.ac:
258 #      AX_CODE_COVERAGE
259 #
260 #   Makefile.am:
261 #      @CODE_COVERAGE_RULES@
262 #      my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
263 #      my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
264 #
265 #   This results in a “check-code-coverage” rule being added to any Makefile.am
266 #   which includes “@CODE_COVERAGE_RULES@” (assuming the module has been
267 #   configured with --enable-code-coverage). Running `make check-code-coverage`
268 #   in that directory will run the module’s test suite (`make check`) and build
269 #   a code coverage report detailing the code which was touched, then print the
270 #   URI for the report.
271 #
272 # LICENSE
273 #
274 #   Copyright © 2012, 2014 Philip Withnall
275 #   Copyright © 2012 Xan Lopez
276 #   Copyright © 2012 Christian Persch
277 #   Copyright © 2012 Paolo Borelli
278 #   Copyright © 2012 Dan Winship
279 #
280 #   Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
281 #   This file is licenced under LGPLv2.1+.
282
283 #serial 1
284
285 AC_DEFUN([AX_CODE_COVERAGE],[
286         dnl Check for --enable-code-coverage
287         AC_MSG_CHECKING([whether to build with code coverage support])
288         AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
289         AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
290         AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
291         AC_MSG_RESULT($enable_code_coverage)
292
293         AS_IF([ test "$enable_code_coverage" = "yes" ], [
294                 dnl Check if gcc is being used
295                 AS_IF([ test "$GCC" = "no" ], [
296                         AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
297                 ])
298
299                 # List of supported lcov versions.
300                 lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
301
302                 AC_CHECK_PROG([LCOV], [lcov], [lcov])
303                 AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
304
305                 AS_IF([ test "$LCOV" ], [
306                         AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [
307                                 ax_cv_lcov_version=invalid
308                                 lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
309                                 for lcov_check_version in $lcov_version_list; do
310                                         if test "$lcov_version" = "$lcov_check_version"; then
311                                                 ax_cv_lcov_version="$lcov_check_version (ok)"
312                                         fi
313                                 done
314                         ])
315                 ], [
316                         lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
317                         AC_MSG_ERROR([$lcov_msg])
318                 ])
319
320                 case $ax_cv_lcov_version in
321                         ""|invalid[)]
322                                 lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
323                                 AC_MSG_ERROR([$lcov_msg])
324                                 LCOV="exit 0;"
325                         ;;
326                 esac
327
328                 AS_IF([ test -z "$GENHTML" ], [
329                         AC_MSG_ERROR([Could not find genhtml from the lcov package])
330                 ])
331
332                 dnl Build the code coverage flags
333                 CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
334                 CODE_COVERAGE_LDFLAGS="-lgcov"
335
336                 AC_SUBST([CODE_COVERAGE_CFLAGS])
337                 AC_SUBST([CODE_COVERAGE_LDFLAGS])
338         ])
339
340 CODE_COVERAGE_RULES='
341 # Code coverage
342 #
343 # Optional:
344 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
345 #    (Default: $(top_builddir))
346 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
347 #    by lcov for code coverage. (Default:
348 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
349 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
350 #    reports to be created. (Default:
351 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
352 #  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
353 #    (Default: empty)
354 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
355 #    instance. (Default: empty)
356 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
357 #
358 # The generated report will be titled using the $(PACKAGE_NAME) and
359 # $(PACKAGE_VERSION). In order to add the current git hash to the title,
360 # use the git-version-gen script, available online.
361
362 # Optional variables
363 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
364 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
365 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
366 CODE_COVERAGE_LCOV_OPTIONS ?=
367 CODE_COVERAGE_GENHTML_OPTIONS ?=
368 CODE_COVERAGE_IGNORE_PATTERN ?=
369
370 code_coverage_quiet = $(code_coverage_quiet_$(V))
371 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
372 code_coverage_quiet_0 = --quiet
373
374 # Use recursive makes in order to ignore errors during check
375 check-code-coverage:
376 ifeq ($(CODE_COVERAGE_ENABLED),yes)
377         -$(MAKE) $(AM_MAKEFLAGS) -k check
378         $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
379 else
380         @echo "Need to reconfigure with --enable-code-coverage"
381 endif
382
383 # Capture code coverage data
384 code-coverage-capture: code-coverage-capture-hook
385 ifeq ($(CODE_COVERAGE_ENABLED),yes)
386         $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
387         $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
388         -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
389         LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
390         @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
391 else
392         @echo "Need to reconfigure with --enable-code-coverage"
393 endif
394
395 # Hook rule executed before code-coverage-capture, overridable by the user
396 code-coverage-capture-hook:
397
398 ifeq ($(CODE_COVERAGE_ENABLED),yes)
399 clean: code-coverage-clean
400 code-coverage-clean:
401         -$(LCOV) --directory $(top_builddir) -z
402         -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
403         -find . -name "*.gcda" -o -name "*.gcov" -delete
404 endif
405
406 GITIGNOREFILES ?=
407 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
408
409 DISTCHECK_CONFIGURE_FLAGS ?=
410 DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
411
412 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
413 '
414
415         AC_SUBST([CODE_COVERAGE_RULES])
416         m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
417 ])
418
419 # Configure paths for GLIB
420 # Owen Taylor     1997-2001
421
422 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
423 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
424 dnl gthread, or gio is specified in MODULES, pass to pkg-config
425 dnl
426 AC_DEFUN([AM_PATH_GLIB_2_0],
427 [dnl 
428 dnl Get the cflags and libraries from pkg-config
429 dnl
430 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
431                     , enable_glibtest=yes)
432
433   pkg_config_args=glib-2.0
434   for module in . $4
435   do
436       case "$module" in
437          gmodule) 
438              pkg_config_args="$pkg_config_args gmodule-2.0"
439          ;;
440          gmodule-no-export) 
441              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
442          ;;
443          gobject) 
444              pkg_config_args="$pkg_config_args gobject-2.0"
445          ;;
446          gthread) 
447              pkg_config_args="$pkg_config_args gthread-2.0"
448          ;;
449          gio*) 
450              pkg_config_args="$pkg_config_args $module-2.0"
451          ;;
452       esac
453   done
454
455   PKG_PROG_PKG_CONFIG([0.16])
456
457   no_glib=""
458
459   if test "x$PKG_CONFIG" = x ; then
460     no_glib=yes
461     PKG_CONFIG=no
462   fi
463
464   min_glib_version=ifelse([$1], ,2.0.0,$1)
465   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
466
467   if test x$PKG_CONFIG != xno ; then
468     ## don't try to run the test against uninstalled libtool libs
469     if $PKG_CONFIG --uninstalled $pkg_config_args; then
470           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
471           enable_glibtest=no
472     fi
473
474     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
475           :
476     else
477           no_glib=yes
478     fi
479   fi
480
481   if test x"$no_glib" = x ; then
482     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
483     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
484     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
485     GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
486
487     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
488     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
489     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
490            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
491     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
492            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
493     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
494            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
495     if test "x$enable_glibtest" = "xyes" ; then
496       ac_save_CFLAGS="$CFLAGS"
497       ac_save_LIBS="$LIBS"
498       CFLAGS="$CFLAGS $GLIB_CFLAGS"
499       LIBS="$GLIB_LIBS $LIBS"
500 dnl
501 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
502 dnl checks the results of pkg-config to some extent)
503 dnl
504       rm -f conf.glibtest
505       AC_TRY_RUN([
506 #include <glib.h>
507 #include <stdio.h>
508 #include <stdlib.h>
509
510 int 
511 main ()
512 {
513   unsigned int major, minor, micro;
514
515   fclose (fopen ("conf.glibtest", "w"));
516
517   if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
518      printf("%s, bad version string\n", "$min_glib_version");
519      exit(1);
520    }
521
522   if ((glib_major_version != $glib_config_major_version) ||
523       (glib_minor_version != $glib_config_minor_version) ||
524       (glib_micro_version != $glib_config_micro_version))
525     {
526       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
527              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
528              glib_major_version, glib_minor_version, glib_micro_version);
529       printf ("*** was found! If pkg-config was correct, then it is best\n");
530       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
531       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
532       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
533       printf("*** required on your system.\n");
534       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
535       printf("*** to point to the correct configuration files\n");
536     } 
537   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
538            (glib_minor_version != GLIB_MINOR_VERSION) ||
539            (glib_micro_version != GLIB_MICRO_VERSION))
540     {
541       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
542              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
543       printf("*** library (version %d.%d.%d)\n",
544              glib_major_version, glib_minor_version, glib_micro_version);
545     }
546   else
547     {
548       if ((glib_major_version > major) ||
549         ((glib_major_version == major) && (glib_minor_version > minor)) ||
550         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
551       {
552         return 0;
553        }
554      else
555       {
556         printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
557                glib_major_version, glib_minor_version, glib_micro_version);
558         printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
559                major, minor, micro);
560         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
561         printf("***\n");
562         printf("*** If you have already installed a sufficiently new version, this error\n");
563         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
564         printf("*** being found. The easiest way to fix this is to remove the old version\n");
565         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
566         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
567         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
568         printf("*** so that the correct libraries are found at run-time))\n");
569       }
570     }
571   return 1;
572 }
573 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
574        CFLAGS="$ac_save_CFLAGS"
575        LIBS="$ac_save_LIBS"
576      fi
577   fi
578   if test "x$no_glib" = x ; then
579      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
580      ifelse([$2], , :, [$2])     
581   else
582      AC_MSG_RESULT(no)
583      if test "$PKG_CONFIG" = "no" ; then
584        echo "*** A new enough version of pkg-config was not found."
585        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
586      else
587        if test -f conf.glibtest ; then
588         :
589        else
590           echo "*** Could not run GLIB test program, checking why..."
591           ac_save_CFLAGS="$CFLAGS"
592           ac_save_LIBS="$LIBS"
593           CFLAGS="$CFLAGS $GLIB_CFLAGS"
594           LIBS="$LIBS $GLIB_LIBS"
595           AC_TRY_LINK([
596 #include <glib.h>
597 #include <stdio.h>
598 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
599         [ echo "*** The test program compiled, but did not run. This usually means"
600           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
601           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
602           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
603           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
604           echo "*** is required on your system"
605           echo "***"
606           echo "*** If you have an old version installed, it is best to remove it, although"
607           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
608         [ echo "*** The test program failed to compile or link. See the file config.log for the"
609           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
610           CFLAGS="$ac_save_CFLAGS"
611           LIBS="$ac_save_LIBS"
612        fi
613      fi
614      GLIB_CFLAGS=""
615      GLIB_LIBS=""
616      GLIB_GENMARSHAL=""
617      GOBJECT_QUERY=""
618      GLIB_MKENUMS=""
619      GLIB_COMPILE_RESOURCES=""
620      ifelse([$3], , :, [$3])
621   fi
622   AC_SUBST(GLIB_CFLAGS)
623   AC_SUBST(GLIB_LIBS)
624   AC_SUBST(GLIB_GENMARSHAL)
625   AC_SUBST(GOBJECT_QUERY)
626   AC_SUBST(GLIB_MKENUMS)
627   AC_SUBST(GLIB_COMPILE_RESOURCES)
628   rm -f conf.glibtest
629 ])
630
631 dnl GNOME_CODE_COVERAGE
632 dnl
633 dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
634 dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
635 dnl (program or library) which should be built with code coverage support.
636 dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
637 dnl Makefile; and $enable_code_coverage which can be used in subsequent
638 dnl configure output.
639 dnl
640 dnl Note that all optimisation flags in CFLAGS must be disabled when code
641 dnl coverage is enabled.
642 dnl
643 dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
644 dnl This file is licenced under LGPLv2.1+.
645 dnl
646 dnl Usage example:
647 dnl configure.ac:
648 dnl    GNOME_CODE_COVERAGE
649 dnl
650 dnl Makefile.am:
651 dnl    @GNOME_CODE_COVERAGE_RULES@
652 dnl    my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
653 dnl    my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
654 dnl
655 dnl This results in a “check-code-coverage” rule being added to any Makefile.am
656 dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
657 dnl configured with --enable-code-coverage). Running `make check-code-coverage`
658 dnl in that directory will run the module’s test suite (`make check`) and build
659 dnl a code coverage report detailing the code which was touched, then print the
660 dnl URI for the report.
661
662 AU_DEFUN([GNOME_CODE_COVERAGE],[
663         AX_CODE_COVERAGE
664         GNOME_CODE_COVERAGE_RULES=$CODE_COVERAGE_RULES
665
666         AC_SUBST([GNOME_CODE_COVERAGE_RULES])
667         m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
668 ],
669 [[$0: This macro is deprecated. You should use AX_CODE_COVERAGE instead and
670 replace uses of GNOME_CODE_COVERAGE_RULES with CODE_COVERAGE_RULES.
671 See: http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html#ax_code_coverage]])
672
673 # gnome-compiler-flags.m4
674 #
675 # serial 4
676 #
677
678 dnl GNOME_COMPILE_WARNINGS
679 dnl Turn on many useful compiler warnings and substitute the result into
680 dnl WARN_CFLAGS
681 dnl For now, only works on GCC
682 dnl Pass the default value of the --enable-compile-warnings configure option as
683 dnl the first argument to the macro, defaulting to 'yes'.
684 dnl Additional warning/error flags can be passed as an optional second argument.
685 dnl
686 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
687 AU_DEFUN([GNOME_COMPILE_WARNINGS],[
688     dnl ******************************
689     dnl More compiler warnings
690     dnl ******************************
691
692     AC_ARG_ENABLE(compile-warnings, 
693                   AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
694                                  [Turn on compiler warnings]),,
695                   [enable_compile_warnings="m4_default([$1],[yes])"])
696
697     if test "x$GCC" != xyes; then
698         enable_compile_warnings=no
699     fi
700
701     warning_flags=
702     realsave_CFLAGS="$CFLAGS"
703
704     dnl These are warning flags that aren't marked as fatal.  Can be
705     dnl overridden on a per-project basis with -Wno-foo.
706     base_warn_flags=" \
707         -Wall \
708         -Wstrict-prototypes \
709         -Wnested-externs \
710     "
711
712     dnl These compiler flags typically indicate very broken or suspicious
713     dnl code.  Some of them such as implicit-function-declaration are
714     dnl just not default because gcc compiles a lot of legacy code.
715     dnl We choose to make this set into explicit errors.
716     base_error_flags=" \
717         -Werror=missing-prototypes \
718         -Werror=implicit-function-declaration \
719         -Werror=pointer-arith \
720         -Werror=init-self \
721         -Werror=format-security \
722         -Werror=format=2 \
723         -Werror=missing-include-dirs \
724         -Werror=return-type \
725     "
726
727     dnl Additional warning or error flags provided by the module author to
728     dnl allow stricter standards to be imposed on a per-module basis.
729     dnl The author can pass -W or -Werror flags here as they see fit.
730     additional_flags="m4_default([$2],[])"
731
732     case "$enable_compile_warnings" in
733     no)
734         warning_flags="-w"
735         ;;
736     minimum)
737         warning_flags="-Wall"
738         ;;
739     yes|maximum|error)
740         warning_flags="$base_warn_flags $base_error_flags $additional_flags"
741         ;;
742     *)
743         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
744         ;;
745     esac
746
747     if test "$enable_compile_warnings" = "error" ; then
748         warning_flags="$warning_flags -Werror"
749     fi
750
751     dnl Check whether GCC supports the warning options
752     for option in $warning_flags; do
753         save_CFLAGS="$CFLAGS"
754         CFLAGS="$CFLAGS $option"
755         AC_MSG_CHECKING([whether gcc understands $option])
756         AC_TRY_COMPILE([], [],
757             has_option=yes,
758             has_option=no,)
759         CFLAGS="$save_CFLAGS"
760         AC_MSG_RESULT([$has_option])
761         if test $has_option = yes; then
762             tested_warning_flags="$tested_warning_flags $option"
763         fi
764         unset has_option
765         unset save_CFLAGS
766     done
767     unset option
768     CFLAGS="$realsave_CFLAGS"
769     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
770     AC_MSG_RESULT($tested_warning_flags)
771
772     AC_ARG_ENABLE(iso-c,
773                   AS_HELP_STRING([--enable-iso-c],
774                                  [Try to warn if code is not ISO C ]),,
775                   [enable_iso_c=no])
776
777     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
778     complCFLAGS=
779     if test "x$enable_iso_c" != "xno"; then
780         if test "x$GCC" = "xyes"; then
781         case " $CFLAGS " in
782             *[\ \       ]-ansi[\ \      ]*) ;;
783             *) complCFLAGS="$complCFLAGS -ansi" ;;
784         esac
785         case " $CFLAGS " in
786             *[\ \       ]-pedantic[\ \  ]*) ;;
787             *) complCFLAGS="$complCFLAGS -pedantic" ;;
788         esac
789         fi
790     fi
791     AC_MSG_RESULT($complCFLAGS)
792
793     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
794     AC_SUBST(WARN_CFLAGS)
795 ],
796 [[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and
797 eliminate use of --enable-iso-c.
798 See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]])
799
800 dnl For C++, do basically the same thing.
801
802 AU_DEFUN([GNOME_CXX_WARNINGS],[
803   AC_ARG_ENABLE(cxx-warnings,
804                 AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
805                                [Turn on compiler warnings.]),,
806                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
807
808   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
809   warnCXXFLAGS=
810   if test "x$GXX" != xyes; then
811     enable_cxx_warnings=no
812   fi
813   if test "x$enable_cxx_warnings" != "xno"; then
814     if test "x$GXX" = "xyes"; then
815       case " $CXXFLAGS " in
816       *[\ \     ]-Wall[\ \      ]*) ;;
817       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
818       esac
819
820       ## -W is not all that useful.  And it cannot be controlled
821       ## with individual -Wno-xxx flags, unlike -Wall
822       if test "x$enable_cxx_warnings" = "xyes"; then
823         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
824       fi
825     fi
826   fi
827   AC_MSG_RESULT($warnCXXFLAGS)
828
829    AC_ARG_ENABLE(iso-cxx,
830                  AS_HELP_STRING([--enable-iso-cxx],
831                                 [Try to warn if code is not ISO C++ ]),,
832                  [enable_iso_cxx=no])
833
834    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
835    complCXXFLAGS=
836    if test "x$enable_iso_cxx" != "xno"; then
837      if test "x$GXX" = "xyes"; then
838       case " $CXXFLAGS " in
839       *[\ \     ]-ansi[\ \      ]*) ;;
840       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
841       esac
842
843       case " $CXXFLAGS " in
844       *[\ \     ]-pedantic[\ \  ]*) ;;
845       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
846       esac
847      fi
848    fi
849   AC_MSG_RESULT($complCXXFLAGS)
850
851   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
852   AC_SUBST(WARN_CXXFLAGS)
853 ],
854 [[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and
855 eliminate use of --enable-iso-cxx.
856 See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]])
857
858 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
859 #
860 # This file is free software; the Free Software Foundation
861 # gives unlimited permission to copy and/or distribute it,
862 # with or without modifications, as long as this notice is preserved.
863
864 # AM_AUTOMAKE_VERSION(VERSION)
865 # ----------------------------
866 # Automake X.Y traces this macro to ensure aclocal.m4 has been
867 # generated from the m4 files accompanying Automake X.Y.
868 # (This private macro should not be called outside this file.)
869 AC_DEFUN([AM_AUTOMAKE_VERSION],
870 [am__api_version='1.15'
871 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
872 dnl require some minimum version.  Point them to the right macro.
873 m4_if([$1], [1.15], [],
874       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
875 ])
876
877 # _AM_AUTOCONF_VERSION(VERSION)
878 # -----------------------------
879 # aclocal traces this macro to find the Autoconf version.
880 # This is a private macro too.  Using m4_define simplifies
881 # the logic in aclocal, which can simply ignore this definition.
882 m4_define([_AM_AUTOCONF_VERSION], [])
883
884 # AM_SET_CURRENT_AUTOMAKE_VERSION
885 # -------------------------------
886 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
887 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
888 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
889 [AM_AUTOMAKE_VERSION([1.15])dnl
890 m4_ifndef([AC_AUTOCONF_VERSION],
891   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
892 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
893
894 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
895
896 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
897 #
898 # This file is free software; the Free Software Foundation
899 # gives unlimited permission to copy and/or distribute it,
900 # with or without modifications, as long as this notice is preserved.
901
902 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
903 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
904 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
905 #
906 # Of course, Automake must honor this variable whenever it calls a
907 # tool from the auxiliary directory.  The problem is that $srcdir (and
908 # therefore $ac_aux_dir as well) can be either absolute or relative,
909 # depending on how configure is run.  This is pretty annoying, since
910 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
911 # source directory, any form will work fine, but in subdirectories a
912 # relative path needs to be adjusted first.
913 #
914 # $ac_aux_dir/missing
915 #    fails when called from a subdirectory if $ac_aux_dir is relative
916 # $top_srcdir/$ac_aux_dir/missing
917 #    fails if $ac_aux_dir is absolute,
918 #    fails when called from a subdirectory in a VPATH build with
919 #          a relative $ac_aux_dir
920 #
921 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
922 # are both prefixed by $srcdir.  In an in-source build this is usually
923 # harmless because $srcdir is '.', but things will broke when you
924 # start a VPATH build or use an absolute $srcdir.
925 #
926 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
927 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
928 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
929 # and then we would define $MISSING as
930 #   MISSING="\${SHELL} $am_aux_dir/missing"
931 # This will work as long as MISSING is not called from configure, because
932 # unfortunately $(top_srcdir) has no meaning in configure.
933 # However there are other variables, like CC, which are often used in
934 # configure, and could therefore not use this "fixed" $ac_aux_dir.
935 #
936 # Another solution, used here, is to always expand $ac_aux_dir to an
937 # absolute PATH.  The drawback is that using absolute paths prevent a
938 # configured tree to be moved without reconfiguration.
939
940 AC_DEFUN([AM_AUX_DIR_EXPAND],
941 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
942 # Expand $ac_aux_dir to an absolute path.
943 am_aux_dir=`cd "$ac_aux_dir" && pwd`
944 ])
945
946 # AM_CONDITIONAL                                            -*- Autoconf -*-
947
948 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
949 #
950 # This file is free software; the Free Software Foundation
951 # gives unlimited permission to copy and/or distribute it,
952 # with or without modifications, as long as this notice is preserved.
953
954 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
955 # -------------------------------------
956 # Define a conditional.
957 AC_DEFUN([AM_CONDITIONAL],
958 [AC_PREREQ([2.52])dnl
959  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
960        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
961 AC_SUBST([$1_TRUE])dnl
962 AC_SUBST([$1_FALSE])dnl
963 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
964 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
965 m4_define([_AM_COND_VALUE_$1], [$2])dnl
966 if $2; then
967   $1_TRUE=
968   $1_FALSE='#'
969 else
970   $1_TRUE='#'
971   $1_FALSE=
972 fi
973 AC_CONFIG_COMMANDS_PRE(
974 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
975   AC_MSG_ERROR([[conditional "$1" was never defined.
976 Usually this means the macro was only invoked conditionally.]])
977 fi])])
978
979 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
980 #
981 # This file is free software; the Free Software Foundation
982 # gives unlimited permission to copy and/or distribute it,
983 # with or without modifications, as long as this notice is preserved.
984
985
986 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
987 # written in clear, in which case automake, when reading aclocal.m4,
988 # will think it sees a *use*, and therefore will trigger all it's
989 # C support machinery.  Also note that it means that autoscan, seeing
990 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
991
992
993 # _AM_DEPENDENCIES(NAME)
994 # ----------------------
995 # See how the compiler implements dependency checking.
996 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
997 # We try a few techniques and use that to set a single cache variable.
998 #
999 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1000 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1001 # dependency, and given that the user is not expected to run this macro,
1002 # just rely on AC_PROG_CC.
1003 AC_DEFUN([_AM_DEPENDENCIES],
1004 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1005 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1006 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1007 AC_REQUIRE([AM_DEP_TRACK])dnl
1008
1009 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1010       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1011       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1012       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1013       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1014       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1015                     [depcc="$$1"   am_compiler_list=])
1016
1017 AC_CACHE_CHECK([dependency style of $depcc],
1018                [am_cv_$1_dependencies_compiler_type],
1019 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1020   # We make a subdir and do the tests there.  Otherwise we can end up
1021   # making bogus files that we don't know about and never remove.  For
1022   # instance it was reported that on HP-UX the gcc test will end up
1023   # making a dummy file named 'D' -- because '-MD' means "put the output
1024   # in D".
1025   rm -rf conftest.dir
1026   mkdir conftest.dir
1027   # Copy depcomp to subdir because otherwise we won't find it if we're
1028   # using a relative directory.
1029   cp "$am_depcomp" conftest.dir
1030   cd conftest.dir
1031   # We will build objects and dependencies in a subdirectory because
1032   # it helps to detect inapplicable dependency modes.  For instance
1033   # both Tru64's cc and ICC support -MD to output dependencies as a
1034   # side effect of compilation, but ICC will put the dependencies in
1035   # the current directory while Tru64 will put them in the object
1036   # directory.
1037   mkdir sub
1038
1039   am_cv_$1_dependencies_compiler_type=none
1040   if test "$am_compiler_list" = ""; then
1041      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1042   fi
1043   am__universal=false
1044   m4_case([$1], [CC],
1045     [case " $depcc " in #(
1046      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1047      esac],
1048     [CXX],
1049     [case " $depcc " in #(
1050      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1051      esac])
1052
1053   for depmode in $am_compiler_list; do
1054     # Setup a source with many dependencies, because some compilers
1055     # like to wrap large dependency lists on column 80 (with \), and
1056     # we should not choose a depcomp mode which is confused by this.
1057     #
1058     # We need to recreate these files for each test, as the compiler may
1059     # overwrite some of them when testing with obscure command lines.
1060     # This happens at least with the AIX C compiler.
1061     : > sub/conftest.c
1062     for i in 1 2 3 4 5 6; do
1063       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1064       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1065       # Solaris 10 /bin/sh.
1066       echo '/* dummy */' > sub/conftst$i.h
1067     done
1068     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1069
1070     # We check with '-c' and '-o' for the sake of the "dashmstdout"
1071     # mode.  It turns out that the SunPro C++ compiler does not properly
1072     # handle '-M -o', and we need to detect this.  Also, some Intel
1073     # versions had trouble with output in subdirs.
1074     am__obj=sub/conftest.${OBJEXT-o}
1075     am__minus_obj="-o $am__obj"
1076     case $depmode in
1077     gcc)
1078       # This depmode causes a compiler race in universal mode.
1079       test "$am__universal" = false || continue
1080       ;;
1081     nosideeffect)
1082       # After this tag, mechanisms are not by side-effect, so they'll
1083       # only be used when explicitly requested.
1084       if test "x$enable_dependency_tracking" = xyes; then
1085         continue
1086       else
1087         break
1088       fi
1089       ;;
1090     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1091       # This compiler won't grok '-c -o', but also, the minuso test has
1092       # not run yet.  These depmodes are late enough in the game, and
1093       # so weak that their functioning should not be impacted.
1094       am__obj=conftest.${OBJEXT-o}
1095       am__minus_obj=
1096       ;;
1097     none) break ;;
1098     esac
1099     if depmode=$depmode \
1100        source=sub/conftest.c object=$am__obj \
1101        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1102        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1103          >/dev/null 2>conftest.err &&
1104        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1105        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1106        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1107        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1108       # icc doesn't choke on unknown options, it will just issue warnings
1109       # or remarks (even with -Werror).  So we grep stderr for any message
1110       # that says an option was ignored or not supported.
1111       # When given -MP, icc 7.0 and 7.1 complain thusly:
1112       #   icc: Command line warning: ignoring option '-M'; no argument required
1113       # The diagnosis changed in icc 8.0:
1114       #   icc: Command line remark: option '-MP' not supported
1115       if (grep 'ignoring option' conftest.err ||
1116           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1117         am_cv_$1_dependencies_compiler_type=$depmode
1118         break
1119       fi
1120     fi
1121   done
1122
1123   cd ..
1124   rm -rf conftest.dir
1125 else
1126   am_cv_$1_dependencies_compiler_type=none
1127 fi
1128 ])
1129 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1130 AM_CONDITIONAL([am__fastdep$1], [
1131   test "x$enable_dependency_tracking" != xno \
1132   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1133 ])
1134
1135
1136 # AM_SET_DEPDIR
1137 # -------------
1138 # Choose a directory name for dependency files.
1139 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1140 AC_DEFUN([AM_SET_DEPDIR],
1141 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1142 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1143 ])
1144
1145
1146 # AM_DEP_TRACK
1147 # ------------
1148 AC_DEFUN([AM_DEP_TRACK],
1149 [AC_ARG_ENABLE([dependency-tracking], [dnl
1150 AS_HELP_STRING(
1151   [--enable-dependency-tracking],
1152   [do not reject slow dependency extractors])
1153 AS_HELP_STRING(
1154   [--disable-dependency-tracking],
1155   [speeds up one-time build])])
1156 if test "x$enable_dependency_tracking" != xno; then
1157   am_depcomp="$ac_aux_dir/depcomp"
1158   AMDEPBACKSLASH='\'
1159   am__nodep='_no'
1160 fi
1161 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1162 AC_SUBST([AMDEPBACKSLASH])dnl
1163 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1164 AC_SUBST([am__nodep])dnl
1165 _AM_SUBST_NOTMAKE([am__nodep])dnl
1166 ])
1167
1168 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1169
1170 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1171 #
1172 # This file is free software; the Free Software Foundation
1173 # gives unlimited permission to copy and/or distribute it,
1174 # with or without modifications, as long as this notice is preserved.
1175
1176
1177 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1178 # ------------------------------
1179 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1180 [{
1181   # Older Autoconf quotes --file arguments for eval, but not when files
1182   # are listed without --file.  Let's play safe and only enable the eval
1183   # if we detect the quoting.
1184   case $CONFIG_FILES in
1185   *\'*) eval set x "$CONFIG_FILES" ;;
1186   *)   set x $CONFIG_FILES ;;
1187   esac
1188   shift
1189   for mf
1190   do
1191     # Strip MF so we end up with the name of the file.
1192     mf=`echo "$mf" | sed -e 's/:.*$//'`
1193     # Check whether this is an Automake generated Makefile or not.
1194     # We used to match only the files named 'Makefile.in', but
1195     # some people rename them; so instead we look at the file content.
1196     # Grep'ing the first line is not enough: some people post-process
1197     # each Makefile.in and add a new line on top of each file to say so.
1198     # Grep'ing the whole file is not good either: AIX grep has a line
1199     # limit of 2048, but all sed's we know have understand at least 4000.
1200     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1201       dirpart=`AS_DIRNAME("$mf")`
1202     else
1203       continue
1204     fi
1205     # Extract the definition of DEPDIR, am__include, and am__quote
1206     # from the Makefile without running 'make'.
1207     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1208     test -z "$DEPDIR" && continue
1209     am__include=`sed -n 's/^am__include = //p' < "$mf"`
1210     test -z "$am__include" && continue
1211     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1212     # Find all dependency output files, they are included files with
1213     # $(DEPDIR) in their names.  We invoke sed twice because it is the
1214     # simplest approach to changing $(DEPDIR) to its actual value in the
1215     # expansion.
1216     for file in `sed -n "
1217       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1218          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1219       # Make sure the directory exists.
1220       test -f "$dirpart/$file" && continue
1221       fdir=`AS_DIRNAME(["$file"])`
1222       AS_MKDIR_P([$dirpart/$fdir])
1223       # echo "creating $dirpart/$file"
1224       echo '# dummy' > "$dirpart/$file"
1225     done
1226   done
1227 }
1228 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1229
1230
1231 # AM_OUTPUT_DEPENDENCY_COMMANDS
1232 # -----------------------------
1233 # This macro should only be invoked once -- use via AC_REQUIRE.
1234 #
1235 # This code is only required when automatic dependency tracking
1236 # is enabled.  FIXME.  This creates each '.P' file that we will
1237 # need in order to bootstrap the dependency handling code.
1238 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1239 [AC_CONFIG_COMMANDS([depfiles],
1240      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1241      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1242 ])
1243
1244 # Do all the work for Automake.                             -*- Autoconf -*-
1245
1246 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
1247 #
1248 # This file is free software; the Free Software Foundation
1249 # gives unlimited permission to copy and/or distribute it,
1250 # with or without modifications, as long as this notice is preserved.
1251
1252 # This macro actually does too much.  Some checks are only needed if
1253 # your package does certain things.  But this isn't really a big deal.
1254
1255 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1256 m4_define([AC_PROG_CC],
1257 m4_defn([AC_PROG_CC])
1258 [_AM_PROG_CC_C_O
1259 ])
1260
1261 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1262 # AM_INIT_AUTOMAKE([OPTIONS])
1263 # -----------------------------------------------
1264 # The call with PACKAGE and VERSION arguments is the old style
1265 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1266 # and VERSION should now be passed to AC_INIT and removed from
1267 # the call to AM_INIT_AUTOMAKE.
1268 # We support both call styles for the transition.  After
1269 # the next Automake release, Autoconf can make the AC_INIT
1270 # arguments mandatory, and then we can depend on a new Autoconf
1271 # release and drop the old call support.
1272 AC_DEFUN([AM_INIT_AUTOMAKE],
1273 [AC_PREREQ([2.65])dnl
1274 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1275 dnl the ones we care about.
1276 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1277 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1278 AC_REQUIRE([AC_PROG_INSTALL])dnl
1279 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1280   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1281   # is not polluted with repeated "-I."
1282   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1283   # test to see if srcdir already configured
1284   if test -f $srcdir/config.status; then
1285     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1286   fi
1287 fi
1288
1289 # test whether we have cygpath
1290 if test -z "$CYGPATH_W"; then
1291   if (cygpath --version) >/dev/null 2>/dev/null; then
1292     CYGPATH_W='cygpath -w'
1293   else
1294     CYGPATH_W=echo
1295   fi
1296 fi
1297 AC_SUBST([CYGPATH_W])
1298
1299 # Define the identity of the package.
1300 dnl Distinguish between old-style and new-style calls.
1301 m4_ifval([$2],
1302 [AC_DIAGNOSE([obsolete],
1303              [$0: two- and three-arguments forms are deprecated.])
1304 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1305  AC_SUBST([PACKAGE], [$1])dnl
1306  AC_SUBST([VERSION], [$2])],
1307 [_AM_SET_OPTIONS([$1])dnl
1308 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1309 m4_if(
1310   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1311   [ok:ok],,
1312   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1313  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1314  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1315
1316 _AM_IF_OPTION([no-define],,
1317 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1318  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1319
1320 # Some tools Automake needs.
1321 AC_REQUIRE([AM_SANITY_CHECK])dnl
1322 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1323 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1324 AM_MISSING_PROG([AUTOCONF], [autoconf])
1325 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1326 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1327 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1328 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1329 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1330 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1331 # For better backward compatibility.  To be removed once Automake 1.9.x
1332 # dies out for good.  For more background, see:
1333 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1334 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1335 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1336 # We need awk for the "check" target (and possibly the TAP driver).  The
1337 # system "awk" is bad on some platforms.
1338 AC_REQUIRE([AC_PROG_AWK])dnl
1339 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1340 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1341 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1342               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1343                              [_AM_PROG_TAR([v7])])])
1344 _AM_IF_OPTION([no-dependencies],,
1345 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1346                   [_AM_DEPENDENCIES([CC])],
1347                   [m4_define([AC_PROG_CC],
1348                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1349 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1350                   [_AM_DEPENDENCIES([CXX])],
1351                   [m4_define([AC_PROG_CXX],
1352                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1353 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1354                   [_AM_DEPENDENCIES([OBJC])],
1355                   [m4_define([AC_PROG_OBJC],
1356                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1357 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1358                   [_AM_DEPENDENCIES([OBJCXX])],
1359                   [m4_define([AC_PROG_OBJCXX],
1360                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1361 ])
1362 AC_REQUIRE([AM_SILENT_RULES])dnl
1363 dnl The testsuite driver may need to know about EXEEXT, so add the
1364 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1365 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1366 AC_CONFIG_COMMANDS_PRE(dnl
1367 [m4_provide_if([_AM_COMPILER_EXEEXT],
1368   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1369
1370 # POSIX will say in a future version that running "rm -f" with no argument
1371 # is OK; and we want to be able to make that assumption in our Makefile
1372 # recipes.  So use an aggressive probe to check that the usage we want is
1373 # actually supported "in the wild" to an acceptable degree.
1374 # See automake bug#10828.
1375 # To make any issue more visible, cause the running configure to be aborted
1376 # by default if the 'rm' program in use doesn't match our expectations; the
1377 # user can still override this though.
1378 if rm -f && rm -fr && rm -rf; then : OK; else
1379   cat >&2 <<'END'
1380 Oops!
1381
1382 Your 'rm' program seems unable to run without file operands specified
1383 on the command line, even when the '-f' option is present.  This is contrary
1384 to the behaviour of most rm programs out there, and not conforming with
1385 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1386
1387 Please tell bug-automake@gnu.org about your system, including the value
1388 of your $PATH and any error possibly output before this message.  This
1389 can help us improve future automake versions.
1390
1391 END
1392   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1393     echo 'Configuration will proceed anyway, since you have set the' >&2
1394     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1395     echo >&2
1396   else
1397     cat >&2 <<'END'
1398 Aborting the configuration process, to ensure you take notice of the issue.
1399
1400 You can download and install GNU coreutils to get an 'rm' implementation
1401 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1402
1403 If you want to complete the configuration process using your problematic
1404 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1405 to "yes", and re-run configure.
1406
1407 END
1408     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1409   fi
1410 fi
1411 dnl The trailing newline in this macro's definition is deliberate, for
1412 dnl backward compatibility and to allow trailing 'dnl'-style comments
1413 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1414 ])
1415
1416 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1417 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1418 dnl mangled by Autoconf and run in a shell conditional statement.
1419 m4_define([_AC_COMPILER_EXEEXT],
1420 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1421
1422 # When config.status generates a header, we must update the stamp-h file.
1423 # This file resides in the same directory as the config header
1424 # that is generated.  The stamp files are numbered to have different names.
1425
1426 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1427 # loop where config.status creates the headers, so we can generate
1428 # our stamp files there.
1429 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1430 [# Compute $1's index in $config_headers.
1431 _am_arg=$1
1432 _am_stamp_count=1
1433 for _am_header in $config_headers :; do
1434   case $_am_header in
1435     $_am_arg | $_am_arg:* )
1436       break ;;
1437     * )
1438       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1439   esac
1440 done
1441 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1442
1443 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1444 #
1445 # This file is free software; the Free Software Foundation
1446 # gives unlimited permission to copy and/or distribute it,
1447 # with or without modifications, as long as this notice is preserved.
1448
1449 # AM_PROG_INSTALL_SH
1450 # ------------------
1451 # Define $install_sh.
1452 AC_DEFUN([AM_PROG_INSTALL_SH],
1453 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1454 if test x"${install_sh+set}" != xset; then
1455   case $am_aux_dir in
1456   *\ * | *\     *)
1457     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1458   *)
1459     install_sh="\${SHELL} $am_aux_dir/install-sh"
1460   esac
1461 fi
1462 AC_SUBST([install_sh])])
1463
1464 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
1465 #
1466 # This file is free software; the Free Software Foundation
1467 # gives unlimited permission to copy and/or distribute it,
1468 # with or without modifications, as long as this notice is preserved.
1469
1470 # Check whether the underlying file-system supports filenames
1471 # with a leading dot.  For instance MS-DOS doesn't.
1472 AC_DEFUN([AM_SET_LEADING_DOT],
1473 [rm -rf .tst 2>/dev/null
1474 mkdir .tst 2>/dev/null
1475 if test -d .tst; then
1476   am__leading_dot=.
1477 else
1478   am__leading_dot=_
1479 fi
1480 rmdir .tst 2>/dev/null
1481 AC_SUBST([am__leading_dot])])
1482
1483 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1484
1485 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1486 #
1487 # This file is free software; the Free Software Foundation
1488 # gives unlimited permission to copy and/or distribute it,
1489 # with or without modifications, as long as this notice is preserved.
1490
1491 # AM_MAKE_INCLUDE()
1492 # -----------------
1493 # Check to see how make treats includes.
1494 AC_DEFUN([AM_MAKE_INCLUDE],
1495 [am_make=${MAKE-make}
1496 cat > confinc << 'END'
1497 am__doit:
1498         @echo this is the am__doit target
1499 .PHONY: am__doit
1500 END
1501 # If we don't find an include directive, just comment out the code.
1502 AC_MSG_CHECKING([for style of include used by $am_make])
1503 am__include="#"
1504 am__quote=
1505 _am_result=none
1506 # First try GNU make style include.
1507 echo "include confinc" > confmf
1508 # Ignore all kinds of additional output from 'make'.
1509 case `$am_make -s -f confmf 2> /dev/null` in #(
1510 *the\ am__doit\ target*)
1511   am__include=include
1512   am__quote=
1513   _am_result=GNU
1514   ;;
1515 esac
1516 # Now try BSD make style include.
1517 if test "$am__include" = "#"; then
1518    echo '.include "confinc"' > confmf
1519    case `$am_make -s -f confmf 2> /dev/null` in #(
1520    *the\ am__doit\ target*)
1521      am__include=.include
1522      am__quote="\""
1523      _am_result=BSD
1524      ;;
1525    esac
1526 fi
1527 AC_SUBST([am__include])
1528 AC_SUBST([am__quote])
1529 AC_MSG_RESULT([$_am_result])
1530 rm -f confinc confmf
1531 ])
1532
1533 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1534
1535 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
1536 #
1537 # This file is free software; the Free Software Foundation
1538 # gives unlimited permission to copy and/or distribute it,
1539 # with or without modifications, as long as this notice is preserved.
1540
1541 # AM_MISSING_PROG(NAME, PROGRAM)
1542 # ------------------------------
1543 AC_DEFUN([AM_MISSING_PROG],
1544 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1545 $1=${$1-"${am_missing_run}$2"}
1546 AC_SUBST($1)])
1547
1548 # AM_MISSING_HAS_RUN
1549 # ------------------
1550 # Define MISSING if not defined so far and test if it is modern enough.
1551 # If it is, set am_missing_run to use it, otherwise, to nothing.
1552 AC_DEFUN([AM_MISSING_HAS_RUN],
1553 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1554 AC_REQUIRE_AUX_FILE([missing])dnl
1555 if test x"${MISSING+set}" != xset; then
1556   case $am_aux_dir in
1557   *\ * | *\     *)
1558     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1559   *)
1560     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1561   esac
1562 fi
1563 # Use eval to expand $SHELL
1564 if eval "$MISSING --is-lightweight"; then
1565   am_missing_run="$MISSING "
1566 else
1567   am_missing_run=
1568   AC_MSG_WARN(['missing' script is too old or missing])
1569 fi
1570 ])
1571
1572 # Helper functions for option handling.                     -*- Autoconf -*-
1573
1574 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1575 #
1576 # This file is free software; the Free Software Foundation
1577 # gives unlimited permission to copy and/or distribute it,
1578 # with or without modifications, as long as this notice is preserved.
1579
1580 # _AM_MANGLE_OPTION(NAME)
1581 # -----------------------
1582 AC_DEFUN([_AM_MANGLE_OPTION],
1583 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1584
1585 # _AM_SET_OPTION(NAME)
1586 # --------------------
1587 # Set option NAME.  Presently that only means defining a flag for this option.
1588 AC_DEFUN([_AM_SET_OPTION],
1589 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1590
1591 # _AM_SET_OPTIONS(OPTIONS)
1592 # ------------------------
1593 # OPTIONS is a space-separated list of Automake options.
1594 AC_DEFUN([_AM_SET_OPTIONS],
1595 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1596
1597 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1598 # -------------------------------------------
1599 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1600 AC_DEFUN([_AM_IF_OPTION],
1601 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1602
1603 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1604 #
1605 # This file is free software; the Free Software Foundation
1606 # gives unlimited permission to copy and/or distribute it,
1607 # with or without modifications, as long as this notice is preserved.
1608
1609 # _AM_PROG_CC_C_O
1610 # ---------------
1611 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1612 # to automatically call this.
1613 AC_DEFUN([_AM_PROG_CC_C_O],
1614 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1615 AC_REQUIRE_AUX_FILE([compile])dnl
1616 AC_LANG_PUSH([C])dnl
1617 AC_CACHE_CHECK(
1618   [whether $CC understands -c and -o together],
1619   [am_cv_prog_cc_c_o],
1620   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1621   # Make sure it works both with $CC and with simple cc.
1622   # Following AC_PROG_CC_C_O, we do the test twice because some
1623   # compilers refuse to overwrite an existing .o file with -o,
1624   # though they will create one.
1625   am_cv_prog_cc_c_o=yes
1626   for am_i in 1 2; do
1627     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1628          && test -f conftest2.$ac_objext; then
1629       : OK
1630     else
1631       am_cv_prog_cc_c_o=no
1632       break
1633     fi
1634   done
1635   rm -f core conftest*
1636   unset am_i])
1637 if test "$am_cv_prog_cc_c_o" != yes; then
1638    # Losing compiler, so override with the script.
1639    # FIXME: It is wrong to rewrite CC.
1640    # But if we don't then we get into trouble of one sort or another.
1641    # A longer-term fix would be to have automake use am__CC in this case,
1642    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1643    CC="$am_aux_dir/compile $CC"
1644 fi
1645 AC_LANG_POP([C])])
1646
1647 # For backward compatibility.
1648 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1649
1650 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1651 #
1652 # This file is free software; the Free Software Foundation
1653 # gives unlimited permission to copy and/or distribute it,
1654 # with or without modifications, as long as this notice is preserved.
1655
1656
1657 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1658 # ---------------------------------------------------------------------------
1659 # Adds support for distributing Python modules and packages.  To
1660 # install modules, copy them to $(pythondir), using the python_PYTHON
1661 # automake variable.  To install a package with the same name as the
1662 # automake package, install to $(pkgpythondir), or use the
1663 # pkgpython_PYTHON automake variable.
1664 #
1665 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1666 # locations to install python extension modules (shared libraries).
1667 # Another macro is required to find the appropriate flags to compile
1668 # extension modules.
1669 #
1670 # If your package is configured with a different prefix to python,
1671 # users will have to add the install directory to the PYTHONPATH
1672 # environment variable, or create a .pth file (see the python
1673 # documentation for details).
1674 #
1675 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1676 # cause an error if the version of python installed on the system
1677 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
1678 # numbers and dots only.
1679 AC_DEFUN([AM_PATH_PYTHON],
1680  [
1681   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
1682   dnl supported. (2.0 was released on October 16, 2000).
1683   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1684 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1685  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1686
1687   AC_ARG_VAR([PYTHON], [the Python interpreter])
1688
1689   m4_if([$1],[],[
1690     dnl No version check is needed.
1691     # Find any Python interpreter.
1692     if test -z "$PYTHON"; then
1693       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1694     fi
1695     am_display_PYTHON=python
1696   ], [
1697     dnl A version check is needed.
1698     if test -n "$PYTHON"; then
1699       # If the user set $PYTHON, use it and don't search something else.
1700       AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1701       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1702                               [AC_MSG_RESULT([yes])],
1703                               [AC_MSG_RESULT([no])
1704                                AC_MSG_ERROR([Python interpreter is too old])])
1705       am_display_PYTHON=$PYTHON
1706     else
1707       # Otherwise, try each interpreter until we find one that satisfies
1708       # VERSION.
1709       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1710         [am_cv_pathless_PYTHON],[
1711         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1712           test "$am_cv_pathless_PYTHON" = none && break
1713           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1714         done])
1715       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1716       if test "$am_cv_pathless_PYTHON" = none; then
1717         PYTHON=:
1718       else
1719         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1720       fi
1721       am_display_PYTHON=$am_cv_pathless_PYTHON
1722     fi
1723   ])
1724
1725   if test "$PYTHON" = :; then
1726   dnl Run any user-specified action, or abort.
1727     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1728   else
1729
1730   dnl Query Python for its version number.  Getting [:3] seems to be
1731   dnl the best way to do this; it's what "site.py" does in the standard
1732   dnl library.
1733
1734   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1735     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1736   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1737
1738   dnl Use the values of $prefix and $exec_prefix for the corresponding
1739   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
1740   dnl distinct variables so they can be overridden if need be.  However,
1741   dnl general consensus is that you shouldn't need this ability.
1742
1743   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1744   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1745
1746   dnl At times (like when building shared libraries) you may want
1747   dnl to know which OS platform Python thinks this is.
1748
1749   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1750     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1751   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1752
1753   # Just factor out some code duplication.
1754   am_python_setup_sysconfig="\
1755 import sys
1756 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1757 # with python 3.x.  See automake bug#10227.
1758 try:
1759     import sysconfig
1760 except ImportError:
1761     can_use_sysconfig = 0
1762 else:
1763     can_use_sysconfig = 1
1764 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1765 # <https://github.com/pypa/virtualenv/issues/118>
1766 try:
1767     from platform import python_implementation
1768     if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1769         can_use_sysconfig = 0
1770 except ImportError:
1771     pass"
1772
1773   dnl Set up 4 directories:
1774
1775   dnl pythondir -- where to install python scripts.  This is the
1776   dnl   site-packages directory, not the python standard library
1777   dnl   directory like in previous automake betas.  This behavior
1778   dnl   is more consistent with lispdir.m4 for example.
1779   dnl Query distutils for this directory.
1780   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1781     [am_cv_python_pythondir],
1782     [if test "x$prefix" = xNONE
1783      then
1784        am_py_prefix=$ac_default_prefix
1785      else
1786        am_py_prefix=$prefix
1787      fi
1788      am_cv_python_pythondir=`$PYTHON -c "
1789 $am_python_setup_sysconfig
1790 if can_use_sysconfig:
1791     sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1792 else:
1793     from distutils import sysconfig
1794     sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1795 sys.stdout.write(sitedir)"`
1796      case $am_cv_python_pythondir in
1797      $am_py_prefix*)
1798        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1799        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1800        ;;
1801      *)
1802        case $am_py_prefix in
1803          /usr|/System*) ;;
1804          *)
1805           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1806           ;;
1807        esac
1808        ;;
1809      esac
1810     ])
1811   AC_SUBST([pythondir], [$am_cv_python_pythondir])
1812
1813   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
1814   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
1815   dnl   more consistent with the rest of automake.
1816
1817   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1818
1819   dnl pyexecdir -- directory for installing python extension modules
1820   dnl   (shared libraries)
1821   dnl Query distutils for this directory.
1822   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1823     [am_cv_python_pyexecdir],
1824     [if test "x$exec_prefix" = xNONE
1825      then
1826        am_py_exec_prefix=$am_py_prefix
1827      else
1828        am_py_exec_prefix=$exec_prefix
1829      fi
1830      am_cv_python_pyexecdir=`$PYTHON -c "
1831 $am_python_setup_sysconfig
1832 if can_use_sysconfig:
1833     sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1834 else:
1835     from distutils import sysconfig
1836     sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1837 sys.stdout.write(sitedir)"`
1838      case $am_cv_python_pyexecdir in
1839      $am_py_exec_prefix*)
1840        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1841        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1842        ;;
1843      *)
1844        case $am_py_exec_prefix in
1845          /usr|/System*) ;;
1846          *)
1847            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1848            ;;
1849        esac
1850        ;;
1851      esac
1852     ])
1853   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1854
1855   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1856
1857   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1858
1859   dnl Run any user-specified action.
1860   $2
1861   fi
1862
1863 ])
1864
1865
1866 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1867 # ---------------------------------------------------------------------------
1868 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1869 # Run ACTION-IF-FALSE otherwise.
1870 # This test uses sys.hexversion instead of the string equivalent (first
1871 # word of sys.version), in order to cope with versions such as 2.2c1.
1872 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1873 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1874  [prog="import sys
1875 # split strings by '.' and convert to numeric.  Append some zeros
1876 # because we need at least 4 digits for the hex conversion.
1877 # map returns an iterator in Python 3.0 and a list in 2.x
1878 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1879 minverhex = 0
1880 # xrange is not present in Python 3.0 and range returns an iterator
1881 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1882 sys.exit(sys.hexversion < minverhex)"
1883   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1884
1885 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1886 #
1887 # This file is free software; the Free Software Foundation
1888 # gives unlimited permission to copy and/or distribute it,
1889 # with or without modifications, as long as this notice is preserved.
1890
1891 # AM_RUN_LOG(COMMAND)
1892 # -------------------
1893 # Run COMMAND, save the exit status in ac_status, and log it.
1894 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1895 AC_DEFUN([AM_RUN_LOG],
1896 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1897    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1898    ac_status=$?
1899    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1900    (exit $ac_status); }])
1901
1902 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1903
1904 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
1905 #
1906 # This file is free software; the Free Software Foundation
1907 # gives unlimited permission to copy and/or distribute it,
1908 # with or without modifications, as long as this notice is preserved.
1909
1910 # AM_SANITY_CHECK
1911 # ---------------
1912 AC_DEFUN([AM_SANITY_CHECK],
1913 [AC_MSG_CHECKING([whether build environment is sane])
1914 # Reject unsafe characters in $srcdir or the absolute working directory
1915 # name.  Accept space and tab only in the latter.
1916 am_lf='
1917 '
1918 case `pwd` in
1919   *[[\\\"\#\$\&\'\`$am_lf]]*)
1920     AC_MSG_ERROR([unsafe absolute working directory name]);;
1921 esac
1922 case $srcdir in
1923   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1924     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1925 esac
1926
1927 # Do 'set' in a subshell so we don't clobber the current shell's
1928 # arguments.  Must try -L first in case configure is actually a
1929 # symlink; some systems play weird games with the mod time of symlinks
1930 # (eg FreeBSD returns the mod time of the symlink's containing
1931 # directory).
1932 if (
1933    am_has_slept=no
1934    for am_try in 1 2; do
1935      echo "timestamp, slept: $am_has_slept" > conftest.file
1936      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1937      if test "$[*]" = "X"; then
1938         # -L didn't work.
1939         set X `ls -t "$srcdir/configure" conftest.file`
1940      fi
1941      if test "$[*]" != "X $srcdir/configure conftest.file" \
1942         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1943
1944         # If neither matched, then we have a broken ls.  This can happen
1945         # if, for instance, CONFIG_SHELL is bash and it inherits a
1946         # broken ls alias from the environment.  This has actually
1947         # happened.  Such a system could not be considered "sane".
1948         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1949   alias in your environment])
1950      fi
1951      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1952        break
1953      fi
1954      # Just in case.
1955      sleep 1
1956      am_has_slept=yes
1957    done
1958    test "$[2]" = conftest.file
1959    )
1960 then
1961    # Ok.
1962    :
1963 else
1964    AC_MSG_ERROR([newly created file is older than distributed files!
1965 Check your system clock])
1966 fi
1967 AC_MSG_RESULT([yes])
1968 # If we didn't sleep, we still need to ensure time stamps of config.status and
1969 # generated files are strictly newer.
1970 am_sleep_pid=
1971 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1972   ( sleep 1 ) &
1973   am_sleep_pid=$!
1974 fi
1975 AC_CONFIG_COMMANDS_PRE(
1976   [AC_MSG_CHECKING([that generated files are newer than configure])
1977    if test -n "$am_sleep_pid"; then
1978      # Hide warnings about reused PIDs.
1979      wait $am_sleep_pid 2>/dev/null
1980    fi
1981    AC_MSG_RESULT([done])])
1982 rm -f conftest.file
1983 ])
1984
1985 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
1986 #
1987 # This file is free software; the Free Software Foundation
1988 # gives unlimited permission to copy and/or distribute it,
1989 # with or without modifications, as long as this notice is preserved.
1990
1991 # AM_SILENT_RULES([DEFAULT])
1992 # --------------------------
1993 # Enable less verbose build rules; with the default set to DEFAULT
1994 # ("yes" being less verbose, "no" or empty being verbose).
1995 AC_DEFUN([AM_SILENT_RULES],
1996 [AC_ARG_ENABLE([silent-rules], [dnl
1997 AS_HELP_STRING(
1998   [--enable-silent-rules],
1999   [less verbose build output (undo: "make V=1")])
2000 AS_HELP_STRING(
2001   [--disable-silent-rules],
2002   [verbose build output (undo: "make V=0")])dnl
2003 ])
2004 case $enable_silent_rules in @%:@ (((
2005   yes) AM_DEFAULT_VERBOSITY=0;;
2006    no) AM_DEFAULT_VERBOSITY=1;;
2007     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2008 esac
2009 dnl
2010 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2011 dnl do not support nested variable expansions.
2012 dnl See automake bug#9928 and bug#10237.
2013 am_make=${MAKE-make}
2014 AC_CACHE_CHECK([whether $am_make supports nested variables],
2015    [am_cv_make_support_nested_variables],
2016    [if AS_ECHO([['TRUE=$(BAR$(V))
2017 BAR0=false
2018 BAR1=true
2019 V=1
2020 am__doit:
2021         @$(TRUE)
2022 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2023   am_cv_make_support_nested_variables=yes
2024 else
2025   am_cv_make_support_nested_variables=no
2026 fi])
2027 if test $am_cv_make_support_nested_variables = yes; then
2028   dnl Using '$V' instead of '$(V)' breaks IRIX make.
2029   AM_V='$(V)'
2030   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2031 else
2032   AM_V=$AM_DEFAULT_VERBOSITY
2033   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2034 fi
2035 AC_SUBST([AM_V])dnl
2036 AM_SUBST_NOTMAKE([AM_V])dnl
2037 AC_SUBST([AM_DEFAULT_V])dnl
2038 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2039 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2040 AM_BACKSLASH='\'
2041 AC_SUBST([AM_BACKSLASH])dnl
2042 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2043 ])
2044
2045 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2046 #
2047 # This file is free software; the Free Software Foundation
2048 # gives unlimited permission to copy and/or distribute it,
2049 # with or without modifications, as long as this notice is preserved.
2050
2051 # AM_PROG_INSTALL_STRIP
2052 # ---------------------
2053 # One issue with vendor 'install' (even GNU) is that you can't
2054 # specify the program used to strip binaries.  This is especially
2055 # annoying in cross-compiling environments, where the build's strip
2056 # is unlikely to handle the host's binaries.
2057 # Fortunately install-sh will honor a STRIPPROG variable, so we
2058 # always use install-sh in "make install-strip", and initialize
2059 # STRIPPROG with the value of the STRIP variable (set by the user).
2060 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2061 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2062 # Installed binaries are usually stripped using 'strip' when the user
2063 # run "make install-strip".  However 'strip' might not be the right
2064 # tool to use in cross-compilation environments, therefore Automake
2065 # will honor the 'STRIP' environment variable to overrule this program.
2066 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2067 if test "$cross_compiling" != no; then
2068   AC_CHECK_TOOL([STRIP], [strip], :)
2069 fi
2070 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2071 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2072
2073 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
2074 #
2075 # This file is free software; the Free Software Foundation
2076 # gives unlimited permission to copy and/or distribute it,
2077 # with or without modifications, as long as this notice is preserved.
2078
2079 # _AM_SUBST_NOTMAKE(VARIABLE)
2080 # ---------------------------
2081 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2082 # This macro is traced by Automake.
2083 AC_DEFUN([_AM_SUBST_NOTMAKE])
2084
2085 # AM_SUBST_NOTMAKE(VARIABLE)
2086 # --------------------------
2087 # Public sister of _AM_SUBST_NOTMAKE.
2088 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2089
2090 # Check how to create a tarball.                            -*- Autoconf -*-
2091
2092 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
2093 #
2094 # This file is free software; the Free Software Foundation
2095 # gives unlimited permission to copy and/or distribute it,
2096 # with or without modifications, as long as this notice is preserved.
2097
2098 # _AM_PROG_TAR(FORMAT)
2099 # --------------------
2100 # Check how to create a tarball in format FORMAT.
2101 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2102 #
2103 # Substitute a variable $(am__tar) that is a command
2104 # writing to stdout a FORMAT-tarball containing the directory
2105 # $tardir.
2106 #     tardir=directory && $(am__tar) > result.tar
2107 #
2108 # Substitute a variable $(am__untar) that extract such
2109 # a tarball read from stdin.
2110 #     $(am__untar) < result.tar
2111 #
2112 AC_DEFUN([_AM_PROG_TAR],
2113 [# Always define AMTAR for backward compatibility.  Yes, it's still used
2114 # in the wild :-(  We should find a proper way to deprecate it ...
2115 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2116
2117 # We'll loop over all known methods to create a tar archive until one works.
2118 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2119
2120 m4_if([$1], [v7],
2121   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2122
2123   [m4_case([$1],
2124     [ustar],
2125      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2126       # There is notably a 21 bits limit for the UID and the GID.  In fact,
2127       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2128       # and bug#13588).
2129       am_max_uid=2097151 # 2^21 - 1
2130       am_max_gid=$am_max_uid
2131       # The $UID and $GID variables are not portable, so we need to resort
2132       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
2133       # below are definitely unexpected, so allow the users to see them
2134       # (that is, avoid stderr redirection).
2135       am_uid=`id -u || echo unknown`
2136       am_gid=`id -g || echo unknown`
2137       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2138       if test $am_uid -le $am_max_uid; then
2139          AC_MSG_RESULT([yes])
2140       else
2141          AC_MSG_RESULT([no])
2142          _am_tools=none
2143       fi
2144       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2145       if test $am_gid -le $am_max_gid; then
2146          AC_MSG_RESULT([yes])
2147       else
2148         AC_MSG_RESULT([no])
2149         _am_tools=none
2150       fi],
2151
2152   [pax],
2153     [],
2154
2155   [m4_fatal([Unknown tar format])])
2156
2157   AC_MSG_CHECKING([how to create a $1 tar archive])
2158
2159   # Go ahead even if we have the value already cached.  We do so because we
2160   # need to set the values for the 'am__tar' and 'am__untar' variables.
2161   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2162
2163   for _am_tool in $_am_tools; do
2164     case $_am_tool in
2165     gnutar)
2166       for _am_tar in tar gnutar gtar; do
2167         AM_RUN_LOG([$_am_tar --version]) && break
2168       done
2169       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2170       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2171       am__untar="$_am_tar -xf -"
2172       ;;
2173     plaintar)
2174       # Must skip GNU tar: if it does not support --format= it doesn't create
2175       # ustar tarball either.
2176       (tar --version) >/dev/null 2>&1 && continue
2177       am__tar='tar chf - "$$tardir"'
2178       am__tar_='tar chf - "$tardir"'
2179       am__untar='tar xf -'
2180       ;;
2181     pax)
2182       am__tar='pax -L -x $1 -w "$$tardir"'
2183       am__tar_='pax -L -x $1 -w "$tardir"'
2184       am__untar='pax -r'
2185       ;;
2186     cpio)
2187       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2188       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2189       am__untar='cpio -i -H $1 -d'
2190       ;;
2191     none)
2192       am__tar=false
2193       am__tar_=false
2194       am__untar=false
2195       ;;
2196     esac
2197
2198     # If the value was cached, stop now.  We just wanted to have am__tar
2199     # and am__untar set.
2200     test -n "${am_cv_prog_tar_$1}" && break
2201
2202     # tar/untar a dummy directory, and stop if the command works.
2203     rm -rf conftest.dir
2204     mkdir conftest.dir
2205     echo GrepMe > conftest.dir/file
2206     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2207     rm -rf conftest.dir
2208     if test -s conftest.tar; then
2209       AM_RUN_LOG([$am__untar <conftest.tar])
2210       AM_RUN_LOG([cat conftest.dir/file])
2211       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2212     fi
2213   done
2214   rm -rf conftest.dir
2215
2216   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2217   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2218
2219 AC_SUBST([am__tar])
2220 AC_SUBST([am__untar])
2221 ]) # _AM_PROG_TAR
2222
2223 m4_include([m4/as-ac-expand.m4])
2224 m4_include([m4/jhflags.m4])
2225 m4_include([m4/libtool.m4])
2226 m4_include([m4/ltoptions.m4])
2227 m4_include([m4/ltsugar.m4])
2228 m4_include([m4/ltversion.m4])
2229 m4_include([m4/lt~obsolete.m4])
2230 m4_include([m4/python.m4])