configure.sh: Look for AFDKO.

Debian-like distributions install AFDKO's executables into libexec and
provide an `afdko` helper to call them.

Python's pip installs the executables in bin.

Let's support both.
This commit is contained in:
Arkadiusz Hiler 2021-06-11 00:52:10 +03:00 committed by Andrew Eikum
parent f55d7adcb1
commit 33814e973d
2 changed files with 18 additions and 3 deletions

View file

@ -46,6 +46,17 @@ dependency_command() {
fi
}
dependency_afdko() {
if command -v makeotf &> /dev/null; then
AFDKO_VERB=
elif command -v afdko &> /dev/null; then
AFDKO_VERB=afdko
else
err "Couldn't find 'afdko'. Install it and make sure that 'makeotf' is in your PATH or 'afdko makeotf' works."
MISSING_DEPENDENCIES=1
fi
}
#
# Configure
#
@ -90,6 +101,8 @@ function configure() {
dependency_command git
dependency_command python3
dependency_afdko
if [ "$MISSING_DEPENDENCIES" -ne 0 ]; then
die "Missing dependencies, cannot continue."
fi
@ -113,6 +126,8 @@ function configure() {
echo "DOCKER_OPTS := $arg_docker_opts"
fi
echo "AFDKO_VERB := $AFDKO_VERB"
# Include base
echo ""
echo "include \$(SRCDIR)/build/makefile_base.mak"