commit 17b6cd500e0613e18ab578066f355623e274abb1
Author: Yaroslav Shmelev <yars068@yandex.ru>
Date:   Tue Jan 12 16:00:24 2016 +0300

    Use @systemd_user_units_dir@ to substitute the placement from configure
    For more details, see https://bugzilla.gnome.org/show_bug.cgi?id=760293

diff --git a/configure.ac b/configure.ac
index c1fd28c..ab51669 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,7 +273,7 @@ AC_ARG_WITH([systemd-userunitdir],
 
 if test "x$systemd_user_units" != "xno"; then
     PKG_CHECK_MODULES([SYSTEMD], [systemd >= 219],
-        [])
+        AC_SUBST(systemd_user_units_dir, [$systemd_user_dir]))
 fi
 
 msg_systemd_userunits=${systemd_user_units}
diff --git a/metadata/Makefile.am b/metadata/Makefile.am
index ca6105c..e9605af 100644
--- a/metadata/Makefile.am
+++ b/metadata/Makefile.am
@@ -73,7 +73,7 @@ service_in_files = org.gtk.vfs.Metadata.service.in
 service_DATA = org.gtk.vfs.Metadata.service
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-metadata.service.in
 systemd_user_DATA = gvfs-metadata.service
 endif
diff --git a/monitor/afc/Makefile.am b/monitor/afc/Makefile.am
index 0de8315..4364852 100644
--- a/monitor/afc/Makefile.am
+++ b/monitor/afc/Makefile.am
@@ -36,7 +36,7 @@ service_in_files = org.gtk.vfs.AfcVolumeMonitor.service.in
 service_DATA = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-afc-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/gdu/Makefile.am b/monitor/gdu/Makefile.am
index c361f39..c012d0f 100644
--- a/monitor/gdu/Makefile.am
+++ b/monitor/gdu/Makefile.am
@@ -44,7 +44,7 @@ service_in_files = org.gtk.vfs.GduVolumeMonitor.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-gdu-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/goa/Makefile.am b/monitor/goa/Makefile.am
index 4421dec..b6f7a83 100644
--- a/monitor/goa/Makefile.am
+++ b/monitor/goa/Makefile.am
@@ -36,7 +36,7 @@ service_in_files = org.gtk.vfs.GoaVolumeMonitor.service.in
 service_DATA = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNIT_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_inits_dir@
 systemd_user_in_files = gvfs-goa-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/gphoto2/Makefile.am b/monitor/gphoto2/Makefile.am
index 055db95..6215d22 100644
--- a/monitor/gphoto2/Makefile.am
+++ b/monitor/gphoto2/Makefile.am
@@ -78,7 +78,7 @@ service_in_files = org.gtk.vfs.GPhoto2VolumeMonitor.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-gphoto2-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/hal/Makefile.am b/monitor/hal/Makefile.am
index ef5c7ec..dbc7928 100644
--- a/monitor/hal/Makefile.am
+++ b/monitor/hal/Makefile.am
@@ -57,7 +57,7 @@ service_in_files = org.gtk.vfs.HalVolumeMonitor.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-hal-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/mtp/Makefile.am b/monitor/mtp/Makefile.am
index 35f927d..997b591 100644
--- a/monitor/mtp/Makefile.am
+++ b/monitor/mtp/Makefile.am
@@ -41,7 +41,7 @@ service_in_files = org.gtk.vfs.MTPVolumeMonitor.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-mtp-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
diff --git a/monitor/udisks2/Makefile.am b/monitor/udisks2/Makefile.am
index 6aa02b2..83acd21 100644
--- a/monitor/udisks2/Makefile.am
+++ b/monitor/udisks2/Makefile.am
@@ -49,7 +49,7 @@ service_in_files = org.gtk.vfs.UDisks2VolumeMonitor.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 if HAVE_SYSTEMD_USER_UNITS_DIR
-systemd_userdir = ${prefix}/lib/systemd/user
+systemd_userdir = @systemd_user_units_dir@
 systemd_user_in_files = gvfs-udisks2-volume-monitor.service.in
 systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)
 endif
