1#!/bin/sh
2##
3## Copyright (c) 2011-2019 Belledonne Communications SARL.
4##
5## This file is part of bcg729.
6##
7## This program is free software: you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation, either version 3 of the License, or
10## (at your option) any later version.
11##
12## This program is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15## GNU General Public License for more details.
16##
17## You should have received a copy of the GNU General Public License
18## along with this program. If not, see <http://www.gnu.org/licenses/>.
19##
20
21srcdir=`dirname $0`
22test -z "$srcdir" && srcdir=.
23
24THEDIR=`pwd`
25cd $srcdir
26
27#AM_VERSION="1.11"
28if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
29	AUTOMAKE=automake
30	ACLOCAL=aclocal
31else
32	ACLOCAL=aclocal-${AM_VERSION}
33	AUTOMAKE=automake-${AM_VERSION}
34fi
35
36if test -f /opt/local/bin/glibtoolize ; then
37	# darwin
38	LIBTOOLIZE=/opt/local/bin/glibtoolize
39elif test -f /usr/local/bin/glibtoolize ; then
40	# also darwin
41	LIBTOOLIZE=/usr/local/bin/glibtoolize
42else
43	LIBTOOLIZE=libtoolize
44fi
45if test -d /opt/local/share/aclocal ; then
46	ACLOCAL_ARGS="-I /opt/local/share/aclocal"
47fi
48
49ln -s README.md README
50
51echo "Generating build scripts for G729 codec..."
52set -x
53$LIBTOOLIZE --copy --force
54$ACLOCAL  $ACLOCAL_ARGS
55autoheader
56$AUTOMAKE --force-missing --add-missing --copy
57autoconf
58
59cd $THEDIR
60
61