From 12e5b26643e2269e8f30d8399886d4302c3c09d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 26 Aug 2015 14:07:31 +0200 Subject: build: Do not build (guix build syscalls) if 'mount' is missing from libc. This disables compilation of this module on GNU/Hurd. Reported by Manolis Ragkousis . * m4/guix.m4 (GUIX_CHECK_LIBC_MOUNT): New variable. * configure.ac: Use it. Define 'BUILD_SYSCALLS_MODULE' conditional. * Makefile.am (MODULES, EXTRA_DIST): Make 'guix/build/syscalls.scm' conditional on BUILD_SYSCALLS_MODULE. --- m4/guix.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'm4') diff --git a/m4/guix.m4 b/m4/guix.m4 index fa5a4023ba..2113383770 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 @@ -257,3 +257,16 @@ AC_DEFUN([GUIX_ASSERT_CXX11], [ AC_MSG_ERROR([C++ compiler '$CXX' does not support the C++11 standard]) fi ]) + +dnl GUIX_CHECK_LIBC_MOUNT +dnl +dnl Check whether libc provides 'mount'. On GNU/Hurd it doesn't (yet). +AC_DEFUN([GUIX_CHECK_LIBC_MOUNT], [ + AC_CACHE_CHECK([whether libc provides 'mount'], [guix_cv_libc_has_mount], + [GUILE_CHECK([retval], [(dynamic-func \"mount\" (dynamic-link))]) + if test "$retval" = 0; then + guix_cv_libc_has_mount="yes" + else + guix_cv_libc_has_mount="no" + fi]) +]) -- cgit v1.2.3