From 3470e79f83a431fa815dad6d2e3788715f148fcb Mon Sep 17 00:00:00 2001 From: Malcolm Davenport Date: Thu, 8 Jan 2004 16:52:11 +0000 Subject: [PATCH] Add the SuSE AMD64 support and fixes from Bug #706 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1904 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 16 ++++++---------- codecs/gsm/Makefile | 6 ++++++ codecs/lpc10/Makefile | 2 ++ frame.c | 3 ++- redhat/asterisk.spec | 11 +++++++---- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 92dbdb153c..2e0982139f 100755 --- a/Makefile +++ b/Makefile @@ -388,13 +388,13 @@ samples: all datafiles adsi install $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \ done mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX - :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm + :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \ - cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm ; \ + cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \ done :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \ - cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm ; \ + cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \ done webvmail: @@ -428,13 +428,9 @@ __rpm: _version $(MAKE) DESTDIR=/tmp/asterisk samples ; \ mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \ cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \ - cp -f redhat/rpmrc /tmp/asterisk/ ; \ - cp -f redhat/rpmmacros /tmp/asterisk/ ; \ - sed "s/Version:/Version: $(RPMVERSION)/g" redhat/asterisk.spec > /tmp/asterisk/asterisk.spec ; \ - rpm --rcfile /usr/lib/rpm/rpmrc:/tmp/asterisk/rpmrc -bb /tmp/asterisk/asterisk.spec ; \ - mv /tmp/asterisk/redhat/RPMS/i386/asterisk* ./ ; \ - rm -rf /tmp/asterisk - + sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \ + rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec + progdocs: doxygen asterisk-ng-doxygen diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index 490f3938c3..a81bcf985f 100755 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -38,8 +38,10 @@ WAV49 = -DWAV49 ######### probably require gcc. ifneq (${OSARCH},Darwin) +ifneq (${PROC},x86_64) OPTIMIZE+=-march=$(PROC) endif +endif PG = #PG = -g -pg @@ -194,8 +196,10 @@ GSM_SOURCES = $(SRC)/add.c \ $(SRC)/short_term.c \ $(SRC)/table.c ifeq (${OSARCH},Linux) +ifneq (${PROC},x86_64) GSM_SOURCES+= $(SRC)/k6opt.s endif +endif TOAST_SOURCES = $(SRC)/toast.c \ $(SRC)/toast_lin.c \ @@ -241,8 +245,10 @@ GSM_OBJECTS = $(SRC)/add.o \ $(SRC)/short_term.o \ $(SRC)/table.o ifeq (${OSARCH},Linux) +ifneq (${PROC},x86_64) GSM_OBJECTS+= $(SRC)/k6opt.o endif +endif TOAST_OBJECTS = $(SRC)/toast.o \ $(SRC)/toast_lin.o \ diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile index 42ff106381..e9dbd9d02d 100755 --- a/codecs/lpc10/Makefile +++ b/codecs/lpc10/Makefile @@ -28,9 +28,11 @@ CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC #fix for PPC processors ifneq ($(OSARCH),Darwin) ifneq ($(PROC),ppc) +ifneq ($(PROC),x86_64) CFLAGS+= -march=$(PROC) endif endif +endif LIB = $(LIB_TARGET_DIR)/liblpc10.a diff --git a/frame.c b/frame.c index 5d7d8bde12..97fe683d5c 100755 --- a/frame.c +++ b/frame.c @@ -455,7 +455,8 @@ static int show_codecs(int fd, int argc, char *argv[]) return RESULT_SHOWUSAGE; if (getenv("I_AM_NOT_AN_IDIOT") == NULL) - ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n\tIt does not indicate anything about your configuration.\n"); + ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n" + "\tIt does not indicate anything about your configuration.\n"); if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) { found = 1; diff --git a/redhat/asterisk.spec b/redhat/asterisk.spec index 0d663428cc..ce60dc76e3 100755 --- a/redhat/asterisk.spec +++ b/redhat/asterisk.spec @@ -65,6 +65,8 @@ ln -sf /var/spool/asterisk/vm /var/lib/asterisk/sounds/vm %attr(0644,root,root) /var/lib/asterisk/sounds/*.gsm %attr(0755,root,root) %dir /var/lib/asterisk/sounds/digits %attr(0644,root,root) /var/lib/asterisk/sounds/digits/*.gsm +%attr(0755,root,root) %dir /var/lib/asterisk/mohmp3 +%attr(0644,root,root) /var/lib/asterisk/mohmp3/* %attr(0755,root,root) %dir /var/lib/asterisk/images %attr(0644,root,root) /var/lib/asterisk/images/* %attr(0755,root,root) %dir /var/lib/asterisk/keys @@ -76,7 +78,8 @@ ln -sf /var/spool/asterisk/vm /var/lib/asterisk/sounds/vm # Example voicemail files # %attr(0755,root,root) %dir /var/spool/asterisk -%attr(0755,root,root) %dir /var/spool/asterisk/vm -%attr(0755,root,root) %dir /var/spool/asterisk/vm/1234 -%attr(0755,root,root) %dir /var/spool/asterisk/vm/1234/INBOX -%attr(0644,root,root) /var/spool/asterisk/vm/1234/*.gsm +%attr(0755,root,root) %dir /var/spool/asterisk/voicemail +%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default +%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234 +%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234/INBOX +%attr(0644,root,root) /var/spool/asterisk/voicemail/default/1234/*.gsm