diff --git a/Makefile.am b/Makefile.am
index a582876..1a4e5bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@ EXTRA_DIST = \
 	ChangeLog.pre-git	\
 	gnome-doc-utils.make
 
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper --enable-introspection
 DISTCLEANFILES =		\
 	gnome-doc-utils.make
 
diff --git a/configure.in b/configure.in
index f3b3fbd..11e0b9b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
 AC_INIT([gnome-panel], [2.31.3],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-panel])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar])
+AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar -Wno-portability])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_CONFIG_MACRO_DIR([m4])
@@ -37,6 +37,9 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2)
 
 GNOME_COMPILE_WARNINGS(maximum)
 
+# Check for introspection
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
 m4_pattern_allow([AM_V_GEN])dnl Make autoconf not complain about the rule below
 PANEL_INTLTOOL_PANEL_APPLET_RULE='%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 AC_SUBST([PANEL_INTLTOOL_PANEL_APPLET_RULE])
diff --git a/libpanel-applet/Makefile.am b/libpanel-applet/Makefile.am
index d23fd01..d191a9f 100644
--- a/libpanel-applet/Makefile.am
+++ b/libpanel-applet/Makefile.am
@@ -94,6 +94,38 @@ pkgconfig_DATA = libpanelapplet-3.0.pc
 
 CLEANFILES = $(BUILT_SOURCES) $(noinst_DATA)
 
+###############################
+# Introspection generation
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources =   panel-applet.h     $(libpanel_applet_3_la_SOURCES)
+
+PanelApplet-3.0.gir: libpanel-applet-3.la
+PanelApplet_3_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 GConf-2.0
+PanelApplet_3_0_gir_CFLAGS =  -I$(top_builddir)/libpanel-applet                       \
+        -DPANEL_APPLET_DATADIR=\""$(datadir)"\"                 \
+        -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"  \
+        $(LIBPANEL_APPLET_CFLAGS)                 
+PanelApplet_3_0_gir_LIBS = libpanel-applet-3.la
+PanelApplet_3_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += PanelApplet-3.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
+################################
+
 appletdir       = $(datadir)/gnome-panel/applets
 applet_in_files = org.gnome.panel.TestApplet.panel-applet.in
 noinst_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
