Skip to content

Commit

Permalink
check for leptonica version; add info to tesseract.pc about opencl li…
Browse files Browse the repository at this point in the history
…b if needed

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1035 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
zdenop committed Jan 31, 2014
1 parent 2ad6377 commit e28176c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tesseract.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit e28176c

Please sign in to comment.