Bug 498492 - none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang
[valgrind.git] / drd / scripts / download-and-build-firefox
blob84d57784005dde8764bfa03956689214bea41736
1 #!/bin/bash
3 # See also http://developer.mozilla.org/en/docs/Build_Documentation
4 SRCURL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source"
6 SRCDIR="$HOME/software"
7 SRC="$SRCDIR/mozilla"
8 DOWNLOADS="$SRCDIR/downloads"
9 BUILD="${SRC}-build"
10 TAR="firefox-3.0-source.tar.bz2"
11 PREFIX="$HOME/firefox3"
12 MOZCONFIG="$BUILD/mozconfig-firefox"
13 export MOZCONFIG
14 export LC_ALL=C
15 export MAKEFLAGS="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))"
17 if [ ! -e /usr/include/dbus-1.0/dbus/dbus-glib.h ]; then
18 echo "Please install the dbus-1-glib-devel package first."
19 exit 1
22 if [ ! -e /usr/include/libIDL-2.0/libIDL/IDL.h ]; then
23 echo "Please install the libidl-devel package first."
24 exit 1
27 if [ ! -e /usr/include/valgrind/valgrind.h ]; then
28 echo "Please install the valgrind-devel package first."
29 exit 1
32 rm -rf ${BUILD} || exit $?
33 rm -rf ${PREFIX} || exit $?
34 mkdir -p ${DOWNLOADS} || exit $?
35 mkdir -p ${BUILD} || exit $?
36 cd ${BUILD} || exit $?
38 if [ ! -e $DOWNLOADS/$TAR ]; then
39 ( cd $DOWNLOADS && wget -q $SRCURL/$TAR )
42 if [ ! -e $SRC ]; then
43 ( cd $SRCDIR && tar -xjf $DOWNLOADS/$TAR )
46 cat <<EOF >$MOZCONFIG
47 . $SRC/browser/config/mozconfig
48 mk_add_options MOZ_OBJDIR="$BUILD"
49 ac_add_app_options browser --enable-application=browser
50 ac_add_options --disable-optimize
51 ac_add_options --disable-tests
52 ac_add_options --enable-debug
53 ac_add_options --enable-optimize="-O1 -g -pipe"
54 ac_add_options --enable-static
55 ac_add_options --prefix $PREFIX
56 ac_add_options --with-valgrind
57 EOF
59 ${SRC}/configure
61 make -s -j2 || exit $?
62 # make -s install || exit $?