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
This commit is contained in:
zdenop 2014-01-31 23:00:40 +00:00
parent 2ad63776e5
commit e28176c5dd
2 changed files with 12 additions and 1 deletions

View File

@ -347,6 +347,17 @@ else
AC_MSG_ERROR([leptonica not found])
fi
AC_MSG_CHECKING([leptonica version >= 1.70])
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([#include <leptonica/allheaders.h>],
[#if (LIBLEPT_MINOR_VERSION >= 1) && (LIBLEPT_MINOR_VERSION >= 70)
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])])
# Check location of icu headers
have_icu=false
AC_CHECK_HEADERS(unicode/uchar.h, have_icu=true, have_icu=false)

View File

@ -12,5 +12,5 @@ URL: https://code.google.com/p/tesseract-ocr
Version: @VERSION@
# Requires.private: lept
Libs: -L${libdir} -ltesseract
Libs.private: -lpthread -llept
Libs.private: -lpthread -llept @OPENCL_LIB@
Cflags: -I${includedir}