autoconf-patches
[Top][All Lists]
Advanced

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

Re: 02-lineno.patch


From: Akim Demaille
Subject: Re: 02-lineno.patch
Date: 27 Sep 2001 17:25:21 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

| > Raja> However, $0 may have been invoked on the path.  So, if '$0' is a
| > Raja> bareword, you'll have to search $PATH for it.
| >
| > I don't think we should support this, do you?

I did it though.

| Well one other case this matters is in the computation of $srcdir.
| configure supports the --srcdir option and also uses `dirname $0`.
| The only issue is whether --srcdir was meant to support 'configure'
| invocation from $PATH.

Ah, I missed that, thanks!  Hm... Which means the test suite will soon
fail for someone, as it does exercise this, but my host is too good to
see that.


| > Raja> You also need to capture the directory of the original
| > Raja> 'configure' call so that you can figure out $srcdir from it.
| >
| > Sorry, I don't understand this too well.
| 
| $srcdir is computed by 'autoconf/general.m4'.  However, it uses
| `dirname $0`, which will be '.' for non-$LINENO shells, irrespective
| of how the original configure was invoked (say with ../../configure).
| 
|   # Find the source files, if location was not specified.
|   if test -z "$srcdir"; then
|     ac_srcdir_defaulted=yes
|     # Try the directory containing this script, then its parent.
|     ac_prog=$[0]
|   dnl FIXME: should use AS_DIRNAME here once it is made DOS-friendly.
|     ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
|     test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|     srcdir=$ac_confdir

Thanks for pointing this out!  I don't know how to handle this
properly though...  Maybe we should pass something like
AS_ORIGINAL_INVOCATION_NAME?

        exec AS_ORIGINAL_INVOCATION_NAME=$0 $as_me.lineno

what do you think about that?  It should be configure-independent, as
it is M4sh code, not dedicated to Autoconf.



reply via email to

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