Patch: fastjar and system zlib (PR 3441)
Tom Tromey
tromey@redhat.com
Thu Jun 28 12:42:00 GMT 2001
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)
More information about the Gcc-patches
mailing list