Autoconf

http://en.wikipedia.org/wiki/Autoconf

 

GNU Autoconf is a tool for producing configure scripts for software on Unix-like computer systems. Configure scripts inspect a user's computer system and configure the software package prior to it being installed . After running a series of automated tests, a configure script generates customised header files and a makefile from pre-written templates. These customised files adapt the software and its installation process to suit the user's system. Together with Automake and Libtool , Autoconf forms the GNU build system . It comprises several tools like Autoheader.

 

 

Usage overview

The developer specifies the desired behaviour of the configure script by writing a list of instructions in the GNU m4 language in a file called "configure.ac". A library of pre-defined m4 macros is available to describe common configure script instructions. Autoconf transforms the instructions in "configure.ac" into a portable configure script.

configure.ac format

The GNU Autoconf manual suggests the following format for the configure.ac file:

Autoconf requirements
The AC_PREREQ( version ) macro can be used to ensure that a recent enough version of the autoconf program is available to process the configure.ac file
AC_INIT(package , version , bug-report-address )
This macro is required in every configure.ac file. It specifies the name and version of the software package for which to generate a configure script and the email address of the developer.
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

More...

你可能感兴趣的:(unix)