From: Paul Eggert Date: Fri, 5 Oct 2007 22:31:06 +0000 (-0700) Subject: Don't assume "." is writeable, for commands like "autoconf --version". X-Git-Tag: v2.62~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df45b2a9247b36ab5519cb8ce26b8600aa00590b;p=thirdparty%2Fautoconf.git 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/ChangeLog b/ChangeLog index 666c07f9..0afda139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-05 Paul Eggert + 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. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle "///" correctly. diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 8d441ab0..e8bce401 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