1 # A buildsystem plugin for handling autoconf based projects
3 # Copyright: © 2008 Joey Hess
4 # © 2008-2009 Modestas Vainius
7 package Debian::Debhelper::Buildsystem::autoconf;
11 use Debian::Debhelper::Dh_Lib;
12 use base 'Debian::Debhelper::Buildsystem::makefile';
15 "GNU Autoconf (configure)"
18 sub check_auto_buildable {
22 # Handle configure; the rest - next class
23 if ($step eq "configure") {
24 return -x "configure";
32 # Standard set of options for configure.
34 push @opts, "--build=" . dpkg_architecture_value("DEB_BUILD_GNU_TYPE");
35 push @opts, "--prefix=/usr";
36 push @opts, "--includedir=\${prefix}/include";
37 push @opts, "--mandir=\${prefix}/share/man";
38 push @opts, "--infodir=\${prefix}/share/info";
39 push @opts, "--sysconfdir=/etc";
40 push @opts, "--localstatedir=/var";
41 push @opts, "--libexecdir=\${prefix}/lib/" . sourcepackage();
42 push @opts, "--disable-maintainer-mode";
43 push @opts, "--disable-dependency-tracking";
44 # Provide --host only if different from --build, as recommended in
45 # autotools-dev README.Debian: When provided (even if equal)
46 # autoconf 2.52+ switches to cross-compiling mode.
47 if (dpkg_architecture_value("DEB_BUILD_GNU_TYPE")
48 ne dpkg_architecture_value("DEB_HOST_GNU_TYPE")) {
49 push @opts, "--host=" . dpkg_architecture_value("DEB_HOST_GNU_TYPE");
52 $this->mkdir_builddir();
53 $this->doit_in_builddir($this->get_rel2builddir_path("configure"), @opts, @_);