Date: Wed, 11 Apr 2001 18:54:18 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" Message-Id: <3995-Wed11Apr2001185417+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: Subject: Re: New bash 2.04 beta release References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tim Van Holder" > Date: Wed, 11 Apr 2001 15:34:58 +0200 > > > The problem is, the path separator issue is not limited to Autoconf > > and the scripts it generates. It is also relevant to running shell > > scripts which have nothing to do with Autoconf. If PATH_SEPARATOR is > > not set to :, these scripts will break. > > > > Is it possible to modify Autoconf to use a different variable for this > > purpose? It would be nice if we could continue to use PATH_SEPARATOR > > without risking the conflict with Autoconf. > I set PATH_SEPARATOR in Autoconf exactly to avoid conflicts with bash. > If autoconf finds ';' to be the proper pathsep (as it is for DOS), it > will also use that to walk $PATH. But if the user has PATH_SEPARATOR > set to ':', that will break. So I set PATH_SEPARATOR to the value we > found. If Autoconf sets PATH_SEPARATOR to ';' to force Bash to DTRT, that is okay. But if Autoconf sets it to ';' for its own needs, then it might break Bash or scripts run by Bash, and this is precisely the conflict we should avoid. That is why I suggested that Autoconf should use a variable by another name. > Also, there's an AC_SUBST for PATH_SEPARATOR, so it would get > set anyway. I don't think I understand what this means. Who and why sets PATH_SEPARATOR via AC_SUBST, and why it cannot be avoided? > There's no clean way out of this, I guess I think having two different variables, one for Bash, the other for Autoconf, is a clean way. If not, please tell why not. > So let me know which packages have scripts that break with > PATH_SEPARATOR=';'; I'll endeavour to adapt those packages to use > autoconf 2.50 and use @PATH_SEPARATOR@ to configure themselves to work > correctly on DOS. I think this isn't practical. Even if we come up with a list of such scripts, a new one added tomorrow, or a new ported package will undo your efforts. Does Autoconf need to export PATH_SEPARATOR to subordinate Bash that it runs? If not, maybe Autoconf needs to use ';' for itself, but leave the normal setting alone. > For the record, this is what autoconf does to determine the pathsep: > > echo "#! $SHELL" >conftest.sh > echo "exit 0" >>conftest.sh > chmod +x conftest.sh > if PATH=".;."; conftest.sh; then > ac_path_separator=';' > else > ac_path_separator=: > fi > AC_SUBST([PATH_SEPARATOR], "$ac_path_separator")dnl > rm -f conftest.sh This is an okay method to find what the path separator is, but why does it need to use the same PATH_SEPARATOR variable? Bash doesn't need PATH_SEPARATOR at all unless the scripts it run use literal ':' in walking PATH.