From 44da905b4f6b3b35e94b4948fb70dec7b5071ded Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 24 Feb 2016 16:52:40 -0500 Subject: [PATCH] FS-8867: build using in tree libyuv to match required version and not impact system ones that are never sufficient version --- Makefile.am | 42 +++++++++++++++++++--- configure.ac | 6 ---- src/mod/applications/mod_av/Makefile.am | 10 ------ src/mod/applications/mod_cv/Makefile.am | 10 ------ src/mod/applications/mod_fsv/Makefile.am | 11 ------ src/mod/applications/mod_mp4v2/Makefile.am | 10 ------ src/mod/codecs/mod_openh264/Makefile.am | 10 ------ src/mod/formats/mod_imagick/Makefile.am | 10 ------ src/mod/formats/mod_vlc/Makefile.am | 9 ----- 9 files changed, 37 insertions(+), 81 deletions(-) diff --git a/Makefile.am b/Makefile.am index 44ec7a852e..e0a10b218a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -115,9 +115,11 @@ 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 +CORE_CFLAGS += -I$(switch_srcdir)/libs/libyuv/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/tiff-4.0.2/libtiff -I$(switch_srcdir)/libs/tiff-4.0.2/libtiff +CORE_CFLAGS += -DSWITCH_HAVE_YUV APR_LIBS = $(AM_LIBAPU_LIBS) $(AM_LIBAPR_LIBS) CORE_LIBS= @@ -153,10 +155,6 @@ if HAVE_VPX CORE_CFLAGS += -DSWITCH_HAVE_VPX $(VPX_CFLAGS) endif -if HAVE_YUV -CORE_CFLAGS += -DSWITCH_HAVE_YUV $(YUV_CFLAGS) -endif - if HAVE_FREETYPE CORE_CFLAGS += -DSWITCH_HAVE_FREETYPE $(LIBFREETYPE_CFLAGS) endif @@ -164,10 +162,44 @@ endif ## ## libfreeswitch ## -noinst_LTLIBRARIES = libfreeswitch_spandsp.la +noinst_LTLIBRARIES = libfreeswitch_spandsp.la libfreeswitch_libyuv.la 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 + +libfreeswitch_libyuv_la_SOURCES = \ + libs/libyuv/source/compare.cc \ + libs/libyuv/source/compare_common.cc \ + libs/libyuv/source/compare_gcc.cc \ + libs/libyuv/source/convert.cc \ + libs/libyuv/source/convert_argb.cc \ + libs/libyuv/source/convert_from.cc \ + libs/libyuv/source/convert_from_argb.cc \ + libs/libyuv/source/convert_to_argb.cc \ + libs/libyuv/source/convert_to_i420.cc \ + libs/libyuv/source/cpu_id.cc \ + libs/libyuv/source/planar_functions.cc \ + libs/libyuv/source/rotate.cc \ + libs/libyuv/source/rotate_any.cc \ + libs/libyuv/source/rotate_argb.cc \ + libs/libyuv/source/rotate_common.cc \ + libs/libyuv/source/rotate_gcc.cc \ + libs/libyuv/source/rotate_mips.cc \ + libs/libyuv/source/row_any.cc \ + libs/libyuv/source/row_common.cc \ + libs/libyuv/source/row_mips.cc \ + libs/libyuv/source/row_gcc.cc \ + libs/libyuv/source/scale.cc \ + libs/libyuv/source/scale_any.cc \ + libs/libyuv/source/scale_argb.cc \ + libs/libyuv/source/scale_common.cc \ + libs/libyuv/source/scale_gcc.cc \ + libs/libyuv/source/scale_mips.cc \ + libs/libyuv/source/video_common.cc + +libfreeswitch_libyuv_la_CPPFLAGS = -O2 -fomit-frame-pointer -Ilibs/libyuv/include +CORE_LIBS+=libfreeswitch_libyuv.la + lib_LTLIBRARIES = libfreeswitch.la libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(VPX_CFLAGS) $(AM_CFLAGS) libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) -no-undefined diff --git a/configure.ac b/configure.ac index 37d49c4dd1..6e87732053 100644 --- a/configure.ac +++ b/configure.ac @@ -785,12 +785,6 @@ if test "x$have_libz" = "xyes" ; then APR_ADDTO([PLATFORM_CORE_LIBS], [-lz]) fi -PKG_CHECK_MODULES([YUV], [libyuv >= 0.0.1280], - [AC_MSG_RESULT([yes]);AM_CONDITIONAL([HAVE_YUV],[true])], - [AC_MSG_RESULT([no]);AM_CONDITIONAL([HAVE_YUV],[false])]) - -APR_ADDTO([PLATFORM_CORE_LIBS], [${YUV_LIBS}]) - PKG_CHECK_MODULES([MPG123], [libmpg123 >= 1.20.1],[ AM_CONDITIONAL([HAVE_MPG123],[true])],[ AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_MPG123],[false])]) diff --git a/src/mod/applications/mod_av/Makefile.am b/src/mod/applications/mod_av/Makefile.am index cd5ffdb107..52c1c53409 100644 --- a/src/mod/applications/mod_av/Makefile.am +++ b/src/mod/applications/mod_av/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_av -if HAVE_YUV if HAVE_VPX if HAVE_AVFORMAT @@ -24,12 +23,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_av) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_av) -endif - diff --git a/src/mod/applications/mod_cv/Makefile.am b/src/mod/applications/mod_cv/Makefile.am index 6386d45971..9f62055f64 100644 --- a/src/mod/applications/mod_cv/Makefile.am +++ b/src/mod/applications/mod_cv/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_cv -if HAVE_YUV if HAVE_VPX if HAVE_OPENCV @@ -24,12 +23,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_cv) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_cv) -endif - diff --git a/src/mod/applications/mod_fsv/Makefile.am b/src/mod/applications/mod_fsv/Makefile.am index 3b21b98405..900d72bd7c 100644 --- a/src/mod/applications/mod_fsv/Makefile.am +++ b/src/mod/applications/mod_fsv/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_fsv -if HAVE_YUV if HAVE_VPX mod_LTLIBRARIES = mod_fsv.la @@ -16,13 +15,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_fsv) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_fsv) -endif - - diff --git a/src/mod/applications/mod_mp4v2/Makefile.am b/src/mod/applications/mod_mp4v2/Makefile.am index 877dd45e12..7bd8ee9aee 100644 --- a/src/mod/applications/mod_mp4v2/Makefile.am +++ b/src/mod/applications/mod_mp4v2/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_mp4v2 -if HAVE_YUV if HAVE_VPX mod_LTLIBRARIES = mod_mp4v2.la @@ -16,12 +15,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_mp4v2) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_mp4v2) -endif - diff --git a/src/mod/codecs/mod_openh264/Makefile.am b/src/mod/codecs/mod_openh264/Makefile.am index f7939ea368..f71b90e482 100644 --- a/src/mod/codecs/mod_openh264/Makefile.am +++ b/src/mod/codecs/mod_openh264/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_openh264 -if HAVE_YUV if HAVE_VPX OPENH264_DIR=/usr/local/ @@ -18,12 +17,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_openh264) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_openh264) -endif - diff --git a/src/mod/formats/mod_imagick/Makefile.am b/src/mod/formats/mod_imagick/Makefile.am index c960d33d78..dcf49efebc 100644 --- a/src/mod/formats/mod_imagick/Makefile.am +++ b/src/mod/formats/mod_imagick/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_imagick -if HAVE_YUV if HAVE_VPX if HAVE_MAGICK @@ -24,12 +23,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_imagick) endif - - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_imagick) -endif - diff --git a/src/mod/formats/mod_vlc/Makefile.am b/src/mod/formats/mod_vlc/Makefile.am index 16bda68ad5..4c111d4793 100644 --- a/src/mod/formats/mod_vlc/Makefile.am +++ b/src/mod/formats/mod_vlc/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_vlc -if HAVE_YUV if HAVE_VPX if HAVE_VLC @@ -24,11 +23,3 @@ all: error error: $(error You must install libvpx2-dev to build mod_vlc) endif - -else -install: error -all: error -error: - $(error You must install libyuv-dev to build mod_vlc) -endif -