forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·95 lines (83 loc) · 2.55 KB
/
configure
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
#!/bin/sh -e
function show_help () {
cat <<EOL
Usage: configure [options]
-h, --help Displays this help
--disable-mac Disable most of the Mac-related parts.
--disable-ios Disable most of the iOS-related parts.
The iOS build depend on some parts of the Mac build, so
a complete separation is not possible (neither desirable,
some parts will always be enabled to catch common programmer
errors causing build breaks).
The main reasons for disabling either part is to have faster
builds and disable the non-relevant tests.
--disable-ios-device Disables all device-related parts from the iOS build.
This can be used to speed up the build.
--disable-strip: If executables should be stripped or not.
Disable to make it easier to debug executables using lldb.
--enable-ccache
--disable-ccache Enable/disable ccache. Default: enabled if detected.
--enable-xamarin Enable additional Xamarin-specific parts of the build.
EOL
}
CONFIGURED_FILE=configure.inc
rm -f $CONFIGURED_FILE
if test -z "$1"; then
echo "configure: all default values assumed."
exit 0
fi
echo "# Configure arguments: $*" >> $CONFIGURED_FILE
while test x$1 != x; do
case $1 in
--disable-mac)
echo "INCLUDE_MAC=" >> $CONFIGURED_FILE
echo "Mac Build disabled (partially)"
shift
;;
--disable-ios-device)
echo "INCLUDE_DEVICE=" >> $CONFIGURED_FILE
shift
;;
--disable-ios)
echo "INCLUDE_IOS=" >> $CONFIGURED_FILE
echo "INCLUDE_WATCH=" >> $CONFIGURED_FILE
echo "INCLUDE_TVOS=" >> $CONFIGURED_FILE
echo "iOS Build disabled (partially)"
shift
;;
--disable-strip)
echo "DISABLE_STRIP=1" >> $CONFIGURED_FILE
shift
;;
--disable-ccache)
echo "ENABLE_CCACHE=" >> $CONFIGURED_FILE
shift
;;
--enable-ccache)
if ! CCACHE=$(which ccache); then
echo "Could not find ccache"
else
echo "ENABLE_CCACHE=1" >> $CONFIGURED_FILE
echo "cache enabled"
fi
shift
;;
--enable-xamarin)
echo "ENABLE_XAMARIN=1" >> $CONFIGURED_FILE
shift
;;
--enable-bitcode-on-ios)
# Private option
echo "ENABLE_BITCODE_ON_IOS=1" >> $CONFIGURED_FILE
shift
;;
--help|-h)
show_help
exit 0
;;
*)
echo Unknown configure argument $1 >&2
shift
;;
esac
done