"autoconf --version" messes up in readonly directories: it outputs
something like this:
autoconf: line 67: conf28894.sh: Permission denied
autoconf: line 68: conf28894.sh: Permission denied
chmod: cannot access `conf28894.sh': No such file or directory
autoconf (GNU Autoconf) 2.61b
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
I installed this fix:
2007-10-05 Paul Eggert <[EMAIL PROTECTED]>
Don't assume "." is writeable, for commands like "autoconf --version".
* lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use a
different heuristic instead, one that doesn't rely on creating
files.
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 8d441ab..e8bce40 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1037,15 +1037,11 @@ fi
m4_defun([_AS_PATH_SEPARATOR_PREPARE],
[# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; FPATH=$PATH; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
])# _AS_PATH_SEPARATOR_PREPARE
M ChangeLog
M lib/m4sugar/m4sh.m4
Committed as df45b2a9247b36ab5519cb8ce26b8600aa00590b