Building with G++ on Darwin breaks when either AVX, AVX2, or SSE4.1
compiler option is set, unless G++ is actually CLANG.
This commit allows to build with G++, by asking G++ to delegate assembly
to the clang integrated assembler, instead of the GNU one.
Commit f9157fd91d changed the rules for
the documentation, so make always tried to build it and failed if
asciidoc was missing since that commit.
Now configure tests whether asciidoc is available and builds the
documentation conditionally. It also reports that to the user.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
That macro disables automated updates when configure.ac or a Makefile.am
changes. Normally those updates are wanted because users typically
forget running ./autogen.sh.
See also the GNU documentation why AM_MAINTAINER_MODE should not be used:
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
Signed-off-by: Stefan Weil <sw@weilnetz.de>
AX_SPLIT_VERSION only works after AM_INIT_AUTOMAKE, so that macro had
to be moved.
GENERIC_MAJOR_VERSION, GENERIC_MINOR_VERSION and GENERIC_MICRO_VERSION
are now set automatically and can be used in further processing.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
While "echo -n" works on Debian GNU Linux, it fails to produce a valid
configure file on macOS, so try a different shorter solution.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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.