Author: brane Date: Wed Jun 18 10:10:58 2025 New Revision: 1926541 URL: http://svn.apache.org/viewvc?rev=1926541&view=rev Log: On macOS, the SecKeychain* API has been deprecated. To prepare for adding an implementation that uses the "new" SecItem* API, check that the required functions are available.
* build/ac-macros/macosx.m4 (SVN_LIB_MACOS_KEYCHAIN): Check for the functions SecItemCopyMatching, SecItemAdd and SecItemUpdate and if they're found, define the macro SVN_HAVE_KEYCHAIN_SECITEM_API. Modified: subversion/trunk/build/ac-macros/macosx.m4 Modified: subversion/trunk/build/ac-macros/macosx.m4 URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/macosx.m4?rev=1926541&r1=1926540&r2=1926541&view=diff ============================================================================== --- subversion/trunk/build/ac-macros/macosx.m4 (original) +++ subversion/trunk/build/ac-macros/macosx.m4 Wed Jun 18 10:10:58 2025 @@ -91,8 +91,22 @@ AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN, ]],[[]])],[ SVN_MACOS_KEYCHAIN_LIBS="-framework Security -framework CoreServices" AC_SUBST(SVN_MACOS_KEYCHAIN_LIBS) - AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?]) + AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], + [Is Mac OS KeyChain support enabled?]) AC_MSG_RESULT([yes]) + + dnl Check if the newer, 10.6+ SecItem API is available. + old_LIBS="$LIBS" + LIBS="$SVN_MACOS_KEYCHAIN_LIBS $LIBS" + AC_CHECK_FUNCS(SecItemCopyMatching SecItemAdd SecItemUpdate) + LIBS="$old_LIBS" + + if [[ x$ac_cv_func_SecItemCopyMatching = xyes \ + -a x$ac_cv_func_SecItemAdd = xyes \ + -a x$ac_cv_func_SecItemUpdate = xyes ]]; then + AC_DEFINE([SVN_HAVE_KEYCHAIN_SECITEM_API], [1], + [Is the Mac OS KeyChain SecItem API available?]) + fi ],[ enable_keychain=no AC_MSG_RESULT([no])