Skip to content

Commit

Permalink
Make config.sub and config.guess +w before download
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Sep 9, 2018
1 parent edbd57a commit fc5a731
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions TestScripts/cryptest-autotools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,21 @@ if [[ -z $(command -v autoreconf) ]]; then
echo "Cannot find autoreconf. Things may fail."
fi

echo "Running autoupdate"
if ! autoupdate 2>/dev/null; then
echo "autoupdate failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi

echo "Running libtoolize"
if ! "$LIBTOOLIZE" 2>/dev/null; then
echo "libtoolize failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi

# Run autoreconf twice on failure. Also see
# https://github.com/tracebox/tracebox/issues/57
echo "Running autoreconf"
if ! autoreconf 2>/dev/null; then
echo "autoreconf failed, running again."
if ! autoreconf -fi; then
Expand All @@ -88,6 +91,14 @@ if ! autoreconf 2>/dev/null; then
fi
fi

# Sparc need +w
if [[ -e config.sub ]]; then
chmod +w config.sub
fi
if [[ -e config.guess ]]; then
chmod +w config.guess
fi

# Update config.sub config.guess. GNU recommends using the latest for all projects.
echo "Updating config.sub"
wget --no-check-certificate 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub' -O config.sub
Expand Down

0 comments on commit fc5a731

Please sign in to comment.