install-exec-hook:
if BUILD_FOR_LINUX
+if INSTALL_SYSTEMD_STARTUP
[ -e $(DESTDIR)/lib/systemd/system ] || mkdir -p $(DESTDIR)/lib/systemd/system
cp nqptp.service $(DESTDIR)/lib/systemd/system
+endif
endif
# no installer for FreeBSD yet
$ git clone https://github.com/mikebrady/nqptp.git
$ cd nqptp
$ autoreconf -fi
-$ ./configure
+$ ./configure --with-systemd-startup
$ make
# make install
```
-The `make install` installs a `systemd` startup script. You should enable it and start it in the normal way:
+The `make install` installs a `systemd` startup script as requested. You should enable it and start it in the normal way:
```
# systemctl enable nqptp
fi
AM_CONDITIONAL([USE_GIT_VERSION], [test -n "$GIT" && test -e ".git/index" ])
+
+# Check to see if we should include the systemd stuff to define it as a service
+AC_ARG_WITH([systemd-startup],[AS_HELP_STRING([--with-systemd-startup],[install a systemd startup script during a make install])])
+AM_CONDITIONAL([INSTALL_SYSTEMD_STARTUP], [test "x$with_systemd_startup" = "xyes"])
+
+
AC_CONFIG_SRCDIR([nqptp.c])
AC_CONFIG_HEADERS([config.h])