[yelp/yelp-3-0: 27/27] Fixing some build issues with libyelp



commit 0ecd81f37560fc968ea2916e0fa3a7a0cd59174b
Author: Shaun McCance <shaunm gnome org>
Date:   Sun Sep 6 21:05:43 2009 -0500

    Fixing some build issues with libyelp

 Makefile.am         |    2 +-
 configure.in        |   12 ++++--------
 libyelp/Makefile.am |    8 ++++----
 libyelp/yelp-view.c |   17 +++++++++--------
 libyelp/yelp-view.h |    9 ++-------
 src/Makefile.am     |   50 ++++++++++++++++++++++----------------------------
 tests/Makefile.am   |   19 +++++++++++--------
 7 files changed, 53 insertions(+), 64 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9ccead5..5752cdb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src stylesheets po data tests
+SUBDIRS = libyelp src stylesheets po data tests
 
 @INTLTOOL_DESKTOP_RULE@
 
diff --git a/configure.in b/configure.in
index c5161f8..5afa805 100644
--- a/configure.in
+++ b/configure.in
@@ -55,6 +55,8 @@ PKG_CHECK_MODULES(YELP,
 [
 	gio-2.0
 	gconf-2.0
+	gio-2.0
+	gio-unix-2.0
 	gnome-doc-utils >= 0.17.2
 	gtk+-unix-print-2.0
 	gtk+-2.0 >= 2.10.0
@@ -64,7 +66,9 @@ PKG_CHECK_MODULES(YELP,
 	libstartup-notification-1.0 >= 0.8
 	dbus-glib-1
 	rarian >= 0.7.0
+	webkit-1.0
 ])
+
 AC_SUBST([YELP_CFLAGS])
 AC_SUBST([YELP_LIBS])
 
@@ -211,14 +215,6 @@ dnl <= Check for bzip2 > 1.0.0
 AC_SUBST(BZ_LIBS)
 
 # *****
-# Webkit
-# *****
-  PKG_CHECK_MODULES(YELP_WEBKIT, "webkit-1.0")
-  AC_SUBST(YELP_WEBKIT_CFLAGS)
-  AC_SUBST(YELP_WEBKIT_LIBS)
-  AC_DEFINE(WEBKIT_BACKEND, 1, [Webkit Backend])
-
-# *****
 # SMClient
 # *****
 
diff --git a/libyelp/Makefile.am b/libyelp/Makefile.am
index f452fd2..e51e225 100644
--- a/libyelp/Makefile.am
+++ b/libyelp/Makefile.am
@@ -1,12 +1,12 @@
-lib_LIBRARIES = libyelp.a
+noinst_LTLIBRARIES = libyelp.la
 
-libyelp_a_SOURCES =		\
+libyelp_la_SOURCES =		\
 	yelp-debug.c		\
 	yelp-uri.c		\
 	yelp-view.c
 
-libyelp_a_CFLAGS =		\
+libyelp_la_CFLAGS =		\
 	$(YELP_CFLAGS)
 
-libyelp_a_LIBADD =		\
+libyelp_la_LIBADD =		\
 	$(YELP_LIBS)
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index ff0d43a..2cc83cf 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -27,6 +27,9 @@
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 #include <gtk/gtk.h>
+#include <webkit/webkit.h>
+
+#include "yelp-view.h"
 
 static void        view_init		          (YelpView        *view);
 static void        view_class_init	          (YelpViewClass   *klass);
@@ -38,9 +41,9 @@ enum {
 static gint signals[LAST_SIGNAL] = { 0 };
 static GObjectClass *parent_class = NULL;
 
-#define YELP_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), YELP_TYPE_VIEW, YelpWindowView))
+#define YELP_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), YELP_TYPE_VIEW, YelpViewPriv))
 
-struct _YelpWindowPriv {
+struct _YelpViewPriv {
     WebKitWebView  *webview;
 };
 
@@ -54,7 +57,7 @@ yelp_view_get_type (void)
 {
     static GType view_type = 0;
 
-    if (!window_type) {
+    if (!view_type) {
 	static const GTypeInfo view_info = {
 	    sizeof (YelpViewClass),
 	    NULL,
@@ -66,7 +69,7 @@ yelp_view_get_type (void)
 	    0,
 	    (GInstanceInitFunc) view_init,
 	};
-	view_type = g_type_register_static (GTK_TYPE_VIEW,
+	view_type = g_type_register_static (YELP_TYPE_VIEW,
                                             "YelpView",
                                             &view_info, 0);
     }
@@ -78,7 +81,7 @@ view_init (YelpView *view)
 {
     view->priv = YELP_VIEW_GET_PRIVATE (view);
     view->priv->webview = (WebKitWebView *) webkit_web_view_new ();
-    gtk_container_add (GTK_CONTAINER (view), (GtkWidget *) webview);
+    gtk_container_add (GTK_CONTAINER (view), (GtkWidget *) view->priv->webview);
 }
 
 static void
@@ -112,9 +115,7 @@ view_class_init (YelpViewClass *klass)
 	g_signal_new ("new_view_requested",
 		      G_TYPE_FROM_CLASS (klass),
 		      G_SIGNAL_RUN_LAST,
-		      G_STRUCT_OFFSET (YelpViewClass,
-				       new_view_requested),
-		      NULL, NULL,
+                      0, NULL, NULL,
 		      g_cclosure_marshal_VOID__STRING,
 		      G_TYPE_NONE, 1, G_TYPE_STRING);
 
diff --git a/libyelp/yelp-view.h b/libyelp/yelp-view.h
index 052eb11..0b1e3df 100644
--- a/libyelp/yelp-view.h
+++ b/libyelp/yelp-view.h
@@ -44,17 +44,12 @@ struct _YelpView
 struct _YelpViewClass
 {
     GtkContainerClass  parent_class;
-
-    /* Signals */
-    void (*new_window_requested) (YelpWindow *window);
-    void (*new_window_requested_uri) (YelpWindow *window,
-				      const gchar *uri);
 };
 
 GType            yelp_view_get_type        (void);
 GtkWidget *      yelp_view_new             (GNode         *doc_tree,
 					    GList         *index);
-void             yelp_view_load            (YelpWindow    *window,
+void             yelp_view_load            (YelpView      *view,
 					    const gchar   *uri);
 
-#endif /* __YELP_WINDOW_H__ */
+#endif /* __YELP_VIEW_H__ */
diff --git a/src/Makefile.am b/src/Makefile.am
index 39575fb..5cc96de 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,9 +3,8 @@ bin_PROGRAMS = yelp
 yelp_SOURCES =							\
 	yelp-base.c		yelp-base.h			\
 	yelp-bookmarks.c 	yelp-bookmarks.h		\
-	yelp-debug.c		yelp-debug.h			\
 	yelp-error.c		yelp-error.h			\
-	yelp-html.c			yelp-html.h			\
+	yelp-html.c		yelp-html.h			\
 	yelp-io-channel.c	yelp-io-channel.h		\
 	yelp-settings.c		yelp-settings.h			\
 	yelp-utils.c		yelp-utils.h			\
@@ -40,26 +39,21 @@ YELP_DEFINES =								\
 	-DSHAREDIR=\""$(pkgdatadir)"\"                                  \
 	-DGDU_ICON_PATH=\"$(GDU_ICON_PATH)\"
 
-yelp_CPPFLAGS =									\
-	-I$(top_srcdir)								\
-	-I$(top_builddir)/src							\
-	$(YELP_DEFINES)								\
-	$(AM_CPPFLAGS)
-
-yelp_CFLAGS =				\
-	$(YELP_CFLAGS)			\
-	$(YELP_SEARCH_CFLAGS)		\
-	$(AM_CFLAGS)			\
-	$(YELP_WEBKIT_CFLAGS)
-
-yelp_LDADD =				\
-	$(YELP_LIBS)			\
-	$(YELP_SEARCH_LIBS)		\
-	$(POPT_LIBS)			\
-	$(Z_LIBS)			\
-	$(BZ_LIBS)			\
-	$(LZMADEC_LIBS)			\
-	$(YELP_WEBKIT_LIBS)		\
+yelp_CFLAGS =					\
+	-I$(top_srcdir)/libyelp			\
+	$(YELP_CFLAGS)				\
+	$(YELP_SEARCH_CFLAGS)			\
+	$(AM_CFLAGS)				\
+	$(YELP_DEFINES)
+
+yelp_LDADD =					\
+	$(top_builddir)/libyelp/libyelp.la	\
+	$(YELP_LIBS)				\
+	$(YELP_SEARCH_LIBS)			\
+	$(POPT_LIBS)				\
+	$(Z_LIBS)				\
+	$(BZ_LIBS)				\
+	$(LZMADEC_LIBS)				\
 	$(X_LIBS)
 
 yelp_LDFLAGS = $(AM_LDFLAGS)
@@ -77,7 +71,7 @@ yelp_LDADD += $(SMCLIENT_LIBS)
 
 if WITH_SMCLIENT_XSMP
 yelp_SOURCES += eggsmclient-xsmp.c
-yelp_CPPFLAGS += -DEGG_SM_CLIENT_BACKEND_XSMP
+yelp_CFLAGS += -DEGG_SM_CLIENT_BACKEND_XSMP
 endif
 if WITH_SMCLIENT_WIN32
 yelp_SOURCES += eggsmclient-win32.c
@@ -87,12 +81,12 @@ yelp_SOURCES += eggsmclient-osx.c
 endif
 endif
 
-#check_PROGRAMS =		\
-#	test-document		\
-#	test-man-parser		\
-#	test-page		\
-#	test-transform		\
-#	test-resolver
+check_PROGRAMS =		\
+	test-document		\
+	test-man-parser		\
+	test-page		\
+	test-transform		\
+	test-resolver
 
 test_document_SOURCES =					\
 	yelp-debug.c		yelp-debug.h		\
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2975199..6277334 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,10 +1,13 @@
-check_PROGRAMS = test-uri
+YELP_COMMON_CFLAGS =				\
+	$(YELP_CFLAGS)				\
+	$(AM_CFLAGS)				\
+	$(YELP_DEFINES)				\
+	-I$(top_srcdir)/libyelp
+YELP_COMMON_LDADD =				\
+	$(YELP_LIBS)				\
+	$(top_builddir)/libyelp/libyelp.la
 
-test_uri_SOURCES =				\
-	$(top_srcdir)/libyelp/yelp-uri.c	\
-	$(top_srcdir)/libyelp/yelp-uri.h	\
-	test-uri.c
+check_PROGRAMS = test-uri
 
-test_uri_CFLAGS = $(YELP_CFLAGS) $(AM_CFLAGS) $(YELP_DEFINES) -I$(top_srcdir)/libyelp `pkg-config --cflags gio-unix-2.0`
-test_uri_LDADD = $(YELP_LIBS)
-test_uri_LDFLAGS = $(AM_LDFLAGS) `pkg-config --libs gio-unix-2.0`
+test_uri_CFLAGS = $(YELP_COMMON_CFLAGS)
+test_uri_LDADD = $(YELP_COMMON_LDADD)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]