]> code.delx.au - pulseaudio/blob - bootstrap.sh
6f060c8559f84ccc3b94033e271c846fd04ebb18
[pulseaudio] / bootstrap.sh
1 #!/bin/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 VERSION=1.10
20
21 run_versioned() {
22 local P
23 local V
24
25 V=$(echo "$2" | sed -e 's,\.,,g')
26
27 if [ -e "`which $1$V 2> /dev/null`" ] ; then
28 P="$1$V"
29 else
30 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
31 P="$1-$2"
32 else
33 P="$1"
34 fi
35 fi
36
37 shift 2
38 "$P" "$@"
39 }
40
41 set -ex
42
43 if [ "x$1" = "xam" ] ; then
44 run_versioned automake "$VERSION" -a -c --foreign
45 ./config.status
46 else
47 rm -rf autom4te.cache
48 rm -f config.cache
49
50 rm -f Makefile.am~ configure.ac~
51 # Evil, evil, evil, evil hack
52 sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
53 test -f Makefile.am~ && mv Makefile.am~ Makefile.am
54 test -f configure.ac~ && mv configure.ac~ configure.ac
55
56 touch config.rpath
57 test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
58
59 intltoolize --copy --force --automake
60 "$LIBTOOLIZE" -c --force --ltdl
61 run_versioned aclocal "$VERSION" -I common
62 run_versioned autoconf 2.59 -Wall
63 run_versioned autoheader 2.59
64 run_versioned automake "$VERSION" --copy --foreign --add-missing
65
66 if test "x$NOCONFIGURE" = "x"; then
67 CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
68 make clean
69 fi
70 fi