summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2016-06-14 18:00:16 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-06-15 13:54:37 +0000
commitb6e7ddcc7e6eec4957c1c069d0c22eb1dbb3bb28 (patch)
treeb0a6ef7a14fa4112e40985c5db6f575b5b12bb83 /configure.ac
parentFix per-view CppunitTest_libreofficekit_tiledrendering (diff)
downloadcore-b6e7ddcc7e6eec4957c1c069d0c22eb1dbb3bb28.tar.gz
core-b6e7ddcc7e6eec4957c1c069d0c22eb1dbb3bb28.zip
Add MS binary format validator support
bffvalidator (Microsoft Office Binary File Format Validator) basic support in configure for later usage in export tests. It should be installed from https://www.microsoft.com/en-us/download/details.aspx?id=26794 and enabled in configure with new switch --with-bffvalidator=<optional path to validator> Change-Id: I6faa08d3277f0328b3dfa310222a11d115e5aa15 Reviewed-on: https://gerrit.libreoffice.org/25870 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 401a8ae4acd5..97794c8903d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2031,6 +2031,14 @@ AC_ARG_WITH(export-validation,
See https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/export-validation]),
,)
+AC_ARG_WITH(bffvalidator,
+ AS_HELP_STRING([--with-bffvalidator=<absolute path to BFFValidator>],
+ [Enables export validation for Microsoft Binary formats (doc, xls, ppt).
+ Requires installed Microsoft Office Binary File Format Validator.
+ Note: export-validation (--with-export-validation) is required to be turned on.
+ See https://www.microsoft.com/en-us/download/details.aspx?id=26794]),
+,with_bffvalidator=no)
+
AC_ARG_WITH(junit,
AS_HELP_STRING([--with-junit=<absolute path to JUnit 4 jar>],
[Specifies the JUnit 4 jar file to use for JUnit-based tests.
@@ -2763,6 +2771,37 @@ if test "$with_export_validation" = yes; then
AC_MSG_ERROR([officeotron too old])
fi
AC_SUBST(OFFICEOTRON)
+
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([for Microsoft Binary File Format Validator])
+if test "$with_bffvalidator" != "no"; then
+ AC_DEFINE(HAVE_BFFVALIDATOR)
+
+ if test "$with_export_validation" != "yes"; then
+ AC_MSG_ERROR([Please enable export validation (-with-export-validation)!])
+ fi
+
+ if test "$with_bffvalidator" = "yes"; then
+ BFFVALIDATOR=`win_short_path_for_make "$PROGRAMFILES/Microsoft Office/BFFValidator/BFFValidator.exe"`
+ else
+ BFFVALIDATOR="$with_bffvalidator"
+ fi
+
+ if test "$build_os" = "cygwin"; then
+ if test -n "$BFFVALIDATOR" -a -e "`cygpath $BFFVALIDATOR`"; then
+ AC_MSG_RESULT($BFFVALIDATOR)
+ else
+ AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+ fi
+ elif test -n "$BFFVALIDATOR" -a -e "$BFFVALIDATOR"; then
+ AC_MSG_RESULT($BFFVALIDATOR)
+ else
+ AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+ fi
+ AC_SUBST(BFFVALIDATOR)
else
AC_MSG_RESULT([no])
fi