summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nsd
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2018-09-29 17:14:03 +0000
committerflorian <florian@openbsd.org>2018-09-29 17:14:03 +0000
commit5a8173caaf63f035ebee5251c811a0b5a279fe69 (patch)
treefa002a91ce31607cc6c65ec2692152afac9f8687 /usr.sbin/nsd
parentAllow preemption of functions with protected visibility. Disallowing this (diff)
downloadwireguard-openbsd-5a8173caaf63f035ebee5251c811a0b5a279fe69.tar.xz
wireguard-openbsd-5a8173caaf63f035ebee5251c811a0b5a279fe69.zip
I forgot to put this in with the 4.1.24 update.
It is of course not relevant for us but introduces a diff when the configure script is regenerated on upgrades and this file is not arround.
Diffstat (limited to 'usr.sbin/nsd')
-rw-r--r--usr.sbin/nsd/systemd.m430
1 files changed, 30 insertions, 0 deletions
diff --git a/usr.sbin/nsd/systemd.m4 b/usr.sbin/nsd/systemd.m4
new file mode 100644
index 00000000000..932e9464755
--- /dev/null
+++ b/usr.sbin/nsd/systemd.m4
@@ -0,0 +1,30 @@
+# macros for configuring systemd
+# Copyright 2015, Sami Kerola, CloudFlare.
+# BSD licensed.
+AC_ARG_ENABLE([systemd],
+ [AS_HELP_STRING([--enable-systemd], [compile with systemd support])],
+ [], [enable_systemd=no])
+have_systemd=no
+AS_IF([test "x$enable_systemd" != xno], [
+ ifdef([PKG_CHECK_MODULES], [
+ dnl systemd v209 or newer
+ PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], [have_systemd=no])
+ dnl old systemd library
+ AS_IF([test "x$have_systemd" != "xyes"], [
+ PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+ [have_systemd_daemon=yes], [have_systemd_daemon=no])
+ AS_IF([test "x$have_systemd_daemon" = "xyes"],
+ [have_systemd=yes])
+ ])
+ AS_CASE([$enable_systemd:$have_systemd],
+ [yes:no],
+ [AC_MSG_ERROR([systemd enabled but libsystemd not found])],
+ [*:yes],
+ [AC_DEFINE([HAVE_SYSTEMD], [1], [Define to 1 if systemd should be used])
+ LIBS="$LIBS $SYSTEMD_LIBS"
+ ]
+ )
+ ], [
+ AC_MSG_ERROR([systemd enabled but need pkg-config to configure for it, also, run aclocal before autoconf, or run autoreconf to include pkgconfig macros])
+ ])
+])