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,7 +401,9 @@ else
fi fi
# libsystemd # libsystemd (for src/nghttpx)
have_libsystemd=no
if test "x${request_systemd}" != "xno"; then
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes], PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes],
[have_libsystemd=no]) [have_libsystemd=no])
if test "x${have_libsystemd}" = "xyes"; then if test "x${have_libsystemd}" = "xyes"; then
@ -405,7 +412,12 @@ if test "x${have_libsystemd}" = "xyes"; then
else else
AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS) 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],