aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Duskett <Aduskett@gmail.com>2017-06-15 08:13:09 -0400
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-06-20 22:58:54 +0200
commit2083c40b548ed791eeb804d4f9a23fc3e399bba8 (patch)
tree7780d627d43b393009d6475cf8de7404fa1cdf9f
parent590c4104c12e3968d4bdfe85002fb4cd75c4e942 (diff)
downloadbuildroot-2083c40b548ed791eeb804d4f9a23fc3e399bba8.tar.gz
buildroot-2083c40b548ed791eeb804d4f9a23fc3e399bba8.tar.bz2
janus-gateway: add HTTP/REST to a new transport config section
janus-gateway supports many different transports, and currently there is no implicit way to turn them off or on. Instead, if the dependency happens to be built, then the transport is enabled. Create a transports section in the config file and add BR2_PACKAGE_JANUS_REST as the first transport. Signed-off-by: Adam Duskett <aduskett@codeblue.com> [Thomas: propagate thread dependency.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/janus-gateway/Config.in10
-rw-r--r--package/janus-gateway/janus-gateway.mk7
2 files changed, 17 insertions, 0 deletions
diff --git a/package/janus-gateway/Config.in b/package/janus-gateway/Config.in
index e07b4ad02a..7e170fd4c0 100644
--- a/package/janus-gateway/Config.in
+++ b/package/janus-gateway/Config.in
@@ -54,6 +54,16 @@ config BR2_PACKAGE_JANUS_VOICE_MAIL
bool "voice mail"
select BR2_PACKAGE_LIBOGG
+comment "transports"
+
+config BR2_PACKAGE_JANUS_REST
+ bool "REST (HTTP/HTTPS)"
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ select BR2_PACKAGE_LIBMICROHTTPD
+
+comment "REST transport needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+
endif
comment "janus-gateway needs a toolchain w/ dynamic library, threads, wchar"
diff --git a/package/janus-gateway/janus-gateway.mk b/package/janus-gateway/janus-gateway.mk
index b79e340e22..01021f84f5 100644
--- a/package/janus-gateway/janus-gateway.mk
+++ b/package/janus-gateway/janus-gateway.mk
@@ -91,6 +91,13 @@ else
JANUS_GATEWAY_CONF_OPTS += --disable-websockets
endif
+ifeq ($(BR2_PACKAGE_JANUS_REST),y)
+JANUS_GATEWAY_DEPENDENCIES += libmicrohttpd
+JANUS_GATEWAY_CONF_OPTS += --enable-rest
+else
+JANUS_GATEWAY_CONF_OPTS += --disable-rest
+endif
+
# Parallel build broken
JANUS_GATEWAY_MAKE = $(MAKE1)