for as_shell in $as_candidate_shells $SHELL; do
# Try only shells which exist, to save several forks.
- if test -f $as_shell &&
- { ($as_shell) 2> /dev/null <<\_ASEOF
+ if test -f "$as_shell" &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
}; then
CONFIG_SHELL=$as_shell
as_have_required=yes
- if { $as_shell 2> /dev/null <<\_ASEOF
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd $srcdir && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
pwd)`
# When building in place, set srcdir=.
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" || continue
ac_builddir=.
case "$ac_dir" in
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
- cd $ac_dir || { ac_status=$?; continue; }
+ cd "$ac_dir" || { ac_status=$?; continue; }
# Check for guested configure.
- if test -f $ac_srcdir/configure.gnu; then
+ if test -f "$ac_srcdir/configure.gnu"; then
echo &&
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
echo &&
- $SHELL $ac_srcdir/configure --help=recursive
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
ac_aux_dir=
-for ac_dir in lib $srcdir/lib; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in lib "$srcdir"/lib; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in lib $srcdir/lib" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in lib $srcdir/lib" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in lib \"$srcdir\"/lib" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in lib \"$srcdir\"/lib" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
{ (exit 1); exit 1; }; }
{ echo "$as_me:$LINENO: checking build system type" >&5
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$ac_config_guess`
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
{ { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_build_alias failed" >&2;}
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
- rm -f conftest.*;;
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
- rm -f conftest.*;;
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
- rm -f conftest.*;;
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
{ echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
-
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
q
}
s/.*/./; q'`
- { if $as_mkdir_p; then
- test -d "$ac_dir" || mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
q
}
s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
-
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
use IO::File;
use File::Basename;
use Automake::ChannelDefs;
+use Automake::Channels qw(msg);
use Automake::FileUtils;
require Exporter;
my ($fh, $mode) = @_;
# Cannot use @_ here.
- # On some systems (e.g. GNU/Linux with NFSv2), flock(2) does not work over
- # NFS, but Perl prefers that over fcntl(2) if it exists and if
- # perl was not built with -Ud_flock. Normally, this problem is harmless,
- # so ignore the ENOLCK errors that are reported in that situation,
- # However, if the invoker is using "make -j", the problem is not harmless,
- # so report it in that case, by inspecting MAKEFLAGS and looking for
- # any arguments indicating that the invoker used -j.
- # Admittedly this is a bit of a hack.
- if (!flock ($fh, $mode)
- && (!$!{ENOLCK}
- || (exists $ENV{'MAKEFLAGS'}
- && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/)))
+ # Unless explicitly configured otherwise, Perl implements its `flock' with the
+ # first of flock(2), fcntl(2), or lockf(3) that works. These can fail on
+ # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
+ # usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel
+ # invocation of GNU `make' has invoked the tool we serve, report all locking
+ # failures and abort.
+ #
+ # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when `lockd' is
+ # not running. NetBSD NFS clients silently grant all locks. We do not
+ # attempt to defend against these dangers.
+ if (!flock ($fh, $mode))
{
+ my $make_j = (exists $ENV{'MAKEFLAGS'}
+ && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/);
+ my $note = "\nforgo `make -j' or use a file system that supports locks";
my $file = $fh->name;
- fatal ("cannot lock $file with mode $mode "
- . "(perhaps you are running make -j on a lame NFS client?): $!");
+
+ msg ($make_j ? 'fatal' : 'unsupported',
+ "cannot lock $file with mode $mode: $!" . ($make_j ? $note : ""))
+ if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP});
}
}