Statistics
| Branch: | Revision:

janus-gateway / configure.ac @ 8241c758

History | View | Annotate | Download (21.2 KB)

1 f8a87946 Lorenzo Miniero
AC_INIT([Janus Gateway],[0.2.2],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
2 ac38cfda meetecho
AC_CONFIG_AUX_DIR([.])
3 f4fb2029 Jack Leigh
AC_CONFIG_MACRO_DIR([m4])
4
5 f3412cd6 Saúl Ibarra Corretgé
AC_ENABLE_SHARED(yes)
6
AC_ENABLE_STATIC(no)
7
8 f4fb2029 Jack Leigh
AM_INIT_AUTOMAKE([foreign subdir-objects])
9
AM_SILENT_RULES([yes])
10
11
AC_GNU_SOURCE
12
13
AC_PROG_CC
14
15
LT_PREREQ([2.2])
16
LT_INIT
17
18 b1c60d34 Yulius Tjahjadi
case "$host_os" in
19
darwin*)
20 35060af4 Akagi201
	CFLAGS="$CFLAGS -I/usr/local/opt/openssl/include -I/usr/local/include"
21
	LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/opt/local/lib -L/usr/local/libsrtp/lib"
22 b1c60d34 Yulius Tjahjadi
	AM_CONDITIONAL([DARWIN_OS], true)
23
	AM_CONDITIONAL([HAS_DTLS_WINDOW_SIZE], false)
24
;;
25
*)
26
	AM_CONDITIONAL([DARWIN_OS], false)
27
	AM_CONDITIONAL([HAS_DTLS_WINDOW_SIZE], true)
28
esac
29
30 f4fb2029 Jack Leigh
glib_version=2.32
31
ssl_version=1.0.1
32
33
##
34
# Janus
35
##
36
37
AC_ARG_ENABLE([docs],
38 23ff3c47 Lorenzo Miniero
              [AS_HELP_STRING([--enable-docs],
39
                              [Enable building documentation])],
40 f4fb2029 Jack Leigh
              [],
41 23ff3c47 Lorenzo Miniero
              [enable_docs=no])
42 f4fb2029 Jack Leigh
43 20cbbc67 meetecho
AC_ARG_ENABLE([rest],
44
              [AS_HELP_STRING([--disable-rest],
45
                              [Disable REST (HTTP/HTTPS) support])],
46
              [],
47 8ae5908e Lorenzo Miniero
              [enable_rest=maybe])
48 20cbbc67 meetecho
49 f4fb2029 Jack Leigh
AC_ARG_ENABLE([websockets],
50
              [AS_HELP_STRING([--disable-websockets],
51 ead45815 meetecho
                              [Disable WebSockets support])],
52 f4fb2029 Jack Leigh
              [],
53 8ae5908e Lorenzo Miniero
              [enable_websockets=maybe])
54 f4fb2029 Jack Leigh
55
AC_ARG_ENABLE([data-channels],
56
              [AS_HELP_STRING([--disable-data-channels],
57 ead45815 meetecho
                              [Disable DataChannels])],
58 f4fb2029 Jack Leigh
              [],
59 8ae5908e Lorenzo Miniero
              [enable_data_channels=maybe])
60 f4fb2029 Jack Leigh
61 ead45815 meetecho
AC_ARG_ENABLE([rabbitmq],
62
              [AS_HELP_STRING([--disable-rabbitmq],
63
                              [Disable RabbitMQ integration])],
64
              [],
65 8ae5908e Lorenzo Miniero
              [enable_rabbitmq=maybe])
66 ead45815 meetecho
67 899f4ef1 Andrei Nesterov
AC_ARG_ENABLE([mqtt],
68
              [AS_HELP_STRING([--disable-mqtt],
69
                              [Disable MQTT integration])],
70
              [],
71 8ae5908e Lorenzo Miniero
              [enable_mqtt=maybe])
72 899f4ef1 Andrei Nesterov
73 992bb519 Lorenzo Miniero
AC_ARG_ENABLE([unix-sockets],
74
              [AS_HELP_STRING([--disable-unix-sockets],
75
                              [Disable Unix Sockets integration])],
76
              [],
77 6ab09795 Lorenzo Miniero
              [enable_unix_sockets=maybe])
78 992bb519 Lorenzo Miniero
79 6c173b76 Lorenzo Miniero
AC_ARG_ENABLE([sample-event-handler],
80
              [AS_HELP_STRING([--disable-sample-event-handler],
81
                              [Disable sample event handler (HTTP POST) ])],
82
              [],
83 876304fe Lorenzo Miniero
              [enable_sample_event_handler=maybe])
84 6c173b76 Lorenzo Miniero
85 f4155719 Lorenzo Miniero
AC_ARG_ENABLE([boringssl],
86
              [AS_HELP_STRING([--enable-boringssl],
87
                              [Use BoringSSL instead of OpenSSL])],
88
              [],
89
              [enable_boringssl=no])
90
91 e8dca0bc Lorenzo Miniero
AC_ARG_ENABLE([libsrtp2],
92
              [AS_HELP_STRING([--enable-libsrtp2],
93
                              [Use libsrtp 2.0.x instead of libsrtp 1.5.x])],
94
              [],
95
              [enable_libsrtp2=maybe])
96
97 035764ad Lorenzo Miniero
AC_ARG_ENABLE([dtls-settimeout],
98
              [AS_HELP_STRING([--enable-dtls-settimeout],
99
                              [Use DTLSv1_set_initial_timeout_duration (only available in recent BoringSSL versions)])],
100
              [],
101
              [enable_dtls_settimeout=no])
102
103 ca9c0a86 meetecho
AC_ARG_ENABLE([turn-rest-api],
104
              [AS_HELP_STRING([--disable-turn-rest-api],
105 355bacc6 meetecho
                              [Disable TURN REST API client (via libcurl)])],
106
              [],
107 8ae5908e Lorenzo Miniero
              [enable_turn_rest_api=maybe])
108 355bacc6 meetecho
109 f4fb2029 Jack Leigh
PKG_CHECK_MODULES([JANUS],
110
                  [
111 326d60f1 Pierce Lopez
                    glib-2.0 >= $glib_version
112 f4fb2029 Jack Leigh
                    nice
113
                    jansson
114 326d60f1 Pierce Lopez
                    libssl >= $ssl_version
115 f4fb2029 Jack Leigh
                    libcrypto
116
                  ])
117 f50440e7 Lorenzo Miniero
JANUS_MANUAL_LIBS+=" -lm"
118 f4fb2029 Jack Leigh
AC_SUBST(JANUS_MANUAL_LIBS)
119
120 f4155719 Lorenzo Miniero
AS_IF([test "x$enable_boringssl" = "xyes"],
121
	  [echo "Trying to use BoringSSL instead of OpenSSL...";
122
	   CFLAGS="$CFLAGS -I/opt/boringssl/include";
123
	   BORINGSSL_CFLAGS=" -I/opt/boringssl/include";
124
       AC_SUBST(BORINGSSL_CFLAGS)
125
	   BORINGSSL_LIBS=" -L/opt/boringssl/lib";
126
       AC_SUBST(BORINGSSL_LIBS)
127 a55db376 Lorenzo Miniero
	   AC_CHECK_HEADERS([openssl/opensslconf.h],
128 f4155719 Lorenzo Miniero
	                    [],
129
	                    [AC_MSG_ERROR([BoringSSL headers not found in /opt/boringssl, use --disable-boringssl if you want to use OpenSSL instead])])
130
      ])
131
AM_CONDITIONAL([ENABLE_BORINGSSL], [test "x$enable_boringssl" = "xyes"])
132
133 035764ad Lorenzo Miniero
AS_IF([test "x$enable_dtls_settimeout" = "xyes"],
134
      [
135
      AC_DEFINE(HAVE_DTLS_SETTIMEOUT)
136
      AC_MSG_NOTICE([Assuming DTLSv1_set_initial_timeout_duration is available])
137
      ])
138
139 f4fb2029 Jack Leigh
AC_CHECK_LIB([nice],
140
             [nice_agent_set_port_range],
141
             [AC_DEFINE(HAVE_PORTRANGE)],
142 65b403f9 meetecho
             [AC_MSG_NOTICE([libnice version does not have nice_agent_set_port_range])]
143
             )
144
145
AC_CHECK_LIB([nice],
146
             [nice_address_equal_no_port],
147
             [AC_DEFINE(HAVE_LIBNICE_TCP)],
148
             [AC_MSG_NOTICE([libnice version does not support TCP candidates])]
149 f4fb2029 Jack Leigh
             )
150
151
AC_CHECK_LIB([dl],
152
             [dlopen],
153
             [JANUS_MANUAL_LIBS+=" -ldl"],
154
             [AC_MSG_ERROR([libdl not found.])])
155
156 e8dca0bc Lorenzo Miniero
AM_CONDITIONAL([ENABLE_LIBSRTP_2], false)
157
AS_IF([test "x$enable_libsrtp2" != "xno"],
158
      [AC_CHECK_LIB([srtp2],
159
                    [srtp_init],
160
                    [
161
                      AC_CHECK_HEADER([srtp2/srtp.h],
162
                                      [
163
                                        AC_DEFINE(HAVE_SRTP_2)
164
                                        JANUS_MANUAL_LIBS+=" -lsrtp2"
165
                                        enable_libsrtp2=yes
166
                                        AM_CONDITIONAL([ENABLE_LIBSRTP_2], true)
167
                                      ],
168
                                      [
169
                                        AS_IF([test "x$enable_libsrtp2" = "xyes"],
170
                                              [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])])
171
                                      ])
172
                    ],
173
                    [
174
                      AS_IF([test "x$enable_libsrtp2" = "xyes"],
175
                            [AC_MSG_ERROR([libsrtp2 not found. See README.md for installation instructions or use --disable-libsrtp-2 to try and autodetect libsrtp 1.5.x instead])])
176
                    ])
177
      ])
178
AM_COND_IF([ENABLE_LIBSRTP_2],
179
           [],
180
           [AC_CHECK_LIB([srtp],
181
                         [srtp_init],
182
                         [
183
                           AC_CHECK_HEADER([srtp/srtp.h],
184
                                           [
185
                                             JANUS_MANUAL_LIBS+=" -lsrtp"
186
                                             enable_libsrtp2=no
187
                                           ],
188
                                           [AC_MSG_ERROR([libsrtp and libsrtp2 headers not found. See README.md for installation instructions])])
189
                         ],
190
                         [AC_MSG_ERROR([libsrtp and libsrtp2 not found. See README.md for installation instructions])])
191
           ])
192 f4fb2029 Jack Leigh
193
AC_CHECK_LIB([usrsctp],
194
             [usrsctp_finish],
195
             [
196 8ae5908e Lorenzo Miniero
               AS_IF([test "x$enable_data_channels" != "xno"],
197 0edc8785 Nicholas Wylie
               [
198
                  AC_DEFINE(HAVE_SCTP)
199
                  JANUS_MANUAL_LIBS+=" -lusrsctp"
200 8ae5908e Lorenzo Miniero
                  enable_data_channels=yes
201 0edc8785 Nicholas Wylie
               ])
202 f4fb2029 Jack Leigh
             ],
203
             [
204
               AS_IF([test "x$enable_data_channels" = "xyes"],
205 ead45815 meetecho
                     [AC_MSG_ERROR([libusrsctp not found. See README.md for installation instructions or use --disable-data-channels])])
206
             ])
207 1e2f5d89 meetecho
AM_CONDITIONAL([ENABLE_SCTP], [test "x$enable_data_channels" = "xyes"])
208 ead45815 meetecho
209 355bacc6 meetecho
PKG_CHECK_MODULES([LIBCURL],
210
                  [libcurl],
211
                  [
212 ca9c0a86 meetecho
                    AS_IF(
213 8ae5908e Lorenzo Miniero
                      [test "x$enable_turn_rest_api" != "xno"],
214 ca9c0a86 meetecho
                      [
215
                        AC_DEFINE(HAVE_LIBCURL)
216
                        JANUS_MANUAL_LIBS+=" -lcurl"
217
                        enable_turn_rest_api=yes
218
                      ])
219 876304fe Lorenzo Miniero
                    AS_IF([test "x$enable_sample_event_handler" != "xno"],
220 6c173b76 Lorenzo Miniero
                      [
221 876304fe Lorenzo Miniero
                        AC_DEFINE(HAVE_SAMPLEEVH)
222
                        JANUS_MANUAL_LIBS+=" -lcurl"
223
                        enable_sample_event_handler=yes
224 6c173b76 Lorenzo Miniero
                      ])
225 355bacc6 meetecho
                  ],
226
                  [
227 8ae5908e Lorenzo Miniero
                    AS_IF([test "x$enable_turn_rest_api" = "xyes"],
228
                          [AC_MSG_ERROR([libcurl not found not found. See README.md for installation instructions or use --disable-turn-rest-api])])
229 876304fe Lorenzo Miniero
                    AS_IF([test "x$enable_sample_event_handler" = "xyes"],
230
                          [AC_MSG_ERROR([libcurl not found not found. See README.md for installation instructions or use --disable-sample-event-handler])])
231 355bacc6 meetecho
                  ])
232
AM_CONDITIONAL([ENABLE_TURN_REST_API], [test "x$enable_turn_rest_api" = "xyes"])
233 876304fe Lorenzo Miniero
AM_CONDITIONAL([ENABLE_SAMPLEEVH], [test "x$enable_sample_event_handler" = "xyes"])
234 355bacc6 meetecho
235 f4fb2029 Jack Leigh
AC_CHECK_PROG([DOXYGEN],
236
              [doxygen],
237
              [doxygen])
238
AC_CHECK_PROG([DOT],
239
              [dot],
240
              [dot])
241
AS_IF([test -z "$DOXYGEN" -o -z "$DOT"],
242
      [
243
        AS_IF([test "x$enable_docs" = "xyes"],
244 23ff3c47 Lorenzo Miniero
              [AC_MSG_ERROR([doxygen or dot not found. See README.md for installation instructions or remove --enable-docs])])
245 f4fb2029 Jack Leigh
      ])
246
AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" = "xyes"])
247
248 9f7982de meetecho
AC_CHECK_PROG([GENGETOPT_CHECK],
249
              [gengetopt],
250
              [yes])
251 b3060180 meetecho
if test x"$GENGETOPT_CHECK" != x"yes" ; then
252
    AC_MSG_ERROR([Please install gengetopt before installing.])
253
fi
254
255 20cbbc67 meetecho
256
##
257
# Transports
258
##
259
260
PKG_CHECK_MODULES([TRANSPORTS],
261
                  [
262 326d60f1 Pierce Lopez
                    glib-2.0 >= $glib_version
263 20cbbc67 meetecho
                    jansson
264
                  ])
265
266
PKG_CHECK_MODULES([MHD],
267
                  [libmicrohttpd],
268 8ae5908e Lorenzo Miniero
                  [
269
                    AS_IF([test "x$enable_rest" = "xmaybe"],
270
                          [enable_rest=yes])
271
                  ],
272 20cbbc67 meetecho
                  [
273 a11bf4b7 Lorenzo Miniero
                    AS_IF([test "x$enable_rest" = "xyes"],
274
                          [AC_MSG_ERROR([libmicrohttpd not found. See README.md for installation instructions or use --disable-rest])])
275 20cbbc67 meetecho
                  ])
276 825cd223 Lorenzo Miniero
AC_SUBST([MHD_CFLAGS])
277
AC_SUBST([MHD_LIBS])
278 20cbbc67 meetecho
AM_CONDITIONAL([ENABLE_REST], [test "x$enable_rest" = "xyes"])
279
280 d5083f3a Lorenzo Miniero
AM_CONDITIONAL([ENABLE_WEBSOCKETS_NEWAPI], false)
281 b09c9a64 Lorenzo Miniero
AC_CHECK_LIB([websockets],
282 ce45589d Lorenzo Miniero
             [libwebsocket_create_context],
283 20cbbc67 meetecho
             [
284 8ae5908e Lorenzo Miniero
               AS_IF([test "x$enable_websockets" != "xno"],
285 20cbbc67 meetecho
               [
286
                  AC_DEFINE(HAVE_WEBSOCKETS)
287 b09c9a64 Lorenzo Miniero
                  WS_MANUAL_LIBS="-lwebsockets"
288 8ae5908e Lorenzo Miniero
                  enable_websockets=yes
289 20cbbc67 meetecho
               ])
290
             ],
291
             [
292
				AC_CHECK_LIB([websockets],
293 ce45589d Lorenzo Miniero
							 [lws_create_context],
294 20cbbc67 meetecho
							 [
295 8ae5908e Lorenzo Miniero
							   AS_IF([test "x$enable_websockets" != "xno"],
296 20cbbc67 meetecho
							   [
297
								  AC_DEFINE(HAVE_WEBSOCKETS)
298 fb18f764 Lorenzo Miniero
								  AC_DEFINE(HAVE_LIBWEBSOCKETS_NEWAPI)
299 ce45589d Lorenzo Miniero
								  AM_CONDITIONAL([ENABLE_WEBSOCKETS_NEWAPI], true)
300 a87dc897 meetecho
								  WS_MANUAL_LIBS="-lwebsockets"
301 8ae5908e Lorenzo Miniero
								  enable_websockets=yes
302 20cbbc67 meetecho
							   ])
303
							 ],
304
							 [
305
							   AS_IF([test "x$enable_websockets" = "xyes"],
306
									 [AC_MSG_ERROR([libwebsockets not found. See README.md for installation instructions or use --disable-websockets])])
307
							 ])
308
             ])
309
AM_CONDITIONAL([ENABLE_WEBSOCKETS], [test "x$enable_websockets" = "xyes"])
310 a87dc897 meetecho
AC_SUBST(WS_MANUAL_LIBS)
311 20cbbc67 meetecho
312
AC_CHECK_LIB([rabbitmq],
313
             [amqp_error_string2],
314
             [
315 8ae5908e Lorenzo Miniero
               AS_IF([test "x$enable_rabbitmq" != "xno"],
316 20cbbc67 meetecho
               [
317
                  AC_DEFINE(HAVE_RABBITMQ)
318 8ae5908e Lorenzo Miniero
                  enable_rabbitmq=yes
319 20cbbc67 meetecho
               ])
320
             ],
321
             [
322
               AS_IF([test "x$enable_rabbitmq" = "xyes"],
323
                     [AC_MSG_ERROR([rabbitmq-c not found. See README.md for installation instructions or use --disable-rabbitmq])])
324
             ])
325 899f4ef1 Andrei Nesterov
AC_CHECK_LIB([paho-mqtt3a],
326
             [MQTTAsync_create],
327
             [
328 8ae5908e Lorenzo Miniero
               AS_IF([test "x$enable_mqtt" != "xno"],
329 899f4ef1 Andrei Nesterov
               [
330
                  AC_DEFINE(HAVE_MQTT)
331 8ae5908e Lorenzo Miniero
                  enable_mqtt=yes
332 899f4ef1 Andrei Nesterov
               ])
333
             ],
334
             [
335
               AS_IF([test "x$enable_mqtt" = "xyes"],
336
                     [AC_MSG_ERROR([paho c client not found. See README.md for installation instructions or use --disable-mqtt])])
337
             ])
338 20cbbc67 meetecho
AM_CONDITIONAL([ENABLE_RABBITMQ], [test "x$enable_rabbitmq" = "xyes"])
339 899f4ef1 Andrei Nesterov
AM_CONDITIONAL([ENABLE_MQTT], [test "x$enable_mqtt" = "xyes"])
340 20cbbc67 meetecho
341 8ca4358f Lorenzo Miniero
AC_TRY_COMPILE([
342
               #include <stdlib.h>
343
               #include <sys/socket.h>
344
               #include <sys/un.h>
345
               void test() {
346
                 int pfd = socket(PF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK, 0);
347
                 if(pfd < 0)
348
                   exit(1);
349
               }],
350
               [],
351
               [
352 6ab09795 Lorenzo Miniero
                 AS_IF([test "x$enable_unix_sockets" != "xno"],
353 8ca4358f Lorenzo Miniero
                 [
354
                    AC_DEFINE(HAVE_PFUNIX)
355 6ab09795 Lorenzo Miniero
                    enable_unix_sockets=yes
356 8ca4358f Lorenzo Miniero
                 ])
357
               ],
358
               [
359 6ab09795 Lorenzo Miniero
                 AS_IF([test "x$enable_unix_sockets" = "xyes"],
360 8ca4358f Lorenzo Miniero
                       [AC_MSG_ERROR([SOCK_SEQPACKET not defined in your OS. Use --disable-unix-sockets])])
361
               ])
362 6ab09795 Lorenzo Miniero
AM_CONDITIONAL([ENABLE_PFUNIX], [test "x$enable_unix_sockets" = "xyes"])
363 992bb519 Lorenzo Miniero
364 20cbbc67 meetecho
365 f4fb2029 Jack Leigh
##
366
# Plugins
367
##
368
369
PKG_CHECK_MODULES([PLUGINS],
370
                  [
371 326d60f1 Pierce Lopez
                    glib-2.0 >= $glib_version
372 c94052c2 meetecho
                    jansson
373 f4fb2029 Jack Leigh
                  ])
374
375
AC_ARG_ENABLE([plugin-audiobridge],
376
              [AS_HELP_STRING([--disable-plugin-audiobridge],
377
                              [Disable audiobridge plugin])],
378
              [],
379 8ae5908e Lorenzo Miniero
              [enable_plugin_audiobridge=maybe])
380 f4fb2029 Jack Leigh
381
AC_ARG_ENABLE([plugin-echotest],
382
              [AS_HELP_STRING([--disable-plugin-echotest],
383
                              [Disable echotest plugin])],
384
              [],
385
              [enable_plugin_echotest=yes])
386
387 5fa9a305 meetecho
AC_ARG_ENABLE([plugin-recordplay],
388
              [AS_HELP_STRING([--disable-plugin-recordplay],
389
                              [Disable record&play plugin])],
390
              [],
391
              [enable_plugin_recordplay=yes])
392
393 f4fb2029 Jack Leigh
AC_ARG_ENABLE([plugin-sip],
394
              [AS_HELP_STRING([--disable-plugin-sip],
395
                              [Disable sip plugin])],
396
              [],
397 8ae5908e Lorenzo Miniero
              [enable_plugin_sip=maybe])
398 f4fb2029 Jack Leigh
399
AC_ARG_ENABLE([plugin-streaming],
400
              [AS_HELP_STRING([--disable-plugin-streaming],
401
                              [Disable streaming plugin])],
402
              [],
403
              [enable_plugin_streaming=yes])
404
405
AC_ARG_ENABLE([plugin-videocall],
406
              [AS_HELP_STRING([--disable-plugin-videocall],
407
                              [Disable videocall plugin])],
408
              [],
409
              [enable_plugin_videocall=yes])
410
411
AC_ARG_ENABLE([plugin-videoroom],
412
              [AS_HELP_STRING([--disable-plugin-videoroom],
413
                              [Disable videoroom plugin])],
414
              [],
415
              [enable_plugin_videoroom=yes])
416
417
AC_ARG_ENABLE([plugin-voicemail],
418
              [AS_HELP_STRING([--disable-plugin-voicemail],
419
                              [Disable voicemail plugin])],
420
              [],
421 8ae5908e Lorenzo Miniero
              [enable_plugin_voicemail=maybe])
422 f4fb2029 Jack Leigh
423 3ce5c996 Lorenzo Miniero
AC_ARG_ENABLE([plugin-textroom],
424
              [AS_HELP_STRING([--disable-plugin-textroom],
425
                              [Disable textroom plugin])],
426
              [],
427
              [enable_plugin_textroom=yes])
428
429 825cd223 Lorenzo Miniero
PKG_CHECK_MODULES([SOFIA],
430
                  [sofia-sip-ua],
431
                  [
432 8ae5908e Lorenzo Miniero
                    AS_IF([test "x$enable_plugin_sip" = "xmaybe"],
433
                          [enable_plugin_sip=yes])
434
                  ],
435
                  [
436
                    AS_IF([test "x$enable_plugin_sip" = "xyes"],
437
                          [AC_MSG_ERROR([sofia-sip-ua not found not found. See README.md for installation instructions or use --disable-plugin-sip])])
438 825cd223 Lorenzo Miniero
                  ])
439
AC_SUBST([SOFIA_CFLAGS])
440
AC_SUBST([SOFIA_LIBS])
441
442 f4fb2029 Jack Leigh
PKG_CHECK_MODULES([OPUS],
443
                  [opus],
444
                  [
445 8ae5908e Lorenzo Miniero
                    AS_IF([test "x$enable_plugin_audiobridge" = "xmaybe"],
446
                          [enable_plugin_audiobridge=yes])
447
                  ],
448
                  [
449
                    AS_IF([test "x$enable_plugin_audiobridge" = "xyes"],
450
                          [AC_MSG_ERROR([libopus not found not found. See README.md for installation instructions or use --disable-plugin-audiobridge])])
451 f4fb2029 Jack Leigh
                  ])
452 825cd223 Lorenzo Miniero
AC_SUBST([OPUS_CFLAGS])
453
AC_SUBST([OPUS_LIBS])
454 f4fb2029 Jack Leigh
455
PKG_CHECK_MODULES([OGG],
456
                  [ogg],
457
                  [
458 8ae5908e Lorenzo Miniero
                    AS_IF([test "x$enable_plugin_voicemail" = "xmaybe"],
459
                          [enable_plugin_voicemail=yes])
460
                  ],
461
                  [
462
                    AS_IF([test "x$enable_plugin_voicemail" = "xyes"],
463
                          [AC_MSG_ERROR([libogg not found not found. See README.md for installation instructions or use --disable-plugin-voicemail])])
464 f4fb2029 Jack Leigh
                  ])
465 825cd223 Lorenzo Miniero
AC_SUBST([OGG_CFLAGS])
466
AC_SUBST([OGG_LIBS])
467 f4fb2029 Jack Leigh
468
AM_CONDITIONAL([ENABLE_PLUGIN_AUDIOBRIDGE], [test "x$enable_plugin_audiobridge" = "xyes"])
469
AM_CONDITIONAL([ENABLE_PLUGIN_ECHOTEST], [test "x$enable_plugin_echotest" = "xyes"])
470 5fa9a305 meetecho
AM_CONDITIONAL([ENABLE_PLUGIN_RECORDPLAY], [test "x$enable_plugin_recordplay" = "xyes"])
471 f4fb2029 Jack Leigh
AM_CONDITIONAL([ENABLE_PLUGIN_SIP], [test "x$enable_plugin_sip" = "xyes"])
472
AM_CONDITIONAL([ENABLE_PLUGIN_STREAMING], [test "x$enable_plugin_streaming" = "xyes"])
473
AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOCALL], [test "x$enable_plugin_videocall" = "xyes"])
474
AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOROOM], [test "x$enable_plugin_videoroom" = "xyes"])
475
AM_CONDITIONAL([ENABLE_PLUGIN_VOICEMAIL], [test "x$enable_plugin_voicemail" = "xyes"])
476 3ce5c996 Lorenzo Miniero
AM_CONDITIONAL([ENABLE_PLUGIN_TEXTROOM], [test "x$enable_plugin_textroom" = "xyes"])
477 f4fb2029 Jack Leigh
478 6c173b76 Lorenzo Miniero
479
##
480
# Event handlers
481
##
482
483
PKG_CHECK_MODULES([EVENTS],
484
                  [
485
                    glib-2.0 >= $glib_version
486
                    jansson
487
                  ])
488
489
490 f4fb2029 Jack Leigh
##
491
# Post-processing
492
##
493
494
AC_ARG_ENABLE([post-processing],
495
              [AS_HELP_STRING([--enable-post-processing],
496
                              [Enable building post-processing utility])],
497
              [],
498
              [enable_post_processing=no])
499
500
AS_IF([test "x$enable_post_processing" = "xyes"],
501
      [PKG_CHECK_MODULES([POST_PROCESSING],
502
                         [
503
                           glib-2.0,
504 20cbbc67 meetecho
                           jansson,
505 f4fb2029 Jack Leigh
                           libavutil,
506
                           libavcodec,
507
                           libavformat,
508
                           ogg
509
                         ])
510
      ])
511
512
AM_CONDITIONAL([ENABLE_POST_PROCESSING], [test "x$enable_post_processing" = "xyes"])
513
514
AC_CONFIG_FILES([
515
  Makefile
516 ea61ba1b meetecho
  html/Makefile
517 f4fb2029 Jack Leigh
  docs/Makefile
518
])
519
520 1281ca86 meetecho
JANUS_MANUAL_LIBS+=" -pthread"
521
522 f4fb2029 Jack Leigh
AC_OUTPUT
523 1e2f5d89 meetecho
524
##
525
# Summary
526
##
527
echo
528
529 e8dca0bc Lorenzo Miniero
AM_COND_IF([ENABLE_LIBSRTP_2],
530
	[echo "libsrtp version:           2.0.x"],
531
	[echo "libsrtp version:           1.5.x"])
532
AM_COND_IF([ENABLE_BORINGSSL],
533
	[echo "SSL/crypto library:        BoringSSL"],
534
	[echo "SSL/crypto library:        OpenSSL"])
535 1e2f5d89 meetecho
AM_COND_IF([ENABLE_SCTP],
536
	[echo "DataChannels support:      yes"],
537
	[echo "DataChannels support:      no"])
538
AM_COND_IF([ENABLE_POST_PROCESSING],
539
	[echo "Recordings post-processor: yes"],
540
	[echo "Recordings post-processor: no"])
541 355bacc6 meetecho
AM_COND_IF([ENABLE_TURN_REST_API],
542
	[echo "TURN REST API client:      yes"],
543
	[echo "TURN REST API client:      no"])
544 1e2f5d89 meetecho
AM_COND_IF([ENABLE_DOCS],
545
	[echo "Doxygen documentation:     yes"],
546
	[echo "Doxygen documentation:     no"])
547 20cbbc67 meetecho
echo "Transports:"
548
AM_COND_IF([ENABLE_REST],
549
	[echo "    REST (HTTP/HTTPS):     yes"],
550
	[echo "    REST (HTTP/HTTPS):     no"])
551
AM_COND_IF([ENABLE_WEBSOCKETS],
552 ce45589d Lorenzo Miniero
	[
553
     AM_COND_IF([ENABLE_WEBSOCKETS_NEWAPI],
554
		[echo "    WebSockets:            yes (new API)"],
555
		[echo "    WebSockets:            yes (old API)"])
556
	],
557 20cbbc67 meetecho
	[echo "    WebSockets:            no"])
558
AM_COND_IF([ENABLE_RABBITMQ],
559
	[echo "    RabbitMQ:              yes"],
560
	[echo "    RabbitMQ:              no"])
561 899f4ef1 Andrei Nesterov
AM_COND_IF([ENABLE_MQTT],
562
	[echo "    MQTT:                  yes"],
563
	[echo "    MQTT:                  no"])
564 992bb519 Lorenzo Miniero
AM_COND_IF([ENABLE_PFUNIX],
565
	[echo "    Unix Sockets:          yes"],
566
	[echo "    Unix Sockets:          no"])
567 1e2f5d89 meetecho
echo "Plugins:"
568
AM_COND_IF([ENABLE_PLUGIN_ECHOTEST],
569
	[echo "    Echo Test:             yes"],
570
	[echo "    Echo Test:             no"])
571
AM_COND_IF([ENABLE_PLUGIN_STREAMING],
572
	[echo "    Streaming:             yes"],
573
	[echo "    Streaming:             no"])
574
AM_COND_IF([ENABLE_PLUGIN_VIDEOCALL],
575
	[echo "    Video Call:            yes"],
576
	[echo "    Video Call:            no"])
577
AM_COND_IF([ENABLE_PLUGIN_SIP],
578
	[echo "    SIP Gateway:           yes"],
579
	[echo "    SIP Gateway:           no"])
580
AM_COND_IF([ENABLE_PLUGIN_AUDIOBRIDGE],
581
	[echo "    Audio Bridge:          yes"],
582
	[echo "    Audio Bridge:          no"])
583
AM_COND_IF([ENABLE_PLUGIN_VIDEOROOM],
584
	[echo "    Video Room:            yes"],
585
	[echo "    Video Room:            no"])
586
AM_COND_IF([ENABLE_PLUGIN_VOICEMAIL],
587
	[echo "    Voice Mail:            yes"],
588
	[echo "    Voice Mail:            no"])
589
AM_COND_IF([ENABLE_PLUGIN_RECORDPLAY],
590
	[echo "    Record&Play:           yes"],
591
	[echo "    Record&Play:           no"])
592 3ce5c996 Lorenzo Miniero
AM_COND_IF([ENABLE_PLUGIN_TEXTROOM],
593
	[echo "    Text Room:             yes"],
594
	[echo "    Text Room:             no"])
595 6c173b76 Lorenzo Miniero
echo "Event handlers:"
596
AM_COND_IF([ENABLE_SAMPLEEVH],
597
	[echo "    Sample event handler:  yes"],
598
	[echo "    Sample event handler:  no"])
599 1e2f5d89 meetecho
600
echo
601 20cbbc67 meetecho
echo "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)."
602 1e2f5d89 meetecho
echo