-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen_freebsd.sh
63 lines (59 loc) · 1.92 KB
/
autogen_freebsd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Set the FreeBSD specific configure flags
FREEBSD_CONFIGURE_FLAGS=
if [ x`uname`x = x"FreeBSD"x ]; then
MAKE=gmake
# We need at least something > clang 3.4
# tested with package clang37 on FreeBSD 10.2 ( Which has 3.4 as default )
if clang -v 2>&1 | grep -q "3.8" ; then
CC=clang
CXX=clang++
elif [ -f /usr/local/bin/clang37 ]; then
CC=clang37
CXX=clang++37
else
echo "Need a better compiler"
exit 1
fi
CWARN=""
CLANGWARN="-Wno-unused-function -Wno-unused-local-typedef -Wno-inconsistent-missing-override"
CLANGWARN="$CLANGWARN -Wno-unused-private-field"
CLANGWARN="$CLANGWARN -Wno-varargs"
CLANGWARN="$CLANGWARN -Wno-gnu-designator"
# "-Wno-unused-local-typedef -Wno-mismatched-tags -Wno-macro-redefined -Wno-unused-function -Wno-unused-label -Wno-undefined-bool-conversion -Wno-unused-private-field -Wno-unused-local-typedef -Wno-uninitialized -Wno-gnu-designator -Wno-inconsistent-missing-override -Wno-deprecated-declarations -Wno-parentheses"
CFLAGS="-g -I/usr/local/include ${CWARN} ${CLANGWARN}"
CXXFLAGS="-g -DGTEST_USE_OWN_TR1_TUPLE=1 -I/usr/local/include ${CWARN} ${CLANGWARN}"
LDFLAGS="-g ${LDFLAGS} -L/usr/local/lib -export-dynamic -luuid"
FREEBSD_CONFIGURE_FLAGS="
--disable-silent-rules
--disable-gitversion
--with-debug
--with-rados
--without-rbd
--with-radosgw
--with-radosstriper
--with-mon
--with-osd
--with-mds
--with-radosgw
--with-nss
--without-tcmalloc
--without-libaio
--without-libxfs
--without-fuse
--without-lttng
--with-libzfs=no
--without-rocksdb
--without-cephfs
"
# --without-radosgw
# --with-gnu-ld
fi
CONFIGURE_FLAGS="${FREEBSD_CONFIGURE_FLAGS}"
# Export these so that ./configure will pick up
export MAKE
export CC
export CXX
export CFLAGS
export CXXFLAGS
export CONFIGURE_FLAGS
export LDFLAGS