]> source.dussan.org Git - tigervnc.git/commitdiff
- improved zlib configuration, parameter --with-installed-zlib replaced by --with...
authorAdam Tkac <atkac@redhat.com>
Mon, 14 Apr 2008 14:07:37 +0000 (14:07 +0000)
committerAdam Tkac <atkac@redhat.com>
Mon, 14 Apr 2008 14:07:37 +0000 (14:07 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2464 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/configure.ac

index a31032b44917f5d23e617574af19d7dfa7d41369..4be7128b2a26cc802bce1a380a92ef2f43e06384 100644 (file)
@@ -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]),