1 # A debhelper build system class for handling Autoconf based projects
3 # Copyright: © 2008 Joey Hess
4 # © 2008-2009 Modestas Vainius
7 package Debian::Debhelper::Buildsystem::autoconf;
10 use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value sourcepackage);
11 use base 'Debian::Debhelper::Buildsystem::makefile';
14 "GNU Autoconf (configure)"
17 sub check_auto_buildable {
21 # Handle configure; the rest - next class
22 if ($step eq "configure") {
23 return -x $this->get_sourcepath("configure");
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/" . 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)
45 # autoconf 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 $this->mkdir_builddir();
52 $this->doit_in_builddir($this->get_source_rel2builddir("configure"), @opts, @_);