Skip to content

Commit

Permalink
util: clixon_util_stream requires libcurl
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Feb 7, 2023
1 parent b66f95b commit 327f9ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ HAVE_HTTP1
HAVE_LIBNGHTTP2
enable_netsnmp
with_restconf
with_curl
LINKAGE
LIBSTATIC_SUFFIX
SH_SUFFIX
Expand Down Expand Up @@ -5040,6 +5041,9 @@ fi

$as_echo "#define CLIXON_PUBLISH_STREAMS 1" >>confdefs.h

with_curl=yes
else
with_curl=''
fi

for ac_header in cligen/cligen.h
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ AC_SUBST(LIBS)
AC_SUBST(SH_SUFFIX)
AC_SUBST(LIBSTATIC_SUFFIX)
AC_SUBST(LINKAGE)
AC_SUBST(with_curl)
AC_SUBST(with_restconf) # Set to native or fcgi -> compile apps/restconf
AC_SUBST(enable_netsnmp) # Enable build of apps/snmp
AC_SUBST(HAVE_LIBNGHTTP2,false) # consider using neutral constant such as with-http2
Expand Down Expand Up @@ -228,6 +229,9 @@ if test "$ac_enable_publish" = "yes"; then
AC_CHECK_HEADERS(curl.h,[], AC_MSG_ERROR([curl missing]))
AC_CHECK_LIB(curl, curl_global_init,, AC_MSG_ERROR([libcurl missing]))
AC_DEFINE(CLIXON_PUBLISH_STREAMS, 1, [Enable publish of notification streams using SSE and curl])
with_curl=yes
else
with_curl=''
fi

AC_CHECK_HEADERS(cligen/cligen.h,, AC_MSG_ERROR([CLIgen missing. Try: git clone https://github.com/clicon/cligen.git]))
Expand Down
4 changes: 3 additions & 1 deletion util/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ APPSRC += clixon_util_dispatcher.c
APPSRC += clixon_netconf_ssh_callhome.c
APPSRC += clixon_netconf_ssh_callhome_client.c
ifdef with_restconf
APPSRC += clixon_util_stream.c # Needs curl
ifdef with_libcurl
APPSRC += clixon_util_stream.c
endif
ifeq ($(with_restconf), native)
APPSRC += clixon_restconf_callhome_client.c
endif
Expand Down

0 comments on commit 327f9ee

Please sign in to comment.