cmake, configure: also link with CoreServices

When linking with CoreFoundation, also link with CoreServices which is
apparently required to avoid an NSInvalidArgumentException in software
linking with libcurl on macOS Sonoma 14 and later.

Fixes #11893
Closes #11894
This commit is contained in:
Ryan Schmidt 2023-09-19 20:36:39 -05:00 committed by Daniel Stenberg
parent c6dc25f111
commit 6ab7e1990b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 12 additions and 7 deletions

View file

@ -23,7 +23,7 @@
#***************************************************************************
AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
AC_MSG_CHECKING([whether to link macOS CoreFoundation and SystemConfiguration framework])
AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks])
case $host_os in
darwin*)
AC_COMPILE_IFELSE([
@ -43,7 +43,7 @@ case $host_os in
])
if test "x$build_for_macos" != xno; then
AC_MSG_RESULT(yes)
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework SystemConfiguration"
else
AC_MSG_RESULT(no)
fi