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.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index fe5fa136e95f..3e0bca31ef9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,14 @@ AC_PREFIX_DEFAULT(/nix)
 
 AC_CANONICAL_HOST
 
+# Construct a Nix system name (like "i686-linux").
+AC_MSG_CHECKING([for the canonical Nix system name])
+machine_name=`uname -m`
+sys_name=`uname -s | tr [A-Z] [a-z]`
+system="${machine_name}-${sys_name}"
+AC_MSG_RESULT($system)
+AC_SUBST(system)
+
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB