When specifying a prefix in the configure, the Makefile should use the DESTDIR and it does for some things, but not for instrument DB which are still attempted to be installed in /var/lib/linuxsampler/instruments.db rather than $prefix/var/lib/linuxsampler/instruments.db The problem is that DESTDIR is not defined inside the install-data-local Makefile target. One way to fix this is to change install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am to install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) DESTDIR="${prefix}" install-exec-am install-data-am Obviously that needs to happen in autoconf, but for ease of testing and discussing I've edited and I'm discussing the makefile instead. However that change will break the install-pkgconfigDATA target which will now have the install directory doubled, since (at least in my environment) $(DESTDIR) and $(pkgconfigdir) contain the same path. As such, my quick hack to get it fixed is to change the install-am target to install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am @$(MAKE) $(AM_MAKEFLAGS) DESTDIR="${prefix}" install-data-local @$(MAKE) $(AM_MAKEFLAGS) install-pkgconfigDATA Of course there are other possible ways to fix this.
The problem with this is that there are two different use cases for DESTDIR: one is your use case, where you just want to install *and* use LS from a different location than the default one, The other use case is to install LS into a temporary location for the purpose of packaging, where the final installation location for LS must be preserved. One solution could be adding a separate variable or configure switch for the final instruments DB location vs. its temporary installation directory.