FS-7508 FS-7517: [build] Convert the build over to automake, though there is still room to fix

the autoconf portion to detect the correct location of libopenh264

Basic conversion for vpx too.
Borrowing from ldns handling, setup mod_vpx to prompt for the required library when the module is enabled
This commit is contained in:
William King 2014-07-24 21:53:35 -07:00 committed by Michael Jerris
parent 4af7e7c68d
commit 6dec4de2fe
3 changed files with 38 additions and 0 deletions

View File

@ -1211,6 +1211,18 @@ PKG_CHECK_MODULES([LDNS], [libldns >= 1.6.6],[
fi],[
AM_CONDITIONAL([HAVE_LDNS],[true])])])
PKG_CHECK_MODULES([VPX], [vpx >= 1.3.0],[
AM_CONDITIONAL([HAVE_VPX],[true])],[
if module_enabled mod_vpx; then
AC_MSG_ERROR([You need to either install libvpx-dev or disable mod_vpx in modules.conf])
else
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_VPX],[false])
fi],[
AM_CONDITIONAL([HAVE_VPX],[true])])
#PKG_CHECK_MODULES([AVCODEC], [avcodec >= 53.35.0])
#PKG_CHECK_MODULES([AVFORMAT], [avformat >= 53.21.1])
PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[
AM_CONDITIONAL([HAVE_MEMCACHED],[true])
MEMCACHED_LIBS="${MEMCACHED_LIBS} -lpthread"
@ -1550,12 +1562,14 @@ AC_CONFIG_FILES([Makefile
src/mod/codecs/mod_isac/Makefile
src/mod/codecs/mod_mp4v/Makefile
src/mod/codecs/mod_opus/Makefile
src/mod/codecs/mod_openh264/Makefile
src/mod/codecs/mod_sangoma_codec/Makefile
src/mod/codecs/mod_silk/Makefile
src/mod/codecs/mod_siren/Makefile
src/mod/codecs/mod_skel_codec/Makefile
src/mod/codecs/mod_theora/Makefile
src/mod/codecs/mod_vp8/Makefile
src/mod/codecs/mod_vpx/Makefile
src/mod/dialplans/mod_dialplan_asterisk/Makefile
src/mod/dialplans/mod_dialplan_directory/Makefile
src/mod/dialplans/mod_dialplan_xml/Makefile

View File

@ -0,0 +1,10 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_openh264
OPENH264_DIR=/usr/local/
mod_LTLIBRARIES = mod_openh264.la
mod_openh264_la_SOURCES = mod_openh264.cpp
mod_openh264_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(OPENH264_DIR)/include/wels
mod_openh264_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_openh264_la_LDFLAGS = -L$(OPENH264_DIR)/lib/ -lopenh264 -avoid-version -module -no-undefined -shared

View File

@ -0,0 +1,14 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_vpx
if HAVE_VPX
mod_LTLIBRARIES = mod_vpx.la
mod_vpx_la_SOURCES = mod_vpx.c
mod_vpx_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_vpx_la_LDFLAGS = -lvpx -avoid-version -module -no-undefined -shared
else
install: error
all: error
error:
$(error You must install your distros libvpx-dev to build mod_vpx)
endif