summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-10-15 20:13:01 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-10-15 20:13:01 +0000
commit48ce62737750215208804947a1509ad7d26f6214 (patch)
tree4d34aa721f1fe55f6910bf4bc8c6181011479881 /configure.ac
parent64be1c15c229facfa849f5667f603cce951a8488 (diff)
Make a better -lz hack
Per the comments, the underlying issue is https://github.com/libarchive/libarchive/issues/1446, knowing this allows the hack to be much more targetted.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eecb107d7..39306b953 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,10 @@ AC_CHECK_HEADERS([bzlib.h], [true],
[AC_MSG_ERROR([Nix requires libbz2, which is part of bzip2. See https://web.archive.org/web/20180624184756/http://www.bzip.org/.])])
# Checks for libarchive
PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= 3.1.2], [CXXFLAGS="$LIBARCHIVE_CFLAGS $CXXFLAGS"])
+# Workaround until https://github.com/libarchive/libarchive/issues/1446 is fixed
+if test "$shared" != yes; then
+ LIBARCHIVE_LIBS+=' -lz'
+fi
# Look for SQLite, a required dependency.
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.6.19], [CXXFLAGS="$SQLITE3_CFLAGS $CXXFLAGS"])