build: provide an option to skip systemd units

The systemd pkg-config tells clients to install unit files to (a subdir
of) rootprefix, not prefix.  This means our attempt to substitute our
prefix into systemd_system_unitdir doesn't have any impact - thus we
remove the substitution.

Rather than attempt to cook up some kind of support for rootprefix,
which is a quasi-standard variable anyway, provide a mechanism to simply
skip installing the systemd unit files.  This enables users with a
prefix pointing somewhere they can access to get all the way through the
install process without needing root or contaminating the build system.

It would be reasonable to use this option in the future to turn off any
additional systemd support added to the project.

Change-Id: I9a06cc09a2d940fed8a7fdc2f583f5949a0ecd47
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/softoff/meson.build b/softoff/meson.build
index d67a444..a02a306 100644
--- a/softoff/meson.build
+++ b/softoff/meson.build
@@ -15,8 +15,10 @@
            install: true,
            install_dir: get_option('bindir'))
 
-configure_file(input: 'services/pldmSoftPowerOff.service',
-                 output: 'pldmSoftPowerOff.service',
-                 copy: true,
-                 install_dir: systemd_system_unit_dir)
+if get_option('systemd').enabled()
+  configure_file(input: 'services/pldmSoftPowerOff.service',
+                   output: 'pldmSoftPowerOff.service',
+                   copy: true,
+                   install_dir: systemd_system_unit_dir)
+endif