Permalink
Browse files

Fix installing without root when systemd exists.

Try to detect path to systemd units only when
--with-systemdsystemunitdir is used without the path.

If this option isn't specified at all, no need to install systemd file.

Thanks to n0kS for reporting this.
  • Loading branch information...
1 parent d6c0f44 commit d54372821555d455fc1db7e3041c0b18d705a274 @DarthGandalf DarthGandalf committed Oct 28, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 configure.ac
View
6 configure.ac
@@ -151,7 +151,11 @@ AC_ARG_ENABLE( [poll],
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+ [
+ if test x"$with_systemdsystemunitdir" = xyes; then
+ with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+ fi
+ ])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi

0 comments on commit d543728

Please sign in to comment.