-I $(top_srcdir)/socket \
-I $(top_srcdir)/stun
+if USE_DLOG
+ AM_CFLAGS += $(DLOG_CFLAGS) -DUSE_DLOG
+endif
+
if WINDOWS
AM_CFLAGS += -DWINVER=0x0501 # _WIN32_WINNT_WINXP
endif
$(top_builddir)/socket/libsocket.la \
$(top_builddir)/stun/libstun.la
+if USE_DLOG
+ libagent_la_LIBADD += $(DLOG_LIBS)
+endif
+
if WINDOWS
libagent_la_LIBADD += -liphlpapi -lws2_32
endif
#include "agent.h"
+#if defined(USE_DLOG)
+#include <dlog.h>
+#undef LOG_TAG
+#define LOG_TAG "LIBNICE_AGENT"
+#endif
+
/**
* NiceInputMessageIter:
* @message: index of the message currently being written into
#else
gboolean nice_debug_is_enabled (void);
gboolean nice_debug_is_verbose (void);
+#ifdef USE_DLOG
+#define nice_debug(fmt, arg...) \
+ do { if (nice_debug_is_enabled ()) LOGD (fmt, ##arg); } while (0)
+#else
void nice_debug (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
+#endif /* USE_DLOG */
void nice_debug_verbose (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
-#endif
+#endif /* NDEBUG */
#if !GLIB_CHECK_VERSION(2, 59, 0)
#if __GNUC__ > 6
}
#ifndef NDEBUG
+#ifndef USE_DLOG
void nice_debug (const char *fmt, ...)
{
va_list ap;
va_end (ap);
}
}
+#endif
void nice_debug_verbose (const char *fmt, ...)
{
va_list ap;
[Define if static plugins should be built])
fi
AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
+dnl end
+
+dnl Check for dlog
+AC_ARG_ENABLE(dlog, AC_HELP_STRING([--enable-dlog], [using dlog]),
+[
+ case "${enableval}" in
+ yes) USE_DLOG=yes ;;
+ no) USE_DLOG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-dlog) ;;
+ esac
+],[USE_DLOG=no])
+
+if test "x$USE_DLOG" = "xyes"; then
+ PKG_CHECK_MODULES(DLOG, dlog)
+ AC_SUBST(DLOG_CFLAGS)
+ AC_SUBST(DLOG_LIBS)
+fi
+AM_CONDITIONAL(USE_DLOG, test "x$USE_DLOG" = "xyes")
+dnl end
case $host_os in
solaris*)
Name: libnice
Summary: Library for implementing Interactive Connectivity Establishment (ICE) standard (RFC 5245 & RFC 8445)
Version: 0.1.17
-Release: 0
+Release: 1
Group: Multimedia/Libraries
License: LGPL-2.1
Source0: %{name}-%{version}.tar.gz
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
BuildRequires: pkgconfig(openssl1.1)
+BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(gstreamer-1.0)
%define gst_branch 1.0
--disable-static \
--disable-gtk-doc \
--disable-gtk-doc-html \
- --disable-gtk-doc-pdf
+ --disable-gtk-doc-pdf \
+ --enable-dlog
make %{?jobs:-j%jobs}
-I $(top_srcdir)/agent \
-I $(top_srcdir)/
+if USE_DLOG
+ AM_CFLAGS += $(DLOG_CFLAGS) -DUSE_DLOG
+endif
+
noinst_LTLIBRARIES = libsocket.la
libsocket_la_SOURCES = \
udp-turn-over-tcp.h \
udp-turn-over-tcp.c
+if USE_DLOG
+ libsocket_la_LIBADD += $(DLOG_LIBS)
+endif
+
EXTRA_DIST = meson.build
-I $(top_srcdir)/stun
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"libnice-tests\"
+if USE_DLOG
+ AM_CFLAGS += $(DLOG_CFLAGS) -DUSE_DLOG
+endif
+
AM_TESTS_ENVIRONMENT = \
G_MESSAGES_DEBUG=all \
NICE_DEBUG=all \
COMMON_LDADD = $(top_builddir)/agent/libagent.la $(top_builddir)/socket/libsocket.la $(GLIB_LIBS) $(GUPNP_LIBS)
+if USE_DLOG
+ COMMON_LDADD += $(DLOG_LIBS)
+endif
+
check_PROGRAMS = \
test-pseudotcp \
test-pseudotcp-fin \