aboutsummaryrefslogtreecommitdiff
path: root/m4/guix.m4
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2019-03-08 19:02:59 +0100
committerLudovic Courtès <ludo@gnu.org>2019-05-06 23:21:33 +0200
commitfea338c6ca1922097fa233be85f424c152a4f507 (patch)
tree82dc3e961d206f331ee7e31999c4b38d345d7aa4 /m4/guix.m4
parent46c102ca5e76ffc1daa42edba439eee9fd0f102c (diff)
downloadguix-fea338c6ca1922097fa233be85f424c152a4f507.tar
guix-fea338c6ca1922097fa233be85f424c152a4f507.tar.gz
Add (guix lzlib).
* guix/lzlib.scm, tests/lzlib.scm: New files. * Makefile.am (MODULES): Add guix/lzlib.scm. (SCM_TESTS): Add tests/lzlib.scm. * m4/guix.m4 (GUIX_LIBLZ_LIBDIR): New macro. * configure.ac (LIBLZ_LIBDIR): Use it. Define and substitute 'LIBLZ'. * guix/config.scm.in (%liblz): New variable. * guix/self.scm (make-config.scm): Add TODO comment. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'm4/guix.m4')
-rw-r--r--m4/guix.m417
1 files changed, 16 insertions, 1 deletions
diff --git a/m4/guix.m4 b/m4/guix.m4
index 5c846f7618..d0c5ec0f08 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,5 +1,5 @@
dnl GNU Guix --- Functional package management for GNU
-dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
dnl
@@ -312,6 +312,21 @@ AC_DEFUN([GUIX_LIBZ_LIBDIR], [
$1="$guix_cv_libz_libdir"
])
+dnl GUIX_LIBLZ_FILE_NAME VAR
+dnl
+dnl Attempt to determine liblz's absolute file name; store the result in VAR.
+AC_DEFUN([GUIX_LIBLZ_FILE_NAME], [
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_CACHE_CHECK([lzlib's file name],
+ [guix_cv_liblz_libdir],
+ [old_LIBS="$LIBS"
+ LIBS="-llz"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main () { return LZ_decompress_open(); }])],
+ [guix_cv_liblz_libdir="`ldd conftest$EXEEXT | grep liblz | sed '-es/.*=> \(.*\) .*$/\1/g'`"])
+ LIBS="$old_LIBS"])
+ $1="$guix_cv_liblz_libdir"
+])
+
dnl GUIX_CURRENT_LOCALSTATEDIR
dnl
dnl Determine the localstatedir of an existing Guix installation and set