summaryrefslogtreecommitdiff
path: root/m4/guix.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-09 22:26:51 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-10 00:36:00 +0200
commit9c7dd33a48858b7cb3cc81a99ef84048d7584cdf (patch)
tree1c02a67876cbeda15da7b666193306588ee53154 /m4/guix.m4
parentcf8f58b2afaaa9ac639804992061cb2ae03db582 (diff)
downloadpatches-9c7dd33a48858b7cb3cc81a99ef84048d7584cdf.tar
patches-9c7dd33a48858b7cb3cc81a99ef84048d7584cdf.tar.gz
build: Make sure the user's Guile has all the required features.
* m4/guix.m4 (GUIX_ASSERT_GUILE_FEATURES): New macro. * configure.ac: Use it.
Diffstat (limited to 'm4/guix.m4')
-rw-r--r--m4/guix.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index 6cf1b01c90..4fdc409602 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -67,3 +67,20 @@ AC_DEFUN([GUIX_SYSTEM_TYPE], [
AC_SUBST([guix_system])
])
+
+dnl GUIX_ASSERT_GUILE_FEATURES FEATURES
+dnl
+dnl Assert that FEATURES are provided by $GUILE.
+AC_DEFUN([GUIX_ASSERT_GUILE_FEATURES], [
+ for guix_guile_feature in $1
+ do
+ AC_MSG_CHECKING([whether $GUILE provides feature '$guix_guile_feature'])
+ if "$GUILE" -c "(exit (provided? '$guix_guile_feature))"
+ then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([$GUILE does not support feature '$guix_guile_feature', which is required.])
+ fi
+ done
+])