[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nested AC_CHECK_LIB and AC_CHECK_HEADER need brackets?
From: |
Raja R Harinath |
Subject: |
Re: Nested AC_CHECK_LIB and AC_CHECK_HEADER need brackets? |
Date: |
Wed, 03 Oct 2001 17:56:44 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105 |
Hi,
Tor Lillqvist <address@hidden> writes:
> Using CVS autoconf (on Cygwin, if it matters), nesting AC_CHECK_LIB
> and AC_CHECK_HEADER calls cause strange syntax errors in the resulting
> configure script, unless the nested call is put in [brackets]. Is this
> a bug in CVS autoconf?
No. See the 'M4 Quotation' chapter in autoconf.info.
> Or was one always supposed to use those brackets, and it has only
> happened to work by luck with earlier autoconfs to leave the
> brackets out?
Basically, yes.
> For instance, from gtk+/configure.in:
>
> AC_CHECK_LIB(png, png_read_info,
> AC_CHECK_HEADER(png.h,
> png_ok=yes,
> png_ok=no),
> AC_MSG_WARN(*** PNG loader will not be built (PNG library not found)
> ***), -lz -lm)
>
> generates bad shell code, while
>
> AC_CHECK_LIB(png, png_read_info,
> [AC_CHECK_HEADER(png.h,
> png_ok=yes,
> png_ok=no)],
> AC_MSG_WARN(*** PNG loader will not be built (PNG library not found)
> ***), -lz -lm)
>
> works OK. Please somebody check that this latter also works with
> earlier autoconfs. (The TIFF tests use even more complex nested
> tests.)
It'll work.
- Hari
--
Raja R Harinath ------------------------------ address@hidden
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash