(autoconf.info)Running the Compiler

Next: Running the Linker Prev: Running the Preprocessor Up: Writing Tests

6.4 Running the Compiler

To check for a syntax feature of the current language's (Note: Language
Choice) compiler, such as whether it recognizes a certain keyword, or
simply to try some library feature, use `AC_COMPILE_IFELSE' to try to
compile a small program that uses that feature.

     Run the compiler and compilation flags of the current language
     (Note: Language Choice) on the INPUT, run the shell commands
     ACTION-IF-TRUE on success, ACTION-IF-FALSE otherwise.  The INPUT
     can be made by `AC_LANG_PROGRAM' and friends.

     It is customary to report unexpected failures with
     `AC_MSG_FAILURE'.  This macro does not try to link; use
     `AC_LINK_IFELSE' if you need to do that (Note: Running the

   For tests in Erlang, the INPUT must be the source code of a module
named `conftest'.  `AC_COMPILE_IFELSE' generates a `conftest.beam' file
that can be interpreted by the Erlang virtual machine (`ERL').  It is
recommended to use `AC_LANG_PROGRAM' to specify the test program, to
ensure that the Erlang module has the right name.

automatically generated by info2www