--- /dev/null
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.68])
+AC_INIT([canon-name], [0.1], [pho@cielonegro.org])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src/canon-name.c])
+AC_CONFIG_HEADERS([src/config.h])
+
+AM_MAINTAINER_MODE
+
+# Checks for environments.
+AC_CANONICAL_HOST
+AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [Canonical host CPU name])
+AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"], [Canonical host vendor name])
+AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [Canonical host OS name])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_CHECK_FUNCS([strcspn])
+
+# Done.
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ ])
+AC_OUTPUT
--- /dev/null
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+
+int main(int argc, char* argv[]) {
+ size_t n_non_digits = strcspn(HOST_OS, "0123456789");
+ printf("%s-%s-%.*s\n", HOST_CPU, HOST_VENDOR, n_non_digits, HOST_OS);
+}