8026888: Licensee build failure due to wrong libs being called
authorerikj
Wed, 23 Oct 2013 17:57:38 +0200
changeset 20901 70f69e624fc9
parent 20900 c5e76df5aa74
child 20902 b3c8415563a7
8026888: Licensee build failure due to wrong libs being called Reviewed-by: tbell, ihse, simonis
jdk/makefiles/lib/Awt2dLibraries.gmk
--- a/jdk/makefiles/lib/Awt2dLibraries.gmk	Wed Oct 23 13:43:12 2013 +0100
+++ b/jdk/makefiles/lib/Awt2dLibraries.gmk	Wed Oct 23 17:57:38 2013 +0200
@@ -23,10 +23,7 @@
 # questions.
 #
 
-#
-# TODO replace with X_FLAGS / X_LIBS
-# and add them to configure
-#
+# Openwin is defined on Solaris.
 OPENWIN_LIB := $(OPENWIN_HOME)/lib
 
 WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
@@ -1250,10 +1247,12 @@
     LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
     LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
 
-  else ifneq ($(OPENJDK_TARGET_OS), windows)
+  else ifeq ($(OPENJDK_TARGET_OS), windows)
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
+  else ifeq ($(OPENJDK_TARGET_OS), solaris)
     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
   else
-    LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
   endif
 
   LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
@@ -1270,11 +1269,14 @@
         -framework Cocoa \
         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
         -framework JavaNativeFoundation
-  else ifneq ($(OPENJDK_TARGET_OS), windows)
+  else ifeq ($(OPENJDK_TARGET_OS), windows)
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
+  else ifeq ($(OPENJDK_TARGET_OS), solaris)
+    # Solaris still uses OPENWIN_LIB ..
     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
-  else # OPENJDK_TARGET_OS
-    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
-  endif # OPENJDK_TARGET_OS
+  else	# .. all other Unixes can use X_LIBS
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
+  endif
 
   $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
       LIBRARY := splashscreen, \
@@ -1440,9 +1442,9 @@
       INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
-      $(X_CFLAGS) \
-      $(X_LIBS) \
-      $(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
+          $(X_CFLAGS) \
+          $(X_LIBS) \
+          $(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
           -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
           -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
           -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \