summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-07-29 20:06:18 +0000
committerStefan Metzmacher <metze@samba.org>2008-08-07 19:16:00 +0200
commit9bf122145f92d27f522308943a6cde05d25e5e55 (patch)
tree8305b2a2a5f06edab030e3b77406bb61878aabed /source4
parented3bdf38d721d1f20aef9017b32e14acc0e56192 (diff)
downloadsamba-9bf122145f92d27f522308943a6cde05d25e5e55.tar.gz
samba-9bf122145f92d27f522308943a6cde05d25e5e55.tar.bz2
samba-9bf122145f92d27f522308943a6cde05d25e5e55.zip
lib: prepare the build of zlib
metze (This used to be commit 159df68c04c9ae437ab48991154e91161ef72754)
Diffstat (limited to 'source4')
-rw-r--r--source4/configure.ac1
-rw-r--r--source4/lib/zlib.m412
-rw-r--r--source4/lib/zlib.mk17
-rw-r--r--source4/lib/zlib/zconf.h3
4 files changed, 33 insertions, 0 deletions
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