Attempt to use glibtool if available
parent
fdc3045e34
commit
c4ef77bcdb
|
|
@ -27,7 +27,18 @@ if [[ ! -z $(command -v gmake) ]]; then
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Feth the three required files
|
# Fixup for missing libtool
|
||||||
|
if [[ ! -z $(command -v libtoolize) ]]; then
|
||||||
|
LIBTOOLIZE=$(command -v libtoolize)
|
||||||
|
elif [[ ! -z $(command -v glibtoolize) ]]; then
|
||||||
|
LIBTOOLIZE=$(command -v glibtoolize)
|
||||||
|
elif [[ ! -z $(command -v libtool) ]]; then
|
||||||
|
LIBTOOLIZE=$(command -v libtool)
|
||||||
|
elif [[ ! -z $(command -v glibtool) ]]; then
|
||||||
|
LIBTOOLIZE=$(command -v glibtool)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fecth the three required files
|
||||||
if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am -O Makefile.am; then
|
if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am -O Makefile.am; then
|
||||||
echo "Makefile.am download failed"
|
echo "Makefile.am download failed"
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||||
|
|
@ -43,16 +54,13 @@ if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryp
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run autoreconf twice on failure. Also see
|
|
||||||
# https://github.com/tracebox/tracebox/issues/57
|
|
||||||
|
|
||||||
mkdir -p m4/
|
mkdir -p m4/
|
||||||
|
|
||||||
if [[ -z $(command -v autoupdate) ]]; then
|
if [[ -z $(command -v autoupdate) ]]; then
|
||||||
echo "Cannot find autoupdate. Things may fail."
|
echo "Cannot find autoupdate. Things may fail."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $(command -v libtoolize) ]]; then
|
if [[ -z "$LIBTOOLIZE" ]]; then
|
||||||
echo "Cannot find libtoolize. Things may fail."
|
echo "Cannot find libtoolize. Things may fail."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -65,13 +73,16 @@ if ! autoupdate; then
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! autoreconf -fi; then
|
if ! "$LIBTOOLIZE"; then
|
||||||
echo "autoreconf failed, running libtoolize."
|
|
||||||
if ! libtoolize -fi; then
|
|
||||||
echo "libtoolize failed."
|
echo "libtoolize failed."
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||||
fi
|
fi
|
||||||
if ! autoreconf -vfi; then
|
|
||||||
|
# Run autoreconf twice on failure. Also see
|
||||||
|
# https://github.com/tracebox/tracebox/issues/57
|
||||||
|
if ! autoreconf; then
|
||||||
|
echo "autoreconf failed, running again."
|
||||||
|
if ! autoreconf -fi; then
|
||||||
echo "autoreconf failed, again."
|
echo "autoreconf failed, again."
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue