Commit 9c1f34d3 for tesseract
commit 9c1f34d35195c8a7dae843b906924bb3f5b8b9f2
Author: Matt Van Horn <mvanhorn@users.noreply.github.com>
Date: Thu Nov 19 13:16:04 2026 -0800
fix: link the autotools shared library to Accelerate (#4636)
Add $(FRAMEWORK_ACCELERATE) to libtesseract_la_LDFLAGS so the shared
library links the framework it uses on macOS.
Also fix MY_CHECK_FRAMEWORK in configure.ac: without spaces around "="
the test checked a single non-empty string and was always true, so
FRAMEWORK_<name> was set even when the framework link test failed.
Fixes #4552
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
diff --git a/Makefile.am b/Makefile.am
index c7e066c2..c03fefef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -121,6 +121,7 @@ lib_LTLIBRARIES = libtesseract.la
libtesseract_la_LDFLAGS = $(LEPTONICA_LIBS)
libtesseract_la_LDFLAGS += $(libarchive_LIBS)
libtesseract_la_LDFLAGS += $(libcurl_LIBS)
+libtesseract_la_LDFLAGS += $(FRAMEWORK_ACCELERATE)
if T_WIN
libtesseract_la_LDFLAGS += -no-undefined -lws2_32
else
diff --git a/configure.ac b/configure.ac
index ad4c30dc..62bb7cda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,7 +302,7 @@ m4_define([MY_CHECK_FRAMEWORK],
[my_cv_framework_$1=no])
LIBS="$save_LIBS"
])
- if test "$my_cv_framework_$1"="yes"; then
+ if test "$my_cv_framework_$1" = "yes"; then
AC_DEFINE(AS_TR_CPP([HAVE_FRAMEWORK_$1]), 1,
[Define if you have the $1 framework])
AS_TR_CPP([FRAMEWORK_$1])="-framework $1"