Index: gnucash-2.6.5/src/app-utils/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/app-utils/Makefile.am
+++ gnucash-2.6.5/src/app-utils/Makefile.am
@@ -222,10 +222,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/app-utils/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/app-utils/Makefile.in
+++ gnucash-2.6.5/src/app-utils/Makefile.in
@@ -696,9 +696,9 @@ EXTRA_DIST = swig-app-utils-python.c app
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/engine \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/app-utils
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 CLEANFILES = \
 	${SCM_FILE_LINKS} \
Index: gnucash-2.6.5/src/business/business-gnome/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/business/business-gnome/Makefile.am
+++ gnucash-2.6.5/src/business/business-gnome/Makefile.am
@@ -144,7 +144,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/business/business-gnome/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/business/business-gnome/Makefile.in
+++ gnucash-2.6.5/src/business/business-gnome/Makefile.in
@@ -641,7 +641,7 @@ EXTRA_DIST = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 CLEANFILES = \
Index: gnucash-2.6.5/src/core-utils/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/core-utils/Makefile.am
+++ gnucash-2.6.5/src/core-utils/Makefile.am
@@ -124,7 +124,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV})  \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/core-utils/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/core-utils/Makefile.in
+++ gnucash-2.6.5/src/core-utils/Makefile.in
@@ -595,7 +595,7 @@ gncscmmod_DATA = core-utils.scm
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/core-utils \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/libqof/qof
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 BUILT_SOURCES = gncla-dir.h gnc-version.h
Index: gnucash-2.6.5/src/engine/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/engine/Makefile.am
+++ gnucash-2.6.5/src/engine/Makefile.am
@@ -205,10 +205,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/engine/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/engine/Makefile.in
+++ gnucash-2.6.5/src/engine/Makefile.in
@@ -728,9 +728,9 @@ EXTRA_DIST = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/core-utils \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/libqof/qof
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 noinst_DATA = .scm-links
 
Index: gnucash-2.6.5/src/gnc-module/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/gnc-module/Makefile.am
+++ gnucash-2.6.5/src/gnc-module/Makefile.am
@@ -77,7 +77,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/gnc-module/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/gnc-module/Makefile.in
+++ gnucash-2.6.5/src/gnc-module/Makefile.in
@@ -541,7 +541,7 @@ EXTRA_DIST = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/core-utils \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/libqof/qof
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 CLEANFILES = .scm-links ${SCM_FILE_LINKS} ${gncscmmodcache_DATA}
 MAINTAINERCLEANFILES = swig-gnc-module.c
Index: gnucash-2.6.5/src/gnome-utils/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/gnome-utils/Makefile.am
+++ gnucash-2.6.5/src/gnome-utils/Makefile.am
@@ -293,10 +293,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/gnome-utils/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/gnome-utils/Makefile.in
+++ gnucash-2.6.5/src/gnome-utils/Makefile.in
@@ -784,9 +784,9 @@ EXTRA_DIST = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/backend/xml \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/gnome-utils
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 noinst_DATA = .scm-links
 CLEANFILES = \
Index: gnucash-2.6.5/src/import-export/qif-imp/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/import-export/qif-imp/Makefile.am
+++ gnucash-2.6.5/src/import-export/qif-imp/Makefile.am
@@ -128,10 +128,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/import-export
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/import-export
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/qif-import
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/qif-import
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/import-export/qif-imp/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/import-export/qif-imp/Makefile.in
+++ gnucash-2.6.5/src/import-export/qif-imp/Makefile.in
@@ -613,9 +613,9 @@ noinst_DATA = .scm-links
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/register/ledger-core \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/gnome-search
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/import-export
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/import-export
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/qif-import
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/qif-import
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 DISTCLEANFILES = ${SCM_FILE_LINKS}
 all: all-recursive
Index: gnucash-2.6.5/src/report/business-reports/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/business-reports/Makefile.am
+++ gnucash-2.6.5/src/report/business-reports/Makefile.am
@@ -77,7 +77,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/business-reports/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/business-reports/Makefile.in
+++ gnucash-2.6.5/src/report/business-reports/Makefile.in
@@ -466,7 +466,7 @@ gncscmtpl_DATA = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/gnc-module \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/report/locale-specific/us/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/locale-specific/us/Makefile.am
+++ gnucash-2.6.5/src/report/locale-specific/us/Makefile.am
@@ -84,10 +84,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmrptcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/locale-specific
+gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/locale-specific
 gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/locale-specific/us/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/locale-specific/us/Makefile.in
+++ gnucash-2.6.5/src/report/locale-specific/us/Makefile.in
@@ -567,9 +567,9 @@ gncscmmod_DATA = taxtxf.scm taxtxf-de_DE
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmrptcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/locale-specific
+@GNC_HAVE_GUILE_2_TRUE@gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/locale-specific
 @GNC_HAVE_GUILE_2_TRUE@gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/report-gnome/Makefile.am
+++ gnucash-2.6.5/src/report/report-gnome/Makefile.am
@@ -132,7 +132,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/report-gnome/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/report-gnome/Makefile.in
+++ gnucash-2.6.5/src/report/report-gnome/Makefile.in
@@ -607,7 +607,7 @@ EXTRA_DIST = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-gnome
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 CLEANFILES = report .scm-links ${SCM_FILE_LINKS} ${gncscmmodcache_DATA}
 MAINTAINERCLEANFILES = swig-report-gnome.c
Index: gnucash-2.6.5/src/report/report-system/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/report-system/Makefile.am
+++ gnucash-2.6.5/src/report/report-system/Makefile.am
@@ -67,8 +67,8 @@ gncscm_DATA = \
      report-utilities.scm \
      report.scm
 
-gncmodscmdir = ${GNC_SCM_INSTALL_DIR}/gnucash/report/report-system
-gncmodscm_DATA = \
+gncscmrptdir = ${GNC_SCM_INSTALL_DIR}/gnucash/report/report-system
+gncscmrpt_DATA = \
      collectors.scm \
      list-extras.scm \
      report-collectors.scm
@@ -87,7 +87,7 @@ if GNUCASH_SEPARATE_BUILDDIR
 SCM_FILE_LINKS = \
   ${gncscmmod_DATA} \
   ${gncscm_DATA} \
-  ${gncmodscm_DATA}
+  ${gncscmrpt_DATA}
 endif
 
 .scm-links:
@@ -101,7 +101,7 @@ if GNUCASH_SEPARATE_BUILDDIR
 	done
 endif
 	( cd gnucash/report; for A in $(gncscmmod_DATA) ; do $(LN_S) -f ../../$$A . ; done )
-	( cd gnucash/report/report-system; for A in $(gncmodscm_DATA) ; do $(LN_S) -f ../../../$$A . ; done )
+	( cd gnucash/report/report-system; for A in $(gncscmrpt_DATA) ; do $(LN_S) -f ../../../$$A . ; done )
 if ! OS_WIN32
 # Windows knows no "ln -s" but uses "cp": must copy every time (see bug #566567).
 	touch .scm-links
@@ -137,19 +137,19 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncmodscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/report-system
-gncmodscmcache_DATA = $(gncmodscm_DATA:.scm=.go)
+gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/report-system
+gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
 noinst_DATA = .scm-links
 
-EXTRA_DIST = report-system.i ${gncscmmod_DATA} ${gncscm_DATA} ${gncmodscm_DATA}
+EXTRA_DIST = report-system.i ${gncscmmod_DATA} ${gncscm_DATA} ${gncscmrpt_DATA}
 
 clean-local:
 	rm -rf gnucash
@@ -159,7 +159,7 @@ CLEANFILES = \
 	.scm-links \
 	${SCM_FILE_LINKS} \
 	${gncscmmodcache_DATA} \
-	${gncmodscmcache_DATA} \
+	${gncscmrptcache_DATA} \
 	${gncscmcache_DATA}
 
 MAINTAINERCLEANFILES = swig-report-system.c
Index: gnucash-2.6.5/src/report/report-system/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/report-system/Makefile.in
+++ gnucash-2.6.5/src/report/report-system/Makefile.in
@@ -613,11 +613,11 @@ gncscmmod_DATA = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 @GNC_HAVE_GUILE_2_TRUE@gncmodscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/report-system
 @GNC_HAVE_GUILE_2_TRUE@gncmodscmcache_DATA = $(gncmodscm_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = report-system.i ${gncscmmod_DATA} ${gncscm_DATA} ${gncmodscm_DATA}
Index: gnucash-2.6.5/src/report/standard-reports/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/standard-reports/Makefile.am
+++ gnucash-2.6.5/src/report/standard-reports/Makefile.am
@@ -105,10 +105,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmrptcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/standard-reports
+gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/standard-reports
 gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/standard-reports/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/standard-reports/Makefile.in
+++ gnucash-2.6.5/src/report/standard-reports/Makefile.in
@@ -585,9 +585,9 @@ gncscmrpt_DATA = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmrptcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/standard-reports
+@GNC_HAVE_GUILE_2_TRUE@gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/standard-reports
 @GNC_HAVE_GUILE_2_TRUE@gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/report/stylesheets/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/stylesheets/Makefile.am
+++ gnucash-2.6.5/src/report/stylesheets/Makefile.am
@@ -92,7 +92,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/stylesheets/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/stylesheets/Makefile.in
+++ gnucash-2.6.5/src/report/stylesheets/Makefile.in
@@ -579,7 +579,7 @@ gncscmmod_DATA = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 uidir = $(GNC_UI_DIR)
Index: gnucash-2.6.5/src/report/utility-reports/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/report/utility-reports/Makefile.am
+++ gnucash-2.6.5/src/report/utility-reports/Makefile.am
@@ -77,7 +77,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/report/utility-reports/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/report/utility-reports/Makefile.in
+++ gnucash-2.6.5/src/report/utility-reports/Makefile.in
@@ -562,7 +562,7 @@ gncscmmod_DATA = \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/html \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/report/report-system
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = ${gncscmmod_DATA}
Index: gnucash-2.6.5/src/scm/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/scm/Makefile.am
+++ gnucash-2.6.5/src/scm/Makefile.am
@@ -55,10 +55,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/scm/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/scm/Makefile.in
+++ gnucash-2.6.5/src/scm/Makefile.in
@@ -501,9 +501,9 @@ config_DATA = config
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/gnc-module \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/libqof/qof
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 SCM_FILES = ${gncscm_DATA} ${gncscmmod_DATA}
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/scm/gnumeric/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/scm/gnumeric/Makefile.am
+++ gnucash-2.6.5/src/scm/gnumeric/Makefile.am
@@ -24,7 +24,7 @@ if GNC_HAVE_GUILE_2
 	$(GUILD) compile \
 	-o $@ $<
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnumeric
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnumeric
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/scm/gnumeric/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/scm/gnumeric/Makefile.in
+++ gnucash-2.6.5/src/scm/gnumeric/Makefile.in
@@ -418,7 +418,7 @@ gncscm_DATA = \
 @GNUCASH_SEPARATE_BUILDDIR_TRUE@SCM_FILE_LINKS = \
 @GNUCASH_SEPARATE_BUILDDIR_TRUE@  ${gncscm_DATA}
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnumeric
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnumeric
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/tax/us/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/tax/us/Makefile.am
+++ gnucash-2.6.5/src/tax/us/Makefile.am
@@ -64,10 +64,10 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/tax
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/tax
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 
-gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/tax/us/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/tax/us/Makefile.in
+++ gnucash-2.6.5/src/tax/us/Makefile.in
@@ -548,9 +548,9 @@ gncscm_DATA = txf.scm txf-help.scm txf-d
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/core-utils \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/gnc-module
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/tax
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/tax
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
-@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@
+@GNC_HAVE_GUILE_2_TRUE@gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
 @GNC_HAVE_GUILE_2_TRUE@gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
 noinst_DATA = .scm-links
 EXTRA_DIST = \
Index: gnucash-2.6.5/src/test-core/Makefile.am
===================================================================
--- gnucash-2.6.5.orig/src/test-core/Makefile.am
+++ gnucash-2.6.5/src/test-core/Makefile.am
@@ -109,7 +109,7 @@ GUILE_COMPILE_ENV = \
 	$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
 	$(GUILD) compile -o $@ $<
 
-gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 endif
 
Index: gnucash-2.6.5/src/test-core/Makefile.in
===================================================================
--- gnucash-2.6.5.orig/src/test-core/Makefile.in
+++ gnucash-2.6.5/src/test-core/Makefile.in
@@ -555,7 +555,7 @@ SCM_FILES = $(gncscmmod_DATA)
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/test-core \
 @GNC_HAVE_GUILE_2_TRUE@  --library-dir    ${top_builddir}/src/libqof/qof
 
-@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${GNC_SCM_INSTALL_DIR}/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
+@GNC_HAVE_GUILE_2_TRUE@gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
 @GNC_HAVE_GUILE_2_TRUE@gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
 noinst_DATA = .scm-links
 CLEANFILES = .scm-links ${gncscmmodcache_DATA}
Index: gnucash-2.6.5/src/bin/environment.in
===================================================================
--- gnucash-2.6.5.orig/src/bin/environment.in
+++ gnucash-2.6.5/src/bin/environment.in
@@ -50,7 +50,7 @@ GUILE_WARN_DEPRECATED=no
 # GUILE_LIBS can be used to override the path to Guile's own modules
 # GUILE_LIBS=
 GUILE_LOAD_PATH={GNC_DATA}/scm;{GUILE_LIBS};{GUILE_LOAD_PATH}
-GUILE_LOAD_COMPILED_PATH={GNC_DATA}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_LIBS};{GUILE_LOAD_PATH}
+GUILE_LOAD_COMPILED_PATH={GNC_LIB}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_LIBS};{GUILE_LOAD_PATH}
 
 # Tell Guile where to find GnuCash specific shared libraries
 GNC_LIBRARY_PATH={SYS_LIB}
