aclocal.m4 revision 891601f5
1# generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3# Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# Copyright (C) 2002-2014 Free Software Foundation, Inc.
24#
25# This file is free software; the Free Software Foundation
26# gives unlimited permission to copy and/or distribute it,
27# with or without modifications, as long as this notice is preserved.
28
29# AM_AUTOMAKE_VERSION(VERSION)
30# ----------------------------
31# Automake X.Y traces this macro to ensure aclocal.m4 has been
32# generated from the m4 files accompanying Automake X.Y.
33# (This private macro should not be called outside this file.)
34AC_DEFUN([AM_AUTOMAKE_VERSION],
35[am__api_version='1.15'
36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37dnl require some minimum version.  Point them to the right macro.
38m4_if([$1], [1.15], [],
39      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40])
41
42# _AM_AUTOCONF_VERSION(VERSION)
43# -----------------------------
44# aclocal traces this macro to find the Autoconf version.
45# This is a private macro too.  Using m4_define simplifies
46# the logic in aclocal, which can simply ignore this definition.
47m4_define([_AM_AUTOCONF_VERSION], [])
48
49# AM_SET_CURRENT_AUTOMAKE_VERSION
50# -------------------------------
51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54[AM_AUTOMAKE_VERSION([1.15])dnl
55m4_ifndef([AC_AUTOCONF_VERSION],
56  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
61# Copyright (C) 2001-2014 Free Software Foundation, Inc.
62#
63# This file is free software; the Free Software Foundation
64# gives unlimited permission to copy and/or distribute it,
65# with or without modifications, as long as this notice is preserved.
66
67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70#
71# Of course, Automake must honor this variable whenever it calls a
72# tool from the auxiliary directory.  The problem is that $srcdir (and
73# therefore $ac_aux_dir as well) can be either absolute or relative,
74# depending on how configure is run.  This is pretty annoying, since
75# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76# source directory, any form will work fine, but in subdirectories a
77# relative path needs to be adjusted first.
78#
79# $ac_aux_dir/missing
80#    fails when called from a subdirectory if $ac_aux_dir is relative
81# $top_srcdir/$ac_aux_dir/missing
82#    fails if $ac_aux_dir is absolute,
83#    fails when called from a subdirectory in a VPATH build with
84#          a relative $ac_aux_dir
85#
86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87# are both prefixed by $srcdir.  In an in-source build this is usually
88# harmless because $srcdir is '.', but things will broke when you
89# start a VPATH build or use an absolute $srcdir.
90#
91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94# and then we would define $MISSING as
95#   MISSING="\${SHELL} $am_aux_dir/missing"
96# This will work as long as MISSING is not called from configure, because
97# unfortunately $(top_srcdir) has no meaning in configure.
98# However there are other variables, like CC, which are often used in
99# configure, and could therefore not use this "fixed" $ac_aux_dir.
100#
101# Another solution, used here, is to always expand $ac_aux_dir to an
102# absolute PATH.  The drawback is that using absolute paths prevent a
103# configured tree to be moved without reconfiguration.
104
105AC_DEFUN([AM_AUX_DIR_EXPAND],
106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107# Expand $ac_aux_dir to an absolute path.
108am_aux_dir=`cd "$ac_aux_dir" && pwd`
109])
110
111# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113# Copyright (C) 1997-2014 Free Software Foundation, Inc.
114#
115# This file is free software; the Free Software Foundation
116# gives unlimited permission to copy and/or distribute it,
117# with or without modifications, as long as this notice is preserved.
118
119# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120# -------------------------------------
121# Define a conditional.
122AC_DEFUN([AM_CONDITIONAL],
123[AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126AC_SUBST([$1_TRUE])dnl
127AC_SUBST([$1_FALSE])dnl
128_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130m4_define([_AM_COND_VALUE_$1], [$2])dnl
131if $2; then
132  $1_TRUE=
133  $1_FALSE='#'
134else
135  $1_TRUE='#'
136  $1_FALSE=
137fi
138AC_CONFIG_COMMANDS_PRE(
139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140  AC_MSG_ERROR([[conditional "$1" was never defined.
141Usually this means the macro was only invoked conditionally.]])
142fi])])
143
144# Do all the work for Automake.                             -*- Autoconf -*-
145
146# Copyright (C) 1996-2014 Free Software Foundation, Inc.
147#
148# This file is free software; the Free Software Foundation
149# gives unlimited permission to copy and/or distribute it,
150# with or without modifications, as long as this notice is preserved.
151
152# This macro actually does too much.  Some checks are only needed if
153# your package does certain things.  But this isn't really a big deal.
154
155dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
156m4_define([AC_PROG_CC],
157m4_defn([AC_PROG_CC])
158[_AM_PROG_CC_C_O
159])
160
161# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
162# AM_INIT_AUTOMAKE([OPTIONS])
163# -----------------------------------------------
164# The call with PACKAGE and VERSION arguments is the old style
165# call (pre autoconf-2.50), which is being phased out.  PACKAGE
166# and VERSION should now be passed to AC_INIT and removed from
167# the call to AM_INIT_AUTOMAKE.
168# We support both call styles for the transition.  After
169# the next Automake release, Autoconf can make the AC_INIT
170# arguments mandatory, and then we can depend on a new Autoconf
171# release and drop the old call support.
172AC_DEFUN([AM_INIT_AUTOMAKE],
173[AC_PREREQ([2.65])dnl
174dnl Autoconf wants to disallow AM_ names.  We explicitly allow
175dnl the ones we care about.
176m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
177AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
178AC_REQUIRE([AC_PROG_INSTALL])dnl
179if test "`cd $srcdir && pwd`" != "`pwd`"; then
180  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
181  # is not polluted with repeated "-I."
182  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
183  # test to see if srcdir already configured
184  if test -f $srcdir/config.status; then
185    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
186  fi
187fi
188
189# test whether we have cygpath
190if test -z "$CYGPATH_W"; then
191  if (cygpath --version) >/dev/null 2>/dev/null; then
192    CYGPATH_W='cygpath -w'
193  else
194    CYGPATH_W=echo
195  fi
196fi
197AC_SUBST([CYGPATH_W])
198
199# Define the identity of the package.
200dnl Distinguish between old-style and new-style calls.
201m4_ifval([$2],
202[AC_DIAGNOSE([obsolete],
203             [$0: two- and three-arguments forms are deprecated.])
204m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
205 AC_SUBST([PACKAGE], [$1])dnl
206 AC_SUBST([VERSION], [$2])],
207[_AM_SET_OPTIONS([$1])dnl
208dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
209m4_if(
210  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
211  [ok:ok],,
212  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
213 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
214 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
215
216_AM_IF_OPTION([no-define],,
217[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
218 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
219
220# Some tools Automake needs.
221AC_REQUIRE([AM_SANITY_CHECK])dnl
222AC_REQUIRE([AC_ARG_PROGRAM])dnl
223AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
224AM_MISSING_PROG([AUTOCONF], [autoconf])
225AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
226AM_MISSING_PROG([AUTOHEADER], [autoheader])
227AM_MISSING_PROG([MAKEINFO], [makeinfo])
228AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
229AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
230AC_REQUIRE([AC_PROG_MKDIR_P])dnl
231# For better backward compatibility.  To be removed once Automake 1.9.x
232# dies out for good.  For more background, see:
233# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
234# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
235AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
236# We need awk for the "check" target (and possibly the TAP driver).  The
237# system "awk" is bad on some platforms.
238AC_REQUIRE([AC_PROG_AWK])dnl
239AC_REQUIRE([AC_PROG_MAKE_SET])dnl
240AC_REQUIRE([AM_SET_LEADING_DOT])dnl
241_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
242	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
243			     [_AM_PROG_TAR([v7])])])
244_AM_IF_OPTION([no-dependencies],,
245[AC_PROVIDE_IFELSE([AC_PROG_CC],
246		  [_AM_DEPENDENCIES([CC])],
247		  [m4_define([AC_PROG_CC],
248			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
249AC_PROVIDE_IFELSE([AC_PROG_CXX],
250		  [_AM_DEPENDENCIES([CXX])],
251		  [m4_define([AC_PROG_CXX],
252			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
253AC_PROVIDE_IFELSE([AC_PROG_OBJC],
254		  [_AM_DEPENDENCIES([OBJC])],
255		  [m4_define([AC_PROG_OBJC],
256			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
257AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
258		  [_AM_DEPENDENCIES([OBJCXX])],
259		  [m4_define([AC_PROG_OBJCXX],
260			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
261])
262AC_REQUIRE([AM_SILENT_RULES])dnl
263dnl The testsuite driver may need to know about EXEEXT, so add the
264dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
265dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
266AC_CONFIG_COMMANDS_PRE(dnl
267[m4_provide_if([_AM_COMPILER_EXEEXT],
268  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
269
270# POSIX will say in a future version that running "rm -f" with no argument
271# is OK; and we want to be able to make that assumption in our Makefile
272# recipes.  So use an aggressive probe to check that the usage we want is
273# actually supported "in the wild" to an acceptable degree.
274# See automake bug#10828.
275# To make any issue more visible, cause the running configure to be aborted
276# by default if the 'rm' program in use doesn't match our expectations; the
277# user can still override this though.
278if rm -f && rm -fr && rm -rf; then : OK; else
279  cat >&2 <<'END'
280Oops!
281
282Your 'rm' program seems unable to run without file operands specified
283on the command line, even when the '-f' option is present.  This is contrary
284to the behaviour of most rm programs out there, and not conforming with
285the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
286
287Please tell bug-automake@gnu.org about your system, including the value
288of your $PATH and any error possibly output before this message.  This
289can help us improve future automake versions.
290
291END
292  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
293    echo 'Configuration will proceed anyway, since you have set the' >&2
294    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
295    echo >&2
296  else
297    cat >&2 <<'END'
298Aborting the configuration process, to ensure you take notice of the issue.
299
300You can download and install GNU coreutils to get an 'rm' implementation
301that behaves properly: <http://www.gnu.org/software/coreutils/>.
302
303If you want to complete the configuration process using your problematic
304'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
305to "yes", and re-run configure.
306
307END
308    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
309  fi
310fi
311dnl The trailing newline in this macro's definition is deliberate, for
312dnl backward compatibility and to allow trailing 'dnl'-style comments
313dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
314])
315
316dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
317dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
318dnl mangled by Autoconf and run in a shell conditional statement.
319m4_define([_AC_COMPILER_EXEEXT],
320m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
321
322# When config.status generates a header, we must update the stamp-h file.
323# This file resides in the same directory as the config header
324# that is generated.  The stamp files are numbered to have different names.
325
326# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
327# loop where config.status creates the headers, so we can generate
328# our stamp files there.
329AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
330[# Compute $1's index in $config_headers.
331_am_arg=$1
332_am_stamp_count=1
333for _am_header in $config_headers :; do
334  case $_am_header in
335    $_am_arg | $_am_arg:* )
336      break ;;
337    * )
338      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
339  esac
340done
341echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
342
343# Copyright (C) 2001-2014 Free Software Foundation, Inc.
344#
345# This file is free software; the Free Software Foundation
346# gives unlimited permission to copy and/or distribute it,
347# with or without modifications, as long as this notice is preserved.
348
349# AM_PROG_INSTALL_SH
350# ------------------
351# Define $install_sh.
352AC_DEFUN([AM_PROG_INSTALL_SH],
353[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
354if test x"${install_sh+set}" != xset; then
355  case $am_aux_dir in
356  *\ * | *\	*)
357    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
358  *)
359    install_sh="\${SHELL} $am_aux_dir/install-sh"
360  esac
361fi
362AC_SUBST([install_sh])])
363
364# Copyright (C) 2003-2014 Free Software Foundation, Inc.
365#
366# This file is free software; the Free Software Foundation
367# gives unlimited permission to copy and/or distribute it,
368# with or without modifications, as long as this notice is preserved.
369
370# Check whether the underlying file-system supports filenames
371# with a leading dot.  For instance MS-DOS doesn't.
372AC_DEFUN([AM_SET_LEADING_DOT],
373[rm -rf .tst 2>/dev/null
374mkdir .tst 2>/dev/null
375if test -d .tst; then
376  am__leading_dot=.
377else
378  am__leading_dot=_
379fi
380rmdir .tst 2>/dev/null
381AC_SUBST([am__leading_dot])])
382
383# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
384
385# Copyright (C) 1997-2014 Free Software Foundation, Inc.
386#
387# This file is free software; the Free Software Foundation
388# gives unlimited permission to copy and/or distribute it,
389# with or without modifications, as long as this notice is preserved.
390
391# AM_MISSING_PROG(NAME, PROGRAM)
392# ------------------------------
393AC_DEFUN([AM_MISSING_PROG],
394[AC_REQUIRE([AM_MISSING_HAS_RUN])
395$1=${$1-"${am_missing_run}$2"}
396AC_SUBST($1)])
397
398# AM_MISSING_HAS_RUN
399# ------------------
400# Define MISSING if not defined so far and test if it is modern enough.
401# If it is, set am_missing_run to use it, otherwise, to nothing.
402AC_DEFUN([AM_MISSING_HAS_RUN],
403[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
404AC_REQUIRE_AUX_FILE([missing])dnl
405if test x"${MISSING+set}" != xset; then
406  case $am_aux_dir in
407  *\ * | *\	*)
408    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
409  *)
410    MISSING="\${SHELL} $am_aux_dir/missing" ;;
411  esac
412fi
413# Use eval to expand $SHELL
414if eval "$MISSING --is-lightweight"; then
415  am_missing_run="$MISSING "
416else
417  am_missing_run=
418  AC_MSG_WARN(['missing' script is too old or missing])
419fi
420])
421
422# Helper functions for option handling.                     -*- Autoconf -*-
423
424# Copyright (C) 2001-2014 Free Software Foundation, Inc.
425#
426# This file is free software; the Free Software Foundation
427# gives unlimited permission to copy and/or distribute it,
428# with or without modifications, as long as this notice is preserved.
429
430# _AM_MANGLE_OPTION(NAME)
431# -----------------------
432AC_DEFUN([_AM_MANGLE_OPTION],
433[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
434
435# _AM_SET_OPTION(NAME)
436# --------------------
437# Set option NAME.  Presently that only means defining a flag for this option.
438AC_DEFUN([_AM_SET_OPTION],
439[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
440
441# _AM_SET_OPTIONS(OPTIONS)
442# ------------------------
443# OPTIONS is a space-separated list of Automake options.
444AC_DEFUN([_AM_SET_OPTIONS],
445[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
446
447# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
448# -------------------------------------------
449# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
450AC_DEFUN([_AM_IF_OPTION],
451[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
452
453# Copyright (C) 1999-2014 Free Software Foundation, Inc.
454#
455# This file is free software; the Free Software Foundation
456# gives unlimited permission to copy and/or distribute it,
457# with or without modifications, as long as this notice is preserved.
458
459
460# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
461# ---------------------------------------------------------------------------
462# Adds support for distributing Python modules and packages.  To
463# install modules, copy them to $(pythondir), using the python_PYTHON
464# automake variable.  To install a package with the same name as the
465# automake package, install to $(pkgpythondir), or use the
466# pkgpython_PYTHON automake variable.
467#
468# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
469# locations to install python extension modules (shared libraries).
470# Another macro is required to find the appropriate flags to compile
471# extension modules.
472#
473# If your package is configured with a different prefix to python,
474# users will have to add the install directory to the PYTHONPATH
475# environment variable, or create a .pth file (see the python
476# documentation for details).
477#
478# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
479# cause an error if the version of python installed on the system
480# doesn't meet the requirement.  MINIMUM-VERSION should consist of
481# numbers and dots only.
482AC_DEFUN([AM_PATH_PYTHON],
483 [
484  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
485  dnl supported. (2.0 was released on October 16, 2000).
486  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
487[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
488 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
489
490  AC_ARG_VAR([PYTHON], [the Python interpreter])
491
492  m4_if([$1],[],[
493    dnl No version check is needed.
494    # Find any Python interpreter.
495    if test -z "$PYTHON"; then
496      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
497    fi
498    am_display_PYTHON=python
499  ], [
500    dnl A version check is needed.
501    if test -n "$PYTHON"; then
502      # If the user set $PYTHON, use it and don't search something else.
503      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
504      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
505			      [AC_MSG_RESULT([yes])],
506			      [AC_MSG_RESULT([no])
507			       AC_MSG_ERROR([Python interpreter is too old])])
508      am_display_PYTHON=$PYTHON
509    else
510      # Otherwise, try each interpreter until we find one that satisfies
511      # VERSION.
512      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
513	[am_cv_pathless_PYTHON],[
514	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
515	  test "$am_cv_pathless_PYTHON" = none && break
516	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
517	done])
518      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
519      if test "$am_cv_pathless_PYTHON" = none; then
520	PYTHON=:
521      else
522        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
523      fi
524      am_display_PYTHON=$am_cv_pathless_PYTHON
525    fi
526  ])
527
528  if test "$PYTHON" = :; then
529  dnl Run any user-specified action, or abort.
530    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
531  else
532
533  dnl Query Python for its version number.  Getting [:3] seems to be
534  dnl the best way to do this; it's what "site.py" does in the standard
535  dnl library.
536
537  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
538    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
539  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
540
541  dnl Use the values of $prefix and $exec_prefix for the corresponding
542  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
543  dnl distinct variables so they can be overridden if need be.  However,
544  dnl general consensus is that you shouldn't need this ability.
545
546  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
547  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
548
549  dnl At times (like when building shared libraries) you may want
550  dnl to know which OS platform Python thinks this is.
551
552  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
553    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
554  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
555
556  # Just factor out some code duplication.
557  am_python_setup_sysconfig="\
558import sys
559# Prefer sysconfig over distutils.sysconfig, for better compatibility
560# with python 3.x.  See automake bug#10227.
561try:
562    import sysconfig
563except ImportError:
564    can_use_sysconfig = 0
565else:
566    can_use_sysconfig = 1
567# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
568# <https://github.com/pypa/virtualenv/issues/118>
569try:
570    from platform import python_implementation
571    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
572        can_use_sysconfig = 0
573except ImportError:
574    pass"
575
576  dnl Set up 4 directories:
577
578  dnl pythondir -- where to install python scripts.  This is the
579  dnl   site-packages directory, not the python standard library
580  dnl   directory like in previous automake betas.  This behavior
581  dnl   is more consistent with lispdir.m4 for example.
582  dnl Query distutils for this directory.
583  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
584    [am_cv_python_pythondir],
585    [if test "x$prefix" = xNONE
586     then
587       am_py_prefix=$ac_default_prefix
588     else
589       am_py_prefix=$prefix
590     fi
591     am_cv_python_pythondir=`$PYTHON -c "
592$am_python_setup_sysconfig
593if can_use_sysconfig:
594    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
595else:
596    from distutils import sysconfig
597    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
598sys.stdout.write(sitedir)"`
599     case $am_cv_python_pythondir in
600     $am_py_prefix*)
601       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
602       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
603       ;;
604     *)
605       case $am_py_prefix in
606         /usr|/System*) ;;
607         *)
608	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
609	  ;;
610       esac
611       ;;
612     esac
613    ])
614  AC_SUBST([pythondir], [$am_cv_python_pythondir])
615
616  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
617  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
618  dnl   more consistent with the rest of automake.
619
620  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
621
622  dnl pyexecdir -- directory for installing python extension modules
623  dnl   (shared libraries)
624  dnl Query distutils for this directory.
625  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
626    [am_cv_python_pyexecdir],
627    [if test "x$exec_prefix" = xNONE
628     then
629       am_py_exec_prefix=$am_py_prefix
630     else
631       am_py_exec_prefix=$exec_prefix
632     fi
633     am_cv_python_pyexecdir=`$PYTHON -c "
634$am_python_setup_sysconfig
635if can_use_sysconfig:
636    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
637else:
638    from distutils import sysconfig
639    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
640sys.stdout.write(sitedir)"`
641     case $am_cv_python_pyexecdir in
642     $am_py_exec_prefix*)
643       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
644       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
645       ;;
646     *)
647       case $am_py_exec_prefix in
648         /usr|/System*) ;;
649         *)
650	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
651	   ;;
652       esac
653       ;;
654     esac
655    ])
656  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
657
658  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
659
660  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
661
662  dnl Run any user-specified action.
663  $2
664  fi
665
666])
667
668
669# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
670# ---------------------------------------------------------------------------
671# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
672# Run ACTION-IF-FALSE otherwise.
673# This test uses sys.hexversion instead of the string equivalent (first
674# word of sys.version), in order to cope with versions such as 2.2c1.
675# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
676AC_DEFUN([AM_PYTHON_CHECK_VERSION],
677 [prog="import sys
678# split strings by '.' and convert to numeric.  Append some zeros
679# because we need at least 4 digits for the hex conversion.
680# map returns an iterator in Python 3.0 and a list in 2.x
681minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
682minverhex = 0
683# xrange is not present in Python 3.0 and range returns an iterator
684for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
685sys.exit(sys.hexversion < minverhex)"
686  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
687
688# Copyright (C) 2001-2014 Free Software Foundation, Inc.
689#
690# This file is free software; the Free Software Foundation
691# gives unlimited permission to copy and/or distribute it,
692# with or without modifications, as long as this notice is preserved.
693
694# AM_RUN_LOG(COMMAND)
695# -------------------
696# Run COMMAND, save the exit status in ac_status, and log it.
697# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
698AC_DEFUN([AM_RUN_LOG],
699[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
700   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
701   ac_status=$?
702   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
703   (exit $ac_status); }])
704
705# Check to make sure that the build environment is sane.    -*- Autoconf -*-
706
707# Copyright (C) 1996-2014 Free Software Foundation, Inc.
708#
709# This file is free software; the Free Software Foundation
710# gives unlimited permission to copy and/or distribute it,
711# with or without modifications, as long as this notice is preserved.
712
713# AM_SANITY_CHECK
714# ---------------
715AC_DEFUN([AM_SANITY_CHECK],
716[AC_MSG_CHECKING([whether build environment is sane])
717# Reject unsafe characters in $srcdir or the absolute working directory
718# name.  Accept space and tab only in the latter.
719am_lf='
720'
721case `pwd` in
722  *[[\\\"\#\$\&\'\`$am_lf]]*)
723    AC_MSG_ERROR([unsafe absolute working directory name]);;
724esac
725case $srcdir in
726  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
727    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
728esac
729
730# Do 'set' in a subshell so we don't clobber the current shell's
731# arguments.  Must try -L first in case configure is actually a
732# symlink; some systems play weird games with the mod time of symlinks
733# (eg FreeBSD returns the mod time of the symlink's containing
734# directory).
735if (
736   am_has_slept=no
737   for am_try in 1 2; do
738     echo "timestamp, slept: $am_has_slept" > conftest.file
739     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
740     if test "$[*]" = "X"; then
741	# -L didn't work.
742	set X `ls -t "$srcdir/configure" conftest.file`
743     fi
744     if test "$[*]" != "X $srcdir/configure conftest.file" \
745	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
746
747	# If neither matched, then we have a broken ls.  This can happen
748	# if, for instance, CONFIG_SHELL is bash and it inherits a
749	# broken ls alias from the environment.  This has actually
750	# happened.  Such a system could not be considered "sane".
751	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
752  alias in your environment])
753     fi
754     if test "$[2]" = conftest.file || test $am_try -eq 2; then
755       break
756     fi
757     # Just in case.
758     sleep 1
759     am_has_slept=yes
760   done
761   test "$[2]" = conftest.file
762   )
763then
764   # Ok.
765   :
766else
767   AC_MSG_ERROR([newly created file is older than distributed files!
768Check your system clock])
769fi
770AC_MSG_RESULT([yes])
771# If we didn't sleep, we still need to ensure time stamps of config.status and
772# generated files are strictly newer.
773am_sleep_pid=
774if grep 'slept: no' conftest.file >/dev/null 2>&1; then
775  ( sleep 1 ) &
776  am_sleep_pid=$!
777fi
778AC_CONFIG_COMMANDS_PRE(
779  [AC_MSG_CHECKING([that generated files are newer than configure])
780   if test -n "$am_sleep_pid"; then
781     # Hide warnings about reused PIDs.
782     wait $am_sleep_pid 2>/dev/null
783   fi
784   AC_MSG_RESULT([done])])
785rm -f conftest.file
786])
787
788# Copyright (C) 2009-2014 Free Software Foundation, Inc.
789#
790# This file is free software; the Free Software Foundation
791# gives unlimited permission to copy and/or distribute it,
792# with or without modifications, as long as this notice is preserved.
793
794# AM_SILENT_RULES([DEFAULT])
795# --------------------------
796# Enable less verbose build rules; with the default set to DEFAULT
797# ("yes" being less verbose, "no" or empty being verbose).
798AC_DEFUN([AM_SILENT_RULES],
799[AC_ARG_ENABLE([silent-rules], [dnl
800AS_HELP_STRING(
801  [--enable-silent-rules],
802  [less verbose build output (undo: "make V=1")])
803AS_HELP_STRING(
804  [--disable-silent-rules],
805  [verbose build output (undo: "make V=0")])dnl
806])
807case $enable_silent_rules in @%:@ (((
808  yes) AM_DEFAULT_VERBOSITY=0;;
809   no) AM_DEFAULT_VERBOSITY=1;;
810    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
811esac
812dnl
813dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
814dnl do not support nested variable expansions.
815dnl See automake bug#9928 and bug#10237.
816am_make=${MAKE-make}
817AC_CACHE_CHECK([whether $am_make supports nested variables],
818   [am_cv_make_support_nested_variables],
819   [if AS_ECHO([['TRUE=$(BAR$(V))
820BAR0=false
821BAR1=true
822V=1
823am__doit:
824	@$(TRUE)
825.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
826  am_cv_make_support_nested_variables=yes
827else
828  am_cv_make_support_nested_variables=no
829fi])
830if test $am_cv_make_support_nested_variables = yes; then
831  dnl Using '$V' instead of '$(V)' breaks IRIX make.
832  AM_V='$(V)'
833  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
834else
835  AM_V=$AM_DEFAULT_VERBOSITY
836  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
837fi
838AC_SUBST([AM_V])dnl
839AM_SUBST_NOTMAKE([AM_V])dnl
840AC_SUBST([AM_DEFAULT_V])dnl
841AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
842AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
843AM_BACKSLASH='\'
844AC_SUBST([AM_BACKSLASH])dnl
845_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
846])
847
848# Copyright (C) 2001-2014 Free Software Foundation, Inc.
849#
850# This file is free software; the Free Software Foundation
851# gives unlimited permission to copy and/or distribute it,
852# with or without modifications, as long as this notice is preserved.
853
854# AM_PROG_INSTALL_STRIP
855# ---------------------
856# One issue with vendor 'install' (even GNU) is that you can't
857# specify the program used to strip binaries.  This is especially
858# annoying in cross-compiling environments, where the build's strip
859# is unlikely to handle the host's binaries.
860# Fortunately install-sh will honor a STRIPPROG variable, so we
861# always use install-sh in "make install-strip", and initialize
862# STRIPPROG with the value of the STRIP variable (set by the user).
863AC_DEFUN([AM_PROG_INSTALL_STRIP],
864[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
865# Installed binaries are usually stripped using 'strip' when the user
866# run "make install-strip".  However 'strip' might not be the right
867# tool to use in cross-compilation environments, therefore Automake
868# will honor the 'STRIP' environment variable to overrule this program.
869dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
870if test "$cross_compiling" != no; then
871  AC_CHECK_TOOL([STRIP], [strip], :)
872fi
873INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
874AC_SUBST([INSTALL_STRIP_PROGRAM])])
875
876# Copyright (C) 2006-2014 Free Software Foundation, Inc.
877#
878# This file is free software; the Free Software Foundation
879# gives unlimited permission to copy and/or distribute it,
880# with or without modifications, as long as this notice is preserved.
881
882# _AM_SUBST_NOTMAKE(VARIABLE)
883# ---------------------------
884# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
885# This macro is traced by Automake.
886AC_DEFUN([_AM_SUBST_NOTMAKE])
887
888# AM_SUBST_NOTMAKE(VARIABLE)
889# --------------------------
890# Public sister of _AM_SUBST_NOTMAKE.
891AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
892
893# Check how to create a tarball.                            -*- Autoconf -*-
894
895# Copyright (C) 2004-2014 Free Software Foundation, Inc.
896#
897# This file is free software; the Free Software Foundation
898# gives unlimited permission to copy and/or distribute it,
899# with or without modifications, as long as this notice is preserved.
900
901# _AM_PROG_TAR(FORMAT)
902# --------------------
903# Check how to create a tarball in format FORMAT.
904# FORMAT should be one of 'v7', 'ustar', or 'pax'.
905#
906# Substitute a variable $(am__tar) that is a command
907# writing to stdout a FORMAT-tarball containing the directory
908# $tardir.
909#     tardir=directory && $(am__tar) > result.tar
910#
911# Substitute a variable $(am__untar) that extract such
912# a tarball read from stdin.
913#     $(am__untar) < result.tar
914#
915AC_DEFUN([_AM_PROG_TAR],
916[# Always define AMTAR for backward compatibility.  Yes, it's still used
917# in the wild :-(  We should find a proper way to deprecate it ...
918AC_SUBST([AMTAR], ['$${TAR-tar}'])
919
920# We'll loop over all known methods to create a tar archive until one works.
921_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
922
923m4_if([$1], [v7],
924  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
925
926  [m4_case([$1],
927    [ustar],
928     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
929      # There is notably a 21 bits limit for the UID and the GID.  In fact,
930      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
931      # and bug#13588).
932      am_max_uid=2097151 # 2^21 - 1
933      am_max_gid=$am_max_uid
934      # The $UID and $GID variables are not portable, so we need to resort
935      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
936      # below are definitely unexpected, so allow the users to see them
937      # (that is, avoid stderr redirection).
938      am_uid=`id -u || echo unknown`
939      am_gid=`id -g || echo unknown`
940      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
941      if test $am_uid -le $am_max_uid; then
942         AC_MSG_RESULT([yes])
943      else
944         AC_MSG_RESULT([no])
945         _am_tools=none
946      fi
947      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
948      if test $am_gid -le $am_max_gid; then
949         AC_MSG_RESULT([yes])
950      else
951        AC_MSG_RESULT([no])
952        _am_tools=none
953      fi],
954
955  [pax],
956    [],
957
958  [m4_fatal([Unknown tar format])])
959
960  AC_MSG_CHECKING([how to create a $1 tar archive])
961
962  # Go ahead even if we have the value already cached.  We do so because we
963  # need to set the values for the 'am__tar' and 'am__untar' variables.
964  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
965
966  for _am_tool in $_am_tools; do
967    case $_am_tool in
968    gnutar)
969      for _am_tar in tar gnutar gtar; do
970        AM_RUN_LOG([$_am_tar --version]) && break
971      done
972      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
973      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
974      am__untar="$_am_tar -xf -"
975      ;;
976    plaintar)
977      # Must skip GNU tar: if it does not support --format= it doesn't create
978      # ustar tarball either.
979      (tar --version) >/dev/null 2>&1 && continue
980      am__tar='tar chf - "$$tardir"'
981      am__tar_='tar chf - "$tardir"'
982      am__untar='tar xf -'
983      ;;
984    pax)
985      am__tar='pax -L -x $1 -w "$$tardir"'
986      am__tar_='pax -L -x $1 -w "$tardir"'
987      am__untar='pax -r'
988      ;;
989    cpio)
990      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
991      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
992      am__untar='cpio -i -H $1 -d'
993      ;;
994    none)
995      am__tar=false
996      am__tar_=false
997      am__untar=false
998      ;;
999    esac
1000
1001    # If the value was cached, stop now.  We just wanted to have am__tar
1002    # and am__untar set.
1003    test -n "${am_cv_prog_tar_$1}" && break
1004
1005    # tar/untar a dummy directory, and stop if the command works.
1006    rm -rf conftest.dir
1007    mkdir conftest.dir
1008    echo GrepMe > conftest.dir/file
1009    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1010    rm -rf conftest.dir
1011    if test -s conftest.tar; then
1012      AM_RUN_LOG([$am__untar <conftest.tar])
1013      AM_RUN_LOG([cat conftest.dir/file])
1014      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1015    fi
1016  done
1017  rm -rf conftest.dir
1018
1019  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1020  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1021
1022AC_SUBST([am__tar])
1023AC_SUBST([am__untar])
1024]) # _AM_PROG_TAR
1025
1026