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;
10 use base 'Debian::Debhelper::Buildsystem::makefile';
13 "GNU Autoconf (configure)"
16 sub check_auto_buildable {
20 # Handle configure; the rest - next class
21 if ($step eq "configure") {
22 return -x $this->get_sourcepath("configure");
30 # Standard set of options for configure.
32 push @opts, "--build=" . dpkg_architecture_value("DEB_BUILD_GNU_TYPE");
33 push @opts, "--prefix=/usr";
34 push @opts, "--includedir=\${prefix}/include";
35 push @opts, "--mandir=\${prefix}/share/man";
36 push @opts, "--infodir=\${prefix}/share/info";
37 push @opts, "--sysconfdir=/etc";
38 push @opts, "--localstatedir=/var";
39 push @opts, "--libexecdir=\${prefix}/lib/" . sourcepackage();
40 push @opts, "--disable-maintainer-mode";
41 push @opts, "--disable-dependency-tracking";
42 # Provide --host only if different from --build, as recommended in
43 # autotools-dev README.Debian: When provided (even if equal)
44 # autoconf 2.52+ switches to cross-compiling mode.
45 if (dpkg_architecture_value("DEB_BUILD_GNU_TYPE")
46 ne dpkg_architecture_value("DEB_HOST_GNU_TYPE")) {
47 push @opts, "--host=" . dpkg_architecture_value("DEB_HOST_GNU_TYPE");
50 $this->mkdir_builddir();
51 $this->doit_in_builddir($this->get_source_rel2builddir("configure"), @opts, @_);