test/*.sh : Fix MALLOC_PERTURB initialization.
[platform/upstream/flac.git] / autogen.sh
1 #!/bin/bash
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...)
5
6 test_program_errors=0
7
8 function test_program {
9         if ! command -v $1 >/dev/null 2>&1 ; then
10                 echo "Missing program '$1'."
11                 test_program_errors=1
12                 fi
13 }
14
15 for prog in autoconf automake libtool pkg-config ; do
16         test_program $prog
17         done
18
19 if test $(uname -s) != "Darwin" ; then
20         test_program gettext
21         fi
22
23 test $test_program_errors -ne 1 || exit 1
24
25 #-------------------------------------------------------------------------------
26
27 set -e
28
29 if test $(uname -s) = "OpenBSD" ; then
30         # OpenBSD needs these environment variables set.
31         AUTOCONF_VERSION=2.69
32         AUTOMAKE_VERSION=1.11
33         export AUTOCONF_VERSION
34         export AUTOMAKE_VERSION
35         fi
36
37 srcdir=`dirname $0`
38 test -n "$srcdir" && cd "$srcdir"
39
40 echo "Updating build configuration files for FLAC, please wait...."
41
42 touch config.rpath
43 autoreconf -isf
44 #./configure "$@" && echo