summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2023-05-10 13:37:44 +0200
committerGitHub <noreply@github.com>2023-05-10 13:37:44 +0200
commit66c47355b4c0a33f7cef0615fe7331bbce463361 (patch)
tree728e4ac73f09d893d32d6c851c9bd316f158430e /configure.ac
parent836a56a956f252935dd2ed4908aab57e1a95ccaf (diff)
initial minimal h2o webserver integration (#14585)
Introduces h2o based web server as an alternative
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 39 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3c4a75ae35..49015b297f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,6 +213,12 @@ AC_ARG_ENABLE(
[aclk_ssl_debug="yes"],
[aclk_ssl_debug="no"]
)
+AC_ARG_ENABLE(
+ [httpd],
+ [AS_HELP_STRING([--disable-httpd], [Disable webserver (h2o based) @<:@default autodetect@:>@])],
+ ,
+ [enable_httpd="detect"]
+)
# -----------------------------------------------------------------------------
# Enforce building with C99, bail early if we can't.
@@ -800,6 +806,38 @@ AC_MSG_RESULT([${with_libcap}])
AM_CONDITIONAL([ENABLE_CAPABILITY], [test "${with_libcap}" = "yes"])
# -----------------------------------------------------------------------------
+# HTTPD and h2o related
+
+can_build_httpd="no"
+if test "${enable_httpd}" != "no"; then
+ can_build_httpd="yes"
+ AC_MSG_CHECKING([can build HTTPD])
+ if test -z "${UV_LIBS}"; then
+ can_build_httpd="no"
+ fi
+ if test -n "${SSL_LIBS}"; then
+ OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
+ OPTIONAL_SSL_LIBS="${SSL_LIBS}"
+ else
+ can_build_httpd="no"
+ fi
+ if test "${with_zlib}" != "yes"; then
+ can_build_httpd="no"
+ fi
+ AC_MSG_RESULT([${can_build_httpd}])
+
+ if test "${can_build_httpd}" = "no" -a "${enable_httpd}" = "yes"; then
+ AC_MSG_ERROR([HTTPD was requested but it cannot be built])
+ fi
+
+ if test "${can_build_httpd}" = "yes"; then
+ AC_DEFINE([ENABLE_HTTPD], [1], [HTTPD (h2o based web server)])
+ HTTPD_CFLAGS="-I\$(abs_top_srcdir)/httpd/h2o/include -I\$(abs_top_srcdir)/httpd/h2o/deps/picotls/include -I\$(abs_top_srcdir)/httpd/h2o/deps/quicly/include -DH2O_USE_LIBUV=0"
+ fi
+fi
+AM_CONDITIONAL([ENABLE_HTTPD], [test "${can_build_httpd}" = "yes"])
+
+# -----------------------------------------------------------------------------
# ACLK
bundled_proto_avail="no"
@@ -1689,7 +1727,7 @@ CFLAGS="${originalCFLAGS} ${OPTIONAL_LTO_CFLAGS} ${OPTIONAL_PROTOBUF_CFLAGS} ${O
${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS} ${OPTIONAL_CUPS_CFLAGS} ${OPTIONAL_XENSTAT_FLAGS} \
${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PUBSUB_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} \
${OPTIONAL_MONGOC_CFLAGS} ${LWS_CFLAGS} ${OPTIONAL_JSONC_STATIC_CFLAGS} ${OPTIONAL_YAML_STATIC_CFLAGS} ${OPTIONAL_BPF_CFLAGS} ${JUDY_CFLAGS} \
- ${OPTIONAL_ACLK_CFLAGS} ${OPTIONAL_ML_CFLAGS} ${OPTIONAL_OS_DEP_CFLAGS}"
+ ${OPTIONAL_ACLK_CFLAGS} ${OPTIONAL_ML_CFLAGS} ${OPTIONAL_OS_DEP_CFLAGS} ${HTTPD_CFLAGS}"
CXXFLAGS="${CFLAGS} ${OPTIONAL_KINESIS_CXXFLAGS} ${CPP_STD_FLAG}"