source: trunk/icedtea-web/aclocal.m4@ 422

Last change on this file since 422 was 418, checked in by dmik, 13 years ago

Merge icedtea-web v1.3 to trunk.

File size: 40.1 KB
Line 
1# generated automatically by aclocal 1.11.3 -*- 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.68],,
18[m4_warning([this file was generated for autoconf 2.68.
19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
23# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
24# serial 1 (pkg-config-0.24)
25#
26# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
27#
28# This program is free software; you can redistribute it and/or modify
29# it under the terms of the GNU General Public License as published by
30# the Free Software Foundation; either version 2 of the License, or
31# (at your option) any later version.
32#
33# This program is distributed in the hope that it will be useful, but
34# WITHOUT ANY WARRANTY; without even the implied warranty of
35# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36# General Public License for more details.
37#
38# You should have received a copy of the GNU General Public License
39# along with this program; if not, write to the Free Software
40# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41#
42# As a special exception to the GNU General Public License, if you
43# distribute this file as part of a program that contains a
44# configuration script generated by Autoconf, you may include it under
45# the same distribution terms that you use for the rest of that program.
46
47# PKG_PROG_PKG_CONFIG([MIN-VERSION])
48# ----------------------------------
49AC_DEFUN([PKG_PROG_PKG_CONFIG],
50[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
51m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
52AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
53AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
54AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
55
56if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
57 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
58fi
59if test -n "$PKG_CONFIG"; then
60 _pkg_min_version=m4_default([$1], [0.9.0])
61 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
62 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
63 AC_MSG_RESULT([yes])
64 else
65 AC_MSG_RESULT([no])
66 PKG_CONFIG=""
67 fi
68fi[]dnl
69])# PKG_PROG_PKG_CONFIG
70
71# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
72#
73# Check to see whether a particular set of modules exists. Similar
74# to PKG_CHECK_MODULES(), but does not set variables or print errors.
75#
76# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
77# only at the first occurence in configure.ac, so if the first place
78# it's called might be skipped (such as if it is within an "if", you
79# have to call PKG_CHECK_EXISTS manually
80# --------------------------------------------------------------
81AC_DEFUN([PKG_CHECK_EXISTS],
82[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
83if test -n "$PKG_CONFIG" && \
84 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
85 m4_default([$2], [:])
86m4_ifvaln([$3], [else
87 $3])dnl
88fi])
89
90# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
91# ---------------------------------------------
92m4_define([_PKG_CONFIG],
93[if test -n "$$1"; then
94 pkg_cv_[]$1="$$1"
95 elif test -n "$PKG_CONFIG"; then
96 PKG_CHECK_EXISTS([$3],
97 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
98 [pkg_failed=yes])
99 else
100 pkg_failed=untried
101fi[]dnl
102])# _PKG_CONFIG
103
104# _PKG_SHORT_ERRORS_SUPPORTED
105# -----------------------------
106AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
107[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
108if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
109 _pkg_short_errors_supported=yes
110else
111 _pkg_short_errors_supported=no
112fi[]dnl
113])# _PKG_SHORT_ERRORS_SUPPORTED
114
115
116# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
117# [ACTION-IF-NOT-FOUND])
118#
119#
120# Note that if there is a possibility the first call to
121# PKG_CHECK_MODULES might not happen, you should be sure to include an
122# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
123#
124#
125# --------------------------------------------------------------
126AC_DEFUN([PKG_CHECK_MODULES],
127[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
128AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
129AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
130
131pkg_failed=no
132AC_MSG_CHECKING([for $1])
133
134_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
135_PKG_CONFIG([$1][_LIBS], [libs], [$2])
136
137m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
138and $1[]_LIBS to avoid the need to call pkg-config.
139See the pkg-config man page for more details.])
140
141if test $pkg_failed = yes; then
142 AC_MSG_RESULT([no])
143 _PKG_SHORT_ERRORS_SUPPORTED
144 if test $_pkg_short_errors_supported = yes; then
145 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
146 else
147 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
148 fi
149 # Put the nasty error message in config.log where it belongs
150 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
151
152 m4_default([$4], [AC_MSG_ERROR(
153[Package requirements ($2) were not met:
154
155$$1_PKG_ERRORS
156
157Consider adjusting the PKG_CONFIG_PATH environment variable if you
158installed software in a non-standard prefix.
159
160_PKG_TEXT])
161 ])
162elif test $pkg_failed = untried; then
163 AC_MSG_RESULT([no])
164 m4_default([$4], [AC_MSG_FAILURE(
165[The pkg-config script could not be found or is too old. Make sure it
166is in your PATH or set the PKG_CONFIG environment variable to the full
167path to pkg-config.
168
169_PKG_TEXT
170
171To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
172 ])
173else
174 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
175 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
176 AC_MSG_RESULT([yes])
177 $3
178fi[]dnl
179])# PKG_CHECK_MODULES
180
181# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
182# Foundation, Inc.
183#
184# This file is free software; the Free Software Foundation
185# gives unlimited permission to copy and/or distribute it,
186# with or without modifications, as long as this notice is preserved.
187
188# serial 1
189
190# AM_AUTOMAKE_VERSION(VERSION)
191# ----------------------------
192# Automake X.Y traces this macro to ensure aclocal.m4 has been
193# generated from the m4 files accompanying Automake X.Y.
194# (This private macro should not be called outside this file.)
195AC_DEFUN([AM_AUTOMAKE_VERSION],
196[am__api_version='1.11'
197dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
198dnl require some minimum version. Point them to the right macro.
199m4_if([$1], [1.11.3], [],
200 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
201])
202
203# _AM_AUTOCONF_VERSION(VERSION)
204# -----------------------------
205# aclocal traces this macro to find the Autoconf version.
206# This is a private macro too. Using m4_define simplifies
207# the logic in aclocal, which can simply ignore this definition.
208m4_define([_AM_AUTOCONF_VERSION], [])
209
210# AM_SET_CURRENT_AUTOMAKE_VERSION
211# -------------------------------
212# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
213# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
214AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
215[AM_AUTOMAKE_VERSION([1.11.3])dnl
216m4_ifndef([AC_AUTOCONF_VERSION],
217 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
218_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
219
220# AM_AUX_DIR_EXPAND -*- Autoconf -*-
221
222# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
223#
224# This file is free software; the Free Software Foundation
225# gives unlimited permission to copy and/or distribute it,
226# with or without modifications, as long as this notice is preserved.
227
228# serial 1
229
230# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
231# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
232# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
233#
234# Of course, Automake must honor this variable whenever it calls a
235# tool from the auxiliary directory. The problem is that $srcdir (and
236# therefore $ac_aux_dir as well) can be either absolute or relative,
237# depending on how configure is run. This is pretty annoying, since
238# it makes $ac_aux_dir quite unusable in subdirectories: in the top
239# source directory, any form will work fine, but in subdirectories a
240# relative path needs to be adjusted first.
241#
242# $ac_aux_dir/missing
243# fails when called from a subdirectory if $ac_aux_dir is relative
244# $top_srcdir/$ac_aux_dir/missing
245# fails if $ac_aux_dir is absolute,
246# fails when called from a subdirectory in a VPATH build with
247# a relative $ac_aux_dir
248#
249# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
250# are both prefixed by $srcdir. In an in-source build this is usually
251# harmless because $srcdir is `.', but things will broke when you
252# start a VPATH build or use an absolute $srcdir.
253#
254# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
255# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
256# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
257# and then we would define $MISSING as
258# MISSING="\${SHELL} $am_aux_dir/missing"
259# This will work as long as MISSING is not called from configure, because
260# unfortunately $(top_srcdir) has no meaning in configure.
261# However there are other variables, like CC, which are often used in
262# configure, and could therefore not use this "fixed" $ac_aux_dir.
263#
264# Another solution, used here, is to always expand $ac_aux_dir to an
265# absolute PATH. The drawback is that using absolute paths prevent a
266# configured tree to be moved without reconfiguration.
267
268AC_DEFUN([AM_AUX_DIR_EXPAND],
269[dnl Rely on autoconf to set up CDPATH properly.
270AC_PREREQ([2.50])dnl
271# expand $ac_aux_dir to an absolute path
272am_aux_dir=`cd $ac_aux_dir && pwd`
273])
274
275# AM_CONDITIONAL -*- Autoconf -*-
276
277# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
278# Free Software Foundation, Inc.
279#
280# This file is free software; the Free Software Foundation
281# gives unlimited permission to copy and/or distribute it,
282# with or without modifications, as long as this notice is preserved.
283
284# serial 9
285
286# AM_CONDITIONAL(NAME, SHELL-CONDITION)
287# -------------------------------------
288# Define a conditional.
289AC_DEFUN([AM_CONDITIONAL],
290[AC_PREREQ(2.52)dnl
291 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
292 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
293AC_SUBST([$1_TRUE])dnl
294AC_SUBST([$1_FALSE])dnl
295_AM_SUBST_NOTMAKE([$1_TRUE])dnl
296_AM_SUBST_NOTMAKE([$1_FALSE])dnl
297m4_define([_AM_COND_VALUE_$1], [$2])dnl
298if $2; then
299 $1_TRUE=
300 $1_FALSE='#'
301else
302 $1_TRUE='#'
303 $1_FALSE=
304fi
305AC_CONFIG_COMMANDS_PRE(
306[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
307 AC_MSG_ERROR([[conditional "$1" was never defined.
308Usually this means the macro was only invoked conditionally.]])
309fi])])
310
311# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
312# 2010, 2011 Free Software Foundation, Inc.
313#
314# This file is free software; the Free Software Foundation
315# gives unlimited permission to copy and/or distribute it,
316# with or without modifications, as long as this notice is preserved.
317
318# serial 12
319
320# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
321# written in clear, in which case automake, when reading aclocal.m4,
322# will think it sees a *use*, and therefore will trigger all it's
323# C support machinery. Also note that it means that autoscan, seeing
324# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
325
326
327# _AM_DEPENDENCIES(NAME)
328# ----------------------
329# See how the compiler implements dependency checking.
330# NAME is "CC", "CXX", "GCJ", or "OBJC".
331# We try a few techniques and use that to set a single cache variable.
332#
333# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
334# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
335# dependency, and given that the user is not expected to run this macro,
336# just rely on AC_PROG_CC.
337AC_DEFUN([_AM_DEPENDENCIES],
338[AC_REQUIRE([AM_SET_DEPDIR])dnl
339AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
340AC_REQUIRE([AM_MAKE_INCLUDE])dnl
341AC_REQUIRE([AM_DEP_TRACK])dnl
342
343ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
344 [$1], CXX, [depcc="$CXX" am_compiler_list=],
345 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
346 [$1], UPC, [depcc="$UPC" am_compiler_list=],
347 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
348 [depcc="$$1" am_compiler_list=])
349
350AC_CACHE_CHECK([dependency style of $depcc],
351 [am_cv_$1_dependencies_compiler_type],
352[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
353 # We make a subdir and do the tests there. Otherwise we can end up
354 # making bogus files that we don't know about and never remove. For
355 # instance it was reported that on HP-UX the gcc test will end up
356 # making a dummy file named `D' -- because `-MD' means `put the output
357 # in D'.
358 rm -rf conftest.dir
359 mkdir conftest.dir
360 # Copy depcomp to subdir because otherwise we won't find it if we're
361 # using a relative directory.
362 cp "$am_depcomp" conftest.dir
363 cd conftest.dir
364 # We will build objects and dependencies in a subdirectory because
365 # it helps to detect inapplicable dependency modes. For instance
366 # both Tru64's cc and ICC support -MD to output dependencies as a
367 # side effect of compilation, but ICC will put the dependencies in
368 # the current directory while Tru64 will put them in the object
369 # directory.
370 mkdir sub
371
372 am_cv_$1_dependencies_compiler_type=none
373 if test "$am_compiler_list" = ""; then
374 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
375 fi
376 am__universal=false
377 m4_case([$1], [CC],
378 [case " $depcc " in #(
379 *\ -arch\ *\ -arch\ *) am__universal=true ;;
380 esac],
381 [CXX],
382 [case " $depcc " in #(
383 *\ -arch\ *\ -arch\ *) am__universal=true ;;
384 esac])
385
386 for depmode in $am_compiler_list; do
387 # Setup a source with many dependencies, because some compilers
388 # like to wrap large dependency lists on column 80 (with \), and
389 # we should not choose a depcomp mode which is confused by this.
390 #
391 # We need to recreate these files for each test, as the compiler may
392 # overwrite some of them when testing with obscure command lines.
393 # This happens at least with the AIX C compiler.
394 : > sub/conftest.c
395 for i in 1 2 3 4 5 6; do
396 echo '#include "conftst'$i'.h"' >> sub/conftest.c
397 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
398 # Solaris 8's {/usr,}/bin/sh.
399 touch sub/conftst$i.h
400 done
401 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
402
403 # We check with `-c' and `-o' for the sake of the "dashmstdout"
404 # mode. It turns out that the SunPro C++ compiler does not properly
405 # handle `-M -o', and we need to detect this. Also, some Intel
406 # versions had trouble with output in subdirs
407 am__obj=sub/conftest.${OBJEXT-o}
408 am__minus_obj="-o $am__obj"
409 case $depmode in
410 gcc)
411 # This depmode causes a compiler race in universal mode.
412 test "$am__universal" = false || continue
413 ;;
414 nosideeffect)
415 # after this tag, mechanisms are not by side-effect, so they'll
416 # only be used when explicitly requested
417 if test "x$enable_dependency_tracking" = xyes; then
418 continue
419 else
420 break
421 fi
422 ;;
423 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
424 # This compiler won't grok `-c -o', but also, the minuso test has
425 # not run yet. These depmodes are late enough in the game, and
426 # so weak that their functioning should not be impacted.
427 am__obj=conftest.${OBJEXT-o}
428 am__minus_obj=
429 ;;
430 none) break ;;
431 esac
432 if depmode=$depmode \
433 source=sub/conftest.c object=$am__obj \
434 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
435 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
436 >/dev/null 2>conftest.err &&
437 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
438 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
439 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
440 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
441 # icc doesn't choke on unknown options, it will just issue warnings
442 # or remarks (even with -Werror). So we grep stderr for any message
443 # that says an option was ignored or not supported.
444 # When given -MP, icc 7.0 and 7.1 complain thusly:
445 # icc: Command line warning: ignoring option '-M'; no argument required
446 # The diagnosis changed in icc 8.0:
447 # icc: Command line remark: option '-MP' not supported
448 if (grep 'ignoring option' conftest.err ||
449 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
450 am_cv_$1_dependencies_compiler_type=$depmode
451 break
452 fi
453 fi
454 done
455
456 cd ..
457 rm -rf conftest.dir
458else
459 am_cv_$1_dependencies_compiler_type=none
460fi
461])
462AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
463AM_CONDITIONAL([am__fastdep$1], [
464 test "x$enable_dependency_tracking" != xno \
465 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
466])
467
468
469# AM_SET_DEPDIR
470# -------------
471# Choose a directory name for dependency files.
472# This macro is AC_REQUIREd in _AM_DEPENDENCIES
473AC_DEFUN([AM_SET_DEPDIR],
474[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
475AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
476])
477
478
479# AM_DEP_TRACK
480# ------------
481AC_DEFUN([AM_DEP_TRACK],
482[AC_ARG_ENABLE(dependency-tracking,
483[ --disable-dependency-tracking speeds up one-time build
484 --enable-dependency-tracking do not reject slow dependency extractors])
485if test "x$enable_dependency_tracking" != xno; then
486 am_depcomp="$ac_aux_dir/depcomp"
487 AMDEPBACKSLASH='\'
488 am__nodep='_no'
489fi
490AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
491AC_SUBST([AMDEPBACKSLASH])dnl
492_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
493AC_SUBST([am__nodep])dnl
494_AM_SUBST_NOTMAKE([am__nodep])dnl
495])
496
497# Generate code to set up dependency tracking. -*- Autoconf -*-
498
499# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
500# Free Software Foundation, Inc.
501#
502# This file is free software; the Free Software Foundation
503# gives unlimited permission to copy and/or distribute it,
504# with or without modifications, as long as this notice is preserved.
505
506#serial 5
507
508# _AM_OUTPUT_DEPENDENCY_COMMANDS
509# ------------------------------
510AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
511[{
512 # Autoconf 2.62 quotes --file arguments for eval, but not when files
513 # are listed without --file. Let's play safe and only enable the eval
514 # if we detect the quoting.
515 case $CONFIG_FILES in
516 *\'*) eval set x "$CONFIG_FILES" ;;
517 *) set x $CONFIG_FILES ;;
518 esac
519 shift
520 for mf
521 do
522 # Strip MF so we end up with the name of the file.
523 mf=`echo "$mf" | sed -e 's/:.*$//'`
524 # Check whether this is an Automake generated Makefile or not.
525 # We used to match only the files named `Makefile.in', but
526 # some people rename them; so instead we look at the file content.
527 # Grep'ing the first line is not enough: some people post-process
528 # each Makefile.in and add a new line on top of each file to say so.
529 # Grep'ing the whole file is not good either: AIX grep has a line
530 # limit of 2048, but all sed's we know have understand at least 4000.
531 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
532 dirpart=`AS_DIRNAME("$mf")`
533 else
534 continue
535 fi
536 # Extract the definition of DEPDIR, am__include, and am__quote
537 # from the Makefile without running `make'.
538 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
539 test -z "$DEPDIR" && continue
540 am__include=`sed -n 's/^am__include = //p' < "$mf"`
541 test -z "am__include" && continue
542 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
543 # When using ansi2knr, U may be empty or an underscore; expand it
544 U=`sed -n 's/^U = //p' < "$mf"`
545 # Find all dependency output files, they are included files with
546 # $(DEPDIR) in their names. We invoke sed twice because it is the
547 # simplest approach to changing $(DEPDIR) to its actual value in the
548 # expansion.
549 for file in `sed -n "
550 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
551 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
552 # Make sure the directory exists.
553 test -f "$dirpart/$file" && continue
554 fdir=`AS_DIRNAME(["$file"])`
555 AS_MKDIR_P([$dirpart/$fdir])
556 # echo "creating $dirpart/$file"
557 echo '# dummy' > "$dirpart/$file"
558 done
559 done
560}
561])# _AM_OUTPUT_DEPENDENCY_COMMANDS
562
563
564# AM_OUTPUT_DEPENDENCY_COMMANDS
565# -----------------------------
566# This macro should only be invoked once -- use via AC_REQUIRE.
567#
568# This code is only required when automatic dependency tracking
569# is enabled. FIXME. This creates each `.P' file that we will
570# need in order to bootstrap the dependency handling code.
571AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
572[AC_CONFIG_COMMANDS([depfiles],
573 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
574 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
575])
576
577# Do all the work for Automake. -*- Autoconf -*-
578
579# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
580# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
581#
582# This file is free software; the Free Software Foundation
583# gives unlimited permission to copy and/or distribute it,
584# with or without modifications, as long as this notice is preserved.
585
586# serial 16
587
588# This macro actually does too much. Some checks are only needed if
589# your package does certain things. But this isn't really a big deal.
590
591# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
592# AM_INIT_AUTOMAKE([OPTIONS])
593# -----------------------------------------------
594# The call with PACKAGE and VERSION arguments is the old style
595# call (pre autoconf-2.50), which is being phased out. PACKAGE
596# and VERSION should now be passed to AC_INIT and removed from
597# the call to AM_INIT_AUTOMAKE.
598# We support both call styles for the transition. After
599# the next Automake release, Autoconf can make the AC_INIT
600# arguments mandatory, and then we can depend on a new Autoconf
601# release and drop the old call support.
602AC_DEFUN([AM_INIT_AUTOMAKE],
603[AC_PREREQ([2.62])dnl
604dnl Autoconf wants to disallow AM_ names. We explicitly allow
605dnl the ones we care about.
606m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
607AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
608AC_REQUIRE([AC_PROG_INSTALL])dnl
609if test "`cd $srcdir && pwd`" != "`pwd`"; then
610 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
611 # is not polluted with repeated "-I."
612 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
613 # test to see if srcdir already configured
614 if test -f $srcdir/config.status; then
615 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
616 fi
617fi
618
619# test whether we have cygpath
620if test -z "$CYGPATH_W"; then
621 if (cygpath --version) >/dev/null 2>/dev/null; then
622 CYGPATH_W='cygpath -w'
623 else
624 CYGPATH_W=echo
625 fi
626fi
627AC_SUBST([CYGPATH_W])
628
629# Define the identity of the package.
630dnl Distinguish between old-style and new-style calls.
631m4_ifval([$2],
632[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
633 AC_SUBST([PACKAGE], [$1])dnl
634 AC_SUBST([VERSION], [$2])],
635[_AM_SET_OPTIONS([$1])dnl
636dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
637m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
638 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
639 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
640 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
641
642_AM_IF_OPTION([no-define],,
643[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
644 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
645
646# Some tools Automake needs.
647AC_REQUIRE([AM_SANITY_CHECK])dnl
648AC_REQUIRE([AC_ARG_PROGRAM])dnl
649AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
650AM_MISSING_PROG(AUTOCONF, autoconf)
651AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
652AM_MISSING_PROG(AUTOHEADER, autoheader)
653AM_MISSING_PROG(MAKEINFO, makeinfo)
654AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
655AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
656AC_REQUIRE([AM_PROG_MKDIR_P])dnl
657# We need awk for the "check" target. The system "awk" is bad on
658# some platforms.
659AC_REQUIRE([AC_PROG_AWK])dnl
660AC_REQUIRE([AC_PROG_MAKE_SET])dnl
661AC_REQUIRE([AM_SET_LEADING_DOT])dnl
662_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
663 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
664 [_AM_PROG_TAR([v7])])])
665_AM_IF_OPTION([no-dependencies],,
666[AC_PROVIDE_IFELSE([AC_PROG_CC],
667 [_AM_DEPENDENCIES(CC)],
668 [define([AC_PROG_CC],
669 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
670AC_PROVIDE_IFELSE([AC_PROG_CXX],
671 [_AM_DEPENDENCIES(CXX)],
672 [define([AC_PROG_CXX],
673 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
674AC_PROVIDE_IFELSE([AC_PROG_OBJC],
675 [_AM_DEPENDENCIES(OBJC)],
676 [define([AC_PROG_OBJC],
677 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
678])
679_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
680dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
681dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
682dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
683AC_CONFIG_COMMANDS_PRE(dnl
684[m4_provide_if([_AM_COMPILER_EXEEXT],
685 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
686])
687
688dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
689dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
690dnl mangled by Autoconf and run in a shell conditional statement.
691m4_define([_AC_COMPILER_EXEEXT],
692m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
693
694
695# When config.status generates a header, we must update the stamp-h file.
696# This file resides in the same directory as the config header
697# that is generated. The stamp files are numbered to have different names.
698
699# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
700# loop where config.status creates the headers, so we can generate
701# our stamp files there.
702AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
703[# Compute $1's index in $config_headers.
704_am_arg=$1
705_am_stamp_count=1
706for _am_header in $config_headers :; do
707 case $_am_header in
708 $_am_arg | $_am_arg:* )
709 break ;;
710 * )
711 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
712 esac
713done
714echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
715
716# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
717# Inc.
718#
719# This file is free software; the Free Software Foundation
720# gives unlimited permission to copy and/or distribute it,
721# with or without modifications, as long as this notice is preserved.
722
723# serial 1
724
725# AM_PROG_INSTALL_SH
726# ------------------
727# Define $install_sh.
728AC_DEFUN([AM_PROG_INSTALL_SH],
729[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
730if test x"${install_sh}" != xset; then
731 case $am_aux_dir in
732 *\ * | *\ *)
733 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
734 *)
735 install_sh="\${SHELL} $am_aux_dir/install-sh"
736 esac
737fi
738AC_SUBST(install_sh)])
739
740# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
741#
742# This file is free software; the Free Software Foundation
743# gives unlimited permission to copy and/or distribute it,
744# with or without modifications, as long as this notice is preserved.
745
746# serial 2
747
748# Check whether the underlying file-system supports filenames
749# with a leading dot. For instance MS-DOS doesn't.
750AC_DEFUN([AM_SET_LEADING_DOT],
751[rm -rf .tst 2>/dev/null
752mkdir .tst 2>/dev/null
753if test -d .tst; then
754 am__leading_dot=.
755else
756 am__leading_dot=_
757fi
758rmdir .tst 2>/dev/null
759AC_SUBST([am__leading_dot])])
760
761# Check to see how 'make' treats includes. -*- Autoconf -*-
762
763# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
764#
765# This file is free software; the Free Software Foundation
766# gives unlimited permission to copy and/or distribute it,
767# with or without modifications, as long as this notice is preserved.
768
769# serial 4
770
771# AM_MAKE_INCLUDE()
772# -----------------
773# Check to see how make treats includes.
774AC_DEFUN([AM_MAKE_INCLUDE],
775[am_make=${MAKE-make}
776cat > confinc << 'END'
777am__doit:
778 @echo this is the am__doit target
779.PHONY: am__doit
780END
781# If we don't find an include directive, just comment out the code.
782AC_MSG_CHECKING([for style of include used by $am_make])
783am__include="#"
784am__quote=
785_am_result=none
786# First try GNU make style include.
787echo "include confinc" > confmf
788# Ignore all kinds of additional output from `make'.
789case `$am_make -s -f confmf 2> /dev/null` in #(
790*the\ am__doit\ target*)
791 am__include=include
792 am__quote=
793 _am_result=GNU
794 ;;
795esac
796# Now try BSD make style include.
797if test "$am__include" = "#"; then
798 echo '.include "confinc"' > confmf
799 case `$am_make -s -f confmf 2> /dev/null` in #(
800 *the\ am__doit\ target*)
801 am__include=.include
802 am__quote="\""
803 _am_result=BSD
804 ;;
805 esac
806fi
807AC_SUBST([am__include])
808AC_SUBST([am__quote])
809AC_MSG_RESULT([$_am_result])
810rm -f confinc confmf
811])
812
813# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
814
815# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
816# Free Software Foundation, Inc.
817#
818# This file is free software; the Free Software Foundation
819# gives unlimited permission to copy and/or distribute it,
820# with or without modifications, as long as this notice is preserved.
821
822# serial 6
823
824# AM_MISSING_PROG(NAME, PROGRAM)
825# ------------------------------
826AC_DEFUN([AM_MISSING_PROG],
827[AC_REQUIRE([AM_MISSING_HAS_RUN])
828$1=${$1-"${am_missing_run}$2"}
829AC_SUBST($1)])
830
831
832# AM_MISSING_HAS_RUN
833# ------------------
834# Define MISSING if not defined so far and test if it supports --run.
835# If it does, set am_missing_run to use it, otherwise, to nothing.
836AC_DEFUN([AM_MISSING_HAS_RUN],
837[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
838AC_REQUIRE_AUX_FILE([missing])dnl
839if test x"${MISSING+set}" != xset; then
840 case $am_aux_dir in
841 *\ * | *\ *)
842 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
843 *)
844 MISSING="\${SHELL} $am_aux_dir/missing" ;;
845 esac
846fi
847# Use eval to expand $SHELL
848if eval "$MISSING --run true"; then
849 am_missing_run="$MISSING --run "
850else
851 am_missing_run=
852 AC_MSG_WARN([`missing' script is too old or missing])
853fi
854])
855
856# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
857# Inc.
858#
859# This file is free software; the Free Software Foundation
860# gives unlimited permission to copy and/or distribute it,
861# with or without modifications, as long as this notice is preserved.
862
863# serial 1
864
865# AM_PROG_MKDIR_P
866# ---------------
867# Check for `mkdir -p'.
868AC_DEFUN([AM_PROG_MKDIR_P],
869[AC_PREREQ([2.60])dnl
870AC_REQUIRE([AC_PROG_MKDIR_P])dnl
871dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
872dnl while keeping a definition of mkdir_p for backward compatibility.
873dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
874dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
875dnl Makefile.ins that do not define MKDIR_P, so we do our own
876dnl adjustment using top_builddir (which is defined more often than
877dnl MKDIR_P).
878AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
879case $mkdir_p in
880 [[\\/$]]* | ?:[[\\/]]*) ;;
881 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
882esac
883])
884
885# Helper functions for option handling. -*- Autoconf -*-
886
887# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
888# Foundation, Inc.
889#
890# This file is free software; the Free Software Foundation
891# gives unlimited permission to copy and/or distribute it,
892# with or without modifications, as long as this notice is preserved.
893
894# serial 5
895
896# _AM_MANGLE_OPTION(NAME)
897# -----------------------
898AC_DEFUN([_AM_MANGLE_OPTION],
899[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
900
901# _AM_SET_OPTION(NAME)
902# --------------------
903# Set option NAME. Presently that only means defining a flag for this option.
904AC_DEFUN([_AM_SET_OPTION],
905[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
906
907# _AM_SET_OPTIONS(OPTIONS)
908# ------------------------
909# OPTIONS is a space-separated list of Automake options.
910AC_DEFUN([_AM_SET_OPTIONS],
911[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
912
913# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
914# -------------------------------------------
915# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
916AC_DEFUN([_AM_IF_OPTION],
917[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
918
919# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
920#
921# This file is free software; the Free Software Foundation
922# gives unlimited permission to copy and/or distribute it,
923# with or without modifications, as long as this notice is preserved.
924
925# serial 1
926
927# AM_RUN_LOG(COMMAND)
928# -------------------
929# Run COMMAND, save the exit status in ac_status, and log it.
930# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
931AC_DEFUN([AM_RUN_LOG],
932[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
933 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
934 ac_status=$?
935 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
936 (exit $ac_status); }])
937
938# Check to make sure that the build environment is sane. -*- Autoconf -*-
939
940# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
941# Free Software Foundation, Inc.
942#
943# This file is free software; the Free Software Foundation
944# gives unlimited permission to copy and/or distribute it,
945# with or without modifications, as long as this notice is preserved.
946
947# serial 5
948
949# AM_SANITY_CHECK
950# ---------------
951AC_DEFUN([AM_SANITY_CHECK],
952[AC_MSG_CHECKING([whether build environment is sane])
953# Just in case
954sleep 1
955echo timestamp > conftest.file
956# Reject unsafe characters in $srcdir or the absolute working directory
957# name. Accept space and tab only in the latter.
958am_lf='
959'
960case `pwd` in
961 *[[\\\"\#\$\&\'\`$am_lf]]*)
962 AC_MSG_ERROR([unsafe absolute working directory name]);;
963esac
964case $srcdir in
965 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
966 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
967esac
968
969# Do `set' in a subshell so we don't clobber the current shell's
970# arguments. Must try -L first in case configure is actually a
971# symlink; some systems play weird games with the mod time of symlinks
972# (eg FreeBSD returns the mod time of the symlink's containing
973# directory).
974if (
975 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
976 if test "$[*]" = "X"; then
977 # -L didn't work.
978 set X `ls -t "$srcdir/configure" conftest.file`
979 fi
980 rm -f conftest.file
981 if test "$[*]" != "X $srcdir/configure conftest.file" \
982 && test "$[*]" != "X conftest.file $srcdir/configure"; then
983
984 # If neither matched, then we have a broken ls. This can happen
985 # if, for instance, CONFIG_SHELL is bash and it inherits a
986 # broken ls alias from the environment. This has actually
987 # happened. Such a system could not be considered "sane".
988 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
989alias in your environment])
990 fi
991
992 test "$[2]" = conftest.file
993 )
994then
995 # Ok.
996 :
997else
998 AC_MSG_ERROR([newly created file is older than distributed files!
999Check your system clock])
1000fi
1001AC_MSG_RESULT(yes)])
1002
1003# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1004#
1005# This file is free software; the Free Software Foundation
1006# gives unlimited permission to copy and/or distribute it,
1007# with or without modifications, as long as this notice is preserved.
1008
1009# serial 1
1010
1011# AM_PROG_INSTALL_STRIP
1012# ---------------------
1013# One issue with vendor `install' (even GNU) is that you can't
1014# specify the program used to strip binaries. This is especially
1015# annoying in cross-compiling environments, where the build's strip
1016# is unlikely to handle the host's binaries.
1017# Fortunately install-sh will honor a STRIPPROG variable, so we
1018# always use install-sh in `make install-strip', and initialize
1019# STRIPPROG with the value of the STRIP variable (set by the user).
1020AC_DEFUN([AM_PROG_INSTALL_STRIP],
1021[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1022# Installed binaries are usually stripped using `strip' when the user
1023# run `make install-strip'. However `strip' might not be the right
1024# tool to use in cross-compilation environments, therefore Automake
1025# will honor the `STRIP' environment variable to overrule this program.
1026dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1027if test "$cross_compiling" != no; then
1028 AC_CHECK_TOOL([STRIP], [strip], :)
1029fi
1030INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1031AC_SUBST([INSTALL_STRIP_PROGRAM])])
1032
1033# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1034#
1035# This file is free software; the Free Software Foundation
1036# gives unlimited permission to copy and/or distribute it,
1037# with or without modifications, as long as this notice is preserved.
1038
1039# serial 3
1040
1041# _AM_SUBST_NOTMAKE(VARIABLE)
1042# ---------------------------
1043# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1044# This macro is traced by Automake.
1045AC_DEFUN([_AM_SUBST_NOTMAKE])
1046
1047# AM_SUBST_NOTMAKE(VARIABLE)
1048# --------------------------
1049# Public sister of _AM_SUBST_NOTMAKE.
1050AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1051
1052# Check how to create a tarball. -*- Autoconf -*-
1053
1054# Copyright (C) 2004, 2005, 2012 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 2
1061
1062# _AM_PROG_TAR(FORMAT)
1063# --------------------
1064# Check how to create a tarball in format FORMAT.
1065# FORMAT should be one of `v7', `ustar', or `pax'.
1066#
1067# Substitute a variable $(am__tar) that is a command
1068# writing to stdout a FORMAT-tarball containing the directory
1069# $tardir.
1070# tardir=directory && $(am__tar) > result.tar
1071#
1072# Substitute a variable $(am__untar) that extract such
1073# a tarball read from stdin.
1074# $(am__untar) < result.tar
1075AC_DEFUN([_AM_PROG_TAR],
1076[# Always define AMTAR for backward compatibility. Yes, it's still used
1077# in the wild :-( We should find a proper way to deprecate it ...
1078AC_SUBST([AMTAR], ['$${TAR-tar}'])
1079m4_if([$1], [v7],
1080 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1081 [m4_case([$1], [ustar],, [pax],,
1082 [m4_fatal([Unknown tar format])])
1083AC_MSG_CHECKING([how to create a $1 tar archive])
1084# Loop over all known methods to create a tar archive until one works.
1085_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1086_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1087# Do not fold the above two line into one, because Tru64 sh and
1088# Solaris sh will not grok spaces in the rhs of `-'.
1089for _am_tool in $_am_tools
1090do
1091 case $_am_tool in
1092 gnutar)
1093 for _am_tar in tar gnutar gtar;
1094 do
1095 AM_RUN_LOG([$_am_tar --version]) && break
1096 done
1097 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1098 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1099 am__untar="$_am_tar -xf -"
1100 ;;
1101 plaintar)
1102 # Must skip GNU tar: if it does not support --format= it doesn't create
1103 # ustar tarball either.
1104 (tar --version) >/dev/null 2>&1 && continue
1105 am__tar='tar chf - "$$tardir"'
1106 am__tar_='tar chf - "$tardir"'
1107 am__untar='tar xf -'
1108 ;;
1109 pax)
1110 am__tar='pax -L -x $1 -w "$$tardir"'
1111 am__tar_='pax -L -x $1 -w "$tardir"'
1112 am__untar='pax -r'
1113 ;;
1114 cpio)
1115 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1116 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1117 am__untar='cpio -i -H $1 -d'
1118 ;;
1119 none)
1120 am__tar=false
1121 am__tar_=false
1122 am__untar=false
1123 ;;
1124 esac
1125
1126 # If the value was cached, stop now. We just wanted to have am__tar
1127 # and am__untar set.
1128 test -n "${am_cv_prog_tar_$1}" && break
1129
1130 # tar/untar a dummy directory, and stop if the command works
1131 rm -rf conftest.dir
1132 mkdir conftest.dir
1133 echo GrepMe > conftest.dir/file
1134 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135 rm -rf conftest.dir
1136 if test -s conftest.tar; then
1137 AM_RUN_LOG([$am__untar <conftest.tar])
1138 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1139 fi
1140done
1141rm -rf conftest.dir
1142
1143AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1145AC_SUBST([am__tar])
1146AC_SUBST([am__untar])
1147]) # _AM_PROG_TAR
1148
1149m4_include([acinclude.m4])
Note: See TracBrowser for help on using the repository browser.