]> saetta.ns0.it Git - zakconfi/libzakconfi/commitdiff
Adjusted installation directories.
authorAndrea Zagli <azagli@libero.it>
Thu, 18 Dec 2014 07:55:34 +0000 (08:55 +0100)
committerAndrea Zagli <azagli@libero.it>
Thu, 18 Dec 2014 07:55:34 +0000 (08:55 +0100)
configure.ac
libconfi.pc.in
plugins/db/Makefile.am
src/Makefile.am
src/libconfi.c

index 0d4de2cdac941b9e3a97ceca9750951eb447ad88..dfd8bce20991c07114159667871f374701c69cf1 100644 (file)
@@ -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
index d6b1440eed9b40451e7d34973527352090b9e5e5..818ac2ee5fa4e9979dd254aaa54a454ae0723e29 100644 (file)
@@ -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
index 1b62ee8169febe3eebe6b9830c3de6c97fa48773..8a0e0f9fc9d41e11b4c5c2b49dda4dbbf46e8b0b 100644 (file)
@@ -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
index 5019c3e06aa147a9d1e92e72e39147b9a768bb51..b55f1d8385b0638d8809424b422328ed47a2add1 100644 (file)
@@ -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
index db5825c9aa59df8699456ea3fd3da7eca703fa6e..e7acf449e0548005dd2b55bb0dd2f6d73e29ff79 100644 (file)
@@ -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)
                {