about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-11-16T20·58+0000
committerLudovic Courtès <ludo@gnu.org>2011-11-16T20·58+0000
commit42164d6de493fa2e0acbf1ebaf9ee0d7502b4f0b (patch)
treeec9d3dbc3cee86aad7e21d252129ec6c4cd1d49e
parent45ec69cbdf7e5e7ff19d28c8f25c7f650105b253 (diff)
configure: Change i*86 to i686 as has always been done.
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 6840120a4803..b3cc8eeea208 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,14 +14,21 @@ AC_MSG_CHECKING([for the canonical Nix system name])
 AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
   [Platform identifier (e.g., `i686-linux').]),
   [system=$withval],
-  [case "$host_os" in
+  [case "$host_cpu" in
+     i*86)
+        machine_name="i686";;
+     *)
+        machine_name="$host_cpu";;
+   esac
+
+   case "$host_os" in
      linux-gnu*)
 	# For backward compatibility, strip the `-gnu' part.
-	system="$host_cpu-linux";;
+	system="$machine_name-linux";;
      *)
         # Strip the version number from names such as `gnu0.3',
         # `darwin10.2.0', etc.
-	system="$host_cpu-`echo $host_os | "$SED" -e's/[0-9.]\+$//g'`";;
+	system="$machine_name-`echo $host_os | "$SED" -e's/[0-9.]\+$//g'`";;
    esac])
 
 AC_MSG_RESULT($system)