summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-17 11:05:19 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-17 11:05:19 +0200
commit1959fb04dc4608206bdcc6908ca3f0d71a43eda8 (patch)
tree849d93fbb2103afe254c1ad13b71bf1387187a82 /m4
parent4a328f7342ade8dd8536638e19bc8a5b33bb89fe (diff)
downloadguix-1959fb04dc4608206bdcc6908ca3f0d71a43eda8.tar.gz
build: Provide a replacement (srfi srfi-37) when the user's one is broken.
* srfi/srfi-37.scm.in: New file, taken from Guile 2.0.9.
* m4/guix.m4: New macro.
* configure.ac: Use it.  Define Automake conditional `INSTALL_SRFI_37'.
* Makefile.am (nobase_nodist_guilemodule_DATA)[INSTALL_SRFI_37]: Add
  srfi/srfi-37.scm.
  (GOBJECTS)[INSTALL_SRFI_37]: Add srfi/srfi-37.go.
  (srfi/srfi-37.scm)[INSTALL_SRFI_37]: New target.
  (EXTRA_DIST): Add srfi/srfi-37.scm.in.
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])
+])