summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-08-16 10:45:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-28 17:03:22 +0100
commitec3fafa60efa8f4bec1ca53e5bbe0e7b2be61f54 (patch)
treed1237d904245c23ebc0993e10a7658530a6651d8
parent6e9b9e61ee2e1aab7abfa6a6cf01c269b3f02cb8 (diff)
Resolves: #i120589# Improved detection of missing perl modules
(cherry picked from commit 39ca53381a03676402d3a8c27c05b8400888118e) Conflicts: configure.in Change-Id: I2f5d18c98693daa29a19345f56faaf7d1ae3c34a
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index dcff809c1a89..7ce517b31c07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4671,13 +4671,26 @@ dnl Testing for required Perl modules
dnl ===================================================================
AC_MSG_CHECKING([for required Perl modules])
-if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'`; then
+if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'>/dev/null 2>&1`; then
AC_MSG_RESULT([all modules found])
else
AC_MSG_ERROR([Failed to find some modules])
+ # Find out which modules are missing.
+ missing_perl_modules=
+ if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then
+ missing_perl_modules=Archive::Zip
+ fi
+ if ! `$PERL -e 'use Cwd;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules Cwd"
+ fi
+ if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules Digest::MD5"
+ fi
+ AC_MSG_ERROR([
+ The missing Perl modules are: $missing_perl_modules
+ Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
fi
-
dnl ===================================================================
dnl Check for pkg-config
dnl ===================================================================