[gnome-globalmenu] Make libserver an installed, shared library



commit 9b9fcecb5ae40088e5b2410c07ceb4af4048c9e3
Author: John Stowers <john stowers gmail com>
Date:   Wed Nov 11 06:56:33 2009 +0800

    Make libserver an installed, shared library

 configure.ac                           |    1 +
 libserver/Makefile.am                  |   13 +++++++++++--
 libserver/gnomeglobalmenu-server.pc.in |   11 +++++++++++
 tools/.gitignore                       |    1 +
 tools/Makefile.am                      |    7 ++++++-
 tools/standalone.c                     |   21 +++++++++++++++++++++
 6 files changed, 51 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b79adf3..3fcd5a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,7 @@ AC_CONFIG_FILES(
 	[Makefile
 	legacy-support/Makefile
 	libserver/Makefile
+	libserver/gnomeglobalmenu-server.pc
 	libserver/tests/Makefile
 	libsettings/Makefile
 	libsettings/tests/Makefile
diff --git a/libserver/Makefile.am b/libserver/Makefile.am
index 0c2690b..0c4cb7f 100644
--- a/libserver/Makefile.am
+++ b/libserver/Makefile.am
@@ -26,7 +26,15 @@ VALASOURCES = \
 	utils/mnemonickeys.vala \
 	$(NULL)
 
-noinst_LTLIBRARIES = libserver.la
+
+#mylibdir = $(libdir)/gnome-globalmenu
+lib_LTLIBRARIES = libserver.la
+
+libserver_includedir = $(includedir)/gnome-globalmenu
+libserver_include_HEADERS = globalmenu-server.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gnomeglobalmenu-server.pc
 
 libserver_la_SOURCES = \
 						$(VALASOURCES:.vala=.c) \
@@ -68,5 +76,6 @@ EXTRA_DIST = \
 	globalmenu-server.vapi \
 	globalmenu-server.deps \
 	bindings.vapi \
-	vala-ccode
+	vala-ccode \
+	gnomeglobalmenu-server.pc.in
 
diff --git a/libserver/gnomeglobalmenu-server.pc.in b/libserver/gnomeglobalmenu-server.pc.in
new file mode 100644
index 0000000..a0fe61d
--- /dev/null
+++ b/libserver/gnomeglobalmenu-server.pc.in
@@ -0,0 +1,11 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+ 
+Name: libgnomeglobalmenu-server
+Description: libgnomeglobalmenu-server
+Version: @VERSION@
+Libs: -L${libdir} -lserver
+Cflags: -I${includedir}/gnome-globalmenu
+Requires: gtk+-2.0 libwnck-1.0
diff --git a/tools/.gitignore b/tools/.gitignore
index eb5f430..9106160 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -1 +1,2 @@
 globalmenu-settings
+standalone-global-menu
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 97e7c4f..842f9b8 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -5,6 +5,11 @@ bin_PROGRAMS = $(VALASOURCES:.vala=)
 
 SUFFIXES = .vala .c
 
+noinst_PROGRAMS = standalone-global-menu
+standalone_global_menu_SOURCES = standalone.c
+standalone_global_menu_LDADD = $(top_builddir)/libserver/libserver.la $(GTK_LIBS) $(WNCK_LIBS)
+standalone_global_menu_CFLAGS = -I$(top_srcdir)/libserver $(GTK_CFLAGS) $(WNCK_CFLAGS)
+
 .vala.c:
 	$(VALAC) $(VALA_DEFAULT_PKGS) \
 	-C \
@@ -27,4 +32,4 @@ LDADD = $(GTK_LIBS) \
 	$(GLIB_LIBS) \
 	$(top_builddir)/libsettings/libsettings.la 
 
-EXTRA_DIST = $(STAMP) $(VALASOURCES)  $(VALASOURCES:.vala=.c)
+EXTRA_DIST = $(STAMP) $(VALASOURCES)  $(VALASOURCES:.vala=.c) standalone.c
diff --git a/tools/standalone.c b/tools/standalone.c
new file mode 100644
index 0000000..0d347ad
--- /dev/null
+++ b/tools/standalone.c
@@ -0,0 +1,21 @@
+#include <gtk/gtk.h>
+#include <globalmenu-server.h>
+
+
+int
+main (int argc, char **argv)
+{
+    GtkWidget *window;
+    GnomenuGlobalMenuBar *menubar;
+
+    gtk_init (&argc, &argv);
+
+    menubar = gnomenu_global_menu_bar_new();
+    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+	gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(menubar));
+	gtk_widget_show_all(window);
+
+    gtk_main ();
+    return 0;
+}



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