summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-11-16 11:05:43 -0700
committerGeorge Joseph <gjoseph@digium.com>2016-11-18 08:01:21 -0500
commit2a40c3a8679f1a02d88c48f0424fa41df09203a8 (patch)
tree98e1fc41d230cfe8eb4c4b00f8c4910bd4893ad0 /configure.ac
parent0790aa528a902b49de9aff8232ff4c7a97ea6fda (diff)
pjproject_bundled: Improve reliability of pjproject download
The download process now has a timeout which will cause wget to retry if it stops retrieving data for 5 seconds and fetch and curl to timeout if the whole retrieval take smore than 30 seconds. If the tarball retrieval works, the MD5SUM file is retrieved from the downloads site and the md5 checksum is verified. If either the tarball retrieval or MD5SUM retrieval fails, or the checksums don't match, the entire process is retried once. If it fails again, any incomplete tarball is deleted. .DELETE_ON_ERROR: was also added to the Makefile. Not only does this delete the tarball on failure, it till also delete corrupted library files from the pjproject source directory should they fail to build correctly. Tested all the way back to FreeBSD 9, CentOS 6, Debian 6 and Ubuntu 14. Change-Id: Iea7d33b96a31622ab1b6e54baebaf271959514e1
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e4a20cfa5..ec7536a77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,7 @@ AC_SUBST(GNU_LD)
AC_PATH_PROG([BISON], [bison], :)
AC_PATH_PROG([CMP], [cmp], :)
+AC_PATH_PROG([CAT], [cat], :)
AC_PATH_PROG([FLEX], [flex], :)
AC_PATH_PROG([GREP], [grep], :)
AC_PATH_PROG([PYTHON], [python], :)
@@ -294,18 +295,23 @@ AC_PATH_PROG([NM], [nm], :)
if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET}
DOWNLOAD_TO_STDOUT="${WGET} -O-"
+ DOWNLOAD_TIMEOUT='--timeout=$1'
else if test "${CURL}" != ":" ; then
DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
DOWNLOAD_TO_STDOUT="${CURL} -L --progress-bar -w \"%{url_effective}\n\""
+ DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
else
AC_PATH_PROG([FETCH], [fetch], [:])
DOWNLOAD=${FETCH}
DOWNLOAD_TO_STDOUT="${FETCH} -o-"
+ DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
fi
fi
AC_SUBST(DOWNLOAD)
AC_SUBST(DOWNLOAD_TO_STDOUT)
+AC_SUBST(DOWNLOAD_TIMEOUT)
+
AC_PATH_PROG([LDCONFIG], [ldconfig], :)
AC_PATH_PROG([SHA1SUM], [sha1sum], $ac_aux_dir/build_tools/sha1sum-sh)
AC_PATH_PROG([OPENSSL], [openssl], :)