summaryrefslogtreecommitdiff
path: root/config-daemon.ac
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-04 23:13:59 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-04 23:51:48 +0100
commit2606bbcf917c0bc1b2ed10a104acfbbe151a941b (patch)
tree8403c4e2fbc77e6099fe48b386379ad1d535bad2 /config-daemon.ac
parentca8dbb7d4e663bcd9aed91606c253ac384124fa5 (diff)
downloadpatches-2606bbcf917c0bc1b2ed10a104acfbbe151a941b.tar
patches-2606bbcf917c0bc1b2ed10a104acfbbe151a941b.tar.gz
build: daemon: Add missing feature tests.
* config-daemon.ac: Add feature tests needed for the daemon code. Taken from Nix's `configure.ac'.
Diffstat (limited to 'config-daemon.ac')
-rw-r--r--config-daemon.ac32
1 files changed, 32 insertions, 0 deletions
diff --git a/config-daemon.ac b/config-daemon.ac
index 6420c86116..a10be14632 100644
--- a/config-daemon.ac
+++ b/config-daemon.ac
@@ -59,6 +59,38 @@ if test "x$guix_build_daemon" = "xyes"; then
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"
+
+ dnl Chroot support.
+ AC_CHECK_FUNCS([chroot unshare])
+ AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h])
+
+ dnl Check for lutimes, optionally used for changing the mtime of
+ dnl symlinks.
+ AC_CHECK_FUNCS([lutimes])
+
+ dnl Check whether the store optimiser can optimise symlinks.
+ AC_MSG_CHECKING([whether it is possible to create a link to a symlink])
+ ln -s bla tmp_link
+ if ln tmp_link tmp_link2 2> /dev/null; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(CAN_LINK_SYMLINK, 1, [Whether link() works on symlinks.])
+ else
+ AC_MSG_RESULT(no)
+ fi
+ rm -f tmp_link tmp_link2
+
+ dnl Check for <locale>.
+ AC_LANG_PUSH(C++)
+ AC_CHECK_HEADERS([locale])
+ AC_LANG_POP(C++)
+
+
+ dnl Check whether we have the `personality' syscall, which allows us
+ dnl to do i686-linux builds on x86_64-linux machines.
+ AC_CHECK_HEADERS([sys/personality.h])
+
+ dnl Check for <linux/fs.h> (for immutable file support).
+ AC_CHECK_HEADERS([linux/fs.h])
fi
AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"])