]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/recursordist/configure.ac
Revert "Bail out when no Context library is available"
[thirdparty/pdns.git] / pdns / recursordist / configure.ac
index 3d2b20f555f5b1e27ded837b07a238f158f4391a..eb775912a8b4f96bb26c974b24ba3ed3186fe2ec 100644 (file)
@@ -40,46 +40,6 @@ PDNS_CHECK_OS
 PDNS_CHECK_NETWORK_LIBS
 PTHREAD_SET_NAME
 
-# Boost Context was introduced in 1.51 (Aug 2012), but there was an immediate
-# API break in 1.52 (Nov 2012), so we only support that, and later.
-pdns_context_library="System V ucontexts"
-
-AC_DEFUN([PDNS_SELECT_CONTEXT_IMPL], [
-  AC_MSG_CHECKING([whether Boost is new enough to use the context library...])
-  if test $boost_major_version -ge 152; then
-    AC_MSG_RESULT([yes])
-    if test $boost_major_version -ge 157; then
-      BOOST_THREAD([$1])
-      m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
-      LIBS="$LIBS $BOOST_THREAD_LIBS"
-      LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
-    fi
-    AC_MSG_NOTICE([checking whether the Boost context library actually links...])
-    if test $boost_major_version -ge 161; then
-      BOOST_FIND_HEADER([boost/context/detail/fcontext.hpp], [ : ], [
-        BOOST_FIND_LIB([context], [$1], [boost/context/detail/fcontext.hpp], [[]])
-      ])
-    else
-      BOOST_FIND_HEADER([boost/context/fcontext.hpp], [ : ], [
-        BOOST_FIND_LIB([context], [$1], [boost/context/fcontext.hpp], [[]])
-      ])
-    fi
-    case $boost_cv_lib_context in
-      (yes)
-        pdns_context_library="Boost context"
-        AC_MSG_NOTICE([MTasker will use the Boost context library for context switching])
-        ;;
-      *)
-        AC_MSG_NOTICE([Boost context library is missing])
-        AC_MSG_NOTICE([MTasker will use System V ucontexts for context switching])
-        ;;
-    esac
-  else
-    AC_MSG_RESULT([no])
-    AC_MSG_NOTICE([MTasker will use System V ucontexts for context switching])
-  fi
-])
-
 PDNS_CHECK_CLOCK_GETTIME
 
 PDNS_WITH_PROTOBUF
@@ -89,7 +49,13 @@ BOOST_REQUIRE([1.42])
 # Check against flat_set header that requires boost >= 1.48
 BOOST_FIND_HEADER([boost/container/flat_set.hpp], [AC_MSG_NOTICE([boost::container::flat_set not available, will fallback to std::set])])
 
-PDNS_SELECT_CONTEXT_IMPL
+# Boost Context was introduced in 1.51 (Aug 2012), but there was an immediate
+# API break in 1.52 (Nov 2012), so we only support that, and later.
+pdns_context_library="System V ucontexts"
+AS_IF([test $boost_major_version -ge 152], [BOOST_CONTEXT([], [no])])
+AC_MSG_CHECKING([what context library to use for MTasker])
+AS_IF([test x"$boost_cv_lib_context" = "xyes"], [pdns_context_library="Boost Context"])
+AC_MSG_RESULT([$pdns_context_library])
 
 PDNS_ENABLE_UNIT_TESTS
 PDNS_ENABLE_REPRODUCIBLE
@@ -173,6 +139,7 @@ PDNS_ENABLE_VALGRIND
 AX_AVAILABLE_SYSTEMD
 AX_CHECK_SYSTEMD_FEATURES
 AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ])
+PDNS_WITH_SERVICE_USER([pdns-recursor])
 PDNS_CHECK_VIRTUALENV
 
 AC_SUBST(LIBS)