4 AC_CONFIG_SRCDIR([agent/agent.c])
5 AC_CONFIG_HEADER([config.h])
6 AM_INIT_AUTOMAKE([-Wall])
22 # Checks for programs.
26 AC_USE_SYSTEM_EXTENSIONS
29 # Checks for compiler features
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])
44 PKG_CHECK_MODULES(OPENSSL, [openssl])
46 PKG_CHECK_MODULES(GLIB, [dnl
48 gobject-2.0 >= 2.10 dnl
49 gthread-2.0 >= 2.10 dnl
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
64 gstplugindir=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
67 AS_IF([test "$with_gstreamer" = yes], [
68 AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
75 AC_SUBST(gstplugindir)
77 AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
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"
89 AC_SUBST(CCACHE_DISABLE)