[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ${prefix} expansion in configure.ac ?
From: |
Stepan Kasal |
Subject: |
Re: ${prefix} expansion in configure.ac ? |
Date: |
Tue, 8 Feb 2005 11:22:57 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
On Mon, Feb 07, 2005 at 03:40:02PM +0200, Philippe Trottier wrote:
> here is something I have noticed, exec_prefix is set to NONE until the
> end of the config script... now I am thinking to see if it is set at
> NONE and if it is then set exec_prefix to ${prefix}, and put it back to
> NONE afterward ... does that make any sense ?
if it's set to NONE, it means it hasn't been given on the command line.
Perhaps a macro below will execute
test $exec_prefix = NONE
to see whether a value was given or not. I don't want to destroy this
information, so I restore the previous state.
It would be also possible to do something like:
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
eval eval ac_define_dir="\"\\\"$1\\\"\""
test -d "$ac_define_dir" dnl
or even:
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
eval eval test -d "\"\\\"$1\\\"\"" dnl
But please note that I had to change the value assigned to exec_prefix,
and I had to add one more `eval' on that account.
The reason is that in the generated Makefiles, you should see:
exec_prefix = ${prefix}
not the value of $prefix. This subtle difference enables the following:
make prefix=...
which should change both prefix and exec_prefix variables.
To sum up, I think the solution with restoring NONEs is the cleanest way.
Have a nice day,
Stepan Kasal