Index: gnusound-0.7.4/modules/Makefile.in
===================================================================
--- gnusound-0.7.4.orig/modules/Makefile.in	2007-06-02 16:37:04.088633001 +0200
+++ gnusound-0.7.4/modules/Makefile.in	2007-06-02 16:37:12.411536056 +0200
@@ -26,6 +26,7 @@
 libdir=@libdir@/$(name)
 datadir=@datadir@
 moduledir=$(libdir)/modules
+moduledatadir=$(datadir)/$(name)/modules
 gnusounddir=@GNUSOUNDDIR@
 
 owner_user ?= root
@@ -37,7 +38,7 @@
 clean_files=$(obj) *.bak 
 veryclean_files=.*.cflags *~ \#*
 
-module_files=$(obj) $(shell ls *.glade *.xpm)
+module_files=$(shell ls *.glade *.xpm)
 ifeq (@HAVE_GNOME2@,yes)
 gtk=gtk2
 else
@@ -60,12 +61,15 @@
 	$(CC) `cat $(gnusounddir)/.cflags` -I$(gnusounddir)/src -I$(gnusounddir)/src/$(gtk) -fPIC -shared  $< -o $@  `cat .$(basename $@).cflags`
 
 install:
-	mkdir -p $(moduledir)
-	install -m 644 -o $(owner_user) -g $(owner_group) $(module_files) $(moduledir)
+	mkdir -p $(moduledir) $(moduledatadir)
+	install -m 644 -o $(owner_user) -g $(owner_group) $(obj) $(moduledir)
+	install -m 644 -o $(owner_user) -g $(owner_group) $(module_files) $(moduledatadir)
 
 uninstall:
-	(cd $(moduledir) && rm -f $(module_files))
+	(cd $(moduledir) && rm -f $(obj))
+	(cd $(moduledatadir) && rm -f $(module_files))
 	rmdir --ignore-fail-on-non-empty $(moduledir)
+	rmdir --ignore-fail-on-non-empty $(moduledatadir)
 
 clean:
 	rm -f $(clean_files)
Index: gnusound-0.7.4/src/config.h
===================================================================
--- gnusound-0.7.4.orig/src/config.h	2007-06-02 16:37:03.972648288 +0200
+++ gnusound-0.7.4/src/config.h	2007-06-02 16:37:12.233559513 +0200
@@ -32,7 +32,12 @@
 #define LIBDIR                  "/usr/lib"
 #endif
 
+#ifndef DATADIR
+#define DATADIR                  "/usr/share"
+#endif
+
 #define MODULE_SEARCH_PATH      ("modules:~/." PACKAGE "/modules:" LIBDIR "/modules")
+#define MODULE_DATA_SEARCH_PATH      ("modules:~/." PACKAGE "/modules:" DATADIR "/gnusound/modules")
 #define MAX_MODULES                       50
 
 /* Whether marker changes can be in the history (this is broken right
Index: gnusound-0.7.4/src/gui.c
===================================================================
--- gnusound-0.7.4.orig/src/gui.c	2007-06-02 16:37:04.067635769 +0200
+++ gnusound-0.7.4/src/gui.c	2007-06-02 16:37:12.314548839 +0200
@@ -287,7 +287,7 @@
                  "gui", 
                  g_get_home_dir(), "." PACKAGE "/pixmaps",
                  GUIDIR,
-                 MODULE_SEARCH_PATH);
+                 MODULE_DATA_SEARCH_PATH);
         paths = g_strsplit(spath, ":", 255);
         for(j = 0; paths[j]; j++) {
             snprintf(path, sizeof path, "%s/%s", paths[j], filename);
Index: gnusound-0.7.4/src/module.c
===================================================================
--- gnusound-0.7.4.orig/src/module.c	2007-06-02 16:37:04.157623909 +0200
+++ gnusound-0.7.4/src/module.c	2007-06-02 16:37:12.521521560 +0200
@@ -82,6 +82,9 @@
     if(id >= module_count)
         return NULL;
 
+    if (strcmp(containers[id].path, LIBDIR "/modules") == 0)
+	    return DATADIR "/gnusound/modules";
+    
     return containers[id].path;
 }
 
Index: gnusound-0.7.4/src/tool.c
===================================================================
--- gnusound-0.7.4.orig/src/tool.c	2007-06-02 16:37:03.994645389 +0200
+++ gnusound-0.7.4/src/tool.c	2007-06-02 16:37:12.294551475 +0200
@@ -106,7 +106,7 @@
         snprintf(gladexml_file, sizeof gladexml_file,
                  "tool_%s%s.glade", 
                  tool->name, GUI_GTK_VERSION_TAG);
-        filename = findfile(MODULE_SEARCH_PATH, gladexml_file, R_OK);
+        filename = findfile(MODULE_DATA_SEARCH_PATH, gladexml_file, R_OK);
         if(!filename)
             return NULL;
 
