]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
systemd: Allow specifying unit dir to configure
authorYixun Lan <dlan@gentoo.org>
Fri, 20 Mar 2015 17:02:35 +0000 (13:02 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 20 Mar 2015 17:04:12 +0000 (13:04 -0400)
systemd isn't necessarily in the buildroot at the time that plymouth
gets built, so autodetection of the unitdir from pkgconfig isn't
necessarily feasible.

This commit adds a new option to configure, --with-systemdunitdir,
that lets distros specify the unit directory manually.

https://bugs.gentoo.org/show_bug.cgi?id=543712

configure.ac

index 110cc691c33c743984e6b15b78c1800a4b701f6f..445034d3e5fe2bb8ebbb9bf303f5fa97f2c75e00 100644 (file)
@@ -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([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_UNIT_DIR="${path_systemdunit}"
+  fi
   AC_SUBST(SYSTEMD_UNIT_DIR)
 fi