autoconf
[Top][All Lists]
Advanced

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

Re: abs_top_srcdir broken?


From: Sébastien Hinderer
Subject: Re: abs_top_srcdir broken?
Date: Wed, 24 Nov 2021 12:40:10 +0100

Hello Nick and all,

I am following up on this.

Nick Bowler (2021/10/18 13:39 -0400):
> On 2021-10-18, Sébastien Hinderer <Sebastien.Hinderer@inria.fr> wrote:
> > Given the follwing configure.ac script:
> >
> > AC_INIT([demo], [demo], [0.1], [demo@demo.org])
> > AC_MSG_NOTICE([abs_top_srcdir="$abs_top_srcdir"])
> >
> > [The] configure script produced by autoconf 2.69 prints:
> >
> > configure: abs_top_srcdir=""
> >
> > Is that an expected behaviour?
>
> I don't know about "expected" but it appears to at least be longstanding
> behavour.  This variable is substituted into output files but this is
> done directly by config.status and is not itself available within
> configure scripts.

I can confirm this. HOwever, for the project I am working on, what we
would need is a variant of this variable that has been piped through
cygpath -f -w on Windows systems. Since the variable is not available in
configure it seems not possible to do that, right?

Is it possible to imagine making the varialbe available in configure so
that this can be achieved

> Configure scripts are always executed from the top build directory so
> most of these directory variables are not needed in tests.  If required,
> it is easy enough to compute absolute directories in the shell:
>
>   case $srcdir in
>   /*) my_abs_top_srcdir=$srcdir ;;
>   *) my_abs_top_srcdir=`pwd`/$srcdir ;;
>   esac

I guess meanwhile I'll have to use such a code, so many thanks for
having shared it. It's a pity though, IMO, that we can't just use the
autoconf-provided variable.

Sébastien.



reply via email to

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