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="1996, 2000-2001, 2005, 2007-2017, 2020-2021 Free Software"
LICENSE="GNU GPL v2
	GNU GPL v3"
REVISION="1"
SOURCE_URI="http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz"
CHECKSUM_SHA256="431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c"
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
	# same for the configure, which needs autoconf
	touch configure

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

INSTALL()
{
	make install
	make install-html
}

TEST()
{
	make check
}
