Save the to/from addresses and put them in newly created buffers
[sipe-libnice.git] / configure.ac
blobc3154e42df0c5ca53556bdb1a15691db190490d7
2 AC_PREREQ(2.59c)
3 AC_INIT(nice, 0.0.1)
4 AC_CONFIG_SRCDIR([agent/agent.c])
5 AC_CONFIG_HEADER([config.h])
6 AM_INIT_AUTOMAKE([-Wall])
7 AC_CONFIG_FILES([
8         Makefile
9         address/Makefile
10         agent/Makefile
11         tests/Makefile
12         stun/Makefile
13         stun/tests/Makefile
14         stun/tools/Makefile
15         local/Makefile
16         udp/Makefile
17         nice/Makefile
18         nice/nice.pc
19         random/Makefile
20         gst/Makefile
21         ])
23 # Checks for programs.
25 AC_PROG_CC
26 dnl AC_PROG_CC_C99
27 AC_USE_SYSTEM_EXTENSIONS
28 AC_PROG_LIBTOOL
30 # Checks for compiler features
32 AC_C_RESTRICT
33 AC_C_VARARRAYS
34 AC_HEADER_ASSERT
35 AC_HEADER_STDBOOL
36 AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
37 AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
38 AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
40 # Checks for libraries.
41 AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
42 AC_CHECK_FUNCS([poll])
43 AC_SUBST(LIBRT)
45 PKG_CHECK_MODULES(OPENSSL, [openssl])
47 PKG_CHECK_MODULES(GLIB, [dnl
48         glib-2.0 >= 2.10 dnl
49         gobject-2.0 >= 2.10 dnl
50         gthread-2.0 >= 2.10 dnl
51         ])
53 AC_ARG_WITH(gstreamer, 
54         AC_HELP_STRING([--with-gstreamer], [use GStreamer]),
55         [with_gstreamer=${withval}],
56         [with_gstreamer=auto])
58 AS_IF([test "$with_gstreamer" != no], [
59         PKG_CHECK_MODULES(GST, [
60                 gstreamer-0.10 >= 0.10.0
61                 gstreamer-base-0.10 >= 0.10.0
62                 gstreamer-netbuffer-0.10 >= 0.10.0
63                 ],
64                 [
65                 with_gstreamer=yes
66                 gstplugindir=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
67                 ],
68                 [
69                 AS_IF([test "$with_gstreamer" = yes], [
70                         AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
71                 ])
73                 with_gstreamer=no
74                 ])
77 AC_SUBST(gstplugindir)
79 AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
81 dnl Test coverage
82 AC_ARG_ENABLE([coverage],
83         [AS_HELP_STRING([--enable-coverage],
84                 [build for test coverage (default disabled)])],,
85         [enable_coverage="no"])
86 AS_IF([test "${enable_coverage}" != "no"], [
87         CFLAGS="${CFLAGS} -g -O0 -fprofile-arcs -ftest-coverage"
88         LDFLAGS="-lgcov"
89         CCACHE_DISABLE=1
91 AC_SUBST(CCACHE_DISABLE)
94 AC_OUTPUT