-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure.sh
executable file
·89 lines (76 loc) · 1.91 KB
/
configure.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
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
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
echo configure.sh =============================================================
source setenv.sh
extra_configure_flags=()
if $use_java
then
if [ -z "${jdk+x}" ]
then
extra_configure_flags+=("--java")
else
extra_configure_flags+=("--java=${jdk}")
fi
android_jar="$android_sdk/platforms/android-$android_target_api/android.jar"
if [ ! -f "$android_jar" ]
then
echo "Error: $android_jar doesn't exist, check that android_sdk and android_target_api are correct" 1>&2
exit 1
fi
fi
if $use_security
then
extra_configure_flags+=("--xerces3=${XERCESCROOT}" "--openssl=${SSL_ROOT}" --security)
fi
if [ -n "$host_tools" ]
then
extra_configure_flags+=("--host-tools=$host_tools" "--no-tests")
fi
if [ $ndk_major_rev -lt 16 ]
then
extra_configure_flags+=(
"--macros=__NDK_MINOR__:=$ndk_minor_rev"
"--macros=__NDK_MAJOR__:=$ndk_major_rev"
# platform_android.GNU should be defining this automatically, but that
# doesn't seem to be working...
'--configh=#define ACE_ANDROID_NDK_MISSING_NDK_VERSION_H'
)
fi
if [ $ndk_major_rev -lt 15 ]
then
extra_configure_flags+=("--macros=android_force_clang:=0")
fi
if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_flags+=("--std=$force_cpp_std")
fi
if ! $use_toolchain
then
extra_configure_flags+=(
"--macros=android_ndk:=$OPENDDS_ANDROID_NDK"
"--macros=android_api:=$api"
)
fi
pushd $workspace/OpenDDS > /dev/null
./configure --target=android \
--verbose \
--ace=$ACE_ROOT \
--tao=$TAO_ROOT \
--tests \
--no-inline \
--mpc:workers $logical_cores \
--macros=ANDROID_ABI:=$abi \
"${extra_configure_flags[@]}"
popd > /dev/null
if $build_ace_tests
then
pushd $ace_target/tests > /dev/null
old_ace_root="$ACE_ROOT"
export ACE_ROOT="$ace_target"
mwc.pl -type gnuace tests.mwc
export ACE_ROOT="$old_ace_root"
unset old_ace_root
popd > /dev/null
fi