blob: 02ca6442929ece7f0f661c82238b98ba17da0e18 [file] [log] [blame]
Erik de Castro Lopo56c21352013-04-02 17:53:12 +11001#!/bin/bash
Josh Coalsonc7c1a8a2006-11-17 06:50:19 +00002# Run this to set up the build system: configure, makefiles, etc.
Max Horn66c0a582012-12-12 21:33:52 +01003# We trust that the user has a recent enough autoconf & automake setup
4# (not older than a few years...)
Erik de Castro Lopo56c21352013-04-02 17:53:12 +11005
6test_program_errors=0
7
8function 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
Xiyue Dengb09ee012013-05-24 13:51:29 -070015for prog in autoconf automake libtool pkg-config ; do
Erik de Castro Lopo56c21352013-04-02 17:53:12 +110016 test_program $prog
17 done
18
Xiyue Dengb09ee012013-05-24 13:51:29 -070019if test $(uname -s) != "Darwin" ; then
20 test_program gettext
21 fi
22
Erik de Castro Lopo56c21352013-04-02 17:53:12 +110023test $test_program_errors -ne 1 || exit 1
24
25#-------------------------------------------------------------------------------
26
Timothy B. Terriberryd75cb672013-02-07 12:33:03 -080027set -e
28
Erik de Castro Lopo619b43d2013-03-18 19:35:30 +110029if 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
Timothy B. Terriberryd75cb672013-02-07 12:33:03 -080037srcdir=`dirname $0`
38test -n "$srcdir" && cd "$srcdir"
39
40echo "Updating build configuration files for FLAC, please wait...."
41
Erik de Castro Lopoa53e85b2013-01-17 20:13:33 +110042touch config.rpath
Erik de Castro Lopod2de3a12014-10-06 18:10:31 +110043autoreconf --install --symlink --force
Timothy B. Terriberryd75cb672013-02-07 12:33:03 -080044#./configure "$@" && echo