Skip to content

Commit

Permalink
fixed "one lib" build on linux; runautoconf renamed to autogen.sh;
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@631 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
zdenop@gmail.com committed Oct 16, 2011
1 parent bf3ae64 commit 67f4700
Show file tree
Hide file tree
Showing 19 changed files with 191 additions and 154 deletions.
15 changes: 6 additions & 9 deletions INSTALL.SVN
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
If you have checked out Tesseract from Subversion, you must generate the configure script.
If you have checked out Tesseract from Subversion, you must generate the
configure script.

If you have tesseract 3.0x installation in your system, please remove it
before new build.

So, the steps for making Tesseract are:

* ./runautoconf # ignore warnings
* ./autogen.sh
* ./configure
* make
* make install

Note that ./runautoconf may generate some warnings:

-- quoting in some /usr/share/.../... .m4 files
-- old uses of datarootdir

They don't seem to hurt anything. We haven't found a good way of eliminating them yet.
24 changes: 1 addition & 23 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = ccstruct ccutil classify cube cutil dict image neural_networks/runtime textord viewer wordrec ccmain training tessdata testing java api doc
SUBDIRS = ccutil viewer cutil image ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . training java tessdata testing doc
#if USING_GETTEXT
#SUBDIRS += po
#AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
Expand All @@ -10,28 +10,6 @@ EXTRA_DIST = eurotext.tif phototest.tif ReleaseNotes \

#EXTRA_DIST = doc/html doc/@PACKAGE_NAME@_@PACKAGE_VERSION@.pdf doc/@PACKAGE_NAME@_@PACKAGE_VERSION@.ps.gz

lib_LTLIBRARIES = libtesseract.la
libtesseract_la_SOURCES =
# Dummy C++ source to cause C++ linking.
# see http://www.gnu.org/s/hello/manual/automake/Libtool-Convenience-Libraries.html#Libtool-Convenience-Libraries
nodist_EXTRA_libtesseract_la_SOURCES = dummy.cxx
libtesseract_la_LIBADD = \
api/libtesseract_api.la \
ccmain/libtesseract_main.la \
cube/libtesseract_cube.la \
neural_networks/runtime/libtesseract_neural.la \
textord/libtesseract_textord.la \
wordrec/libtesseract_wordrec.la \
classify/libtesseract_classify.la \
dict/libtesseract_dict.la \
ccstruct/libtesseract_ccstruct.la \
image/libtesseract_image.la \
cutil/libtesseract_cutil.la \
viewer/libtesseract_viewer.la \
ccutil/libtesseract_ccutil.la

libtesseract_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)

dist-hook:
# Need to remove .svn directories from directories
# added using EXTRA_DIST. $(distdir)/tessdata would in
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Non-Windows (or Cygwin):
You have to tell Tesseract through a standard unix mechanism where to
find its data directory. You must either:

./autogen.sh
./configure
make
make install
Expand Down
79 changes: 42 additions & 37 deletions api/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,54 +1,59 @@
SUBDIRS =
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"\
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
-I$(top_srcdir)/ccops -I$(top_srcdir)/dict \
-I$(top_srcdir)/textord -I$(top_srcdir)/dict \
-I$(top_srcdir)/classify -I$(top_srcdir)/ccmain \
-I$(top_srcdir)/wordrec -I$(top_srcdir)/cutil \
-I$(top_srcdir)/textord
-I$(top_srcdir)/wordrec -I$(top_srcdir)/cutil

include_HEADERS = \
apitypes.h baseapi.h pageiterator.h resultiterator.h tesseractmain.h
lib_LTLIBRARIES =

if !USING_MULTIPLELIBS
noinst_LTLIBRARIES = libtesseract_api.la
else
lib_LTLIBRARIES = libtesseract_api.la
lib_LTLIBRARIES += libtesseract_api.la
libtesseract_api_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_api_la_LIBADD = \
$(top_srcdir)/ccmain/libtesseract_main.la \
$(top_srcdir)/cube/libtesseract_cube.la \
$(top_srcdir)/neural_networks/runtime/libtesseract_neural.la \
$(top_srcdir)/textord/libtesseract_textord.la \
$(top_srcdir)/wordrec/libtesseract_wordrec.la \
$(top_srcdir)/classify/libtesseract_classify.la \
$(top_srcdir)/dict/libtesseract_dict.la \
$(top_srcdir)/ccstruct/libtesseract_ccstruct.la \
$(top_srcdir)/image/libtesseract_image.la \
$(top_srcdir)/cutil/libtesseract_cutil.la \
$(top_srcdir)/viewer/libtesseract_viewer.la \
$(top_srcdir)/ccutil/libtesseract_ccutil.la
endif

libtesseract_api_la_SOURCES = baseapi.cpp pageiterator.cpp resultiterator.cpp
libtesseract_api_la_LIBADD = \
../ccmain/libtesseract_main.la \
../cube/libtesseract_cube.la \
../neural_networks/runtime/libtesseract_neural.la \
../textord/libtesseract_textord.la \
../wordrec/libtesseract_wordrec.la \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la \
../ccstruct/libtesseract_ccstruct.la \
../image/libtesseract_image.la \
../cutil/libtesseract_cutil.la \
../viewer/libtesseract_viewer.la \
../ccutil/libtesseract_ccutil.la

bin_PROGRAMS = tesseract
tesseract_SOURCES = tesseractmain.cpp
if USING_MULTIPLELIBS
tesseract_LDADD = \
lib_LTLIBRARIES += libtesseract.la
libtesseract_la_LDFLAGS =
libtesseract_la_SOURCES =
# Dummy C++ source to cause C++ linking.
# see http://www.gnu.org/s/hello/manual/automake/Libtool-Convenience-Libraries.html#Libtool-Convenience-Libraries
nodist_EXTRA_libtesseract_la_SOURCES = dummy.cxx
libtesseract_la_LIBADD = \
libtesseract_api.la \
../ccmain/libtesseract_main.la \
../textord/libtesseract_textord.la \
../wordrec/libtesseract_wordrec.la \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la \
../ccstruct/libtesseract_ccstruct.la \
../image/libtesseract_image.la \
../cutil/libtesseract_cutil.la \
../viewer/libtesseract_viewer.la \
../ccutil/libtesseract_ccutil.la
else
tesseract_LDADD = \
libtesseract.la
endif
$(top_srcdir)/ccmain/libtesseract_main.la \
$(top_srcdir)/cube/libtesseract_cube.la \
$(top_srcdir)/neural_networks/runtime/libtesseract_neural.la \
$(top_srcdir)/textord/libtesseract_textord.la \
$(top_srcdir)/wordrec/libtesseract_wordrec.la \
$(top_srcdir)/classify/libtesseract_classify.la \
$(top_srcdir)/dict/libtesseract_dict.la \
$(top_srcdir)/ccstruct/libtesseract_ccstruct.la \
$(top_srcdir)/image/libtesseract_image.la \
$(top_srcdir)/cutil/libtesseract_cutil.la \
$(top_srcdir)/viewer/libtesseract_viewer.la \
$(top_srcdir)/ccutil/libtesseract_ccutil.la

libtesseract_la_LDFLAGS += -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_la_LDFLAGS += -L./ -L../ -L../api -L../ccutil -L../viewer -L../cutil -L../image -L../ccstruct -L../dict -L../classify -L../wordrec -L../neural_networks/runtime -L../textord -L../cube -L../ccmain

bin_PROGRAMS = tesseract
tesseract_SOURCES = $(top_srcdir)/api/tesseractmain.cpp
tesseract_LDADD = libtesseract.la
1 change: 0 additions & 1 deletion api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include "resultiterator.h"
#include "thresholder.h"
#include "tesseractmain.h"
#include "tesseractclass.h"
#include "pageres.h"
#include "tessvars.h"
Expand Down
File renamed without changes.
16 changes: 12 additions & 4 deletions ccmain/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ AM_CPPFLAGS = \
-DUSE_STD_NAMESPACE \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
-I$(top_srcdir)/ccops -I$(top_srcdir)/dict \
-I$(top_srcdir)/classify \
-I$(top_srcdir)/classify -I$(top_srcdir)/dict \
-I$(top_srcdir)/wordrec -I$(top_srcdir)/cutil \
-I$(top_srcdir)/neural_networks/runtime -I$(top_srcdir)/cube \
-I$(top_srcdir)/textord
Expand All @@ -24,6 +23,17 @@ noinst_LTLIBRARIES = libtesseract_main.la
else
lib_LTLIBRARIES = libtesseract_main.la
libtesseract_main_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_main_la_LIBADD = \
../wordrec/libtesseract_wordrec.la \
../textord/libtesseract_textord.la \
../ccutil/libtesseract_ccutil.la \
../ccstruct/libtesseract_ccstruct.la \
../viewer/libtesseract_viewer.la \
../dict/libtesseract_dict.la \
../classify/libtesseract_classify.la \
../cutil/libtesseract_cutil.la \
../cube/libtesseract_cube.la

endif

libtesseract_main_la_SOURCES = \
Expand All @@ -36,5 +46,3 @@ libtesseract_main_la_SOURCES = \
tessbox.cpp tessedit.cpp tesseractclass.cpp tessvars.cpp \
tfacepp.cpp thresholder.cpp \
werdit.cpp
libtesseract_main_la_LIBADD = \
../wordrec/libtesseract_wordrec.la
5 changes: 5 additions & 0 deletions ccstruct/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ noinst_LTLIBRARIES = libtesseract_ccstruct.la
else
lib_LTLIBRARIES = libtesseract_ccstruct.la
libtesseract_ccstruct_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_ccstruct_la_LIBADD = \
../ccutil/libtesseract_ccutil.la \
../cutil/libtesseract_cutil.la \
../image/libtesseract_image.la \
../viewer/libtesseract_viewer.la
endif

libtesseract_ccstruct_la_SOURCES = \
Expand Down
7 changes: 7 additions & 0 deletions classify/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ noinst_LTLIBRARIES = libtesseract_classify.la
else
lib_LTLIBRARIES = libtesseract_classify.la
libtesseract_classify_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_classify_la_LIBADD = \
../ccutil/libtesseract_ccutil.la \
../cutil/libtesseract_cutil.la \
../ccstruct/libtesseract_ccstruct.la \
../dict/libtesseract_dict.la \
../image/libtesseract_image.la \
../viewer/libtesseract_viewer.la
endif

libtesseract_classify_la_SOURCES = \
Expand Down
21 changes: 12 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AC_CANONICAL_HOST
# documentation.
# TODO(luc) Generate good documentation using doxygen or equivalent
PACKAGE_YEAR=2011
PACKAGE_DATE="08/25"
PACKAGE_DATE="10/16"

AC_DEFINE_UNQUOTED(PACKAGE_NAME,["${PACKAGE_NAME}"],[Name of package])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION,["${PACKAGE_VERSION}"],[Version number])
Expand Down Expand Up @@ -83,7 +83,17 @@ if test "$enable_graphics" = "no"; then
AC_DEFINE([DISABLE_GRAPHICS], [], [Disable graphics])
fi

localedir='${prefix}/share/locale'
# check whether to build multiple libraries
AC_MSG_CHECKING(--enable-multiple-libraries argument)
AC_ARG_ENABLE([multiple-libraries],
[ --enable-multiple-libraries Enable multiple libraries.],
[enable_mlibs=$enableval],
[enable_mlibs="no"])
AC_MSG_RESULT($enable_mlibs)
AM_CONDITIONAL([USING_MULTIPLELIBS], [test "$enable_mlibs" = "yes"])


#localedir='${prefix}/share/locale'

# Not used yet, so disable
#AC_ARG_ENABLE([gettext],
Expand All @@ -100,13 +110,6 @@ localedir='${prefix}/share/locale'
#fi
#AM_CONDITIONAL([USING_GETTEXT], [test "$enable_gettext" = "yes"])

AC_ARG_ENABLE([multiple-libraries],
[ --enable-multiple-libraries Enable multiple libraries (default).],
[enable_mlibs=$enableeval],
[enable_mlibs="yes"])
AC_MSG_RESULT($enable_mlibs)
AM_CONDITIONAL([USING_MULTIPLELIBS], [test "$enable_mlibs" = "yes"])

# Always look into a "gnu" directory.
curwd=`pwd`
if test -d $curwd/gnu/include ; then
Expand Down
10 changes: 10 additions & 0 deletions cube/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ noinst_LTLIBRARIES = libtesseract_cube.la
else
lib_LTLIBRARIES = libtesseract_cube.la
libtesseract_cube_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_cube_la_LIBADD = \
../ccstruct/libtesseract_ccstruct.la \
../ccutil/libtesseract_ccutil.la \
../neural_networks/runtime/libtesseract_neural.la \
../image/libtesseract_image.la \
../viewer/libtesseract_viewer.la \
../wordrec/libtesseract_wordrec.la \
../cutil/libtesseract_cutil.la \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la
endif

libtesseract_cube_la_SOURCES = \
Expand Down
3 changes: 3 additions & 0 deletions cutil/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ noinst_LTLIBRARIES = libtesseract_cutil.la
else
lib_LTLIBRARIES = libtesseract_cutil.la
libtesseract_cutil_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_cutil_la_LIBADD = \
../ccutil/libtesseract_ccutil.la \
../viewer/libtesseract_viewer.la
endif

libtesseract_cutil_la_SOURCES = \
Expand Down
6 changes: 6 additions & 0 deletions dict/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ noinst_LTLIBRARIES = libtesseract_dict.la
else
lib_LTLIBRARIES = libtesseract_dict.la
libtesseract_dict_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_dict_la_LIBADD = \
../ccutil/libtesseract_ccutil.la \
../cutil/libtesseract_cutil.la \
../ccstruct/libtesseract_ccstruct.la \
../image/libtesseract_image.la \
../viewer/libtesseract_viewer.la
endif

libtesseract_dict_la_SOURCES = \
Expand Down
3 changes: 3 additions & 0 deletions image/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ noinst_LTLIBRARIES = libtesseract_image.la
else
lib_LTLIBRARIES = libtesseract_image.la
libtesseract_image_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_image_la_LIBADD = \
../ccutil/libtesseract_ccutil.la \
../viewer/libtesseract_viewer.la
endif

libtesseract_image_la_SOURCES = \
Expand Down
6 changes: 2 additions & 4 deletions tessdata/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
datadir = @datadir@/tessdata
data_DATA = $(wildcard *.traineddata) \
$(wildcard *.cube.*)

data_DATA = ./ara.traineddata ./bul.traineddata ./cat.traineddata ./ces.traineddata ./chi_sim.traineddata ./chi_tra.traineddata ./dan-frak.traineddata ./dan.traineddata ./deu-frak.traineddata ./deu.traineddata ./ell.traineddata ./eng.traineddata ./fin.traineddata ./fra.traineddata ./heb.traineddata ./hin.traineddata ./hrv.traineddata ./hun.traineddata ./ind.traineddata ./ita.traineddata ./jpn.traineddata ./kor.traineddata ./lav.traineddata ./lit.traineddata ./nld.traineddata ./nor.traineddata ./osd.traineddata ./pol.traineddata ./por.traineddata ./ron.traineddata ./rus.traineddata ./slk-frak.traineddata ./slk.traineddata ./slv.traineddata ./spa.traineddata ./srp.traineddata ./swe.traineddata ./tgl.traineddata ./tha.traineddata ./tur.traineddata ./ukr.traineddata ./vie.traineddata \
./ara.cube.bigrams ./ara.cube.fold ./ara.cube.lm ./ara.cube.nn ./ara.cube.params ./ara.cube.size ./ara.cube.word-freq ./eng.cube.bigrams ./eng.cube.fold ./eng.cube.lm ./eng.cube.nn ./eng.cube.params ./eng.cube.size ./eng.cube.word-freq ./hin.cube.bigrams ./hin.cube.fold ./hin.cube.lm ./hin.cube.nn ./hin.cube.params ./hin.cube.word-freq
SUBDIRS = configs tessconfigs

9 changes: 9 additions & 0 deletions textord/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ noinst_LTLIBRARIES = libtesseract_textord.la
else
lib_LTLIBRARIES = libtesseract_textord.la
libtesseract_textord_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_textord_la_LIBADD = \
../ccstruct/libtesseract_ccstruct.la \
../ccutil/libtesseract_ccutil.la \
../image/libtesseract_image.la \
../viewer/libtesseract_viewer.la \
../wordrec/libtesseract_wordrec.la \
../cutil/libtesseract_cutil.la \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la
endif

libtesseract_textord_la_SOURCES = \
Expand Down
Loading

0 comments on commit 67f4700

Please sign in to comment.