aboutsummaryrefslogtreecommitdiff
path: root/m4/guix.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-05 21:54:52 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-05 21:54:52 +0200
commitb97556d75cb5f4d1d665320f7d1217ce9189460d (patch)
tree1c8c5ff2c8a0aa640cbbced9b1983fedd67420e2 /m4/guix.m4
parenteb25a30a42fcfa5e3fec9c87b3f8a2ff20d01c3c (diff)
downloadgnu-guix-b97556d75cb5f4d1d665320f7d1217ce9189460d.tar
gnu-guix-b97556d75cb5f4d1d665320f7d1217ce9189460d.tar.gz
build: Bail out on unsupported platforms; add `--with-courage'.
* m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): New macro. * configure.ac: Use it.
Diffstat (limited to 'm4/guix.m4')
-rw-r--r--m4/guix.m429
1 files changed, 29 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index ed2e720241..477b0e4eb3 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -70,6 +70,35 @@ AC_DEFUN([GUIX_SYSTEM_TYPE], [
AC_SUBST([guix_system])
])
+dnl GUIX_ASSERT_SUPPORTED_SYSTEM
+dnl
+dnl Assert that this is a system to which the distro is ported.
+AC_DEFUN([GUIX_ASSERT_SUPPORTED_SYSTEM], [
+ AC_REQUIRE([GUIX_SYSTEM_TYPE])
+
+ AC_ARG_WITH([courage], [AC_HELP_STRING([--with-courage],
+ [Assert that even if this platform is unsupported, you will be
+courageous and port the GNU System distribution to it (see
+"GNU Distribution" in the manual.)])],
+ [guix_courageous="$withval"],
+ [guix_courageous="no"])
+
+ # Currently only Linux-based systems are supported, and only on some
+ # platforms.
+ case "$guix_system" in
+ x86_64-linux|i686-linux)
+ ;;
+ *)
+ if test "x$guix_courageous" = "xyes"; then
+ AC_MSG_WARN([building Guix on `$guix_system', which is not supported])
+ else
+ AC_MSG_ERROR([`$guix_system' is not a supported platform.
+See "GNU Distribution" in the manual, or try `--with-courage'.])
+ fi
+ ;;
+ esac
+])
+
dnl GUIX_ASSERT_GUILE_FEATURES FEATURES
dnl
dnl Assert that FEATURES are provided by $GUILE.