3039
3039
AMTAR='$${TAR-tar}'
3042
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
3042
# We'll loop over all known methods to create a tar archive until one works.
3043
_am_tools='gnutar plaintar pax cpio none'
3045
# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3046
# There is notably a 21 bits limit for the UID and the GID. In fact,
3047
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3049
am_max_uid=2097151 # 2^21 - 1
3050
am_max_gid=$am_max_uid
3051
# The $UID and $GID variables are not portable, so we need to resort
3052
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
3053
# below are definitely unexpected, so allow the users to see them
3054
# (that is, avoid stderr redirection).
3055
am_uid=`id -u || echo unknown`
3056
am_gid=`id -g || echo unknown`
3057
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
3058
$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
3059
if test $am_uid -le $am_max_uid; then
3060
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3061
$as_echo "yes" >&6; }
3063
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064
$as_echo "no" >&6; }
3067
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
3068
$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
3069
if test $am_gid -le $am_max_gid; then
3070
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3071
$as_echo "yes" >&6; }
3073
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3074
$as_echo "no" >&6; }
3078
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
3043
3079
$as_echo_n "checking how to create a ustar tar archive... " >&6; }
3044
# Loop over all known methods to create a tar archive until one works.
3045
_am_tools='gnutar plaintar pax cpio none'
3046
_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
3047
# Do not fold the above two line into one, because Tru64 sh and
3048
# Solaris sh will not grok spaces in the rhs of '-'.
3049
for _am_tool in $_am_tools
3053
for _am_tar in tar gnutar gtar;
3055
{ echo "$as_me:$LINENO: $_am_tar --version" >&5
3081
# Go ahead even if we have the value already cached. We do so because we
3082
# need to set the values for the 'am__tar' and 'am__untar' variables.
3083
_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
3085
for _am_tool in $_am_tools; do
3088
for _am_tar in tar gnutar gtar; do
3089
{ echo "$as_me:$LINENO: $_am_tar --version" >&5
3056
3090
($_am_tar --version) >&5 2>&5
3058
3092
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3059
3093
(exit $ac_status); } && break
3061
am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
3062
am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
3063
am__untar="$_am_tar -xf -"
3066
# Must skip GNU tar: if it does not support --format= it doesn't create
3067
# ustar tarball either.
3068
(tar --version) >/dev/null 2>&1 && continue
3069
am__tar='tar chf - "$$tardir"'
3070
am__tar_='tar chf - "$tardir"'
3071
am__untar='tar xf -'
3074
am__tar='pax -L -x ustar -w "$$tardir"'
3075
am__tar_='pax -L -x ustar -w "$tardir"'
3079
am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
3080
am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
3081
am__untar='cpio -i -H ustar -d'
3090
# If the value was cached, stop now. We just wanted to have am__tar
3091
# and am__untar set.
3092
test -n "${am_cv_prog_tar_ustar}" && break
3094
# tar/untar a dummy directory, and stop if the command works
3097
echo GrepMe > conftest.dir/file
3098
{ echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
3095
am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
3096
am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
3097
am__untar="$_am_tar -xf -"
3100
# Must skip GNU tar: if it does not support --format= it doesn't create
3101
# ustar tarball either.
3102
(tar --version) >/dev/null 2>&1 && continue
3103
am__tar='tar chf - "$$tardir"'
3104
am__tar_='tar chf - "$tardir"'
3105
am__untar='tar xf -'
3108
am__tar='pax -L -x ustar -w "$$tardir"'
3109
am__tar_='pax -L -x ustar -w "$tardir"'
3113
am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
3114
am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
3115
am__untar='cpio -i -H ustar -d'
3124
# If the value was cached, stop now. We just wanted to have am__tar
3125
# and am__untar set.
3126
test -n "${am_cv_prog_tar_ustar}" && break
3128
# tar/untar a dummy directory, and stop if the command works.
3131
echo GrepMe > conftest.dir/file
3132
{ echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
3099
3133
(tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
3101
3135
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3102
3136
(exit $ac_status); }
3104
if test -s conftest.tar; then
3105
{ echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
3138
if test -s conftest.tar; then
3139
{ echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
3106
3140
($am__untar <conftest.tar) >&5 2>&5
3108
3142
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3109
3143
(exit $ac_status); }
3110
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3144
{ echo "$as_me:$LINENO: cat conftest.dir/file" >&5
3145
(cat conftest.dir/file) >&5 2>&5
3147
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3148
(exit $ac_status); }
3149
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3115
if ${am_cv_prog_tar_ustar+:} false; then :
3154
if ${am_cv_prog_tar_ustar+:} false; then :
3116
3155
$as_echo_n "(cached) " >&6
3118
3157
am_cv_prog_tar_ustar=$_am_tool
3121
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
3160
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
3122
3161
$as_echo "$am_cv_prog_tar_ustar" >&6; }