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.6.1)
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
33 LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE}
34 LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}"
35 AC_SUBST(LIBNICE_LT_LDFLAGS)
38 # Checks for programs.
41 AC_USE_SYSTEM_EXTENSIONS
45 # Checks for compiler features
51 AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
52 AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
53 AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
55 LIBNICE_CFLAGS="-Wall"
56 dnl if asked for, add -Werror if supported
57 if test "x$LIBNICE_RELEASE" != "xyes"; then
58 LIBNICE_CFLAGS="$LIBNICE_CFLAGS -Werror"
61 AC_SUBST(LIBNICE_CFLAGS)
62 AC_MSG_NOTICE([set LIBNICE_CFLAGS to $LIBNICE_CFLAGS])
64 # Checks for libraries.
65 AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
66 AC_CHECK_FUNCS([poll])
69 PKG_CHECK_MODULES(GLIB, [dnl
71 gobject-2.0 >= 2.10 dnl
72 gthread-2.0 >= 2.10 dnl
75 AC_ARG_WITH(gstreamer,
76 AC_HELP_STRING([--with-gstreamer], [use GStreamer]),
77 [with_gstreamer=${withval}],
78 [with_gstreamer=auto])
80 AS_IF([test "$with_gstreamer" != no], [
82 PKG_CHECK_MODULES(GST, [
83 gstreamer-0.10 >= 0.10.0
84 gstreamer-base-0.10 >= 0.10.0
89 gstplugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
92 AS_IF([test "$with_gstreamer" = yes], [
93 AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
100 AC_SUBST(gstplugindir)
102 AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
104 GUPNP_IGD_REQUIRED=0.1.2
106 AC_ARG_ENABLE([gupnp],
107 AC_HELP_STRING([--disable-gupnp], [Disable GUPnP IGD support]),
108 [case "${enableval}" in
109 yes) WANT_GUPNP=yes ;;
111 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gupnp) ;;
116 if test "x$WANT_GUPNP" != "xno"; then
117 PKG_CHECK_MODULES(GUPNP, gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED,
121 if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then
122 AC_ERROR([Requested GUPnP IGD, but it is not available])
125 if test "x$HAVE_GUPNP" = "xyes"; then
126 AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library])
132 AC_ARG_ENABLE([coverage],
133 [AS_HELP_STRING([--enable-coverage],
134 [build for test coverage (default disabled)])],,
135 [enable_coverage="no"])
136 AS_IF([test "${enable_coverage}" != "no"], [
137 CFLAGS="${CFLAGS} -g -O0 -fprofile-arcs -ftest-coverage"
141 AC_SUBST(CCACHE_DISABLE)
145 AC_CONFIG_MACRO_DIR(m4)