fi
fi
-# Check that the Perl installation is complete enough to build
-# host-autoconf.
-if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then
- echo "Your Perl installation is not complete enough, at least Data::Dumper is missing."
- echo "On Debian/Ubuntu distributions, install the 'perl' package."
+# Check that the Perl installation is complete enough for Buildroot.
+required_perl_modules="Data::Dumper" # Needed to build host-autoconf
+required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake
+
+# This variable will keep the modules that are missing in your system.
+missing_perl_modules=""
+
+for pm in $required_perl_modules ; do
+ if ! perl -e "require $pm" > /dev/null 2>&1 ; then
+ missing_perl_modules="$missing_perl_modules $pm"
+ fi
+done
+
+if [ -n "$missing_perl_modules" ] ; then
+ echo "Your Perl installation is not complete enough; at least the following"
+ echo "modules are missing:"
+ echo
+ for pm in $missing_perl_modules ; do
+ printf "\t $pm\n"
+ done
+ echo
exit 1
fi