This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: nesting of AC_CHECK_PROG ?
- From: Stepan Kasal <kasal at ucw dot cz>
- To: Yasunari Tosa <tosa at nmr dot mgh dot harvard dot edu>
- Cc: autoconf at gnu dot org, automake at gnu dot org
- Date: Wed, 20 Oct 2004 10:32:00 +0200
- Subject: Re: nesting of AC_CHECK_PROG ?
- References: <41755175.60303@nmr.mgh.harvard.edu>
- Reply-to: autoconf at gnu dot org, Yasunari Tosa <tosa at nmr dot mgh dot harvard dot edu>
Hi,
you mailed your problem to both autoconf and automake lists.
I think it's pure autoconf question. so we should not continue with the
discussion on the automake list.
On Tue, Oct 19, 2004 at 01:40:05PM -0400, Yasunari Tosa wrote:
> I appreciated it very much that AC_CHECK_LIB can be nested as
>
> AC_CHECK_LIB([tlc],[Tcl_Init], [LIB_TCL=-ltcl],
> [ AC_CHECK_LIB([tcl8.4], [Tcl_Init], [LIB_TCL=-ltcl8.4],
> [AC_MSG_ERROR("FATAL: libtcl not found")] )
> ])
When you look at it closer, you see that the third and fourth parameter
of AC_CHECK_LIB contain shell code (the manual uses the term ``action'').
Of course, you can place there a macro which expands to shell code.
> Unfortunately AC_CHECK_PROG() nesting does not work:
>
> AC_CHECK_PROG([TIXWISH], [tixwish],[tixwish],
> [ AC_CHECK_PROG([TIXWISH], [tixwish8.1.8.3], [tixwish8.1.8.3],
> [AC_MSG_ERROR("FATAL: tixwish cannot be found")])
> ])
The third and fourth parameter of this macro is a _value_ which would
be assigned to the variable. You cannot put there shell code or
a macro which expands to shell code.
Hope this explains it.
Stepan Kasal