1 # A buildsystem plugin for handling autotools based projects
3 # Copyright: © 2008 Joey Hess
4 # © 2008-2009 Modestas Vainius
7 package Debian::Debhelper::Buildsystem::autotools;
11 use Debian::Debhelper::Dh_Lib;
12 use base 'Debian::Debhelper::Buildsystem::makefile';
15 "support for building GNU Autotools based packages"
21 if ($action eq "configure") {
22 return -x "configure";
24 return $self->SUPER::is_buildable(@_);
31 # Standard set of options for configure.
33 push @opts, "--build=" . dpkg_architecture_value("DEB_BUILD_GNU_TYPE");
34 push @opts, "--prefix=/usr";
35 push @opts, "--includedir=\${prefix}/include";
36 push @opts, "--mandir=\${prefix}/share/man";
37 push @opts, "--infodir=\${prefix}/share/info";
38 push @opts, "--sysconfdir=/etc";
39 push @opts, "--localstatedir=/var";
40 push @opts, "--libexecdir=\${prefix}/lib/" . $self->exec_in_topdir(\&sourcepackage);
41 push @opts, "--disable-maintainer-mode";
42 push @opts, "--disable-dependency-tracking";
43 # Provide --host only if different from --build, as recommended in
44 # autotools-dev README.Debian: When provided (even if equal) autotools
45 # 2.52+ switches to cross-compiling mode.
46 if (dpkg_architecture_value("DEB_BUILD_GNU_TYPE")
47 ne dpkg_architecture_value("DEB_HOST_GNU_TYPE")) {
48 push @opts, "--host=" . dpkg_architecture_value("DEB_HOST_GNU_TYPE");
51 doit($self->get_toppath("configure"), @opts, @_);