summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-08-09 07:01:33 -0600
committerGeorge Joseph <gjoseph@digium.com>2017-08-09 07:01:33 -0600
commit363d61ef588a3782cde94f0050a2c58b900592a7 (patch)
treef147107c188c11830e5cf0d1c618a9f38e3c2154 /configure
parent0493f0846894a8b4a597646750d95fdb76686efd (diff)
configure: Add --with-download-cache option
To make building without an internet connection easier, a new ./configure option '--with-download-cache' was added that sets the cache for externals (like pjproject, the codecs and the DPMA), AND the sounds files. It can also be specified as an environment variable named "AST_DOWNLOAD_CACHE". The existing '--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and '--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable remain and if specified, will override '--with-downloads-cache'. Change-Id: I5c3cf15ee61e8fe191b52732303e969854f8d861
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 32 insertions, 3 deletions
diff --git a/configure b/configure
index 50b2ff8af..8308b9ef6 100755
--- a/configure
+++ b/configure
@@ -1200,6 +1200,7 @@ AST_NESTED_FUNCTIONS
AST_CODE_COVERAGE
EXTERNALS_CACHE_DIR
SOUNDS_CACHE_DIR
+AST_DOWNLOAD_CACHE
AST_DEVMODE_STRICT
AST_DEVMODE
NOISY_BUILD
@@ -1353,6 +1354,7 @@ ac_user_opts='
enable_option_checking
with_gnu_ld
enable_dev_mode
+with_download_cache
with_sounds_cache
with_externals_cache
enable_coverage
@@ -2096,6 +2098,9 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-download-cache=PATH
+ use cached sound AND external module tarfiles in
+ PATH
--with-sounds-cache=PATH
use cached sound tarfiles in PATH
--with-externals-cache=PATH
@@ -9016,6 +9021,30 @@ fi
+# Check whether --with-download-cache was given.
+if test "${with_download_cache+set}" = set; then :
+ withval=$with_download_cache;
+ case ${withval} in
+ n|no)
+ unset AST_DOWNLOAD_CACHE
+ ;;
+ *)
+ if test "x${withval}" = "x"; then
+ :
+ else
+ AST_DOWNLOAD_CACHE="${withval}"
+ fi
+ ;;
+ esac
+
+else
+ :
+fi
+
+
+
+
+
# Check whether --with-sounds-cache was given.
if test "${with_sounds_cache+set}" = set; then :
withval=$with_sounds_cache;
@@ -9278,11 +9307,11 @@ $as_echo "configuring" >&6; }
PJPROJECT_CONFIGURE_OPTS+=" --host=$host"
fi
- export TAR PATCH SED NM EXTERNALS_CACHE_DIR DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT
+ export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT
export NOISY_BUILD
${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
- EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" \
+ EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
configure
if test $? -ne 0 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
@@ -9295,7 +9324,7 @@ $as_echo "$as_me: Unable to configure ${PJPROJECT_DIR}" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled pjproject" >&5
$as_echo_n "checking for bundled pjproject... " >&6; }
- PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" echo_cflags)
+ PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)
PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"
PBX_PJPROJECT=1