diff options
author | Lei YU <mine260309@gmail.com> | 2019-03-14 13:58:07 +0800 |
---|---|---|
committer | Lei YU <mine260309@gmail.com> | 2019-03-14 14:09:41 +0800 |
commit | 7d832d7d30acfe942c7bb924ca14b9edaddca049 (patch) | |
tree | 86d7836d183935dcfd4ae25dcdba351c516d64d1 /configure.ac | |
parent | 1db9adf37900c8503b3c9fa3fe39eef9406a30ff (diff) | |
download | openpower-pnor-code-mgmt-7d832d7d30acfe942c7bb924ca14b9edaddca049.tar.gz openpower-pnor-code-mgmt-7d832d7d30acfe942c7bb924ca14b9edaddca049.zip |
Install services to systemd unit dir
Add configure and makefile rule to install system service units to
systemd unit dir.
Tested: Verify the service is install to /lib/systemd/system in openbmc
environment.
Change-Id: I620fe1f01ad315e4918d30fecdf165fd91fefe7b
Signed-off-by: Lei YU <mine260309@gmail.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0213ed472..8b0ab7985 100755 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,22 @@ AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) # Checks for library functions LT_INIT # Required for systemd linking +PKG_PROG_PKG_CONFIG +AC_ARG_WITH([systemdsystemunitdir], + [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, + [with_systemdsystemunitdir=auto]) +AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ + def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) + + AS_IF([test "x$def_systemdsystemunitdir" = "x"], + [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], + [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) + with_systemdsystemunitdir=no], + [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) +AS_IF([test "x$with_systemdsystemunitdir" != "xno"], + [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) +AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) + # Check/set gtest specific functions. AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) AC_SUBST(GTEST_CPPFLAGS) |