aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-26 19:15:59 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-26 19:15:59 +0000
commitab59ca2d61776d1b67a3123a90ec02add5be1803 (patch)
tree33f5124fc375e3adf3b8f8805614ac850af60077
parent84033bcfff057b66838fd27161e62f35430f9835 (diff)
Use a special Makefile for noobs who still have GNU Make 3.80.
(Closes issue #17716) Reported by: farisraouf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@279561 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xconfigure10
-rw-r--r--configure.ac6
-rw-r--r--sounds/Makefile.380166
-rw-r--r--sounds/Makefile.381 (renamed from sounds/Makefile)0
4 files changed, 180 insertions, 2 deletions
diff --git a/configure b/configure
index 64dd20073..1c1af5045 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 268815 .
+# From configure.ac Revision: 278986 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk 1.6.2.
#
@@ -6712,6 +6712,12 @@ GNU_MAKE=$ac_cv_GNU_MAKE
+if test ${ac_cv_GNU_MAKE_VERSION_MAJOR} -gt 2 -a ${ac_cv_GNU_MAKE_VERSION_MINOR} -gt 80; then
+ $LN_S -f sounds/Makefile.381 sounds/Makefile
+else
+ $LN_S -f sounds/Makefile.380 sounds/Makefile
+fi
+
if test -n "$ac_tool_prefix"; then
for ac_prog in strip gstrip
do
@@ -10250,7 +10256,7 @@ if test "${with_sounds_cache+set}" = set; then
unset SOUNDS_CACHE_DIR
;;
*)
- if test "x${SOUNDS_CACHE_DIR}" = "x"; then
+ if test "x${withval}" = "x"; then
SOUNDS_CACHE_DIR="${HOME}/.asterisk_sounds_cache"
else
SOUNDS_CACHE_DIR="${withval}"
diff --git a/configure.ac b/configure.ac
index 7e3901a6d..84aaf8ab0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,6 +176,12 @@ AC_PROG_LN_S
AC_PROG_RANLIB
AST_CHECK_GNU_MAKE
+if test ${ac_cv_GNU_MAKE_VERSION_MAJOR} -gt 2 -a ${ac_cv_GNU_MAKE_VERSION_MINOR} -gt 80; then
+ $LN_S -f sounds/Makefile.381 sounds/Makefile
+else
+ $LN_S -f sounds/Makefile.380 sounds/Makefile
+fi
+
AC_CHECK_TOOLS([STRIP], [strip gstrip], :)
AC_CHECK_TOOLS([AR], [ar gar], :)
diff --git a/sounds/Makefile.380 b/sounds/Makefile.380
new file mode 100644
index 000000000..5392d52bf
--- /dev/null
+++ b/sounds/Makefile.380
@@ -0,0 +1,166 @@
+#
+# Asterisk -- A telephony toolkit for Linux.
+#
+# Makefile for sound files
+#
+# Copyright (C) 2006, Digium, Inc.
+#
+# Kevin P. Fleming <kpfleming@digium.com>
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License
+#
+
+.PHONY: dist-clean all uninstall have_download install
+
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
+
+SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
+MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
+CORE_SOUNDS_VERSION:=1.4.19
+EXTRA_SOUNDS_VERSION:=1.4.11
+SOUNDS_URL:=http://downloads.asterisk.org/pub/telephony/sounds/releases
+MCS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
+MCS:=$(subst -FR-,-fr-,$(MCS))
+MCS:=$(subst -ES-,-es-,$(MCS))
+MCS:=$(subst -WAV,-wav,$(MCS))
+MCS:=$(subst -ULAW,-ulaw,$(MCS))
+MCS:=$(subst -ALAW,-alaw,$(MCS))
+MCS:=$(subst -GSM,-gsm,$(MCS))
+MCS:=$(subst -G729,-g729,$(MCS))
+MCS:=$(subst -G722,-g722,$(MCS))
+MCS:=$(subst -SLN16,-sln16,$(MCS))
+MCS:=$(subst -SIREN7,-siren7,$(MCS))
+MCS:=$(subst -SIREN14,-siren14,$(MCS))
+CORE_SOUNDS:=$(MCS:CORE-SOUNDS-%=asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION).tar.gz)
+CORE_SOUND_TAGS:=$(MCS:CORE-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION))
+MES:=$(subst -EN-,-en-,$(MENUSELECT_EXTRA_SOUNDS))
+MES:=$(subst -FR-,-fr-,$(MES))
+MES:=$(subst -ES-,-es-,$(MES))
+MES:=$(subst -WAV,-wav,$(MES))
+MES:=$(subst -ULAW,-ulaw,$(MES))
+MES:=$(subst -ALAW,-alaw,$(MES))
+MES:=$(subst -GSM,-gsm,$(MES))
+MES:=$(subst -G729,-g729,$(MES))
+MES:=$(subst -G722,-g722,$(MES))
+MES:=$(subst -SLN16,-sln16,$(MES))
+MES:=$(subst -SIREN7,-siren7,$(MES))
+MES:=$(subst -SIREN14,-siren14,$(MES))
+EXTRA_SOUNDS:=$(MES:EXTRA-SOUNDS-%=asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION).tar.gz)
+EXTRA_SOUND_TAGS:=$(MES:EXTRA-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION))
+MM:=$(subst -OPSOUND-,-opsound-,$(MENUSELECT_MOH))
+MM:=$(subst -WAV,-wav,$(MM))
+MM:=$(subst -ULAW,-ulaw,$(MM))
+MM:=$(subst -ALAW,-alaw,$(MM))
+MM:=$(subst -GSM,-gsm,$(MM))
+MM:=$(subst -G729,-g729,$(MM))
+MM:=$(subst -G722,-g722,$(MM))
+MM:=$(subst -SLN16,-sln16,$(MM))
+MM:=$(subst -SIREN7,-siren7,$(MM))
+MM:=$(subst -SIREN14,-siren14,$(MM))
+MOH:=$(MM:MOH-%=asterisk-moh-%.tar.gz)
+MOH_TAGS:=$(MM:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
+# If "fetch" is used, --continue is not a valid option.
+ifneq ($(findstring wget,$(WGET)),)
+WGET_ARGS:=--continue $(WGET_EXTRA_ARGS)
+endif
+
+all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
+
+have_download:
+ @if test "$(DOWNLOAD)" = ":" ; then \
+ echo "**************************************************"; \
+ echo "*** ***"; \
+ echo "*** You must have either wget or fetch to be ***"; \
+ echo "*** able to automatically download and install ***"; \
+ echo "*** the requested sound packages. ***"; \
+ echo "*** ***"; \
+ echo "*** Please install one of these, or remove any ***"; \
+ echo "*** extra sound package selections in ***"; \
+ echo "*** menuselecct before installing Asterisk. ***"; \
+ echo "*** ***"; \
+ echo "**************************************************"; \
+ exit 1; \
+ fi
+
+$(SOUNDS_DIR)/.asterisk-core-sounds-en-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/en; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/es; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/fr; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/en; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/es; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: have_download
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ (cd $(SOUNDS_DIR)/fr; cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+$(MOH_DIR)/.asterisk-moh-%: have_download
+ @PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ (cd $(MOH_DIR); cat $(CURDIR)/$${PACKAGE} | gzip -d | tar xof -) && \
+ touch $@
+
+asterisk-core-%.tar.gz: have_download
+ @if test ! -f $@ && test ! -f $(SOUNDS_DIR)/.$(subst .tar.gz,,$@) ; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$@;fi
+
+asterisk-extra-%.tar.gz: have_download
+ @if test ! -f $@ && test ! -f $(SOUNDS_DIR)/.$(subst .tar.gz,,$@) ; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$@;fi
+
+asterisk-moh-%.tar.gz: have_download
+ @if test ! -f $@ && test ! -f $(MOH_DIR)/.$(subst .tar.gz,,$@) ; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$@;fi
+
+dist-clean:
+ rm -f *.tar.gz
+
+$(SOUNDS_DIR)/en $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr:
+ mkdir -p $@
+
+install: $(SOUNDS_DIR)/en $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
+
+uninstall:
+ rm -rf $(SOUNDS_DIR)
+ rm -rf $(MOH_DIR)
+
+core_sounds_version:
+ @echo $(CORE_SOUNDS_VERSION)
+
+extra_sounds_version:
+ @echo $(EXTRA_SOUNDS_VERSION)
diff --git a/sounds/Makefile b/sounds/Makefile.381
index f0beabd3c..f0beabd3c 100644
--- a/sounds/Makefile
+++ b/sounds/Makefile.381