summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2012-04-23 11:26:37 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2012-04-23 11:26:37 -0700
commit92c0dc802e130d88ff4f92969f292099227a4a30 (patch)
tree90cc6cb0c13dd11fb7ed11dc469e480518f01f08
parent7d849943038ea7df843067226b70559ad924bd28 (diff)
downloadxorg-launch-helper-92c0dc802e130d88ff4f92969f292099227a4a30.tar.gz
xorg-launch-helper-92c0dc802e130d88ff4f92969f292099227a4a30.tar.bz2
xorg-launch-helper-92c0dc802e130d88ff4f92969f292099227a4a30.zip
Fixu unit file installation.
-rw-r--r--Makefile.am11
-rw-r--r--configure.ac14
2 files changed, 16 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index f68b439..9bfca41 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,5 +2,12 @@ SUBDIRS = src
EXTRA_DIST = AUTHORS COPYING INSTALL
-systemdunitdir = @SYSTEMD_UNITDIR@
-systemdunit_DATA = xorg.service xorg.target
+systemduserunitdir = @SYSTEMD_USERUNITDIR@
+systemduserunit_DATA = xorg.service xorg.target
+
+systemduserunit-install-hook:
+ mkdir -p $(DESTDIR)$(systemduserunitdir)/xorg.target.wants
+ ln -sf ../xorg.service $(DESTDIR)$(systemduserunitdir)/xorg.target.wants/xorg.service
+
+install-data-hook: systemduserunit-install-hook
+
diff --git a/configure.ac b/configure.ac
index b744084..bf37c98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,13 +21,13 @@ AC_CHECK_LIB([rt], [main], ,
PKG_CHECK_MODULES([SYSTEMD], [systemd])
-AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
- [path to systemd service directory]), [path_systemdunit=${withval}],
- [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
-if (test -n "${path_systemdunit}"); then
-SYSTEMD_UNITDIR="${path_systemdunit}"
-AC_SUBST(SYSTEMD_UNITDIR)
-AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
+AC_ARG_WITH([systemduserunitdir], AC_HELP_STRING([--with-systemduserunitdir=DIR],
+ [path to systemd user service directory]), [path_systemduserunit=${withval}],
+ [path_systemduserunit="`$PKG_CONFIG --variable=systemduserunitdir systemd`"])
+if (test -n "${path_systemduserunit}"); then
+SYSTEMD_USERUNITDIR="${path_systemduserunit}"
+AC_SUBST(SYSTEMD_USERUNITDIR)
+AM_CONDITIONAL(SYSTEMD, test -n "${path_systemduserunit}")
fi
# Checks for header files.