changeset 770:1536df243bf6

Summary: Complete SYSTEM_ZLIB build hooks and enable for FreeBSD and OpenBSD Reviewed-by: glewis
author kurt
date Fri, 09 Jan 2009 09:01:03 -0500
parents 2a26505c1304
children 52c015181055
files make/common/Defs-bsd.gmk make/common/Program.gmk make/java/jli/Makefile make/sun/splashscreen/FILES_c.gmk make/sun/splashscreen/Makefile
diffstat 5 files changed, 55 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-bsd.gmk	Sun Dec 28 10:34:23 2008 -0800
+++ b/make/common/Defs-bsd.gmk	Fri Jan 09 09:01:03 2009 -0500
@@ -286,6 +286,14 @@
 # DPS (Displayable PostScript) is available on Solaris machines
 HAVE_DPS = no
 
+ifeq ($(OS_VENDOR), FreeBSD)
+  SYSTEM_ZLIB = true
+endif
+
+ifeq ($(OS_VENDOR), OpenBSD)
+  SYSTEM_ZLIB = true
+endif
+
 #
 # Japanese manpages
 #
--- a/make/common/Program.gmk	Sun Dec 28 10:34:23 2008 -0800
+++ b/make/common/Program.gmk	Fri Jan 09 09:01:03 2009 -0500
@@ -84,6 +84,9 @@
 # Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD
     LDFLAGS += -Wl,--export-dynamic
   endif
+  ifeq ($(SYSTEM_ZLIB),true)
+      OTHER_LDLIBS += -lz
+  endif
 endif
 ifneq (,$(findstring $(PLATFORM), linux solaris))	# UNIX systems
     LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
@@ -269,7 +272,9 @@
 endif
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
+ifneq ($(SYSTEM_ZLIB),true)
 OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+endif
 
 # this may not be necessary...
 ifeq ($(PLATFORM), windows)
--- a/make/java/jli/Makefile	Sun Dec 28 10:34:23 2008 -0800
+++ b/make/java/jli/Makefile	Fri Jan 09 09:01:03 2009 -0500
@@ -44,8 +44,10 @@
 
 include $(BUILDDIR)/common/Defs.gmk
 
+ifneq ($(SYSTEM_ZLIB),true)
 ZLIB_VERSION = 1.1.3
 ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+endif
 LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
 LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
 
@@ -66,7 +68,10 @@
 	parse_manifest.c \
 	version_comp.c \
 	wildcard.c \
-	jli_util.c \
+	jli_util.c
+
+ifneq ($(SYSTEM_ZLIB),true)
+FILES_c += \
 	inflate.c \
 	infblock.c \
 	inftrees.c \
@@ -75,6 +80,7 @@
 	infutil.c \
 	zadler32.c \
 	zutil.c
+endif
 
 ifneq ($(PLATFORM), windows)
 
@@ -125,7 +131,11 @@
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
 OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
-OTHER_INCLUDES += -I$(ZIP_SRC)
+ifneq ($(SYSTEM_ZLIB),true)
+  OTHER_INCLUDES += -I$(ZIP_SRC)
+else
+  LDLIBS += -lz
+endif
 
 #
 # Library to compile.
@@ -184,4 +194,8 @@
 #
 # Add to ambient vpath so we pick up the library files
 #
-vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)
+vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC)
+ifneq ($(SYSTEM_ZLIB),true)
+  vpath %.c $(ZIP_SRC)
+endif
+
--- a/make/sun/splashscreen/FILES_c.gmk	Sun Dec 28 10:34:23 2008 -0800
+++ b/make/sun/splashscreen/FILES_c.gmk	Fri Jan 09 09:01:03 2009 -0500
@@ -49,20 +49,6 @@
 	dgif_lib.c \
 	gif_err.c \
 	gifalloc.c \
-	compress.c \
-	deflate.c \
-	gzio.c \
-	infblock.c \
-	infcodes.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	infutil.c \
-	trees.c \
-	uncompr.c \
-	zadler32.c \
-	zcrc32.c \
-	zutil.c \
 	jcomapi.c \
 	jdapimin.c \
 	jdapistd.c \
@@ -108,3 +94,20 @@
 	jfdctfst.c \
 	jfdctint.c
 
+ifneq ($(SYSTEM_ZLIB),true)
+  FILES_c += \
+	compress.c \
+	deflate.c \
+	gzio.c \
+	infblock.c \
+	infcodes.c \
+	inffast.c \
+	inflate.c \
+	inftrees.c \
+	infutil.c \
+	trees.c \
+	uncompr.c \
+	zadler32.c \
+	zcrc32.c \
+	zutil.c
+endif
--- a/make/sun/splashscreen/Makefile	Sun Dec 28 10:34:23 2008 -0800
+++ b/make/sun/splashscreen/Makefile	Fri Jan 09 09:01:03 2009 -0500
@@ -62,7 +62,11 @@
 CFLAGS += -DSPLASHSCREEN
 
 CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ifneq ($(SYSTEM_ZLIB),true)
+  CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+endif
+
 
 ifneq ($(PLATFORM), windows)
   CFLAGS += -DWITH_X11
@@ -89,7 +93,9 @@
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/splashscreen
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/giflib
-vpath %.c   $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+ifneq ($(SYSTEM_ZLIB),true)
+  vpath %.c   $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+endif
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/libpng
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
 vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen