Fix a bunch of compiler warnings (mainly MinGW).
[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 gettext ; do
16         test_program $prog
17         done
18
19 test $test_program_errors -ne 1 || exit 1
20
21 #-------------------------------------------------------------------------------
22
23 set -e
24
25 if test $(uname -s) = "OpenBSD" ; then
26         # OpenBSD needs these environment variables set.
27         AUTOCONF_VERSION=2.69
28         AUTOMAKE_VERSION=1.11
29         export AUTOCONF_VERSION
30         export AUTOMAKE_VERSION
31         fi
32
33 srcdir=`dirname $0`
34 test -n "$srcdir" && cd "$srcdir"
35
36 echo "Updating build configuration files for FLAC, please wait...."
37
38 touch config.rpath
39 autoreconf -isf
40 #./configure "$@" && echo