autoconf
[Top][All Lists]
Advanced

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

Re: extract value of ${datadir}


From: Gavin Smith
Subject: Re: extract value of ${datadir}
Date: Tue, 15 Sep 2015 10:48:12 +0100

On 15 September 2015 at 08:13, Peter Johansson <address@hidden> wrote:
> I need to to extract the value of ${datadir} so I can use it something like
>
> val=*extract ${datadir}*
>
> AC_CHECK_FILE([$val], [], [AC_MSG_ERROR([file $val needed])])

Here's what I got with

echo datadir is $datadir
eval datadir=$datadir
echo datadir is $datadir
eval datadir=$datadir
echo datadir is $datadir

in configure.ac.

Output:

datadir is ${datarootdir}
datadir is ${prefix}/share
datadir is NONE/share

That NONE is a problem. Maybe if you specify a value for datadir
explicitly it will work.

The idea was to loop with the eval's until a fixed point was reached.

The answer appears to be you can do what you want only with difficulty.



reply via email to

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