3 # This file is part of PulseAudio.
5 # PulseAudio is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # PulseAudio is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with PulseAudio; if not, write to the Free Software Foundation,
17 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 V=$(echo "$2" | sed -e 's,\.,,g')
27 if [ -e "`which $1$V 2> /dev/null`" ] ; then
30 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
47 LIBTOOLIZE="glibtoolize"
55 if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
56 echo "Activating pre-commit hook."
57 cp ${CP_OPTS} .git/hooks/pre-commit.sample .git/hooks/pre-commit
58 chmod ${CHMOD_OPTS} +x .git/hooks/pre-commit
61 if [ -f .tarball-version ]; then
62 echo "Marking tarball version as modified."
63 echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
66 # We check for this here, because if pkg-config is not found in the
67 # system, it's likely that the pkg.m4 macro file is also not present,
68 # which will make PKG_PROG_PKG_CONFIG be undefined and the generated
69 # configure file faulty.
70 if ! pkg-config --version &>/dev/null; then
71 echo "pkg-config is required to bootstrap this program" &>/dev/null
75 if type -p colorgcc > /dev/null ; then
79 if [ "x$1" = "xam" ] ; then
80 run_versioned automake "$VERSION" -a -c --foreign
86 rm -f Makefile.am~ configure.ac~
87 # Evil, evil, evil, evil hack
88 sed 's/read dummy/\#/' `which gettextize` | bash -s -- --copy --force
89 test -f Makefile.am~ && mv Makefile.am~ Makefile.am
90 test -f configure.ac~ && mv configure.ac~ configure.ac
93 test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
95 intltoolize --copy --force --automake
96 "$LIBTOOLIZE" -c --force
97 run_versioned aclocal "$VERSION" -I m4
98 run_versioned autoconf 2.63 -Wall
99 run_versioned autoheader 2.63
100 run_versioned automake "$VERSION" --copy --foreign --add-missing
102 if test "x$NOCONFIGURE" = "x"; then
103 CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"