From 4cb954c36761f041eba50f374b5d2f4b3510757f Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 14 Apr 2008 14:07:37 +0000 Subject: [PATCH] - improved zlib configuration, parameter --with-installed-zlib replaced by --with-tight-zlib git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2464 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/configure.ac | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/common/configure.ac b/common/configure.ac index a31032b4..4be7128b 100644 --- a/common/configure.ac +++ b/common/configure.ac @@ -57,26 +57,29 @@ AC_CHECK_LIB(dmedia, dmICCreate, AC_SUBST(PLATFORM_CXXSRCS) -AC_ARG_WITH(installed-zlib, -[ --with-installed-zlib use the version of zlib which is installed on the - system instead of the one distributed with VNC]) - -if test "$with_installed_zlib" = yes; then - echo "using installed zlib" - ZLIB_LIB=-lz +AC_ARG_WITH([tight-zlib], + AS_HELP_STRING([--with-tight-zlib], + [use libz which is distributed with VNC]), + [], [with_tight_zlib='no']) + +if test "x$with_tight_zlib" = xno; then + AC_SEARCH_LIBS([inflateEnd], [z], + [ZLIB_LIB='-lz'], + [ZLIB_DIR=zlib + ZLIB_INCLUDE='-I$(top_srcdir)/zlib' + ZLIB_LIB='$(top_srcdir)/zlib/libz.la']) else - ZLIB_DIR=zlib - ZLIB_INCLUDE='-I$(top_srcdir)/zlib' - ZLIB_LIB='$(top_srcdir)/zlib/libz.a' - echo "configuring zlib..." - (cd zlib; ./configure) - echo "...done configuring zlib" + ZLIB_DIR=zlib + ZLIB_INCLUDE='-I$(top_srcdir)/zlib' + ZLIB_LIB='$(top_srcdir)/zlib/libz.la' fi AC_SUBST(ZLIB_DIR) AC_SUBST(ZLIB_INCLUDE) AC_SUBST(ZLIB_LIB) +AC_CONFIG_SUBDIRS([zlib]) + AC_ARG_WITH([tight-jpeg], AS_HELP_STRING([--with-tight-jpeg], [use libjpeg which is distributed with VNC]), -- 2.39.5