From fea338c6ca1922097fa233be85f424c152a4f507 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Fri, 8 Mar 2019 19:02:59 +0100 Subject: Add (guix lzlib). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- m4/guix.m4 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'm4/guix.m4') 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 +dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès dnl Copyright © 2014 Mark H Weaver dnl Copyright © 2017 Efraim Flashner 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 -- cgit v1.2.3