]> git.lizzy.rs Git - rust.git/blobdiff - configure
[breaking-change] don't glob export ast::StrStyle variants
[rust.git] / configure
index 572e486f8164356a4004222deef1b29148a2841a..dde17e76d8a865123fc128a0dd94d9a483553464 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,13 @@
 #!/bin/sh
 
+# /bin/sh on Solaris is not a POSIX compatible shell, but /usr/bin/bash is.
+if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then
+    POSIX_SHELL="true"
+    export POSIX_SHELL
+    exec /usr/bin/env bash $0 "$@"
+fi
+unset POSIX_SHELL # clear it so if we invoke other scripts, they run as bash as well
+
 msg() {
     echo "configure: $*"
 }
@@ -416,6 +424,11 @@ case $CFG_OSTYPE in
         CFG_OSTYPE=apple-darwin
         ;;
 
+    SunOS)
+        CFG_OSTYPE=sun-solaris
+        CFG_CPUTYPE=$(isainfo -n)
+        ;;
+
     MINGW*)
         # msys' `uname` does not print gcc configuration, but prints msys
         # configuration. so we cannot believe `uname -m`:
@@ -1164,7 +1177,7 @@ do
             ;;
 
 
-        *-musl)
+        x86_64-*-musl)
             if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ]
             then
                 err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found"
@@ -1292,6 +1305,12 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
             putvar CFG_DISABLE_JEMALLOC
             ;;
 
+        *-emscripten)
+            step_msg "targeting emscripten, disabling jemalloc"
+            CFG_DISABLE_JEMALLOC=1
+            putvar CFG_DISABLE_JEMALLOC
+            ;;
+
         *)
             ;;
     esac