build: Bump version number.
[jackhill/guix/guix.git] / config-daemon.ac
index a13525a..f96cc8f 100644 (file)
@@ -5,9 +5,12 @@ AC_MSG_RESULT([$guix_build_daemon])
 
 dnl C++ environment.  This macro must be used unconditionnaly.
 AC_PROG_CXX
+AC_LANG([C++])
 
 if test "x$guix_build_daemon" = "xyes"; then
 
+  GUIX_ASSERT_CXX11
+
   AC_PROG_RANLIB
   AC_CONFIG_HEADER([nix/config.h])
 
@@ -73,15 +76,22 @@ if test "x$guix_build_daemon" = "xyes"; then
 
   dnl Chroot support.
   AC_CHECK_FUNCS([chroot unshare])
-  AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h])
+  AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h sys/syscall.h])
+
+  if test "x$ac_cv_func_chroot" != "xyes"; then
+    AC_MSG_ERROR(['chroot' function missing, bailing out])
+  fi
 
   dnl lutimes and lchown: used when canonicalizing store items.
   dnl posix_fallocate: used when extracting archives.
   dnl vfork: to speed up spawning of helper programs.
+  dnl   `--> now disabled because of unpredictable behavior:
+  dnl        see <http://lists.gnu.org/archive/html/guix-devel/2014-05/msg00036.html>
+  dnl        and Nix commit f794465c (Nov. 2012).
   dnl sched_setaffinity: to improve RPC locality.
   dnl statvfs: to detect disk-full conditions.
   dnl strsignal: for error reporting.
-  AC_CHECK_FUNCS([lutimes lchown posix_fallocate vfork sched_setaffinity \
+  AC_CHECK_FUNCS([lutimes lchown posix_fallocate sched_setaffinity \
      statvfs nanosleep strsignal])
 
   dnl Check whether the store optimiser can optimise symlinks.
@@ -120,15 +130,14 @@ if test "x$guix_build_daemon" = "xyes"; then
   fi
 
   dnl Temporary directory used to store the daemon's data.
-  AC_MSG_CHECKING([for unit test root])
-  GUIX_TEST_ROOT="`pwd`/test-tmp"
-  AC_MSG_RESULT([$GUIX_TEST_ROOT])
+  GUIX_TEST_ROOT_DIRECTORY
+  GUIX_TEST_ROOT="$ac_cv_guix_test_root"
   AC_SUBST([GUIX_TEST_ROOT])
 
   AC_CONFIG_FILES([nix/scripts/list-runtime-roots],
     [chmod +x nix/scripts/list-runtime-roots])
-  AC_CONFIG_FILES([nix/scripts/substitute-binary],
-    [chmod +x nix/scripts/substitute-binary])
+  AC_CONFIG_FILES([nix/scripts/substitute],
+    [chmod +x nix/scripts/substitute])
   AC_CONFIG_FILES([nix/scripts/guix-authenticate],
     [chmod +x nix/scripts/guix-authenticate])
   AC_CONFIG_FILES([nix/scripts/offload],