Browse Source

configure: absorb python3-mako check.

This is a better place for such checks than the Makefile, and we'll likely
have more in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 5 years ago
parent
commit
0fdf22988d
  1. 7
      Makefile
  2. 19
      configure

7
Makefile

@ -271,13 +271,6 @@ check-hdr-include-order/%: %
check-makefile:
@if [ x"$(CCANDIR)/config.h `find $(CCANDIR)/ccan -name '*.h' | grep -v /test/ | LC_ALL=C sort | tr '\n' ' '`" != x"$(CCAN_HEADERS) " ]; then echo CCAN_HEADERS incorrect; exit 1; fi
# Check if they've installed 'mako' dependency, useful for
# keeping your build from clobbering itself
check-bolt-dependency:
@python3 -c "import mako"
BOLT_DEPS += check-bolt-dependency
# Experimental quotes quote the exact version.
ifeq ($(EXPERIMENTAL_FEATURES),1)
CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)"

19
configure

@ -68,6 +68,22 @@ default_pytest()
done
}
require()
{
name="$1"
resolution="$2"
shift 2
echo -n "checking for $name... "
if "$@" 2>/dev/null; then
echo 'found'
return
fi
echo 'not found'
echo "$resolution" >&2
exit 1
}
default_valgrind_setting()
{
# Valgrind must accept all these options (might exit with error 7 though
@ -209,6 +225,9 @@ if [ "$ASAN" = "1" ]; then
fi
fi
# Doesn't set a var, but makes sure it exists
require 'python3-mako' "You need the mako module for python3: see doc/INSTALL.md" python3 -c 'import mako'
rm -f $CONFIG_VAR_FILE.$$
$CONFIGURATOR --extra-tests --autotools-style --var-file=$CONFIG_VAR_FILE.$$ --header-file=$CONFIG_HEADER --configurator-cc="$CONFIGURATOR_CC" "$CC" ${CWARNFLAGS-$BASE_WARNFLAGS} $CDEBUGFLAGS $COPTFLAGS <<EOF
var=HAVE_GOOD_LIBSODIUM

Loading…
Cancel
Save