summaryrefslogtreecommitdiff
path: root/m4/guix.m4
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-08-06 10:07:36 +0200
committerRicardo Wurmus <rekado@elephly.net>2019-08-06 10:07:36 +0200
commit378d94e51b00c30b19a39154278d01f1f3c4dbc1 (patch)
tree0c9ed3a1c1b6db778b05ad03fa8edd91cfb737f4 /m4/guix.m4
parentd350d5e71434704d147b1252d21e46daf6bb9885 (diff)
parent6a5198170ed5f10e1eee2e25fc6a39f3f33a40fd (diff)
Merge remote-tracking branch 'origin/master' into wip-texlive
Diffstat (limited to 'm4/guix.m4')
-rw-r--r--m4/guix.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index d0c5ec0f08..716bfb08ec 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -174,6 +174,27 @@ AC_DEFUN([GUIX_CHECK_GUILE_SQLITE3], [
fi])
])
+dnl GUIX_CHECK_GUILE_JSON
+dnl
+dnl Check whether a recent-enough Guile-JSON is available.
+AC_DEFUN([GUIX_CHECK_GUILE_JSON], [
+ dnl Check whether we're using Guile-JSON 3.x, which uses a JSON-to-Scheme
+ dnl mapping different from that of earlier versions.
+ AC_CACHE_CHECK([whether Guile-JSON is available and recent enough],
+ [guix_cv_have_recent_guile_json],
+ [GUILE_CHECK([retval],
+ [(use-modules (json) (ice-9 match))
+ (match (json-string->scm \"[[] { \\\"a\\\": 42 } []]\")
+ (#(("a" . 42)) #t)
+ (_ #f))])
+ if test "$retval" = 0; then
+ guix_cv_have_recent_guile_json="yes"
+ else
+ guix_cv_have_recent_guile_json="no"
+ fi])
+])
+
+
dnl GUIX_TEST_ROOT_DIRECTORY
AC_DEFUN([GUIX_TEST_ROOT_DIRECTORY], [
AC_CACHE_CHECK([for unit test root directory],