Add --with-systemd option to configure

This commit is contained in:
Tatsuhiro Tsujikawa 2017-02-10 17:13:16 +09:00
parent 786f52a81c
commit b7f956c967
1 changed files with 20 additions and 8 deletions

View File

@ -122,6 +122,11 @@ AC_ARG_WITH([spdylay],
[Use spdylay [default=check]])], [Use spdylay [default=check]])],
[request_spdylay=$withval], [request_spdylay=check]) [request_spdylay=$withval], [request_spdylay=check])
AC_ARG_WITH([systemd],
[AS_HELP_STRING([--with-systemd],
[Enable systemd support in nghttpx [default=check]])],
[request_systemd=$withval], [request_systemd=check])
AC_ARG_WITH([mruby], AC_ARG_WITH([mruby],
[AS_HELP_STRING([--with-mruby], [AS_HELP_STRING([--with-mruby],
[Use mruby [default=no]])], [Use mruby [default=no]])],
@ -396,16 +401,23 @@ else
fi fi
# libsystemd # libsystemd (for src/nghttpx)
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes], have_libsystemd=no
[have_libsystemd=no]) if test "x${request_systemd}" != "xno"; then
if test "x${have_libsystemd}" = "xyes"; then PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes],
AC_DEFINE([HAVE_LIBSYSTEMD], [1], [have_libsystemd=no])
[Define to 1 if you have `libsystemd` library.]) if test "x${have_libsystemd}" = "xyes"; then
else AC_DEFINE([HAVE_LIBSYSTEMD], [1],
AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS) [Define to 1 if you have `libsystemd` library.])
else
AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS)
fi
fi fi
if test "x${request_systemd}" = "xyes" &&
test "x${have_libsystemd}" != "xyes"; then
AC_MSG_ERROR([systemd was requested (--with-systemd) but not found])
fi
# libxml2 (for src/nghttp) # libxml2 (for src/nghttp)
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.7.7], PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.7.7],