]>
Commit | Line | Data |
---|---|---|
881f45c6 RE |
1 | AC_DEFUN([ZFS_AC_CONFIG_USER_SYSTEMD], [ |
2 | AC_ARG_ENABLE(systemd, | |
06346cc5 | 3 | AS_HELP_STRING([--enable-systemd], |
881f45c6 | 4 | [install systemd unit/preset files [[default: yes]]]), |
ee410eef | 5 | [enable_systemd=$enableval], |
6 | [enable_systemd=check]) | |
881f45c6 RE |
7 | |
8 | AC_ARG_WITH(systemdunitdir, | |
06346cc5 | 9 | AS_HELP_STRING([--with-systemdunitdir=DIR], |
881f45c6 RE |
10 | [install systemd unit files in dir [[/usr/lib/systemd/system]]]), |
11 | systemdunitdir=$withval,systemdunitdir=/usr/lib/systemd/system) | |
12 | ||
13 | AC_ARG_WITH(systemdpresetdir, | |
06346cc5 | 14 | AS_HELP_STRING([--with-systemdpresetdir=DIR], |
881f45c6 RE |
15 | [install systemd preset files in dir [[/usr/lib/systemd/system-preset]]]), |
16 | systemdpresetdir=$withval,systemdpresetdir=/usr/lib/systemd/system-preset) | |
17 | ||
b7670702 | 18 | AC_ARG_WITH(systemdmodulesloaddir, |
06346cc5 | 19 | AS_HELP_STRING([--with-systemdmodulesloaddir=DIR], |
b7670702 | 20 | [install systemd module load files into dir [[/usr/lib/modules-load.d]]]), |
ecd3728b | 21 | systemdmodulesloaddir=$withval,systemdmodulesloaddir=/usr/lib/modules-load.d) |
b7670702 | 22 | |
55d80e65 | 23 | AC_ARG_WITH(systemdgeneratordir, |
06346cc5 | 24 | AS_HELP_STRING([--with-systemdgeneratordir=DIR], |
55d80e65 AR |
25 | [install systemd generators in dir [[/usr/lib/systemd/system-generators]]]), |
26 | systemdgeneratordir=$withval,systemdgeneratordir=/usr/lib/systemd/system-generators) | |
27 | ||
ee410eef | 28 | AS_IF([test "x$enable_systemd" = xcheck], [ |
29 | AS_IF([systemctl --version >/dev/null 2>&1], | |
30 | [enable_systemd=yes], | |
31 | [enable_systemd=no]) | |
32 | ]) | |
b7670702 | 33 | |
ee410eef | 34 | AC_MSG_CHECKING(for systemd support) |
35 | AC_MSG_RESULT([$enable_systemd]) | |
36 | ||
37 | AS_IF([test "x$enable_systemd" = xyes], [ | |
55d80e65 | 38 | DEFINE_SYSTEMD='--with systemd --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)" --define "_generatordir $(systemdgeneratordir)"' |
b7670702 | 39 | modulesloaddir=$systemdmodulesloaddir |
ee410eef | 40 | ],[ |
41 | DEFINE_SYSTEMD='--without systemd' | |
42 | ]) | |
881f45c6 | 43 | |
48f43799 AZ |
44 | ZFS_INIT_SYSTEMD=$enable_systemd |
45 | ZFS_WANT_MODULES_LOAD_D=$enable_systemd | |
46 | ||
ee410eef | 47 | AC_SUBST(DEFINE_SYSTEMD) |
881f45c6 RE |
48 | AC_SUBST(systemdunitdir) |
49 | AC_SUBST(systemdpresetdir) | |
55d80e65 | 50 | AC_SUBST(systemdgeneratordir) |
881f45c6 RE |
51 | AC_SUBST(modulesloaddir) |
52 | ]) |