PatchSet 7113 
Date: 2006/02/05 00:36:27
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fixes for zlib configuration and cleanups

2006-02-05  Dalibor Topic  <[EMAIL PROTECTED]>

        * configure.ac: Check if zlib exists when using system zlib,
        and exit with an error message if it doesn't.

        * libraries/clib/zip/Adler32.c,
        libraries/clib/zip/Deflater.c,
        libraries/clib/zip/Inflater.c: Removed wrapper functions for case
        when no zlib can be found, since they are no longer necessary.

Members: 
        ChangeLog:1.4631->1.4632 
        configure:1.533->1.534 
        configure.ac:1.211->1.212 
        libraries/clib/zip/Adler32.c:1.8->1.9 
        libraries/clib/zip/Deflater.c:1.19->1.20 
        libraries/clib/zip/Inflater.c:1.18->1.19 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4631 kaffe/ChangeLog:1.4632
--- kaffe/ChangeLog:1.4631      Sat Feb  4 16:47:37 2006
+++ kaffe/ChangeLog     Sun Feb  5 00:36:27 2006
@@ -1,3 +1,13 @@
+2006-02-05  Dalibor Topic  <[EMAIL PROTECTED]>
+
+       * configure.ac: Check if zlib exists when using system zlib,
+       and exit with an error message if it doesn't.
+
+       * libraries/clib/zip/Adler32.c,
+       libraries/clib/zip/Deflater.c,
+       libraries/clib/zip/Inflater.c: Removed wrapper functions for case
+       when no zlib can be found, since they are no longer necessary.
+
 2006-02-04  Dalibor Topic  <[EMAIL PROTECTED]>
 
        * configure.ac: (HAVE_ZIP) Removed unused conditinal.
Index: kaffe/configure
diff -u kaffe/configure:1.533 kaffe/configure:1.534
--- kaffe/configure:1.533       Sat Feb  4 16:47:41 2006
+++ kaffe/configure     Sun Feb  5 00:36:30 2006
@@ -49735,6 +49735,20 @@
 
 fi;
 
+if test x"$with_system_zlib" != x"no" ; then
+   if test x"$ac_cv_header_zlib_h" != x"yes" ; then
+      { { echo "$as_me:$LINENO: error: Can't find or can't use system zlib.h" 
>&5
+echo "$as_me: error: Can't find or can't use system zlib.h" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+   if test x"$ac_cv_lib_z_deflate" != x"yes" ; then
+      { { echo "$as_me:$LINENO: error: Can't find system zlib or can't find 
function deflate in it" >&5
+echo "$as_me: error: Can't find system zlib or can't find function deflate in 
it" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+
+
 
 
 if test x"$with_system_zlib" != x"no"; then
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.211 kaffe/configure.ac:1.212
--- kaffe/configure.ac:1.211    Sat Feb  4 16:47:51 2006
+++ kaffe/configure.ac  Sun Feb  5 00:36:40 2006
@@ -2250,6 +2250,16 @@
        [with_system_zlib=no]
 )
 
+if test x"$with_system_zlib" != x"no" ; then
+   if test x"$ac_cv_header_zlib_h" != x"yes" ; then
+      AC_MSG_ERROR([Can't find or can't use system zlib.h])
+   fi
+   if test x"$ac_cv_lib_z_deflate" != x"yes" ; then
+      AC_MSG_ERROR([Can't find system zlib or can't find function deflate in 
it])
+   fi
+fi
+
+
 AM_CONDITIONAL(COND_SYSTEM_ZLIB, test x"$with_system_zlib" != x"no")
 
 AC_ARG_ENABLE([fastjar],
Index: kaffe/libraries/clib/zip/Adler32.c
diff -u kaffe/libraries/clib/zip/Adler32.c:1.8 
kaffe/libraries/clib/zip/Adler32.c:1.9
--- kaffe/libraries/clib/zip/Adler32.c:1.8      Wed Oct 19 20:10:41 2005
+++ kaffe/libraries/clib/zip/Adler32.c  Sun Feb  5 00:36:41 2006
@@ -15,8 +15,6 @@
 #include "java_util_zip_Adler32.h"
 #include "gtypes.h"
 
-#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
-
 #include <zlib.h>
 
 void
@@ -37,25 +35,3 @@
        unhand(this)->adler = adler32((uint32)unhand(this)->adler, &b, 
sizeof(b));
 }
 
-#else
-
-static void 
-supportDisabled (void)
-{
-       SignalError ("org.kaffe.util.SupportDisabled",
-                    "libz was not found by Kaffe configure script");
-}
-
-void
-java_util_zip_Adler32_update(struct Hjava_util_zip_Adler32* this, 
HArrayOfByte* buf, jint from, jint len)
-{
-       supportDisabled();
-}
-
-void
-java_util_zip_Adler32_update1(struct Hjava_util_zip_Adler32* this, jint val)
-{
-       supportDisabled();
-}
-
-#endif
Index: kaffe/libraries/clib/zip/Deflater.c
diff -u kaffe/libraries/clib/zip/Deflater.c:1.19 
kaffe/libraries/clib/zip/Deflater.c:1.20
--- kaffe/libraries/clib/zip/Deflater.c:1.19    Wed Oct 19 20:10:41 2005
+++ kaffe/libraries/clib/zip/Deflater.c Sun Feb  5 00:36:41 2006
@@ -15,8 +15,6 @@
 #include <native.h>
 #include "java_util_zip_Deflater.h"
 
-#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
-
 #include <zlib.h>
 
 #define        WSIZE           0x8000
@@ -189,66 +187,3 @@
 
        setStream(this, dstream);
 }
-
-#else
-
-static void 
-supportDisabled (void)
-{
-       SignalError ("org.kaffe.util.SupportDisabled",
-                    "libz was not found by Kaffe configure script");
-}
-    
-void
-java_util_zip_Deflater_setDictionary(struct Hjava_util_zip_Deflater* this, 
HArrayOfByte* buf, jint from, jint len)
-{
-       supportDisabled();
-}
-
-jint
-java_util_zip_Deflater_deflate(struct Hjava_util_zip_Deflater* this, 
HArrayOfByte* buf, jint off, jint len)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Deflater_getAdler(struct Hjava_util_zip_Deflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Deflater_getTotalIn(struct Hjava_util_zip_Deflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Deflater_getTotalOut(struct Hjava_util_zip_Deflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-void
-java_util_zip_Deflater_reset(struct Hjava_util_zip_Deflater* this)
-{
-       supportDisabled();
-}
-
-void
-java_util_zip_Deflater_end(struct Hjava_util_zip_Deflater* this)
-{
-       supportDisabled();
-}
-
-void
-java_util_zip_Deflater_init(struct Hjava_util_zip_Deflater* this, jboolean val)
-{
-       supportDisabled();
-}
-
-#endif
Index: kaffe/libraries/clib/zip/Inflater.c
diff -u kaffe/libraries/clib/zip/Inflater.c:1.18 
kaffe/libraries/clib/zip/Inflater.c:1.19
--- kaffe/libraries/clib/zip/Inflater.c:1.18    Wed Oct 19 20:10:41 2005
+++ kaffe/libraries/clib/zip/Inflater.c Sun Feb  5 00:36:41 2006
@@ -14,8 +14,6 @@
 #include <native.h>
 #include "java_util_zip_Inflater.h"
 
-#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
-
 #include <zlib.h>
 
 #define WSIZE          0x8000
@@ -188,66 +186,3 @@
        }
        setStream(this, dstream);
 }
-
-#else
-
-static void 
-supportDisabled (void)
-{
-       SignalError ("org.kaffe.util.SupportDisabled",
-                    "libz was not found by Kaffe configure script");
-}
-
-void
-java_util_zip_Inflater_setDictionary(struct Hjava_util_zip_Inflater* this, 
HArrayOfByte* buf, jint from, jint len)
-{
-       supportDisabled();
-}
-
-jint
-java_util_zip_Inflater_inflate(struct Hjava_util_zip_Inflater* this, 
HArrayOfByte* buf, jint off, jint len)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Inflater_getAdler(struct Hjava_util_zip_Inflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Inflater_getTotalIn(struct Hjava_util_zip_Inflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-jint
-java_util_zip_Inflater_getTotalOut(struct Hjava_util_zip_Inflater* this)
-{
-       supportDisabled();
-       return 0;
-}
-
-void
-java_util_zip_Inflater_reset(struct Hjava_util_zip_Inflater* this)
-{
-       supportDisabled();
-}
-
-void
-java_util_zip_Inflater_end(struct Hjava_util_zip_Inflater* this)
-{
-       supportDisabled();
-}
-
-void
-java_util_zip_Inflater_init(struct Hjava_util_zip_Inflater* this, jboolean val)
-{
-       supportDisabled();
-}
-
-#endif

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to