Update automatically managed build utilities.
[xtoys] / aclocal.m4
CommitLineData
5bac47a2
MW
1# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5# Inc.
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
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# ===========================================================================
24# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
25# ===========================================================================
26#
27# SYNOPSIS
28#
29# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
30#
31# DESCRIPTION
32#
33# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
34# added in between.
35#
36# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
37# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
38# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
39# FLAG.
40#
41# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
42#
43# LICENSE
44#
45# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
46# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
47#
48# This program is free software: you can redistribute it and/or modify it
49# under the terms of the GNU General Public License as published by the
50# Free Software Foundation, either version 3 of the License, or (at your
51# option) any later version.
52#
53# This program is distributed in the hope that it will be useful, but
54# WITHOUT ANY WARRANTY; without even the implied warranty of
55# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
56# Public License for more details.
57#
58# You should have received a copy of the GNU General Public License along
59# with this program. If not, see <http://www.gnu.org/licenses/>.
60#
61# As a special exception, the respective Autoconf Macro's copyright owner
62# gives unlimited permission to copy, distribute and modify the configure
63# scripts that are the output of Autoconf when processing the Macro. You
64# need not follow the terms of the GNU General Public License when using
65# or distributing such scripts, even though portions of the text of the
66# Macro appear in them. The GNU General Public License (GPL) does govern
67# all other use of the material that constitutes the Autoconf Macro.
68#
69# This special exception to the GPL applies to versions of the Autoconf
70# Macro released by the Autoconf Archive. When you make and distribute a
71# modified version of the Autoconf Macro, you may extend this special
72# exception to the GPL to apply to your modified version as well.
73
74#serial 2
75
76AC_DEFUN([AX_APPEND_FLAG],
77[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
78AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
79AS_VAR_SET_IF(FLAGS,
80 [case " AS_VAR_GET(FLAGS) " in
81 *" $1 "*)
82 AC_RUN_LOG([: FLAGS already contains $1])
83 ;;
84 *)
85 AC_RUN_LOG([: FLAGS="$FLAGS $1"])
86 AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
87 ;;
88 esac],
89 [AS_VAR_SET(FLAGS,["$1"])])
90AS_VAR_POPDEF([FLAGS])dnl
91])dnl AX_APPEND_FLAG
92
93# ===========================================================================
94# http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html
95# ===========================================================================
96#
97# SYNOPSIS
98#
99# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
100# AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
101# AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
102#
103# DESCRIPTION
104#
105# Try to find a compiler option that enables most reasonable warnings.
106#
107# For the GNU compiler it will be -Wall (and -ansi -pedantic) The result
108# is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default.
109#
110# Currently this macro knows about the GCC, Solaris, Digital Unix, AIX,
111# HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and
112# Intel compilers. For a given compiler, the Fortran flags are much more
113# experimental than their C equivalents.
114#
115# - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS
116# - $2 add-value-if-not-found : nothing
117# - $3 action-if-found : add value to shellvariable
118# - $4 action-if-not-found : nothing
119#
120# NOTE: These macros depend on AX_APPEND_FLAG.
121#
122# LICENSE
123#
124# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
125# Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com>
126#
127# This program is free software; you can redistribute it and/or modify it
128# under the terms of the GNU General Public License as published by the
129# Free Software Foundation; either version 3 of the License, or (at your
130# option) any later version.
131#
132# This program is distributed in the hope that it will be useful, but
133# WITHOUT ANY WARRANTY; without even the implied warranty of
134# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
135# Public License for more details.
136#
137# You should have received a copy of the GNU General Public License along
138# with this program. If not, see <http://www.gnu.org/licenses/>.
139#
140# As a special exception, the respective Autoconf Macro's copyright owner
141# gives unlimited permission to copy, distribute and modify the configure
142# scripts that are the output of Autoconf when processing the Macro. You
143# need not follow the terms of the GNU General Public License when using
144# or distributing such scripts, even though portions of the text of the
145# Macro appear in them. The GNU General Public License (GPL) does govern
146# all other use of the material that constitutes the Autoconf Macro.
147#
148# This special exception to the GPL applies to versions of the Autoconf
149# Macro released by the Autoconf Archive. When you make and distribute a
150# modified version of the Autoconf Macro, you may extend this special
151# exception to the GPL to apply to your modified version as well.
152
153#serial 13
154
155AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
156AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
157AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
158AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
159VAR,[VAR="no, unknown"
160ac_save_[]FLAGS="$[]FLAGS"
161for ac_arg dnl
162in "-warn all % -warn all" dnl Intel
163 "-pedantic % -Wall" dnl GCC
164 "-xstrconst % -v" dnl Solaris C
165 "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
166 "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
167 "-ansi -ansiE % -fullwarn" dnl IRIX
168 "+ESlit % +w1" dnl HP-UX C
169 "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
170 "-h conform % -h msglevel 2" dnl Cray C (Unicos)
171 #
172do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
173 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
174 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
175done
176FLAGS="$ac_save_[]FLAGS"
177])
178AS_VAR_POPDEF([FLAGS])dnl
179case ".$VAR" in
180 .ok|.ok,*) m4_ifvaln($3,$3) ;;
181 .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
182 *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
183esac
184AS_VAR_POPDEF([VAR])dnl
185])dnl AX_FLAGS_WARN_ALL
186dnl implementation tactics:
187dnl the for-argument contains a list of options. The first part of
188dnl these does only exist to detect the compiler - usually it is
189dnl a global option to enable -ansi or -extrawarnings. All other
190dnl compilers will fail about it. That was needed since a lot of
191dnl compilers will give false positives for some option-syntax
192dnl like -Woption or -Xoption as they think of it is a pass-through
193dnl to later compile stages or something. The "%" is used as a
194dnl delimiter. A non-option comment can be given after "%%" marks
195dnl which will be shown but not added to the respective C/CXXFLAGS.
196
197AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
198AC_LANG_PUSH([C])
199AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
200AC_LANG_POP([C])
201])
202
203AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
204AC_LANG_PUSH([C++])
205AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
206AC_LANG_POP([C++])
207])
208
209AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
210AC_LANG_PUSH([Fortran])
211AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
212AC_LANG_POP([Fortran])
213])
214
215# ===========================================================================
216# http://www.gnu.org/software/autoconf-archive/ax_python_module.html
217# ===========================================================================
218#
219# SYNOPSIS
220#
221# AX_PYTHON_MODULE(modname[, fatal])
222#
223# DESCRIPTION
224#
225# Checks for Python module.
226#
227# If fatal is non-empty then absence of a module will trigger an error.
228#
229# LICENSE
230#
231# Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
232#
233# Copying and distribution of this file, with or without modification, are
234# permitted in any medium without royalty provided the copyright notice
235# and this notice are preserved. This file is offered as-is, without any
236# warranty.
237
238#serial 5
239
240AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
241AC_DEFUN([AX_PYTHON_MODULE],[
242 if test -z $PYTHON;
243 then
244 PYTHON="python"
245 fi
246 PYTHON_NAME=`basename $PYTHON`
247 AC_MSG_CHECKING($PYTHON_NAME module: $1)
248 $PYTHON -c "import $1" 2>/dev/null
249 if test $? -eq 0;
250 then
251 AC_MSG_RESULT(yes)
252 eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
253 else
254 AC_MSG_RESULT(no)
255 eval AS_TR_CPP(HAVE_PYMOD_$1)=no
256 #
257 if test -n "$2"
258 then
259 AC_MSG_ERROR(failed to find required module $1)
260 exit 1
261 fi
262 fi
263])
264
265dnl *@--NOTICE--@* Common File Distribution
266
267dnl --- *@-mdw_AUTO_VERSION-@* ---
268dnl
269dnl Author: Mark Wooding
270dnl
271dnl Synopsis: mdw_AUTO_VERSION
272dnl
273dnl Arguments: ---
274dnl
275dnl Use: Defines an m4 macro AUTO_VERSION which contains the current
276dnl version number, worked out in some clever way.
277
278AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...])
279m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([
280 ver=UNKNOWN
281 for pre in ./ config/; do
282 for post in "" .in; do
283 try=${pre}auto-version${post}
284 if test -x $try; then ver=$("$try"); break; fi
285 done
286 done
287 echo -n "$ver"
288]))])
289
290
291dnl *@--NOTICE--@* Common File Distribution
292
293dnl --- *@-mdw_SILENT_RULES-@* ---
294dnl
295dnl Author: Mark Wooding
296dnl
297dnl Synopsis: mdw_SILENT_RULES
298dnl
299dnl Arguments: ---
300dnl
301dnl Use: Enables the Automake `silent-rules' feature, if available.
302
303AC_DEFUN([mdw_SILENT_RULES], [
304 m4_ifdef([AM_SILENT_RULES], [
305 AM_SILENT_RULES([yes])
306 ], [
307 AC_SUBST([AM_DEFAULT_VERBOSITY], [1])
308 ])
309])
310
311
312# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
313# serial 1 (pkg-config-0.24)
314#
315# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
316#
317# This program is free software; you can redistribute it and/or modify
318# it under the terms of the GNU General Public License as published by
319# the Free Software Foundation; either version 2 of the License, or
320# (at your option) any later version.
321#
322# This program is distributed in the hope that it will be useful, but
323# WITHOUT ANY WARRANTY; without even the implied warranty of
324# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
325# General Public License for more details.
326#
327# You should have received a copy of the GNU General Public License
328# along with this program; if not, write to the Free Software
329# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
330#
331# As a special exception to the GNU General Public License, if you
332# distribute this file as part of a program that contains a
333# configuration script generated by Autoconf, you may include it under
334# the same distribution terms that you use for the rest of that program.
335
336# PKG_PROG_PKG_CONFIG([MIN-VERSION])
337# ----------------------------------
338AC_DEFUN([PKG_PROG_PKG_CONFIG],
339[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
340m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
341m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
342AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
343AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
344AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
345
346if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
347 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
348fi
349if test -n "$PKG_CONFIG"; then
350 _pkg_min_version=m4_default([$1], [0.9.0])
351 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
352 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
353 AC_MSG_RESULT([yes])
354 else
355 AC_MSG_RESULT([no])
356 PKG_CONFIG=""
357 fi
358fi[]dnl
359])# PKG_PROG_PKG_CONFIG
360
361# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
362#
363# Check to see whether a particular set of modules exists. Similar
364# to PKG_CHECK_MODULES(), but does not set variables or print errors.
365#
366# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
367# only at the first occurence in configure.ac, so if the first place
368# it's called might be skipped (such as if it is within an "if", you
369# have to call PKG_CHECK_EXISTS manually
370# --------------------------------------------------------------
371AC_DEFUN([PKG_CHECK_EXISTS],
372[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
373if test -n "$PKG_CONFIG" && \
374 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
375 m4_default([$2], [:])
376m4_ifvaln([$3], [else
377 $3])dnl
378fi])
379
380# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
381# ---------------------------------------------
382m4_define([_PKG_CONFIG],
383[if test -n "$$1"; then
384 pkg_cv_[]$1="$$1"
385 elif test -n "$PKG_CONFIG"; then
386 PKG_CHECK_EXISTS([$3],
387 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
388 test "x$?" != "x0" && pkg_failed=yes ],
389 [pkg_failed=yes])
390 else
391 pkg_failed=untried
392fi[]dnl
393])# _PKG_CONFIG
394
395# _PKG_SHORT_ERRORS_SUPPORTED
396# -----------------------------
397AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
398[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
399if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
400 _pkg_short_errors_supported=yes
401else
402 _pkg_short_errors_supported=no
403fi[]dnl
404])# _PKG_SHORT_ERRORS_SUPPORTED
405
406
407# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
408# [ACTION-IF-NOT-FOUND])
409#
410#
411# Note that if there is a possibility the first call to
412# PKG_CHECK_MODULES might not happen, you should be sure to include an
413# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
414#
415#
416# --------------------------------------------------------------
417AC_DEFUN([PKG_CHECK_MODULES],
418[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
419AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
420AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
421
422pkg_failed=no
423AC_MSG_CHECKING([for $1])
424
425_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
426_PKG_CONFIG([$1][_LIBS], [libs], [$2])
427
428m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
429and $1[]_LIBS to avoid the need to call pkg-config.
430See the pkg-config man page for more details.])
431
432if test $pkg_failed = yes; then
433 AC_MSG_RESULT([no])
434 _PKG_SHORT_ERRORS_SUPPORTED
435 if test $_pkg_short_errors_supported = yes; then
436 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
437 else
438 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
439 fi
440 # Put the nasty error message in config.log where it belongs
441 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
442
443 m4_default([$4], [AC_MSG_ERROR(
444[Package requirements ($2) were not met:
445
446$$1_PKG_ERRORS
447
448Consider adjusting the PKG_CONFIG_PATH environment variable if you
449installed software in a non-standard prefix.
450
451_PKG_TEXT])[]dnl
452 ])
453elif test $pkg_failed = untried; then
454 AC_MSG_RESULT([no])
455 m4_default([$4], [AC_MSG_FAILURE(
456[The pkg-config script could not be found or is too old. Make sure it
457is in your PATH or set the PKG_CONFIG environment variable to the full
458path to pkg-config.
459
460_PKG_TEXT
461
462To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
463 ])
464else
465 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
466 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
467 AC_MSG_RESULT([yes])
468 $3
469fi[]dnl
470])# PKG_CHECK_MODULES
471
472# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
473# Foundation, Inc.
474#
475# This file is free software; the Free Software Foundation
476# gives unlimited permission to copy and/or distribute it,
477# with or without modifications, as long as this notice is preserved.
478
479# serial 1
480
481# AM_AUTOMAKE_VERSION(VERSION)
482# ----------------------------
483# Automake X.Y traces this macro to ensure aclocal.m4 has been
484# generated from the m4 files accompanying Automake X.Y.
485# (This private macro should not be called outside this file.)
486AC_DEFUN([AM_AUTOMAKE_VERSION],
487[am__api_version='1.11'
488dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
489dnl require some minimum version. Point them to the right macro.
490m4_if([$1], [1.11.6], [],
491 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
492])
493
494# _AM_AUTOCONF_VERSION(VERSION)
495# -----------------------------
496# aclocal traces this macro to find the Autoconf version.
497# This is a private macro too. Using m4_define simplifies
498# the logic in aclocal, which can simply ignore this definition.
499m4_define([_AM_AUTOCONF_VERSION], [])
500
501# AM_SET_CURRENT_AUTOMAKE_VERSION
502# -------------------------------
503# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
504# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
505AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
506[AM_AUTOMAKE_VERSION([1.11.6])dnl
507m4_ifndef([AC_AUTOCONF_VERSION],
508 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
509_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
510
511# AM_AUX_DIR_EXPAND -*- Autoconf -*-
512
513# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
514#
515# This file is free software; the Free Software Foundation
516# gives unlimited permission to copy and/or distribute it,
517# with or without modifications, as long as this notice is preserved.
518
519# serial 1
520
521# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
522# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
523# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
524#
525# Of course, Automake must honor this variable whenever it calls a
526# tool from the auxiliary directory. The problem is that $srcdir (and
527# therefore $ac_aux_dir as well) can be either absolute or relative,
528# depending on how configure is run. This is pretty annoying, since
529# it makes $ac_aux_dir quite unusable in subdirectories: in the top
530# source directory, any form will work fine, but in subdirectories a
531# relative path needs to be adjusted first.
532#
533# $ac_aux_dir/missing
534# fails when called from a subdirectory if $ac_aux_dir is relative
535# $top_srcdir/$ac_aux_dir/missing
536# fails if $ac_aux_dir is absolute,
537# fails when called from a subdirectory in a VPATH build with
538# a relative $ac_aux_dir
539#
540# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
541# are both prefixed by $srcdir. In an in-source build this is usually
542# harmless because $srcdir is `.', but things will broke when you
543# start a VPATH build or use an absolute $srcdir.
544#
545# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
546# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
547# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
548# and then we would define $MISSING as
549# MISSING="\${SHELL} $am_aux_dir/missing"
550# This will work as long as MISSING is not called from configure, because
551# unfortunately $(top_srcdir) has no meaning in configure.
552# However there are other variables, like CC, which are often used in
553# configure, and could therefore not use this "fixed" $ac_aux_dir.
554#
555# Another solution, used here, is to always expand $ac_aux_dir to an
556# absolute PATH. The drawback is that using absolute paths prevent a
557# configured tree to be moved without reconfiguration.
558
559AC_DEFUN([AM_AUX_DIR_EXPAND],
560[dnl Rely on autoconf to set up CDPATH properly.
561AC_PREREQ([2.50])dnl
562# expand $ac_aux_dir to an absolute path
563am_aux_dir=`cd $ac_aux_dir && pwd`
564])
565
566# AM_CONDITIONAL -*- Autoconf -*-
567
568# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
569# Free Software Foundation, Inc.
570#
571# This file is free software; the Free Software Foundation
572# gives unlimited permission to copy and/or distribute it,
573# with or without modifications, as long as this notice is preserved.
574
575# serial 9
576
577# AM_CONDITIONAL(NAME, SHELL-CONDITION)
578# -------------------------------------
579# Define a conditional.
580AC_DEFUN([AM_CONDITIONAL],
581[AC_PREREQ(2.52)dnl
582 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
583 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
584AC_SUBST([$1_TRUE])dnl
585AC_SUBST([$1_FALSE])dnl
586_AM_SUBST_NOTMAKE([$1_TRUE])dnl
587_AM_SUBST_NOTMAKE([$1_FALSE])dnl
588m4_define([_AM_COND_VALUE_$1], [$2])dnl
589if $2; then
590 $1_TRUE=
591 $1_FALSE='#'
592else
593 $1_TRUE='#'
594 $1_FALSE=
595fi
596AC_CONFIG_COMMANDS_PRE(
597[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
598 AC_MSG_ERROR([[conditional "$1" was never defined.
599Usually this means the macro was only invoked conditionally.]])
600fi])])
601
602# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
603# 2010, 2011 Free Software Foundation, Inc.
604#
605# This file is free software; the Free Software Foundation
606# gives unlimited permission to copy and/or distribute it,
607# with or without modifications, as long as this notice is preserved.
608
609# serial 12
610
611# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
612# written in clear, in which case automake, when reading aclocal.m4,
613# will think it sees a *use*, and therefore will trigger all it's
614# C support machinery. Also note that it means that autoscan, seeing
615# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
616
617
618# _AM_DEPENDENCIES(NAME)
619# ----------------------
620# See how the compiler implements dependency checking.
621# NAME is "CC", "CXX", "GCJ", or "OBJC".
622# We try a few techniques and use that to set a single cache variable.
623#
624# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
625# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
626# dependency, and given that the user is not expected to run this macro,
627# just rely on AC_PROG_CC.
628AC_DEFUN([_AM_DEPENDENCIES],
629[AC_REQUIRE([AM_SET_DEPDIR])dnl
630AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
631AC_REQUIRE([AM_MAKE_INCLUDE])dnl
632AC_REQUIRE([AM_DEP_TRACK])dnl
633
634ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
635 [$1], CXX, [depcc="$CXX" am_compiler_list=],
636 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
637 [$1], UPC, [depcc="$UPC" am_compiler_list=],
638 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
639 [depcc="$$1" am_compiler_list=])
640
641AC_CACHE_CHECK([dependency style of $depcc],
642 [am_cv_$1_dependencies_compiler_type],
643[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
644 # We make a subdir and do the tests there. Otherwise we can end up
645 # making bogus files that we don't know about and never remove. For
646 # instance it was reported that on HP-UX the gcc test will end up
647 # making a dummy file named `D' -- because `-MD' means `put the output
648 # in D'.
649 rm -rf conftest.dir
650 mkdir conftest.dir
651 # Copy depcomp to subdir because otherwise we won't find it if we're
652 # using a relative directory.
653 cp "$am_depcomp" conftest.dir
654 cd conftest.dir
655 # We will build objects and dependencies in a subdirectory because
656 # it helps to detect inapplicable dependency modes. For instance
657 # both Tru64's cc and ICC support -MD to output dependencies as a
658 # side effect of compilation, but ICC will put the dependencies in
659 # the current directory while Tru64 will put them in the object
660 # directory.
661 mkdir sub
662
663 am_cv_$1_dependencies_compiler_type=none
664 if test "$am_compiler_list" = ""; then
665 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
666 fi
667 am__universal=false
668 m4_case([$1], [CC],
669 [case " $depcc " in #(
670 *\ -arch\ *\ -arch\ *) am__universal=true ;;
671 esac],
672 [CXX],
673 [case " $depcc " in #(
674 *\ -arch\ *\ -arch\ *) am__universal=true ;;
675 esac])
676
677 for depmode in $am_compiler_list; do
678 # Setup a source with many dependencies, because some compilers
679 # like to wrap large dependency lists on column 80 (with \), and
680 # we should not choose a depcomp mode which is confused by this.
681 #
682 # We need to recreate these files for each test, as the compiler may
683 # overwrite some of them when testing with obscure command lines.
684 # This happens at least with the AIX C compiler.
685 : > sub/conftest.c
686 for i in 1 2 3 4 5 6; do
687 echo '#include "conftst'$i'.h"' >> sub/conftest.c
688 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
689 # Solaris 8's {/usr,}/bin/sh.
690 touch sub/conftst$i.h
691 done
692 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
693
694 # We check with `-c' and `-o' for the sake of the "dashmstdout"
695 # mode. It turns out that the SunPro C++ compiler does not properly
696 # handle `-M -o', and we need to detect this. Also, some Intel
697 # versions had trouble with output in subdirs
698 am__obj=sub/conftest.${OBJEXT-o}
699 am__minus_obj="-o $am__obj"
700 case $depmode in
701 gcc)
702 # This depmode causes a compiler race in universal mode.
703 test "$am__universal" = false || continue
704 ;;
705 nosideeffect)
706 # after this tag, mechanisms are not by side-effect, so they'll
707 # only be used when explicitly requested
708 if test "x$enable_dependency_tracking" = xyes; then
709 continue
710 else
711 break
712 fi
713 ;;
714 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
715 # This compiler won't grok `-c -o', but also, the minuso test has
716 # not run yet. These depmodes are late enough in the game, and
717 # so weak that their functioning should not be impacted.
718 am__obj=conftest.${OBJEXT-o}
719 am__minus_obj=
720 ;;
721 none) break ;;
722 esac
723 if depmode=$depmode \
724 source=sub/conftest.c object=$am__obj \
725 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
726 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
727 >/dev/null 2>conftest.err &&
728 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
729 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
730 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
731 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
732 # icc doesn't choke on unknown options, it will just issue warnings
733 # or remarks (even with -Werror). So we grep stderr for any message
734 # that says an option was ignored or not supported.
735 # When given -MP, icc 7.0 and 7.1 complain thusly:
736 # icc: Command line warning: ignoring option '-M'; no argument required
737 # The diagnosis changed in icc 8.0:
738 # icc: Command line remark: option '-MP' not supported
739 if (grep 'ignoring option' conftest.err ||
740 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
741 am_cv_$1_dependencies_compiler_type=$depmode
742 break
743 fi
744 fi
745 done
746
747 cd ..
748 rm -rf conftest.dir
749else
750 am_cv_$1_dependencies_compiler_type=none
751fi
752])
753AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
754AM_CONDITIONAL([am__fastdep$1], [
755 test "x$enable_dependency_tracking" != xno \
756 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
757])
758
759
760# AM_SET_DEPDIR
761# -------------
762# Choose a directory name for dependency files.
763# This macro is AC_REQUIREd in _AM_DEPENDENCIES
764AC_DEFUN([AM_SET_DEPDIR],
765[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
766AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
767])
768
769
770# AM_DEP_TRACK
771# ------------
772AC_DEFUN([AM_DEP_TRACK],
773[AC_ARG_ENABLE(dependency-tracking,
774[ --disable-dependency-tracking speeds up one-time build
775 --enable-dependency-tracking do not reject slow dependency extractors])
776if test "x$enable_dependency_tracking" != xno; then
777 am_depcomp="$ac_aux_dir/depcomp"
778 AMDEPBACKSLASH='\'
779 am__nodep='_no'
780fi
781AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
782AC_SUBST([AMDEPBACKSLASH])dnl
783_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
784AC_SUBST([am__nodep])dnl
785_AM_SUBST_NOTMAKE([am__nodep])dnl
786])
787
788# Generate code to set up dependency tracking. -*- Autoconf -*-
789
790# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
791# Free Software Foundation, Inc.
792#
793# This file is free software; the Free Software Foundation
794# gives unlimited permission to copy and/or distribute it,
795# with or without modifications, as long as this notice is preserved.
796
797#serial 5
798
799# _AM_OUTPUT_DEPENDENCY_COMMANDS
800# ------------------------------
801AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
802[{
803 # Autoconf 2.62 quotes --file arguments for eval, but not when files
804 # are listed without --file. Let's play safe and only enable the eval
805 # if we detect the quoting.
806 case $CONFIG_FILES in
807 *\'*) eval set x "$CONFIG_FILES" ;;
808 *) set x $CONFIG_FILES ;;
809 esac
810 shift
811 for mf
812 do
813 # Strip MF so we end up with the name of the file.
814 mf=`echo "$mf" | sed -e 's/:.*$//'`
815 # Check whether this is an Automake generated Makefile or not.
816 # We used to match only the files named `Makefile.in', but
817 # some people rename them; so instead we look at the file content.
818 # Grep'ing the first line is not enough: some people post-process
819 # each Makefile.in and add a new line on top of each file to say so.
820 # Grep'ing the whole file is not good either: AIX grep has a line
821 # limit of 2048, but all sed's we know have understand at least 4000.
822 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
823 dirpart=`AS_DIRNAME("$mf")`
824 else
825 continue
826 fi
827 # Extract the definition of DEPDIR, am__include, and am__quote
828 # from the Makefile without running `make'.
829 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
830 test -z "$DEPDIR" && continue
831 am__include=`sed -n 's/^am__include = //p' < "$mf"`
832 test -z "am__include" && continue
833 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
834 # When using ansi2knr, U may be empty or an underscore; expand it
835 U=`sed -n 's/^U = //p' < "$mf"`
836 # Find all dependency output files, they are included files with
837 # $(DEPDIR) in their names. We invoke sed twice because it is the
838 # simplest approach to changing $(DEPDIR) to its actual value in the
839 # expansion.
840 for file in `sed -n "
841 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
842 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
843 # Make sure the directory exists.
844 test -f "$dirpart/$file" && continue
845 fdir=`AS_DIRNAME(["$file"])`
846 AS_MKDIR_P([$dirpart/$fdir])
847 # echo "creating $dirpart/$file"
848 echo '# dummy' > "$dirpart/$file"
849 done
850 done
851}
852])# _AM_OUTPUT_DEPENDENCY_COMMANDS
853
854
855# AM_OUTPUT_DEPENDENCY_COMMANDS
856# -----------------------------
857# This macro should only be invoked once -- use via AC_REQUIRE.
858#
859# This code is only required when automatic dependency tracking
860# is enabled. FIXME. This creates each `.P' file that we will
861# need in order to bootstrap the dependency handling code.
862AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
863[AC_CONFIG_COMMANDS([depfiles],
864 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
865 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
866])
867
868# Do all the work for Automake. -*- Autoconf -*-
869
870# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
871# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
872#
873# This file is free software; the Free Software Foundation
874# gives unlimited permission to copy and/or distribute it,
875# with or without modifications, as long as this notice is preserved.
876
877# serial 16
878
879# This macro actually does too much. Some checks are only needed if
880# your package does certain things. But this isn't really a big deal.
881
882# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
883# AM_INIT_AUTOMAKE([OPTIONS])
884# -----------------------------------------------
885# The call with PACKAGE and VERSION arguments is the old style
886# call (pre autoconf-2.50), which is being phased out. PACKAGE
887# and VERSION should now be passed to AC_INIT and removed from
888# the call to AM_INIT_AUTOMAKE.
889# We support both call styles for the transition. After
890# the next Automake release, Autoconf can make the AC_INIT
891# arguments mandatory, and then we can depend on a new Autoconf
892# release and drop the old call support.
893AC_DEFUN([AM_INIT_AUTOMAKE],
894[AC_PREREQ([2.62])dnl
895dnl Autoconf wants to disallow AM_ names. We explicitly allow
896dnl the ones we care about.
897m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
898AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
899AC_REQUIRE([AC_PROG_INSTALL])dnl
900if test "`cd $srcdir && pwd`" != "`pwd`"; then
901 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
902 # is not polluted with repeated "-I."
903 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
904 # test to see if srcdir already configured
905 if test -f $srcdir/config.status; then
906 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
907 fi
908fi
909
910# test whether we have cygpath
911if test -z "$CYGPATH_W"; then
912 if (cygpath --version) >/dev/null 2>/dev/null; then
913 CYGPATH_W='cygpath -w'
914 else
915 CYGPATH_W=echo
916 fi
917fi
918AC_SUBST([CYGPATH_W])
919
920# Define the identity of the package.
921dnl Distinguish between old-style and new-style calls.
922m4_ifval([$2],
923[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
924 AC_SUBST([PACKAGE], [$1])dnl
925 AC_SUBST([VERSION], [$2])],
926[_AM_SET_OPTIONS([$1])dnl
927dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
928m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
929 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
930 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
931 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
932
933_AM_IF_OPTION([no-define],,
934[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
935 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
936
937# Some tools Automake needs.
938AC_REQUIRE([AM_SANITY_CHECK])dnl
939AC_REQUIRE([AC_ARG_PROGRAM])dnl
940AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
941AM_MISSING_PROG(AUTOCONF, autoconf)
942AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
943AM_MISSING_PROG(AUTOHEADER, autoheader)
944AM_MISSING_PROG(MAKEINFO, makeinfo)
945AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
946AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
947AC_REQUIRE([AM_PROG_MKDIR_P])dnl
948# We need awk for the "check" target. The system "awk" is bad on
949# some platforms.
950AC_REQUIRE([AC_PROG_AWK])dnl
951AC_REQUIRE([AC_PROG_MAKE_SET])dnl
952AC_REQUIRE([AM_SET_LEADING_DOT])dnl
953_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
954 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
955 [_AM_PROG_TAR([v7])])])
956_AM_IF_OPTION([no-dependencies],,
957[AC_PROVIDE_IFELSE([AC_PROG_CC],
958 [_AM_DEPENDENCIES(CC)],
959 [define([AC_PROG_CC],
960 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
961AC_PROVIDE_IFELSE([AC_PROG_CXX],
962 [_AM_DEPENDENCIES(CXX)],
963 [define([AC_PROG_CXX],
964 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
965AC_PROVIDE_IFELSE([AC_PROG_OBJC],
966 [_AM_DEPENDENCIES(OBJC)],
967 [define([AC_PROG_OBJC],
968 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
969])
970_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
971dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
972dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
973dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
974AC_CONFIG_COMMANDS_PRE(dnl
975[m4_provide_if([_AM_COMPILER_EXEEXT],
976 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
977])
978
979dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
980dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
981dnl mangled by Autoconf and run in a shell conditional statement.
982m4_define([_AC_COMPILER_EXEEXT],
983m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
984
985
986# When config.status generates a header, we must update the stamp-h file.
987# This file resides in the same directory as the config header
988# that is generated. The stamp files are numbered to have different names.
989
990# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
991# loop where config.status creates the headers, so we can generate
992# our stamp files there.
993AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
994[# Compute $1's index in $config_headers.
995_am_arg=$1
996_am_stamp_count=1
997for _am_header in $config_headers :; do
998 case $_am_header in
999 $_am_arg | $_am_arg:* )
1000 break ;;
1001 * )
1002 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1003 esac
1004done
1005echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1006
1007# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1008# Inc.
1009#
1010# This file is free software; the Free Software Foundation
1011# gives unlimited permission to copy and/or distribute it,
1012# with or without modifications, as long as this notice is preserved.
1013
1014# serial 1
1015
1016# AM_PROG_INSTALL_SH
1017# ------------------
1018# Define $install_sh.
1019AC_DEFUN([AM_PROG_INSTALL_SH],
1020[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1021if test x"${install_sh}" != xset; then
1022 case $am_aux_dir in
1023 *\ * | *\ *)
1024 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1025 *)
1026 install_sh="\${SHELL} $am_aux_dir/install-sh"
1027 esac
1028fi
1029AC_SUBST(install_sh)])
1030
1031# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1032#
1033# This file is free software; the Free Software Foundation
1034# gives unlimited permission to copy and/or distribute it,
1035# with or without modifications, as long as this notice is preserved.
1036
1037# serial 2
1038
1039# Check whether the underlying file-system supports filenames
1040# with a leading dot. For instance MS-DOS doesn't.
1041AC_DEFUN([AM_SET_LEADING_DOT],
1042[rm -rf .tst 2>/dev/null
1043mkdir .tst 2>/dev/null
1044if test -d .tst; then
1045 am__leading_dot=.
1046else
1047 am__leading_dot=_
1048fi
1049rmdir .tst 2>/dev/null
1050AC_SUBST([am__leading_dot])])
1051
1052# Check to see how 'make' treats includes. -*- Autoconf -*-
1053
1054# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1055#
1056# This file is free software; the Free Software Foundation
1057# gives unlimited permission to copy and/or distribute it,
1058# with or without modifications, as long as this notice is preserved.
1059
1060# serial 4
1061
1062# AM_MAKE_INCLUDE()
1063# -----------------
1064# Check to see how make treats includes.
1065AC_DEFUN([AM_MAKE_INCLUDE],
1066[am_make=${MAKE-make}
1067cat > confinc << 'END'
1068am__doit:
1069 @echo this is the am__doit target
1070.PHONY: am__doit
1071END
1072# If we don't find an include directive, just comment out the code.
1073AC_MSG_CHECKING([for style of include used by $am_make])
1074am__include="#"
1075am__quote=
1076_am_result=none
1077# First try GNU make style include.
1078echo "include confinc" > confmf
1079# Ignore all kinds of additional output from `make'.
1080case `$am_make -s -f confmf 2> /dev/null` in #(
1081*the\ am__doit\ target*)
1082 am__include=include
1083 am__quote=
1084 _am_result=GNU
1085 ;;
1086esac
1087# Now try BSD make style include.
1088if test "$am__include" = "#"; then
1089 echo '.include "confinc"' > confmf
1090 case `$am_make -s -f confmf 2> /dev/null` in #(
1091 *the\ am__doit\ target*)
1092 am__include=.include
1093 am__quote="\""
1094 _am_result=BSD
1095 ;;
1096 esac
1097fi
1098AC_SUBST([am__include])
1099AC_SUBST([am__quote])
1100AC_MSG_RESULT([$_am_result])
1101rm -f confinc confmf
1102])
1103
1104# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1105
1106# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1107# Free Software Foundation, Inc.
1108#
1109# This file is free software; the Free Software Foundation
1110# gives unlimited permission to copy and/or distribute it,
1111# with or without modifications, as long as this notice is preserved.
1112
1113# serial 6
1114
1115# AM_MISSING_PROG(NAME, PROGRAM)
1116# ------------------------------
1117AC_DEFUN([AM_MISSING_PROG],
1118[AC_REQUIRE([AM_MISSING_HAS_RUN])
1119$1=${$1-"${am_missing_run}$2"}
1120AC_SUBST($1)])
1121
1122
1123# AM_MISSING_HAS_RUN
1124# ------------------
1125# Define MISSING if not defined so far and test if it supports --run.
1126# If it does, set am_missing_run to use it, otherwise, to nothing.
1127AC_DEFUN([AM_MISSING_HAS_RUN],
1128[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1129AC_REQUIRE_AUX_FILE([missing])dnl
1130if test x"${MISSING+set}" != xset; then
1131 case $am_aux_dir in
1132 *\ * | *\ *)
1133 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1134 *)
1135 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1136 esac
1137fi
1138# Use eval to expand $SHELL
1139if eval "$MISSING --run true"; then
1140 am_missing_run="$MISSING --run "
1141else
1142 am_missing_run=
1143 AC_MSG_WARN([`missing' script is too old or missing])
1144fi
1145])
1146
1147# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1148# Inc.
1149#
1150# This file is free software; the Free Software Foundation
1151# gives unlimited permission to copy and/or distribute it,
1152# with or without modifications, as long as this notice is preserved.
1153
1154# serial 1
1155
1156# AM_PROG_MKDIR_P
1157# ---------------
1158# Check for `mkdir -p'.
1159AC_DEFUN([AM_PROG_MKDIR_P],
1160[AC_PREREQ([2.60])dnl
1161AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1162dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1163dnl while keeping a definition of mkdir_p for backward compatibility.
1164dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1165dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1166dnl Makefile.ins that do not define MKDIR_P, so we do our own
1167dnl adjustment using top_builddir (which is defined more often than
1168dnl MKDIR_P).
1169AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1170case $mkdir_p in
1171 [[\\/$]]* | ?:[[\\/]]*) ;;
1172 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1173esac
1174])
1175
1176# Helper functions for option handling. -*- Autoconf -*-
1177
1178# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
1179# Foundation, Inc.
1180#
1181# This file is free software; the Free Software Foundation
1182# gives unlimited permission to copy and/or distribute it,
1183# with or without modifications, as long as this notice is preserved.
1184
1185# serial 5
1186
1187# _AM_MANGLE_OPTION(NAME)
1188# -----------------------
1189AC_DEFUN([_AM_MANGLE_OPTION],
1190[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1191
1192# _AM_SET_OPTION(NAME)
1193# --------------------
1194# Set option NAME. Presently that only means defining a flag for this option.
1195AC_DEFUN([_AM_SET_OPTION],
1196[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1197
1198# _AM_SET_OPTIONS(OPTIONS)
1199# ------------------------
1200# OPTIONS is a space-separated list of Automake options.
1201AC_DEFUN([_AM_SET_OPTIONS],
1202[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1203
1204# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1205# -------------------------------------------
1206# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1207AC_DEFUN([_AM_IF_OPTION],
1208[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1209
1210# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
1211# 2011 Free Software Foundation, Inc.
1212#
1213# This file is free software; the Free Software Foundation
1214# gives unlimited permission to copy and/or distribute it,
1215# with or without modifications, as long as this notice is preserved.
1216
1217# serial 2
1218
1219# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1220# ---------------------------------------------------------------------------
1221# Adds support for distributing Python modules and packages. To
1222# install modules, copy them to $(pythondir), using the python_PYTHON
1223# automake variable. To install a package with the same name as the
1224# automake package, install to $(pkgpythondir), or use the
1225# pkgpython_PYTHON automake variable.
1226#
1227# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1228# locations to install python extension modules (shared libraries).
1229# Another macro is required to find the appropriate flags to compile
1230# extension modules.
1231#
1232# If your package is configured with a different prefix to python,
1233# users will have to add the install directory to the PYTHONPATH
1234# environment variable, or create a .pth file (see the python
1235# documentation for details).
1236#
1237# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1238# cause an error if the version of python installed on the system
1239# doesn't meet the requirement. MINIMUM-VERSION should consist of
1240# numbers and dots only.
1241AC_DEFUN([AM_PATH_PYTHON],
1242 [
1243 dnl Find a Python interpreter. Python versions prior to 2.0 are not
1244 dnl supported. (2.0 was released on October 16, 2000).
1245 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1246[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
1247 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1248
1249 AC_ARG_VAR([PYTHON], [the Python interpreter])
1250
1251 m4_if([$1],[],[
1252 dnl No version check is needed.
1253 # Find any Python interpreter.
1254 if test -z "$PYTHON"; then
1255 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1256 fi
1257 am_display_PYTHON=python
1258 ], [
1259 dnl A version check is needed.
1260 if test -n "$PYTHON"; then
1261 # If the user set $PYTHON, use it and don't search something else.
1262 AC_MSG_CHECKING([whether $PYTHON version >= $1])
1263 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1264 [AC_MSG_RESULT(yes)],
1265 [AC_MSG_ERROR(too old)])
1266 am_display_PYTHON=$PYTHON
1267 else
1268 # Otherwise, try each interpreter until we find one that satisfies
1269 # VERSION.
1270 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1271 [am_cv_pathless_PYTHON],[
1272 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1273 test "$am_cv_pathless_PYTHON" = none && break
1274 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1275 done])
1276 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1277 if test "$am_cv_pathless_PYTHON" = none; then
1278 PYTHON=:
1279 else
1280 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1281 fi
1282 am_display_PYTHON=$am_cv_pathless_PYTHON
1283 fi
1284 ])
1285
1286 if test "$PYTHON" = :; then
1287 dnl Run any user-specified action, or abort.
1288 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1289 else
1290
1291 dnl Query Python for its version number. Getting [:3] seems to be
1292 dnl the best way to do this; it's what "site.py" does in the standard
1293 dnl library.
1294
1295 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1296 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1297 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1298
1299 dnl Use the values of $prefix and $exec_prefix for the corresponding
1300 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1301 dnl distinct variables so they can be overridden if need be. However,
1302 dnl general consensus is that you shouldn't need this ability.
1303
1304 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1305 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1306
1307 dnl At times (like when building shared libraries) you may want
1308 dnl to know which OS platform Python thinks this is.
1309
1310 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1311 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1312 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1313
1314
1315 dnl Set up 4 directories:
1316
1317 dnl pythondir -- where to install python scripts. This is the
1318 dnl site-packages directory, not the python standard library
1319 dnl directory like in previous automake betas. This behavior
1320 dnl is more consistent with lispdir.m4 for example.
1321 dnl Query distutils for this directory.
1322 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1323 [am_cv_python_pythondir],
1324 [if test "x$prefix" = xNONE
1325 then
1326 am_py_prefix=$ac_default_prefix
1327 else
1328 am_py_prefix=$prefix
1329 fi
1330 am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
1331 case $am_cv_python_pythondir in
1332 $am_py_prefix*)
1333 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1334 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1335 ;;
1336 *)
1337 case $am_py_prefix in
1338 /usr|/System*) ;;
1339 *)
1340 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1341 ;;
1342 esac
1343 ;;
1344 esac
1345 ])
1346 AC_SUBST([pythondir], [$am_cv_python_pythondir])
1347
1348 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1349 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1350 dnl more consistent with the rest of automake.
1351
1352 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1353
1354 dnl pyexecdir -- directory for installing python extension modules
1355 dnl (shared libraries)
1356 dnl Query distutils for this directory.
1357 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1358 [am_cv_python_pyexecdir],
1359 [if test "x$exec_prefix" = xNONE
1360 then
1361 am_py_exec_prefix=$am_py_prefix
1362 else
1363 am_py_exec_prefix=$exec_prefix
1364 fi
1365 am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
1366 case $am_cv_python_pyexecdir in
1367 $am_py_exec_prefix*)
1368 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1369 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1370 ;;
1371 *)
1372 case $am_py_exec_prefix in
1373 /usr|/System*) ;;
1374 *)
1375 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1376 ;;
1377 esac
1378 ;;
1379 esac
1380 ])
1381 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1382
1383 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1384
1385 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1386
1387 dnl Run any user-specified action.
1388 $2
1389 fi
1390
1391])
1392
1393
1394# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1395# ---------------------------------------------------------------------------
1396# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1397# Run ACTION-IF-FALSE otherwise.
1398# This test uses sys.hexversion instead of the string equivalent (first
1399# word of sys.version), in order to cope with versions such as 2.2c1.
1400# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1401AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1402 [prog="import sys
1403# split strings by '.' and convert to numeric. Append some zeros
1404# because we need at least 4 digits for the hex conversion.
1405# map returns an iterator in Python 3.0 and a list in 2.x
1406minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1407minverhex = 0
1408# xrange is not present in Python 3.0 and range returns an iterator
1409for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1410sys.exit(sys.hexversion < minverhex)"
1411 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1412
1413# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1414#
1415# This file is free software; the Free Software Foundation
1416# gives unlimited permission to copy and/or distribute it,
1417# with or without modifications, as long as this notice is preserved.
1418
1419# serial 1
1420
1421# AM_RUN_LOG(COMMAND)
1422# -------------------
1423# Run COMMAND, save the exit status in ac_status, and log it.
1424# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1425AC_DEFUN([AM_RUN_LOG],
1426[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1427 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1428 ac_status=$?
1429 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1430 (exit $ac_status); }])
1431
1432# Check to make sure that the build environment is sane. -*- Autoconf -*-
1433
1434# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1435# Free Software Foundation, Inc.
1436#
1437# This file is free software; the Free Software Foundation
1438# gives unlimited permission to copy and/or distribute it,
1439# with or without modifications, as long as this notice is preserved.
1440
1441# serial 5
1442
1443# AM_SANITY_CHECK
1444# ---------------
1445AC_DEFUN([AM_SANITY_CHECK],
1446[AC_MSG_CHECKING([whether build environment is sane])
1447# Just in case
1448sleep 1
1449echo timestamp > conftest.file
1450# Reject unsafe characters in $srcdir or the absolute working directory
1451# name. Accept space and tab only in the latter.
1452am_lf='
1453'
1454case `pwd` in
1455 *[[\\\"\#\$\&\'\`$am_lf]]*)
1456 AC_MSG_ERROR([unsafe absolute working directory name]);;
1457esac
1458case $srcdir in
1459 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1460 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1461esac
1462
1463# Do `set' in a subshell so we don't clobber the current shell's
1464# arguments. Must try -L first in case configure is actually a
1465# symlink; some systems play weird games with the mod time of symlinks
1466# (eg FreeBSD returns the mod time of the symlink's containing
1467# directory).
1468if (
1469 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1470 if test "$[*]" = "X"; then
1471 # -L didn't work.
1472 set X `ls -t "$srcdir/configure" conftest.file`
1473 fi
1474 rm -f conftest.file
1475 if test "$[*]" != "X $srcdir/configure conftest.file" \
1476 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1477
1478 # If neither matched, then we have a broken ls. This can happen
1479 # if, for instance, CONFIG_SHELL is bash and it inherits a
1480 # broken ls alias from the environment. This has actually
1481 # happened. Such a system could not be considered "sane".
1482 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1483alias in your environment])
1484 fi
1485
1486 test "$[2]" = conftest.file
1487 )
1488then
1489 # Ok.
1490 :
1491else
1492 AC_MSG_ERROR([newly created file is older than distributed files!
1493Check your system clock])
1494fi
1495AC_MSG_RESULT(yes)])
1496
1497# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
1498#
1499# This file is free software; the Free Software Foundation
1500# gives unlimited permission to copy and/or distribute it,
1501# with or without modifications, as long as this notice is preserved.
1502
1503# serial 2
1504
1505# AM_SILENT_RULES([DEFAULT])
1506# --------------------------
1507# Enable less verbose build rules; with the default set to DEFAULT
1508# (`yes' being less verbose, `no' or empty being verbose).
1509AC_DEFUN([AM_SILENT_RULES],
1510[AC_ARG_ENABLE([silent-rules],
1511[ --enable-silent-rules less verbose build output (undo: `make V=1')
1512 --disable-silent-rules verbose build output (undo: `make V=0')])
1513case $enable_silent_rules in
1514yes) AM_DEFAULT_VERBOSITY=0;;
1515no) AM_DEFAULT_VERBOSITY=1;;
1516*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1517esac
1518dnl
1519dnl A few `make' implementations (e.g., NonStop OS and NextStep)
1520dnl do not support nested variable expansions.
1521dnl See automake bug#9928 and bug#10237.
1522am_make=${MAKE-make}
1523AC_CACHE_CHECK([whether $am_make supports nested variables],
1524 [am_cv_make_support_nested_variables],
1525 [if AS_ECHO([['TRUE=$(BAR$(V))
1526BAR0=false
1527BAR1=true
1528V=1
1529am__doit:
1530 @$(TRUE)
1531.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1532 am_cv_make_support_nested_variables=yes
1533else
1534 am_cv_make_support_nested_variables=no
1535fi])
1536if test $am_cv_make_support_nested_variables = yes; then
1537 dnl Using `$V' instead of `$(V)' breaks IRIX make.
1538 AM_V='$(V)'
1539 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1540else
1541 AM_V=$AM_DEFAULT_VERBOSITY
1542 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1543fi
1544AC_SUBST([AM_V])dnl
1545AM_SUBST_NOTMAKE([AM_V])dnl
1546AC_SUBST([AM_DEFAULT_V])dnl
1547AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1548AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1549AM_BACKSLASH='\'
1550AC_SUBST([AM_BACKSLASH])dnl
1551_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1552])
1553
1554# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1555#
1556# This file is free software; the Free Software Foundation
1557# gives unlimited permission to copy and/or distribute it,
1558# with or without modifications, as long as this notice is preserved.
1559
1560# serial 1
1561
1562# AM_PROG_INSTALL_STRIP
1563# ---------------------
1564# One issue with vendor `install' (even GNU) is that you can't
1565# specify the program used to strip binaries. This is especially
1566# annoying in cross-compiling environments, where the build's strip
1567# is unlikely to handle the host's binaries.
1568# Fortunately install-sh will honor a STRIPPROG variable, so we
1569# always use install-sh in `make install-strip', and initialize
1570# STRIPPROG with the value of the STRIP variable (set by the user).
1571AC_DEFUN([AM_PROG_INSTALL_STRIP],
1572[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1573# Installed binaries are usually stripped using `strip' when the user
1574# run `make install-strip'. However `strip' might not be the right
1575# tool to use in cross-compilation environments, therefore Automake
1576# will honor the `STRIP' environment variable to overrule this program.
1577dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1578if test "$cross_compiling" != no; then
1579 AC_CHECK_TOOL([STRIP], [strip], :)
1580fi
1581INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1582AC_SUBST([INSTALL_STRIP_PROGRAM])])
1583
1584# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1585#
1586# This file is free software; the Free Software Foundation
1587# gives unlimited permission to copy and/or distribute it,
1588# with or without modifications, as long as this notice is preserved.
1589
1590# serial 3
1591
1592# _AM_SUBST_NOTMAKE(VARIABLE)
1593# ---------------------------
1594# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1595# This macro is traced by Automake.
1596AC_DEFUN([_AM_SUBST_NOTMAKE])
1597
1598# AM_SUBST_NOTMAKE(VARIABLE)
1599# --------------------------
1600# Public sister of _AM_SUBST_NOTMAKE.
1601AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1602
1603# Check how to create a tarball. -*- Autoconf -*-
1604
1605# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1606#
1607# This file is free software; the Free Software Foundation
1608# gives unlimited permission to copy and/or distribute it,
1609# with or without modifications, as long as this notice is preserved.
1610
1611# serial 2
1612
1613# _AM_PROG_TAR(FORMAT)
1614# --------------------
1615# Check how to create a tarball in format FORMAT.
1616# FORMAT should be one of `v7', `ustar', or `pax'.
1617#
1618# Substitute a variable $(am__tar) that is a command
1619# writing to stdout a FORMAT-tarball containing the directory
1620# $tardir.
1621# tardir=directory && $(am__tar) > result.tar
1622#
1623# Substitute a variable $(am__untar) that extract such
1624# a tarball read from stdin.
1625# $(am__untar) < result.tar
1626AC_DEFUN([_AM_PROG_TAR],
1627[# Always define AMTAR for backward compatibility. Yes, it's still used
1628# in the wild :-( We should find a proper way to deprecate it ...
1629AC_SUBST([AMTAR], ['$${TAR-tar}'])
1630m4_if([$1], [v7],
1631 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1632 [m4_case([$1], [ustar],, [pax],,
1633 [m4_fatal([Unknown tar format])])
1634AC_MSG_CHECKING([how to create a $1 tar archive])
1635# Loop over all known methods to create a tar archive until one works.
1636_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1637_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1638# Do not fold the above two line into one, because Tru64 sh and
1639# Solaris sh will not grok spaces in the rhs of `-'.
1640for _am_tool in $_am_tools
1641do
1642 case $_am_tool in
1643 gnutar)
1644 for _am_tar in tar gnutar gtar;
1645 do
1646 AM_RUN_LOG([$_am_tar --version]) && break
1647 done
1648 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1649 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1650 am__untar="$_am_tar -xf -"
1651 ;;
1652 plaintar)
1653 # Must skip GNU tar: if it does not support --format= it doesn't create
1654 # ustar tarball either.
1655 (tar --version) >/dev/null 2>&1 && continue
1656 am__tar='tar chf - "$$tardir"'
1657 am__tar_='tar chf - "$tardir"'
1658 am__untar='tar xf -'
1659 ;;
1660 pax)
1661 am__tar='pax -L -x $1 -w "$$tardir"'
1662 am__tar_='pax -L -x $1 -w "$tardir"'
1663 am__untar='pax -r'
1664 ;;
1665 cpio)
1666 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1667 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1668 am__untar='cpio -i -H $1 -d'
1669 ;;
1670 none)
1671 am__tar=false
1672 am__tar_=false
1673 am__untar=false
1674 ;;
1675 esac
1676
1677 # If the value was cached, stop now. We just wanted to have am__tar
1678 # and am__untar set.
1679 test -n "${am_cv_prog_tar_$1}" && break
1680
1681 # tar/untar a dummy directory, and stop if the command works
1682 rm -rf conftest.dir
1683 mkdir conftest.dir
1684 echo GrepMe > conftest.dir/file
1685 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1686 rm -rf conftest.dir
1687 if test -s conftest.tar; then
1688 AM_RUN_LOG([$am__untar <conftest.tar])
1689 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1690 fi
1691done
1692rm -rf conftest.dir
1693
1694AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1695AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1696AC_SUBST([am__tar])
1697AC_SUBST([am__untar])
1698]) # _AM_PROG_TAR
1699