fix mpg123 for non-linux (bug #3385)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-01-21 04:52:01 +00:00
parent 540a2571ca
commit b3ee85ee4a

View File

@@ -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 OPTIONS+=-fomit-frame-pointer
endif endif
MPG123TARG=linux
endif endif
ifeq ($(findstring BSD,${OSARCH}),BSD) ifeq ($(findstring BSD,${OSARCH}),BSD)
@@ -142,11 +143,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) LIBS+=$(shell if test ${OSVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
INCLUDE+=-I/usr/local/include INCLUDE+=-I/usr/local/include
CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi) CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
MPG123TARG=freebsd
endif # FreeBSD endif # FreeBSD
ifeq (${OSARCH},NetBSD) ifeq (${OSARCH},NetBSD)
CFLAGS+=-pthread CFLAGS+=-pthread
INCLUDE+=-I/usr/local/include -I/usr/pkg/include INCLUDE+=-I/usr/local/include -I/usr/pkg/include
MPG123TARG=netbsd
endif endif
ifeq (${OSARCH},OpenBSD) ifeq (${OSARCH},OpenBSD)
@@ -307,7 +310,7 @@ clean:
rm -f build.h rm -f build.h
rm -f ast_expr.c rm -f ast_expr.c
@if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi @if [ -e 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 db1-ast clean
$(MAKE) -C stdtime clean $(MAKE) -C stdtime clean
@@ -405,7 +408,7 @@ bininstall: all
fi fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . ) ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . )
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . ) ( 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 " +---- Asterisk Installation Complete -------+"
@echo " + +" @echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +" @echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@@ -518,7 +521,7 @@ mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false ) @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 [ -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 [ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
make -C mpg123-0.59r linux $(MAKE) -C mpg123-0.59r $(MPG123TARG)
config: config:
if [ -d /etc/rc.d/init.d ]; then \ if [ -d /etc/rc.d/init.d ]; then \
@@ -542,7 +545,7 @@ depend: .depend
FORCE: FORCE:
%_env: %_env:
make -C $(shell echo $@ | sed "s/_env//g") env $(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
env: env:
env env