mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-07 09:52:40 +08:00
improve autools system (mingw+msys fix); implementation of --disable-tessdata-prefix
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@708 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
c0cd2cd605
commit
d4d4b8aad8
@ -1,10 +1,14 @@
|
||||
## run autogen.sh to create Makefile.in from this file
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = ccutil viewer cutil image ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . java tessdata testing doc training
|
||||
SUBDIRS = ccutil viewer cutil image ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . tessdata testing doc training
|
||||
|
||||
if !GRAPHICS_DISABLED
|
||||
SUBDIRS += java
|
||||
endif
|
||||
|
||||
#if USING_GETTEXT
|
||||
#SUBDIRS += po
|
||||
#AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
|
||||
#AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"
|
||||
#endif
|
||||
|
||||
EXTRA_DIST = eurotext.tif phototest.tif ReleaseNotes \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"\
|
||||
AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"\
|
||||
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
|
||||
-I$(top_srcdir)/textord -I$(top_srcdir)/dict \
|
||||
|
@ -57,7 +57,7 @@
|
||||
#include "osdetect.h"
|
||||
#include "params.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(VERSION)
|
||||
#include "version.h"
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-DUSE_STD_NAMESPACE \
|
||||
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/viewer
|
||||
|
||||
@ -24,10 +24,10 @@ 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
|
||||
../ccutil/libtesseract_ccutil.la \
|
||||
../cutil/libtesseract_cutil.la \
|
||||
../image/libtesseract_image.la \
|
||||
../viewer/libtesseract_viewer.la
|
||||
endif
|
||||
|
||||
libtesseract_ccstruct_la_SOURCES = \
|
||||
|
@ -1,5 +1,9 @@
|
||||
SUBDIRS =
|
||||
AM_CXXFLAGS = -DTESSDATA_PREFIX=@datadir@/
|
||||
AM_CXXFLAGS =
|
||||
|
||||
if !NO_TESSDATA_PREFIX
|
||||
AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/
|
||||
endif
|
||||
|
||||
if VISIBILITY
|
||||
AM_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
@ -42,3 +46,8 @@ if EMBEDDED
|
||||
include_HEADERS += scanutils.h
|
||||
libtesseract_ccutil_la_SOURCES += scanutils.cpp
|
||||
endif
|
||||
|
||||
if MINGW
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/vs2008/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
|
||||
libtesseract_ccutil_la_SOURCES += ../vs2008/port/strtok_r.cpp
|
||||
endif
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/viewer
|
||||
@ -27,12 +27,12 @@ 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
|
||||
../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 = \
|
||||
|
39
configure.ac
39
configure.ac
@ -13,7 +13,6 @@ AC_REVISION($Id: configure.ac,v 1.4 2007/02/02 22:38:17 theraysmith Exp $)
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_SRCDIR(api/tesseractmain.cpp)
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Define date of package, etc. Could be useful in auto-generated
|
||||
# documentation.
|
||||
@ -53,6 +52,30 @@ GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
|
||||
AC_SUBST(GENERIC_RELEASE)
|
||||
AC_SUBST(GENERIC_VERSION)
|
||||
|
||||
# default conditional
|
||||
AM_CONDITIONAL(MINGW, false)
|
||||
AM_CONDITIONAL(GRAPHICS_DISABLED, false)
|
||||
|
||||
#
|
||||
# Platform specific setup
|
||||
#
|
||||
#############################
|
||||
AC_CANONICAL_HOST
|
||||
case $host_os in
|
||||
mingw32*)
|
||||
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
|
||||
AM_CONDITIONAL(MINGW, true)
|
||||
#AC_SUBST([AM_CPPFLAGS], ["-DWINDLLNAME=\"lib$GENERIC_LIBRARY_NAME\""])
|
||||
#AC_SUBST([AM_CPPFLAGS], ["-D__BLOB_T_DEFINED -DWINDLLNAME=\"lib$GENERIC_LIBRARY_NAME\""])
|
||||
AC_SUBST([AM_CPPFLAGS], ["-D__BLOB_T_DEFINED"])
|
||||
AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed'])
|
||||
#AM_LDFLAGS='-Wl,-no-undefined -Wl,--as-needed'
|
||||
;;
|
||||
*)
|
||||
# default
|
||||
;;
|
||||
esac
|
||||
|
||||
includedir="${includedir}/tesseract"
|
||||
|
||||
AC_ARG_WITH(extra-includes,
|
||||
@ -81,7 +104,8 @@ AC_HELP_STRING([--disable-graphics],[disable graphics (ScrollView)])],
|
||||
[enable_graphics="yes"])
|
||||
AC_MSG_RESULT($enable_graphics)
|
||||
if test "$enable_graphics" = "no"; then
|
||||
AC_DEFINE([GRAPHICS_DISABLED], [], [Disable graphics])
|
||||
AC_DEFINE([GRAPHICS_DISABLED], [], [Disable graphics])
|
||||
AM_CONDITIONAL(GRAPHICS_DISABLED, true)
|
||||
fi
|
||||
|
||||
# check whether to build embedded version
|
||||
@ -93,8 +117,6 @@ AC_ARG_ENABLE([embedded],
|
||||
AC_MSG_RESULT($enable_embedded)
|
||||
AM_CONDITIONAL([EMBEDDED], [test "$enable_embedded" = "yes"])
|
||||
if test "$enable_embedded" = "yes"; then
|
||||
#AC_DEFINE([EMBEDDED], [], [Embedded Mode])
|
||||
AC_SUBST([AM_CXXFLAGS], [-DEMBEDDED])
|
||||
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
|
||||
fi
|
||||
|
||||
@ -118,6 +140,14 @@ AC_ARG_ENABLE([multiple-libraries],
|
||||
AC_MSG_RESULT($enable_mlibs)
|
||||
AM_CONDITIONAL([USING_MULTIPLELIBS], [test "$enable_mlibs" = "yes"])
|
||||
|
||||
# Check if tessdata-prefix is disabled
|
||||
AC_MSG_CHECKING(whether to use tessdata-prefix)
|
||||
AC_ARG_ENABLE(tessdata-prefix,
|
||||
[AC_HELP_STRING([--disable-tessdata-prefix],
|
||||
[dont set TESSDATA-PREFIX during compile])],
|
||||
[tessdata_prefix="no"], [tessdata_prefix="yes"])
|
||||
AC_MSG_RESULT($tessdata_prefix)
|
||||
AM_CONDITIONAL([NO_TESSDATA_PREFIX], [test "$tessdata_prefix" = "no"])
|
||||
|
||||
#localedir='${prefix}/share/locale'
|
||||
|
||||
@ -459,4 +489,3 @@ AH_BOTTOM([
|
||||
/* config_auto.h: end */
|
||||
#endif
|
||||
])
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-DUSE_STD_NAMESPACE \
|
||||
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
|
||||
@ -31,15 +31,15 @@ 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
|
||||
../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 = \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
|
||||
|
||||
if VISIBILITY
|
||||
AM_CPPFLAGS += -DTESS_EXPORTS \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer -I$(top_srcdir)/image
|
||||
|
||||
if VISIBILITY
|
||||
@ -16,11 +16,11 @@ 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
|
||||
../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 = \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
|
||||
|
||||
if VISIBILITY
|
||||
AM_CPPFLAGS += -DTESS_EXPORTS \
|
||||
@ -15,8 +15,8 @@ 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
|
||||
../ccutil/libtesseract_ccutil.la \
|
||||
../viewer/libtesseract_viewer.la
|
||||
endif
|
||||
|
||||
libtesseract_image_la_SOURCES = \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-DUSE_STD_NAMESPACE \
|
||||
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
|
||||
-I$(top_srcdir)/ccmain -I$(top_srcdir)/wordrec -I$(top_srcdir)/api \
|
||||
@ -29,14 +29,14 @@ 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
|
||||
../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 = \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-DUSE_STD_NAMESPACE \
|
||||
-I$(top_srcdir)/ccmain -I$(top_srcdir)/api \
|
||||
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
|
||||
@ -10,7 +10,7 @@ AM_CPPFLAGS = \
|
||||
# TODO: training programs can not be linked to shared library created
|
||||
# with -fvisibility
|
||||
if VISIBILITY
|
||||
AM_LDFLAGS = -all-static
|
||||
AM_LDFLAGS += -all-static
|
||||
endif
|
||||
|
||||
noinst_HEADERS = \
|
||||
|
@ -1,4 +1,4 @@
|
||||
AM_CPPFLAGS = \
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
|
||||
-I$(top_srcdir)/cutil -I$(top_srcdir)/classify \
|
||||
-I$(top_srcdir)/image -I$(top_srcdir)/dict \
|
||||
@ -23,13 +23,13 @@ else
|
||||
lib_LTLIBRARIES = libtesseract_wordrec.la
|
||||
libtesseract_wordrec_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
|
||||
libtesseract_wordrec_la_LIBADD = \
|
||||
../ccstruct/libtesseract_ccstruct.la \
|
||||
../ccutil/libtesseract_ccutil.la \
|
||||
../cutil/libtesseract_cutil.la \
|
||||
../classify/libtesseract_classify.la \
|
||||
../image/libtesseract_image.la \
|
||||
../dict/libtesseract_dict.la \
|
||||
../viewer/libtesseract_viewer.la
|
||||
../ccstruct/libtesseract_ccstruct.la \
|
||||
../ccutil/libtesseract_ccutil.la \
|
||||
../cutil/libtesseract_cutil.la \
|
||||
../classify/libtesseract_classify.la \
|
||||
../image/libtesseract_image.la \
|
||||
../dict/libtesseract_dict.la \
|
||||
../viewer/libtesseract_viewer.la
|
||||
endif
|
||||
|
||||
libtesseract_wordrec_la_SOURCES = \
|
||||
|
Loading…
Reference in New Issue
Block a user