FS-7338: remove mod_shout dep libs to system libs. On debain jessie requires libmpg123-dev libshout3-dev libmp3lame-dev
This commit is contained in:
parent
32c4843337
commit
660e79edd7
12
configure.ac
12
configure.ac
|
@ -1273,6 +1273,18 @@ SWITCH_AM_CFLAGS="$VPX_CFLAGS $SWITCH_AM_CFLAGS"
|
|||
SWITCH_AM_CXXFLAGS="$VPX_CFLAGS $SWITCH_AM_CXXFLAGS"
|
||||
SWITCH_AM_CPPFLAGS="$VPX_CFLAGS $SWITCH_AM_CPPFLAGS"
|
||||
|
||||
PKG_CHECK_MODULES([MPG123], [libmpg123 >= 1.20.1],[
|
||||
AM_CONDITIONAL([HAVE_MPG123],[true])],[
|
||||
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_MPG123],[false])])
|
||||
|
||||
PKG_CHECK_MODULES([SHOUT], [shout >= 2.3.1],[
|
||||
AM_CONDITIONAL([HAVE_SHOUT],[true])],[
|
||||
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_SHOUT],[false])])
|
||||
|
||||
PKG_CHECK_MODULES([MP3LAME], [mp3lame],[
|
||||
AM_CONDITIONAL([HAVE_MP3LAME],[true])],[
|
||||
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_MP3LAME],[false])])
|
||||
|
||||
PKG_CHECK_MODULES([AVCODEC], [libavcodec >= 53.35.0],[
|
||||
AM_CONDITIONAL([HAVE_AVCODEC],[true])],[
|
||||
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AVCODEC],[false])])
|
||||
|
|
|
@ -1,65 +1,33 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_shout
|
||||
|
||||
LAME=lame-3.98.4
|
||||
SHOUT=libshout-2.2.2
|
||||
MPG123=mpg123-1.13.2
|
||||
|
||||
LAME_DIR=$(switch_srcdir)/libs/$(LAME)
|
||||
SHOUT_DIR=$(switch_srcdir)/libs/$(SHOUT)
|
||||
MPG123_DIR=$(switch_srcdir)/libs/$(MPG123)
|
||||
|
||||
LAME_BUILDDIR=$(switch_builddir)/libs/$(LAME)
|
||||
SHOUT_BUILDDIR=$(switch_builddir)/libs/$(SHOUT)
|
||||
MPG123_BUILDDIR=$(switch_builddir)/libs/$(MPG123)
|
||||
|
||||
LAMELA=$(LAME_BUILDDIR)/libmp3lame/libmp3lame.la
|
||||
SHOUTLA=$(SHOUT_BUILDDIR)/src/libshout.la
|
||||
MPG123LA=$(MPG123_BUILDDIR)/src/libmpg123/libmpg123.la
|
||||
if HAVE_SHOUT
|
||||
if HAVE_MPG123
|
||||
|
||||
mod_LTLIBRARIES = mod_shout.la
|
||||
mod_shout_la_SOURCES = mod_shout.c
|
||||
mod_shout_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_shout_la_CPPFLAGS = $(CURL_CFLAGS) $(AM_CPPFLAGS) -I$(SHOUT_DIR)/include -I$(LAME_DIR)/include -I$(MPG123_DIR)/src -I$(MPG123_BUILDDIR)/src -I$(SHOUT_BUILDDIR)/include
|
||||
mod_shout_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LAMELA) $(SHOUTLA) $(MPG123LA)
|
||||
mod_shout_la_LDFLAGS = $(CURL_LIBS) -avoid-version -module -no-undefined -shared `cat $(SHOUT_BUILDDIR)/Makefile | grep SPEEX_LIBS | sed -e 's|^SPEEX_LIBS =||'` `cat $(SHOUTLA) | grep dependency_libs | sed -e 's|^dependency_libs=||' | sed -e "s|'||g"`
|
||||
mod_shout_la_CPPFLAGS = $(CURL_CFLAGS) $(AM_CPPFLAGS) $(SHOUT_CFLAGS) $(MP3LAME_CFLAGS) $(MPG123_CFLAGS)
|
||||
mod_shout_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_shout_la_LDFLAGS = $(CURL_LIBS) -avoid-version -module -no-undefined -shared $(SHOUT_LDFLAGS) $(MP3LAME_LDFLAGS) $(MPG123_LDFLAGS)
|
||||
|
||||
BUILT_SOURCES=$(LAMELA) $(SHOUTLA) $(MPG123LA)
|
||||
|
||||
$(MPG123_DIR):
|
||||
$(GETLIB) $(MPG123).tar.gz
|
||||
if !HAVE_MP3LAME
|
||||
mod_shout_la_LDFLAGS += -lmp3lame
|
||||
mod_shout_la_CFLAGS += -I/usr/include/lame
|
||||
endif
|
||||
|
||||
$(MPG123_BUILDDIR)/Makefile: $(MPG123_DIR)
|
||||
mkdir -p $(MPG123_BUILDDIR)
|
||||
cd $(MPG123_BUILDDIR) && $(DEFAULT_VARS) $(MPG123_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(MPG123_DIR) CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libmpg123-dev to build mod_shout)
|
||||
endif
|
||||
|
||||
$(MPG123LA): $(MPG123_BUILDDIR)/Makefile
|
||||
cd $(MPG123_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(LAME_DIR):
|
||||
$(GETLIB) $(LAME).tar.gz
|
||||
|
||||
$(LAME_BUILDDIR)/Makefile: $(LAME_DIR)
|
||||
mkdir -p $(LAME_BUILDDIR)
|
||||
cd $(LAME_BUILDDIR) && $(DEFAULT_VARS) $(LAME_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --disable-decoder --srcdir=$(LAME_DIR) CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(LAMELA): $(LAME_BUILDDIR)/Makefile
|
||||
cd $(LAME_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(SHOUT_DIR):
|
||||
$(GETLIB) $(SHOUT).tar.gz
|
||||
patch -p 6 -d $(switch_srcdir)/libs/libshout-2.2.2 < $(switch_srcdir)/src/mod/formats/mod_shout/hack_out_ogg.diff
|
||||
|
||||
$(SHOUT_BUILDDIR)/Makefile: $(SHOUT_DIR)
|
||||
mkdir -p $(SHOUT_BUILDDIR)
|
||||
cd $(SHOUT_BUILDDIR) && $(DEFAULT_VARS) $(SHOUT_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(SHOUT_DIR) --without-speex --without-vorbis --without-ogg CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(SHOUTLA): $(SHOUT_BUILDDIR)/Makefile
|
||||
cd $(SHOUT_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libshout3-dev to build mod_shout)
|
||||
endif
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include "libmpg123/mpg123.h"
|
||||
#include "mpg123.h"
|
||||
#include <shout/shout.h>
|
||||
#include <lame.h>
|
||||
#include <switch_curl.h>
|
||||
|
|
Loading…
Reference in New Issue