+# The OS on which we are running. See [1] for possible values of 'uname -s'.
+# We do a bit of translation to ease our life down the road for comparison.
+# Export it so that called executables can use it.
+# [1] https://en.wikipedia.org/wiki/Uname#Examples
+if [ "x${BT_OS_TYPE:-}" = "x" ]; then
+ BT_OS_TYPE="$(uname -s)"
+ case "$BT_OS_TYPE" in
+ MINGW*)
+ BT_OS_TYPE="mingw"
+ ;;
+ Darwin)
+ BT_OS_TYPE="darwin"
+ ;;
+ Linux)
+ BT_OS_TYPE="linux"
+ ;;
+ *)
+ BT_OS_TYPE="unsupported"
+ ;;
+ esac
+fi
+export BT_OS_TYPE
+