2 # The only prerequisite should be homebrew. If something doesn't work out of
3 # the box with just homebrew, let's fix it.
8 BASE_DIR="$(cd "$(dirname -- "$0")"/.. ; pwd)" # folly/folly
13 brew install $@ || brew upgrade $@
19 dependencies=(autoconf automake libtool pkg-config double-conversion glog gflags boost libevent xz snappy lz4 jemalloc openssl)
22 for dependency in ${dependencies[@]}; do
23 brew_install ${dependency}
30 OPT_GFLAGS=$(brew --prefix gflags)
31 OPT_OPENSSL=$(brew --prefix openssl)
34 export LDFLAGS=-L${OPT_OPENSSL}/lib
35 export OPENSSL_INCLUDES=-I${OPT_OPENSSL}/include
36 export GFLAGS_LIBS=-L${OPT_GFLAGS}/lib
37 export GFLAGS_CFLAGS=-I${OPT_GFLAGS}/include
44 ./configure --disable-silent-rules --disable-dependency-tracking
46 # fetch googletest, if doesn't exist
49 GTEST_DIR=gtest-${GTEST_VER}
50 if [ ! -d ${GTEST_DIR} ]; then
53 https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz | \
54 tar -xvzf - --strip-components=1 -C ${GTEST_DIR}