diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-15 01:04:13 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-15 01:04:13 +0200 |
commit | 65fdcd92fa9d5bc290274be458157d5bc8fea351 (patch) | |
tree | ff7100f7b04dca4fba6fcd88a0bbbc0ae2943740 | |
parent | 7fb590d4f9be26a67e7cd276d63b66cff8901e91 (diff) | |
download | samba-65fdcd92fa9d5bc290274be458157d5bc8fea351.tar.gz samba-65fdcd92fa9d5bc290274be458157d5bc8fea351.tar.bz2 samba-65fdcd92fa9d5bc290274be458157d5bc8fea351.zip |
Build zlib (required for ndr_compression) if it's not pulled in through
other means.
-rw-r--r-- | source3/Makefile.in | 6 | ||||
-rw-r--r-- | source3/configure.in | 36 |
2 files changed, 41 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index d9ff8593f4..234490e048 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -56,6 +56,7 @@ PIDL_ARGS=@PIDL_ARGS@ TERMLDFLAGS=@TERMLDFLAGS@ TERMLIBS=@TERMLIBS@ PRINT_LIBS=@PRINT_LIBS@ +ZLIB_LIBS=@ZLIB_LIBS@ AUTH_LIBS=@AUTH_LIBS@ ACL_LIBS=@ACL_LIBS@ PASSDB_LIBS=@PASSDB_LIBS@ @@ -251,8 +252,11 @@ LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \ librpc/gen_ndr/ndr_drsuapi.o \ librpc/gen_ndr/ndr_drsblobs.o +ZLIB_OBJ = @ZLIB_OBJS@ + COMPRESSION_OBJ = ../lib/compression/mszip.o \ - ../lib/compression/lzxpress.o + ../lib/compression/lzxpress.o \ + $(ZLIB_OBJ) DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \ $(COMPRESSION_OBJ) diff --git a/source3/configure.in b/source3/configure.in index 443cdd6161..29209fd835 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -6248,6 +6248,42 @@ if test x$enable_merged_build = xyes; then m4_include(samba4.m4) fi +AC_CHECK_HEADERS(zlib.h) + +AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion) + +AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [ + AC_TRY_COMPILE([ + #include <zlib.h> + ],[ + #if (ZLIB_VERNUM >= 0x1230) + #else + #error "ZLIB_VERNUM < 0x1230" + #endif + ],[ + samba_cv_zlib_1_2_3=yes + ],[ + samba_cv_zlib_1_2_3=no + ]) +]) + +AC_SUBST(ZLIB_LIBS) +AC_SUBST(ZLIB_OBJS) +if test x"$ac_cv_header_zlib_h" = x"yes" -a \ + x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \ + x"$samba_cv_zlib_1_2_3" = x"yes"; then + ZLIB_OBJS="" +else + ZLIB_LIBS="" + for o in adler32.o compress.o crc32.o gzio.o uncompr.o \ + deflate.o trees.o zutil.o inflate.o infback.o \ + inftrees.o inffast.o + do + ZLIB_OBJS="$ZLIB_OBJS ../lib/zlib/$o" + done + CFLAGS="$CFLAGS -I../lib/zlib" +fi + dnl Remove -L/usr/lib/? from LDFLAGS and LIBS LIB_REMOVE_USR_LIB(LDFLAGS) LIB_REMOVE_USR_LIB(LIBS) |