8638
8647
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8639
8648
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8640
8649
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8641
[AM_AUTOMAKE_VERSION([1.13.1])dnl
8650
[AM_AUTOMAKE_VERSION([1.13.3])dnl
8642
8651
m4_ifndef([AC_AUTOCONF_VERSION],
8643
8652
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8644
8653
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8655
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
8657
# This file is free software; the Free Software Foundation
8658
# gives unlimited permission to copy and/or distribute it,
8659
# with or without modifications, as long as this notice is preserved.
8661
# AM_PROG_AR([ACT-IF-FAIL])
8662
# -------------------------
8663
# Try to determine the archiver interface, and trigger the ar-lib wrapper
8664
# if it is needed. If the detection of archiver interface fails, run
8665
# ACT-IF-FAIL (default is to abort configure with a proper error message).
8666
AC_DEFUN([AM_PROG_AR],
8667
[AC_BEFORE([$0], [LT_INIT])dnl
8668
AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
8669
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8670
AC_REQUIRE_AUX_FILE([ar-lib])dnl
8671
AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
8674
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
8675
[am_cv_ar_interface=ar
8676
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
8677
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
8678
AC_TRY_EVAL([am_ar_try])
8679
if test "$ac_status" -eq 0; then
8680
am_cv_ar_interface=ar
8682
am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
8683
AC_TRY_EVAL([am_ar_try])
8684
if test "$ac_status" -eq 0; then
8685
am_cv_ar_interface=lib
8687
am_cv_ar_interface=unknown
8690
rm -f conftest.lib libconftest.a
8694
case $am_cv_ar_interface in
8698
# Microsoft lib, so override with the ar-lib wrapper script.
8699
# FIXME: It is wrong to rewrite AR.
8700
# But if we don't then we get into trouble of one sort or another.
8701
# A longer-term fix would be to have automake use am__AR in this case,
8702
# and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
8704
AR="$am_aux_dir/ar-lib $AR"
8708
[AC_MSG_ERROR([could not determine $AR interface])])
8646
8714
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
8648
8716
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9512
9580
# Substitute a variable $(am__untar) that extract such
9513
9581
# a tarball read from stdin.
9514
9582
# $(am__untar) < result.tar
9515
9584
AC_DEFUN([_AM_PROG_TAR],
9516
9585
[# Always define AMTAR for backward compatibility. Yes, it's still used
9517
9586
# in the wild :-( We should find a proper way to deprecate it ...
9518
9587
AC_SUBST([AMTAR], ['$${TAR-tar}'])
9589
# We'll loop over all known methods to create a tar archive until one works.
9590
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9519
9592
m4_if([$1], [v7],
9520
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
9521
[m4_case([$1], [ustar],, [pax],,
9522
[m4_fatal([Unknown tar format])])
9523
AC_MSG_CHECKING([how to create a $1 tar archive])
9524
# Loop over all known methods to create a tar archive until one works.
9525
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9526
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9527
# Do not fold the above two line into one, because Tru64 sh and
9528
# Solaris sh will not grok spaces in the rhs of '-'.
9529
for _am_tool in $_am_tools
9533
for _am_tar in tar gnutar gtar;
9535
AM_RUN_LOG([$_am_tar --version]) && break
9537
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9538
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9539
am__untar="$_am_tar -xf -"
9542
# Must skip GNU tar: if it does not support --format= it doesn't create
9543
# ustar tarball either.
9544
(tar --version) >/dev/null 2>&1 && continue
9545
am__tar='tar chf - "$$tardir"'
9546
am__tar_='tar chf - "$tardir"'
9547
am__untar='tar xf -'
9550
am__tar='pax -L -x $1 -w "$$tardir"'
9551
am__tar_='pax -L -x $1 -w "$tardir"'
9555
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9556
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9557
am__untar='cpio -i -H $1 -d'
9566
# If the value was cached, stop now. We just wanted to have am__tar
9567
# and am__untar set.
9568
test -n "${am_cv_prog_tar_$1}" && break
9570
# tar/untar a dummy directory, and stop if the command works
9573
echo GrepMe > conftest.dir/file
9574
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9576
if test -s conftest.tar; then
9577
AM_RUN_LOG([$am__untar <conftest.tar])
9578
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9583
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9584
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9593
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
9597
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
9598
# There is notably a 21 bits limit for the UID and the GID. In fact,
9599
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
9601
am_max_uid=2097151 # 2^21 - 1
9602
am_max_gid=$am_max_uid
9603
# The $UID and $GID variables are not portable, so we need to resort
9604
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
9605
# below are definitely unexpected, so allow the users to see them
9606
# (that is, avoid stderr redirection).
9607
am_uid=`id -u || echo unknown`
9608
am_gid=`id -g || echo unknown`
9609
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
9610
if test $am_uid -le $am_max_uid; then
9611
AC_MSG_RESULT([yes])
9616
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
9617
if test $am_gid -le $am_max_gid; then
9618
AC_MSG_RESULT([yes])
9627
[m4_fatal([Unknown tar format])])
9629
AC_MSG_CHECKING([how to create a $1 tar archive])
9631
# Go ahead even if we have the value already cached. We do so because we
9632
# need to set the values for the 'am__tar' and 'am__untar' variables.
9633
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9635
for _am_tool in $_am_tools; do
9638
for _am_tar in tar gnutar gtar; do
9639
AM_RUN_LOG([$_am_tar --version]) && break
9641
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9642
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9643
am__untar="$_am_tar -xf -"
9646
# Must skip GNU tar: if it does not support --format= it doesn't create
9647
# ustar tarball either.
9648
(tar --version) >/dev/null 2>&1 && continue
9649
am__tar='tar chf - "$$tardir"'
9650
am__tar_='tar chf - "$tardir"'
9651
am__untar='tar xf -'
9654
am__tar='pax -L -x $1 -w "$$tardir"'
9655
am__tar_='pax -L -x $1 -w "$tardir"'
9659
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9660
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9661
am__untar='cpio -i -H $1 -d'
9670
# If the value was cached, stop now. We just wanted to have am__tar
9671
# and am__untar set.
9672
test -n "${am_cv_prog_tar_$1}" && break
9674
# tar/untar a dummy directory, and stop if the command works.
9677
echo GrepMe > conftest.dir/file
9678
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9680
if test -s conftest.tar; then
9681
AM_RUN_LOG([$am__untar <conftest.tar])
9682
AM_RUN_LOG([cat conftest.dir/file])
9683
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9688
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9689
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9585
9691
AC_SUBST([am__tar])
9586
9692
AC_SUBST([am__untar])
9587
9693
]) # _AM_PROG_TAR