summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/guix.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index 477b0e4eb3..63fa00be2f 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -115,3 +115,22 @@ AC_DEFUN([GUIX_ASSERT_GUILE_FEATURES], [
     fi
   done
 ])
+
+dnl GUIX_CHECK_SRFI_37
+dnl
+dnl Check whether SRFI-37 suffers from <http://bugs.gnu.org/13176>.
+dnl This bug was fixed in Guile 2.0.9.
+AC_DEFUN([GUIX_CHECK_SRFI_37], [
+  AC_CACHE_CHECK([whether (srfi srfi-37) is affected by http://bugs.gnu.org/13176],
+    [ac_cv_guix_srfi_37_broken],
+    [if "$GUILE" -c "(use-modules (srfi srfi-37))			\
+       (sigaction SIGALRM (lambda _ (primitive-exit 1)))		\
+       (alarm 1)							\
+       (define opts (list (option '(#\I) #f #t (lambda _ #t))))		\
+       (args-fold '(\"-I\") opts (lambda _ (error)) (lambda _ #f) '())"
+     then
+       ac_cv_guix_srfi_37_broken=no
+     else
+       ac_cv_guix_srfi_37_broken=yes
+     fi])
+])