summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSamuel Thibault <sthibault@hypra.fr>2018-02-21 15:51:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-02-28 22:54:21 +0100
commit84ef6d82546b044990f4efd57e51e29c6c6565c8 (patch)
tree8f6d9e140c2d3731bb4a44eb58d09e359ab33ca6 /configure.ac
parente215310d6b531b8af39c86639ef88495470681bc (diff)
Build external lxml if not provided by system
except on windows, where gla11y will resort to python's internal xml parser, which does not provide line numbers. This allows gla11y to be runnable on all systems. Change-Id: Ica4eb90f59bddfcefd783fc2ed9c8c27357e7572 Reviewed-on: https://gerrit.libreoffice.org/50115 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 26 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 245aa7724434..f407c743babb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8147,19 +8147,36 @@ if test $enable_python = system; then
PYTHON_FOR_BUILD=$PYTHON
fi
-dnl By now enable_python should be "system", "internal" or "no"
-PYTHON_LXML=
-case $enable_python in
-system)
- SYSTEM_PYTHON=TRUE
-
+if -z "$PYTHON_FOR_BUILD"; then
+ case $build_os in
+ cygwin)
+ AC_MSG_WARN([No system-provided python lxml, gla11y will only report widget classes and ids])
+ ;;
+ *)
+ BUILD_TYPE="$BUILD_TYPE LXML"
+ ;;
+ esac
+else
AC_MSG_CHECKING([for python lxml])
- if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" ; then
- PYTHON_LXML=TRUE
+ if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" 2> /dev/null ; then
AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no, will not be able to check UI accessibility])
+ case $build_os in
+ cygwin)
+ AC_MSG_RESULT([no, gla11y will only report widget classes and ids])
+ ;;
+ *)
+ BUILD_TYPE="$BUILD_TYPE LXML"
+ AC_MSG_RESULT([no, using internal lxml])
+ ;;
+ esac
fi
+fi
+
+dnl By now enable_python should be "system", "internal" or "no"
+case $enable_python in
+system)
+ SYSTEM_PYTHON=TRUE
dnl Check if the headers really work
save_CPPFLAGS="$CPPFLAGS"
@@ -8222,7 +8239,6 @@ AC_SUBST(DISABLE_PYTHON)
AC_SUBST(SYSTEM_PYTHON)
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
-AC_SUBST(PYTHON_LXML)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_VERSION_MAJOR)
AC_SUBST(PYTHON_VERSION_MINOR)