File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 115
115
AM_CONDITIONAL([AVX_OPT], false)
116
116
AM_CONDITIONAL([AVX2_OPT], false)
117
117
AM_CONDITIONAL([SSE41_OPT], false)
118
+ AM_CONDITIONAL([MARCH_NATIVE_OPT], false)
118
119
119
120
AX_CHECK_COMPILE_FLAG([-mavx], [avx= true], [avx= false])
120
121
if $avx ; then
@@ -131,6 +132,11 @@ if $sse41; then
131
132
AM_CONDITIONAL([SSE41_OPT], true)
132
133
fi
133
134
135
+ AX_CHECK_COMPILE_FLAG([-march= native], [arch_native= true], [arch_native= false])
136
+ if $arch_native ; then
137
+ AM_CONDITIONAL([MARCH_NATIVE_OPT], true)
138
+ fi
139
+
134
140
AC_ARG_WITH([extra-includes],
135
141
[AS_HELP_STRING([--with-extra-includes= DIR],
136
142
[Define an additional directory for include files])],
Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ if SSE41_OPT
29
29
libtesseract_sse_la_CXXFLAGS = -ffast-math -msse4.1
30
30
endif
31
31
32
- libtesseract_native_la_CXXFLAGS = -O3 -ffast-math -march=native -mtune=native
32
+ libtesseract_native_la_CXXFLAGS = -O3 -ffast-math
33
+ if MARCH_NATIVE_OPT
34
+ libtesseract_native_la_CXXFLAGS += -march=native -mtune=native
35
+ endif
33
36
libtesseract_native_la_SOURCES = dotproduct.cpp
34
37
35
38
libtesseract_arch_la_SOURCES = intsimdmatrix.cpp simddetect.cpp
You can’t perform that action at this time.
0 commit comments