Alexandre Julliard : configure: Print a notice if zlib isn't found.

Alexandre Julliard julliard at winehq.org
Thu Apr 7 07:36:48 CDT 2011


Module: wine
Branch: stable
Commit: 851bc356a9baf2426ae042698d53ff76ae047ac1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=851bc356a9baf2426ae042698d53ff76ae047ac1

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Feb 18 13:07:27 2011 +0100

configure: Print a notice if zlib isn't found.
(cherry picked from commit ba6a41a4f7256fcf34932cbea385ab24549d5ce4)

---

 configure    |   16 ++++++++++++++++
 configure.ac |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 638d7ba..35c1226 100755
--- a/configure
+++ b/configure
@@ -805,6 +805,7 @@ with_xshape
 with_xshm
 with_xslt
 with_xxf86vm
+with_zlib
 with_wine_tools
 with_wine64
 enable_largefile
@@ -1493,6 +1494,7 @@ Optional Packages:
   --without-xshm          do not use XShm (shared memory extension)
   --without-xslt          do not use XSLT
   --without-xxf86vm       do not use XFree video mode extension
+  --without-zlib          do not use Zlib (data compression)
   --with-wine-tools=DIR   use Wine tools from directory DIR
   --with-wine64=DIR       use the 64-bit Wine in DIR for a Wow64 build
   --with-x                use the X Window System
@@ -2740,6 +2742,12 @@ if test "${with_xxf86vm+set}" = set; then :
 fi
 
 
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib; if test "x$withval" = "xno"; then ac_cv_header_zlib_h=no; fi
+fi
+
+
 
 # Check whether --with-wine-tools was given.
 if test "${with_wine_tools+set}" = set; then :
@@ -10330,6 +10338,14 @@ $as_echo "#define HAVE_ZLIB 1" >>confdefs.h
 fi
 
 fi
+if test "x$ZLIB" = "x"; then :
+  case "x$with_zlib" in
+  x)   as_fn_append wine_notices "|libz ${notice_platform}development files not found, data compression won't be supported." ;;
+  xno) ;;
+  *)   as_fn_error $? "libz ${notice_platform}development files not found, data compression won't be supported.
+This is an error since --with-zlib was requested." "$LINENO" 5  ;;
+esac
+fi
 
 if test "x$with_esd" != xno
 then
diff --git a/configure.ac b/configure.ac
index 3372e87..cab92ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,8 @@ AC_ARG_WITH(xshm,      AS_HELP_STRING([--without-xshm],[do not use XShm (shared
 AC_ARG_WITH(xslt,      AS_HELP_STRING([--without-xslt],[do not use XSLT]))
 AC_ARG_WITH(xxf86vm,   AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]),
             [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi])
+AC_ARG_WITH(zlib,      AS_HELP_STRING([--without-zlib],[do not use Zlib (data compression)]),
+            [if test "x$withval" = "xno"; then ac_cv_header_zlib_h=no; fi])
 
 AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR]))
 AC_ARG_WITH(wine64,    AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build]))
@@ -1362,6 +1364,7 @@ then
     AC_CHECK_LIB(z,inflate,[AC_DEFINE(HAVE_ZLIB,1,[Define to 1 if you have the `z' library (-lz).])
                             AC_SUBST(ZLIB,"-lz")])
 fi
+WINE_NOTICE_WITH(zlib,[test "x$ZLIB" = "x"],[libz ${notice_platform}development files not found, data compression won't be supported.])
 
 dnl **** Check for EsounD ****
 if test "x$with_esd" != xno




More information about the wine-cvs mailing list