4 dnl releases only do -Wall, cvs and prerelease does -Werror too
5 dnl use a three digit version number for releases, and four for cvs/prerelease
6 AC_INIT(libnice, 0.0.8)
9 AC_CONFIG_SRCDIR([agent/agent.c])
10 AC_CONFIG_HEADER([config.h])
11 AM_INIT_AUTOMAKE([-Wall])
24 docs/reference/Makefile
25 docs/reference/libnice/Makefile
29 # Set the libtool C/A/R version info
30 # If the source code was changed, but there were no interface changes:
32 # If there was a compatible interface change:
33 # Increment CURRENT and AGE. Set REVISION to 0
34 # If there was an incompatible interface change:
35 # Increment CURRENT. Set AGE and REVISION to 0
39 LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE}
40 LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}"
41 AC_SUBST(LIBNICE_LT_LDFLAGS)
44 # Checks for programs.
47 AC_USE_SYSTEM_EXTENSIONS
51 # Checks for compiler features
57 AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
58 AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
59 AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
61 LIBNICE_CFLAGS="-Wall"
62 dnl if asked for, add -Werror if supported
63 if test "x$LIBNICE_RELEASE" != "xyes"; then
64 LIBNICE_CFLAGS="$LIBNICE_CFLAGS -Werror"
67 AC_SUBST(LIBNICE_CFLAGS)
68 AC_MSG_NOTICE([set LIBNICE_CFLAGS to $LIBNICE_CFLAGS])
70 # Checks for libraries.
71 AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
72 AC_CHECK_FUNCS([poll])
75 PKG_CHECK_MODULES(GLIB, [dnl
77 gobject-2.0 >= 2.10 dnl
78 gthread-2.0 >= 2.10 dnl
81 AC_ARG_WITH(gstreamer,
82 AC_HELP_STRING([--with-gstreamer], [use GStreamer]),
83 [with_gstreamer=${withval}],
84 [with_gstreamer=auto])
86 AS_IF([test "$with_gstreamer" != no], [
88 PKG_CHECK_MODULES(GST, [
89 gstreamer-0.10 >= 0.10.0
90 gstreamer-base-0.10 >= 0.10.0
95 gstplugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
98 AS_IF([test "$with_gstreamer" = yes], [
99 AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
106 AC_SUBST(gstplugindir)
108 AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
110 GUPNP_IGD_REQUIRED=0.1.2
112 AC_ARG_ENABLE([gupnp],
113 AC_HELP_STRING([--disable-gupnp], [Disable GUPnP IGD support]),
114 [case "${enableval}" in
115 yes) WANT_GUPNP=yes ;;
117 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gupnp) ;;
122 if test "x$WANT_GUPNP" != "xno"; then
123 PKG_CHECK_MODULES(GUPNP, gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED,
127 if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then
128 AC_ERROR([Requested GUPnP IGD, but it is not available])
131 if test "x$HAVE_GUPNP" = "xyes"; then
132 AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library])
138 AC_ARG_ENABLE([coverage],
139 [AS_HELP_STRING([--enable-coverage],
140 [build for test coverage (default disabled)])],,
141 [enable_coverage="no"])
142 AS_IF([test "${enable_coverage}" != "no"], [
143 CFLAGS="${CFLAGS} -g -O0 -fprofile-arcs -ftest-coverage"
147 AC_SUBST(CCACHE_DISABLE)
151 AC_CONFIG_MACRO_DIR(m4)