From 08fbd84360c176a2bccc33b0298c431e66246038 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Thu, 18 Dec 2014 08:55:34 +0100 Subject: [PATCH] Adjusted installation directories. --- configure.ac | 14 ++++++++++++++ libconfi.pc.in | 3 ++- plugins/db/Makefile.am | 16 +++++++--------- src/Makefile.am | 14 +++++++++++--- src/libconfi.c | 2 ++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 0d4de2c..dfd8bce 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,20 @@ AC_C_CONST 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 diff --git a/libconfi.pc.in b/libconfi.pc.in index d6b1440..818ac2e 100644 --- a/libconfi.pc.in +++ b/libconfi.pc.in @@ -2,9 +2,10 @@ prefix=@prefix@ 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 diff --git a/plugins/db/Makefile.am b/plugins/db/Makefile.am index 1b62ee8..8a0e0f9 100644 --- a/plugins/db/Makefile.am +++ b/plugins/db/Makefile.am @@ -1,20 +1,18 @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 5019c3e..b55f1d8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,8 @@ AM_CPPFLAGS = $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ - $(LIBCONFI_CFLAGS) + $(LIBCONFI_CFLAGS) \ + -DPLUGINSDIR=\""$(libdir)/$(PACKAGE)/plugins"\" \ + -DG_LOG_DOMAIN=\"Confi\" LIBS = $(LIBCONFI_LIBS) @@ -12,12 +14,18 @@ libconfi_la_SOURCES = commons.c \ 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) @@ -27,7 +35,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) 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 diff --git a/src/libconfi.c b/src/libconfi.c index db5825c..e7acf44 100644 --- a/src/libconfi.c +++ b/src/libconfi.c @@ -109,6 +109,8 @@ static ConfiPluggable return NULL; } + peas_engine_add_search_path (peas_engine, PLUGINSDIR, NULL); + lst_plugins = peas_engine_get_plugin_list (peas_engine); while (lst_plugins) { -- 2.49.0