stop returning move(...) when unnecessary
[folly.git] / folly / bootstrap-osx-homebrew.sh
1 #!/bin/bash -x
2 # The only prerequisite should be homebrew. If something doesn't work out of
3 # the box with just homebrew, let's fix it.
4
5 # fail fast
6 set -e
7
8 brewget() {
9     brew install $@ || brew upgrade $@
10 }
11
12 # tool dependencies: autotools, scons (for double-conversion), and gcc 4.9
13 brewget autoconf automake libtool scons gcc
14
15 # dependencies
16 brewget glog gflags boost libevent
17
18 # Install the double-conversion library.
19 # NB their install target installs the libs but not the headers, hence the
20 # CPPFLAGS and link shenanigans.
21 DOUBLE_CONVERSION_CPPFLAGS="-I./double-conversion/src"
22 test -d double-conversion || {
23     git clone https://github.com/floitsch/double-conversion.git
24     pushd double-conversion/src
25     ln -s . double-conversion
26     popd
27 }
28 pushd double-conversion
29 scons
30 # fool libtool into using static linkage
31 # (this won't work if you've already installed libdouble-conversion into a
32 # default search path)
33 rm -f libdouble-conversion*dylib
34 popd
35
36 autoreconf -i
37 ./configure CPPFLAGS="-I./double-conversion/src" LDFLAGS="-L./double-conversion" CXX=g++-4.9