diff options
author | Michael Scherer <misc@zarb.org> | 2014-12-23 11:22:42 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-23 11:22:42 -0500 |
commit | 29ac883606d6d5ebfdcc2efceb2b4b60ee6a8916 (patch) | |
tree | 0a69e3e1623084217b7348b6207fa9ebc190000e /configure.ac | |
parent | aabaed6f497335b81f18347e626ff3d9ae7799d5 (diff) | |
download | tor-29ac883606d6d5ebfdcc2efceb2b4b60ee6a8916.tar.gz tor-29ac883606d6d5ebfdcc2efceb2b4b60ee6a8916.zip |
Add support for systemd watchdog protocol
It work by notifying systemd on a regular basis. If
there is no notification, the daemon is restarted.
This requires a version newer than the 209 version
of systemd, as it is not supported before.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bec6196fab..666478f920 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,26 @@ if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found]) fi +AC_ARG_ENABLE(threads, + AS_HELP_STRING(--disable-threads, disable multi-threading support)) + +if test x$enable_threads = x; then + case $host in + *-*-solaris* ) + # Don't try multithreading on solaris -- cpuworkers seem to lock. + AC_MSG_NOTICE([You are running Solaris; Sometimes threading makes +cpu workers lock up here, so I will disable threads.]) + enable_threads="no";; + *) + enable_threads="yes";; + esac +fi + +ifdef([HAVE_SYSTEMD], [ +AC_SEARCH_LIBS([sd_watchdog_enabled], [systemd-daemon], + [AC_DEFINE(HAVE_SYSTEMD_209,1,[Have systemd v209 or more])], []) +]) + case $host in *-*-solaris* ) AC_DEFINE(_REENTRANT, 1, [Define on some platforms to activate x_r() functions in time.h]) |