bitmath.h: Cleanups
[flac.git] / autogen.sh
blobb62a340184fdfd1bb6d2e9e9c5368220bc056bc3
1 #!/bin/sh
2 # Run this to set up the build system: configure, makefiles, etc.
3 # We trust that the user has a recent enough autoconf & automake setup
4 # (not older than a few years...)
6 use_symlinks=" --symlink"
8 case $1 in
9 --no-symlink*)
10 use_symlinks=""
11 echo "Copying autotool files instead of using symlinks."
14 echo "Using symlinks to autotool files (use --no-symlinks to copy instead)."
16 esac
18 test_program_errors=0
20 test_program () {
21 if ! command -v $1 >/dev/null 2>&1 ; then
22 echo "Missing program '$1'."
23 test_program_errors=1
27 for prog in autoconf automake libtool pkg-config ; do
28 test_program $prog
29 done
31 if test $(uname -s) != "Darwin" ; then
32 test_program gettext
35 test $test_program_errors -ne 1 || exit 1
37 #-------------------------------------------------------------------------------
39 set -e
41 if test $(uname -s) = "OpenBSD" ; then
42 # OpenBSD needs these environment variables set.
43 AUTOCONF_VERSION=2.69
44 AUTOMAKE_VERSION=1.11
45 export AUTOCONF_VERSION
46 export AUTOMAKE_VERSION
49 srcdir=`dirname $0`
50 test -n "$srcdir" && cd "$srcdir"
52 echo "Updating build configuration files for FLAC, please wait...."
54 touch config.rpath
55 autoreconf --install $use_symlinks --force
56 #./configure "$@" && echo