libtiff is no longer needed for OpenCL, so remove that dependency.
It is still suggested for Windows to redirect warning messages
from the tesseract executable to the console.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The OpenCL code of Tesseract uses TIFF functions, but the TIFF library
was not added to the linker flags for macOS.
This fixes builds with OpenCL on Mac.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
_mm256_extract_epi64 is not available for 32 bit platforms,
but it can be replaced by "a very simple workaround".
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The current implementation for AVX uses 64 bit code,
so run the AVX test only when the compiler is a 64 bit compiler.
This fixes the broken implementation for 32 bit hosts
which provide AVX but call the stub of DotProductAVX.
Simplify also the conditional code for AVX_OPT and SSE41_OPT.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
All relevant versions of Leptonica support pkg-config, so the old
configuration code can be removed.
Update also the error message for missing Leptonica.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The old settings don't work for cross compilations (wrong include path)
or require setting LIBLEPT_HEADERSDIR. They are used as fallback if
there is no pkg-config configuration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Builds without support for OpenMP failed with the old code. Fix this:
* Add OPENMP_CXXFLAGS for ccmain.
* Replace unconditional -fopenmp by OPENMP_CXXFLAGS for lstm.
* Always use _OPENMP for conditional compilation.
* Remove OPENMP as there is already _OPENMP.
* Include omp.h conditionally.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
openclwrapper calls function TIFFReadRGBAImageOriented which is provided
by libtiff, so add that library to OPENCL_LIBS.
This fixes a linker error (unresolved symbol) when opencl is enabled.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This is not strictly necessary, but recommended in the GNU autoconf manual.
No [] was added to arguments like true or false.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The different checks had set ENABLE_TRAINING unconditionally,
thus overwriting the value from the preceding checks.
So if pango and cairo were available, but icu was missing,
users would still be offered to build the training tools.
The changes for icu and has_cpp11 are not strictly necessary,
but are made here to have uniform code patterns.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The wchar_t type is defined in `wchar.h` and if this header is not
included by autoconf the detection of the type will fail. This type is
required by `unicharset_extractor` to autogenerate the character
properties.
This problem was detected when running under Fedora 21.