(autocf21.info.gz) Examining Syntax
Info Catalog
(autocf21.info.gz) Examining Declarations
(autocf21.info.gz) Writing Tests
(autocf21.info.gz) Examining Libraries
5.2 Examining Syntax
====================
To check for a syntax feature of the C, C++ or Fortran 77 compiler, such
as whether it recognizes a certain keyword, use `AC_TRY_COMPILE' to try
to compile a small program that uses that feature. You can also use it
to check for structures and structure members that are not present on
all systems.
-- Macro: AC_TRY_COMPILE (INCLUDES, FUNCTION-BODY, [ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND]])
Create a C, C++ or Fortran 77 test program (depending on which
language is current, Language Choice), to see whether a
function whose body consists of FUNCTION-BODY can be compiled.
For C and C++, INCLUDES is any `#include' statements needed by the
code in FUNCTION-BODY (INCLUDES will be ignored if the currently
selected language is Fortran 77). This macro also uses `CFLAGS'
or `CXXFLAGS' if either C or C++ is the currently selected
language, as well as `CPPFLAGS', when compiling. If Fortran 77 is
the currently selected language then `FFLAGS' will be used when
compiling.
If the file compiles successfully, run shell commands
ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND.
This macro does not try to link; use `AC_TRY_LINK' if you need to
do that ( Examining Libraries).
Info Catalog
(autocf21.info.gz) Examining Declarations
(autocf21.info.gz) Writing Tests
(autocf21.info.gz) Examining Libraries
automatically generated byinfo2html