forked from OpenDDS/OpenDDS-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
executable file
·88 lines (74 loc) · 2.04 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
#!/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
extra_configure_flags+=("--macros=ANDROID_API_PATH=$ANDROID_SDK/platforms/android-$target_api")
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")
fi
if [ $ndk_major_rev -lt 15 ]
then
extra_configure_flags+=("--macros=android_force_clang:=0")
fi
if $use_oci_ace_tao
then
extra_configure_flags+=("--macros=CPPFLAGS+=-Wno-deprecated-declarations")
fi
if ! $use_toolchain
then
extra_configure_flags+=(
"--macros=android_ndk:=$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 \
--mpcopts "-workers $logical_cores" \
--macros=ANDROID_ABI:=$abi \
"${extra_configure_flags[@]}"
popd > /dev/null
# Avoid Deprecated POSIX Functions in ACE that OpenDDS Doesn't Use
echo '#define ACE_DISABLE_MKTEMP' >> "$ace_target/ace/config.h"
echo '#define ACE_DISABLE_TEMPNAM' >> "$ace_target/ace/config.h"
echo '#define ACE_LACKS_READDIR_R' >> "$ace_target/ace/config.h"
if $use_oci_ace_tao && [ ! -z "${ace_host+x}" ]
then
echo 'CPPFLAGS += -Wno-deprecated-declarations -Wno-deprecated-copy' >> \
"$ace_host/include/makeinclude/platform_macros.GNU"
fi
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