autoconf
[Top][All Lists]
Advanced

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

Re: usage of ac_check_header


From: Ralf Wildenhues
Subject: Re: usage of ac_check_header
Date: Wed, 25 Jul 2007 09:06:44 +0200
User-agent: Mutt/1.5.16 (2007-07-16)

Hello Joao,

* Joao Miguel Ferreira wrote on Tue, Jul 24, 2007 at 12:00:48PM CEST:
> 
> Is this something I could/should do globally ???

Yes.

> for example, I also have these:
> 
> - AC_CHECK_HEADERS(unistd.h sys/socket.h)
> - AC_CHECK_FUNCS(socket htons)
> - AC_CHECK_LIB(xml2,xmlParseDoc,,AC_MSG_ERROR([cannot link to libxml2]))

If I would write example code for the manual, I'd write above like this:
 AC_CHECK_HEADERS([unistd.h sys/socket.h])
 AC_CHECK_FUNCS([socket htons])
 AC_CHECK_LIB([xml2], [xmlParseDoc], [], [AC_MSG_ERROR([cannot link to 
libxml2])])

but quoting arguments that actually contain macros themselves is the
most important bit:

 AC_CHECK_HEADERS(unistd.h sys/socket.h)
 AC_CHECK_FUNCS(socket htons)
 AC_CHECK_LIB(xml2,xmlParseDoc,, [AC_MSG_ERROR([cannot link to libxml2])])

> could/should I quote it all ? I'm quite used to quoting in Perl... is
> this somewhat similar ?

See the manual for details:
<http://www.gnu.org/software/autoconf/manual/html_node/M4-Quotation.html>

Hope that helps.

Cheers,
Ralf




reply via email to

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