-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·120 lines (105 loc) · 3 KB
/
configure
File metadata and controls
executable file
·120 lines (105 loc) · 3 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh -x
. `dirname "$0"`/functions
. detect-environment
. compile-options
case "$PROJECT" in
community) NOVA=no ;;
nova) NOVA=yes ;;
*) fatal "Unknown project: $PROJECT" ;;
esac
P=$BUILDPREFIX
ARGS="--prefix=$P --with-workdir=$P --sysconfdir=/etc --with-openssl=$P --with-pcre=$P --with-init-script"
if [ $EMBEDDED_DB = lmdb ]
then
var_append ARGS "--with-lmdb=$P"
fi
case "$DEPS" in
*pthreads-w32*) var_append ARGS "--with-pthreads=$P" ;;
esac
case "$DEPS" in
*openldap*) var_append ARGS "--with-ldap=$P" ;;
*) var_append ARGS "--without-ldap" ;;
esac
case "$DEPS" in
*libxml2*) var_append ARGS "--with-libxml2=$P" ;;
*) var_append ARGS "--without-libxml2" ;;
esac
case "$DEPS" in
*libyaml*) var_append ARGS "--with-libyaml=$P" ;;
*) var_append ARGS "--without-libyaml" ;;
esac
case "$DEPS" in
*postgresql*) var_append ARGS "--with-postgresql=$P --without-mysql" ;;
*) var_append ARGS "--without-sql" ;;
esac
case "$DEPS" in
*libacl*) var_append ARGS "--with-libacl=$P" ;;
*) var_append ARGS "--without-libacl" ;;
esac
case "$DEPS" in
*libvirt*) var_append ARGS "--with-libvirt=$P" ;;
*) var_append ARGS "--without-libvirt" ;;
esac
# both libcurl or libcurl-hub are valid
case "$DEPS" in
*libcurl*) var_append ARGS "--with-libcurl=$P" ;;
*) var_append ARGS "--without-libcurl" ;;
esac
case "$ROLE" in
hub) var_append ARGS "--with-cfmod --with-enterprise-api --with-postgresql-hub=$P" ;;
agent) var_append ARGS "--without-cfmod --without-postgresql-hub" ;;
*) fatal "Unknown ROLE: $ROLE" ;;
esac
case "$WITH_SYSTEMD" in
yes) var_append ARGS "--with-systemd-service" ;;
*) var_append ARGS "--without-systemd-service" ;;
esac
# Cross-compiling Windows?
case "$ARCH-${OS_FAMILY}" in
x86-mingw) var_append ARGS "--host=i686-w64-mingw32" ;;
x64-mingw) var_append ARGS "--host=x86_64-w64-mingw32" ;;
esac
case "$BUILD_TYPE" in
RELEASE)
CFLAGS="-g2 -O2 -DNDEBUG $CFLAGS"
;;
DEBUG)
ARGS="$ARGS --enable-debug"
# Override the default "-g3 -O0" that comes with ./configure --enable-debug
# in order to reduce the size of the packages
CFLAGS="-ggdb3 -O0 $CFLAGS"
;;
CODE_COVERAGE)
ARGS="$ARGS --enable-debug"
# lcov is not found in Windows and other platforms
case "${OS}-${OS_VERSION}" in
mingw*)
;;
hpux*)
;;
solaris*)
;;
rhel-4.*)
;;
aix*)
;;
*)
ARGS="$ARGS --enable-coverage"
;;
esac
;;
*)
echo "Unknown build type: $BUILD_TYPE"
exit 42
;;
esac
( cd $BASEDIR/core && env $OPTS CFLAGS="$CFLAGS" ./configure $ARGS )
if [ "x$NOVA" = "xyes" ]
then
( cd $BASEDIR/enterprise && env $OPTS CFLAGS="$CFLAGS" ./configure $ARGS )
if [ "x$ROLE" = "xhub" ]
then
( cd $BASEDIR/nova && env $OPTS CFLAGS="$CFLAGS" ./configure $ARGS )
fi
fi
( cd $BASEDIR/masterfiles && env $OPTS CFLAGS="$CFLAGS" ./configure $ARGS )