SUMMARY="A tool to automatically configure source code"
DESCRIPTION="GNU Autoconf is a tool for configuring source code and \
makefiles. Using autoconf, programmers can create portable and configurable \
packages, because the person building the package is allowed to specify \
various configuration options."
HOMEPAGE="http://www.gnu.org/software/autoconf/"
COPYRIGHT="1992-2012 Free Software Foundation, Inc."
LICENSE="GNU GPL v2
	GNU GPL v3"
REVISION="8"
SOURCE_URI="http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz"
CHECKSUM_SHA256="954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969"
PATCHES="autoconf-2.69.patchset"
BUILD_PACKAGE_ACTIVATION_PHASE="INSTALL"

ARCHITECTURES="all"

PROVIDES="
	autoconf = $portVersion compat >= 2.60
	cmd:autoconf = $portVersion compat >= 2.60
	cmd:autoheader = $portVersion compat >= 2.60
	cmd:autom4te = $portVersion compat >= 2.60
	cmd:autoreconf = $portVersion compat >= 2.60
	cmd:autoscan = $portVersion compat >= 2.60
	cmd:autoupdate = $portVersion compat >= 2.60
	cmd:ifnames = $portVersion compat >= 2.60
	"
REQUIRES="
	haiku
	coreutils
	diffutils
	cmd:awk
	cmd:m4 >= 1.4
	cmd:perl >= 5
	cmd:sh
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:m4
	cmd:make
	cmd:makeinfo
	cmd:perl >= 5
	cmd:sed
	"

BUILD()
{
	# make sure that the build system doesn't try to update the manpages,
	# as that requires help2man, which isn't available
	touch man/*.1

	PERL="/bin/env perl" M4="m4" SED="sed" \
		runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	make install-html
}

TEST()
{
	make check
}
