Tanu Kaskinen wrote on 10/11/14 15:49: > Hi Colin, > > While I was adding systemd .service and .socket files for the system > mode in Tizen, I noticed something in configure.ac that I didn't pay > attention to before... > > On Mon, 2014-11-03 at 09:42 +0000, Colin Guthrie wrote: >> --- >> configure.ac | 11 +++++++++++ >> src/Makefile.am | 12 +++++++++++- >> src/daemon/systemd/user/pulseaudio.service.in | 10 ++++++++++ >> src/daemon/systemd/user/pulseaudio.socket | 10 ++++++++++ >> 4 files changed, 42 insertions(+), 1 deletion(-) >> create mode 100644 src/daemon/systemd/user/pulseaudio.service.in >> create mode 100644 src/daemon/systemd/user/pulseaudio.socket >> >> diff --git a/configure.ac b/configure.ac >> index 25cb207..23905ad 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -1203,6 +1203,13 @@ AS_IF([test "x$HAVE_SYSTEMD" = "x1"], >> HAVE_SYSTEMD_JOURNAL=1 >> ]) >> >> +AC_ARG_WITH([systemduserunitdir], >> + AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]), >> + [], [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)]) >> +if test "x$with_systemduserunitdir" != xno; then >> + AC_SUBST([systemduserunitdir], [$with_systemduserunitdir]) >> +fi > > Is it really a good idea to use pkg-config to get the unit directory? > pkg-config will probably return /usr/lib/systemd/system, while we should > by default install under /usr/local to avoid overwriting distro files. It'll usually say /usr/lib/systemd/user (not system) but yes, this is pretty much the same as the udevrules dir. Installing into /usr/local/ would be pretty weird tho' as they just wouldn't work there (which would be especially odd if you didn't have a system-installed version of PA). This is the same logic with the udevrulesdir I guess. So I'd say that using pkgconfig to get the value is just as sensible as the hard-coded /lib/udev/rules.d/ stuff that's in there currently. > Also, why do you treat "--with-systemduserunitdir=no" as a special case? > Why would anyone want to leave systemduserunitdir unspecified? That's likely an oversight, copied/pasted from alsa-utils... I suspect we can't really handle the "no" case and we require this to be a real value - the ability to override it is useful for test installs of course (in the same way that I override the udevrulesdir), but I agree that I should tweak the "no" case bit. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/