FS-8884: add --disable-libyuv and --disable-libvpx configure args to disable building these libraries
This commit is contained in:
parent
d89a0ad52d
commit
1540546cc1
25
Makefile.am
25
Makefile.am
|
@ -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))
|
AM_LIBAPU_LIBS := $(subst $(switch_builddir)/,,$(shell ./libs/apr-util/apu-1-config \--libs))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
|
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)
|
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) $(AM_LIBAPR_LDFLAGS) $(AM_LIBAPU_LDFLAGS)
|
||||||
|
|
||||||
DEFAULT_SOUNDS=en-us-callie-8000
|
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 += $(AM_LIBAPU_CPPFLAGS)
|
||||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/libtpl-1.5/src
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/libtpl-1.5/src
|
||||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
|
||||||
|
if ENABLE_LIBYUV
|
||||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/libyuv/include
|
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_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/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 += -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
|
CORE_CFLAGS += -DSWITCH_HAVE_VPX
|
||||||
|
endif
|
||||||
|
|
||||||
APR_LIBS = $(AM_LIBAPU_LIBS) $(AM_LIBAPR_LIBS)
|
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
|
if SYSTEM_APRUTIL
|
||||||
CORE_LIBS += $(AM_LIBAPU_LINKLIBTOOL)
|
CORE_LIBS += $(AM_LIBAPU_LINKLIBTOOL)
|
||||||
else
|
else
|
||||||
|
@ -159,11 +171,15 @@ endif
|
||||||
##
|
##
|
||||||
## libfreeswitch
|
## 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_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)
|
libfreeswitch_spandsp_la_CFLAGS = -Ilibs/spandsp/src $(CORE_CFLAGS) $(AM_CFLAGS)
|
||||||
CORE_LIBS+=libfreeswitch_spandsp.la
|
CORE_LIBS+=libfreeswitch_spandsp.la
|
||||||
|
|
||||||
|
if ENABLE_LIBYUV
|
||||||
libfreeswitch_libyuv_la_SOURCES = \
|
libfreeswitch_libyuv_la_SOURCES = \
|
||||||
libs/libyuv/source/compare.cc \
|
libs/libyuv/source/compare.cc \
|
||||||
libs/libyuv/source/compare_common.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
|
libfreeswitch_libyuv_la_CPPFLAGS = -O2 -fomit-frame-pointer -Ilibs/libyuv/include
|
||||||
CORE_LIBS+=libfreeswitch_libyuv.la
|
CORE_LIBS+=libfreeswitch_libyuv.la
|
||||||
|
endif
|
||||||
|
|
||||||
lib_LTLIBRARIES = libfreeswitch.la
|
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)
|
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(AM_CFLAGS)
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -543,6 +543,16 @@ if test "${enable_debug}" = "yes"; then
|
||||||
|
|
||||||
fi
|
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_ARG_ENABLE(cpp,
|
||||||
[AC_HELP_STRING([--disable-cpp],[build without cpp code])],[enable_cpp="$enableval"],[enable_cpp="yes"])
|
[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;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SWITCH_HAVE_YUV
|
||||||
static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
|
static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
|
||||||
{
|
{
|
||||||
#ifdef SWITCH_HAVE_YUV
|
|
||||||
uint32_t fourcc;
|
uint32_t fourcc;
|
||||||
|
|
||||||
switch(fmt) {
|
switch(fmt) {
|
||||||
|
@ -1972,10 +1972,8 @@ static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fourcc;
|
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)
|
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_SOFTTIMER_MODULE", SWITCH_FALSE, &err);
|
||||||
switch_loadable_module_load_module("", "CORE_PCM_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);
|
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);
|
switch_loadable_module_load_module("", "CORE_VPX_MODULE", SWITCH_FALSE, &err);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||||
switch_xml_t mods, ld;
|
switch_xml_t mods, ld;
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
|
#ifdef SWITCH_HAVE_YUV
|
||||||
|
#ifdef SWITCH_HAVE_VPX
|
||||||
#include <vpx/vpx_encoder.h>
|
#include <vpx/vpx_encoder.h>
|
||||||
#include <vpx/vpx_decoder.h>
|
#include <vpx/vpx_decoder.h>
|
||||||
#include <vpx/vp8cx.h>
|
#include <vpx/vp8cx.h>
|
||||||
|
@ -1269,6 +1271,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vpx_load)
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* mode:c
|
* mode:c
|
||||||
|
|
Loading…
Reference in New Issue