- Started nghttp2 work
- Added autoconf config options, temporary for nghttp2 development: `--disable-evhtp`and `--enable-nghttp2`. - Added special case for api-path:s beginning with //
This commit is contained in:
parent
c405a08ff8
commit
0ad577fa81
14 changed files with 634 additions and 291 deletions
45
configure.ac
45
configure.ac
|
|
@ -218,15 +218,42 @@ if test "x${with_restconf}" == xfcgi; then
|
|||
elif test "x${with_restconf}" == xnative; then
|
||||
AC_CHECK_LIB(ssl, OPENSSL_init_ssl ,, AC_MSG_ERROR([libssl missing]))
|
||||
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, , AC_MSG_ERROR([libcrypto missing]))
|
||||
AC_CHECK_LIB(event, event_init,, AC_MSG_ERROR([libevent missing]))
|
||||
AC_CHECK_HEADERS(evhtp/evhtp.h,
|
||||
[],
|
||||
AC_MSG_ERROR([evhtp header missing. See https://github.com/clicon/libevhtp]),
|
||||
[AC_INCLUDES_DEFAULT[
|
||||
#define EVHTP_DISABLE_REGEX
|
||||
#define EVHTP_DISABLE_EVTHR
|
||||
]])
|
||||
AC_CHECK_LIB(evhtp, evhtp_new,, AC_MSG_ERROR([libevhtp missing]),[-levent -lssl -lcrypto])
|
||||
# Check if evhtp is enabled for http/1
|
||||
AC_ARG_ENABLE(evhtp, AS_HELP_STRING([--disable-evhtp],[Disable evhtp for native restconf http/1, default: yes]),[
|
||||
if test "$enableval" = no; then
|
||||
ac_enable_evhtp=no
|
||||
else
|
||||
ac_enable_evhtp=yes
|
||||
fi
|
||||
],
|
||||
[ ac_enable_evhtp=yes])
|
||||
AC_MSG_RESULT(checking evhtp is enabled: $ac_enable_evhtp)
|
||||
if test "$ac_enable_evhtp" = "yes"; then
|
||||
AC_CHECK_HEADERS(evhtp/evhtp.h,
|
||||
[],
|
||||
AC_MSG_ERROR([evhtp header missing. See https://github.com/clicon/libevhtp]),
|
||||
[AC_INCLUDES_DEFAULT[
|
||||
#define EVHTP_DISABLE_REGEX
|
||||
#define EVHTP_DISABLE_EVTHR
|
||||
]])
|
||||
AC_CHECK_LIB(event, event_init,, AC_MSG_ERROR([libevent missing]))
|
||||
AC_CHECK_LIB(evhtp, evhtp_new,, AC_MSG_ERROR([libevhtp missing]),[-levent -lssl -lcrypto])
|
||||
fi
|
||||
|
||||
# Check if nghttp2 is enabled for http/2
|
||||
AC_ARG_ENABLE(nghttp2, AS_HELP_STRING([--enable-nghttp2],[Enable nghttp2 for native restconf http/2, default: no]),[
|
||||
if test "$enableval" = no; then
|
||||
ac_enable_nghttp2=no
|
||||
else
|
||||
ac_enable_nghttp2=yes
|
||||
fi
|
||||
],
|
||||
[ ac_enable_nghttp2=no])
|
||||
AC_MSG_RESULT(checking nghttp2 is enabled: $ac_enable_nghttp2)
|
||||
if test "$ac_enable_nghttp2" = "yes"; then
|
||||
AC_CHECK_HEADERS(nghttp2/nghttp2.h,[], AC_MSG_ERROR([nghttp2 missing]))
|
||||
AC_CHECK_LIB(nghttp2, nghttp2_session_server_new,, AC_MSG_ERROR([nghttp2 missing]))
|
||||
fi
|
||||
AC_DEFINE(WITH_RESTCONF_NATIVE, 1, [Use native restconf mode]) # For c-code that cant use strings
|
||||
elif test "x${with_restconf}" == xno; then
|
||||
# Cant get around "no" as an answer for --without-restconf that is reset here to undefined
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue