summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-08-16 10:45:36 +0000
committerAndre Fischer <af@apache.org>2012-08-16 10:45:36 +0000
commit39ca53381a03676402d3a8c27c05b8400888118e (patch)
tree720df5653c6bbb60b04dbf8d8affde164d498873
parent5f0f155fd0c6a27abe876fb38ba4f4bc5c3571db (diff)
#i120589# Improved detection of missing perl modules.
Notes
-rw-r--r--configure.in19
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 2f1ff78a6224..d72ef43a11d9 100644
--- a/configure.in
+++ b/configure.in
@@ -1958,12 +1958,27 @@ AC_SUBST(PERL)
dnl ===================================================================
dnl Testing for required Perl modules
+dnl The list of required Perl modules is documented here:
+dnl http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements
dnl ===================================================================
AC_MSG_CHECKING([for required Perl modules])
-if `$PERL -e 'use Archive::Zip; use LWP::UserAgent;'`; then
+if `$PERL -e 'use Archive::Zip; use LWP::UserAgent; use XML::Parser;'>/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 LWP::UserAgent;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules LWP::UserAgent"
+ fi
+ if ! `$PERL -e 'use XML::Parser;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules XML::Parser"
+ 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 ===================================================================