configure.ac | 109 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 56 insertions(+), 53 deletions(-)
New commits: commit f351446ac8aea9dc27d200e7abe62250acfb05cd Author: Tor Lillqvist <t...@collabora.com> Date: Fri Aug 19 17:00:24 2016 +0300 Automatically avoid export validation if not using Java Change-Id: Ic1c917b16a8d812b3170b14890eacf3b9859cc2d diff --git a/configure.ac b/configure.ac index 847651b7..debeebd 100644 --- a/configure.ac +++ b/configure.ac @@ -4630,7 +4630,6 @@ if test "$cross_compiling" = "yes"; then --with-parallelism="$with_parallelism" \ --without-doxygen \ --without-java \ - --without-export-validation \ $sub_conf_opts \ --srcdir=$srcdir \ 2>&1 | sed -e 's/^/ /' @@ -7307,69 +7306,73 @@ dnl Export file validation dnl =================================================================== AC_MSG_CHECKING([whether to enable export file validation]) if test "$with_export_validation" = yes; then - if test "$HAVE_JAVA6" != "TRUE"; then - AC_MSG_ERROR([officeotron needs at least JRE 1.6; update or specify --without-export-validation]) - fi - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_EXPORT_VALIDATION) + if test -z "$ENABLE_JAVA"; then + AC_MSG_RESULT([no, as Java is disabled]) + else + if test "$HAVE_JAVA6" != "TRUE"; then + AC_MSG_ERROR([officeotron needs at least JRE 1.6; update or specify --without-export-validation]) + fi + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_EXPORT_VALIDATION) - AC_PATH_PROGS(ODFVALIDATOR, odfvalidator) - if test -z "$ODFVALIDATOR"; then - # remember to download the ODF toolkit with validator later - AC_MSG_NOTICE([no odfvalidator found, will download it]) - BUILD_TYPE="$BUILD_TYPE ODFVALIDATOR" - ODFVALIDATOR="$SRC_ROOT/bin/odfvalidator.sh" + AC_PATH_PROGS(ODFVALIDATOR, odfvalidator) + if test -z "$ODFVALIDATOR"; then + # remember to download the ODF toolkit with validator later + AC_MSG_NOTICE([no odfvalidator found, will download it]) + BUILD_TYPE="$BUILD_TYPE ODFVALIDATOR" + ODFVALIDATOR="$SRC_ROOT/bin/odfvalidator.sh" - # and fetch name of odfvalidator jar name from download.lst - ODFVALIDATOR_JAR=`$SED -n -e "s/export *ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst` - AC_SUBST(ODFVALIDATOR_JAR) + # and fetch name of odfvalidator jar name from download.lst + ODFVALIDATOR_JAR=`$SED -n -e "s/export *ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst` + AC_SUBST(ODFVALIDATOR_JAR) - if test -z "$ODFVALIDATOR_JAR"; then - AC_MSG_ERROR([cannot determine odfvalidator jar location (--with-export-validation)]) + if test -z "$ODFVALIDATOR_JAR"; then + AC_MSG_ERROR([cannot determine odfvalidator jar location (--with-export-validation)]) + fi fi - 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" - ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`" - else - ODFVALIDATOR="sh $ODFVALIDATOR" - fi - AC_SUBST(ODFVALIDATOR) + 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" + ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`" + else + ODFVALIDATOR="sh $ODFVALIDATOR" + fi + AC_SUBST(ODFVALIDATOR) - AC_PATH_PROGS(OFFICEOTRON, officeotron) - if test -z "$OFFICEOTRON"; then - # remember to download the officeotron with validator later - AC_MSG_NOTICE([no officeotron found, will download it]) - BUILD_TYPE="$BUILD_TYPE OFFICEOTRON" - OFFICEOTRON="$SRC_ROOT/bin/officeotron.sh" + AC_PATH_PROGS(OFFICEOTRON, officeotron) + if test -z "$OFFICEOTRON"; then + # remember to download the officeotron with validator later + AC_MSG_NOTICE([no officeotron found, will download it]) + BUILD_TYPE="$BUILD_TYPE OFFICEOTRON" + OFFICEOTRON="$SRC_ROOT/bin/officeotron.sh" - # and fetch name of officeotron jar name from download.lst - OFFICEOTRON_JAR=`$SED -n -e "s/export *OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst` - AC_SUBST(OFFICEOTRON_JAR) + # and fetch name of officeotron jar name from download.lst + OFFICEOTRON_JAR=`$SED -n -e "s/export *OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst` + AC_SUBST(OFFICEOTRON_JAR) - if test -z "$OFFICEOTRON_JAR"; then - AC_MSG_ERROR([cannot determine officeotron jar location (--with-export-validation)]) + if test -z "$OFFICEOTRON_JAR"; then + AC_MSG_ERROR([cannot determine officeotron jar location (--with-export-validation)]) + fi + else + # check version of existing officeotron + OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + if test 0"$OFFICEOTRON_VER" -lt 704; then + AC_MSG_ERROR([officeotron too old]) + fi fi - else - # check version of existing officeotron - OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - if test 0"$OFFICEOTRON_VER" -lt 704; then - AC_MSG_ERROR([officeotron too old]) + 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" + OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`" + else + OFFICEOTRON="sh $OFFICEOTRON" fi 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" - OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`" - else - OFFICEOTRON="sh $OFFICEOTRON" - fi AC_SUBST(OFFICEOTRON) else AC_MSG_RESULT([no]) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits