summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-28 20:23:02 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-06-20 09:35:09 +0200
commit39567b97ee270327b7bd9ad6277549963ae04077 (patch)
tree75e5ecdf3aa8ba3dd56db6eeacfc9e8623c46fcb /configure.ac
parent9d241cb1723a165960ba14183fd8e3c580c71241 (diff)
tdf#114635: reimplement TWAIN-based scan using 32-bit shim on Windows
Since TWAIN is only actually available as 32-bit component on Windows, to use it in a 64-bit program, we need a 32-bit shim program that does all actual communication with TWAIN subsystem. This change reimplements TWAIN implementation to be a separate 32-bit process. Image is transfered from the shim to main program using file mapping API. This reverts most of commit 585d9806961342e95f7318fb947bd31e9f86dee0. 64-bit LibreOffice doesn't bundle TWAIN DSM library now. TWAIN DSM source code is still used for TWAIN headers. Change-Id: I46f178ad36acd97a9eff156624b99036fcbb83f8 Reviewed-on: https://gerrit.libreoffice.org/65688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/74415 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d12895d157bf..3ab3dd329890 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3612,6 +3612,29 @@ if test "$_os" = "WINNT"; then
# These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
AC_SUBST(CXX_X64_BINARY)
AC_SUBST(LINK_X64_BINARY)
+
+ # Check for 32-bit compiler to use to build the 32-bit TWAIN shim
+ # needed to support TWAIN scan on both 32- and 64-bit systems
+
+ BUILD_X86=
+ CXX_X86_BINARY=
+
+ if test "$BITNESS_OVERRIDE" = "64"; then
+ AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries required for TWAIN support])
+ if "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/HostX86/x86/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X86=TRUE
+ CXX_X86_BINARY="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/HostX86/x86/cl.exe -arch:SSE"
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_WARN([Installation set will not contain 32-bit binaries required for TWAIN support])
+ fi
+ else
+ BUILD_X86=TRUE
+ CXX_X86_BINARY=$MSVC_CXX
+ fi
+ AC_SUBST(BUILD_X86)
+ AC_SUBST(CXX_X86_BINARY)
fi
AC_SUBST(VCVER)
AC_SUBST(DEVENV)