Mailing List Archive

silly little problem, silly little patch
For some strange reason there are versions of Bash in which the builtin
cd command echoes the full path to the destination if it differs from
the parameter given; eg if cwd is /builds and one does cd gnupg-0.4.2
one sees
$ cd gnupg-0.4.2
/builds/gnupg-0.4.2
$
I don't know who finds that useful, but anyway, it breaks the configure
script. The following patch unbreaks it:

--- gnupg-0.4.2-vanilla/configure Sun Oct 18 06:08:22 1998
+++ gnupg-0.4.2/configure Mon Oct 19 19:11:17 1998
@@ -800,7 +800,7 @@
test "$program_transform_name" = "" && program_transform_name="s,x,x,"


-missing_dir=`cd $ac_aux_dir && pwd`
+missing_dir=`cd $ac_aux_dir 2>/dev/null 1>/dev/null && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:806: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if

--
| G r e g L o u i s | pgp: keys.pgp.com |
| http://www.dynamicro.on.ca/~glouis | id glouis@dynamicro.on.ca |
| "Knowing what thou knowest not is, in | 2BC6 4F5A 6657 FF4E 9FBC |
| "a sense, omniscience" -- Piet Hein | 5DAA 2304 76A9 CCA6 5B45 |
Re: silly little problem, silly little patch [ In reply to ]
%% glouis@dynamicro.on.ca writes:

g> For some strange reason there are versions of Bash in which the builtin
g> cd command echoes the full path to the destination if it differs from
g> the parameter given; eg if cwd is /builds and one does cd gnupg-0.4.2
g> one sees

g> $ cd gnupg-0.4.2
g> /builds/gnupg-0.4.2

This will happen if you have CDPATH set, for example.

The more normal solution is to have the configure script reset CDPATH to
something more normal (or remove it). A change like this was already
made in the latest autoconf sources, I believe.

PS. Note that changing configure is never appropriate: the configure
script is generated by the autoconf package from configure.in (you
didn't really think anyone sat down and _wrote_ a configure script,
did you :)

--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@baynetworks.com> Network Management Development
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.
Re: silly little problem, silly little patch [ In reply to ]
glouis@dynamicro.on.ca writes:

> the parameter given; eg if cwd is /builds and one does cd gnupg-0.4.2
> one sees
> $ cd gnupg-0.4.2
> /builds/gnupg-0.4.2

There is a typo corecction build in and if it does, the cwd is
displayed. Hmmm, but that should not happen in a script.

> --- gnupg-0.4.2-vanilla/configure Sun Oct 18 06:08:22 1998
> +++ gnupg-0.4.2/configure Mon Oct 19 19:11:17 1998

Sorry, I can't fix it in confutre because the file is created from
configure.in and a library of macro defs which are part of automake;
a new version of automake would break it.


Werner
Re: silly little problem, silly little patch [ In reply to ]
On Mon, Oct 19, 1998 at 07:42:20PM -0400, glouis@dynamicro.on.ca wrote:
> -missing_dir=`cd $ac_aux_dir && pwd`
> +missing_dir=`cd $ac_aux_dir 2>/dev/null 1>/dev/null && pwd`

This is easy to fix with a decent shell:
Just replace '.' in CDPATH with the NULL path, the matching
path will not be printed
old:
CDPATH=.:/bla
new:
CDPATH=:/bla

-markus
Re: silly little problem, silly little patch [ In reply to ]
> Sorry, I can't fix it in confutre because the file is created from
> configure.in and a library of macro defs which are part of automake;
> a new version of automake would break it.

If the problem is just the CDPATH variable, you may unset it at the top of
configure.in. Remember that you can type any shell script commands into
configure.in.
Re: silly little problem, silly little patch [ In reply to ]
Nicolás Lichtmaier <nick@feedback.net.ar> writes:

> If the problem is just the CDPATH variable, you may unset it at the top of
> configure.in. Remember that you can type any shell script commands into
> configure.in.

Already done.