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

  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.

This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata.

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’)

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.

Last updated 23 days ago. Help improve this document in the forum.