]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
janus-gateway: add HTTP/REST to a new transport config section
authorAdam Duskett <Aduskett@gmail.com>
Thu, 15 Jun 2017 12:13:09 +0000 (08:13 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 20 Jun 2017 20:58:54 +0000 (22:58 +0200)
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>
package/janus-gateway/Config.in
package/janus-gateway/janus-gateway.mk

index e07b4ad02a6dffed0e1a67d2f1da029e8eb42a0b..7e170fd4c0eadc1afb1333fc9b3d9e21f8c172e5 100644 (file)
@@ -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"
index b79e340e22a15388929b89ad673cf75c9e883737..01021f84f5e2b69c3ac08baf8a5e9b910364e199 100644 (file)
@@ -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)