Commit 58921206 authored by Garrett Regier's avatar Garrett Regier

Bug 621549 - Build GObject Introspection

parent 1be98e74
......@@ -378,6 +378,16 @@ AC_SUBST(GEDIT_PLUGINS_LIBS_DIR)
GNOME_DOC_INIT([0.9.0],,
[AC_MSG_WARN([[gnome-doc-utils not found: documentation will not be built.]])])
# Introspection
GOBJECT_INTROSPECTION_CHECK([0.6.7])
if test "$found_introspection" = "yes"; then
enable_introspection=yes
AC_DEFINE([ENABLE_INTROSPECTION], [1], [Define to enable GObject Introspection])
else
enable_introspection=no
fi
AC_CONFIG_FILES([
Makefile
data/gedit.desktop.in
......@@ -437,7 +447,8 @@ Configuration:
Compiler: ${CC}
Spell Plugin enabled: $enable_enchant
Gvfs metadata enabled: $enable_gvfs_metadata
Deprecations enabled: $enable_deprecations
Deprecations enabled: $enable_deprecations
GObject Introspection: $enable_introspection
"
if expr ${GEDIT_MINOR_VERSION} % 2 > /dev/null; then
......
......@@ -13,13 +13,19 @@ INCLUDES = \
$(IGE_MAC_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(INTROSPECTION_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\"
gedit_SOURCES = \
gedit.c
gedit_LDADD = libgedit.la $(GEDIT_LIBS) $(IGE_MAC_LIBS) $(EGG_SMCLIENT_LIBS)
gedit_LDADD = \
libgedit.la \
$(GEDIT_LIBS) \
$(IGE_MAC_LIBS) \
$(EGG_SMCLIENT_LIBS) \
$(INTROSPECTION_LIBS)
if PLATFORM_WIN32
gedit_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libgedit-$(GEDIT_API_VERSION).a
......@@ -152,8 +158,7 @@ headerdir = $(prefix)/include/gedit-@GEDIT_API_VERSION@/gedit
header_DATA = \
$(INST_H_FILES)
libgedit_la_SOURCES = \
$(BUILT_SOURCES) \
libgedit_c_files = \
gedit-app.c \
gedit-close-button.c \
gedit-command-line.c \
......@@ -205,7 +210,11 @@ libgedit_la_SOURCES = \
gedit-utils.c \
gedit-view.c \
gedit-window.c \
gedittextregion.c \
gedittextregion.c
libgedit_la_SOURCES = \
$(BUILT_SOURCES) \
$(libgedit_c_files) \
$(NOINST_H_FILES) \
$(INST_H_FILES)
......@@ -249,6 +258,29 @@ EXTRA_DIST = \
CLEANFILES = $(BUILT_SOURCES)
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Gedit-3.0.gir
Gedit-3.0.gir: libgedit.la
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
Gedit_3_0_gir_NAMESPACE = Gedit
Gedit_3_0_gir_VERSION = 3.0
Gedit_3_0_gir_PROGRAM = $(builddir)/gedit
Gedit_3_0_gir_FILES = $(INST_H_FILES) $(libgedit_c_files)
Gedit_3_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(INTROSPECTION_TYPELIBDIR)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += \
$(gir_DATA) \
$(typelib_DATA)
endif
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
......
......@@ -32,6 +32,10 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
#ifdef ENABLE_INTROSPECTION
#include <girepository.h>
#endif
#include "gedit-command-line.h"
#include "eggsmclient.h"
......@@ -334,6 +338,10 @@ gedit_command_line_parse (GeditCommandLine *command_line,
g_option_context_add_group (context, gtk_get_option_group (FALSE));
g_option_context_add_group (context, egg_sm_client_get_option_group ());
#ifdef ENABLE_INTROSPECTION
g_option_context_add_group (context, g_irepository_get_option_group ());
#endif
gtk_init (argc, argv);
if (!g_option_context_parse (context, argc, argv, &error))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment