提交 37b9f124 编写于 作者: T tmbdev

added compilation option TESSDATA_PREFIX to put the data files in an absolute location

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@14 d0cd1f9f-072b-0410-8dd7-cf729c803f20
上级 9a1c5a9b
......@@ -64,12 +64,21 @@ void main_setup( /*main demo program */
STRING varfile; /*name of file */
imagebasename = basename; /*name of image */
#ifdef TESSDATA_PREFIX
#define _STR(a) #a
#define _XSTR(a) _STR(a)
datadir = _XSTR(TESSDATA_PREFIX);
#undef _XSTR
#undef _STR
#else
if (getpath (argv0, datadir) < 0)
#ifdef __UNIX__
CANTOPENFILE.error ("main", ABORT, "%s to get path", argv[0]);
#else
NO_PATH.error ("main", DBG, NULL);
#endif
#endif
for (arg = 0; arg < argc; arg++) {
if (argv[arg][0] == '+' || argv[arg][0] == '-') {
......@@ -99,6 +108,7 @@ void main_setup( /*main demo program */
if (m_print_variables)
print_variables(stdout); /*print them all */
datadir += m_data_sub_dir; /*data directory */
#ifdef __UNIX__
......
......@@ -1359,7 +1359,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
tesseract
ac_aux_dir=
for ac_dir in config $srcdir/config; do
......@@ -4215,7 +4214,7 @@ fi;
OPTS="$OPTS $VCOPTS_COMMON /Ow /O2"
else
opt="-O3"
opt="-O2"
echo "$as_me:$LINENO: checking if $CXX accepts $opt" >&5
echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6
echo 'void f(){}' > conftest.cc
......@@ -4223,7 +4222,7 @@ echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm conftest.*
OPTS="$OPTS -O3"
OPTS="$OPTS -O2"
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
......
......@@ -270,7 +270,7 @@ void print_dawg_node(EDGE_ARRAY dawg, NODE_REF node) {
void read_squished_dawg(char *filename, EDGE_ARRAY dawg, INT32 max_num_edges) {
FILE *file;
EDGE_REF edge;
INT32 num_edges;
INT32 num_edges = 0;
INT32 node_count = 0;
if (debug) print_string ("read_debug");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册