Commit Graph

142 Commits

Author SHA1 Message Date
Stefan Weil
c89b1129d1 configure: Remove optimize option for preprocessor
It is only used by the compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 08:28:11 +02:00
Eric Platon
1642d882a7 Remove useless echo statement. 2018-04-13 10:04:00 +09:00
Eric Platon
708f55423b Add flag to build compiler options with G++ on macOS.
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.
2018-04-13 09:39:40 +09:00
Stefan Weil
ef31eaa7d7 Don't try to build manpages if asciidoc is missing
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>
2018-04-09 19:07:54 +02:00
Stefan Weil
f9157fd91d configure: Don't use AM_MAINTAINER_MODE by default
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>
2018-04-08 14:44:14 +02:00
Zdenko Podobný
af037c27e7 rename version.h.in because the filename is too general for distribution 2018-04-02 19:11:02 +02:00
Stefan Weil
6bbfc3b5fc Create version.h from available version information (#1432)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 14:32:30 +02:00
Stefan Weil
53a25713ca autoconf: Get version components from PACKAGE_VERSION (#1431)
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>
2018-03-27 09:46:08 +02:00
Stefan Weil
d087f20212 configure: Remove GIT_REV which is no longer used (#1416)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:20:13 +02:00
Stefan Weil
81c47288a2 configure: Use m4_esyscmd_s to suppress linefeed (fix needed for macOS) (#1401)
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>
2018-03-18 20:15:14 +01:00
Stefan Weil
8fb68746fb configure: Get version string from git or from VERSION file (#1380)
Use git to create the version string if possible.
Otherwise get the version from the VERSION file.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-12 21:38:46 +01:00
Stefan Weil
2d319cb8d3 configure: Update date, version and add project URL (#1379)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-12 19:53:00 +01:00
Stefan Weil
8130b8d346 Fix some typos in comments (found by codespell) (#1331)
Fix also a grammar issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-02-21 08:39:07 +01:00
amitdo
a905548ed6 Autotools build: Remove the option 'USING_MULTIPLELIBS'
Libtool's convenience libraries should never be installed. Fixes #985.
2017-09-11 15:03:53 +03:00
Ray Smith
fc6a390c6c Added intsimdmatrix as a generic integer matrixdotvector function with AVX2 and SSE specializations 2017-09-08 15:06:19 +01:00
zdenop
f29498ffd6 Merge pull request #1088 from Shreeshrii/master
makefile.am and apiexample_test
2017-09-05 20:40:00 +02:00
Stefan Weil
742b303548 Fix hint for training build
* Fix grammar.
* Fix text ("after building ..." is not necessary).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-08-19 21:35:55 +02:00
Shreeshrii
267734bc34 Changes needed for adding make check for unittest 2017-08-19 19:01:46 +05:30
Stefan Weil
5e3665c6ae Remove most libtiff dependencies
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>
2017-05-12 10:15:35 +02:00
Stefan Weil
31cb732a0f opencl: Add missing TIFF library for macOS
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>
2017-04-09 12:12:18 +02:00
Stefan Weil
e663d00fbe Support AVX for 32 bit platforms
_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>
2017-02-27 11:15:28 +01:00
Stefan Weil
b7ef3e0193 configure: Run AVX test only with 64 bit compiler
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>
2017-02-02 21:59:27 +01:00
Amit D
e6829546ae configure.ac: Exit if compiler does not have c++11 support 2017-01-08 19:00:58 +02:00
Zdenko Podobný
38cb4acaf9 require leptonica 1.74 or higher 2016-12-24 09:05:32 +01:00
Zdenko Podobný
02a6970cf3 autotools: test if compiler support -mavx and -msse4.1 2016-12-23 10:20:08 +01:00
Zdenko Podobný
54611c1cc8 increase min autoconf version (2.59). Fixes #598. 2016-12-23 09:32:51 +01:00
zdenop
d77a9b7375 Merge pull request #577 from stweil/config
Simplify configuration for Leptonica
2016-12-15 08:30:48 +01:00
Ray Smith
432684dd6e Makefile changes to remove cube 2016-12-14 10:58:24 -08:00
Stefan Weil
d70f3c3663 Simplify configuration for Leptonica
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>
2016-12-14 14:51:49 +01:00
Stefan Weil
3a5446bb52 Use pkg-config for Leptonica compiler flags
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>
2016-12-13 15:52:29 +01:00
Stefan Weil
a9b300dc1d Use pkg-config for icu compiler and linker flags
The old settings are used as fallback if there is no configuration.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-13 13:29:34 +01:00
Stefan Weil
6140be6a55 openmp: Fix build with clang++ and compilers without OpenMP support
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>
2016-12-04 18:44:03 +01:00
Ray Smith
9c7e99b041 Merged with commit 4ca6ba985b 2016-11-21 08:27:02 -08:00
Zdenko Podobný
a4615929ff allow combination of enable/disable 2016-11-11 22:03:16 +01:00
Ray Smith
c1c1e426b3 Added new LSTM-based neural network line recognizer 2016-11-07 15:38:07 -08:00
Stefan Weil
3f959e394c opencl: Add tiff library needed by openclwrapper
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>
2016-10-30 08:10:07 +01:00
Stefan Weil
fdf950babf configure: Don't use -Wno-uninitialized for debug builds
There is no good reason to suppress useful compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-30 15:36:18 +02:00
Marco Atzeri
b1c921b59e Fix Cygwin compatibility 2016-06-17 15:52:01 +03:00
Stefan Weil
4cbe9622d1 configure: Enclose most macro arguments in []
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>
2016-05-27 15:30:17 +02:00
Stefan Weil
1b9d0688fa configure: Fix check for dependencies needed for training
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>
2016-05-23 22:44:17 +02:00
Stefan Weil
ee5e1e972a configure: Fix cross compiler flags for cairo and pango
Calling pkg-config directly is a bad idea because it returns
the compiler flags for native builds.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-15 19:13:11 +02:00
Zdenko Podobný
bd424f6201 fix #289 mingw64 build 2016-03-23 17:24:21 +01:00
Zdenko Podobný
db9e194761 check for pdf support in leptonica 2016-03-15 14:22:24 +01:00
Zdenko Podobný
34f34eadb8 autotools: fail if g++ or clang++ compiler is not found; Fixes #130 2015-11-04 22:39:24 +01:00
Felix Janda
87c21aaa5c Detect presence of 'off_t' by configure test 2015-10-31 11:54:37 +01:00
zdenop
896db80f26 Merge pull request #108 from johnteslade/unicharset_extractor
Unicharset extractor problems with wchar
2015-10-05 21:49:03 +02:00
John Slade
2517ffefe7 configure.ac: Detect wchar_t using wchar.h header
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.
2015-10-05 11:20:34 +01:00
Zdenko Podobný
c4d52c77be Merge pull request #87 from jbarlow83/master
Get --enable-opencl to compile (but not work)
2015-09-01 17:43:38 +02:00
James R. Barlow
73b0297e5e Fix configure.ac unconditionally enabling OpenCL 2015-08-26 02:17:10 -07:00
James R. Barlow
18ac7ae7ef Get OpenCL to compile on OS X
However, the output of the OpenCL build is garbage....
2015-08-26 02:03:07 -07:00