Fix hardcoded installation path for plugins and extensions
authorAlexander Kanavin <alexander.kanavin@intel.com>
Mon, 28 Jan 2013 14:07:12 +0000 (16:07 +0200)
committerAlexander Kanavin <alexander.kanavin@intel.com>
Mon, 28 Jan 2013 14:48:47 +0000 (16:48 +0200)
common.mk [new file with mode: 0644]
include/gsignond/gsignond-config.h
src/common/Makefile.am
src/extensions/test/Makefile.am
src/plugins/password/Makefile.am

diff --git a/common.mk b/common.mk
new file mode 100644 (file)
index 0000000..49bdeb0
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,2 @@
+extensionsdir = $(pkglibdir)/extensions
+pluginsdir = $(pkglibdir)/plugins
index ff4662a..f18cf0a 100644 (file)
@@ -46,23 +46,6 @@ typedef struct _GSignondConfig GSignondConfig;
 typedef struct _GSignondConfigClass GSignondConfigClass;
 typedef struct _GSignondConfigPrivate GSignondConfigPrivate;
 
-
-#ifndef GSIGNOND_PLUGINS_DIR
-#   define GSIGNOND_PLUGINS_DIR "/usr/lib/signon"
-#endif
-
-#ifndef GSIGNOND_PLUGIN_PREFIX
-#   define GSIGNOND_PLUGIN_PREFIX "lib"
-#endif
-
-#ifndef GSIGNOND_PLUGIN_SUFFIX
-#   define GSIGNOND_PLUGIN_SUFFIX "plugin.so"
-#endif
-
-#ifndef GSIGNOND_EXTENSIONS_DIR
-#   define GSIGNOND_EXTENSIONS_DIR "/usr/lib"
-#endif
-
 struct _GSignondConfig
 {
     GObject parent;
index 5816ad7..ecd42c3 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/common.mk
+
 SUBDIRS = db 
 NULL=
 
@@ -8,6 +10,8 @@ libgsignond_common_la_CPPFLAGS = \
     -I$(top_srcdir)/src \
     -I$(top_srcdir)/include \
     $(GSIGNOND_CFLAGS) \
+    -DGSIGNOND_PLUGINS_DIR='"$(pluginsdir)"' \
+    -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \
     $(NULL)
 
 libgsignond_common_la_DEPENDENCIES = \
index cd4f835..95bb93e 100644 (file)
@@ -1,4 +1,5 @@
-lib_LTLIBRARIES = libextension-test.la
+include $(top_srcdir)/common.mk
+extensions_LTLIBRARIES = libextension-test.la
 
 libextension_test_la_CPPFLAGS = \
        -I$(top_srcdir) \
index 457229f..f117313 100644 (file)
@@ -1,4 +1,5 @@
-lib_LTLIBRARIES = libpasswordplugin.la
+include $(top_srcdir)/common.mk
+plugins_LTLIBRARIES = libpasswordplugin.la
 NULL=
 
 libpasswordplugin_la_CPPFLAGS = \