Don't test role conflict in thread test yet
[sipe-libnice.git] / configure.ac
blob50dd0e40e90ed4a2a9d5a387b7d3b37700d2dc03
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         local/Makefile
15         udp/Makefile
16         nice/Makefile
17         nice/nice.pc
18         random/Makefile
19         gst/Makefile
20         ])
22 # Checks for programs.
24 AC_PROG_CC
25 dnl AC_PROG_CC_C99
26 AC_USE_SYSTEM_EXTENSIONS
27 AC_PROG_LIBTOOL
29 # Checks for compiler features
31 AC_C_RESTRICT
32 AC_C_VARARRAYS
33 AC_HEADER_ASSERT
34 AC_HEADER_STDBOOL
35 AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
36 AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
37 AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
39 # Checks for libraries.
40 AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
41 AC_CHECK_FUNCS([poll])
42 AC_SUBST(LIBRT)
44 PKG_CHECK_MODULES(OPENSSL, [openssl])
46 PKG_CHECK_MODULES(GLIB, [dnl
47         glib-2.0 >= 2.10 dnl
48         gobject-2.0 >= 2.10 dnl
49         gthread-2.0 >= 2.10 dnl
50         ])
52 AC_ARG_WITH(gstreamer, 
53         AC_HELP_STRING([--with-gstreamer], [use GStreamer]),
54         [with_gstreamer=${withval}],
55         [with_gstreamer=auto])
57 AS_IF([test "$with_gstreamer" != no], [
58         PKG_CHECK_MODULES(GST, [
59                 gstreamer-0.10 >= 0.10.0
60                 gstreamer-base-0.10 >= 0.10.0
61                 ],
62                 [
63                 with_gstreamer=yes
64                 gstplugindir=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
65                 ],
66                 [
67                 AS_IF([test "$with_gstreamer" = yes], [
68                         AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
69                 ])
71                 with_gstreamer=no
72                 ])
75 AC_SUBST(gstplugindir)
77 AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
79 dnl Test coverage
80 AC_ARG_ENABLE([coverage],
81         [AS_HELP_STRING([--enable-coverage],
82                 [build for test coverage (default disabled)])],,
83         [enable_coverage="no"])
84 AS_IF([test "${enable_coverage}" != "no"], [
85         CFLAGS="${CFLAGS} -g -O0 -fprofile-arcs -ftest-coverage"
86         LDFLAGS="-lgcov"
87         CCACHE_DISABLE=1
89 AC_SUBST(CCACHE_DISABLE)
92 AC_OUTPUT