mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -07:00
1fd6a4bfc2
The `which` command is not part of the posix standard and not available in some environments. The `command` command is part of the posix standard and well supported. See https://unix.stackexchange.com/q/85249 for a discussion about the use of `command` instead of `which`. If a system had `libtool` but not `which`, the build process would issue an erroneous error stating: libtool is required, but wasn't found on this system Switching to `command` corrects this problem.
37 lines
759 B
Bash
Executable File
37 lines
759 B
Bash
Executable File
#! /bin/sh
|
|
|
|
if glibtoolize --version > /dev/null 2>&1; then
|
|
LIBTOOLIZE='glibtoolize'
|
|
else
|
|
LIBTOOLIZE='libtoolize'
|
|
fi
|
|
|
|
command -v command >/dev/null 2>&1 || {
|
|
echo "command is required, but wasn't found on this system"
|
|
exit 1
|
|
}
|
|
|
|
command -v $LIBTOOLIZE >/dev/null 2>&1 || {
|
|
echo "libtool is required, but wasn't found on this system"
|
|
exit 1
|
|
}
|
|
|
|
command -v autoconf >/dev/null 2>&1 || {
|
|
echo "autoconf is required, but wasn't found on this system"
|
|
exit 1
|
|
}
|
|
|
|
command -v automake >/dev/null 2>&1 || {
|
|
echo "automake is required, but wasn't found on this system"
|
|
exit 1
|
|
}
|
|
|
|
if autoreconf --version > /dev/null 2>&1 ; then
|
|
exec autoreconf -ivf
|
|
fi
|
|
|
|
$LIBTOOLIZE && \
|
|
aclocal && \
|
|
automake --add-missing --force-missing --include-deps && \
|
|
autoconf
|