autoconf
[Top][All Lists]
Advanced

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

Re: A small test case for the AC_CONFIG_xxx problem


From: Akim Demaille
Subject: Re: A small test case for the AC_CONFIG_xxx problem
Date: 19 Jun 2001 19:56:11 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

| 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



reply via email to

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