#include "dnsmessage.pb.h"
#endif
+#ifdef HAVE_SYSTEMD
+#include <systemd/sd-daemon.h>
+#endif
+
#ifndef RECURSOR
#include "statbag.hh"
StatBag S;
if(g_numThreads == 1) {
L<<Logger::Warning<<"Operating unthreaded"<<endl;
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "READY=1");
+#endif
recursorThread(0);
}
else {
pthread_create(&tid, 0, recursorThread, (void*)(long)n);
}
void* res;
-
-
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "READY=1");
+#endif
pthread_join(tid, &res);
}
return 0;
JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
-AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\"
+AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
AM_CPPFLAGS += \
-I$(top_srcdir)/ext/json11 \
$(YAHTTP_LIBS) \
$(JSON11_LIBS) \
$(OPENSSL_LIBS) \
- $(BOOST_CONTEXT_LIBS)
+ $(BOOST_CONTEXT_LIBS) \
+ $(SYSTEMD_LIBS)
pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
$(OPENSSL_LDFLAGS)
PDNS_ENABLE_SANITIZERS
PDNS_ENABLE_MALLOC_TRACE
PDNS_WITH_PROTOBUF
+AX_AVAILABLE_SYSTEMD
+AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ])
PDNS_CHECK_PANDOC
AC_SUBST(LIBS)
--- /dev/null
+../../../m4/ax_arg_default_enable_disable.m4
\ No newline at end of file
--- /dev/null
+../../../m4/systemd.m4
\ No newline at end of file