configure: Use pkgconfig to determine the systemd unit dir location

Don't assume it's in /lib/systemd/system
This commit is contained in:
Cristian Rodríguez 2013-04-13 16:16:05 -03:00 committed by Ray Strode
parent 8f373680dd
commit de67b2d021

View file

@ -256,7 +256,7 @@ 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=/lib/systemd/system
SYSTEMD_UNIT_DIR=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
AC_SUBST(SYSTEMD_UNIT_DIR)
fi