File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,13 @@ lib_LTLIBRARIES = libtesseract_avx.la libtesseract_sse.la
20
20
libtesseract_avx_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION )
21
21
libtesseract_sse_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION )
22
22
endif
23
+
24
+ if AVX_OPT
23
25
libtesseract_avx_la_CXXFLAGS = -mavx
26
+ endif
27
+ if SSE41_OPT
24
28
libtesseract_sse_la_CXXFLAGS = -msse4.1
29
+ endif
25
30
26
31
libtesseract_avx_la_SOURCES = dotproductavx.cpp
27
32
Original file line number Diff line number Diff line change @@ -115,6 +115,18 @@ case "${host_os}" in
115
115
;;
116
116
esac
117
117
118
+ # # Checks for supported compiler options.
119
+ AM_CONDITIONAL([AVX_OPT], false)
120
+ AM_CONDITIONAL([SSE41_OPT], false)
121
+ AX_CHECK_COMPILE_FLAG([-mavx], [avx= 1], [avx= 0])
122
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [sse41= 1], [sse41= 0])
123
+ if test x$avx = x1; then
124
+ AM_CONDITIONAL([AVX_OPT], true)
125
+ fi
126
+ if test x$sse41 = x1; then
127
+ AM_CONDITIONAL([SSE41_OPT], true)
128
+ fi
129
+
118
130
includedir=" ${includedir} /tesseract"
119
131
120
132
AC_ARG_WITH([extra-includes],
You can’t perform that action at this time.
0 commit comments