--- a/jdk/make/jdk_generic_profile.sh Thu Aug 09 17:49:43 2012 +0200
+++ b/jdk/make/jdk_generic_profile.sh Wed Aug 15 14:35:36 2012 +0100
@@ -378,3 +378,22 @@
export LLVM_LIBS
fi
fi
+
+# Export variables for system zlib
+# ZLIB_CFLAGS and ZLIB_LIBS tell the compiler how to compile and
+# link against zlib
+pkgconfig=$(which pkg-config 2>/dev/null)
+if [ -x "${pkgconfig}" ] ; then
+ if [ "${ZLIB_CFLAGS}" = "" ] ; then
+ ZLIB_CFLAGS=$("${pkgconfig}" --cflags zlib)
+ fi
+ if [ "${ZLIB_LIBS}" = "" ] ; then
+ ZLIB_LIBS=$("${pkgconfig}" --libs zlib)
+ fi
+fi
+if [ "${ZLIB_LIBS}" = "" ] ; then
+ ZLIB_LIBS="-lz"
+fi
+export ZLIB_CFLAGS
+export ZLIB_LIBS
+