diff options
author | Richard Sharpe <sharpe@samba.org> | 2005-03-30 00:15:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:20 -0500 |
commit | da3816690419401d85ab8bf7cee89ac912b152b0 (patch) | |
tree | d389735e62b28a10557f79c5dcddd8bedc500a61 /source4/librpc | |
parent | dfbd1752a1e8d3d8f40ee1986558be1ae3a2bc74 (diff) | |
download | samba-da3816690419401d85ab8bf7cee89ac912b152b0.tar.gz samba-da3816690419401d85ab8bf7cee89ac912b152b0.tar.bz2 samba-da3816690419401d85ab8bf7cee89ac912b152b0.zip |
r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
(This used to be commit 9b4069e84573f85ce4341ceacd35737a18726a0b)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/config.m4 | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/source4/librpc/config.m4 b/source4/librpc/config.m4 index d67e880a38..290b0d16f2 100644 --- a/source4/librpc/config.m4 +++ b/source4/librpc/config.m4 @@ -7,29 +7,44 @@ ZLIB_CFLAGS="" ZLIB_CPPFLAGS="" ZLIB_LDFLAGS="" -AC_CHECK_HEADERS(zlib.h) -if test x"$ac_cv_header_zlib_h" != x"yes"; then - with_zlib_support=no -fi +AC_MSG_CHECKING([for ZLIB support]) + +AC_ARG_WITH(zlib, +[ --with-zlib ZLIB support (default yes)], +[ case "$withval" in + yes|no) + with_zlib_support=$withval + ;; + esac ]) + +AC_MSG_RESULT($with_zlib_support) if test x"$with_zlib_support" != x"no"; then - AC_CHECK_LIB_EXT(z, ZLIB_LIBS, inflate) - - if test x"$ac_cv_lib_ext_z_inflate" = x"yes"; then - AC_DEFINE(HAVE_ZLIB,1,[Whether zlib is available]) - with_zlib_support=yes - SMB_EXT_LIB_ENABLE(ZLIB,YES) - else - ZLIB_LIBS="" - with_zlib_support=no + + AC_MSG_CHECKING(whether ZLIB support is available)AC_CHECK_HEADERS(zlib.h) + if test x"$ac_cv_header_zlib_h" != x"yes"; then + with_zlib_support=no fi - LIBS=$ac_save_LIBS -fi -AC_MSG_CHECKING(whether ZLIB support is available) -AC_MSG_RESULT($with_zlib_support) -# for now enable this always but maybe all fields are empty -# TODO: move compression methods to seperate files each -SMB_EXT_LIB_ENABLE(ZLIB,YES) + if test x"$with_zlib_support" != x"no"; then + AC_CHECK_LIB_EXT(z, ZLIB_LIBS, inflate) + + if test x"$ac_cv_lib_ext_z_inflate" = x"yes"; then + AC_DEFINE(HAVE_ZLIB,1,[Whether zlib is available]) + with_zlib_support=yes + SMB_EXT_LIB_ENABLE(ZLIB,YES) + else + ZLIB_LIBS="" + with_zlib_support=no + fi + LIBS=$ac_save_LIBS + fi + + AC_MSG_RESULT($with_zlib_support) + + # for now enable this always but maybe all fields are empty + # TODO: move compression methods to seperate files each + SMB_EXT_LIB_ENABLE(ZLIB,YES) -SMB_EXT_LIB(ZLIB,[${ZLIB_LIBS}],[${ZLIB_CFLAGS}],[${ZLIB_CPPFLAGS}],[${ZLIB_LDFLAGS}]) + SMB_EXT_LIB(ZLIB,[${ZLIB_LIBS}],[${ZLIB_CFLAGS}],[${ZLIB_CPPFLAGS}],[${ZLIB_LDFLAGS}]) +fi
\ No newline at end of file |