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...) 5 6use_symlinks=" --symlink" 7 8case $1 in 9 --no-symlink*) 10 use_symlinks="" 11 echo "Copying autotool files instead of using symlinks." 12 ;; 13 *) 14 echo "Using symlinks to autotool files (use --no-symlinks to copy instead)." 15 ;; 16 esac 17 18test_program_errors=0 19 20test_program () { 21 if ! command -v $1 >/dev/null 2>&1 ; then 22 echo "Missing program '$1'." 23 test_program_errors=1 24 fi 25} 26 27for prog in autoconf automake libtool pkg-config ; do 28 test_program $prog 29 done 30 31if test $(uname -s) != "Darwin" ; then 32 test_program gettext 33 fi 34 35test $test_program_errors -ne 1 || exit 1 36 37#------------------------------------------------------------------------------- 38 39set -e 40 41if test $(uname -s) = "OpenBSD" ; then 42 # OpenBSD needs these environment variables set. 43 if test -z "$AUTOCONF_VERSION" ; then 44 AUTOCONF_VERSION=2.69 45 export AUTOCONF_VERSION 46 echo "Defaulting to use AUTOCONF_VERSION version ${AUTOCONF_VERSION}." 47 else 48 echo "Using AUTOCONF_VERSION version ${AUTOCONF_VERSION}." 49 fi 50 if test -z "$AUTOMAKE_VERSION" ; then 51 AUTOMAKE_VERSION=1.15 52 export AUTOMAKE_VERSION 53 echo "Defaulting to use AUTOMAKE_VERSION version ${AUTOMAKE_VERSION}." 54 else 55 echo "Using AUTOMAKE_VERSION version ${AUTOMAKE_VERSION}." 56 fi 57 fi 58 59srcdir=`dirname $0` 60test -n "$srcdir" && cd "$srcdir" 61 62echo "Updating build configuration files for FLAC, please wait...." 63 64touch config.rpath 65autoreconf --install $use_symlinks --force 66#./configure "$@" && echo 67