提交 1540546c authored 作者: Michael Jerris's avatar Michael Jerris

FS-8884: add --disable-libyuv and --disable-libvpx configure args to disable…

FS-8884: add --disable-libyuv and --disable-libvpx configure args to disable building these libraries
上级 d89a0ad5
......@@ -26,8 +26,12 @@ AM_LIBAPU_LDFLAGS := $(shell ./libs/apr-util/apu-1-config --ldflags)
AM_LIBAPU_LIBS := $(subst $(switch_builddir)/,,$(shell ./libs/apr-util/apu-1-config \--libs))
endif
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
AM_CPPFLAGS = -I$(switch_srcdir)/libs/libvpx $(SWITCH_AM_CXXFLAGS) -I$(switch_srcdir)/libs/sofia-sip/libsofia-sip-ua/sdp -I$(switch_srcdir)/libs/sofia-sip/libsofia-sip-ua/su -I$(switch_builddir)/libs/sofia-sip/libsofia-sip-ua/su
AM_CPPFLAGS =
AM_CPPFLAGS += -I$(switch_srcdir)/libs/libvpx
AM_CPPFLAGS += $(SWITCH_AM_CXXFLAGS) -I$(switch_srcdir)/libs/sofia-sip/libsofia-sip-ua/sdp
AM_CPPFLAGS += -I$(switch_srcdir)/libs/sofia-sip/libsofia-sip-ua/su -I$(switch_builddir)/libs/sofia-sip/libsofia-sip-ua/su
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) $(AM_LIBAPR_LDFLAGS) $(AM_LIBAPU_LDFLAGS)
DEFAULT_SOUNDS=en-us-callie-8000
......@@ -115,15 +119,23 @@ CORE_CFLAGS = $(AM_LIBAPR_CFLAGS) $(AM_LIBAPR_CPPFLAGS)
CORE_CFLAGS += $(AM_LIBAPU_CPPFLAGS)
CORE_CFLAGS += -I$(switch_srcdir)/libs/libtpl-1.5/src
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
if ENABLE_LIBYUV
CORE_CFLAGS += -I$(switch_srcdir)/libs/libyuv/include
CORE_CFLAGS += -DSWITCH_HAVE_YUV
endif
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
CORE_CFLAGS += -I$(switch_builddir)/libs/spandsp/src -I$(switch_srcdir)/libs/spandsp/src
CORE_CFLAGS += -I$(switch_builddir)/libs/tiff-4.0.2/libtiff -I$(switch_srcdir)/libs/tiff-4.0.2/libtiff
CORE_CFLAGS += -DSWITCH_HAVE_YUV
if ENABLE_LIBVPX
CORE_CFLAGS += -DSWITCH_HAVE_VPX
endif
APR_LIBS = $(AM_LIBAPU_LIBS) $(AM_LIBAPR_LIBS)
CORE_LIBS=libs/libvpx/libvpx.a
CORE_LIBS=
if ENABLE_LIBVPX
CORE_LIBS += libs/libvpx/libvpx.a
endif
if SYSTEM_APRUTIL
CORE_LIBS += $(AM_LIBAPU_LINKLIBTOOL)
else
......@@ -159,11 +171,15 @@ endif
##
## libfreeswitch
##
noinst_LTLIBRARIES = libfreeswitch_spandsp.la libfreeswitch_libyuv.la
noinst_LTLIBRARIES = libfreeswitch_spandsp.la
if ENABLE_LIBYUV
noinst_LTLIBRARIES += libfreeswitch_libyuv.la
endif
libfreeswitch_spandsp_la_SOURCES = libs/spandsp/src/plc.c libs/spandsp/src/alloc.c libs/spandsp/src/bit_operations.c
libfreeswitch_spandsp_la_CFLAGS = -Ilibs/spandsp/src $(CORE_CFLAGS) $(AM_CFLAGS)
CORE_LIBS+=libfreeswitch_spandsp.la
if ENABLE_LIBYUV
libfreeswitch_libyuv_la_SOURCES = \
libs/libyuv/source/compare.cc \
libs/libyuv/source/compare_common.cc \
......@@ -196,6 +212,7 @@ libfreeswitch_libyuv_la_SOURCES = \
libfreeswitch_libyuv_la_CPPFLAGS = -O2 -fomit-frame-pointer -Ilibs/libyuv/include
CORE_LIBS+=libfreeswitch_libyuv.la
endif
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(AM_CFLAGS)
......
......@@ -543,6 +543,16 @@ if test "${enable_debug}" = "yes"; then
fi
AC_ARG_ENABLE(libyuv,
[AC_HELP_STRING([--disable-libyuv],[build without libyuv])],[enable_libyuv="$enableval"],[enable_libyuv="yes"])
AM_CONDITIONAL([ENABLE_LIBYUV],[test "${enable_libyuv}" = "yes"])
AC_ARG_ENABLE(libvpx,
[AC_HELP_STRING([--disable-libvpx],[build without libvpx])],[enable_libvpx="$enableval"],[enable_libvpx="yes"])
AM_CONDITIONAL([ENABLE_LIBVPX],[test "${enable_libvpx}" = "yes"])
AC_ARG_ENABLE(cpp,
[AC_HELP_STRING([--disable-cpp],[build without cpp code])],[enable_cpp="$enableval"],[enable_cpp="yes"])
......
......@@ -1936,9 +1936,9 @@ SWITCH_DECLARE(switch_status_t) switch_img_fit(switch_image_t **srcP, int width,
return SWITCH_STATUS_FALSE;
}
#ifdef SWITCH_HAVE_YUV
static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
{
#ifdef SWITCH_HAVE_YUV
uint32_t fourcc;
switch(fmt) {
......@@ -1972,10 +1972,8 @@ static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
}
return fourcc;
#else
return 0xFFFFFFFF;
#endif
}
#endif
SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *dest, switch_size_t size, switch_img_fmt_t fmt)
{
......
......@@ -1876,8 +1876,11 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autolo
switch_loadable_module_load_module("", "CORE_SOFTTIMER_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_PCM_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_SPEEX_MODULE", SWITCH_FALSE, &err);
#ifdef SWITCH_HAVE_YUV
#ifdef SWITCH_HAVE_VPX
switch_loadable_module_load_module("", "CORE_VPX_MODULE", SWITCH_FALSE, &err);
#endif
#endif
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_xml_t mods, ld;
......
......@@ -32,6 +32,8 @@
*/
#include <switch.h>
#ifdef SWITCH_HAVE_YUV
#ifdef SWITCH_HAVE_VPX
#include <vpx/vpx_encoder.h>
#include <vpx/vpx_decoder.h>
#include <vpx/vp8cx.h>
......@@ -1269,6 +1271,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vpx_load)
return SWITCH_STATUS_SUCCESS;
}
#endif
#endif
/* For Emacs:
* Local Variables:
* mode:c
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论