--- old/make/jdk_generic_profile.sh 2012-07-30 23:59:24.944864432 +0100 +++ new/make/jdk_generic_profile.sh 2012-07-30 23:59:24.796861948 +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 +