On 15 September 2015 at 08:13, Peter Johansson <trojkan@xxxxxxxxx> 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. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf