autogen.sh 1007 Bytes
Newer Older
1
#!/bin/sh
2
# Run this to set up the build system: configure, makefiles, etc.
3 4
# We trust that the user has a recent enough autoconf & automake setup
# (not older than a few years...)
5 6 7

test_program_errors=0

8
test_program () {
9 10 11 12 13 14
	if ! command -v $1 >/dev/null 2>&1 ; then
		echo "Missing program '$1'."
		test_program_errors=1
		fi
}

Xiyue Deng's avatar
Xiyue Deng committed
15
for prog in autoconf automake libtool pkg-config ; do
16 17 18
	test_program $prog
	done

Xiyue Deng's avatar
Xiyue Deng committed
19 20 21 22
if test $(uname -s) != "Darwin" ; then
	test_program gettext
	fi

23 24 25 26
test $test_program_errors -ne 1 || exit 1

#-------------------------------------------------------------------------------

Timothy B. Terriberry's avatar
Timothy B. Terriberry committed
27 28
set -e

29 30 31 32 33 34 35 36
if test $(uname -s) = "OpenBSD" ; then
	# OpenBSD needs these environment variables set.
	AUTOCONF_VERSION=2.69
	AUTOMAKE_VERSION=1.11
	export AUTOCONF_VERSION
	export AUTOMAKE_VERSION
	fi

Timothy B. Terriberry's avatar
Timothy B. Terriberry committed
37 38 39 40 41
srcdir=`dirname $0`
test -n "$srcdir" && cd "$srcdir"

echo "Updating build configuration files for FLAC, please wait...."

42
touch config.rpath
43
autoreconf --install --symlink --force
Timothy B. Terriberry's avatar
Timothy B. Terriberry committed
44
#./configure "$@" && echo