about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9bc3a0288a24..0d7045de18f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,10 +22,20 @@ AC_CANONICAL_HOST
 
 # Construct a Nix system name (like "i686-linux").
 AC_MSG_CHECKING([for the canonical Nix system name])
-machine_name=$(uname -p | tr 'A-Z ' 'a-z_')
-if test "$machine_name" = "unknown"; then
-    machine_name=$(uname -m | tr 'A-Z ' 'a-z_')
-fi
+cpu_name=$(uname -p | tr 'A-Z ' 'a-z_')
+machine_name=$(uname -m | tr 'A-Z ' 'a-z_')
+
+case $machine_name in
+    i*86)
+        machine_name=i686
+        ;;
+    *)
+        if test "$cpu_name" != "unknown"; then
+            machine_name=$cpu_name
+        fi
+        ;;
+esac
+
 sys_name=$(uname -s | tr 'A-Z ' 'a-z_')
 AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
   [platform identifier (e.g., `i686-linux')]),