if fdt is required, and the system DTC (libfdt) is not usable, check for the dtc submodule requirements before trying to build it, and error out with a helpful message in case the dependencies are not met.
Signed-off-by: Claudio Fontana <cfont...@suse.de> --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 22870f3867..68b95b8e94 100755 --- a/configure +++ b/configure @@ -4276,6 +4276,14 @@ EOF git_submodules="${git_submodules} dtc" fi if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then + for binary in ${BISON:-bison} ${LEX:-flex} ; do + if ! has $binary ; then + error_exit "DTC (libfdt) version >= 1.4.2 not present on the system,\n" \ + "and using the dtc submodule replacement requires '${binary}'.\n" \ + "Please install the DTC (libfdt) devel package,\n" \ + "or the required binary '${binary}' to use the dtc submodule instead.\n" + fi + done fdt=git mkdir -p dtc if [ "$pwd_is_source_path" != "y" ] ; then -- 2.16.4