libhttp compile
This commit is contained in:
parent
ebaedfd482
commit
8c1372d26a
18 changed files with 1176 additions and 565 deletions
15
configure.ac
15
configure.ac
|
|
@ -94,6 +94,7 @@ AC_SUBST(CLIXON_DEFAULT_CONFIG)
|
|||
AC_SUBST(LIBS)
|
||||
AC_SUBST(SH_SUFFIX)
|
||||
AC_SUBST(with_restconf) # If yes, compile apps/restconf
|
||||
AC_SUBST(with_libhttp) # If yes, include libhttp server (https://www.libhttp.org/)
|
||||
AC_SUBST(enable_optyangs)
|
||||
AC_SUBST(wwwdir,/www-data)
|
||||
AC_SUBST(wwwuser,www-data)
|
||||
|
|
@ -208,6 +209,20 @@ fi
|
|||
AC_MSG_RESULT(www user is $wwwuser)
|
||||
AC_DEFINE_UNQUOTED(WWWUSER, "$wwwuser", [WWW user for restconf daemon])
|
||||
|
||||
# This is for libhttp server (https://www.libhttp.org/) to be used as restconf client
|
||||
# Out-of-the box it comes as static lib .a
|
||||
AC_ARG_WITH([libhttp],
|
||||
[AS_HELP_STRING([--with-libhttp Use libhttp as restconf server])],
|
||||
,
|
||||
[with_libhttp=no])
|
||||
|
||||
echo "lib_http: ${with_libhttp}"
|
||||
if test "x${with_libhttp}" == xyes; then
|
||||
AC_CHECK_HEADERS(libhttp/libhttp.h,, AC_MSG_ERROR([libhttp header missing. See https://www.libhttp.org]))
|
||||
# In github repo default install this is a static lib
|
||||
AC_CHECK_LIB(http, httplib_start,, AC_MSG_ERROR([libhttplib missing]),[-lpthread -ldl])
|
||||
fi
|
||||
|
||||
# Set default config file location
|
||||
CLIXON_DEFAULT_CONFIG=/usr/local/etc/clixon.xml
|
||||
AC_ARG_WITH([configfile],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue