1AC_DEFUN([rk_FRAMEWORK_SECURITY], [ 2 3AC_MSG_CHECKING([for framework security]) 4AC_CACHE_VAL(rk_cv_framework_security, 5[ 6if test "$rk_cv_framework_security" != yes; then 7 ac_save_LIBS="$LIBS" 8 LIBS="$ac_save_LIBS -framework Security -framework CoreFoundation" 9 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <Security/Security.h> 10]], 11[[SecKeychainSearchRef searchRef; 12SecKeychainSearchCreateFromAttributes(NULL,kSecCertificateItemClass,NULL, &searchRef); 13CFRelease(&searchRef); 14]])],[rk_cv_framework_security=yes]) 15 LIBS="$ac_save_LIBS" 16fi 17]) 18 19if test "$rk_cv_framework_security" = yes; then 20 AC_DEFINE(HAVE_FRAMEWORK_SECURITY, 1, [Have -framework Security]) 21 AC_MSG_RESULT(yes) 22else 23 AC_MSG_RESULT(no) 24fi 25AM_CONDITIONAL(FRAMEWORK_SECURITY, test "$rk_cv_framework_security" = yes) 26 27if test "$rk_cv_framework_security" = yes; then 28 AC_NEED_PROTO([#include <Security/Security.h>],SecKeyGetCSPHandle) 29fi 30 31]) 32