summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-10-07 22:25:03 +0200
committerJunio C Hamano <gitster@pobox.com>2021-10-08 19:45:48 +0200
commita322920d0bb8a930c17dd824990f7e5fd026bb3f (patch)
treecf30790510129aa407a00ae899b0874ef6b23e4a /configure.ac
parentreftable: (de)serialization for the polymorphic record type. (diff)
downloadgit-a322920d0bb8a930c17dd824990f7e5fd026bb3f.tar.xz
git-a322920d0bb8a930c17dd824990f7e5fd026bb3f.zip
Provide zlib's uncompress2 from compat/zlib-compat.c
This will be needed for reading reflog blocks in reftable. Helped-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 031e8d3fee..c3a913103d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -672,9 +672,22 @@ AC_LINK_IFELSE([ZLIBTEST_SRC],
NO_DEFLATE_BOUND=yes])
LIBS="$old_LIBS"
+AC_DEFUN([ZLIBTEST_UNCOMPRESS2_SRC], [
+AC_LANG_PROGRAM([#include <zlib.h>],
+ [uncompress2(NULL,NULL,NULL,NULL);])])
+AC_MSG_CHECKING([for uncompress2 in -lz])
+old_LIBS="$LIBS"
+LIBS="$LIBS -lz"
+AC_LINK_IFELSE([ZLIBTEST_UNCOMPRESS2_SRC],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ NO_UNCOMPRESS2=yes])
+LIBS="$old_LIBS"
+
GIT_UNSTASH_FLAGS($ZLIB_PATH)
GIT_CONF_SUBST([NO_DEFLATE_BOUND])
+GIT_CONF_SUBST([NO_UNCOMPRESS2])
#
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,