Implement lazy loading of fam plugin

This commit is contained in:
Alexander Larsson 2010-01-12 13:09:10 +01:00
parent 57b771235e
commit 74ad124cfb
2 changed files with 25 additions and 1 deletions

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.decl
NULL =
module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'
module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
giomodule_LTLIBRARIES = libgiofam.la
giomoduledir = $(GIO_MODULE_DIR)
@ -37,3 +37,16 @@ libgiofam_la_LIBADD = \
$(FAM_LIBS) \
$(NULL)
if CROSS_COMPILING
RUN_QUERY_MODULES=false
else
RUN_QUERY_MODULES=true
endif
install-data-hook:
if $(RUN_QUERY_MODULES) && test -z "$(DESTDIR)" ; then \
$(top_builddir)/gio/gio-querymodules$(EXEEXT) $(DESTDIR)$(GIO_MODULE_DIR) ; \
fi
uninstall-local:
$(RM) $(DESTDIR)$(GIO_MODULE_DIR)/giomodules.cache

View File

@ -41,3 +41,14 @@ g_io_module_unload (GIOModule *module)
_fam_sub_shutdown ();
}
char **
g_io_module_query (void)
{
char *eps[] = {
G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME,
G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME,
NULL
};
return g_strdupv (eps);
}