[BACK]Return to systemd.m4 CVS log [TXT][DIR] Up to [local] / src / usr.sbin / nsd

File: [local] / src / usr.sbin / nsd / systemd.m4 (download)

Revision 1.1, Sat Sep 29 17:14:03 2018 UTC (5 years, 8 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, HEAD

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.

#   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])
    ])
])