aboutsummaryrefslogtreecommitdiff
path: root/config-daemon.ac
blob: 04f0fde3b24ac4bd83b1fcf892f23cf84148ad0a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
dnl -*- Autoconf -*- fragment for the C++ daemon.

AC_MSG_CHECKING([whether to build daemon])
AC_MSG_RESULT([$guix_build_daemon])

dnl C++ environment.  This macro must be used unconditionnaly.
AC_PROG_CXX
AM_PROG_AR
AC_LANG([C++])

if test "x$guix_build_daemon" = "xyes"; then

  GUIX_ASSERT_CXX11

  AC_PROG_RANLIB
  AC_CONFIG_HEADER([nix/config.h])

  dnl Use 64-bit file system calls so that we can support files > 2 GiB.
  AC_SYS_LARGEFILE

  dnl Look for zlib, a required dependency.
  AC_CHECK_LIB([z], [gzdopen], [true],
    [AC_MSG_ERROR([Guix requires zlib.  See http://www.zlib.net/.])])
  AC_CHECK_HEADERS([zlib.h], [true],
    [AC_MSG_ERROR([Guix requires zlib.  See http://www.zlib.net/.])])

  dnl Look for libbz2, an optional dependency.
  AC_CHECK_LIB([bz2], [BZ2_bzWriteOpen], [HAVE_LIBBZ2=yes], [HAVE_LIBBZ2=no])
  if test "x$HAVE_LIBBZ2" = xyes; then
    AC_CHECK_HEADERS([bzlib.h])
    HAVE_LIBBZ2="$ac_cv_header_bzlib_h"
  fi

  dnl Look for SQLite, a required dependency.
  PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.6.19])

  AC_DEFINE([NIX_VERSION], ["0.0.0"], [Fake Nix version number.])
  AC_DEFINE_UNQUOTED([SYSTEM], ["$guix_system"],
    [Guix host system type--i.e., platform and OS kernel tuple.])

  case "$LIBGCRYPT_PREFIX" in
    no)
      LIBGCRYPT_CFLAGS=""
      ;;
    *)
      LIBGCRYPT_CFLAGS="-I$LIBGCRYPT_PREFIX/include"
      ;;
  esac

  case "$LIBGCRYPT_LIBDIR" in
    no | "")
      LIBGCRYPT_LIBS="-lgcrypt"
      ;;
    *)
      LIBGCRYPT_LIBS="-L$LIBGCRYPT_LIBDIR -lgcrypt"
      ;;
  esac

  AC_SUBST([LIBGCRYPT_CFLAGS])
  AC_SUBST([LIBGCRYPT_LIBS])

  save_CFLAGS="$CFLAGS"
  save_LDFLAGS="$LDFLAGS"
  CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
  LDFLAGS="$LDFLAGS $LIBGCRYPT_LDFLAGS"

  have_gcrypt=yes
  AC_CHECK_LIB([gcrypt], [gcry_md_open], [:], [have_gcrypt=no])
  AC_CHECK_HEADER([gcrypt.h], [:], [have_gcrypt=no])
  if test "x$have_gcrypt" != "xyes"; then
    AC_MSG_ERROR([GNU libgcrypt not found; please install it.])
  fi

  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 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 sched_setaffinity \
     statvfs nanosleep strsignal])

  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])

  dnl Determine the appropriate default list of substitute URLs (GnuTLS
  dnl is required so we can default to 'https'.)
  case "x$host_cpu" in
    xaarch64)
      # Currently only berlin.guixsd.org provides aarch64 binaries.
      guix_substitute_urls="https://berlin.guixsd.org"
      ;;
    *)
      guix_substitute_urls="https://mirror.hydra.gnu.org"
      ;;
  esac

  AC_MSG_CHECKING([for default substitute URLs])
  AC_MSG_RESULT([$guix_substitute_urls])

  AC_DEFINE_UNQUOTED([GUIX_SUBSTITUTE_URLS], ["$guix_substitute_urls"],
    [Default list of substitute URLs used by 'guix-daemon'.])

  dnl Check for Guile-SSH, which is required by 'guix offload'.
  GUIX_CHECK_GUILE_SSH

  case "x$guix_cv_have_recent_guile_ssh" in
    xyes)
      guix_build_daemon_offload="yes"
      AC_DEFINE([HAVE_DAEMON_OFFLOAD_HOOK], [1],
	[Define if the daemon's 'offload' build hook is being built (requires Guile-SSH).])
      ;;
    *)
      guix_build_daemon_offload="no"
      ;;
  esac

  dnl Temporary directory used to store the daemon's data.
  GUIX_TEST_ROOT_DIRECTORY
  GUIX_TEST_ROOT="$ac_cv_guix_test_root"
  AC_SUBST([GUIX_TEST_ROOT])

  GUIX_CHECK_LOCALSTATEDIR

  AC_CONFIG_FILES([nix/scripts/list-runtime-roots],
    [chmod +x nix/scripts/list-runtime-roots])
  AC_CONFIG_FILES([nix/scripts/download],
    [chmod +x nix/scripts/download])
  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],
    [chmod +x nix/scripts/offload])
fi

AM_CONDITIONAL([HAVE_LIBBZ2], [test "x$HAVE_LIBBZ2" = "xyes"])
AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"])
AM_CONDITIONAL([BUILD_DAEMON_OFFLOAD],			\
  [test "x$guix_build_daemon" = "xyes"			\
   && test "x$guix_build_daemon_offload" = "xyes"])
e ${GUILE_GNOME}/atk/html/ pango node ${GUILE_GNOME}/pango/html/ pangocairo node ${GUILE_GNOME}/pangocairo/html/ gdk node ${GUILE_GNOME}/gdk/html/ gtk node ${GUILE_GNOME}/gtk/html/ libglade node ${GUILE_GNOME}/libglade/html/ gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/ libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/ gconf node ${GUILE_GNOME}/gconf/html/ libgnome node ${GUILE_GNOME}/libgnome/html/ libgnomeui node ${GUILE_GNOME}/libgnomeui/html/ corba node ${GUILE_GNOME}/corba/html/ clutter node ${GUILE_GNOME}/clutter/html/ clutter-glx node ${GUILE_GNOME}/clutter-glx/html/ guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/ guile-netlink mono https://git.lepiller.eu/guile-netlink/manual/manual.html guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html guile-rpc node ${GS}/guile-rpc/manual/html_node/ GUIX_ROOT = https://guix.gnu.org GUIX = ${GUIX_ROOT}/manual guix.de mono ${GUIX}/de/guix.de.html guix.de node ${GUIX}/de/html_node/ guix.es mono ${GUIX}/es/guix.es.html guix.es node ${GUIX}/es/html_node/ guix.fr mono ${GUIX}/fr/guix.fr.html guix.fr node ${GUIX}/fr/html_node/ guix.pt_BR mono ${GUIX}/pt-br/guix.pt_BR.html guix.pt_BR node ${GUIX}/pt-br/html_node/ guix.ru mono ${GUIX}/ru/guix.ru.html guix.ru node ${GUIX}/ru/html_node/ guix.zh_CN mono ${GUIX}/zh-cn/guix.zh_CN.html guix.zh_CN node ${GUIX}/zh-cn/html_node/ guix mono ${GUIX}/en/guix.html guix node ${GUIX}/en/html_node/ GUIX_COOKBOOK = ${GUIX_ROOT}/cookbook guix-cookbook.de mono ${GUIX_COOKBOOK}/de/guix-cookbook.de.html guix-cookbook.de node ${GUIX_COOKBOOK}/de/html_node/ guix-cookbook.fr mono ${GUIX_COOKBOOK}/fr/guix-cookbook.fr.html guix-cookbook.fr node ${GUIX_COOKBOOK}/fr/html_node/ guix-cookbook.ko mono ${GUIX_COOKBOOK}/ko/guix-cookbook.ko.html guix-cookbook.ko node ${GUIX_COOKBOOK}/ko/html_node/ guix-cookbook.pt_BR mono ${GUIX_COOKBOOK}/pt-br/guix-cookbook.pt_BR.html guix-cookbook.pt_BR node ${GUIX_COOKBOOK}/pt-br/html_node/ guix-cookbook.sk mono ${GUIX_COOKBOOK}/sk/guix-cookbook.sk.html guix-cookbook.sk node ${GUIX_COOKBOOK}/sk/html_node/ guix-cookbook.sv mono ${GUIX_COOKBOOK}/sv/guix-cookbook.sv.html guix-cookbook.sv node ${GUIX_COOKBOOK}/sv/html_node/ guix-cookbook mono ${GUIX_COOKBOOK}/en/guix-cookbook.html guix-cookbook node ${GUIX_COOKBOOK}/en/html_node/ gv mono ${GS}/gv/manual/gv.html gv node ${GS}/gv/manual/html_node/ gzip mono ${GS}/gzip/manual/gzip.html gzip node ${GS}/gzip/manual/html_node/ hello mono ${GS}/hello/manual/hello.html hello node ${GS}/hello/manual/html_node/ help2man mono ${GS}/help2man/help2man.html # XXX: These are actually pages created by texi2html, so no quite following # the expected naming scheme. hurd mono ${GS}/hurd/doc/ idutils mono ${GS}/idutils/manual/idutils.html idutils node ${GS}/idutils/manual/html_node/ inetutils mono ${GS}/inetutils/manual/inetutils.html inetutils node ${GS}/inetutils/manual/html_node/ jwhois mono ${GS}/jwhois/manual/jwhois.html jwhois node ${GS}/jwhois/manual/html_node/ libc mono ${GS}/libc/manual/html_mono/libc.html libc node ${GS}/libc/manual/html_node/ LIBCDIO = ${GS}/libcdio libcdio mono ${LIBCDIO}/libcdio.html cd-text mono ${LIBCDIO}/cd-text-format.html libextractor mono ${GS}/libextractor/manual/libextractor.html libextractor node ${GS}/libextractor/manual/html_node/ libidn mono ${GS}/libidn/manual/libidn.html libidn node ${GS}/libidn/manual/html_node/ librejs mono ${GS}/librejs/manual/librejs.html librejs node ${GS}/librejs/manual/html_node/ libmatheval mono ${GS}/libmatheval/manual/libmatheval.html LIBMICROHTTPD = ${GS}/libmicrohttpd libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/ microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html libtasn1 node ${GS}/libtasn1/manual/html_node/ libtool mono ${GS}/libtool/manual/libtool.html libtool node ${GS}/libtool/manual/html_node/ lightning mono ${GS}/lightning/manual/lightning.html lightning node ${GS}/lightning/manual/html_node/ # The stable/ url redirects immediately, but that's ok. # The .html extension is omitted on their web site, but it works if given. LILYPOND = http://lilypond.org/doc/stable/Documentation lilypond-internals node ${LILYPOND}/internals/ lilypond-learning node ${LILYPOND}/learning/ lilypond-notation node ${LILYPOND}/notation/ lilypond-snippets node ${LILYPOND}/snippets/ lilypond-usage node ${LILYPOND}/usage/ lilypond-web node ${LILYPOND}/web/ music-glossary node ${LILYPOND}/music-glossary/ liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html liquidwar6 node ${GS}/liquidwar6/manual/html_node/ lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html LSH = http://www.lysator.liu.se/~nisse/lsh lsh mono ${LSH}/lsh.html m4 mono ${GS}/m4/manual/m4.html m4 node ${GS}/m4/manual/html_node/ mailutils mono ${GS}/mailutils/manual/mailutils.html mailutils chapter ${GS}/mailutils/manual/html_chapter/ mailutils section ${GS}/mailutils/manual/html_section/ mailutils node ${GS}/mailutils/manual/html_node/ make mono ${GS}/make/manual/make.html make node ${GS}/make/manual/html_node/ mcron mono ${GS}/mcron/manual/mcron.html mcron node ${GS}/mcron/manual/html_node/ mdk mono ${GS}/mdk/manual/mdk.html mdk node ${GS}/mdk/manual/html_node/ METAEXCHANGE = https://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo iwf_mh node ${METAEXCHANGE}/iwf_mh.html scantest node ${METAEXCHANGE}/scantest.html mes mono ${GS}/mes/manual/mes.html mes node ${GS}/mes/manual/html_node/ MIT_SCHEME = ${GS}/mit-scheme/documentation/stable mit-scheme-ref mono ${MIT_SCHEME}/mit-scheme-ref.html mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/ mit-scheme-user mono ${MIT_SCHEME}/mit-scheme-user.html mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/ sos mono ${MIT_SCHEME}/mit-scheme-sos.html sos node ${MIT_SCHEME}/mit-scheme-sos/ mit-scheme-imail mono ${MIT_SCHEME}/mit-scheme-imail.html moe mono ${GS}/moe/manual/moe_manual.html motti node ${GS}/motti/manual/ mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html mtools mono ${GS}/mtools/manual/mtools.html myserver mono http://www.myserverproject.net/doc.php nano mono https://www.nano-editor.org/dist/latest/nano.html nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html ocrad mono ${GS}/ocrad/manual/ocrad_manual.html parted mono ${GS}/parted/manual/parted.html parted node ${GS}/parted/manual/html_node/ pascal mono http://www.gnu-pascal.de/gpc/ # can't use pcb since url's contain dates --30nov10 perl mono ${GS}/perl/manual/perldoc-all.html PIES = http://www.gnu.org.ua/software/pies/manual pies mono ${PIES}/pies.html pies chapter ${PIES}/html_chapter/ pies section ${PIES}/html_section/ pies node ${PIES}/html_node/ plotutils mono ${GS}/plotutils/manual/en/plotutils.html plotutils node ${GS}/plotutils/manual/en/html_node/ proxyknife mono ${GS}/proxyknife/manual/proxyknife.html proxyknife node ${GS}/proxyknife/manual/html_node/ pspp mono ${GS}/pspp/manual/pspp.html pspp node ${GS}/pspp/manual/html_node/ pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html pyconfigure node ${GS}/pyconfigure/manual/html_node/ R = https://cran.r-project.org/doc/manuals R-intro mono ${R}/R-intro.html R-lang mono ${R}/R-lang.html R-exts mono ${R}/R-exts.html R-data mono ${R}/R-data.html R-admin mono ${R}/R-admin.html R-ints mono ${R}/R-ints.html rcs mono ${GS}/rcs/manual/rcs.html rcs node ${GS}/rcs/manual/html_node/ READLINE = https://tiswww.cwru.edu/php/chet/readline readline mono ${READLINE}/readline.html rluserman mono ${READLINE}/rluserman.html history mono ${READLINE}/history.html recode mono http://recode.progiciels-bpi.ca/manual/index.html recutils mono ${GS}/recutils/manual/recutils.html recutils node ${GS}/recutils/manual/html_node/ reftex mono ${GS}/auctex/manual/reftex.html reftex node ${GS}/auctex/manual/reftex/ remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html remotecontrol node ${GS}/remotecontrol/manual/html_node/ rottlog mono ${GS}/rottlog/manual/rottlog.html rottlog node ${GS}/rottlog/manual/html_node/ RUSH = http://www.gnu.org.ua/software/rush/manual rush mono ${RUSH}/rush.html rush chapter ${RUSH}/html_chapter/ rush section ${RUSH}/html_section/ rush node ${RUSH}/html_node/ screen mono ${GS}/screen/manual/screen.html screen node ${GS}/screen/manual/html_node/ sed mono ${GS}/sed/manual/sed.html sed node ${GS}/sed/manual/html_node/ sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html sharutils chapter ${GS}/sharutils/manual/html_chapter/ sharutils node ${GS}/sharutils/manual/html_node/ shepherd mono ${GS}/shepherd/manual/shepherd.html shepherd node ${GS}/shepherd/manual/html_node/ # can't use mono files since they have generic names SMALLTALK = ${GS}/smalltalk smalltalk node ${SMALLTALK}/manual/html_node/ smalltalk-base node ${SMALLTALK}/manual-base/html_node/ smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/ sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html sourceinstall node ${GS}/sourceinstall/manual/html_node/ sqltutor mono ${GS}/sqltutor/manual/sqltutor.html sqltutor node ${GS}/sqltutor/manual/html_node/ src-highlite mono ${GS}/src-highlite/source-highlight.html swbis mono ${GS}/swbis/manual.html tar mono ${GS}/tar/manual/tar.html tar chapter ${GS}/tar/manual/html_chapter/ tar section ${GS}/tar/manual/html_section/ tar node ${GS}/tar/manual/html_node/ teseq mono ${GS}/teseq/teseq.html teseq node ${GS}/teseq/html_node/ TEXINFO = ${GS}/texinfo/manual texinfo mono ${TEXINFO}/texinfo/texinfo.html texinfo node ${TEXINFO}/texinfo/html_node/ # info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html info-stnd node ${TEXINFO}/info-stnd/html_node/ thales node ${GS}/thales/manual/ units mono ${GS}/units/manual/units.html units node ${GS}/units/manual/html_node/ vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html vc-dwim node ${GS}/vc-dwim/manual/html_node/ wdiff mono ${GS}/wdiff/manual/wdiff.html wdiff node ${GS}/wdiff/manual/html_node/ websocket4j mono ${GS}/websocket4j/manual/websocket4j.html websocket4j node ${GS}/websocket4j/manual/html_node/ wget mono ${GS}/wget/manual/wget.html wget node ${GS}/wget/manual/html_node/ xboard mono ${GS}/xboard/manual/xboard.html xboard node ${GS}/xboard/manual/html_node/ # emacs-page # Free TeX-related Texinfo manuals on tug.org. T = https://tug.org/texinfohtml dvipng mono ${T}/dvipng.html dvips mono ${T}/dvips.html eplain mono ${T}/eplain.html kpathsea mono ${T}/kpathsea.html latex2e mono ${T}/latex2e.html tlbuild mono ${T}/tlbuild.html web2c mono ${T}/web2c.html # Local Variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "htmlxrefversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: