2016-04-21 11:59:27 +03:00
|
|
|
#!/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.
|
|
|
|
|
2016-05-19 15:33:35 +03:00
|
|
|
--disable-ios-device Disables all device-related parts from the iOS build.
|
|
|
|
This can be used to speed up the build.
|
|
|
|
|
2016-04-21 11:59:27 +03:00
|
|
|
--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.
|
|
|
|
|
2018-05-09 11:57:23 +03:00
|
|
|
--disable-packaged-llvm Compile LLVM instead of downloading a precompiled version.
|
2018-12-11 09:48:05 +03:00
|
|
|
|
2019-08-19 23:10:31 +03:00
|
|
|
--enable-packaged-mono
|
|
|
|
--disable-packaged-mono Enable/disable using the precompiled version of mono. If disabled mono will be compiled from source.
|
2020-03-06 00:03:38 +03:00
|
|
|
|
|
|
|
--enable-dotnet Enable building .NET 5 bits.
|
2020-05-20 10:26:27 +03:00
|
|
|
--disable-dotnet Disable building .NET 5 bits.
|
2020-06-22 11:26:21 +03:00
|
|
|
|
|
|
|
--enable-documentation Enable building of API documentation
|
|
|
|
--disable-documentation Disable building of API documentation.
|
|
|
|
|
|
|
|
--enable-install-source Enable building of API documentation
|
|
|
|
--disable-install-source Disable building of API documentation.
|
2016-04-21 11:59:27 +03:00
|
|
|
EOL
|
|
|
|
}
|
|
|
|
|
2016-04-26 19:38:15 +03:00
|
|
|
CONFIGURED_FILE=configure.inc
|
|
|
|
|
|
|
|
rm -f $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
|
|
|
|
if test -z "$1"; then
|
|
|
|
echo "configure: all default values assumed."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-05-27 22:37:21 +03:00
|
|
|
echo "# Configure arguments: $*" >> $CONFIGURED_FILE
|
|
|
|
|
2016-04-21 11:59:27 +03:00
|
|
|
while test x$1 != x; do
|
|
|
|
case $1 in
|
|
|
|
--disable-mac)
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "INCLUDE_MAC=" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
echo "Mac Build disabled (partially)"
|
|
|
|
shift
|
|
|
|
;;
|
2016-05-19 15:33:35 +03:00
|
|
|
--disable-ios-device)
|
|
|
|
echo "INCLUDE_DEVICE=" >> $CONFIGURED_FILE
|
|
|
|
shift
|
|
|
|
;;
|
2016-04-21 11:59:27 +03:00
|
|
|
--disable-ios)
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "INCLUDE_IOS=" >> $CONFIGURED_FILE
|
|
|
|
echo "INCLUDE_WATCH=" >> $CONFIGURED_FILE
|
|
|
|
echo "INCLUDE_TVOS=" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
echo "iOS Build disabled (partially)"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--disable-strip)
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "DISABLE_STRIP=1" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--disable-ccache)
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "ENABLE_CCACHE=" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--enable-ccache)
|
2020-03-05 00:07:07 +03:00
|
|
|
if ! command -v ccache >/dev/null; then
|
2016-04-21 11:59:27 +03:00
|
|
|
echo "Could not find ccache"
|
|
|
|
else
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "ENABLE_CCACHE=1" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
echo "cache enabled"
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--enable-xamarin)
|
2016-04-26 19:38:15 +03:00
|
|
|
echo "ENABLE_XAMARIN=1" >> $CONFIGURED_FILE
|
2016-04-21 11:59:27 +03:00
|
|
|
shift
|
|
|
|
;;
|
2016-05-21 20:03:43 +03:00
|
|
|
--enable-bitcode-on-ios)
|
|
|
|
# Private option
|
|
|
|
echo "ENABLE_BITCODE_ON_IOS=1" >> $CONFIGURED_FILE
|
|
|
|
shift
|
|
|
|
;;
|
2018-05-09 11:57:23 +03:00
|
|
|
--disable-packaged-llvm)
|
2018-10-10 18:02:28 +03:00
|
|
|
echo "DISABLE_DOWNLOAD_LLVM=1" >> $CONFIGURED_FILE
|
2018-05-09 11:57:23 +03:00
|
|
|
shift
|
|
|
|
;;
|
2019-08-19 23:10:31 +03:00
|
|
|
--enable-packaged-mono)
|
|
|
|
echo "MONO_BUILD_FROM_SOURCE=" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
2018-12-11 09:48:05 +03:00
|
|
|
--disable-packaged-mono)
|
|
|
|
echo "MONO_BUILD_FROM_SOURCE=1" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
2019-06-20 08:44:34 +03:00
|
|
|
--disable-packaged-mono=no | --disable-packaged-mono=false)
|
|
|
|
echo "MONO_BUILD_FROM_SOURCE=" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
2020-03-06 00:03:38 +03:00
|
|
|
--enable-dotnet)
|
|
|
|
echo "ENABLE_DOTNET=1" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--disable-dotnet)
|
|
|
|
echo "ENABLE_DOTNET=" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
2020-06-22 11:26:21 +03:00
|
|
|
--enable-install-source)
|
|
|
|
echo "ENABLE_INSTALL_SOURCE=1" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--disable-install-source)
|
|
|
|
echo "ENABLE_INSTALL_SOURCE=" >> "$CONFIGURED_FILE"
|
|
|
|
shift
|
|
|
|
;;
|
2016-04-21 11:59:27 +03:00
|
|
|
--help|-h)
|
|
|
|
show_help
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
*)
|
2020-03-05 00:07:07 +03:00
|
|
|
echo "Unknown configure argument $1" >&2
|
2016-04-21 11:59:27 +03:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2020-07-16 03:13:57 +03:00
|
|
|
exit 0
|