intltool: make dependency on XML::Parser optional

Patch `configure` and the shipped `intltool.m4` macro file to make a missing
XML::Parser perl module nonfatal.

All utilities provided by intltool are programmed to fail gracefully at run
time if the module cannot be loaded and those utilities commonly used during
the build do not require it at all.

Also drop the the build-prereq on XML::Parser now that it is optional.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich
2016-05-30 16:27:03 +02:00
parent 083a6ece5d
commit 818a2cc8d6
2 changed files with 24 additions and 9 deletions
@@ -0,0 +1,22 @@
--- a/configure.in
+++ b/configure.in
@@ -25,7 +25,7 @@ AC_MSG_CHECKING([for XML::Parser])
if `$PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
fi
AC_OUTPUT([
--- a/intltool.m4
+++ b/intltool.m4
@@ -127,7 +127,7 @@ if test "x$2" != "xno-xml"; then
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
fi
fi