# HG changeset patch # User omajid # Date 1392908874 18000 # Node ID e7d0093bfc6c5a41bd589044cf749f0c88d90e36 # Parent bb48872f932657d53184153a3e67c8141a596756 8035341: Allow using a system installed libpng Reviewed-by: andrew, erikj, ihse, serb diff -r bb48872f9326 -r e7d0093bfc6c jdk/make/lib/Awt2dLibraries.gmk --- a/jdk/make/lib/Awt2dLibraries.gmk Tue Feb 18 17:55:04 2014 -0800 +++ b/jdk/make/lib/Awt2dLibraries.gmk Thu Feb 20 10:07:54 2014 -0500 @@ -1197,7 +1197,6 @@ ifndef BUILD_HEADLESS_ONLY LIBSPLASHSCREEN_DIRS := \ $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \ - $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \ $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen ifeq ($(USE_EXTERNAL_LIBGIF), true) @@ -1207,6 +1206,11 @@ GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib endif + ifeq ($(USE_EXTERNAL_LIBPNG), false) + LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/libpng + LIBPNG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/libpng + endif + ifneq ($(OPENJDK_TARGET_OS), macosx) LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen else @@ -1269,11 +1273,13 @@ EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \ LANG := C, \ OPTIMIZATION := LOW, \ - CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \ + CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ + $(GIFLIB_CFLAGS) $(PNG_CFLAGS), \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \ + LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \ + $(GIFLIB_LDFLAGS) $(PNG_LIBS), \ LDFLAGS_SUFFIX_solaris := -lc, \ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ RC_FLAGS := $(RC_FLAGS) \ diff -r bb48872f9326 -r e7d0093bfc6c jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c Tue Feb 18 17:55:04 2014 -0800 +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c Thu Feb 20 10:07:54 2014 -0500 @@ -25,7 +25,7 @@ #include "splashscreen_impl.h" -#include "../libpng/png.h" +#include #include