-dnl Check whether 'setbvuf' works on custom binary input ports (CBIPs), as is
-dnl the case starting with Guile 2.0.10.
-AC_DEFUN([GUIX_CHECK_UNBUFFERED_CBIP], [
- AC_CACHE_CHECK([whether Guile's custom binary input ports support 'setvbuf'],
- [ac_cv_guix_cbips_support_setvbuf],
- [if "$GUILE" -c "(use-modules (rnrs io ports)) \
- (let ((p (make-custom-binary-input-port \"cbip\" pk #f #f #f))) \
- (setvbuf p _IONBF))" >&5 2>&1
- then
- ac_cv_guix_cbips_support_setvbuf=yes
+dnl Check whether a recent-enough Guile-SSH is available.
+AC_DEFUN([GUIX_CHECK_GUILE_SSH], [
+ dnl Check whether 'channel-send-eof' (introduced in 0.10.2) is present.
+ AC_CACHE_CHECK([whether Guile-SSH is available and recent enough],
+ [guix_cv_have_recent_guile_ssh],
+ [GUILE_CHECK([retval],
+ [(and (@ (ssh channel) channel-send-eof)
+ (@ (ssh popen) open-remote-pipe)
+ (@ (ssh dist node) node-eval))])
+ if test "$retval" = 0; then
+ guix_cv_have_recent_guile_ssh="yes"
+ else
+ guix_cv_have_recent_guile_ssh="no"
+ fi])
+])
+
+dnl GUIX_CHECK_GUILE_SQLITE3
+dnl
+dnl Check whether a recent-enough Guile-Sqlite3 is available.
+AC_DEFUN([GUIX_CHECK_GUILE_SQLITE3], [
+ dnl Check whether 'sqlite-bind-arguments' is available. It was introduced
+ dnl in February 2018:
+ dnl <https://notabug.org/guile-sqlite3/guile-sqlite3/commit/1cd1dec96a9999db48c0ff45bab907efc637247f>.
+ AC_CACHE_CHECK([whether Guile-Sqlite3 is available and recent enough],
+ [guix_cv_have_recent_guile_sqlite3],
+ [GUILE_CHECK([retval],
+ [(@ (sqlite3) sqlite-bind-arguments)])
+ if test "$retval" = 0; then
+ guix_cv_have_recent_guile_sqlite3="yes"