FS-11047: add mod_v8 back to build
This commit is contained in:
parent
2450d637ce
commit
524ad35933
27
configure.ac
27
configure.ac
|
@ -1451,6 +1451,16 @@ PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[
|
|||
AM_CONDITIONAL([HAVE_MEMCACHED],[false])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([V8FS_STATIC], [v8fs_static >= 6.1.298],[
|
||||
AM_CONDITIONAL([HAVE_V8FS],[true])],[
|
||||
if module_enabled mod_v8; then
|
||||
AC_MSG_ERROR([You need to either install libv8fs-dev (>= 6.1.298) or disable mod_v8 in modules.conf])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AM_CONDITIONAL([HAVE_V8FS],[false])
|
||||
fi
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([AMQP], [librabbitmq >= 0.5.2],[
|
||||
AM_CONDITIONAL([HAVE_AMQP],[true])],[
|
||||
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AMQP],[false])])
|
||||
|
@ -1550,23 +1560,6 @@ fi
|
|||
|
||||
AX_CHECK_JAVA
|
||||
|
||||
# Option to enable static linking of Google's V8 inside mod_v8
|
||||
AC_ARG_ENABLE(static-v8,
|
||||
[AS_HELP_STRING([--enable-static-v8], [Statically link V8 into mod_v8])], [enable_static_v8="$enableval"], [enable_static_v8="no"])
|
||||
AM_CONDITIONAL([ENABLE_STATIC_V8],[test "x$enable_static_v8" != "xno"])
|
||||
|
||||
# Option to disable parallel build of Google's V8
|
||||
AC_ARG_ENABLE(parallel-build-v8,
|
||||
[AS_HELP_STRING([--disable-parallel-build-v8], [Disable parallel build of V8])], [enable_parallel_build_v8="$enableval"], [enable_parallel_build_v8="yes"])
|
||||
AM_CONDITIONAL([ENABLE_PARALLEL_BUILD_V8],[test "x$enable_parallel_build_v8" != "xno"])
|
||||
|
||||
if test "`uname -m`" = "x86_64"; then
|
||||
V8_TARGET="x64"
|
||||
else
|
||||
V8_TARGET="x86"
|
||||
fi
|
||||
AC_SUBST(V8_TARGET)
|
||||
|
||||
AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"])
|
||||
AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"])
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ avoid_mods=(
|
|||
endpoints/mod_unicall
|
||||
event_handlers/mod_smpp
|
||||
formats/mod_webm
|
||||
languages/mod_v8
|
||||
sdk/autotools
|
||||
xml_int/mod_xml_ldap
|
||||
xml_int/mod_xml_radius
|
||||
|
|
|
@ -650,7 +650,7 @@ Build-Depends: python-dev
|
|||
Module: languages/mod_v8
|
||||
Description: mod_v8
|
||||
Adds mod_v8.
|
||||
Build-Depends: git
|
||||
Build-Depends: git, libv8fs-6.1-dev
|
||||
|
||||
Module: languages/mod_yaml
|
||||
Description: mod_yaml
|
||||
|
|
|
@ -2,33 +2,14 @@ include $(top_srcdir)/build/modmake.rulesam
|
|||
|
||||
AUTOMAKE_OPTIONS += foreign
|
||||
|
||||
# V8 version to use
|
||||
V8_VERSION=6.1.298
|
||||
V8=v8-$(V8_VERSION)
|
||||
|
||||
V8_DIR=$(switch_srcdir)/libs/$(V8)/v8
|
||||
V8_DEPOT_TOOLS_PATH=$(switch_builddir)/libs/$(V8)
|
||||
V8_BUILDDIR=$(V8_DEPOT_TOOLS_PATH)/v8
|
||||
|
||||
V8_LIBDIR=$(V8_BUILDDIR)/out.gn/$(V8_TARGET).release
|
||||
|
||||
if ISMAC
|
||||
V8_LIBEXT=dylib
|
||||
else
|
||||
V8_LIBEXT=so
|
||||
endif
|
||||
|
||||
# Build the dynamic lib version of V8
|
||||
V8LIB=$(V8_LIBDIR)/libv8.$(V8_LIBEXT)
|
||||
|
||||
MODNAME=mod_v8
|
||||
|
||||
AM_CFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include -I$(V8_DIR)/include
|
||||
AM_CPPFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include -I$(V8_DIR)/include -std=c++11
|
||||
AM_CFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include $(V8FS_STATIC_CFLAGS)
|
||||
AM_CPPFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include $(V8FS_STATIC_CFLAGS) -std=c++11
|
||||
AM_LDFLAGS += -avoid-version -module -no-undefined -shared
|
||||
|
||||
AM_LIBADD = $(switch_builddir)/libfreeswitch.la -lv8 -lv8_libbase -lv8_libplatform
|
||||
AM_LDFLAGS += -L$(V8_LIBDIR)
|
||||
AM_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
AM_LDFLAGS += $(V8FS_STATIC_LIBS)
|
||||
|
||||
BUILT_SOURCES = $(V8LIB)
|
||||
|
||||
|
@ -74,28 +55,3 @@ mod_v8_la_LDFLAGS = $(CURL_LIBS) $(AM_LDFLAGS)
|
|||
#mod_v8_skel_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
|
||||
$(SOURCES): $(BUILT_SOURCES)
|
||||
|
||||
$(V8LIB):
|
||||
mkdir -p $(V8_DEPOT_TOOLS_PATH)
|
||||
cd $(V8_DEPOT_TOOLS_PATH) && \
|
||||
export PATH=`pwd`/depot_tools:"$$PATH" && \
|
||||
if [ ! -d "$(V8_DEPOT_TOOLS_PATH)/depot_tools" ] ; then git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git && fetch v8 ; fi && \
|
||||
cd v8 && \
|
||||
git checkout $(V8_VERSION) && \
|
||||
gclient sync && \
|
||||
tools/dev/v8gen.py -vv $(V8_TARGET).release -- is_debug=false is_component_build=true v8_enable_i18n_support=false v8_use_external_startup_data=false && \
|
||||
ninja -C out.gn/$(V8_TARGET).release/ d8
|
||||
|
||||
# This is a temporary solution to force Mac OSX build to load the libraries at the right place
|
||||
if ISMAC
|
||||
install-exec-local: $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT)
|
||||
install_name_tool -change @rpath/libv8.$(V8_LIBEXT) $(libdir)/libv8.$(V8_LIBEXT) .libs/mod_v8.so
|
||||
install_name_tool -change @rpath/libv8_libbase.$(V8_LIBEXT) $(libdir)/libv8_libbase.$(V8_LIBEXT) .libs/mod_v8.so
|
||||
install_name_tool -change @rpath/libv8_libplatform.$(V8_LIBEXT) $(libdir)/libv8_libplatform.$(V8_LIBEXT) .libs/mod_v8.so
|
||||
else
|
||||
install-exec-local: $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT)
|
||||
endif
|
||||
$(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT): $(V8LIB)
|
||||
rm -f $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT) && cp -a $(V8_LIBDIR)/libv8.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT)
|
||||
rm -f $(DESTDIR)$(libdir)/libv8_libbase.$(V8_LIBEXT) && cp -a $(V8_LIBDIR)/libv8_libbase.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libv8_libbase.$(V8_LIBEXT)
|
||||
rm -f $(DESTDIR)$(libdir)/libv8_libplatform.$(V8_LIBEXT) && cp -a $(V8_LIBDIR)/libv8_libplatform.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libv8_libplatform.$(V8_LIBEXT)
|
||||
|
|
Loading…
Reference in New Issue