]> code.delx.au - pulseaudio/blob - bootstrap.sh
zeroconf-publish: Add locking around pa_mainloop_api_once()
[pulseaudio] / bootstrap.sh
1 #!/usr/bin/env bash
2
3 # This file is part of PulseAudio.
4 #
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.
9 #
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.
14 #
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.
18
19 case $(uname) in
20 *Darwin*)
21 LIBTOOLIZE="glibtoolize"
22 ;;
23 esac
24 test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
25
26 if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
27 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
28 chmod +x .git/hooks/pre-commit && \
29 echo "Activated pre-commit hook."
30 fi
31
32 if [ -f .tarball-version ]; then
33 echo "Marking tarball version as modified."
34 echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
35 fi
36
37 # We check for this here, because if pkg-config is not found in the
38 # system, it's likely that the pkg.m4 macro file is also not present,
39 # which will make PKG_PROG_PKG_CONFIG be undefined and the generated
40 # configure file faulty.
41 if ! pkg-config --version &>/dev/null; then
42 echo "pkg-config is required to bootstrap this program" &>/dev/null
43 DIE=1
44 fi
45
46 # Other necessary programs
47 intltoolize --version >/dev/null || DIE=1
48 test "$DIE" = 1 && exit 1
49
50 if type -p colorgcc > /dev/null ; then
51 export CC=colorgcc
52 fi
53
54 autopoint --force
55 AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
56
57 if test "x$NOCONFIGURE" = "x"; then
58 CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
59 make clean
60 fi