Skip to content
Snippets Groups Projects
Commit 677eedfe authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix mpg123 build on non-linux (bug #3385)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent fb69d9c8
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1
OPTIONS+=-fomit-frame-pointer
endif
MPG123TARG=linux
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
......@@ -151,11 +152,13 @@ CFLAGS+=$(shell if test ${OSVERSION} -lt 500016 ; then echo "-D_THREAD_SAFE"; fi
LIBS+=$(shell if test ${OSVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
INCLUDE+=-I/usr/local/include
CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
MPG123TARG=freebsd
endif # FreeBSD
ifeq (${OSARCH},NetBSD)
CFLAGS+=-pthread
INCLUDE+=-I/usr/local/include -I/usr/pkg/include
MPG123TARG=netbsd
endif
ifeq (${OSARCH},OpenBSD)
......@@ -334,7 +337,7 @@ clean:
rm -f ast_expr.c
rm -f .version
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
@if [ -d mpg123-0.59r ]; then make -C mpg123-0.59r clean; fi
@if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
$(MAKE) -C db1-ast clean
$(MAKE) -C stdtime clean
......@@ -429,7 +432,7 @@ bininstall: all
echo "You need to do cvs update -d not just cvs update" ; \
fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
if [ -f mpg123-0.59r/mpg123 ]; then make -C mpg123-0.59r install; fi
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
......@@ -555,7 +558,7 @@ mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false )
[ -f mpg123-0.59r.tar.gz ] || wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
[ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
make -C mpg123-0.59r linux
$(MAKE) -C mpg123-0.59r $(MPG123TARG)
config:
if [ -d /etc/rc.d/init.d ]; then \
......@@ -579,7 +582,7 @@ depend: .depend
FORCE:
%_env:
make -C $(shell echo $@ | sed "s/_env//g") env
$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
env:
env
......@@ -591,6 +594,6 @@ env:
cleantest:
if ! cmp -s .cleancount .lastclean ; then \
make clean; cp -f .cleancount .lastclean;\
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment