PLUGIN_LIBTOOL_FLAGS="-module -avoid-version -no-undefined"
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
+dnl ******************************
+dnl Check for Operating System
+dnl ******************************
+
+platform_win32=no
+
+case "$host" in
+*-mingw*)
+ platform_win32=yes
+ ;;
+esac
+
+AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
+
AC_CONFIG_FILES([
libconfi.pc
Makefile
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+pluginsdir=@libdir@/@PACKAGE@/plugins
Name: @PACKAGE_NAME@
-Description: Library to manage configurations with libgdaex
+Description: Library to manage configurations based on plugins (db, file, etc.)
Version: @PACKAGE_VERSION@
Requires: libgdaex
Libs: -L${libdir} -lconfi
-plugindir = $(libdir)/plugins/db
+pluginsdir = $(libdir)/$(PACKAGE)/plugins
AM_CPPFLAGS = \
- -I$(top_srcdir) \
+ -I$(top_srcdir) \
$(LIBCONFI_CFLAGS)
-plugin_LTLIBRARIES = libdb.la
+plugins_LTLIBRARIES = libdb.la
libdb_la_SOURCES = \
- plgdb.h \
+ plgdb.h \
plgdb.c
libdb_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libdb_la_LIBADD = \
- $(top_builddir)/src/libconfi.la \
+libdb_la_LIBADD = \
+ $(top_builddir)/src/libconfi.la \
$(LIBCONFI_LIBS)
-plugin_DATA = db.plugin
-
-EXTRA_DIST = $(plugin_DATA)
+plugins_DATA = db.plugin
AM_CPPFLAGS = $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
- $(LIBCONFI_CFLAGS)
+ $(LIBCONFI_CFLAGS) \
+ -DPLUGINSDIR=\""$(libdir)/$(PACKAGE)/plugins"\" \
+ -DG_LOG_DOMAIN=\"Confi\"
LIBS = $(LIBCONFI_LIBS)
libconfi_la_LDFLAGS = -no-undefined
-include_HEADERS = commons.h \
+libconfi_include_HEADERS = commons.h \
libconfi.h \
confipluggable.h
libconfi_includedir = $(includedir)/libconfi
+install-exec-hook:
+ mkdir -p "$(libdir)/$(PACKAGE)/plugins"
+
+uninstall-hook:
+ rm -rf "$(libdir)/$(PACKAGE)"
+
CLEANFILES =
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ENV = CC="$(CC)"
if HAVE_INTROSPECTION
-introspection_sources = $(libconfi_la_SOURCES) $(include_HEADERS)
+introspection_sources = $(libconfi_la_SOURCES) $(libconfi_include_HEADERS)
Confi-1.0.gir: libconfi.la
Confi_1_0_gir_INCLUDES = Gda-5.0
return NULL;
}
+ peas_engine_add_search_path (peas_engine, PLUGINSDIR, NULL);
+
lst_plugins = peas_engine_get_plugin_list (peas_engine);
while (lst_plugins)
{