1AC_INIT([Janus WebRTC Server],[0.11.6],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
2AC_LANG(C)
3AC_CONFIG_AUX_DIR([.])
4AC_CONFIG_MACRO_DIR([m4])
5
6AC_ENABLE_SHARED(yes)
7AC_ENABLE_STATIC(no)
8
9AM_INIT_AUTOMAKE([foreign subdir-objects])
10AM_SILENT_RULES([yes])
11
12#AC_GNU_SOURCE has been deprecated (https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html)
13AC_USE_SYSTEM_EXTENSIONS
14
15AC_PROG_CC
16
17LT_PREREQ([2.2])
18LT_INIT
19
20# Common CFLAGS
21CFLAGS="$CFLAGS \
22	-fPIC \
23	-fstack-protector-all \
24	-fstrict-aliasing \
25	-ggdb3 \
26	-pthread \
27	-Wall \
28	-Warray-bounds \
29	-Wextra \
30	-Wformat-nonliteral \
31	-Wformat-security \
32	-Wformat=2 \
33	-Winit-self \
34	-Winline \
35	-Wlarger-than=65537 \
36	-Wmissing-declarations \
37	-Wmissing-format-attribute \
38	-Wmissing-include-dirs \
39	-Wmissing-noreturn \
40	-Wmissing-prototypes \
41	-Wnested-externs \
42	-Wno-aggregate-return \
43	-Wno-missing-field-initializers \
44	-Wno-redundant-decls \
45	-Wno-undef \
46	-Wno-unused-parameter \
47	-Wold-style-definition \
48	-Wpacked \
49	-Wpointer-arith \
50	-Wsign-compare \
51	-Wstrict-prototypes \
52	-Wswitch-default \
53	-Wunused \
54	-Wwrite-strings \
55	-Werror=implicit-function-declaration"
56
57case "$CC" in
58*clang*)
59	# Specific clang flags
60	CFLAGS="$CFLAGS \
61		-Wno-cast-align \
62		-Wno-initializer-overrides"
63;;
64cc*)
65	CFLAGS="$CFLAGS \
66		-Wno-cast-align \
67		-Wno-initializer-overrides"
68;;
69*)
70	# Specific gcc flags
71	CFLAGS="$CFLAGS \
72		-Wcast-align \
73		-Wno-override-init \
74		-Wunsafe-loop-optimizations \
75		-Wunused-but-set-variable"
76esac
77
78JANUS_VERSION=116
79AC_SUBST(JANUS_VERSION)
80JANUS_VERSION_STRING="0.11.6"
81AC_SUBST(JANUS_VERSION_STRING)
82
83case "$host_os" in
84darwin*)
85	CFLAGS="$CFLAGS -I/usr/local/opt/openssl/include -I/usr/local/include"
86	# add rdynamic to LDFLAGS
87	LDFLAGS="$LDFLAGS -Wl,-export_dynamic"
88	LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/opt/local/lib -L/usr/local/libsrtp/lib"
89	AM_CONDITIONAL([DARWIN_OS], true)
90;;
91freebsd*)
92	CFLAGS="$CFLAGS -I/usr/include/openssl"
93	LDFLAGS="$LDFLAGS -Xlinker --export-dynamic"
94	LDFLAGS="$LDFLAGS -L/usr/lib/openssl -lcrypto -lssl -L/usr/local/lib"
95	AM_CONDITIONAL([DARWIN_OS], false)
96;;
97*)
98	LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
99	AM_CONDITIONAL([DARWIN_OS], false)
100	AC_DEFINE(HAS_DTLS_WINDOW_SIZE, 1)
101esac
102
103glib_version=2.34
104ssl_version=1.0.1
105jansson_version=2.5
106
107##
108# Janus
109##
110
111AC_ARG_ENABLE([docs],
112              [AS_HELP_STRING([--enable-docs],
113                              [Enable building documentation])],
114              [],
115              [enable_docs=no])
116
117AC_ARG_ENABLE([data-channels],
118              [AS_HELP_STRING([--disable-data-channels],
119                              [Disable DataChannels])],
120              [],
121              [enable_data_channels=maybe])
122
123AC_ARG_ENABLE([boringssl],
124              [AS_HELP_STRING([--enable-boringssl],
125                              [Use BoringSSL instead of OpenSSL])],
126              [
127                case "${enableval}" in
128                  yes) boringssl_dir=/opt/boringssl ;;
129                  no)  boringssl_dir= ;;
130                  *) boringssl_dir=${enableval} ;;
131                esac
132              ],
133              [boringssl_dir=])
134
135AC_ARG_ENABLE([libsrtp2],
136              [AS_HELP_STRING([--enable-libsrtp2],
137                              [Use libsrtp 2.0.x instead of libsrtp 1.5.x])],
138              [],
139              [enable_libsrtp2=maybe])
140
141AC_ARG_ENABLE([aes-gcm],
142              [AS_HELP_STRING([--disable-aes-gcm],
143                              [Disable AES-GCM support in libsrtp(2)])],
144              [],
145              [AC_DEFINE(HAVE_SRTP_AESGCM)])
146
147AC_ARG_ENABLE([dtls-settimeout],
148              [AS_HELP_STRING([--enable-dtls-settimeout],
149                              [Use DTLSv1_set_initial_timeout_duration (only available in recent BoringSSL versions)])],
150              [],
151              [enable_dtls_settimeout=no])
152
153AC_ARG_ENABLE([pthread-mutex],
154              [AS_HELP_STRING([--enable-pthread-mutex],
155                              [Use pthread_mutex instead of GMutex (see #1397)])],
156              [],
157              [enable_pthread_mutex=no])
158
159AC_ARG_ENABLE([turn-rest-api],
160              [AS_HELP_STRING([--disable-turn-rest-api],
161                              [Disable TURN REST API client (via libcurl)])],
162              [],
163              [enable_turn_rest_api=maybe])
164
165AC_ARG_ENABLE([all-plugins],
166              [AS_HELP_STRING([--disable-all-plugins],
167                              [Disable building all plugins (except those manually enabled)])],
168              [
169               AS_IF([test "x$enable_plugin_audiobridge" != "xyes"],
170                     [enable_plugin_audiobridge=no])
171               AS_IF([test "x$enable_plugin_duktape" != "xyes"],
172                     [enable_plugin_duktape=no])
173               AS_IF([test "x$enable_plugin_echotest" != "xyes"],
174                     [enable_plugin_echotest=no])
175               AS_IF([test "x$enable_plugin_lua" != "xyes"],
176                     [enable_plugin_lua=no])
177               AS_IF([test "x$enable_plugin_recordplay" != "xyes"],
178                     [enable_plugin_recordplay=no])
179               AS_IF([test "x$enable_plugin_sip" != "xyes"],
180                     [enable_plugin_sip=no])
181               AS_IF([test "x$enable_plugin_nosip" != "xyes"],
182                     [enable_plugin_nosip=no])
183               AS_IF([test "x$enable_plugin_streaming" != "xyes"],
184                     [enable_plugin_streaming=no])
185               AS_IF([test "x$enable_plugin_textroom" != "xyes"],
186                     [enable_plugin_textroom=no])
187               AS_IF([test "x$enable_plugin_videocall" != "xyes"],
188                     [enable_plugin_videocall=no])
189               AS_IF([test "x$enable_plugin_videoroom" != "xyes"],
190                     [enable_plugin_videoroom=no])
191               AS_IF([test "x$enable_plugin_voicemail" != "xyes"],
192                     [enable_plugin_voicemail=no])
193              ],
194              [])
195
196AC_ARG_ENABLE([all-transports],
197              [AS_HELP_STRING([--disable-all-transports],
198                              [Disable building all transports (except those manually enabled)])],
199              [
200               AS_IF([test "x$enable_rest" != "xyes"],
201                     [enable_rest=no])
202               AS_IF([test "x$enable_websockets" != "xyes"],
203                     [enable_websockets=no])
204               AS_IF([test "x$enable_rabbitmq" != "xyes"],
205                     [enable_rabbitmq=no])
206               AS_IF([test "x$enable_mqtt" != "xyes"],
207                     [enable_mqtt=no])
208               AS_IF([test "x$enable_unix_sockets" != "xyes"],
209                     [enable_unix_sockets=no])
210               AS_IF([test "x$enable_nanomsg" != "xyes"],
211                     [enable_nanomsg=no])
212              ],
213              [])
214
215AC_ARG_ENABLE([all-handlers],
216              [AS_HELP_STRING([--disable-all-handlers],
217                              [Disable building all event handlers (except those manually enabled)])],
218              [
219               AS_IF([test "x$enable_sample_event_handler" != "xyes"],
220                     [enable_sample_event_handler=no])
221               AS_IF([test "x$enable_websockets_event_handler" != "xyes"],
222                     [enable_websockets_event_handler=no])
223               AS_IF([test "x$enable_rabbitmq_event_handler" != "xyes"],
224                     [enable_rabbitmq_event_handler=no])
225               AS_IF([test "x$enable_mqtt_event_handler" != "xyes"],
226                     [enable_mqtt_event_handler=no])
227               AS_IF([test "x$enable_nanomsg_event_handler" != "xyes"],
228                     [enable_nanomsg_event_handler=no])
229               AS_IF([test "x$enable_gelf_event_handler" != "xyes"],
230                     [enable_gelf_event_handler=no])
231              ],
232              [])
233
234AC_ARG_ENABLE([all-loggers],
235              [AS_HELP_STRING([--disable-all-loggers],
236                              [Disable building all loggers (except those manually enabled)])],
237              [
238               AS_IF([test "x$enable_json_logger" != "xyes"],
239                     [enable_json_logger=no])
240              ],
241              [])
242
243AC_ARG_ENABLE([all-js-modules],
244              [AS_HELP_STRING([--enable-all-js-modules],
245                              [Build all the JavaScript modules (instead of manually enabling them one by one)])],
246              [
247               enable_javascript_es_module=yes
248               enable_javascript_umd_module=yes
249               enable_javascript_iife_module=yes
250               enable_javascript_common_js_module=yes
251              ],
252              [])
253
254AC_ARG_ENABLE([rest],
255              [AS_HELP_STRING([--disable-rest],
256                              [Disable REST (HTTP/HTTPS) support])],
257              [AS_IF([test "x$enable_rest" != "xyes"],
258                     [enable_rest=no])],
259              [enable_rest=maybe])
260
261AC_ARG_ENABLE([websockets],
262              [AS_HELP_STRING([--disable-websockets],
263                              [Disable WebSockets support])],
264              [AS_IF([test "x$enable_websockets" != "xyes"],
265                     [enable_websockets=no])],
266              [enable_websockets=maybe])
267
268AC_ARG_ENABLE([rabbitmq],
269              [AS_HELP_STRING([--disable-rabbitmq],
270                              [Disable RabbitMQ integration])],
271              [AS_IF([test "x$enable_rabbitmq" != "xyes"],
272                     [enable_rabbitmq=no])],
273              [enable_rabbitmq=maybe])
274
275AC_ARG_ENABLE([mqtt],
276              [AS_HELP_STRING([--disable-mqtt],
277                              [Disable MQTT integration])],
278              [AS_IF([test "x$enable_mqtt" != "xyes"],
279                     [enable_mqtt=no])],
280              [enable_mqtt=maybe])
281
282AC_ARG_ENABLE([unix-sockets],
283              [AS_HELP_STRING([--disable-unix-sockets],
284                              [Disable Unix Sockets integration])],
285              [AS_IF([test "x$enable_unix_sockets" != "xyes"],
286                     [enable_unix_sockets=no])],
287              [enable_unix_sockets=maybe])
288
289AC_ARG_ENABLE([nanomsg],
290              [AS_HELP_STRING([--disable-nanomsg],
291                              [Disable Nanomsg integration])],
292              [AS_IF([test "x$enable_nanomsg" != "xyes"],
293                     [enable_nanomsg=no])],
294              [enable_nanomsg=maybe])
295
296AC_ARG_ENABLE([sample-event-handler],
297              [AS_HELP_STRING([--disable-sample-event-handler],
298                              [Disable sample event handler (HTTP POST) ])],
299              [AS_IF([test "x$enable_sample_event_handler" != "xyes"],
300                     [enable_sample_event_handler=no])],
301              [enable_sample_event_handler=maybe])
302
303AC_ARG_ENABLE([websockets-event-handler],
304              [AS_HELP_STRING([--disable-websockets-event-handler],
305                              [Disable WebSockets event handler ])],
306              [AS_IF([test "x$enable_websockets_event_handler" != "xyes"],
307                     [enable_websockets_event_handler=no])],
308              [enable_websockets_event_handler=maybe])
309
310AC_ARG_ENABLE([rabbitmq-event-handler],
311              [AS_HELP_STRING([--disable-rabbitmq-event-handler],
312                              [Disable RabbitMQ event handler ])],
313              [AS_IF([test "x$enable_rabbitmq_event_handler" != "xyes"],
314                     [enable_rabbitmq_event_handler=no])],
315              [enable_rabbitmq_event_handler=maybe])
316
317AC_ARG_ENABLE([mqtt-event-handler],
318              [AS_HELP_STRING([--disable-mqtt-event-handler],
319                              [Disable MQTT event handler ])],
320              [AS_IF([test "x$enable_mqtt_event_handler" != "xyes"],
321                     [enable_mqtt_event_handler=no])],
322              [enable_mqtt_event_handler=maybe])
323
324AC_ARG_ENABLE([nanomsg-event-handler],
325              [AS_HELP_STRING([--disable-nanomsg-event-handler],
326                              [Disable Nanomsg event handler ])],
327              [AS_IF([test "x$enable_nanomsg_event_handler" != "xyes"],
328                     [enable_nanomsg_event_handler=no])],
329              [enable_nanomsg_event_handler=maybe])
330
331AC_ARG_ENABLE([gelf-event-handler],
332              [AS_HELP_STRING([--disable-gelf-event-handler],
333                              [Disable gelf event handler ])],
334              [AS_IF([test "x$enable_gelf_event_handler" != "xyes"],
335                     [enable_gelf_event_handler=no])],
336              [enable_gelf_event_handler=yes])
337
338AC_ARG_ENABLE([json-logger],
339              [AS_HELP_STRING([--enable-json-logger],
340                              [Enable external JSON file logger ])],
341              [AS_IF([test "x$enable_json_logger" != "xyes"],
342                     [enable_json_logger=no])],
343              [enable_json_logger=no])
344
345AC_ARG_ENABLE([systemd-sockets],
346              [AS_HELP_STRING([--enable-systemd-sockets],
347                              [Enable Systemd Unix Sockets management])],
348              [],
349              [enable_systemd_sockets=no])
350
351case "$host_os" in
352freebsd*)
353	PKGCHECKMODULES="glib-2.0 >= $glib_version
354                    gio-2.0 >= $glib_version
355                    libconfig
356                    nice
357                    jansson >= $jansson_version
358                    zlib"
359;;
360*)
361	PKGCHECKMODULES="glib-2.0 >= $glib_version
362                    gio-2.0 >= $glib_version
363                    libconfig
364                    nice
365                    jansson >= $jansson_version
366                    zlib"
367esac
368PKG_CHECK_MODULES([JANUS],"$PKGCHECKMODULES")
369
370JANUS_MANUAL_LIBS="${JANUS_MANUAL_LIBS} -lm"
371AC_SUBST(JANUS_MANUAL_LIBS)
372
373AS_IF([test "x${boringssl_dir}" != "x"],
374	  [echo "Trying to use BoringSSL instead of OpenSSL...";
375	   AC_MSG_NOTICE([BoringSSL directory is ${boringssl_dir}])
376	   CFLAGS="$CFLAGS -I${boringssl_dir}/include";
377	   BORINGSSL_CFLAGS=" -I${boringssl_dir}/include";
378       AC_SUBST(BORINGSSL_CFLAGS)
379	   BORINGSSL_LIBS=" -L${boringssl_dir}/lib";
380       AC_SUBST(BORINGSSL_LIBS)
381	   AC_CHECK_HEADERS([${boringssl_dir}/include/openssl/opensslconf.h],
382	                    [AC_DEFINE(HAVE_BORINGSSL)],
383	                    [AC_MSG_ERROR([BoringSSL headers not found in ${boringssl_dir}, use --disable-boringssl if you want to use OpenSSL instead])])
384      ])
385AM_CONDITIONAL([ENABLE_BORINGSSL], [test "x${boringssl_dir}" != "x"])
386
387AS_IF([test "x$enable_dtls_settimeout" = "xyes"],
388      [
389      AC_DEFINE(HAVE_DTLS_SETTIMEOUT)
390      AC_MSG_NOTICE([Assuming DTLSv1_set_initial_timeout_duration is available])
391      ])
392AM_CONDITIONAL([ENABLE_DTLS_SETTIMEOUT], [test "x$enable_dtls_settimeout" = "xyes"])
393
394AS_IF([test "x$enable_pthread_mutex" = "xyes"],
395      [
396      AC_DEFINE(USE_PTHREAD_MUTEX)
397      AC_MSG_NOTICE([Will use pthread_mutex instead of GMutex])
398      ])
399AM_CONDITIONAL([ENABLE_PTHREAD_MUTEX], [test "x$enable_pthread_mutex" = "xyes"])
400
401AC_SEARCH_LIBS([tls_config_set_ca_mem],[tls],
402             [AM_CONDITIONAL([LIBRESSL_DETECTED], true)],
403             [AM_CONDITIONAL([LIBRESSL_DETECTED], false)]
404             )
405
406AC_CHECK_LIB([nice],
407             [nice_agent_set_port_range],
408             [AC_DEFINE(HAVE_PORTRANGE)],
409             [AC_MSG_NOTICE([libnice version does not have nice_agent_set_port_range])]
410             )
411
412AC_CHECK_LIB([nice],
413             [nice_address_equal_no_port],
414             [AC_DEFINE(HAVE_LIBNICE_TCP)],
415             [AC_MSG_NOTICE([libnice version does not support TCP candidates])]
416             )
417
418AC_CHECK_LIB([nice],
419             [nice_agent_close_async],
420             [AC_DEFINE(HAVE_CLOSE_ASYNC)],
421             [AC_MSG_NOTICE([libnice version does not have nice_agent_close_async])]
422             )
423
424AC_CHECK_LIB([nice],
425             [nice_agent_new_full],
426             [AC_DEFINE(HAVE_ICE_NOMINATION)],
427             [AC_MSG_NOTICE([libnice version does not have nice_agent_new_full])]
428             )
429
430AC_CHECK_LIB([dl],
431             [dlopen],
432             [JANUS_MANUAL_LIBS="${JANUS_MANUAL_LIBS} -ldl"],
433             [AC_MSG_ERROR([libdl not found.])])
434
435AM_CONDITIONAL([ENABLE_LIBSRTP_2], false)
436AS_IF([test "x$enable_libsrtp2" != "xno"],
437      [PKG_CHECK_MODULES([LIBSRTP],
438                         [libsrtp2],
439                         [
440                          AC_DEFINE(HAVE_SRTP_2)
441                          enable_libsrtp2=yes
442                          AM_CONDITIONAL([ENABLE_LIBSRTP_2], true)
443                         ],
444                         [
445                          AS_IF([test "x$enable_libsrtp2" = "xyes"],
446                                [AC_MSG_ERROR([libsrtp2 headers not found. See README.md for installation instructions or use --disable-libsrtp-2 to try and autodetect libsrtp 1.5.x instead])])
447                         ])
448      ])
449AM_COND_IF([ENABLE_LIBSRTP_2],
450           [],
451           [PKG_CHECK_MODULES([LIBSRTP],
452                              [libsrtp >= 1.5.0],
453                              [enable_libsrtp2=no],
454                              [AC_MSG_ERROR([libsrtp and libsrtp2 not found. See README.md for installation instructions])
455                              ])
456           ])
457
458AC_CHECK_LIB([usrsctp],
459             [usrsctp_finish],
460             [
461               AS_IF([test "x$enable_data_channels" != "xno"],
462               [
463                  AC_DEFINE(HAVE_SCTP)
464                  JANUS_MANUAL_LIBS="${JANUS_MANUAL_LIBS} -lusrsctp"
465                  enable_data_channels=yes
466               ])
467             ],
468             [
469               AS_IF([test "x$enable_data_channels" = "xyes"],
470                     [AC_MSG_ERROR([libusrsctp not found. See README.md for installation instructions or use --disable-data-channels])])
471             ])
472AM_CONDITIONAL([ENABLE_SCTP], [test "x$enable_data_channels" = "xyes"])
473
474PKG_CHECK_MODULES([LIBCURL],
475                  [libcurl],
476                  [
477                    AC_DEFINE(HAVE_LIBCURL)
478                    AS_IF(
479                      [test "x$enable_turn_rest_api" != "xno"],
480                      [
481                        AC_DEFINE(HAVE_TURNRESTAPI)
482                        enable_turn_rest_api=yes
483                      ])
484                    AS_IF([test "x$enable_sample_event_handler" != "xno"],
485                      [
486                        AC_DEFINE(HAVE_SAMPLEEVH)
487                        enable_sample_event_handler=yes
488                      ])
489                  ],
490                  [
491                    AS_IF([test "x$enable_turn_rest_api" = "xyes"],
492                          [AC_MSG_ERROR([libcurl not found. See README.md for installation instructions or use --disable-turn-rest-api])])
493                    AS_IF([test "x$enable_sample_event_handler" = "xyes"],
494                          [AC_MSG_ERROR([libcurl not found. See README.md for installation instructions or use --disable-sample-event-handler])])
495                  ])
496AM_CONDITIONAL([ENABLE_TURN_REST_API], [test "x$enable_turn_rest_api" = "xyes"])
497AM_CONDITIONAL([ENABLE_SAMPLEEVH], [test "x$enable_sample_event_handler" = "xyes"])
498
499AC_CHECK_PROG([DOXYGEN],
500              [doxygen],
501              [doxygen])
502AC_CHECK_PROG([DOT],
503              [dot],
504              [dot])
505AS_IF([test -z "$DOXYGEN" -o -z "$DOT"],
506      [
507        AS_IF([test "x$enable_docs" = "xyes"],
508              [AC_MSG_ERROR([doxygen or dot not found. See README.md for installation instructions or remove --enable-docs])])
509      ])
510AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" = "xyes"])
511if test "x$enable_docs" = "xyes"; then
512	doxygen_version=$($DOXYGEN --version)
513	AS_VERSION_COMPARE([$doxygen_version], [1.8.11],
514                           [],
515                           [],
516                           [
517                            AS_VERSION_COMPARE([$doxygen_version], [1.8.14],
518                                               [AC_MSG_ERROR([Doxygen $doxygen_version not usable: versions between 1.8.12 and 1.8.14 are known to render poorly.])],
519                                               [],
520                                               []
521                                              )
522                           ]
523                          )
524fi
525
526AC_CHECK_PROG([GENGETOPT_CHECK],
527              [gengetopt],
528              [yes])
529if test x"$GENGETOPT_CHECK" != x"yes" ; then
530    AC_MSG_ERROR([Please install gengetopt before installing.])
531fi
532
533
534##
535# Transports
536##
537
538PKG_CHECK_MODULES([TRANSPORTS],
539                  [
540                    glib-2.0 >= $glib_version
541                    jansson >= $jansson_version
542                  ])
543
544PKG_CHECK_MODULES([MHD],
545                  [libmicrohttpd >= 0.9.59],
546                  [
547                    AS_IF([test "x$enable_rest" = "xmaybe"],
548                          [enable_rest=yes])
549                  ],
550                  [
551                    AS_IF([test "x$enable_rest" = "xyes"],
552                          [AC_MSG_ERROR([libmicrohttpd not found. See README.md for installation instructions or use --disable-rest])])
553                  ])
554AC_SUBST([MHD_CFLAGS])
555AC_SUBST([MHD_LIBS])
556AM_CONDITIONAL([ENABLE_REST], [test "x$enable_rest" = "xyes"])
557AM_COND_IF([ENABLE_REST],
558           [
559             AC_CHECK_TYPES([enum MHD_Result],
560                            [],
561                            [],
562                            [#include <microhttpd.h>])
563           ])
564
565AC_CHECK_LIB([websockets],
566			 [lws_create_vhost],
567			 [
568			   AS_IF([test "x$enable_websockets" != "xno"],
569			   [
570				  AC_DEFINE(HAVE_WEBSOCKETS)
571				  WS_MANUAL_LIBS="-lwebsockets"
572				  enable_websockets=yes
573				  AC_CHECK_LIB([websockets],
574							   [lws_get_peer_simple],
575							   [AC_DEFINE(HAVE_LIBWEBSOCKETS_PEER_SIMPLE)]
576							  )
577			   ])
578               AS_IF([test "x$enable_websockets_event_handler" != "xno"],
579               [
580                 AC_DEFINE(HAVE_WSEVH)
581                 WS_MANUAL_LIBS="-lwebsockets"
582                 enable_websockets_event_handler=yes
583               ])
584			 ],
585			 [
586			   AS_IF([test "x$enable_websockets" = "xyes"],
587					 [AC_MSG_ERROR([libwebsockets not found. See README.md for installation instructions or use --disable-websockets])])
588			 ])
589AM_CONDITIONAL([ENABLE_WEBSOCKETS], [test "x$enable_websockets" = "xyes"])
590AM_CONDITIONAL([ENABLE_WSEVH], [test "x$enable_websockets_event_handler" = "xyes"])
591AC_SUBST(WS_MANUAL_LIBS)
592
593AC_CHECK_LIB([rabbitmq],
594             [amqp_error_string2],
595             [
596               AS_IF([test "x$enable_rabbitmq" != "xno"],
597               [
598                  AC_DEFINE(HAVE_RABBITMQ)
599                  enable_rabbitmq=yes
600               ])
601               AS_IF([test "x$enable_rabbitmq_event_handler" != "xno"],
602               [
603                 AC_DEFINE(HAVE_RABBITMQEVH)
604                 enable_rabbitmq_event_handler=yes
605               ])
606               AC_CHECK_HEADERS([rabbitmq-c/amqp.h])
607             ],
608             [
609               AS_IF([test "x$enable_rabbitmq" = "xyes"],
610                     [AC_MSG_ERROR([rabbitmq-c not found. See README.md for installation instructions or use --disable-rabbitmq])])
611               AS_IF([test "x$enable_rabbitmq_event_handler" = "xyes"],
612                     [AC_MSG_ERROR([rabbitmq-c not found. See README.md for installation instructions or use --disable-rabbitmq-event-handler])])
613             ])
614AC_CHECK_LIB([paho-mqtt3a],
615             [MQTTAsync_create],
616             [
617               AS_IF([test "x$enable_mqtt" != "xno"],
618               [
619                  AC_DEFINE(HAVE_MQTT)
620                  enable_mqtt=yes
621               ])
622               AS_IF([test "x$enable_mqtt_event_handler" != "xno"],
623               [
624                 AC_DEFINE(HAVE_MQTTEVH)
625                 enable_mqtt_event_handler=yes
626               ])
627             ],
628             [
629               AS_IF([test "x$enable_mqtt" = "xyes"],
630                     [AC_MSG_ERROR([paho c client not found. See README.md for installation instructions or use --disable-mqtt])])
631               AS_IF([test "x$enable_mqtt_event_handler" = "xyes"],
632                     [AC_MSG_ERROR([paho c not found. See README.md for installation instructions or use --disable-mqtt-event-handler])])
633             ])
634AC_CHECK_LIB([nanomsg],
635             [nn_socket],
636             [
637               AS_IF([test "x$enable_nanomsg" != "xno"],
638               [
639                  AC_DEFINE(HAVE_NANOMSG)
640                  enable_nanomsg=yes
641               ])
642               AS_IF([test "x$enable_nanomsg_event_handler" != "xno"],
643               [
644                 AC_DEFINE(HAVE_NANOMSGEVH)
645                 enable_nanomsg_event_handler=yes
646               ])
647             ],
648             [
649               AS_IF([test "x$enable_nanomsg" = "xyes"],
650                     [AC_MSG_ERROR([nanomsg not found. See README.md for installation instructions or use --disable-nanomsg])])
651               AS_IF([test "x$enable_nanomsg_event_handler" = "xyes"],
652                     [AC_MSG_ERROR([nanomsg not found. See README.md for installation instructions or use --disable-nanomsg-event-handler])])
653             ])
654AM_CONDITIONAL([ENABLE_RABBITMQ], [test "x$enable_rabbitmq" = "xyes"])
655AM_CONDITIONAL([ENABLE_RABBITMQEVH], [test "x$enable_rabbitmq_event_handler" = "xyes"])
656AM_CONDITIONAL([ENABLE_MQTT], [test "x$enable_mqtt" = "xyes"])
657AM_CONDITIONAL([ENABLE_MQTTEVH], [test "x$enable_mqtt_event_handler" = "xyes"])
658AM_CONDITIONAL([ENABLE_NANOMSG], [test "x$enable_nanomsg" = "xyes"])
659AM_CONDITIONAL([ENABLE_NANOMSGEVH], [test "x$enable_nanomsg_event_handler" = "xyes"])
660AM_CONDITIONAL([ENABLE_GELFEVH], [test "x$enable_gelf_event_handler" = "xyes"])
661
662AM_CONDITIONAL([ENABLE_JSONLOGGER], [test "x$enable_json_logger" = "xyes"])
663
664AC_TRY_COMPILE([
665               #include <stdlib.h>
666               #include <sys/socket.h>
667               #include <sys/un.h>
668               void test() {
669                 int pfd = socket(PF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK, 0);
670                 if(pfd < 0)
671                   exit(1);
672               }],
673               [],
674               [
675                 AS_IF([test "x$enable_unix_sockets" != "xno"],
676                 [
677                    AC_DEFINE(HAVE_PFUNIX)
678                    enable_unix_sockets=yes
679                 ])
680               ],
681               [
682                 AS_IF([test "x$enable_unix_sockets" = "xyes"],
683                       [AC_MSG_ERROR([SOCK_SEQPACKET not defined in your OS. Use --disable-unix-sockets])])
684               ])
685AM_CONDITIONAL([ENABLE_PFUNIX], [test "x$enable_unix_sockets" = "xyes"])
686
687AS_IF([test "x$enable_systemd_sockets" = "xyes"],
688      [PKG_CHECK_MODULES([LIBSYSTEMD],
689                          [libsystemd],
690                          [
691                            AC_DEFINE(HAVE_LIBSYSTEMD)
692                          ],
693                          [AC_MSG_ERROR([libsystemd not found. systemd unix domain socket service not supported])])
694      ])
695
696
697##
698# Plugins
699##
700
701PKG_CHECK_MODULES([PLUGINS],
702                  [
703                    glib-2.0 >= $glib_version
704                    jansson >= $jansson_version
705                  ])
706
707AC_ARG_ENABLE([plugin-audiobridge],
708              [AS_HELP_STRING([--disable-plugin-audiobridge],
709                              [Disable audiobridge plugin])],
710              [AS_IF([test "x$enable_plugin_audiobridge" != "xyes"],
711                     [enable_plugin_audiobridge=no])],
712              [enable_plugin_audiobridge=maybe])
713
714AC_ARG_ENABLE([plugin-duktape],
715              [AS_HELP_STRING([--enable-plugin-duktape],
716                              [Enable duktape plugin])],
717              [AS_IF([test "x$enable_plugin_duktape" != "xyes"],
718                     [enable_plugin_duktape=no])],
719              [enable_plugin_duktape=no])
720
721AC_ARG_ENABLE([plugin-echotest],
722              [AS_HELP_STRING([--disable-plugin-echotest],
723                              [Disable echotest plugin])],
724              [AS_IF([test "x$enable_plugin_echotest" != "xyes"],
725                     [enable_plugin_echotest=no])],
726              [enable_plugin_echotest=yes])
727
728AC_ARG_ENABLE([plugin-lua],
729              [AS_HELP_STRING([--enable-plugin-lua],
730                              [Enable lua plugin])],
731              [AS_IF([test "x$enable_plugin_lua" != "xyes"],
732                     [enable_plugin_lua=no])],
733              [enable_plugin_lua=no])
734
735AC_ARG_ENABLE([plugin-recordplay],
736              [AS_HELP_STRING([--disable-plugin-recordplay],
737                              [Disable record&play plugin])],
738              [AS_IF([test "x$enable_plugin_recordplay" != "xyes"],
739                     [enable_plugin_recordplay=no])],
740              [enable_plugin_recordplay=yes])
741
742AC_ARG_ENABLE([plugin-sip],
743              [AS_HELP_STRING([--disable-plugin-sip],
744                              [Disable sip plugin])],
745              [AS_IF([test "x$enable_plugin_sip" != "xyes"],
746                     [enable_plugin_sip=no])],
747              [enable_plugin_sip=maybe])
748
749AC_ARG_ENABLE([plugin-nosip],
750              [AS_HELP_STRING([--disable-plugin-nosip],
751                              [Disable nosip plugin])],
752              [AS_IF([test "x$enable_plugin_nosip" != "xyes"],
753                     [enable_plugin_nosip=no])],
754              [enable_plugin_nosip=yes])
755
756AC_ARG_ENABLE([plugin-streaming],
757              [AS_HELP_STRING([--disable-plugin-streaming],
758                              [Disable streaming plugin])],
759              [AS_IF([test "x$enable_plugin_streaming" != "xyes"],
760                     [enable_plugin_streaming=no])],
761              [enable_plugin_streaming=yes])
762
763AC_ARG_ENABLE([plugin-textroom],
764              [AS_HELP_STRING([--disable-plugin-textroom],
765                              [Disable textroom plugin])],
766              [AS_IF([test "x$enable_plugin_textroom" != "xyes"],
767                     [enable_plugin_textroom=no])],
768              [enable_plugin_textroom=yes])
769
770AC_ARG_ENABLE([plugin-videocall],
771              [AS_HELP_STRING([--disable-plugin-videocall],
772                              [Disable videocall plugin])],
773              [AS_IF([test "x$enable_plugin_videocall" != "xyes"],
774                     [enable_plugin_videocall=no])],
775              [enable_plugin_videocall=yes])
776
777AC_ARG_ENABLE([plugin-videoroom],
778              [AS_HELP_STRING([--disable-plugin-videoroom],
779                              [Disable videoroom plugin])],
780              [AS_IF([test "x$enable_plugin_videoroom" != "xyes"],
781                     [enable_plugin_videoroom=no])],
782              [enable_plugin_videoroom=yes])
783
784AC_ARG_ENABLE([plugin-voicemail],
785              [AS_HELP_STRING([--disable-plugin-voicemail],
786                              [Disable voicemail plugin])],
787              [AS_IF([test "x$enable_plugin_voicemail" != "xyes"],
788                     [enable_plugin_voicemail=no])],
789              [enable_plugin_voicemail=maybe])
790
791PKG_CHECK_MODULES([SOFIA],
792                  [sofia-sip-ua],
793                  [
794                    AS_IF([test "x$enable_plugin_sip" = "xmaybe"],
795                          [enable_plugin_sip=yes])
796                  ],
797                  [
798                    AS_IF([test "x$enable_plugin_sip" = "xyes"],
799                          [AC_MSG_ERROR([sofia-sip-ua not found. See README.md for installation instructions or use --disable-plugin-sip])])
800                  ])
801AC_SUBST([SOFIA_CFLAGS])
802AC_SUBST([SOFIA_LIBS])
803
804PKG_CHECK_MODULES([OPUS],
805                  [opus],
806                  [
807                    AS_IF([test "x$enable_plugin_audiobridge" = "xmaybe"],
808                          [enable_plugin_audiobridge=yes])
809                  ],
810                  [
811                    AS_IF([test "x$enable_plugin_audiobridge" = "xyes"],
812                          [AC_MSG_ERROR([libopus not found. See README.md for installation instructions or use --disable-plugin-audiobridge])])
813                  ])
814AC_SUBST([OPUS_CFLAGS])
815AC_SUBST([OPUS_LIBS])
816
817PKG_CHECK_MODULES([OGG],
818                  [ogg],
819                  [
820                    AC_DEFINE(HAVE_LIBOGG)
821                    AS_IF([test "x$enable_plugin_voicemail" = "xmaybe"],
822                          [enable_plugin_voicemail=yes])
823                  ],
824                  [
825                    AS_IF([test "x$enable_plugin_voicemail" = "xyes"],
826                          [AC_MSG_ERROR([libogg not found. See README.md for installation instructions or use --disable-plugin-voicemail])])
827                  ])
828AC_SUBST([OGG_CFLAGS])
829AC_SUBST([OGG_LIBS])
830
831PKG_CHECK_MODULES([LUA],
832                  [lua],
833                  [
834                    AS_IF([test "x$enable_plugin_lua" = "xmaybe"],
835                          [enable_plugin_lua=yes])
836                  ],
837                  [PKG_CHECK_MODULES([LUA],
838                                     [lua5.3],
839                                     [
840                                       AS_IF([test "x$enable_plugin_lua" = "xmaybe"],
841                                             [enable_plugin_lua=yes])
842                                     ],
843                                     [
844                                       AS_IF([test "x$enable_plugin_lua" = "xyes"],
845                                             [AC_MSG_ERROR([lua-libs not found. See README.md for installation instructions or use --disable-plugin-lua])])
846                                     ])
847                  ])
848AC_SUBST([LUA_CFLAGS])
849AC_SUBST([LUA_LIBS])
850
851AM_CONDITIONAL([ENABLE_PLUGIN_AUDIOBRIDGE], [test "x$enable_plugin_audiobridge" = "xyes"])
852AM_CONDITIONAL([ENABLE_PLUGIN_DUKTAPE], [test "x$enable_plugin_duktape" = "xyes"])
853AM_CONDITIONAL([ENABLE_PLUGIN_ECHOTEST], [test "x$enable_plugin_echotest" = "xyes"])
854AM_CONDITIONAL([ENABLE_PLUGIN_LUA], [test "x$enable_plugin_lua" = "xyes"])
855AM_CONDITIONAL([ENABLE_PLUGIN_RECORDPLAY], [test "x$enable_plugin_recordplay" = "xyes"])
856AM_CONDITIONAL([ENABLE_PLUGIN_SIP], [test "x$enable_plugin_sip" = "xyes"])
857AM_CONDITIONAL([ENABLE_PLUGIN_NOSIP], [test "x$enable_plugin_nosip" = "xyes"])
858AM_CONDITIONAL([ENABLE_PLUGIN_STREAMING], [test "x$enable_plugin_streaming" = "xyes"])
859AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOCALL], [test "x$enable_plugin_videocall" = "xyes"])
860AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOROOM], [test "x$enable_plugin_videoroom" = "xyes"])
861AM_CONDITIONAL([ENABLE_PLUGIN_VOICEMAIL], [test "x$enable_plugin_voicemail" = "xyes"])
862AM_CONDITIONAL([ENABLE_PLUGIN_TEXTROOM], [test "x$enable_plugin_textroom" = "xyes"])
863
864
865##
866# Event handlers
867##
868
869PKG_CHECK_MODULES([EVENTS],
870                  [
871                    glib-2.0 >= $glib_version
872                    jansson >= $jansson_version
873                  ])
874
875
876##
877# Loggers
878##
879
880PKG_CHECK_MODULES([LOGGERS],
881                  [
882                    glib-2.0 >= $glib_version
883                    jansson >= $jansson_version
884                  ])
885
886
887##
888# JavaScript modules
889##
890
891AC_ARG_ENABLE([javascript-es-module],
892              [AS_HELP_STRING([--enable-javascript-es-module],
893                              [Generate an ECMAScript style module from janus.js])],
894              [AS_IF([test "x$enable_javascript_es_module" = "xyes"],
895                     [enable_javascript_es_module=yes])],
896              [enable_javascript_es_module=no])
897AM_CONDITIONAL([ENABLE_JAVASCRIPT_ES_MODULE], [test "x$enable_javascript_es_module" = "xyes" ])
898
899AC_ARG_ENABLE([javascript-umd-module],
900              [AS_HELP_STRING([--enable-javascript-umd-module],
901                              [Generate an UMD style module from janus.js])],
902              [AS_IF([test "x$enable_javascript_umd_module" = "xyes"],
903                     [enable_javascript_umd_module=yes])],
904              [enable_javascript_umd_module=no])
905AM_CONDITIONAL([ENABLE_JAVASCRIPT_UMD_MODULE], [test "x$enable_javascript_umd_module" = "xyes" ])
906
907AC_ARG_ENABLE([javascript-iife-module],
908              [AS_HELP_STRING([--enable-javascript-iife-module],
909                              [Generate an IIFE style wrapper around janus.js])],
910              [AS_IF([test "x$enable_javascript_iife_module" = "xyes"],
911                     [enable_javascript_iife_module=yes])],
912              [enable_javascript_iife_module=no])
913AM_CONDITIONAL([ENABLE_JAVASCRIPT_IIFE_MODULE], [test "x$enable_javascript_iife_module" = "xyes" ])
914
915AC_ARG_ENABLE([javascript-common-js-module],
916              [AS_HELP_STRING([--enable-javascript-common-js-module],
917                              [Generate an CommonJS style module from janus.js])],
918              [AS_IF([test "x$enable_javascript_common_js_module" = "xyes"],
919                     [enable_javascript_common_js_module=yes])],
920              [enable_javascript_common_js_module=no])
921AM_CONDITIONAL([ENABLE_JAVASCRIPT_COMMON_JS_MODULE], [test "x$enable_javascript_common_js_module" = "xyes" ])
922
923case "-${enable_javascript_common_js_module}-${enable_javascript_iife_module}-${enable_javascript_umd_module}-${enable_javascript_es_module}-" in
924    *-yes*)
925        AM_CONDITIONAL([ENABLE_JAVASCRIPT_MODULES], true)
926    ;;
927    *)
928        AM_CONDITIONAL([ENABLE_JAVASCRIPT_MODULES], false)
929    ;;
930esac
931
932AC_ARG_VAR(NPM,"npm executable to use")
933AC_PATH_PROG(NPM,npm,,)
934AM_CONDITIONAL([NPM_FOUND], [test "x$NPM" != "x" ])
935AM_COND_IF([ENABLE_JAVASCRIPT_MODULES],[
936    AM_COND_IF([NPM_FOUND],,[AC_MSG_ERROR([npm not found])])
937])
938
939
940##
941# Post-processing
942##
943
944AC_ARG_ENABLE([post-processing],
945              [AS_HELP_STRING([--enable-post-processing],
946                              [Enable building post-processing utility])],
947              [],
948              [enable_post_processing=no])
949
950AS_IF([test "x$enable_post_processing" = "xyes"],
951      [PKG_CHECK_MODULES([POST_PROCESSING],
952                         [
953                           glib-2.0 >= $glib_version
954                           jansson >= $jansson_version
955                           libavutil
956                           libavcodec
957                           libavformat
958                           ogg
959                           zlib
960                         ])
961      ])
962
963PKG_CHECK_MODULES([PCAP],
964                  [libpcap],
965                  [
966                   AC_DEFINE(HAVE_LIBPCAP)
967                   enable_pcap2mjr=yes
968                  ],
969                  [
970                   enable_pcap2mjr=no
971                  ])
972AC_SUBST([PCAP_CFLAGS])
973AC_SUBST([PCAP_LIBS])
974
975AM_CONDITIONAL([WITH_SOURCE_DATE_EPOCH], [test "x$SOURCE_DATE_EPOCH" != "x"])
976AM_CONDITIONAL([ENABLE_POST_PROCESSING], [test "x$enable_post_processing" = "xyes"])
977AM_CONDITIONAL([ENABLE_PCAP2MJR], [test "x$enable_pcap2mjr" = "xyes"])
978
979AC_CONFIG_FILES([
980  Makefile
981  html/Makefile
982  docs/Makefile
983])
984
985JANUS_MANUAL_LIBS+=" -pthread"
986
987AC_OUTPUT
988
989##
990# Summary
991##
992echo
993echo "Compiler:                  $CC"
994AM_COND_IF([ENABLE_LIBSRTP_2],
995	[echo "libsrtp version:           2.x"],
996	[echo "libsrtp version:           1.5.x"])
997AM_COND_IF([ENABLE_BORINGSSL],
998	[echo "SSL/crypto library:        BoringSSL"
999	 AM_COND_IF([ENABLE_DTLS_SETTIMEOUT],
1000		[echo "DTLS set-timeout:          yes"],
1001		[echo "DTLS set-timeout:          no"])
1002	],
1003	[AM_COND_IF([LIBRESSL_DETECTED],
1004		[echo "SSL/crypto library:        LibreSSL"],
1005		[echo "SSL/crypto library:        OpenSSL"])
1006	 echo "DTLS set-timeout:          not available"])
1007AM_COND_IF([ENABLE_PTHREAD_MUTEX],
1008	[echo "Mutex implementation:      pthread mutex"],
1009	[echo "Mutex implementation:      GMutex (native futex on Linux)"])
1010AM_COND_IF([ENABLE_SCTP],
1011	[echo "DataChannels support:      yes"],
1012	[echo "DataChannels support:      no"])
1013AM_COND_IF([ENABLE_POST_PROCESSING],
1014	[echo "Recordings post-processor: yes"],
1015	[echo "Recordings post-processor: no"])
1016AM_COND_IF([ENABLE_TURN_REST_API],
1017	[echo "TURN REST API client:      yes"],
1018	[echo "TURN REST API client:      no"])
1019AM_COND_IF([ENABLE_DOCS],
1020	[echo "Doxygen documentation:     yes"],
1021	[echo "Doxygen documentation:     no"])
1022echo "Transports:"
1023AM_COND_IF([ENABLE_REST],
1024	[echo "    REST (HTTP/HTTPS):     yes"],
1025	[echo "    REST (HTTP/HTTPS):     no"])
1026AM_COND_IF([ENABLE_WEBSOCKETS],
1027	[echo "    WebSockets:            yes"],
1028	[echo "    WebSockets:            no"])
1029AM_COND_IF([ENABLE_RABBITMQ],
1030	[echo "    RabbitMQ:              yes"],
1031	[echo "    RabbitMQ:              no"])
1032AM_COND_IF([ENABLE_MQTT],
1033	[echo "    MQTT:                  yes"],
1034	[echo "    MQTT:                  no"])
1035AM_COND_IF([ENABLE_PFUNIX],
1036	[echo "    Unix Sockets:          yes"],
1037	[echo "    Unix Sockets:          no"])
1038AM_COND_IF([ENABLE_NANOMSG],
1039	[echo "    Nanomsg:               yes"],
1040	[echo "    Nanomsg:               no"])
1041echo "Plugins:"
1042AM_COND_IF([ENABLE_PLUGIN_ECHOTEST],
1043	[echo "    Echo Test:             yes"],
1044	[echo "    Echo Test:             no"])
1045AM_COND_IF([ENABLE_PLUGIN_STREAMING],
1046	[echo "    Streaming:             yes"],
1047	[echo "    Streaming:             no"])
1048AM_COND_IF([ENABLE_PLUGIN_VIDEOCALL],
1049	[echo "    Video Call:            yes"],
1050	[echo "    Video Call:            no"])
1051AM_COND_IF([ENABLE_PLUGIN_SIP],
1052	[echo "    SIP Gateway:           yes"],
1053	[echo "    SIP Gateway:           no"])
1054AM_COND_IF([ENABLE_PLUGIN_NOSIP],
1055	[echo "    NoSIP (RTP Bridge):    yes"],
1056	[echo "    NoSIP (RTP Bridge):    no"])
1057AM_COND_IF([ENABLE_PLUGIN_AUDIOBRIDGE],
1058	[echo "    Audio Bridge:          yes"],
1059	[echo "    Audio Bridge:          no"])
1060AM_COND_IF([ENABLE_PLUGIN_VIDEOROOM],
1061	[echo "    Video Room:            yes"],
1062	[echo "    Video Room:            no"])
1063AM_COND_IF([ENABLE_PLUGIN_VOICEMAIL],
1064	[echo "    Voice Mail:            yes"],
1065	[echo "    Voice Mail:            no"])
1066AM_COND_IF([ENABLE_PLUGIN_RECORDPLAY],
1067	[echo "    Record&Play:           yes"],
1068	[echo "    Record&Play:           no"])
1069AM_COND_IF([ENABLE_PLUGIN_TEXTROOM],
1070	[echo "    Text Room:             yes"],
1071	[echo "    Text Room:             no"])
1072AM_COND_IF([ENABLE_PLUGIN_LUA],
1073	[echo "    Lua Interpreter:       yes"],
1074	[echo "    Lua Interpreter:       no"])
1075AM_COND_IF([ENABLE_PLUGIN_DUKTAPE],
1076	[echo "    Duktape Interpreter:   yes"],
1077	[echo "    Duktape Interpreter:   no"])
1078echo "Event handlers:"
1079AM_COND_IF([ENABLE_SAMPLEEVH],
1080	[echo "    Sample event handler:  yes"],
1081	[echo "    Sample event handler:  no"])
1082AM_COND_IF([ENABLE_WSEVH],
1083	[echo "    WebSocket ev. handler: yes"],
1084	[echo "    WebSocket ev. handler: no"])
1085AM_COND_IF([ENABLE_RABBITMQEVH],
1086	[echo "    RabbitMQ event handler:yes"],
1087	[echo "    RabbitMQ event handler:no"])
1088AM_COND_IF([ENABLE_MQTTEVH],
1089	[echo "    MQTT event handler:    yes"],
1090	[echo "    MQTT event handler:    no"])
1091AM_COND_IF([ENABLE_NANOMSGEVH],
1092	[echo "    Nanomsg event handler: yes"],
1093	[echo "    Nanomsg event handler: no"])
1094AM_COND_IF([ENABLE_GELFEVH],
1095	[echo "    GELF event handler:    yes"],
1096	[echo "    GELF event handler:    no"])
1097echo "External loggers:"
1098AM_COND_IF([ENABLE_JSONLOGGER],
1099	[echo "    JSON file logger:      yes"],
1100	[echo "    JSON file logger:      no"])
1101AM_COND_IF([ENABLE_JAVASCRIPT_MODULES], [
1102	echo "JavaScript modules:        yes"
1103	echo "    Using npm:             $NPM"
1104	AM_COND_IF([ENABLE_JAVASCRIPT_ES_MODULE],
1105		[echo "    ES syntax:             yes"],
1106		[echo "    ES syntax:             no"])
1107	AM_COND_IF([ENABLE_JAVASCRIPT_IIFE_MODULE],
1108		[echo "    IIFE syntax:           yes"],
1109		[echo "    IIFE syntax:           no"])
1110	AM_COND_IF([ENABLE_JAVASCRIPT_UMD_MODULE],
1111		[echo "    UMD syntax:            yes"],
1112		[echo "    UMD syntax:            no"])
1113	AM_COND_IF([ENABLE_JAVASCRIPT_COMMON_JS_MODULE],
1114		[echo "    CommonJS syntax:       yes"],
1115		[echo "    CommonJS syntax:       no"])
1116	],
1117	[echo "JavaScript modules:        no"])
1118
1119echo
1120echo "If this configuration is ok for you, do a 'make' to start building Janus. A 'make install' will install Janus and its plugins to the specified prefix. Finally, a 'make configs' will install some sample configuration files too (something you'll only want to do the first time, though)."
1121echo
1122