Index: debian/codeblocks-contrib.install
===================================================================
--- debian/codeblocks-contrib.install	(Revision 5282)
+++ debian/codeblocks-contrib.install	(Arbeitskopie)
@@ -1,3 +1,24 @@
+usr/lib/codeblocks/plugins/libAutoVersioning.* 
+usr/lib/codeblocks/plugins/libBrowseTracker.* 
+usr/lib/codeblocks/plugins/libbyogames.* 
+usr/lib/codeblocks/plugins/libcb_koders.* 
+usr/lib/codeblocks/plugins/libcodesnippets.* 
+usr/lib/codeblocks/plugins/libcodestat.* 
+usr/lib/codeblocks/plugins/libdragscroll.* 
+usr/lib/codeblocks/plugins/libenvvars.* 
+usr/lib/codeblocks/plugins/libexporter.* 
+usr/lib/codeblocks/plugins/libheaderfixup.* 
+usr/lib/codeblocks/plugins/libhelp_plugin.* 
+usr/lib/codeblocks/plugins/libHexEditor.* 
+usr/lib/codeblocks/plugins/libkeybinder.* 
+usr/lib/codeblocks/plugins/liblib_finder.* 
+usr/lib/codeblocks/plugins/libProfiler.* 
+usr/lib/codeblocks/plugins/libRegExTestbed.* 
+usr/lib/codeblocks/plugins/libSymTab.* 
+usr/lib/codeblocks/plugins/libThreadSearch.* 
+usr/lib/codeblocks/plugins/libValgrind.* 
+usr/lib/codeblocks/plugins/libwxsmith.* 
+usr/lib/codeblocks/plugins/libwxsmithcontribitems.* 
 usr/share/codeblocks/AutoVersioning.zip*
 usr/share/codeblocks/BrowseTracker.zip*
 usr/share/codeblocks/byogames.zip*
@@ -25,26 +46,5 @@
 usr/share/codeblocks/images/ThreadSearch*
 usr/share/codeblocks/images/IncrementalSearch*
 usr/share/codeblocks/lib_finder/*
-usr/share/codeblocks/plugins/libAutoVersioning.*
-usr/share/codeblocks/plugins/libBrowseTracker.*
-usr/share/codeblocks/plugins/libbyogames.*
-usr/share/codeblocks/plugins/libcb_koders.*
-usr/share/codeblocks/plugins/libcodesnippets.*
-usr/share/codeblocks/plugins/libcodestat.*
-usr/share/codeblocks/plugins/libdragscroll.*
-usr/share/codeblocks/plugins/libenvvars.*
-usr/share/codeblocks/plugins/libexporter.*
-usr/share/codeblocks/plugins/libheaderfixup.*
-usr/share/codeblocks/plugins/libhelp_plugin.*
-usr/share/codeblocks/plugins/libkeybinder.*
-usr/share/codeblocks/plugins/liblib_finder.*
-usr/share/codeblocks/plugins/libProfiler.*
-usr/share/codeblocks/plugins/libRegExTestbed.*
-usr/share/codeblocks/plugins/libSymTab.*
-usr/share/codeblocks/plugins/libThreadSearch.*
-usr/share/codeblocks/plugins/libValgrind.*
-usr/share/codeblocks/plugins/libwxsmith.*
-usr/share/codeblocks/plugins/libwxsmithcontribitems.*
-usr/share/codeblocks/plugins/libHexEditor.*
 usr/share/codeblocks/plugins/libIncrementalSearch.*
 
Index: debian/codeblocks.install
===================================================================
--- debian/codeblocks.install	(Revision 5282)
+++ debian/codeblocks.install	(Arbeitskopie)
@@ -1,41 +1,12 @@
 usr/bin
-usr/share/applications
-usr/share/codeblocks/icons
-usr/share/codeblocks/images/*.png
-usr/share/codeblocks/images/16x16
-usr/share/codeblocks/images/codecompletion
-usr/share/codeblocks/images/settings
-usr/share/codeblocks/lexers
-usr/share/codeblocks/plugins/libastyle.*
-usr/share/codeblocks/plugins/libautosave.*
-usr/share/codeblocks/plugins/libclasswizard.*
-usr/share/codeblocks/plugins/libcodecompletion.*
-usr/share/codeblocks/plugins/libcompiler.*
-usr/share/codeblocks/plugins/libdebugger.*
-usr/share/codeblocks/plugins/libdefaultmimehandler.*
-usr/share/codeblocks/plugins/libopenfileslist.*
-usr/share/codeblocks/plugins/libprojectsimporter.*
-usr/share/codeblocks/plugins/libscriptedwizard.*
-usr/share/codeblocks/plugins/libtodo.*
-usr/share/codeblocks/scripts
-usr/share/codeblocks/templates
-usr/share/codeblocks/astyle.zip*
-usr/share/codeblocks/autosave.zip*
-usr/share/codeblocks/classwizard.zip*
-usr/share/codeblocks/codecompletion.zip*
-usr/share/codeblocks/compiler.zip*
-usr/share/codeblocks/debugger.zip*
-usr/share/codeblocks/defaultmimehandler.zip*
-usr/share/codeblocks/manager_resources.zip*
-usr/share/codeblocks/openfileslist.zip*
-usr/share/codeblocks/projectsimporter.zip*
-usr/share/codeblocks/resources.zip
-usr/share/codeblocks/scriptedwizard.zip*
-usr/share/codeblocks/start_here.zip
-usr/share/codeblocks/todo.zip*
-usr/share/codeblocks/tips.txt
-usr/share/doc
-usr/share/icons
-usr/share/man
-usr/share/mime
-usr/share/pixmaps
+usr/lib/codeblocks/plugins/libastyle.* 
+usr/lib/codeblocks/plugins/libautosave.* 
+usr/lib/codeblocks/plugins/libclasswizard.* 
+usr/lib/codeblocks/plugins/libcodecompletion.* 
+usr/lib/codeblocks/plugins/libcompiler.* 
+usr/lib/codeblocks/plugins/libdebugger.* 
+usr/lib/codeblocks/plugins/libdefaultmimehandler.* 
+usr/lib/codeblocks/plugins/libopenfileslist.* 
+usr/lib/codeblocks/plugins/libprojectsimporter.* 
+usr/lib/codeblocks/plugins/libscriptedwizard.* 
+usr/lib/codeblocks/plugins/libtodo.* 
Index: src/sdk/configmanager.cpp
===================================================================
--- src/sdk/configmanager.cpp	(Revision 5282)
+++ src/sdk/configmanager.cpp	(Arbeitskopie)
@@ -53,6 +53,7 @@
 wxString ConfigManager::home_folder;
 wxString ConfigManager::data_path_user;
 wxString ConfigManager::data_path_global;
+wxString ConfigManager::plugin_path_global;
 wxString ConfigManager::app_path;
 wxString ConfigManager::temp_folder;
 bool ConfigManager::relo = 0;
@@ -467,7 +468,7 @@
             return ::wxGetCwd();
 
         case sdPluginsGlobal:
-            return ConfigManager::data_path_global + _T("/plugins");
+            return ConfigManager::plugin_path_global;
 
         case sdPluginsUser:
             return ConfigManager::data_path_user   + _T("/plugins");
@@ -1378,6 +1379,14 @@
             ConfigManager::data_path_global = wxStandardPathsBase::Get().GetDataDir();
     }
 
+    if (plugin_path_global.IsEmpty())
+    {
+       if(platform::windows || platform::macosx)
+          ConfigManager::plugin_path_global = data_path_global;
+       else
+          ConfigManager::plugin_path_global = wxStandardPathsBase::Get().GetPluginsDir() + _T("/plugins");
+    }
+
     ConfigManager::data_path_user = ConfigManager::relo ? data_path_global : config_folder + _T("/share/codeblocks");
 
     CreateDirRecursively(ConfigManager::config_folder);
Index: src/plugins/openfileslist/Makefile.am
===================================================================
--- src/plugins/openfileslist/Makefile.am	(Revision 5282)
+++ src/plugins/openfileslist/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libopenfileslist.la
+pluginlib_LTLIBRARIES = libopenfileslist.la
 
 libopenfileslist_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/classwizard/Makefile.am
===================================================================
--- src/plugins/classwizard/Makefile.am	(Revision 5282)
+++ src/plugins/classwizard/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libclasswizard.la
+pluginlib_LTLIBRARIES = libclasswizard.la
 
 libclasswizard_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/autosave/Makefile.am
===================================================================
--- src/plugins/autosave/Makefile.am	(Revision 5282)
+++ src/plugins/autosave/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libautosave.la
+pluginlib_LTLIBRARIES = libautosave.la
 
 libautosave_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/compilergcc/Makefile.am
===================================================================
--- src/plugins/compilergcc/Makefile.am	(Revision 5282)
+++ src/plugins/compilergcc/Makefile.am	(Arbeitskopie)
@@ -9,9 +9,9 @@
 
 AM_CXXFLAGS = -DDEPSLIB_UNIX
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libcompiler.la
+pluginlib_LTLIBRARIES = libcompiler.la
 
 libcompiler_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/defaultmimehandler/Makefile.am
===================================================================
--- src/plugins/defaultmimehandler/Makefile.am	(Revision 5282)
+++ src/plugins/defaultmimehandler/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libdefaultmimehandler.la
+pluginlib_LTLIBRARIES = libdefaultmimehandler.la
 
 libdefaultmimehandler_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/scriptedwizard/Makefile.am
===================================================================
--- src/plugins/scriptedwizard/Makefile.am	(Revision 5282)
+++ src/plugins/scriptedwizard/Makefile.am	(Arbeitskopie)
@@ -6,9 +6,9 @@
 		-I$(top_srcdir)/src/include/scripting/include \
 		-I$(top_srcdir)/src/include/scripting/sqplus
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libscriptedwizard.la
+pluginlib_LTLIBRARIES = libscriptedwizard.la
 
 libscriptedwizard_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/profiler/Makefile.am
===================================================================
--- src/plugins/contrib/profiler/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/profiler/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libProfiler.la
+pluginlib_LTLIBRARIES = libProfiler.la
 
 libProfiler_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/regex_testbed/Makefile.am
===================================================================
--- src/plugins/contrib/regex_testbed/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/regex_testbed/Makefile.am	(Arbeitskopie)
@@ -2,10 +2,10 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 pkgdata_DATA = RegExTestbed.zip
 
-lib_LTLIBRARIES = libRegExTestbed.la
+pluginlib_LTLIBRARIES = libRegExTestbed.la
 
 libRegExTestbed_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/envvars/Makefile.am
===================================================================
--- src/plugins/contrib/envvars/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/envvars/Makefile.am	(Arbeitskopie)
@@ -2,10 +2,10 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 pkgdata_DATA = envvars.zip
 
-lib_LTLIBRARIES = libenvvars.la
+pluginlib_LTLIBRARIES = libenvvars.la
 
 libenvvars_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/wxSmithContribItems/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmithContribItems/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/wxSmithContribItems/Makefile.am	(Arbeitskopie)
@@ -9,9 +9,9 @@
 		-I$(srcdir)/wxchart/wxchart-1.0/include \
 		-I$(srcdir)/wxthings/wxthings/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libwxsmithcontribitems.la
+pluginlib_LTLIBRARIES = libwxsmithcontribitems.la
 
 libwxsmithcontribitems_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/IncrementalSearch/Makefile.am
===================================================================
--- src/plugins/contrib/IncrementalSearch/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/IncrementalSearch/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkgdatadir)/plugins
 
-lib_LTLIBRARIES = libIncrementalSearch.la
+pluginlib_LTLIBRARIES = libIncrementalSearch.la
 
 libIncrementalSearch_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/source_exporter/Makefile.am
===================================================================
--- src/plugins/contrib/source_exporter/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/source_exporter/Makefile.am	(Arbeitskopie)
@@ -6,9 +6,9 @@
 		-I$(top_srcdir)/src/plugins/contrib/source_exporter/wxPdfDocument/include \
 		-include "sdk.h"
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libexporter.la
+pluginlib_LTLIBRARIES = libexporter.la
 
 libexporter_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/cb_koders/Makefile.am
===================================================================
--- src/plugins/contrib/cb_koders/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/cb_koders/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libcb_koders.la
+pluginlib_LTLIBRARIES = libcb_koders.la
 
 libcb_koders_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/HexEditor/Makefile.am
===================================================================
--- src/plugins/contrib/HexEditor/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/HexEditor/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libHexEditor.la
+pluginlib_LTLIBRARIES = libHexEditor.la
 
 libHexEditor_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/dragscroll/Makefile.am
===================================================================
--- src/plugins/contrib/dragscroll/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/dragscroll/Makefile.am	(Arbeitskopie)
@@ -3,9 +3,9 @@
 		-I$(top_srcdir)/src/src \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libdragscroll.la
+pluginlib_LTLIBRARIES = libdragscroll.la
 
 libdragscroll_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/ThreadSearch/Makefile.am
===================================================================
--- src/plugins/contrib/ThreadSearch/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/ThreadSearch/Makefile.am	(Arbeitskopie)
@@ -5,9 +5,9 @@
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/include/wxFlatNotebook/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libThreadSearch.la
+pluginlib_LTLIBRARIES = libThreadSearch.la
 
 libThreadSearch_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/lib_finder/Makefile.am
===================================================================
--- src/plugins/contrib/lib_finder/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/lib_finder/Makefile.am	(Arbeitskopie)
@@ -9,9 +9,9 @@
 		-I$(top_srcdir)/src/include/scripting/squirrel \
 		-I$(top_srcdir)/src/include/scripting/bindings
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = liblib_finder.la
+pluginlib_LTLIBRARIES = liblib_finder.la
 
 liblib_finder_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/symtab/Makefile.am
===================================================================
--- src/plugins/contrib/symtab/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/symtab/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libSymTab.la
+pluginlib_LTLIBRARIES = libSymTab.la
 
 libSymTab_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/codesnippets/Makefile.am
===================================================================
--- src/plugins/contrib/codesnippets/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/codesnippets/Makefile.am	(Arbeitskopie)
@@ -9,9 +9,9 @@
 		-I$(top_srcdir)/src/plugins/contrib/codesnippets/editor \
         -I$(top_srcdir)/src/include/wxFlatNotebook/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libcodesnippets.la
+pluginlib_LTLIBRARIES = libcodesnippets.la
 
 libcodesnippets_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/codesnippets/resources/Makefile.am
===================================================================
--- src/plugins/contrib/codesnippets/resources/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/codesnippets/resources/Makefile.am	(Arbeitskopie)
@@ -8,9 +8,9 @@
         -I$(top_srcdir)/src/include/wxFlatNotebook/include
 
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-##lib_LTLIBRARIES = codesnippets
+##pluginlib_LTLIBRARIES = codesnippets 
 bin_PROGRAMS = codesnippets
 
 codesnippets_LDFLAGS = $(WX_GTK2_LIBS)
Index: src/plugins/contrib/wxSmith/plugin/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmith/plugin/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/wxSmith/plugin/Makefile.am	(Arbeitskopie)
@@ -6,9 +6,9 @@
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/plugins/contrib/propgrid/include
 
-lib_LTLIBRARIES = libwxsmith.la
+pluginlib_LTLIBRARIES = libwxsmith.la
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
 libwxsmith_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/headerfixup/Makefile.am
===================================================================
--- src/plugins/contrib/headerfixup/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/headerfixup/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 
 CXXFLAGS = @CXXFLAGS@  -O0
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libheaderfixup.la
+pluginlib_LTLIBRARIES = libheaderfixup.la
 
 libheaderfixup_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/codestat/Makefile.am
===================================================================
--- src/plugins/contrib/codestat/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/codestat/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libcodestat.la
+pluginlib_LTLIBRARIES = libcodestat.la
 
 libcodestat_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/help_plugin/Makefile.am
===================================================================
--- src/plugins/contrib/help_plugin/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/help_plugin/Makefile.am	(Arbeitskopie)
@@ -15,9 +15,9 @@
 		-I$(top_srcdir)/src/include/scripting/sqplus \
 		-include "sdk.h"
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libhelp_plugin.la
+pluginlib_LTLIBRARIES = libhelp_plugin.la
 
 libhelp_plugin_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/byogames/Makefile.am
===================================================================
--- src/plugins/contrib/byogames/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/byogames/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libbyogames.la
+pluginlib_LTLIBRARIES = libbyogames.la
 
 libbyogames_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/Valgrind/Makefile.am
===================================================================
--- src/plugins/contrib/Valgrind/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/Valgrind/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libValgrind.la
+pluginlib_LTLIBRARIES = libValgrind.la
 
 libValgrind_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/keybinder/Makefile.am
===================================================================
--- src/plugins/contrib/keybinder/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/keybinder/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libkeybinder.la
+pluginlib_LTLIBRARIES = libkeybinder.la
 
 libkeybinder_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/AutoVersioning/Makefile.am
===================================================================
--- src/plugins/contrib/AutoVersioning/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/AutoVersioning/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libAutoVersioning.la
+pluginlib_LTLIBRARIES = libAutoVersioning.la
 
 libAutoVersioning_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/contrib/BrowseTracker/Makefile.am
===================================================================
--- src/plugins/contrib/BrowseTracker/Makefile.am	(Revision 5282)
+++ src/plugins/contrib/BrowseTracker/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libBrowseTracker.la
+pluginlib_LTLIBRARIES = libBrowseTracker.la
 
 libBrowseTracker_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/astyle/Makefile.am
===================================================================
--- src/plugins/astyle/Makefile.am	(Revision 5282)
+++ src/plugins/astyle/Makefile.am	(Arbeitskopie)
@@ -5,9 +5,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libastyle.la
+pluginlib_LTLIBRARIES = libastyle.la
 
 libastyle_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/debuggergdb/Makefile.am
===================================================================
--- src/plugins/debuggergdb/Makefile.am	(Revision 5282)
+++ src/plugins/debuggergdb/Makefile.am	(Arbeitskopie)
@@ -7,9 +7,9 @@
 		-I$(top_srcdir)/src/include/scripting/include \
     	-I$(top_srcdir)/src/include/scripting/sqplus
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libdebugger.la
+pluginlib_LTLIBRARIES = libdebugger.la
 
 libdebugger_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/codecompletion/Makefile.am
===================================================================
--- src/plugins/codecompletion/Makefile.am	(Revision 5282)
+++ src/plugins/codecompletion/Makefile.am	(Arbeitskopie)
@@ -5,9 +5,9 @@
 		-I$(top_srcdir)/src/include/wxFlatNotebook/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libcodecompletion.la
+pluginlib_LTLIBRARIES = libcodecompletion.la
 
 libcodecompletion_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/todo/Makefile.am
===================================================================
--- src/plugins/todo/Makefile.am	(Revision 5282)
+++ src/plugins/todo/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libtodo.la
+pluginlib_LTLIBRARIES = libtodo.la
 
 libtodo_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/projectsimporter/Makefile.am
===================================================================
--- src/plugins/projectsimporter/Makefile.am	(Revision 5282)
+++ src/plugins/projectsimporter/Makefile.am	(Arbeitskopie)
@@ -4,9 +4,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libprojectsimporter.la
+pluginlib_LTLIBRARIES = libprojectsimporter.la
 
 libprojectsimporter_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/plugins/xpmanifest/Makefile.am
===================================================================
--- src/plugins/xpmanifest/Makefile.am	(Revision 5282)
+++ src/plugins/xpmanifest/Makefile.am	(Arbeitskopie)
@@ -2,9 +2,9 @@
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
-libdir = $(pkgdatadir)/plugins
+pluginlibdir = $(pkglibdir)/plugins
 
-lib_LTLIBRARIES = libxpmanifest.la
+pluginlib_LTLIBRARIES = libxpmanifest.la
 
 libxpmanifest_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
 
Index: src/include/configmanager.h
===================================================================
--- src/include/configmanager.h	(Revision 5282)
+++ src/include/configmanager.h	(Arbeitskopie)
@@ -111,6 +111,7 @@
     static wxString home_folder;
     static wxString data_path_user;
     static wxString data_path_global;
+    static wxString plugin_path_global;
     static wxString app_path;
     static wxString temp_folder;
     static bool relo;
Index: codeblocks.spec.in
===================================================================
--- codeblocks.spec.in	(Revision 5282)
+++ codeblocks.spec.in	(Arbeitskopie)
@@ -89,6 +89,7 @@
 #{?_distribution:Distribution:%_distribution}
 
 %define pkgdata		%{_datadir}/%{name}
+%define	pkglib		%{_libdir}/%{name}
 
 %description
 Code::Blocks is a free C++ IDE built specifically to meet the most demanding needs of its users. It was designed, right from the start, to be extensible and configurable.
@@ -191,17 +192,18 @@
 %{pkgdata}/images/codecompletion/*
 %{pkgdata}/images/settings/*
 %{pkgdata}/lexers/*
-%{pkgdata}/plugins/libastyle.*
-%{pkgdata}/plugins/libautosave.*
-%{pkgdata}/plugins/libclasswizard.*
-%{pkgdata}/plugins/libcodecompletion.*
-%{pkgdata}/plugins/libcompiler.*
-%{pkgdata}/plugins/libdebugger.*
-%{pkgdata}/plugins/libdefaultmimehandler.*
-%{pkgdata}/plugins/libopenfileslist.*
-%{pkgdata}/plugins/libprojectsimporter.*
-%{pkgdata}/plugins/libscriptedwizard.*
-%{pkgdata}/plugins/libtodo.*
+%{pkglib}
+%{pkglib}/plugins/libastyle.*
+%{pkglib}/plugins/libautosave.*
+%{pkglib}/plugins/libclasswizard.*
+%{pkglib}/plugins/libcodecompletion.*
+%{pkglib}/plugins/libcompiler.*
+%{pkglib}/plugins/libdebugger.*
+%{pkglib}/plugins/libdefaultmimehandler.*
+%{pkglib}/plugins/libopenfileslist.*
+%{pkglib}/plugins/libprojectsimporter.*
+%{pkglib}/plugins/libscriptedwizard.*
+%{pkglib}/plugins/libtodo.*
 %{pkgdata}/scripts/*
 %{pkgdata}/templates/*
 %{_mandir}/*
@@ -237,28 +239,28 @@
 %{pkgdata}/images/ThreadSearch/*
 %{pkgdata}/images/IncrementalSearch/*
 %{pkgdata}/lib_finder/*
-%{pkgdata}/plugins/libAutoVersioning.*
-%{pkgdata}/plugins/libBrowseTracker.*
-%{pkgdata}/plugins/libbyogames.*
-%{pkgdata}/plugins/libcb_koders.*
-%{pkgdata}/plugins/libcodesnippets.*
-%{pkgdata}/plugins/libcodestat.*
-%{pkgdata}/plugins/libdragscroll.*
-%{pkgdata}/plugins/libenvvars.*
-%{pkgdata}/plugins/libexporter.*
-%{pkgdata}/plugins/libheaderfixup.*
-%{pkgdata}/plugins/libhelp_plugin.*
-%{pkgdata}/plugins/libHexEditor.*
-%{pkgdata}/plugins/libIncrementalSearch.*
-%{pkgdata}/plugins/libkeybinder.*
-%{pkgdata}/plugins/liblib_finder.*
-%{pkgdata}/plugins/libProfiler.*
-%{pkgdata}/plugins/libRegExTestbed.*
-%{pkgdata}/plugins/libSymTab.*
-%{pkgdata}/plugins/libThreadSearch.*
-%{pkgdata}/plugins/libValgrind.*
-%{pkgdata}/plugins/libwxsmith.*
-%{pkgdata}/plugins/libwxsmithcontribitems.*
+%{pkglib}/plugins/libAutoVersioning.*
+%{pkglib}/plugins/libBrowseTracker.*
+%{pkglib}/plugins/libbyogames.*
+%{pkglib}/plugins/libcb_koders.*
+%{pkglib}/plugins/libcodesnippets.*
+%{pkglib}/plugins/libcodestat.*
+%{pkglib}/plugins/libdragscroll.*
+%{pkglib}/plugins/libenvvars.*
+%{pkglib}/plugins/libexporter.*
+%{pkglib}/plugins/libheaderfixup.*
+%{pkglib}/plugins/libhelp_plugin.*
+%{pkglib}/plugins/libHexEditor.*
+%{pkglib}/plugins/libIncrementalSearch.*
+%{pkglib}/plugins/libkeybinder.*
+%{pkglib}/plugins/liblib_finder.*
+%{pkglib}/plugins/libProfiler.*
+%{pkglib}/plugins/libRegExTestbed.*
+%{pkglib}/plugins/libSymTab.*
+%{pkglib}/plugins/libThreadSearch.*
+%{pkglib}/plugins/libValgrind.*
+%{pkglib}/plugins/libwxsmith.*
+%{pkglib}/plugins/libwxsmithcontribitems.*
 %{_libdir}/libwxsmithlib.so.*
 
 %files devel
