| AC_PREREQ(2.50)
| AC_INIT
| AC_CONFIG_SRCDIR([configure.ac])
|
| echo > test1
| testsrc=test1
| testdest=test2
| AC_CONFIG_LINKS($testdest:test1 test3:$testsrc, [],
| [testsrc=$testsrc
| testdest=$testdest])
|
| AC_OUTPUT
Ah, now I understand.
Well, it seems to me we are not referring to the same feature! I
don't consider this a valid use of AC_CONFIG_LINKS, it is meant to
have a moving dest, not source. I.e., test3 is OK, but not test1.
How come you need such a thing?
The right way to write this is
/tmp % cat configure.ac nostromo Err 1
AC_INIT
rm -f foo bar baz
touch baz
case $foo in
foo) AC_CONFIG_LINKS(foo:baz);;
bar) AC_CONFIG_LINKS(bar:baz);;
esac
AC_OUTPUT
/tmp % ace nostromo 19:55
/tmp % ./configure nostromo 19:55
configure: creating ./config.status
/tmp % ./configure foo=foo nostromo 19:55
configure: creating ./config.status
config.status: linking ./baz to foo
/tmp % ./configure foo=baz nostromo 19:55
configure: creating ./config.status
/tmp % ./configure foo=bar nostromo 19:55
configure: creating ./config.status
config.status: linking ./baz to bar