Re-exec of $as_myself chooses wrong configure script from PATH

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

 



In the configure scripts that I'm generating, I see the following
variable assignment:

  # Find who we are.  Look in the path if we contain no directory
  # separator.
  as_myself=...

Later, this may be used to re-exec the configure script with a better shell,

  exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}

But, consider the following scenario:

  * I have some other "configure" in my $PATH.
  * I have a shell that doesn't support LINENO.
  * I execute ./configure for some package by running "sh configure".

What happens in that case is that the "as_myself" computation fails to
find a directory separator in "configure", and instead searches my path
for a usable "configure". It finds one, but not the one I wanted to run!
Now I have

  as_myself=/path/to/some/other/configure/script

and then since my shell doesn't support LINENO, I wind up running

  $CONFIG_SHELL ... /path/to/some/other/configure/script

In other words, I re-exec the wrong script entirely. This can be worked
around by running "sh ./configure" instead of "sh configure", but leads
to a great deal of head-scratching.

Is this something that can (should?) be fixed?

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux