summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2016-06-04 00:12:45 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-06-04 07:09:19 +0000
commit21e0900061262ddc0eb4f91a23016af244848310 (patch)
tree94865975e42a4ba9e2125cac79fd1a5ded390c2b /configure.ac
parent4e3dc8c141c2efd037c1f214b5edff071812b6a8 (diff)
Make doc validation work on Windows
Change-Id: I37a3c729db320abbb43664eeebaa0f46eb889197 Reviewed-on: https://gerrit.libreoffice.org/25885 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 32 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 3f2744f4a00a..49e7c751e701 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2733,14 +2733,39 @@ if test "$with_export_validation" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_EXPORT_VALIDATION)
- AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator)
- if test -z "$ODFVALIDATOR"; then
- AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
- fi
+ if test "$build_os" = "cygwin"; then
+ # In case of CygWin it will be executed from Windows,
+ # so we need to run bash and absolute path to validator
+ # so instead of "odfvalidator" it will be
+ # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+ AC_PATH_PROGS(ODFVALIDATOR, odfvalidator)
+ if test -z "$ODFVALIDATOR"; then
+ AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
+ fi
+ ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
+ else
+ AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator)
+ if test -z "$ODFVALIDATOR"; then
+ AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
+ fi
+ fi
AC_SUBST(ODFVALIDATOR)
- AC_CHECK_PROGS(OFFICEOTRON, officeotron)
- if test -z "$OFFICEOTRON"; then
- AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
+
+ if test "$build_os" = "cygwin"; then
+ # In case of CygWin it will be executed from Windows,
+ # so we need to run bash and absolute path to validator
+ # so instead of "officeotron" it will be
+ # something like "bash.exe C:\cygwin\opt\lo\bin\officeotron"
+ AC_PATH_PROGS(OFFICEOTRON, officeotron)
+ if test -z "$OFFICEOTRON"; then
+ AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
+ fi
+ OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`"
+ else
+ AC_CHECK_PROGS(OFFICEOTRON, officeotron)
+ if test -z "$OFFICEOTRON"; then
+ AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
+ fi
fi
OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
if test 0"$OFFICEOTRON_VER" -lt 704; then