[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf 2.52f and OS/2

From: Tim Van Holder
Subject: Re: autoconf 2.52f and OS/2
Date: Sat, 26 Jan 2002 18:34:11 +0100

Sorry for not respoding more quickly:

> I've just tested autoconf 2.52f with OS/2. There are two
> problems I want to mention. The first one (PATH_SEPARATOR)
> should be obvious, the second one (#! $SHELL) can become
> a problem if $SHELL refers to a not sh compatible shell.
> In my opinion it would be better to define $SHELL
> _before_ using it, e.g.:

> --- old/autoconf-2.52f/lib/m4sugar/m4sh.m4      Fri Nov  2 
> 16:10:56 2001
> +++ gnu/autoconf-2.52f/lib/m4sugar/m4sh.m4      Sun Dec 16 
> 00:29:34 2001
> @@ -502,7 +502,7 @@
>    fi
>    case $CONFIG_SHELL in
>    '')
> -    _AS_PATH_WALK([/bin:/usr/bin:$PATH],
>        [for as_base in sh bash ksh sh5; do
>          case $as_dir in
>          /*)

If this change is needed, you might as well use
   [\\/]* | ?:[\\/]*)
to detect absolute paths, instead of '/*)'.

> @@ -579,7 +579,7 @@
>  [# The user is always right.
>  if test "${PATH_SEPARATOR+set}" != set; then
> -  echo "#! $SHELL" >
> +  echo "#! /bin/sh" >
>    echo  "exit 0"   >>
>    chmod +x
>    if (PATH=".;."; >/dev/null 2>&1; then

This breaks the check on DJGPP; if /bin/sh is used, the
test never detects the ';'; it needs $SHELL(*).
While using PATH_SEPARATOR=: isn't harmful for configure
(as DJGPP's bash transforms PATH to match PATH_SEPARATOR),
it does break make rules that use @PATH_SEPARATOR@, as
the environment won't have PATH_SEPARATOR set to ':' and
therefore path searches won't work as expected.
In any case, if anything goes wrong with the test due to
a bad shell, it will detect ':', which will very likely be
the correct result.  On DOSish systems, which is what this
test is intended for, '/bin/sh' is much more likely to fail
than $SHELL.  If the problem is that SHELL might not be set,
then ${SHELL-/bin/sh} would solve that better.  And if SHELL
is not a Unixy shell, than that is a user error IMHO.

Andreas, what exactly was the problem on OS/2?  What is SHELL
set to (and is this a user setting, or forced by the OS)?

(*) This might be a shell bug (IIRC we are supposed to emulate
    /bin paths for #!), and has been reported as such to our
    bash maintainer, but that doesn't really matter for the
    purpose of this discussion.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]