]>
&title; &firstname; &surname; Code and documentation.
&email;
These are the documentation notes for configure. The configure project generates and maintain software build systems, suitable for use with the most common implementations of the make command. It uses project description files to provide simple Makefiles. It is intended to keep the code generated as simple and portable as possible.
Overview
What is configure configure generates Makefiles needed in an entire project. Instead of trying every little trick to let it work in a number of potential uses, it sticks to the simplest possible code generation. Although primarily dedicated to the generation of build systems through Makefiles, primarily to compile source code in the C/C++ and assembly languages, configure can be extended for integration with external software and processes such as translations, documentation generation, dynamic bindings...
Who should use configure Some software developers could gain using configure. However, due to its intentional simplicity, it may also be limiting in some cases; this can be expected when building large projects in particular. Advanced users willing to modify the build process of projects using configure may have to learn about configure as well.
Who should not use configure configure was primarily designed for projects using the C or C++ languages. Although possibly extended through the help of shell scripts, configure may not be appropriate for other languages or complex build processes.
Why use configure configure was created to be efficient at writing simple and compliant Makefiles for software development projects of all sizes. It should be useful: for people learning software development using Makefiles; for developers of C/C++ software projects; for developers concerned by the readability, efficiency, portability or maintenance of their Makefiles.
Using configure
configure usage The configure utility may be invoked from the command line this way: configure -n -v -S options directory The "-n" option just parses the project definition files, without actually re-generating the Makefiles. The "-v" option gives information about the progress of the operation. The "-S" option warns about potential security risks. It then processes the current directory, or the ones given at the command line, according to the project configuration files encountered.
Project configuration This file should be found in every project directory. It must be named "project.conf". It is organized in sections, and string variables. Section names are written on their own line, between brackets (eg "[section]"). Variables are given on their own line too, like this: variable=value Configuration files may be commented, comment lines being prepended with a hash sign "#". The most significant variables are the following: in the default section (has an empty name, eg "[]" in the file) subdirs: subdirectories to look for too cppflags_force: CPPFLAGS to force globally cppflags: optional global CPPFLAGS cflags_force: CFLAGS to force globally cflags: optional global CFLAGS ldflags_force: LDFLAGS to force globally ldflags: optional global LDFLAGS targets: targets to handle in the Makefile dist: additional files to include in a source archive in sections named like the target they define: type (mandatory): type of the target (eg "binary", "library", "object", ...) cppflags: additional CPPFLAGS for this target cflags: additional CFLAGS for this target ldflags: additional LDFLAGS for this target sources: source files to compile depends: a list of files (or other targets) that this target depends on install: the destination path for installation
Target definitions
Target types The following target types are currently supported: "binary": produces binary files, linked from every object file produced with their source files. "library": produces a static and a shared version of the target, linked from every object file produced with their source files, and respectively appending ".a" and ".so" extensions to the target name; the shared object are also assigned a version number. "object": produces a binary object file from the given source. "plugin": produces a shared version of the target, linked from every object file produced with their source files, and appending the ".so" extension to the target name. "script": runs the given script, expecting the target file to be generated from the sources defined.
Script targets Scripts have to be provided by the software project itself, as configure does not provide any pre-installed set of standard scripts. A few sample scripts are, however, distributed along with the source code of the configure project, and introduced here. These scripts are primarily meant to allow further integration of the build process, as defined by the Makefiles generated, with the requirements of a software project beyond that of compiling code. configure is already known to have been successfully integrated this way with: AppBroker: integration with the DeforaOS distributed computing framework (see appbroker.sh) DocBook: markup language for technical documentation, based on either SGML or XML (see docbook.sh) Gettext: internationalization (i18n) and localization (l10n) framework, notably allowing software to be easily translated to other languages (see gettext.sh) Gtk-doc: generates API documentation from comments within software projects, in the format expected by the DevHelp API browser (see gtkdoc.sh) pkg-config: unified interface to define compilation and linking rules to installed software (see pkgconfig.sh)
Writing scripts It is naturally possible to write scripts for integration with configure.
Migrating to configure You may first create all necessary "project.conf" files with the subdirectories definitions. Then for every binary or library built, specify the adequate target along with its section. When migrating from automake/autoconf, the existing subdirectories are defined in the "Makefile.am" files, in the "SUBDIRS" variable. The binary targets are defined in the same file, as the "bin_PROGRAMS" variable, each declined to "program_SOURCES" for their respective source files.
Getting further
Additional resources More information can be found on the project page at .