The autotools plugin

The autotools plugin is useful for Automake/Autotools based parts.

Autotools-based projects are easy to recognise, as they’re typically built and installed with the following commands: ./configure && make && make install.

This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata. Additional features and syntax are dependent on which base is being used, as outlined below:

See C/C++ applications for a simple example, or search GitHub for projects already using the plugin.

This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.

base: core20

  1. the autotools plugin first attempts to build the project using ./configure
  2. if the configure script does not yet exist, it will attempt to run ./autoconf --install.

In addition, this plugin uses the following plugin-specific keywords:

  • autotools-configure-parameters (previously configflags) (list of strings)
    Configure flags to pass to the build such as those shown by running ./configure --help

Requires Snapcraft version 4.0+.

base: core18 | core

  1. the autotools plugin first attempts to build the project using ./configure.
  2. if the configure script does not yet exist, it will attempt to run ./autogen.
  3. if autogen doesn’t exist, the plugin will run autoreconf.

In addition, this plugin uses the following plugin-specific keywords:

  • configflags (list of strings)
    Configure flags to pass to the build such as those shown by running ./configure --help
  • install-via (enum, ‘destdir’ or ‘prefix’)
    Whether to install via DESTDIR or by using --prefix (default is
    ‘destdir’)

Requires Snapcraft version 3.x.

Last updated 3 months ago. Help improve this document in the forum.