Statistics
| Branch: | Revision:

janus-gateway / configure.ac @ 3f113250

History | View | Annotate | Download (25.8 KB)

1
AC_INIT([Janus Gateway],[0.2.4],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
2
AC_CONFIG_AUX_DIR([.])
3
AC_CONFIG_MACRO_DIR([m4])
4

    
5
AC_ENABLE_SHARED(yes)
6
AC_ENABLE_STATIC(no)
7

    
8
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
case "$host_os" in
19
darwin*)
20
	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
	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
glib_version=2.34
31
ssl_version=1.0.1
32

    
33
##
34
# Janus
35
##
36

    
37
AC_ARG_ENABLE([docs],
38
              [AS_HELP_STRING([--enable-docs],
39
                              [Enable building documentation])],
40
              [],
41
              [enable_docs=no])
42

    
43
AC_ARG_ENABLE([data-channels],
44
              [AS_HELP_STRING([--disable-data-channels],
45
                              [Disable DataChannels])],
46
              [],
47
              [enable_data_channels=maybe])
48

    
49
AC_ARG_ENABLE([boringssl],
50
              [AS_HELP_STRING([--enable-boringssl],
51
                              [Use BoringSSL instead of OpenSSL])],
52
              [
53
                case "${enableval}" in
54
                  yes) boringssl_dir=/opt/boringssl ;;
55
                  no)  boringssl_dir= ;;
56
                  *) boringssl_dir=${enableval} ;;
57
                esac
58
              ],
59
              [boringssl_dir=])
60

    
61
AC_ARG_ENABLE([libsrtp2],
62
              [AS_HELP_STRING([--enable-libsrtp2],
63
                              [Use libsrtp 2.0.x instead of libsrtp 1.5.x])],
64
              [],
65
              [enable_libsrtp2=maybe])
66

    
67
AC_ARG_ENABLE([dtls-settimeout],
68
              [AS_HELP_STRING([--enable-dtls-settimeout],
69
                              [Use DTLSv1_set_initial_timeout_duration (only available in recent BoringSSL versions)])],
70
              [],
71
              [enable_dtls_settimeout=no])
72

    
73
AC_ARG_ENABLE([turn-rest-api],
74
              [AS_HELP_STRING([--disable-turn-rest-api],
75
                              [Disable TURN REST API client (via libcurl)])],
76
              [],
77
              [enable_turn_rest_api=maybe])
78

    
79
AC_ARG_ENABLE([all-plugins],
80
              [AS_HELP_STRING([--disable-all-plugins],
81
                              [Disable building all plugins (except those manually enabled)])],
82
              [
83
               AS_IF([test "x$enable_plugin_audiobridge" != "xyes"],
84
                     [enable_plugin_audiobridge=no])
85
               AS_IF([test "x$enable_plugin_echotest" != "xyes"],
86
                     [enable_plugin_echotest=no])
87
               AS_IF([test "x$enable_plugin_recordplay" != "xyes"],
88
                     [enable_plugin_recordplay=no])
89
               AS_IF([test "x$enable_plugin_sip" != "xyes"],
90
                     [enable_plugin_sip=no])
91
               AS_IF([test "x$enable_plugin_streaming" != "xyes"],
92
                     [enable_plugin_streaming=no])
93
               AS_IF([test "x$enable_plugin_textroom" != "xyes"],
94
                     [enable_plugin_textroom=no])
95
               AS_IF([test "x$enable_plugin_videocall" != "xyes"],
96
                     [enable_plugin_videocall=no])
97
               AS_IF([test "x$enable_plugin_videoroom" != "xyes"],
98
                     [enable_plugin_videoroom=no])
99
               AS_IF([test "x$enable_plugin_voicemail" != "xyes"],
100
                     [enable_plugin_voicemail=no])
101
              ],
102
              [])
103

    
104
AC_ARG_ENABLE([all-transports],
105
              [AS_HELP_STRING([--disable-all-transports],
106
                              [Disable building all transports (except those manually enabled)])],
107
              [
108
               AS_IF([test "x$enable_rest" != "xyes"],
109
                     [enable_rest=no])
110
               AS_IF([test "x$enable_websockets" != "xyes"],
111
                     [enable_websockets=no])
112
               AS_IF([test "x$enable_rabbitmq" != "xyes"],
113
                     [enable_rabbitmq=no])
114
               AS_IF([test "x$enable_mqtt" != "xyes"],
115
                     [enable_mqtt=no])
116
               AS_IF([test "x$enable_unix_sockets" != "xyes"],
117
                     [enable_unix_sockets=no])
118
              ],
119
              [])
120

    
121
AC_ARG_ENABLE([all-handlers],
122
              [AS_HELP_STRING([--disable-all-handlers],
123
                              [Disable building all event handlers (except those manually enabled)])],
124
              [
125
               AS_IF([test "x$enable_sample_event_handler" != "xyes"],
126
                     [enable_sample_event_handler=no])
127
              ],
128
              [])
129

    
130
AC_ARG_ENABLE([rest],
131
              [AS_HELP_STRING([--disable-rest],
132
                              [Disable REST (HTTP/HTTPS) support])],
133
              [AS_IF([test "x$enable_rest" != "xyes"],
134
                     [enable_rest=no])],
135
              [enable_rest=maybe])
136

    
137
AC_ARG_ENABLE([websockets],
138
              [AS_HELP_STRING([--disable-websockets],
139
                              [Disable WebSockets support])],
140
              [AS_IF([test "x$enable_websockets" != "xyes"],
141
                     [enable_websockets=no])],
142
              [enable_websockets=maybe])
143

    
144
AC_ARG_ENABLE([rabbitmq],
145
              [AS_HELP_STRING([--disable-rabbitmq],
146
                              [Disable RabbitMQ integration])],
147
              [AS_IF([test "x$enable_rabbitmq" != "xyes"],
148
                     [enable_rabbitmq=no])],
149
              [enable_rabbitmq=maybe])
150

    
151
AC_ARG_ENABLE([mqtt],
152
              [AS_HELP_STRING([--disable-mqtt],
153
                              [Disable MQTT integration])],
154
              [AS_IF([test "x$enable_mqtt" != "xyes"],
155
                     [enable_mqtt=no])],
156
              [enable_mqtt=maybe])
157

    
158
AC_ARG_ENABLE([unix-sockets],
159
              [AS_HELP_STRING([--disable-unix-sockets],
160
                              [Disable Unix Sockets integration])],
161
              [AS_IF([test "x$enable_unix_sockets" != "xyes"],
162
                     [enable_unix_sockets=no])],
163
              [enable_unix_sockets=maybe])
164

    
165
AC_ARG_ENABLE([sample-event-handler],
166
              [AS_HELP_STRING([--disable-sample-event-handler],
167
                              [Disable sample event handler (HTTP POST) ])],
168
              [AS_IF([test "x$enable_sample_event_handler" != "xyes"],
169
                     [enable_sample_event_handler=no])],
170
              [enable_sample_event_handler=maybe])
171

    
172
PKG_CHECK_MODULES([JANUS],
173
                  [
174
                    glib-2.0 >= $glib_version
175
                    nice
176
                    jansson
177
                    libssl >= $ssl_version
178
                    libcrypto
179
                  ])
180
JANUS_MANUAL_LIBS+=" -lm"
181
AC_SUBST(JANUS_MANUAL_LIBS)
182

    
183
AS_IF([test "x${boringssl_dir}" != "x"],
184
	  [echo "Trying to use BoringSSL instead of OpenSSL...";
185
	   AC_MSG_NOTICE([BoringSSL directory is ${boringssl_dir}])
186
	   CFLAGS="$CFLAGS -I${boringssl_dir}/include";
187
	   BORINGSSL_CFLAGS=" -I${boringssl_dir}/include";
188
       AC_SUBST(BORINGSSL_CFLAGS)
189
	   BORINGSSL_LIBS=" -L${boringssl_dir}/lib";
190
       AC_SUBST(BORINGSSL_LIBS)
191
	   AC_CHECK_HEADERS([${boringssl_dir}/include/openssl/opensslconf.h],
192
	                    [AC_DEFINE(HAVE_BORINGSSL)],
193
	                    [AC_MSG_ERROR([BoringSSL headers not found in ${boringssl_dir}, use --disable-boringssl if you want to use OpenSSL instead])])
194
      ])
195
AM_CONDITIONAL([ENABLE_BORINGSSL], [test "x${boringssl_dir}" != "x"])
196

    
197
AS_IF([test "x$enable_dtls_settimeout" = "xyes"],
198
      [
199
      AC_DEFINE(HAVE_DTLS_SETTIMEOUT)
200
      AC_MSG_NOTICE([Assuming DTLSv1_set_initial_timeout_duration is available])
201
      ])
202
AM_CONDITIONAL([ENABLE_DTLS_SETTIMEOUT], [test "x$enable_dtls_settimeout" = "xyes"])
203

    
204
AC_CHECK_LIB([nice],
205
             [nice_agent_set_port_range],
206
             [AC_DEFINE(HAVE_PORTRANGE)],
207
             [AC_MSG_NOTICE([libnice version does not have nice_agent_set_port_range])]
208
             )
209

    
210
AC_CHECK_LIB([nice],
211
             [nice_address_equal_no_port],
212
             [AC_DEFINE(HAVE_LIBNICE_TCP)],
213
             [AC_MSG_NOTICE([libnice version does not support TCP candidates])]
214
             )
215

    
216
AC_CHECK_LIB([dl],
217
             [dlopen],
218
             [JANUS_MANUAL_LIBS+=" -ldl"],
219
             [AC_MSG_ERROR([libdl not found.])])
220

    
221
AM_CONDITIONAL([ENABLE_LIBSRTP_2], false)
222
AS_IF([test "x$enable_libsrtp2" != "xno"],
223
      [AC_CHECK_LIB([srtp2],
224
                    [srtp_init],
225
                    [
226
                      AC_CHECK_HEADER([srtp2/srtp.h],
227
                                      [
228
                                        AC_DEFINE(HAVE_SRTP_2)
229
                                        JANUS_MANUAL_LIBS+=" -lsrtp2"
230
                                        enable_libsrtp2=yes
231
                                        AM_CONDITIONAL([ENABLE_LIBSRTP_2], true)
232
                                      ],
233
                                      [
234
                                        AS_IF([test "x$enable_libsrtp2" = "xyes"],
235
                                              [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])])
236
                                      ])
237
                    ],
238
                    [
239
                      AS_IF([test "x$enable_libsrtp2" = "xyes"],
240
                            [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])])
241
                    ])
242
      ])
243
AM_COND_IF([ENABLE_LIBSRTP_2],
244
           [],
245
           [AC_CHECK_LIB([srtp],
246
                         [srtp_init],
247
                         [
248
                           AC_CHECK_HEADER([srtp/srtp.h],
249
                                           [
250
                                             JANUS_MANUAL_LIBS+=" -lsrtp"
251
                                             enable_libsrtp2=no
252
                                             PKG_CHECK_MODULES([SRTP15X],
253
                                                               [
254
                                                                 libsrtp >= 1.5.0
255
                                                               ])
256

    
257
                                           ],
258
                                           [AC_MSG_ERROR([libsrtp and libsrtp2 headers not found. See README.md for installation instructions])])
259
                         ],
260
                         [AC_MSG_ERROR([libsrtp and libsrtp2 not found. See README.md for installation instructions])])
261
           ])
262

    
263
AC_CHECK_LIB([usrsctp],
264
             [usrsctp_finish],
265
             [
266
               AS_IF([test "x$enable_data_channels" != "xno"],
267
               [
268
                  AC_DEFINE(HAVE_SCTP)
269
                  JANUS_MANUAL_LIBS+=" -lusrsctp"
270
                  enable_data_channels=yes
271
               ])
272
             ],
273
             [
274
               AS_IF([test "x$enable_data_channels" = "xyes"],
275
                     [AC_MSG_ERROR([libusrsctp not found. See README.md for installation instructions or use --disable-data-channels])])
276
             ])
277
AM_CONDITIONAL([ENABLE_SCTP], [test "x$enable_data_channels" = "xyes"])
278

    
279
PKG_CHECK_MODULES([LIBCURL],
280
                  [libcurl],
281
                  [
282
                    AS_IF(
283
                      [test "x$enable_turn_rest_api" != "xno"],
284
                      [
285
                        AC_DEFINE(HAVE_LIBCURL)
286
                        JANUS_MANUAL_LIBS+=" -lcurl"
287
                        enable_turn_rest_api=yes
288
                      ])
289
                    AS_IF([test "x$enable_sample_event_handler" != "xno"],
290
                      [
291
                        AC_DEFINE(HAVE_SAMPLEEVH)
292
                        JANUS_MANUAL_LIBS+=" -lcurl"
293
                        enable_sample_event_handler=yes
294
                      ])
295
                  ],
296
                  [
297
                    AS_IF([test "x$enable_turn_rest_api" = "xyes"],
298
                          [AC_MSG_ERROR([libcurl not found. See README.md for installation instructions or use --disable-turn-rest-api])])
299
                    AS_IF([test "x$enable_sample_event_handler" = "xyes"],
300
                          [AC_MSG_ERROR([libcurl not found. See README.md for installation instructions or use --disable-sample-event-handler])])
301
                  ])
302
AM_CONDITIONAL([ENABLE_TURN_REST_API], [test "x$enable_turn_rest_api" = "xyes"])
303
AM_CONDITIONAL([ENABLE_SAMPLEEVH], [test "x$enable_sample_event_handler" = "xyes"])
304

    
305
AC_CHECK_PROG([DOXYGEN],
306
              [doxygen],
307
              [doxygen])
308
AC_CHECK_PROG([DOT],
309
              [dot],
310
              [dot])
311
AS_IF([test -z "$DOXYGEN" -o -z "$DOT"],
312
      [
313
        AS_IF([test "x$enable_docs" = "xyes"],
314
              [AC_MSG_ERROR([doxygen or dot not found. See README.md for installation instructions or remove --enable-docs])])
315
      ])
316
AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" = "xyes"])
317

    
318
AC_CHECK_PROG([GENGETOPT_CHECK],
319
              [gengetopt],
320
              [yes])
321
if test x"$GENGETOPT_CHECK" != x"yes" ; then
322
    AC_MSG_ERROR([Please install gengetopt before installing.])
323
fi
324

    
325

    
326
##
327
# Transports
328
##
329

    
330
PKG_CHECK_MODULES([TRANSPORTS],
331
                  [
332
                    glib-2.0 >= $glib_version
333
                    jansson
334
                  ])
335

    
336
PKG_CHECK_MODULES([MHD],
337
                  [libmicrohttpd],
338
                  [
339
                    AS_IF([test "x$enable_rest" = "xmaybe"],
340
                          [enable_rest=yes])
341
                  ],
342
                  [
343
                    AS_IF([test "x$enable_rest" = "xyes"],
344
                          [AC_MSG_ERROR([libmicrohttpd not found. See README.md for installation instructions or use --disable-rest])])
345
                  ])
346
AC_SUBST([MHD_CFLAGS])
347
AC_SUBST([MHD_LIBS])
348
AM_CONDITIONAL([ENABLE_REST], [test "x$enable_rest" = "xyes"])
349

    
350
AM_CONDITIONAL([ENABLE_WEBSOCKETS_NEWAPI], false)
351
AC_CHECK_LIB([websockets],
352
             [libwebsocket_create_context],
353
             [
354
               AS_IF([test "x$enable_websockets" != "xno"],
355
               [
356
                  AC_DEFINE(HAVE_WEBSOCKETS)
357
                  WS_MANUAL_LIBS="-lwebsockets"
358
                  enable_websockets=yes
359
               ])
360
             ],
361
             [
362
				AC_CHECK_LIB([websockets],
363
							 [lws_create_context],
364
							 [
365
							   AS_IF([test "x$enable_websockets" != "xno"],
366
							   [
367
								  AC_DEFINE(HAVE_WEBSOCKETS)
368
								  AC_DEFINE(HAVE_LIBWEBSOCKETS_NEWAPI)
369
								  AM_CONDITIONAL([ENABLE_WEBSOCKETS_NEWAPI], true)
370
								  WS_MANUAL_LIBS="-lwebsockets"
371
								  enable_websockets=yes
372
							   ])
373
							 ],
374
							 [
375
							   AS_IF([test "x$enable_websockets" = "xyes"],
376
									 [AC_MSG_ERROR([libwebsockets not found. See README.md for installation instructions or use --disable-websockets])])
377
							 ])
378
             ])
379
AM_CONDITIONAL([ENABLE_WEBSOCKETS], [test "x$enable_websockets" = "xyes"])
380
AC_SUBST(WS_MANUAL_LIBS)
381

    
382
AC_CHECK_LIB([rabbitmq],
383
             [amqp_error_string2],
384
             [
385
               AS_IF([test "x$enable_rabbitmq" != "xno"],
386
               [
387
                  AC_DEFINE(HAVE_RABBITMQ)
388
                  enable_rabbitmq=yes
389
               ])
390
             ],
391
             [
392
               AS_IF([test "x$enable_rabbitmq" = "xyes"],
393
                     [AC_MSG_ERROR([rabbitmq-c not found. See README.md for installation instructions or use --disable-rabbitmq])])
394
             ])
395
AC_CHECK_LIB([paho-mqtt3a],
396
             [MQTTAsync_create],
397
             [
398
               AS_IF([test "x$enable_mqtt" != "xno"],
399
               [
400
                  AC_DEFINE(HAVE_MQTT)
401
                  enable_mqtt=yes
402
               ])
403
             ],
404
             [
405
               AS_IF([test "x$enable_mqtt" = "xyes"],
406
                     [AC_MSG_ERROR([paho c client not found. See README.md for installation instructions or use --disable-mqtt])])
407
             ])
408
AM_CONDITIONAL([ENABLE_RABBITMQ], [test "x$enable_rabbitmq" = "xyes"])
409
AM_CONDITIONAL([ENABLE_MQTT], [test "x$enable_mqtt" = "xyes"])
410

    
411
AC_TRY_COMPILE([
412
               #include <stdlib.h>
413
               #include <sys/socket.h>
414
               #include <sys/un.h>
415
               void test() {
416
                 int pfd = socket(PF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK, 0);
417
                 if(pfd < 0)
418
                   exit(1);
419
               }],
420
               [],
421
               [
422
                 AS_IF([test "x$enable_unix_sockets" != "xno"],
423
                 [
424
                    AC_DEFINE(HAVE_PFUNIX)
425
                    enable_unix_sockets=yes
426
                 ])
427
               ],
428
               [
429
                 AS_IF([test "x$enable_unix_sockets" = "xyes"],
430
                       [AC_MSG_ERROR([SOCK_SEQPACKET not defined in your OS. Use --disable-unix-sockets])])
431
               ])
432
AM_CONDITIONAL([ENABLE_PFUNIX], [test "x$enable_unix_sockets" = "xyes"])
433

    
434

    
435
##
436
# Plugins
437
##
438

    
439
PKG_CHECK_MODULES([PLUGINS],
440
                  [
441
                    glib-2.0 >= $glib_version
442
                    jansson
443
                  ])
444

    
445
AC_ARG_ENABLE([plugin-audiobridge],
446
              [AS_HELP_STRING([--disable-plugin-audiobridge],
447
                              [Disable audiobridge plugin])],
448
              [AS_IF([test "x$enable_plugin_audiobridge" != "xyes"],
449
                     [enable_plugin_audiobridge=no])],
450
              [enable_plugin_audiobridge=maybe])
451

    
452
AC_ARG_ENABLE([plugin-echotest],
453
              [AS_HELP_STRING([--disable-plugin-echotest],
454
                              [Disable echotest plugin])],
455
              [AS_IF([test "x$enable_plugin_echotest" != "xyes"],
456
                     [enable_plugin_echotest=no])],
457
              [enable_plugin_echotest=yes])
458

    
459
AC_ARG_ENABLE([plugin-recordplay],
460
              [AS_HELP_STRING([--disable-plugin-recordplay],
461
                              [Disable record&play plugin])],
462
              [AS_IF([test "x$enable_plugin_recordplay" != "xyes"],
463
                     [enable_plugin_recordplay=no])],
464
              [enable_plugin_recordplay=yes])
465

    
466
AC_ARG_ENABLE([plugin-sip],
467
              [AS_HELP_STRING([--disable-plugin-sip],
468
                              [Disable sip plugin])],
469
              [AS_IF([test "x$enable_plugin_sip" != "xyes"],
470
                     [enable_plugin_sip=no])],
471
              [enable_plugin_sip=maybe])
472

    
473
AC_ARG_ENABLE([plugin-streaming],
474
              [AS_HELP_STRING([--disable-plugin-streaming],
475
                              [Disable streaming plugin])],
476
              [AS_IF([test "x$enable_plugin_streaming" != "xyes"],
477
                     [enable_plugin_streaming=no])],
478
              [enable_plugin_streaming=yes])
479

    
480
AC_ARG_ENABLE([plugin-textroom],
481
              [AS_HELP_STRING([--disable-plugin-textroom],
482
                              [Disable textroom plugin])],
483
              [AS_IF([test "x$enable_plugin_textroom" != "xyes"],
484
                     [enable_plugin_textroom=no])],
485
              [enable_plugin_textroom=yes])
486

    
487
AC_ARG_ENABLE([plugin-videocall],
488
              [AS_HELP_STRING([--disable-plugin-videocall],
489
                              [Disable videocall plugin])],
490
              [AS_IF([test "x$enable_plugin_videocall" != "xyes"],
491
                     [enable_plugin_videocall=no])],
492
              [enable_plugin_videocall=yes])
493

    
494
AC_ARG_ENABLE([plugin-videoroom],
495
              [AS_HELP_STRING([--disable-plugin-videoroom],
496
                              [Disable videoroom plugin])],
497
              [AS_IF([test "x$enable_plugin_videoroom" != "xyes"],
498
                     [enable_plugin_videoroom=no])],
499
              [enable_plugin_videoroom=yes])
500

    
501
AC_ARG_ENABLE([plugin-voicemail],
502
              [AS_HELP_STRING([--disable-plugin-voicemail],
503
                              [Disable voicemail plugin])],
504
              [AS_IF([test "x$enable_plugin_voicemail" != "xyes"],
505
                     [enable_plugin_voicemail=no])],
506
              [enable_plugin_voicemail=maybe])
507

    
508
PKG_CHECK_MODULES([SOFIA],
509
                  [sofia-sip-ua],
510
                  [
511
                    AS_IF([test "x$enable_plugin_sip" = "xmaybe"],
512
                          [enable_plugin_sip=yes])
513
                  ],
514
                  [
515
                    AS_IF([test "x$enable_plugin_sip" = "xyes"],
516
                          [AC_MSG_ERROR([sofia-sip-ua not found. See README.md for installation instructions or use --disable-plugin-sip])])
517
                  ])
518
AC_SUBST([SOFIA_CFLAGS])
519
AC_SUBST([SOFIA_LIBS])
520

    
521
PKG_CHECK_MODULES([OPUS],
522
                  [opus],
523
                  [
524
                    AS_IF([test "x$enable_plugin_audiobridge" = "xmaybe"],
525
                          [enable_plugin_audiobridge=yes])
526
                  ],
527
                  [
528
                    AS_IF([test "x$enable_plugin_audiobridge" = "xyes"],
529
                          [AC_MSG_ERROR([libopus not found. See README.md for installation instructions or use --disable-plugin-audiobridge])])
530
                  ])
531
AC_SUBST([OPUS_CFLAGS])
532
AC_SUBST([OPUS_LIBS])
533

    
534
PKG_CHECK_MODULES([OGG],
535
                  [ogg],
536
                  [
537
                    AS_IF([test "x$enable_plugin_voicemail" = "xmaybe"],
538
                          [enable_plugin_voicemail=yes])
539
                  ],
540
                  [
541
                    AS_IF([test "x$enable_plugin_voicemail" = "xyes"],
542
                          [AC_MSG_ERROR([libogg not found. See README.md for installation instructions or use --disable-plugin-voicemail])])
543
                  ])
544
AC_SUBST([OGG_CFLAGS])
545
AC_SUBST([OGG_LIBS])
546

    
547
AM_CONDITIONAL([ENABLE_PLUGIN_AUDIOBRIDGE], [test "x$enable_plugin_audiobridge" = "xyes"])
548
AM_CONDITIONAL([ENABLE_PLUGIN_ECHOTEST], [test "x$enable_plugin_echotest" = "xyes"])
549
AM_CONDITIONAL([ENABLE_PLUGIN_RECORDPLAY], [test "x$enable_plugin_recordplay" = "xyes"])
550
AM_CONDITIONAL([ENABLE_PLUGIN_SIP], [test "x$enable_plugin_sip" = "xyes"])
551
AM_CONDITIONAL([ENABLE_PLUGIN_STREAMING], [test "x$enable_plugin_streaming" = "xyes"])
552
AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOCALL], [test "x$enable_plugin_videocall" = "xyes"])
553
AM_CONDITIONAL([ENABLE_PLUGIN_VIDEOROOM], [test "x$enable_plugin_videoroom" = "xyes"])
554
AM_CONDITIONAL([ENABLE_PLUGIN_VOICEMAIL], [test "x$enable_plugin_voicemail" = "xyes"])
555
AM_CONDITIONAL([ENABLE_PLUGIN_TEXTROOM], [test "x$enable_plugin_textroom" = "xyes"])
556

    
557

    
558
##
559
# Event handlers
560
##
561

    
562
PKG_CHECK_MODULES([EVENTS],
563
                  [
564
                    glib-2.0 >= $glib_version
565
                    jansson
566
                  ])
567

    
568

    
569
##
570
# Post-processing
571
##
572

    
573
AC_ARG_ENABLE([post-processing],
574
              [AS_HELP_STRING([--enable-post-processing],
575
                              [Enable building post-processing utility])],
576
              [],
577
              [enable_post_processing=no])
578

    
579
AS_IF([test "x$enable_post_processing" = "xyes"],
580
      [PKG_CHECK_MODULES([POST_PROCESSING],
581
                         [
582
                           glib-2.0,
583
                           jansson,
584
                           libavutil,
585
                           libavcodec,
586
                           libavformat,
587
                           ogg
588
                         ])
589
      ])
590

    
591
AM_CONDITIONAL([ENABLE_POST_PROCESSING], [test "x$enable_post_processing" = "xyes"])
592

    
593
AC_CONFIG_FILES([
594
  Makefile
595
  html/Makefile
596
  docs/Makefile
597
])
598

    
599
JANUS_MANUAL_LIBS+=" -pthread"
600

    
601
AC_OUTPUT
602

    
603
##
604
# Summary
605
##
606
echo
607

    
608
AM_COND_IF([ENABLE_LIBSRTP_2],
609
	[echo "libsrtp version:           2.0.x"],
610
	[echo "libsrtp version:           1.5.x"])
611
AM_COND_IF([ENABLE_BORINGSSL],
612
	[echo "SSL/crypto library:        BoringSSL"
613
	 AM_COND_IF([ENABLE_DTLS_SETTIMEOUT],
614
		[echo "DTLS set-timeout:          yes"],
615
		[echo "DTLS set-timeout:          no"])
616
	],
617
	[echo "SSL/crypto library:        OpenSSL"
618
	 echo "DTLS set-timeout:          not available"])
619
AM_COND_IF([ENABLE_SCTP],
620
	[echo "DataChannels support:      yes"],
621
	[echo "DataChannels support:      no"])
622
AM_COND_IF([ENABLE_POST_PROCESSING],
623
	[echo "Recordings post-processor: yes"],
624
	[echo "Recordings post-processor: no"])
625
AM_COND_IF([ENABLE_TURN_REST_API],
626
	[echo "TURN REST API client:      yes"],
627
	[echo "TURN REST API client:      no"])
628
AM_COND_IF([ENABLE_DOCS],
629
	[echo "Doxygen documentation:     yes"],
630
	[echo "Doxygen documentation:     no"])
631
echo "Transports:"
632
AM_COND_IF([ENABLE_REST],
633
	[echo "    REST (HTTP/HTTPS):     yes"],
634
	[echo "    REST (HTTP/HTTPS):     no"])
635
AM_COND_IF([ENABLE_WEBSOCKETS],
636
	[
637
     AM_COND_IF([ENABLE_WEBSOCKETS_NEWAPI],
638
		[echo "    WebSockets:            yes (new API)"],
639
		[echo "    WebSockets:            yes (old API)"])
640
	],
641
	[echo "    WebSockets:            no"])
642
AM_COND_IF([ENABLE_RABBITMQ],
643
	[echo "    RabbitMQ:              yes"],
644
	[echo "    RabbitMQ:              no"])
645
AM_COND_IF([ENABLE_MQTT],
646
	[echo "    MQTT:                  yes"],
647
	[echo "    MQTT:                  no"])
648
AM_COND_IF([ENABLE_PFUNIX],
649
	[echo "    Unix Sockets:          yes"],
650
	[echo "    Unix Sockets:          no"])
651
echo "Plugins:"
652
AM_COND_IF([ENABLE_PLUGIN_ECHOTEST],
653
	[echo "    Echo Test:             yes"],
654
	[echo "    Echo Test:             no"])
655
AM_COND_IF([ENABLE_PLUGIN_STREAMING],
656
	[echo "    Streaming:             yes"],
657
	[echo "    Streaming:             no"])
658
AM_COND_IF([ENABLE_PLUGIN_VIDEOCALL],
659
	[echo "    Video Call:            yes"],
660
	[echo "    Video Call:            no"])
661
AM_COND_IF([ENABLE_PLUGIN_SIP],
662
	[echo "    SIP Gateway:           yes"],
663
	[echo "    SIP Gateway:           no"])
664
AM_COND_IF([ENABLE_PLUGIN_AUDIOBRIDGE],
665
	[echo "    Audio Bridge:          yes"],
666
	[echo "    Audio Bridge:          no"])
667
AM_COND_IF([ENABLE_PLUGIN_VIDEOROOM],
668
	[echo "    Video Room:            yes"],
669
	[echo "    Video Room:            no"])
670
AM_COND_IF([ENABLE_PLUGIN_VOICEMAIL],
671
	[echo "    Voice Mail:            yes"],
672
	[echo "    Voice Mail:            no"])
673
AM_COND_IF([ENABLE_PLUGIN_RECORDPLAY],
674
	[echo "    Record&Play:           yes"],
675
	[echo "    Record&Play:           no"])
676
AM_COND_IF([ENABLE_PLUGIN_TEXTROOM],
677
	[echo "    Text Room:             yes"],
678
	[echo "    Text Room:             no"])
679
echo "Event handlers:"
680
AM_COND_IF([ENABLE_SAMPLEEVH],
681
	[echo "    Sample event handler:  yes"],
682
	[echo "    Sample event handler:  no"])
683

    
684
echo
685
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)."
686
echo