changeset 7894:930f4626048e

PR2003: --disable-system-gtk option broken by refactoring in PR1736
author andrew
date Wed, 17 Sep 2014 15:43:58 +0100
parents 6923000c68ee
children d5d2aed90aa8
files make/sun/gtk/Makefile src/solaris/native/common/deps/gtk2/gtk_fp.c src/solaris/native/common/deps/gtk2/gtk_fp.h src/solaris/native/common/deps/gtk2/gtk_fp_check.c src/solaris/native/common/deps/gtk2/gtk_fp_check.h
diffstat 5 files changed, 22 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/make/sun/gtk/Makefile	Sat Sep 13 16:38:53 2014 +0100
+++ b/make/sun/gtk/Makefile	Wed Sep 17 15:43:58 2014 +0100
@@ -58,6 +58,8 @@
 
 ifeq ($(SYSTEM_GTK), true)
   OTHER_LDLIBS += $(GTK_LIBS)
+else
+  OTHER_LDLIBS += $(LIBDL)
 endif
 
 ifeq  ($(PLATFORM), solaris)
--- a/src/solaris/native/common/deps/gtk2/gtk_fp.c	Sat Sep 13 16:38:53 2014 +0100
+++ b/src/solaris/native/common/deps/gtk2/gtk_fp.c	Wed Sep 17 15:43:58 2014 +0100
@@ -25,11 +25,8 @@
 #include <dlfcn.h>
 #include <setjmp.h>
 #include <stddef.h>
-#include "jvm_md.h"
 #include "gtk_fp.h"
 
-#define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0")
-#define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0")
 #define GTHREAD_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gthread-2.0", "0")
 #define GTHREAD_LIB JNI_LIB_NAME("gthread-2.0")
 #define NO_SYMBOL_EXCEPTION 1
--- a/src/solaris/native/common/deps/gtk2/gtk_fp.h	Sat Sep 13 16:38:53 2014 +0100
+++ b/src/solaris/native/common/deps/gtk2/gtk_fp.h	Wed Sep 17 15:43:58 2014 +0100
@@ -25,7 +25,7 @@
 #ifndef __GTK_FP_H__
 #define __GTK_FP_H__
 
-#include <gtk/gtk.h>
+#include "gtk_fp_check.h"
 
 gboolean gtk2_dlload();
 int gtk2_dlunload();
@@ -287,14 +287,6 @@
 void (*fp_gtk_main)(void);
 guint (*fp_gtk_main_level)(void);
 
-/**
- * Returns :
- * NULL if the GTK+ library is compatible with the given version, or a string
- * describing the version mismatch.
- */
-gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor,
-				      guint required_micro);
-
 void (*fp_g_thread_init)(GThreadFunctions *vtable);
 void (*fp_gdk_threads_init)(void);
 void (*fp_gdk_threads_enter)(void);
--- a/src/solaris/native/common/deps/gtk2/gtk_fp_check.c	Sat Sep 13 16:38:53 2014 +0100
+++ b/src/solaris/native/common/deps/gtk2/gtk_fp_check.c	Wed Sep 17 15:43:58 2014 +0100
@@ -24,6 +24,8 @@
  */
 #include "gtk_fp_check.h"
 
+#include <dlfcn.h>
+
 static gboolean gtk2_present = FALSE;
 
 gboolean gtk2_check_dlversion()
--- a/src/solaris/native/common/deps/gtk2/gtk_fp_check.h	Sat Sep 13 16:38:53 2014 +0100
+++ b/src/solaris/native/common/deps/gtk2/gtk_fp_check.h	Wed Sep 17 15:43:58 2014 +0100
@@ -25,6 +25,23 @@
 #ifndef __GTK_FP_CHECK_H__
 #define __GTK_FP_CHECK_H__
 
+#include <gtk/gtk.h>
+#include "jvm_md.h"
+
+#define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0")
+#define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0")
+
 gboolean gtk2_check_dlversion();
 
+/************************
+ * Gtk function pointers
+ ************************/
+/**
+ * Returns :
+ * NULL if the GTK+ library is compatible with the given version, or a string
+ * describing the version mismatch.
+ */
+gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor,
+				      guint required_micro);
+
 #endif