summaryrefslogtreecommitdiff
blob: b5289244232ac95403f4d31434550df7ce2a4c98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/configure.ac b/configure.ac
index aad673e..592be5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,7 +122,12 @@ AM_CONDITIONAL(ENABLE_SYSTEMD_INTEGRATION, [test "$enable_systemd_integration" =
 
 if test x$enable_systemd_integration = xyes; then
   AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd])
-  SYSTEMD_UNIT_DIR=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+  AC_ARG_WITH([systemdsystemunitdir], AC_HELP_STRING([--with-systemdsystemunitdir=DIR],
+    [path to systemd service directory]), [path_systemdunit=${withval}],
+      [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
+  if (test -n "${path_systemdunit}"); then
+    SYSTEMD_UNIT_DIR="${path_systemdunit}"
+  fi
   AC_SUBST(SYSTEMD_UNIT_DIR)
 fi