Commit 57cc6290 authored by Ghislain MARY's avatar Ghislain MARY

Include patch from linphone web version.

parent 8deb23a1
......@@ -23,6 +23,7 @@ if test -n "$MEDIASTREAMER_EXTRA_VERSION" ; then
MEDIASTREAMER_VERSION="${MEDIASTREAMER_VERSION}.${MEDIASTREAMER_EXTRA_VERSION}"
fi
AC_SUBST(LIBMEDIASTREAMER_SO_CURRENT, $LIBMEDIASTREAMER_SO_CURRENT)
AC_SUBST(LIBMEDIASTREAMER_SO_VERSION)
AC_SUBST(MEDIASTREAMER_VERSION)
......@@ -41,6 +42,8 @@ AC_DEFINE_UNQUOTED(MEDIASTREAMER_VERSION,"$MEDIASTREAMER_VERSION",[MEDIASTREAMER
MS_PUBLIC_CFLAGS=
gl_LD_OUTPUT_DEF
AC_MSG_CHECKING([warning make an error on compilation])
AC_ARG_ENABLE(strict,
[AS_HELP_STRING([--enable-strict], [Enable error on compilation warning (default=no)])],
......@@ -194,6 +197,7 @@ if test "$mingw_found" != "yes" ; then
dnl gettext macro does not work properly under mingw. And we want to use the one provided by GTK.
CPPFLAGS_save=$CPPFLAGS
AM_GNU_GETTEXT([external])
AC_SUBST(INTLLIBS)
CPPFLAGS=$CPPFLAGS_save
LIBS="$LIBS $LIBINTL"
else
......@@ -884,6 +888,12 @@ fi
AM_CONDITIONAL(BUILD_TESTS,test x$found_cunit = xyes)
case "$target_os" in
*linux*)
# Eliminate -lstdc++ addition to postdeps for cross compiles.
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
;;
esac
dnl ##################################################
dnl # Check for doxygen
......
......@@ -274,8 +274,28 @@ voipdescs.h: Makefile $(libmediastreamer_voip_la_SOURCES)
awk 'BEGIN { print("MSFilterDesc * ms_voip_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $(abs_builddir)/voipdescs.txt >> $(abs_builddir)/$@
libmediastreamer_base_la_LIBADD= $(ORTP_LIBS)
libmediastreamer_base_la_LDFLAGS= -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
libmediastreamer_base_la_LIBADD = $(ORTP_LIBS)
libmediastreamer_base_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
libmediastreamer_voip_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
if HAVE_LD_OUTPUT_DEF
libmediastreamer_base_la_LDFLAGS += -Wl,--output-def,libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def
libmediastreamer_voip_la_LDFLAGS += -Wl,--output-def,libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def
defexecdir = $(libdir)
defexec_DATA = libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def
CLEANFILES += $(defexec_DATA)
libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def: libmediastreamer_base.la
libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def: libmediastreamer_voip.la
if BUILD_WIN32
defexec_DATA += libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).lib libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).lib
libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).lib: libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_base.la
$(DLLTOOL) --dllname libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).dll --input-def libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def --output-lib $@ libmediastreamer_base.la
libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).lib: libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_voip.la
$(DLLTOOL) --dllname libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).dll --input-def libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def --output-lib $@ libmediastreamer_voip.la
endif
endif
if !BUILD_WIN32
libmediastreamer_base_la_LDFLAGS+=-rdynamic
......@@ -286,9 +306,8 @@ libmediastreamer_base_la_LIBADD+= -lole32 \
-loleaut32\
-lwinmm \
-luuid
endif
if BUILD_WIN32_WCE
libmediastreamer_base_la_LIBADD+= -lmmtimer
endif
......@@ -330,6 +349,8 @@ endif
libmediastreamer_voip_la_LIBADD= libmediastreamer_base.la \
$(ORTP_LIBS) \
$(VP8_LIBS) \
$(PORTAUDIO_LIBS) \
$(ALSA_LIBS) \
$(ARTS_LIBS) \
......@@ -342,6 +363,13 @@ libmediastreamer_voip_la_LIBADD= libmediastreamer_base.la \
$(PCAP_LIBS) \
$(OPUS_LIBS)
if BUILD_WIN32
libmediastreamer_voip_la_LIBADD+= -lole32 \
-loleaut32\
-lwinmm \
-luuid
endif
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_voip_la_LIBADD+=$(VP8_LIBS)
......@@ -353,8 +381,6 @@ libmediastreamer_voip_la_LIBADD+= $(VIDEO_LIBS) \
$(GLEW_LIBS)
endif
libmediastreamer_voip_la_LDFLAGS= $(libmediastreamer_base_la_LDFLAGS)
if BUILD_UPNP
AM_CFLAGS+=$(LIBUPNP_CFLAGS) -D_GNU_SOURCE
libmediastreamer_voip_la_LIBADD+= $(LIBUPNP_LIBS)
......
......@@ -190,7 +190,7 @@ static uint64_t generate_tie_breaker(void)
static char * generate_ufrag(void)
{
char *ufrag = ms_malloc(9);
sprintf(ufrag, "%08lx", random());
sprintf(ufrag, "%08x", (int)random());
ufrag[8] = '\0';
return ufrag;
}
......@@ -198,7 +198,7 @@ static char * generate_ufrag(void)
static char * generate_pwd(void)
{
char *pwd = ms_malloc(25);
sprintf(pwd, "%08lx%08lx%08lx", random(), random(), random());
sprintf(pwd, "%08x%08x%08x", (int)random(), (int)random(), (int)random());
pwd[24] = '\0';
return pwd;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment