Fixes #76 - enable OpenMP support

This commit is contained in:
Zdenko Podobný 2015-08-14 21:35:18 +02:00
parent ae6f195b1f
commit bb19f2c16b
3 changed files with 15 additions and 0 deletions

View File

@ -81,6 +81,9 @@ tesseract_LDADD = libtesseract.la
if USE_OPENCL
tesseract_LDADD += $(OPENCL_LIB)
endif
if OPENMP
tesseract_LDADD += $(OPENMP_CFLAGS)
endif
if T_WIN
tesseract_LDADD += -lws2_32

View File

@ -18,6 +18,9 @@
///////////////////////////////////////////////////////////////////////
#include "tesseractclass.h"
#ifdef OPENMP
#include <omp.h>
#endif // OPENMP
namespace tesseract {

View File

@ -166,6 +166,15 @@ if test "$enable_embedded" = "yes"; then
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
fi
# check whether to build OpenMP support
AC_OPENMP
AS_IF([test "x$OPENMP_CFLAGS" != "x"],
AM_CONDITIONAL([OPENMP], test "x$OPENMP_CFLAGS" != "x")
AC_SUBST(AM_CPPFLAGS,"$OPENMP_CXXFLAGS")
AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])
)
# check whether to build opencl version
AC_MSG_CHECKING(--enable-opencl argument)
AC_ARG_ENABLE([opencl],