--- /dev/null
+diff -Naur ghostscript-9.15.orig/configure ghostscript-9.15.new/configure
+--- ghostscript-9.15.orig/configure 2014-09-22 06:17:33.000000000 -0400
++++ ghostscript-9.15.new/configure 2015-01-04 17:36:54.632612116 -0500
+@@ -6339,7 +6339,7 @@
+ $as_echo_n "checking for local zlib source... " >&6; }
+ # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR)
+ # this seems a harmless default
+-ZLIBDIR=src
++ZLIBDIR=$includedir
+ AUX_SHARED_ZLIB=
+
+ if test -d $srcdir/zlib; then
+diff -Naur ghostscript-9.15.orig/configure.ac ghostscript-9.15.new/configure.ac
+--- ghostscript-9.15.orig/configure.ac 2014-09-22 06:17:33.000000000 -0400
++++ ghostscript-9.15.new/configure.ac 2015-01-04 17:36:54.622612117 -0500
+@@ -884,7 +884,7 @@
+ dnl zlib is needed for language level 3, and libpng
+ # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR)
+ # this seems a harmless default
+-ZLIBDIR=src
++ZLIBDIR=$includedir
+ AUX_SHARED_ZLIB=
+
+ if test -d $srcdir/zlib; then
cd ${SRC_DIR}
- # To use the system-installed version of JasPer:
- rm -rf jasper
-
- # To use the system-installed copies of libjpeg and libpng:
- rm -rf jpeg
- rm -rf libpng
-
- # To use the system-installed copy of libtiff:
- rm -rf tiff
+ # To use the system-installed version of librairies:
+ rm -rf jasper tiff openjpeg
+ rm -rf expat freetype lcms2 jpeg libpng zlib
CONFIGURE_OPTS+=" \
--enable-dynamic \
+ --disable-compile-inits \
--with-system-libtiff \
--with-fontpath=${GS_FONTS_PATH}"
}