[Libreoffice-commits] core.git: configure.ac
Vasily Melenchuk
vasily.melenchuk at cib.de
Sat Jun 4 07:09:42 UTC 2016
configure.ac | 39 ++++++++++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 7 deletions(-)
New commits:
commit 21e0900061262ddc0eb4f91a23016af244848310
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
Date: Sat Jun 4 00:12:45 2016 +0200
Make doc validation work on Windows
Change-Id: I37a3c729db320abbb43664eeebaa0f46eb889197
Reviewed-on: https://gerrit.libreoffice.org/25885
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/configure.ac b/configure.ac
index 3f2744f..49e7c75 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
More information about the Libreoffice-commits
mailing list