Autotools
Autotools is a build system used commonly in open source projects.
Contents |
autotools.eclass
autotools eclass provides functions and dependencies necessary to reconfigure (bootstrap) autotools files in packages. These are usually used in live ebuilds and when applying patches to configure.ac or Makefile.am files.
inherit autotools
src_prepare() {
eautoreconf
}The eautoreconf function, similarly to autoreconf -vi, regenerates configure and template files used by autotools. It automatically detects use of automake, libtool, autoheader and subdirectory recursion, and calls the appropriate commands.
Much like autoreconf, it doesn't handle gettext, gtk-doc and other custom bootstrap steps necessary. For the former case, there's additional eautopoint function; for the latter, it is suggested to call the appropriate tool through autotools_run_tool (which prints a nice status message).
inherit autotools
src_prepare() {
autotools_run_tool gtkdocize
eautopoint
eautoreconf
}autotools-utils.eclass
The autotools-utils.eclass is meant to provide an extensive support for autotools build system features in ebuilds, in a syntax similar to cmake-utils.eclass.
Right now, autotools-utils.eclass handles:
- intelligent removal of unnecessary .la files,
- automatic handling of IUSE=static-libs,
- out-of-source builds,
- wrapping base.eclass to handle PATCHES, DOCS, HTML_DOCS and apply user patches,
- wrapping libtool.eclass for the elibtoolize call.
EAPI=4
IUSE="foo static-libs"
src_configure() {
local myeconfargs=(
$(use_enable foo)
)
autotools-utils_src_configure
}libtool.eclass
The libtool.eclass is an eclass providing means to apply Gentoo-specific patches and fixes to libtool used in package build system without the need for regenerating build system completely.