This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: fastjar and system zlib (PR 3441)
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Subject: Patch: fastjar and system zlib (PR 3441)
- From: Tom Tromey <tromey at redhat dot com>
- Date: 28 Jun 2001 14:01:42 -0600
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Reply-To: tromey at redhat dot com
I'm checking this in. It changes fastjar to respect the
--with-system-zlib configure option, per PR 3441. I tested this, both
ways, on my x86 box.
2001-06-28 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.
* configure.in: Accept --with-system-zlib. Fixes PR java/3441.
Tom
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/configure.in,v
retrieving revision 1.3
diff -u -r1.3 configure.in
--- configure.in 2000/12/15 18:45:09 1.3
+++ configure.in 2001/06/28 19:39:17
@@ -37,10 +37,25 @@
dnl Check byte order
AC_C_BIGENDIAN
-dnl Brain dead check for tree's zlib
-ZDEPS='$(top_builddir)/../zlib/libz.a'
-ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
-ZINCS='-I$(top_srcdir)/../zlib'
+AC_ARG_WITH(system-zlib,
+[ --with-system-zlib use installed libz])
+
+ZLIBS=
+ZDEPS=
+ZINCS=
+use_zlib=maybe
+if test "$with_system_zlib" = yes; then
+ AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
+else
+ use_zlib=no
+fi
+
+if test "$use_zlib" = no; then
+ # Brain dead way to find tree's zlib.
+ ZDEPS='$(top_builddir)/../zlib/libz.a'
+ ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
+ ZINCS='-I$(top_srcdir)/../zlib'
+fi
AC_SUBST(ZLIBS)
AC_SUBST(ZDEPS)
AC_SUBST(ZINCS)