summary refs log tree commit diff
path: root/nix/local.mk
diff options
context:
space:
mode:
Diffstat (limited to 'nix/local.mk')
-rw-r--r--nix/local.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/nix/local.mk b/nix/local.mk
index d802da6170..4452301c63 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -132,7 +132,7 @@ guix_daemon_CPPFLAGS =				\
   -I$(top_srcdir)/%D%/libstore
 
 guix_daemon_LDADD =				\
-  libstore.a libutil.a libformat.a -lz -lbz2	\
+  libstore.a libutil.a libformat.a -lz		\
   $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
 
 guix_daemon_headers =				\
@@ -149,9 +149,15 @@ guix_register_CPPFLAGS =			\
 
 # XXX: Should we start using shared libs?
 guix_register_LDADD =				\
-  libstore.a libutil.a libformat.a -lz -lbz2	\
+  libstore.a libutil.a libformat.a -lz		\
   $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
 
+if HAVE_LIBBZ2
+
+guix_daemon_LDADD += -lbz2
+guix_register_LDADD += -lbz2
+
+endif HAVE_LIBBZ2
 
 noinst_HEADERS =						\
   $(libformat_headers) $(libutil_headers) $(libstore_headers)	\