summaryrefslogtreecommitdiff
path: root/config-daemon.ac
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-05 17:48:23 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-07 23:47:22 +0100
commitf997137d0e2eba27bb1e2b282ee19ea474c41e12 (patch)
tree3a188ef54d7157cabc5c0b432e92b3bcabad03fd /config-daemon.ac
parent29a686688674dc875775305312513405fa396a06 (diff)
daemon: Make libbz2 an optional dependency.
* config-daemon.ac: Don't bail out when libbz2 is missing. Define 'HAVE_LIBBZ2' Automake conditional. * nix/libstore/build.cc: Wrap relevant bits in '#if HAVE_BZLIB_H'. * nix/libstore/globals.cc (Settings::Settings): 'logCompression' defaults to COMPRESSION_GZIP when HAVE_BZLIB_H is false. * nix/libstore/globals.hh (CompressionType): Make 'COMPRESSION_BZIP2' conditional on HAVE_BZLIB_H. * nix/local.mk (guix_register_LDADD, guix_daemon_LDADD): Add -lbz2 only when HAVE_LIBBZ2. * nix/nix-daemon/guix-daemon.cc (parse_opt): Ignore "bzip2" when not HAVE_BZLIB_H.
Diffstat (limited to 'config-daemon.ac')
-rw-r--r--config-daemon.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/config-daemon.ac b/config-daemon.ac
index 59f6f2713ff..80d84cbdbcc 100644
--- a/config-daemon.ac
+++ b/config-daemon.ac
@@ -24,11 +24,12 @@ if test "x$guix_build_daemon" = "xyes"; then
24 AC_CHECK_HEADERS([zlib.h], [true], 24 AC_CHECK_HEADERS([zlib.h], [true],
25 [AC_MSG_ERROR([Guix requires zlib. See http://www.zlib.net/.])]) 25 [AC_MSG_ERROR([Guix requires zlib. See http://www.zlib.net/.])])
26 26
27 dnl Look for libbz2, a required dependency. 27 dnl Look for libbz2, an optional dependency.
28 AC_CHECK_LIB([bz2], [BZ2_bzWriteOpen], [true], 28 AC_CHECK_LIB([bz2], [BZ2_bzWriteOpen], [HAVE_LIBBZ2=yes], [HAVE_LIBBZ2=no])
29 [AC_MSG_ERROR([Guix requires libbz2, which is part of bzip2. See http://www.bzip.org/.])]) 29 if test "x$HAVE_LIBBZ2" = xyes; then
30 AC_CHECK_HEADERS([bzlib.h], [true], 30 AC_CHECK_HEADERS([bzlib.h])
31 [AC_MSG_ERROR([Guix requires libbz2, which is part of bzip2. See http://www.bzip.org/.])]) 31 HAVE_LIBBZ2="$ac_cv_header_bzlib_h"
32 fi
32 33
33 dnl Look for SQLite, a required dependency. 34 dnl Look for SQLite, a required dependency.
34 PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.6.19]) 35 PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.6.19])
@@ -169,6 +170,7 @@ if test "x$guix_build_daemon" = "xyes"; then
169 [chmod +x nix/scripts/offload]) 170 [chmod +x nix/scripts/offload])
170fi 171fi
171 172
173AM_CONDITIONAL([HAVE_LIBBZ2], [test "x$HAVE_LIBBZ2" = "xyes"])
172AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"]) 174AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"])
173AM_CONDITIONAL([BUILD_DAEMON_OFFLOAD], \ 175AM_CONDITIONAL([BUILD_DAEMON_OFFLOAD], \
174 [test "x$guix_build_daemon" = "xyes" \ 176 [test "x$guix_build_daemon" = "xyes" \