manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Autoconf Input Layout,  Prev: Autoconf Language,  Up: Writing Autoconf Input

3.1.3 Standard ‘configure.ac’ Layout
------------------------------------

The order in which ‘configure.ac’ calls the Autoconf macros is not
important, with a few exceptions.  Every ‘configure.ac’ must contain a
call to ‘AC_INIT’ before the checks, and a call to ‘AC_OUTPUT’ at the
end (*note Output::).  Additionally, some macros rely on other macros
having been called first, because they check previously set values of
some variables to decide what to do.  These macros are noted in the
individual descriptions (*note Existing Tests::), and they also warn you
when ‘configure’ is created if they are called out of order.

   To encourage consistency, here is a suggested order for calling the
Autoconf macros.  Generally speaking, the things near the end of this
list are those that could depend on things earlier in it.  For example,
library functions could be affected by types and libraries.

     Autoconf requirements
     ‘AC_INIT(PACKAGE, VERSION, BUG-REPORT-ADDRESS)’
     information on the package
     checks for programs
     checks for libraries
     checks for header files
     checks for types
     checks for structures
     checks for compiler characteristics
     checks for library functions
     checks for system services
     ‘AC_CONFIG_FILES([FILE...])’
     ‘AC_OUTPUT’

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.