Skip to content

Commit

Permalink
Bug 757637: Rollup makesystem changes for webrtc r=khuey r=ted f=glan…
Browse files Browse the repository at this point in the history
…dium
  • Loading branch information
jesup committed Jun 20, 2012
1 parent 9ccdfd5 commit 0edea6e
Show file tree
Hide file tree
Showing 19 changed files with 686 additions and 31 deletions.
5 changes: 5 additions & 0 deletions build/unix/stdc++compat/stdc++compat.cpp
Expand Up @@ -26,9 +26,13 @@ namespace std {
template ostream& ostream::_M_insert(unsigned long);
template ostream& ostream::_M_insert(long long);
template ostream& ostream::_M_insert(unsigned long long);
template ostream& ostream::_M_insert(bool);
template ostream& ostream::_M_insert(const void*);
template ostream& __ostream_insert(ostream&, const char*, streamsize);
template istream& istream::_M_extract(double&);
template istream& istream::_M_extract(float&);
template istream& istream::_M_extract(unsigned int&);
template istream& istream::_M_extract(unsigned long&);
#endif
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14)
/* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions
Expand All @@ -42,6 +46,7 @@ namespace std {
template string& string::operator=(string&&);
template wstring::basic_string(wstring&&);
template wstring& wstring::operator=(wstring&&);
template string& string::assign(string&&);
template wstring& wstring::assign(wstring&&);
#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
#endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */
Expand Down
2 changes: 2 additions & 0 deletions config/autoconf.mk.in
Expand Up @@ -137,6 +137,7 @@ MOZ_WEBM = @MOZ_WEBM@
MOZ_MEDIA_PLUGINS = @MOZ_MEDIA_PLUGINS@
MOZ_OMX_PLUGIN = @MOZ_OMX_PLUGIN@
MOZ_GSTREAMER = @MOZ_GSTREAMER@
MOZ_VP8 = @MOZ_VP8@
MOZ_VP8_ERROR_CONCEALMENT = @MOZ_VP8_ERROR_CONCEALMENT@
MOZ_VP8_ENCODER = @MOZ_VP8_ENCODER@
VPX_AS = @VPX_AS@
Expand Down Expand Up @@ -170,6 +171,7 @@ MOZ_D3DX9_DLL = @MOZ_D3DX9_DLL@
MOZ_D3DCOMPILER_DLL = @MOZ_D3DCOMPILER_DLL@
MOZ_GL_PROVIDER = @MOZ_GL_PROVIDER@
MOZ_GL_DEFAULT_PROVIDER = @MOZ_GL_DEFAULT_PROVIDER@
MOZ_WEBRTC = @MOZ_WEBRTC@


JAVA=@JAVA@
Expand Down
9 changes: 8 additions & 1 deletion config/rules.mk
Expand Up @@ -633,7 +633,10 @@ endif
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))

# Dependencies which, if modified, should cause everything to rebuild
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
ifndef NO_MAKEFILE_RULE
GLOBAL_DEPS += Makefile.in
endif

##############################################
include $(topsrcdir)/config/makefiles/target_libs.mk
Expand Down Expand Up @@ -1147,16 +1150,20 @@ GARBAGE_DIRS += $(_JAVA_DIR)
# Update Makefiles
###############################################################################

ifndef NO_MAKEFILE_RULE
# Note: Passing depth to make-makefile is optional.
# It saves the script some work, though.
Makefile: Makefile.in
@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH)
endif

ifndef NO_SUBMAKEFILES_RULE
ifdef SUBMAKEFILES
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES): % : $(srcdir)/%.in
$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $@
endif
endif

ifdef AUTOUPDATE_CONFIGURE
$(topsrcdir)/configure: $(topsrcdir)/configure.in
Expand Down
2 changes: 2 additions & 0 deletions config/system-headers
Expand Up @@ -1059,3 +1059,5 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
sys/ipc.h
86 changes: 83 additions & 3 deletions configure.in
Expand Up @@ -522,18 +522,22 @@ case "$target" in
fi

_CC_SUITE=8
_MSVS_VERSION=2005
AC_DEFINE(_CRT_SECURE_NO_DEPRECATE)
AC_DEFINE(_CRT_NONSTDC_NO_DEPRECATE)
elif test "$_CC_MAJOR_VERSION" = "15"; then
_CC_SUITE=9
_MSVS_VERSION=2008
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
_MSVS_VERSION=2010
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "17"; then
_CC_SUITE=11
_MSVS_VERSION=2011
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
else
Expand Down Expand Up @@ -4250,9 +4254,12 @@ MOZ_WAVE=1
MOZ_MEDIA=
MOZ_OPUS=1
MOZ_WEBM=1
MOZ_WEBRTC=
MOZ_WEBRTC_SIGNALING=
MOZ_MEDIA_PLUGINS=
MOZ_MEDIA_NAVIGATOR=
MOZ_OMX_PLUGIN=
MOZ_VP8=
MOZ_VP8_ERROR_CONCEALMENT=
MOZ_VP8_ENCODER=
VPX_AS=
Expand Down Expand Up @@ -5271,6 +5278,25 @@ if test "$NS_PRINTING"; then
AC_DEFINE(NS_PRINT_PREVIEW)
fi

dnl ========================================================
dnl = Enable WebRTC code
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(webrtc,
[ --enable-webrtc Enable support for WebRTC],
MOZ_WEBRTC=1,
MOZ_WEBRTC=)

if test -n "$MOZ_WEBRTC"; then
AC_DEFINE(MOZ_WEBRTC)
MOZ_MEDIA=1
MOZ_RAW=1
MOZ_VP8=1
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
fi

AC_SUBST(MOZ_WEBRTC)

dnl ========================================================
dnl = Enable Raw Codecs
dnl ========================================================
Expand Down Expand Up @@ -5346,6 +5372,11 @@ MOZ_ARG_DISABLE_BOOL(webm,
MOZ_WEBM=,
MOZ_WEBM=1)

if test -n "$MOZ_WEBM"; then
AC_DEFINE(MOZ_WEBM)
MOZ_VP8=1
fi;

dnl ========================================================
dnl = Disable media plugin support
dnl ========================================================
Expand Down Expand Up @@ -5397,8 +5428,8 @@ MOZ_ARG_WITH_BOOL(system-libvpx,
MOZ_LIBVPX_INCLUDES=
MOZ_LIBVPX_LIBS=

if test -n "$MOZ_WEBM"; then
AC_DEFINE(MOZ_WEBM)
if test -n "$MOZ_VP8"; then
AC_DEFINE(MOZ_VP8)
if test -n "$MOZ_VP8_ERROR_CONCEALMENT" ; then
AC_DEFINE(MOZ_VP8_ERROR_CONCEALMENT)
fi
Expand All @@ -5425,7 +5456,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX)
AC_SUBST(MOZ_LIBVPX_INCLUDES)
AC_SUBST(MOZ_LIBVPX_LIBS)

if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIVE_LIBVPX"; then
if test "$MOZ_WEBM"; then
MOZ_SYDNEYAUDIO=1
MOZ_CUBEB=1
MOZ_MEDIA=1
Expand All @@ -5437,7 +5468,9 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIVE_LIBVPX"; then
MOZ_VORBIS=1
;;
esac
fi

if test -n "$MOZ_VP8" -a -z "$MOZ_NATIVE_LIBVPX"; then

dnl Detect if we can use an assembler to compile optimized assembly for libvpx.
dnl We currently require yasm on all x86 platforms and require yasm 1.1.0 on Win32.
Expand Down Expand Up @@ -8588,6 +8621,7 @@ AC_SUBST(MOZ_MEDIA_PLUGINS)
AC_SUBST(MOZ_OMX_PLUGIN)
AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
AC_SUBST(MOZ_VP8_ENCODER)
AC_SUBST(MOZ_VP8)
AC_SUBST(MOZ_OGG)
AC_SUBST(MOZ_ALSA_LIBS)
AC_SUBST(MOZ_ALSA_CFLAGS)
Expand Down Expand Up @@ -8865,6 +8899,52 @@ mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null

AC_OUTPUT($MAKEFILES)

# Generate Makefiles for WebRTC directly from .gyp files
if test "${OS_TARGET}" = "WINNT"; then
if test "$HAVE_64BIT_OS"; then
OS_BITS=64
else
OS_BITS=32
fi
EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
fi

if test -n "$MOZ_WEBRTC"; then
AC_MSG_RESULT("generating WebRTC Makefiles...")

GYP_WEBRTC_OPTIONS="--format=mozmake -D build_with_mozilla=1 -D enable_protobuf=0 -D include_internal_video_render=0 ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"

$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/trunk \
${srcdir}/media/webrtc/trunk/peerconnection.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate WebRTC Makefiles])
fi

# XXX disable until we land the tranche with signaling
if test -n "$MOZ_WEBRTC_SIGNALING"; then
AC_MSG_RESULT("generating WebRTC/Signaling Makefiles...")
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/signaling \
${srcdir}/media/webrtc/signaling/signaling.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate WebRTC/Signaling Makefiles])
fi
fi

AC_MSG_RESULT("generating gtest Makefiles...")
# Ok to pass some extra -D's that are ignored here
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/trunk/testing/ \
${srcdir}/media/webrtc/trunk/testing/gtest.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate gtest Makefiles])
fi
fi

# Populate the virtualenv
AC_MSG_RESULT([Populating Python virtualenv])
$MAKE -C build/virtualenv MACOSX_DEPLOYMENT_TARGET= || exit 1
Expand Down
9 changes: 8 additions & 1 deletion js/src/config/rules.mk
Expand Up @@ -633,7 +633,10 @@ endif
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))

# Dependencies which, if modified, should cause everything to rebuild
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
ifndef NO_MAKEFILE_RULE
GLOBAL_DEPS += Makefile.in
endif

##############################################
include $(topsrcdir)/config/makefiles/target_libs.mk
Expand Down Expand Up @@ -1147,16 +1150,20 @@ GARBAGE_DIRS += $(_JAVA_DIR)
# Update Makefiles
###############################################################################

ifndef NO_MAKEFILE_RULE
# Note: Passing depth to make-makefile is optional.
# It saves the script some work, though.
Makefile: Makefile.in
@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH)
endif

ifndef NO_SUBMAKEFILES_RULE
ifdef SUBMAKEFILES
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES): % : $(srcdir)/%.in
$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $@
endif
endif

ifdef AUTOUPDATE_CONFIGURE
$(topsrcdir)/configure: $(topsrcdir)/configure.in
Expand Down
2 changes: 2 additions & 0 deletions js/src/config/system-headers
Expand Up @@ -1059,3 +1059,5 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
sys/ipc.h
20 changes: 18 additions & 2 deletions layout/media/Makefile.in
Expand Up @@ -65,8 +65,13 @@ ifdef MOZ_WEBM
SHARED_LIBRARY_LIBS += \
$(DEPTH)/media/libnestegg/src/$(LIB_PREFIX)nestegg.$(LIB_SUFFIX) \
$(NULL)
endif

ifdef MOZ_VP8
ifndef MOZ_NATIVE_LIBVPX
SHARED_LIBRARY_LIBS += $(DEPTH)/media/libvpx/$(LIB_PREFIX)vpx.$(LIB_SUFFIX)
SHARED_LIBRARY_LIBS += \
$(DEPTH)/media/libvpx/$(LIB_PREFIX)vpx.$(LIB_SUFFIX) \
$(NULL)
endif
endif

Expand Down Expand Up @@ -108,7 +113,11 @@ SHARED_LIBRARY_LIBS += \
SHARED_LIBRARY_LIBS += \
$(DEPTH)/gfx/2d/$(LIB_PREFIX)gfx2d.$(LIB_SUFFIX) \
$(NULL)


ifdef MOZ_WEBRTC
include $(topsrcdir)/media/webrtc/shared_libs.mk
endif

ifdef MOZ_ENABLE_SKIA
SHARED_LIBRARY_LIBS += $(MOZ_SKIA_LIBS)
endif
Expand All @@ -120,6 +129,13 @@ OS_LIBS += $(call EXPAND_LIBNAME,usp10 ole32)
# OTS uses uncompress2() from libz, so we need to link with this
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)

ifdef MOZ_WEBRTC
EXTRA_DSO_LDOPTS += \
-LIBPATH:"$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)" \
$(NULL)
OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
endif

DEFFILE = symbols.def
endif

Expand Down
15 changes: 15 additions & 0 deletions layout/media/symbols.def.in
Expand Up @@ -143,6 +143,21 @@ ShGetInfoLog
ShCompile
ShGetInfo
ShConstructCompiler
#ifdef MOZ_WEBRTC
#ifdef HAVE_64BIT_OS
?GetInterface@ViERender@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?GetInterface@ViECapture@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?GetInterface@ViEBase@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?Create@VideoEngine@webrtc@@SAPEAV12@XZ
?Delete@VideoEngine@webrtc@@SA_NAEAPEAV12@@Z
#else
?GetInterface@ViERender@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?GetInterface@ViECapture@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?GetInterface@ViEBase@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?Create@VideoEngine@webrtc@@SAPAV12@XZ
?Delete@VideoEngine@webrtc@@SA_NAAPAV12@@Z
#endif
#endif
ShGetActiveAttrib
ShGetActiveUniform
#ifndef MOZ_NATIVE_PNG
Expand Down
19 changes: 19 additions & 0 deletions media/webrtc/Makefile.in
@@ -0,0 +1,19 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

DIRS = \
trunk \
trunk/testing \
$(NULL)

# These Makefiles don't have corresponding Makefile.ins
NO_SUBMAKEFILES_RULE = 1
include $(topsrcdir)/config/rules.mk

0 comments on commit 0edea6e

Please sign in to comment.