(autoconf.info)Language Choice


Prev: Multiple Cases Up: Writing Tests
Enter node , (file) or (file)node

5.8 Language Choice
===================

Packages that use both C and C++ need to test features of both
compilers.  Autoconf-generated 'configure' scripts check for C features
by default.  The following macros determine which language's compiler is
used in tests that follow in 'configure.in'.

 -- Macro: AC_LANG_C
     Do compilation tests using 'CC' and 'CPP' and use extension '.c'
     for test programs.  Set the shell variable 'cross_compiling' to the
     value computed by 'AC_PROG_CC' if it has been run, empty otherwise.

 -- Macro: AC_LANG_CPLUSPLUS
     Do compilation tests using 'CXX' and 'CXXCPP' and use extension
     '.C' for test programs.  Set the shell variable 'cross_compiling'
     to the value computed by 'AC_PROG_CXX' if it has been run, empty
     otherwise.

 -- Macro: AC_LANG_FORTRAN77
     Do compilation tests using 'F77' and use extension '.f' for test
     programs.  Set the shell variable 'cross_compiling' to the value
     computed by 'AC_PROG_F77' if it has been run, empty otherwise.

 -- Macro: AC_LANG_SAVE
     Remember the current language (as set by 'AC_LANG_C',
     'AC_LANG_CPLUSPLUS' or 'AC_LANG_FORTRAN77') on a stack.  Does not
     change which language is current.  Use this macro and
     'AC_LANG_RESTORE' in macros that need to temporarily switch to a
     particular language.

 -- Macro: AC_LANG_RESTORE
     Select the language that is saved on the top of the stack, as set
     by 'AC_LANG_SAVE', and remove it from the stack.  This macro is
     equivalent to either 'AC_LANG_C', 'AC_LANG_CPLUSPLUS' or
     'AC_LANG_FORTRAN77', whichever had been run most recently when
     'AC_LANG_SAVE' was last called.

     Do not call this macro more times than 'AC_LANG_SAVE'.

 -- Macro: AC_REQUIRE_CPP
     Ensure that whichever preprocessor would currently be used for
     tests has been found.  Calls 'AC_REQUIRE' (Note: Prerequisite
     Macros) with an argument of either 'AC_PROG_CPP' or
     'AC_PROG_CXXCPP', depending on which language is current.


automatically generated by info2www version 1.2.2.9