autoconf: Running the Compiler

1 
1 6.4 Running the Compiler
1 ========================
1 
11 To check for a syntax feature of the current language's (⇒Language
 Choice) compiler, such as whether it recognizes a certain keyword, or
1 simply to try some library feature, use `AC_COMPILE_IFELSE' to try to
1 compile a small program that uses that feature.
1 
1  -- Macro: AC_COMPILE_IFELSE (INPUT, [ACTION-IF-TRUE],
1           [ACTION-IF-FALSE])
1      Run the compiler and compilation flags of the current language
1      (⇒Language Choice) on the INPUT, run the shell commands
1      ACTION-IF-TRUE on success, ACTION-IF-FALSE otherwise.  The INPUT
1      can be made by `AC_LANG_PROGRAM' and friends.
1 
1      It is customary to report unexpected failures with
1      `AC_MSG_FAILURE'.  This macro does not try to link; use
11      `AC_LINK_IFELSE' if you need to do that (⇒Running the
      Linker).  If needed, ACTION-IF-TRUE can further access the
1      just-compiled object file `conftest.$OBJEXT'.
1 
1      This macro uses `AC_REQUIRE' for the compiler associated with the
1      current language, which means that if the compiler has not yet been
1      determined, the compiler determination will be made prior to the
1      body of the outermost `AC_DEFUN' macro that triggered this macro to
1      expand (⇒Expanded Before Required).
1 
1    For tests in Erlang, the INPUT must be the source code of a module
1 named `conftest'.  `AC_COMPILE_IFELSE' generates a `conftest.beam' file
1 that can be interpreted by the Erlang virtual machine (`ERL').  It is
1 recommended to use `AC_LANG_PROGRAM' to specify the test program, to
1 ensure that the Erlang module has the right name.
1