Merged revisions 263724,267819 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r263724 | tilghman | 2010-05-17 18:49:15 -0500 (Mon, 17 May 2010) | 8 lines
  
  Cache sound tarfiles in a common directory, such that a clean reinstall does not force a re-download of the tarballs.
  
  (closes issue #15370)
   Reported by: pprindeville
   Patches: 
         asterisk-trunk-bugid15370.patch uploaded by pprindeville (license 347)
   Tested by: pprindeville, tilghman, seanbright
........
  r267819 | tilghman | 2010-06-03 20:36:46 -0500 (Thu, 03 Jun 2010) | 2 lines
  
  If there's a default, turn it on, even when the option isn't specified.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@267820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.2
Tilghman Lesher 16 years ago
parent 5de8e8a0b0
commit 461eb8f60b

@ -36,6 +36,28 @@ AC_DEFUN([AST_EXT_LIB_SETUP],
AC_SUBST([PBX_$1])
])
# AST_OPTION_ONLY([option name], [option variable], [option description], [default value])
AC_DEFUN([AST_OPTION_ONLY],
[
AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH], [use $3 in PATH]),
[
case ${withval} in
n|no)
unset $2
;;
*)
if test "x${$2}" = "x"; then
m4_ifval($4, [$2="$4"], [:])
else
$2="${withval}"
fi
;;
esac
],
[m4_ifval($4, [$2="$4"])])
AC_SUBST($2)
])
# AST_EXT_LIB_SETUP_DEPENDENT([package symbol name], [package friendly name], [master package symbol name], [master package option name])
AC_DEFUN([AST_EXT_LIB_SETUP_DEPENDENT],

54
configure vendored

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision: 265748 .
# From configure.ac Revision: 267787 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk trunk.
# Generated by GNU Autoconf 2.61 for asterisk 1.6.2.
#
# Report bugs to <https://issues.asterisk.org>.
#
@ -577,8 +577,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='asterisk'
PACKAGE_TARNAME='asterisk'
PACKAGE_VERSION='trunk'
PACKAGE_STRING='asterisk trunk'
PACKAGE_VERSION='1.6.2'
PACKAGE_STRING='asterisk 1.6.2'
PACKAGE_BUGREPORT='https://issues.asterisk.org'
ac_unique_file="main/asterisk.c"
@ -908,6 +908,7 @@ RESAMPLE_LIB
RESAMPLE_INCLUDE
RESAMPLE_DIR
PBX_RESAMPLE
SOUNDS_CACHE_DIR
SPANDSP_LIB
SPANDSP_INCLUDE
SPANDSP_DIR
@ -1549,7 +1550,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures asterisk trunk to adapt to many kinds of systems.
\`configure' configures asterisk 1.6.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1614,7 +1615,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of asterisk trunk:";;
short | recursive ) echo "Configuration of asterisk 1.6.2:";;
esac
cat <<\_ACEOF
@ -1674,6 +1675,8 @@ Optional Packages:
--with-pwlib=PATH use PWlib files in PATH
--with-radius=PATH use Radius Client files in PATH
--with-resample=PATH use LIBRESAMPLE files in PATH
--with-sounds-cache=PATH
use cached sound tarfiles in PATH
--with-spandsp=PATH use SPANDSP files in PATH
--with-ss7=PATH use ISDN SS7 files in PATH
--with-speex=PATH use Speex files in PATH
@ -1772,7 +1775,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
asterisk configure trunk
asterisk configure 1.6.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1788,7 +1791,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by asterisk $as_me trunk, which was
It was created by asterisk $as_me 1.6.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@ -10201,6 +10204,30 @@ fi
# Check whether --with-sounds-cache was given.
if test "${with_sounds_cache+set}" = set; then
withval=$with_sounds_cache;
case ${withval} in
n|no)
unset SOUNDS_CACHE_DIR
;;
*)
if test "x${SOUNDS_CACHE_DIR}" = "x"; then
SOUNDS_CACHE_DIR="${HOME}/.asterisk_sounds_cache"
else
SOUNDS_CACHE_DIR="${withval}"
fi
;;
esac
else
SOUNDS_CACHE_DIR="${HOME}/.asterisk_sounds_cache"
fi
SPANDSP_DESCRIP="SPANDSP"
SPANDSP_OPTION="spandsp"
PBX_SPANDSP=0
@ -43222,7 +43249,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by asterisk $as_me trunk, which was
This file was extended by asterisk $as_me 1.6.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -43271,7 +43298,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
asterisk config.status trunk
asterisk config.status 1.6.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@ -43812,11 +43839,11 @@ RESAMPLE_LIB!$RESAMPLE_LIB$ac_delim
RESAMPLE_INCLUDE!$RESAMPLE_INCLUDE$ac_delim
RESAMPLE_DIR!$RESAMPLE_DIR$ac_delim
PBX_RESAMPLE!$PBX_RESAMPLE$ac_delim
SOUNDS_CACHE_DIR!$SOUNDS_CACHE_DIR$ac_delim
SPANDSP_LIB!$SPANDSP_LIB$ac_delim
SPANDSP_INCLUDE!$SPANDSP_INCLUDE$ac_delim
SPANDSP_DIR!$SPANDSP_DIR$ac_delim
PBX_SPANDSP!$PBX_SPANDSP$ac_delim
SS7_LIB!$SS7_LIB$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -43858,6 +43885,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
SS7_LIB!$SS7_LIB$ac_delim
SS7_INCLUDE!$SS7_INCLUDE$ac_delim
SS7_DIR!$SS7_DIR$ac_delim
PBX_SS7!$PBX_SS7$ac_delim
@ -43954,7 +43982,6 @@ PBX_MISDN_FAC_RESULT!$PBX_MISDN_FAC_RESULT$ac_delim
PBX_MISDN_FAC_ERROR!$PBX_MISDN_FAC_ERROR$ac_delim
CONFIG_NETSNMP!$CONFIG_NETSNMP$ac_delim
PG_CONFIG!$PG_CONFIG$ac_delim
PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -43996,6 +44023,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim
PWLIBDIR!$PWLIBDIR$ac_delim
PWLIB_INCDIR!$PWLIB_INCDIR$ac_delim
PWLIB_LIBDIR!$PWLIB_LIBDIR$ac_delim
@ -44021,7 +44049,7 @@ PBX_GENERIC_ODBC!$PBX_GENERIC_ODBC$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

@ -8,7 +8,7 @@
AC_PREREQ(2.60)
AC_INIT([asterisk], [trunk], [https://issues.asterisk.org])
AC_INIT([asterisk], [1.6.2], [https://issues.asterisk.org])
# Allow the --help=recursive option to function correctly
AC_CONFIG_SUBDIRS([menuselect])
@ -340,6 +340,7 @@ AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconne
AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
AST_OPTION_ONLY([sounds-cache], [SOUNDS_CACHE_DIR], [cached sound tarfiles], [${HOME}/.asterisk_sounds_cache])
AST_EXT_LIB_SETUP([SPANDSP], [SPANDSP], [spandsp])
AST_EXT_LIB_SETUP([SS7], [ISDN SS7], [ss7])
AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])

@ -23,6 +23,7 @@ STRIP=@STRIP@
WGET=@WGET@
FETCH=@FETCH@
DOWNLOAD=@DOWNLOAD@
SOUNDS_CACHE_DIR=@SOUNDS_CACHE_DIR@
RUBBER=@RUBBER@
CATDVI=@CATDVI@
KPATHSEA=@KPATHSEA@

@ -15,7 +15,9 @@
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
CMD_PREFIX?=@
SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
SOUNDS_CACHE_DIR?=
MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
CORE_SOUNDS_VERSION:=1.4.19
EXTRA_SOUNDS_VERSION:=1.4.11
@ -66,7 +68,64 @@ ifneq ($(findstring wget,$(WGET)),)
WGET_ARGS:=--continue $(WGET_EXTRA_ARGS)
endif
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
EMPTY:=
BS:=$(EMPTY)\$(EMPTY)
ifneq ($(SOUNDS_CACHE_DIR),)
define sound_format_lang_rule
$$($(1))/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download
$(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; $(BS)
if test ! -f $$$${PACKAGE}; then $(BS)
if test ! -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}; then $(BS)
(cd $$(SOUNDS_CACHE_DIR); ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} $$(SOUNDS_URL)/$$$${PACKAGE}.sha1 $(BS)
&& sha1sum -c --status $$$${PACKAGE}.sha1) || $(BS)
(echo "Bad checksum: $$$${PACKAGE}" 1>&2; exit 1)); $(BS)
fi; $(BS)
cp -p $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} .; $(BS)
fi; $(BS)
$(if $($(4)_VERSION),\
$(EMPTY) rm -f $$(subst -$$($(4)_VERSION),,$$@)-* && $(BS)
,) (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && $(BS)
touch $$@
endef
define sound_download_rule
asterisk-$(1)-%.tar.gz: have_download
$(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$/$@); then $(BS)
if test ! -f $$(SOUNDS_CACHE_DIR)/$$@; then $(BS)
(cd $$(SOUNDS_CACHE_DIR); ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@ $$(SOUNDS_URL)/$$@.sha1 $(BS)
&& sha1sum -c --status $$@.sha1) || $(BS)
(echo "Bad checksum: $$@" 1>&2; exit 1)); $(BS)
fi; $(BS)
cp -p $$(SOUNDS_CACHE_DIR)/$$@ .; $(BS)
fi
endef
else
define sound_format_lang_rule
$$($(1))/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download
$(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; $(BS)
if test ! -f $$$${PACKAGE}; then $(BS)
($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} || exit 1); $(BS)
fi; $(BS)
$(if $($(4)_VERSION),\
$(EMPTY) rm -f $$(subst -$$($(4)_VERSION),,$$@)-* && $(BS)
,) (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && $(BS)
touch $$@
endef
define sound_download_rule
asterisk-$(1)-%.tar.gz: have_download
$(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$$@); then $(BS)
$$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@; $(BS)
fi
endef
endif
all: $(SOUNDS_CACHE_DIR) $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
have_download:
@if test "$(DOWNLOAD)" = ":" ; then \
@ -84,78 +143,33 @@ have_download:
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; \
rm -f $(subst -$(MOH_VERSION),,$@)-* && \
(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
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,core-sounds,en,CORE_SOUNDS))
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,core-sounds,es,CORE_SOUNDS))
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,core-sounds,fr,CORE_SOUNDS))
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,extra-sounds,en,EXTRA_SOUNDS))
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,extra-sounds,es,EXTRA_SOUNDS))
$(eval $(call sound_format_lang_rule,SOUNDS_DIR,extra-sounds,fr,EXTRA_SOUNDS))
$(eval $(call sound_format_lang_rule,MOH_DIR,moh,,MOH))
$(eval $(call sound_download_rule,core))
$(eval $(call sound_download_rule,extra))
$(eval $(call sound_download_rule,moh))
dist-clean:
rm -f *.tar.gz
$(SOUNDS_DIR)/en $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr:
$(SOUNDS_DIR)/en $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(SOUNDS_CACHE_DIR):
mkdir -p $@
install: $(SOUNDS_DIR)/en $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
install: ${SOUNDS_CACHE_DIR} $(SOUNDS_DIR)/en $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
uninstall:
rm -rf $(SOUNDS_DIR)

Loading…
Cancel
Save