Commit Graph

300 Commits

Author SHA1 Message Date
Stefan Weil
cafb1bbfd7 automake: Flat build for src/api
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-11-26 16:20:46 +01:00
Stefan Weil
7ef20bb0e6 Use flat make for include/tesseract
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-29 12:01:51 +01:00
Stefan Weil
061eccd6ae Rename tesseract/tess_version.h -> tesseract/version.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-29 11:47:31 +01:00
amitdo
2f8884a64e Fix autotools build 2019-10-28 21:23:58 +02:00
Stefan Weil
94651e65ce Simplify configure.ac
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-01 12:32:08 +02:00
Stefan Weil
286d8275c7 Add support for image or image list by URL
This allows OCR of images from the internet without downloading them first:

    tesseract http://IMAGE_URL OUTPUT ...

It uses libcurl.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-01 12:10:45 +02:00
Zdenko Podobný
fef64d795c fix #2101 2019-07-13 20:11:03 +02:00
Stefan Weil
2d5b166876 Add dot product implementation for Intel FMA (double = tessdata_best)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-12 23:18:00 +02:00
Stefan Weil
676b18834c Fix check for icu 52.1 or newer
It detected old versions but did not disable the training build.
This completes commit 66da4df11d.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 10:55:33 +02:00
Stefan Weil
674d6a90d8 Remove code for embedded build
That code is unrelated to Tesseract and can be easily implemented
by external projects which require it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 09:55:33 +02:00
Stefan Weil
ca885da5d3 Use C++17 compiler if possible
This allows using new features of C++17 conditionally.
Simplify also the code which checks and sets the C++ version.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-31 10:40:56 +02:00
Stefan Weil
3c9691f286 configure: Fix cross builds (check for TensorFlow header)
AC_CHECK_FILE does not work in cross builds. Such builds aborted.
Replace it by AC_CHECK_HEADERS. This fixes cross builds.

To enable TensorFlow in cross builds, more work is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-26 17:46:44 +02:00
Raphael Graf
dacba02cd8 Do not link librt on OpenBSD 2019-05-25 18:08:55 +02:00
Stefan Weil
32dcfd06ba Replace Tensorflow by TensorFlow
The name is written in camel case, see https://www.tensorflow.org/.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-24 17:14:28 +02:00
Stefan Weil
2441e4d8ac Implement check for Tensorflow header file
This looks for one of the header files which are included by Tesseract.
It currently uses a hard coded path which works for Debian / Ubuntu.

Simplify also the rules for linking Tensorflow.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-24 16:52:14 +02:00
Stefan Weil
4382ab1a34 Support build with Tensorflow
It expects include files in /usr/include/tensorflow.

* Add configure option --with-tensorflow (disabled by default)
* Fix data type tensorflow::int64
* Remove "third_party/" in include statements
* Add dummy implementations for Backward and DebugWeights in TFNetwork
* Add files generated with protoc from tfnetwork.proto
  (so the Tensorflow sources are not needed for the build)
* Update Makefiles

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-24 14:11:31 +02:00
Stefan Weil
c926bdb265 configure: Use a hopefully more robust way to fix AX_CHECK_COMPILE_FLAG
The check for -Wno-extra-semi-stmt failed on Linux with clang++-7.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-21 20:21:05 +02:00
Stefan Weil
d6c1fa766c configure: Fix for clang++-8 and newer
AX_CHECK_COMPILE_FLAG fails if it is used with -Werror and the compiler
raises error -Wextra-semi-stmt:

    configure:4224: checking whether C++ compiler accepts -mavx
    configure:4243: clang++-8 -c -g -O2 -Wall -Wextra -Wpedantic -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -march=native -Werror -Wno-unused-macros -mavx  conftest.cpp >&5
    conftest.cpp:20:3: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
      ;
      ^
    1 error generated.

Add -Wno-extra-semi-stmt to disable those errors if possible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-20 10:52:39 +02:00
Stefan Weil
7917ffb6c2 configure: Fix for latest developer tools on macOS
AX_CHECK_COMPILE_FLAG fails if it is used with -Werror and the compiler
raises error -Wunused-macros. Add -Wno-unused-macros to disable those
errors if possible.

Simplify also the setting of several conditionals (AVX, AVX2, ...).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-14 22:31:23 +02:00
James R. Barlow
403361701a Fix CPPFLAGS configuration for icu4c and libarchive missing from configure.ac 2019-05-07 02:01:20 -07:00
Zdenko Podobný
3bbe4327c0 fix #2344 libpthread under-linking on FreeBSD 2019-03-27 15:37:14 +01:00
Stefan Weil
4ccbb9f830 configure: Check support of compile flags with -Werror
gcc fails if an unsupported compile flag is given, but clang and clang++
normally only emit a warning "argument unused during compilation".

The old test had accepted flags like -mavx for clang++ on non Intel hosts.
This resulted in build failures because Intel code was included.

Now the check runs with -Werror, and unsupported flags are detected as
an error. This fixes the build problem with clang++ on non Intel hosts.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-26 16:41:52 +01:00
Stefan Weil
1c7e00611b Add initial support for traineddata files in standard archive formats
This requires libarchive-dev.

Tesseract can now load traineddata files in any of the archive formats
which are supported by libarchive. Example of a zipped BagIt archive:

    $ unzip -l /usr/local/share/tessdata/zip.traineddata
    Archive:  /usr/local/share/tessdata/zip.traineddata
      Length      Date    Time    Name
    ---------  ---------- -----   ----
           55  2019-03-05 15:27   bagit.txt
            0  2019-03-05 15:25   data/
         1557  2019-03-05 15:28   manifest-sha256.txt
      1082890  2019-03-05 15:25   data/eng.word-dawg
      1487588  2019-03-05 15:25   data/eng.lstm
         7477  2019-03-05 15:25   data/eng.unicharset
        63346  2019-03-05 15:25   data/eng.shapetable
       976552  2019-03-05 15:25   data/eng.inttemp
        13408  2019-03-05 15:25   data/eng.normproto
         4322  2019-03-05 15:25   data/eng.punc-dawg
         4738  2019-03-05 15:25   data/eng.lstm-number-dawg
         1410  2019-03-05 15:25   data/eng.freq-dawg
          844  2019-03-05 15:25   data/eng.pffmtable
         6360  2019-03-05 15:25   data/eng.lstm-unicharset
         1012  2019-03-05 15:25   data/eng.lstm-recoder
         1047  2019-03-05 15:25   data/eng.unicharambigs
         4322  2019-03-05 15:25   data/eng.lstm-punc-dawg
     16109842  2019-03-05 15:25   data/eng.bigram-dawg
           80  2019-03-05 15:25   data/eng.version
         6426  2019-03-05 15:25   data/eng.number-dawg
      3694794  2019-03-05 15:25   data/eng.lstm-word-dawg
    ---------                     -------
     23468070                     21 files

`combine_tessdata -d` and `combine_tessdata -u` also work.

The traineddata files in the new format can be generated with
standard tools like zip or tar.

More work is needed for other training tools and big endian support.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-05 17:18:48 +01:00
Stefan Weil
42ea432418 configure: Check for xsltproc (needed to generate manpages)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-02-15 22:19:52 +01:00
Stefan Weil
fd6e281c61 Use C++14 compiler if possible
This allows using new features of C++14 conditionally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-02-13 11:05:34 +01:00
Stefan Weil
b3327f4e90 Remove unneeded checks for snprintf
snprintf is a standard function which should be available
on all relevant platforms, so those checks are unnecessary.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-02-13 08:04:52 +01:00
Stefan Weil
66da4df11d configure: Remove header check for ICU
It wrongly detects old versions of ICU as valid.
Checking with pkg-config is sufficient and also sets ICU_UC_LIBS.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-02-01 10:06:34 +01:00
Stefan Weil
2ccc5810f3 Add check whether compiler supports -march=native flag
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-12-05 20:13:28 +01:00
Guillaume Gigaud
92b8833838
fix(configure) Don't add rt on Android
Library rt is included in the libc on Android: https://developer.android.com/ndk/guides/stable_apis#a3
2018-11-15 13:56:28 +01:00
zdenop
cdfb768010 move langtests and unlvtests from tesseract-ocr repository to test repository 2018-11-08 22:31:32 +01:00
zdenop
51316994cc 4.0.0 Release 2018-10-29 09:53:12 +01:00
Marco Atzeri
ebbd4e3efc fixes #426; define NOUNDEFINED for cygwin 2018-10-20 11:25:28 +02:00
zdenop
d9372662ec add "sudo ldconfig" to install instruction. fixes #1212 2018-09-29 13:33:36 +02:00
Stefan Weil
be1393b1e8 Replace macro MINGW by __MINGW32__
MINGW is no longer used and now removed from configure.ac.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-04 16:05:27 +02:00
Shree Devi Kumar
92922b421c Add langtests framework with frk example 2018-08-30 14:28:34 +00:00
Stefan Weil
b15624eb2f Fix regression (shared libraries no longer supported)
The first usage of AC_CHECK_HEADERS must be unconditional,
otherwise configure fails to detect support for shared libraries.

This fixes a regression introduced by commit a07025c993.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-21 11:06:38 +02:00
Stefan Weil
58208522f0 configure: Clean code for --enable-visibility
* Remove unneeded arguments for AC_ARG_ENABLE
* Use [] instead of () for default in help text

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
a07025c993 configure: Clean code for --enable-opencl
* Remove unneeded arguments for AC_ARG_ENABLE
* Use AS_HELP_STRING
* Use [] instead of () for default in help text
* Run AC_CHECK_HEADERS, AC_CHECK_LIB only if OpenCL support is enabled

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
0ad6e3e77f configure: Clean code for --enable-legacy
* Remove unneeded arguments for AC_ARG_ENABLE
* Fix formatting of help text
* Remove help text for --enable-legacy

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
e47a9272d7 configure: Clean code for --enable-graphics
* Remove unneeded arguments for AC_ARG_ENABLE
* Remove help text for --enable-graphics

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
cfc5ef65a2 configure: Clean code for --enable-embedded
* Remove unneeded arguments for AC_ARG_ENABLE
* Use AS_HELP_STRING
* Use [] instead of () for default in help text

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
11cafd7673 configure: Clean code for --enable-debug
* Remove unneeded arguments for AC_ARG_ENABLE (needs renaming of macro)
* Use [] instead of () for default in help text

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:33:28 +02:00
Stefan Weil
11d9d8e59a configure: Remove macro AC_SYS_INTERPRETER
The macro sets interpval which is not used by Tesseract.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:19:58 +02:00
Stefan Weil
0a4edf618a configure: Remove large file support
Tesseract does not handle large files (more than 2 GiB).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:19:58 +02:00
Stefan Weil
4bbebd3f7e Remove tests for function getline
The Tesseract code does not use getline.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-19 16:19:58 +02:00
Stefan Weil
081793ff48 Fix build with legacy engine disabled
Instead of defining the DISABLED_LEGACY_ENGINE macro in config_auto.h
(which is not included by all source files), define it as a preprocessor
option for those parts of the code which require it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-04 17:56:42 +02:00
amitdo
aa9f4b4861 Add an option to compile tesseract without the code of the legacy OCR engine 2018-07-03 18:49:42 +03:00
Stefan Weil
c1c87d73ee Require tesseract/ for API header files (fixes potential name conflicts)
The tesseract/ subdirectory is no longer automatically added to the
include path of the compiler. Therefore old code which used code like

    #include "capi.h"

must now change that to

    #include "tesseract/capi.h"

This avoids name conflicts with header files from other projects.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-17 22:01:19 +02:00
Shree Devi Kumar
2563380d51 move testing and testdata to test, add unlvtests 2018-06-06 12:20:14 +00:00
Egor Pugin
104fe7931c Move training to src. 2018-04-25 11:35:26 +03:00
Egor Pugin
e95ff1159e Move sources into src dir. Update build scripts. 2018-04-25 11:02:54 +03:00
Eric Platon
4ded0d066e Revert failed attempt to support MacPort's g++
The support will require more work, and postpone for now.
2018-04-24 08:38:17 +09:00
Eric Platon
54b048fa0d Fix wrong environment test that breaks clang++ builds.
g++ builds require extra flags rejected by clang++. The bug is that the
flags are actually added unconditionally. This commit fixes the
condition.

See https://github.com/tesseract-ocr/tesseract/pull/1474
2018-04-23 16:11:24 +09:00
Stefan Weil
3b3216e883 Support version names starting with non numeric characters
Not only version names like 4.0.0, but also version names like
v4.0.0 or tesseract-4.0.0 are now supported and give the same
GENERIC_MAJOR_VERSION = 4.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-22 16:43:35 +02:00
Amit D
822082eeba
configure.ac: Remove obsolete macros
The newer macros that replace the obsolete ones are already present in configure.ac.

  * AC_PROG_LIBTOOL -> LT_INIT
  * AC_LANG_CPLUSPLUS -> AC_LANG([C++])
2018-04-20 03:31:08 +03:00
Amit D
20254ae5b5
configure.ac: Update minimum required autoconf version to 2.63
This is the autoconf version shipped in RHEL/CentOS 6.
2018-04-19 19:11:43 +03:00
Amit D
cf7c88dc93
configure.ac: Check for the presence of pango 1.22.0 or higher
Tesseract's training tool text2image uses these two functions: 
pango_glyph_item_iter_init_start
pango_glyph_item_iter_next_cluster

That means it requires Pango >=1.22.0:
https://developer.gnome.org/pango/stable/api-index-1-22.html
https://developer.gnome.org/pango/stable/pango-Glyph-Storage.html#pango-glyph-item-iter-init-start
https://developer.gnome.org/pango/stable/pango-Glyph-Storage.html#pango-glyph-item-iter-next-cluster
2018-04-17 14:46:16 +03:00
Amit D
98747b37ea
configure.ac - check for the present of icu 52.1 or higher 2018-04-17 12:05:50 +03:00
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
James R. Barlow
8476d0bc6b Fix missing "allheaders.h" when compiling with --enable-opencl on OS X 2015-08-26 00:47:59 -07:00
James R. Barlow
71f747f668 Fix configure.ac for OS X and -framework 2015-08-26 00:10:56 -07:00
Zdenko Podobný
f331a57b8e fix OpenCL build on Mac 2015-08-25 20:57:49 +02:00
Zdenko Podobný
f81c258e14 rename README to README.md - fixes #45 2015-08-20 13:58:36 +02:00
Zdenko Podobný
bb19f2c16b Fixes #76 - enable OpenMP support 2015-08-14 21:39:40 +02:00
Zdenko Podobný
41478fd5a1 implement build without cube (-DNO_CUBE_BUILD) 2015-07-24 11:51:44 +02:00
Jim O'Regan
6368a37da6 libicui18n is only called libicuin on mingw, not cygwin 2015-07-24 00:16:55 +01:00
Zdenko Podobný
abf0981d97 rework opencl requirements (fix configure: error: conditional "AMDEP" was never defined) 2015-07-22 22:03:03 +02:00
Zdenko Podobný
ffbe610349 add check for opencl requirements 2015-07-22 14:40:07 +02:00
Zdenko Podobný
71e226c44f increase version number 2015-07-21 22:46:52 +02:00
Zdenko Podobný
8950a2ec96 change version 2015-07-11 09:43:50 +02:00
Zdenko Podobný
aec22a47ec fix autotools c++11 issue with disabled training 2015-05-14 14:25:49 +02:00
Zdenko Podobný
d508751e58 Fixed issue 1317 - git revision info used as version info for autotools & DEBUG 2015-05-02 12:15:13 +02:00
Zdenko Podobný
c0640a4bef fix cygwin build (issue 1289) 2014-09-28 23:19:52 +02:00
Zdenko Podobný
298e31465a require leptonica 1.71 for tesseract build 2014-08-18 23:04:08 +02:00
Zdenop
524ee27f01 increase version number based on baseapi.h 2014-08-16 21:02:41 +02:00
Zdenko Podobný
769fef8c96 fix training tools build 2014-08-13 22:07:44 +02:00
Zdenko Podobný
3295dc29e2 improve testing whether it is possible to build trainings tools 2014-08-13 21:18:03 +02:00
zdenop
c550aee2f9 revert commit r1122 ;-)
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1123 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-07-01 22:04:56 +00:00
zdenop
bcbfb93475 fix issue 1240
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1122 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-07-01 21:57:22 +00:00
zdenop
c3b9b7c60d fix OSX build
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1059 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-04-16 09:04:28 +00:00
zdenop@gmail.com
86ed90421b fix CYGWIN: use gnu++11 instead of c++11
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1054 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-03-11 14:12:39 +00:00
zdenop
d451b28054 fix issue 1127; add unvl output to tesseract executable
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1052 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-03-02 14:40:21 +00:00
zdenop
e28176c5dd check for leptonica version; add info to tesseract.pc about opencl lib if needed
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1035 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-31 23:00:40 +00:00
zdenop@gmail.com
ac5a8a871b fix windows builds (mingw and VS2010)
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1017 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-26 22:39:20 +00:00
zdenop@gmail.com
afc440d9b5 fix issue 1069: improve identification of OS X 10.9.1
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1008 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-23 07:40:27 +00:00
zdenop@gmail.com
71ae509354 fix for mingw32/g++ 4.8.1
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@998 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-22 08:10:15 +00:00
zdenop@gmail.com
ef3b1d936e fix mingw build issues
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@995 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-18 09:00:54 +00:00
zdenop
ff5fb7f105 fix issue 1044: OS X build
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@994 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-17 20:53:15 +00:00
zdenop
8299e2a605 fix linux build, remove not used folder and spec file
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@979 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-10 23:52:04 +00:00
theraysmith@gmail.com
31f98f7fc9 Removed image directory
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@967 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-09 18:08:12 +00:00
zdenop
8b3e590123 fix OpenCL build on OSX 10.9; add info about OpenCL to 'tesseract -v'
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@921 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-12-14 08:35:14 +00:00
rajesh.katikam@gmail.com
bf0a83907b Cleaned up configure.ac and Makefile.am in multiple folder to use OPENCL paths
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@910 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-11-12 10:40:40 +00:00
rajesh.katikam@gmail.com
983aaabaae Initial version of OpenCL support added.
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@909 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-11-11 17:43:13 +00:00
zdenop@gmail.com
7bf559dcb3 use default gcc optimization
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@906 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-11-10 15:12:01 +00:00
zdenop@gmail.com
9b730d4729 gcc: use c++11 if possible
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@902 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-11-03 17:22:27 +00:00
zdenop@gmail.com
acd0a66e51 fix issue 582/915
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@895 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-10-20 20:59:18 +00:00
zdenop@gmail.com
9f1d243d82 autotools: check for icu library, implement 'make training'
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@885 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-09-26 20:23:17 +00:00
theraysmith@gmail.com
4d514d5a60 Major refactor of beam search, elimination of dead code, misc bug fixes, updates to Makefile.am, Changelog etc.
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@878 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-09-23 15:26:50 +00:00
zdenop@gmail.com
b5d3d66a68 remove unused code(gettext)
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@859 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-07-07 16:39:13 +00:00
zdenop@gmail.com
d919bfde1e increase version number
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@857 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-07-05 09:35:42 +00:00
zdenop@gmail.com
8a0878af3a fix mingw build
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@856 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-07-05 08:46:57 +00:00