Re: usage of ac_check_header

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux