From 9bf122145f92d27f522308943a6cde05d25e5e55 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 29 Jul 2008 20:06:18 +0000 Subject: lib: prepare the build of zlib metze (This used to be commit 159df68c04c9ae437ab48991154e91161ef72754) --- source4/configure.ac | 1 + source4/lib/zlib.m4 | 12 ++++++++++++ source4/lib/zlib.mk | 17 +++++++++++++++++ source4/lib/zlib/zconf.h | 3 +++ 4 files changed, 33 insertions(+) create mode 100644 source4/lib/zlib.m4 create mode 100644 source4/lib/zlib.mk diff --git a/source4/configure.ac b/source4/configure.ac index 29db34eddf..d03092c6b6 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -24,6 +24,7 @@ m4_include(lib/util/time.m4) m4_include(lib/popt/samba.m4) m4_include(lib/charset/config.m4) m4_include(lib/socket/config.m4) +m4_include(lib/zlib.m4) m4_include(nsswitch/nsstest.m4) m4_include(pidl/config.m4) diff --git a/source4/lib/zlib.m4 b/source4/lib/zlib.m4 new file mode 100644 index 0000000000..7b967fc8d2 --- /dev/null +++ b/source4/lib/zlib.m4 @@ -0,0 +1,12 @@ + +AC_CHECK_HEADERS(zlib.h) + +# we require this new function... +AC_CHECK_LIB_EXT(z, ZLIB_LIBS, inflateReset2) + +if test x"$ac_cv_header_zlib_h" = x"yes" -a \ + x"$ac_cv_lib_ext_z_inflateReset2" = x"yes"; then + SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}]) +else + SMB_INCLUDE_MK(lib/zlib.mk) +fi diff --git a/source4/lib/zlib.mk b/source4/lib/zlib.mk new file mode 100644 index 0000000000..095f129feb --- /dev/null +++ b/source4/lib/zlib.mk @@ -0,0 +1,17 @@ +[SUBSYSTEM::ZLIB] +CFLAGS = -Ilib/zlib + +libzlibsrcdir := lib/zlib +ZLIB_OBJ_FILES = \ + $(libzlibsrcdir)/adler32.o \ + $(libzlibsrcdir)/compress.o \ + $(libzlibsrcdir)/crc32.o \ + $(libzlibsrcdir)/gzio.o \ + $(libzlibsrcdir)/uncompr.o \ + $(libzlibsrcdir)/deflate.o \ + $(libzlibsrcdir)/trees.o \ + $(libzlibsrcdir)/zutil.o \ + $(libzlibsrcdir)/inflate.o \ + $(libzlibsrcdir)/infback.o \ + $(libzlibsrcdir)/inftrees.o \ + $(libzlibsrcdir)/inffast.o diff --git a/source4/lib/zlib/zconf.h b/source4/lib/zlib/zconf.h index b65f30ee51..214603c151 100644 --- a/source4/lib/zlib/zconf.h +++ b/source4/lib/zlib/zconf.h @@ -5,6 +5,9 @@ /* @(#) $Id$ */ +#include "replace.h" +#define Z_PREFIX + #ifndef ZCONF_H #define ZCONF_H -- cgit