2007-03-08 04:03:40 +08:00
|
|
|
# -*-Shell-script-*-
|
|
|
|
#
|
|
|
|
# Copyright (c) Luc Vincent
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Initialization
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
AC_PREREQ(2.50)
|
2013-09-23 23:26:50 +08:00
|
|
|
AC_INIT([tesseract], [3.03], [http://code.google.com/p/tesseract-ocr/issues/list])
|
2014-01-22 16:10:15 +08:00
|
|
|
CXXFLAGS=${CXXFLAGS:-""}
|
2011-08-19 06:06:01 +08:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-11-10 23:12:01 +08:00
|
|
|
AC_REVISION([$Revision$])
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CONFIG_AUX_DIR(config)
|
2009-07-11 11:05:57 +08:00
|
|
|
AC_CONFIG_SRCDIR(api/tesseractmain.cpp)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_PREFIX_DEFAULT(/usr/local)
|
|
|
|
|
|
|
|
# Define date of package, etc. Could be useful in auto-generated
|
|
|
|
# documentation.
|
|
|
|
# TODO(luc) Generate good documentation using doxygen or equivalent
|
2014-01-10 02:08:12 +08:00
|
|
|
PACKAGE_YEAR=2014
|
|
|
|
PACKAGE_DATE="01/14"
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_NAME,["${PACKAGE_NAME}"],[Name of package])
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_VERSION,["${PACKAGE_VERSION}"],[Version number])
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_YEAR,"$PACKAGE_YEAR",[Official year for this release])
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATE,"$PACKAGE_DATE",[Official date of release])
|
|
|
|
|
|
|
|
AC_SUBST(PACKAGE_NAME)
|
|
|
|
AC_SUBST(PACKAGE_VERSION)
|
|
|
|
AC_SUBST(PACKAGE_YEAR)
|
|
|
|
AC_SUBST(PACKAGE_DATE)
|
|
|
|
|
2010-05-26 22:20:20 +08:00
|
|
|
GENERIC_LIBRARY_NAME=tesseract
|
|
|
|
|
|
|
|
# Release versioning
|
|
|
|
GENERIC_MAJOR_VERSION=3
|
2013-09-23 23:26:50 +08:00
|
|
|
GENERIC_MINOR_VERSION=3
|
|
|
|
GENERIC_MICRO_VERSION=0
|
2010-05-26 22:20:20 +08:00
|
|
|
|
|
|
|
# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION)
|
|
|
|
GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
|
|
|
|
GENERIC_LIBRARY_VERSION=$GENERIC_MAJOR_VERSION:$GENERIC_MINOR_VERSION
|
|
|
|
AC_SUBST(GENERIC_API_VERSION)
|
|
|
|
AC_SUBST(GENERIC_MAJOR_VERSION)
|
|
|
|
|
|
|
|
AC_SUBST(GENERIC_LIBRARY_VERSION)
|
|
|
|
PACKAGE=$GENERIC_LIBRARY_NAME
|
|
|
|
AC_SUBST(GENERIC_LIBRARY_NAME)
|
|
|
|
|
|
|
|
GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
|
|
|
|
GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
|
|
|
|
AC_SUBST(GENERIC_RELEASE)
|
|
|
|
AC_SUBST(GENERIC_VERSION)
|
|
|
|
|
2014-01-11 07:52:04 +08:00
|
|
|
# ----------------------------------------
|
|
|
|
# Automake configuration
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_CONFIG_HEADERS(config_auto.h:config/config.h.in)
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2012-03-23 04:01:33 +08:00
|
|
|
# default conditional
|
|
|
|
AM_CONDITIONAL(MINGW, false)
|
2014-01-18 04:53:15 +08:00
|
|
|
AM_CONDITIONAL(OSX, false)
|
2012-03-23 04:01:33 +08:00
|
|
|
AM_CONDITIONAL(GRAPHICS_DISABLED, false)
|
|
|
|
|
2013-12-14 16:35:14 +08:00
|
|
|
OPENCL_INC="/opt/AMDAPP/include"
|
|
|
|
OPENCL_LIBS="-lOpenCL"
|
2013-01-31 06:57:49 +08:00
|
|
|
#############################
|
2012-03-23 04:01:33 +08:00
|
|
|
#
|
|
|
|
# Platform specific setup
|
|
|
|
#
|
|
|
|
#############################
|
|
|
|
AC_CANONICAL_HOST
|
2013-10-21 04:59:18 +08:00
|
|
|
case "${host_os}" in
|
2012-03-23 04:01:33 +08:00
|
|
|
mingw32*)
|
|
|
|
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
|
|
|
|
AM_CONDITIONAL(MINGW, true)
|
2014-01-27 06:39:20 +08:00
|
|
|
AM_CONDITIONAL(ADD_RT, false)
|
2012-03-23 04:01:33 +08:00
|
|
|
AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed'])
|
|
|
|
;;
|
2013-10-21 04:59:18 +08:00
|
|
|
solaris*)
|
2014-01-27 06:39:20 +08:00
|
|
|
LIBS="-lsocket -lnsl -lrt -lxnet"
|
|
|
|
AM_CONDITIONAL(ADD_RT, true)
|
|
|
|
;;
|
|
|
|
*darwin*)
|
|
|
|
OPENCL_LIBS="-framework OpenCL"
|
|
|
|
OPENCL_INC=""
|
|
|
|
AM_CONDITIONAL(ADD_RT, false)
|
2014-01-18 04:53:15 +08:00
|
|
|
;;
|
|
|
|
powerpc-*-darwin*)
|
|
|
|
OPENCL_LIBS=""
|
2013-12-14 16:35:14 +08:00
|
|
|
;;
|
2014-01-22 16:10:15 +08:00
|
|
|
*)
|
2012-07-23 05:36:20 +08:00
|
|
|
# default
|
2014-01-27 06:39:20 +08:00
|
|
|
AM_CONDITIONAL(ADD_RT, true)
|
2012-03-23 04:01:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2007-03-31 08:37:26 +08:00
|
|
|
includedir="${includedir}/tesseract"
|
2007-03-31 07:53:34 +08:00
|
|
|
|
2013-02-01 07:10:18 +08:00
|
|
|
AC_ARG_WITH(extra-includes,
|
|
|
|
AC_HELP_STRING([--with-extra-includes=DIR],
|
|
|
|
[Define an additional directory for include files]),
|
|
|
|
[ if test -d "$withval" ; then
|
|
|
|
CFLAGS="$CFLAGS -I$withval"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Cannot stat directory $withval])
|
|
|
|
fi ] )
|
|
|
|
|
|
|
|
AC_ARG_WITH(extra-libraries,
|
|
|
|
AC_HELP_STRING([--with-extra-libraries=DIR],
|
|
|
|
[Define an additional directory for library files]),
|
|
|
|
[ if test -d "$withval" ; then
|
|
|
|
LDFLAGS="$LDFLAGS -L$withval"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Cannot stat directory $withval])
|
|
|
|
fi ] )
|
|
|
|
|
2010-05-28 20:21:22 +08:00
|
|
|
AC_MSG_CHECKING(--enable-graphics argument)
|
2010-07-19 09:59:13 +08:00
|
|
|
AC_ARG_ENABLE([graphics],
|
2012-03-02 06:43:51 +08:00
|
|
|
[AC_HELP_STRING([--enable-graphics],[enable graphics (ScrollView) (default)])
|
|
|
|
AC_HELP_STRING([--disable-graphics],[disable graphics (ScrollView)])],
|
2010-05-28 20:21:22 +08:00
|
|
|
[enable_graphics=$enableval],
|
|
|
|
[enable_graphics="yes"])
|
|
|
|
AC_MSG_RESULT($enable_graphics)
|
|
|
|
if test "$enable_graphics" = "no"; then
|
2012-03-23 04:01:33 +08:00
|
|
|
AC_DEFINE([GRAPHICS_DISABLED], [], [Disable graphics])
|
|
|
|
AM_CONDITIONAL(GRAPHICS_DISABLED, true)
|
2012-03-02 06:43:51 +08:00
|
|
|
fi
|
|
|
|
|
2012-03-01 20:40:04 +08:00
|
|
|
# check whether to build embedded version
|
|
|
|
AC_MSG_CHECKING(--enable-embedded argument)
|
|
|
|
AC_ARG_ENABLE([embedded],
|
|
|
|
[ --enable-embedded enable embedded build (default=no)],
|
|
|
|
[enable_embedded=$enableval],
|
|
|
|
[enable_embedded="no"])
|
|
|
|
AC_MSG_RESULT($enable_embedded)
|
|
|
|
AM_CONDITIONAL([EMBEDDED], [test "$enable_embedded" = "yes"])
|
|
|
|
if test "$enable_embedded" = "yes"; then
|
|
|
|
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
|
|
|
|
fi
|
|
|
|
|
2013-11-12 18:40:40 +08:00
|
|
|
# check whether to build opencl version
|
|
|
|
AC_MSG_CHECKING(--enable-opencl argument)
|
|
|
|
AC_ARG_ENABLE([opencl],
|
2013-12-14 16:35:14 +08:00
|
|
|
[ --enable-opencl enable opencl build (default=no)],
|
2013-11-12 18:40:40 +08:00
|
|
|
[enable_opencl=$enableval],
|
|
|
|
[enable_opencl="no"])
|
|
|
|
AC_MSG_RESULT($enable_opencl)
|
|
|
|
AM_CONDITIONAL([USE_OPENCL], [test "$enable_opencl" = "yes"])
|
|
|
|
if test "$enable_opencl" = "yes"; then
|
|
|
|
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
|
2013-12-14 16:35:14 +08:00
|
|
|
AC_SUBST([OPENCL_HDR_PATH],[$OPENCL_INC])
|
|
|
|
AC_SUBST([OPENCL_LIB],[$OPENCL_LIBS])
|
2013-11-12 18:40:40 +08:00
|
|
|
fi
|
|
|
|
|
2012-03-03 07:51:33 +08:00
|
|
|
# check whether to build tesseract with -fvisibility=hidden -fvisibility-inlines-hidden
|
|
|
|
# http://gcc.gnu.org/wiki/Visibility
|
|
|
|
# http://groups.google.com/group/tesseract-dev/browse_thread/thread/976645ae98189127
|
|
|
|
AC_MSG_CHECKING(--enable-visibility argument)
|
|
|
|
AC_ARG_ENABLE([visibility],
|
|
|
|
[AC_HELP_STRING([--enable-visibility],[enable experimental build with fvisibility (default=no)])],
|
|
|
|
[enable_visibility=$enableval],
|
|
|
|
[enable_visibility="no"])
|
|
|
|
AC_MSG_RESULT($enable_visibility)
|
|
|
|
AM_CONDITIONAL([VISIBILITY], [test "$enable_visibility" = "yes"])
|
|
|
|
|
2011-10-17 03:39:54 +08:00
|
|
|
# check whether to build multiple libraries
|
|
|
|
AC_MSG_CHECKING(--enable-multiple-libraries argument)
|
|
|
|
AC_ARG_ENABLE([multiple-libraries],
|
2012-03-02 06:43:51 +08:00
|
|
|
[AC_HELP_STRING([--enable-multiple-libraries],[enable multiple libraries (default=no)])],
|
2011-10-17 03:39:54 +08:00
|
|
|
[enable_mlibs=$enableval],
|
|
|
|
[enable_mlibs="no"])
|
|
|
|
AC_MSG_RESULT($enable_mlibs)
|
|
|
|
AM_CONDITIONAL([USING_MULTIPLELIBS], [test "$enable_mlibs" = "yes"])
|
|
|
|
|
2012-03-23 04:01:33 +08:00
|
|
|
# Check if tessdata-prefix is disabled
|
|
|
|
AC_MSG_CHECKING(whether to use tessdata-prefix)
|
|
|
|
AC_ARG_ENABLE(tessdata-prefix,
|
2012-07-23 05:36:20 +08:00
|
|
|
[AC_HELP_STRING([--disable-tessdata-prefix],
|
|
|
|
[dont set TESSDATA-PREFIX during compile])],
|
|
|
|
[tessdata_prefix="no"], [tessdata_prefix="yes"])
|
2012-03-23 04:01:33 +08:00
|
|
|
AC_MSG_RESULT($tessdata_prefix)
|
|
|
|
AM_CONDITIONAL([NO_TESSDATA_PREFIX], [test "$tessdata_prefix" = "no"])
|
2011-10-17 03:39:54 +08:00
|
|
|
|
2012-07-23 05:36:20 +08:00
|
|
|
# Check whether enable debuging
|
|
|
|
AC_MSG_CHECKING(whether to enable debugging)
|
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
[AC_HELP_STRING([--enable-debug],
|
|
|
|
[turn on debugging (default=no)])],
|
|
|
|
[debug=$enableval],
|
|
|
|
[debug="no"])
|
|
|
|
AC_MSG_RESULT($debug)
|
|
|
|
if test x"$debug" = x"yes"; then
|
2012-07-29 05:17:20 +08:00
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Wno-uninitialized -O0 -DDEBUG"
|
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wno-uninitialized -O0 -DDEBUG"
|
2012-07-23 05:36:20 +08:00
|
|
|
else
|
2013-11-10 23:12:01 +08:00
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -O2 -DNDEBUG"
|
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -O2 -DNDEBUG"
|
2012-07-23 05:36:20 +08:00
|
|
|
fi
|
|
|
|
|
2011-10-17 03:39:54 +08:00
|
|
|
#localedir='${prefix}/share/locale'
|
2010-07-19 09:59:13 +08:00
|
|
|
|
2007-03-08 04:03:40 +08:00
|
|
|
# Always look into a "gnu" directory.
|
|
|
|
curwd=`pwd`
|
|
|
|
if test -d $curwd/gnu/include ; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$curwd/gnu/include"
|
|
|
|
fi
|
|
|
|
if test -d $curwd/gnu/lib ; then
|
|
|
|
LDFLAGS="$LDFLAGS -L$curwd/gnu/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Special cases
|
|
|
|
case "$host" in
|
|
|
|
*-darwin* | *-macos10*)
|
|
|
|
if test -d /opt/local ; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I/opt/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/opt/local/lib"
|
|
|
|
elif test -d /sw ; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I/sw/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/sw/lib"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Check Compiler Characteristics and
|
|
|
|
# configure automake. The two appear to
|
|
|
|
# be intimately linked...
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
# Define order of compilers
|
2013-01-31 06:57:49 +08:00
|
|
|
AC_PROG_CXX(g++)
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2010-05-26 22:20:20 +08:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2013-01-31 06:57:49 +08:00
|
|
|
# ----------------------------------------
|
2007-03-08 04:03:40 +08:00
|
|
|
# Additional checking of compiler characteristics
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
# Check Endianness. If Big Endian, this will define WORDS_BIGENDIAN
|
|
|
|
# See also at end of this file, where we define INTEL_BYTE_ORDER
|
|
|
|
# or MOTOROLA_BYTE_ORDER.
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Check for programs we need
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
# Check where all the following programs are and set
|
|
|
|
# variables accordingly:
|
2010-05-26 22:20:20 +08:00
|
|
|
LT_INIT
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# C++ related options
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
2013-11-04 01:22:27 +08:00
|
|
|
dnl ********************
|
|
|
|
dnl turn on c++11
|
|
|
|
dnl ********************
|
|
|
|
|
|
|
|
OLD_CXXFLAGS=$CXXFLAGS
|
|
|
|
AC_MSG_CHECKING(whether compiler supports C++11)
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[
|
|
|
|
AC_LANG_SOURCE([[
|
|
|
|
#if (__cplusplus < 201103L)
|
|
|
|
#error C++ 11 is unsupported
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
has_cpp11=yes
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
has_cpp11=no
|
|
|
|
])
|
|
|
|
CXXFLAGS="$OLD_CXXFLAGS"
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Check for libraries
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2012-09-22 04:00:01 +08:00
|
|
|
AC_SEARCH_LIBS(sem_init,pthread rt)
|
2013-01-31 06:57:49 +08:00
|
|
|
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Checks for header files.
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
AC_CHECK_HEADERS(sys/ipc.h sys/shm.h)
|
|
|
|
AC_CHECK_HEADERS(limits.h malloc.h)
|
|
|
|
# Enable use of system-defined bool type if available:
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
|
|
|
|
# Misc
|
|
|
|
AC_SYS_INTERPRETER
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
AC_CHECK_TYPES(wchar_t)
|
2013-09-23 23:26:50 +08:00
|
|
|
AC_CHECK_TYPES(long long int)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CHECK_TYPES(mbstate_t,,,[#include "wchar.h"])
|
|
|
|
|
|
|
|
# ----------------------------------------
|
2013-09-27 04:23:17 +08:00
|
|
|
# Test auxiliary packages
|
2007-03-08 04:03:40 +08:00
|
|
|
# ----------------------------------------
|
|
|
|
|
2009-07-11 11:05:57 +08:00
|
|
|
# Check location of leptonica/liblept headers.
|
2011-03-31 03:40:23 +08:00
|
|
|
AC_MSG_CHECKING(for leptonica)
|
|
|
|
AC_ARG_VAR(LIBLEPT_HEADERSDIR,[Leptonica headers directory])
|
|
|
|
|
2009-07-11 11:05:57 +08:00
|
|
|
have_lept=no
|
2011-03-31 03:40:23 +08:00
|
|
|
if test "$LIBLEPT_HEADERSDIR" = "" ; then
|
|
|
|
LIBLEPT_HEADERSDIR="/usr/local/include /usr/include"
|
|
|
|
fi
|
|
|
|
for incd in $LIBLEPT_HEADERSDIR
|
2009-07-11 11:05:57 +08:00
|
|
|
do
|
|
|
|
for lept in . leptonica liblept
|
|
|
|
do
|
|
|
|
if test -r "$incd/$lept/allheaders.h" ; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$incd/$lept"
|
|
|
|
have_lept=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
if test "$have_lept" = yes ; then
|
2011-03-31 03:40:23 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
2011-05-25 04:17:28 +08:00
|
|
|
AC_CHECK_LIB(lept,pixCreate,[], AC_MSG_ERROR([leptonica library missing]))
|
2011-03-31 03:40:23 +08:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR([leptonica not found])
|
2009-07-11 11:05:57 +08:00
|
|
|
fi
|
|
|
|
|
2014-02-01 07:00:40 +08:00
|
|
|
AC_MSG_CHECKING([leptonica version >= 1.70])
|
|
|
|
AC_PREPROC_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([#include <leptonica/allheaders.h>],
|
2014-03-02 22:40:21 +08:00
|
|
|
[#if (LIBLEPT_MAJOR_VERSION >= 1) && (LIBLEPT_MINOR_VERSION >= 70)
|
2014-02-01 07:00:40 +08:00
|
|
|
int i = 0;
|
|
|
|
#else
|
|
|
|
#error You need to upgrade your leptonica library!
|
|
|
|
#endif])],
|
|
|
|
[AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_FAILURE([leptonica 1.70 or higher is required])])
|
|
|
|
|
2013-09-27 04:23:17 +08:00
|
|
|
# Check location of icu headers
|
|
|
|
have_icu=false
|
|
|
|
AC_CHECK_HEADERS(unicode/uchar.h, have_icu=true, have_icu=false)
|
|
|
|
if !($have_icu); then
|
|
|
|
AC_MSG_WARN(Training tools WILL NOT be built because of missing icu library.)
|
|
|
|
AC_MSG_WARN(Try to install libicu-devel package.)
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_TRAINING, $have_icu)
|
|
|
|
|
2014-01-10 02:08:12 +08:00
|
|
|
# Check location of pango headers
|
|
|
|
have_pango=false
|
|
|
|
AC_CHECK_HEADERS(pango-1.0/pango/pango-features.h, have_pango=true, have_pango=false)
|
|
|
|
if !($have_pango); then
|
|
|
|
AC_MSG_WARN(Training tools WILL NOT be built because of missing pango library.)
|
|
|
|
AC_MSG_WARN(Try to install libpango1.0-dev package.)
|
|
|
|
else
|
|
|
|
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags pango)"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_TRAINING, $have_pango)
|
|
|
|
|
|
|
|
# Check location of cairo headers
|
|
|
|
have_cairo=false
|
|
|
|
AC_CHECK_HEADERS(cairo/cairo-version.h, have_cairo=true, have_cairo=false)
|
|
|
|
if !($have_cairo); then
|
|
|
|
AC_MSG_WARN(Training tools WILL NOT be built because of missing cairo library.)
|
|
|
|
AC_MSG_WARN(Try to install libcairo-dev?? package.)
|
|
|
|
else
|
|
|
|
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags cairo)"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_TRAINING, $have_cairo)
|
|
|
|
|
2014-01-27 06:39:20 +08:00
|
|
|
if test "x$has_cpp11" = "xyes"
|
|
|
|
then
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
|
|
|
fi
|
|
|
|
|
2007-03-08 04:03:40 +08:00
|
|
|
# ----------------------------------------
|
|
|
|
# Final Tasks and Output
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
# Output files
|
2012-07-29 05:17:20 +08:00
|
|
|
AC_CONFIG_FILES([Makefile tesseract.pc])
|
2009-07-11 11:05:57 +08:00
|
|
|
AC_CONFIG_FILES(api/Makefile)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CONFIG_FILES(ccmain/Makefile)
|
2013-11-12 18:40:40 +08:00
|
|
|
AC_CONFIG_FILES(opencl/Makefile)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CONFIG_FILES(ccstruct/Makefile)
|
|
|
|
AC_CONFIG_FILES(ccutil/Makefile)
|
|
|
|
AC_CONFIG_FILES(classify/Makefile)
|
2010-11-24 02:34:14 +08:00
|
|
|
AC_CONFIG_FILES(cube/Makefile)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CONFIG_FILES(cutil/Makefile)
|
|
|
|
AC_CONFIG_FILES(dict/Makefile)
|
2010-11-24 02:34:14 +08:00
|
|
|
AC_CONFIG_FILES(neural_networks/runtime/Makefile)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_CONFIG_FILES(textord/Makefile)
|
|
|
|
AC_CONFIG_FILES(viewer/Makefile)
|
|
|
|
AC_CONFIG_FILES(wordrec/Makefile)
|
|
|
|
AC_CONFIG_FILES(training/Makefile)
|
2007-03-31 07:53:34 +08:00
|
|
|
AC_CONFIG_FILES(tessdata/Makefile)
|
2007-07-18 09:04:56 +08:00
|
|
|
AC_CONFIG_FILES(tessdata/configs/Makefile)
|
|
|
|
AC_CONFIG_FILES(tessdata/tessconfigs/Makefile)
|
|
|
|
AC_CONFIG_FILES(testing/Makefile)
|
2008-02-01 08:59:01 +08:00
|
|
|
AC_CONFIG_FILES(java/Makefile)
|
2009-06-03 10:50:54 +08:00
|
|
|
AC_CONFIG_FILES(java/com/Makefile)
|
|
|
|
AC_CONFIG_FILES(java/com/google/Makefile)
|
|
|
|
AC_CONFIG_FILES(java/com/google/scrollview/Makefile)
|
|
|
|
AC_CONFIG_FILES(java/com/google/scrollview/events/Makefile)
|
|
|
|
AC_CONFIG_FILES(java/com/google/scrollview/ui/Makefile)
|
2012-03-02 07:19:35 +08:00
|
|
|
AC_CONFIG_FILES(doc/Makefile)
|
2007-03-08 04:03:40 +08:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
# Final message
|
|
|
|
echo ""
|
|
|
|
echo "Configuration is done."
|
2013-09-27 04:23:17 +08:00
|
|
|
echo "You can now build and install $PACKAGE_NAME by running:"
|
2007-03-08 04:03:40 +08:00
|
|
|
echo ""
|
2013-09-27 04:23:17 +08:00
|
|
|
echo "$ make"
|
|
|
|
echo "$ sudo make install"
|
|
|
|
echo "$ sudo make install LANGS=\"eng ara deu\""
|
|
|
|
echo " Or:"
|
|
|
|
echo "$ sudo make install-langs"
|
|
|
|
|
|
|
|
if !($have_icu); then
|
|
|
|
echo ""
|
|
|
|
echo "You can not build training tools because of missing dependency."
|
|
|
|
echo "Check configure output for details."
|
|
|
|
echo ""
|
|
|
|
else
|
|
|
|
echo ""
|
|
|
|
echo "Training tools can be build and installed (after building of $PACKAGE_NAME) with:"
|
|
|
|
echo ""
|
|
|
|
echo "$ make training"
|
|
|
|
echo "$ sudo make training-install"
|
|
|
|
echo ""
|
|
|
|
fi
|
2007-03-08 04:03:40 +08:00
|
|
|
# ----------------------------------------
|
|
|
|
# CONFIG Template
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
# Fence added in configuration file
|
|
|
|
AH_TOP([
|
|
|
|
#ifndef CONFIG_AUTO_H
|
|
|
|
#define CONFIG_AUTO_H
|
|
|
|
/* config_auto.h: begin */
|
|
|
|
])
|
|
|
|
|
|
|
|
# Stuff added at bottom of file
|
|
|
|
AH_BOTTOM([
|
|
|
|
|
|
|
|
/* Miscellaneous defines */
|
|
|
|
#define AUTOCONF 1
|
|
|
|
|
2010-10-01 00:27:39 +08:00
|
|
|
/* Not used yet
|
2010-09-30 23:53:40 +08:00
|
|
|
#ifndef NO_GETTEXT
|
|
|
|
#define USING_GETTEXT
|
2010-07-20 18:31:49 +08:00
|
|
|
#endif
|
2010-10-01 00:27:39 +08:00
|
|
|
*/
|
2010-07-20 18:31:49 +08:00
|
|
|
|
2007-03-08 04:03:40 +08:00
|
|
|
/* config_auto.h: end */
|
|
|
|
#endif
|
|
|
|
])
|