autoconf
[Top][All Lists]
Advanced

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

Re: nesting of AC_CHECK_PROG ?


From: Stepan Kasal
Subject: Re: nesting of AC_CHECK_PROG ?
Date: Wed, 20 Oct 2004 11:30:41 +0200
User-agent: Mutt/1.4.1i

Hello,

On Wed, Oct 20, 2004 at 10:37:07AM +0200, Guus LEEUW wrote:
> > On Tue, Oct 19, 2004 at 01:40:05PM -0400, Yasunari Tosa wrote:
> > > 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")])
> > >     ])
> 
> What if Yasunari uses something (similar to|like) eval or backticks around
> the to-be-expanded macro?
> Is that going to be portable?

backticks can be a real pain, syntactically.  All backticks and backslaskes
inside has to be escaped.
The POSIX replacement $(...) is not portable to some non-POSIX systems, eg.
the default configuration of current (recent?) Solaris.
``eval'' doesn't help here.

The only usable solution is to refrain from nesting of the macros:

AC_ARG_VAR([[TIXWISH]], [[The tixwish program.]])
AC_CHECK_PROG([[TIXWISH]], [[tixwish]], [[tixwish]])
if test "x$TIXWISH" = x; then
        AC_CHECK_PROG([[TIXWISH]], [[tixwish8.1.8.3]], [[tixwish8.1.8.3]])
        if test "x$TIXWISH" = x; then
                AC_MSG_ERROR([[tixwish cannot be found]])
        fi
fi

Regards,
        Stepan Kasal




reply via email to

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