autoconf-patches
[Top][All Lists]
Advanced

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

Re: 02-lineno.patch


From: Raja R Harinath
Subject: Re: 02-lineno.patch
Date: Thu, 27 Sep 2001 09:42:25 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105

Hi,

Akim Demaille <address@hidden> writes:

> 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?

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.

> Raja> Also, you need to prevent the $as_me of that exec-ed script from
> Raja> being 'configure.lineno', so that it doesn't inf-loop generating
> Raja> 'configure.lineno.lineno' and 'configure.lineno.lineno.lineno'
> Raja> and so on.  
>
> I don't want to do that, because it would hide real problems.  There
> is no reason for this to happen, precisely because on the second run,
> $LINENO is subst'd by hard coded number, so the test passes.

Yep, I missed 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

- Hari
-- 
Raja R Harinath ------------------------------ address@hidden
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



reply via email to

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