1*ebfedea0SLionel SambucAC_DEFUN([rk_FRAMEWORK_SECURITY], [ 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel SambucAC_MSG_CHECKING([for framework security]) 4*ebfedea0SLionel SambucAC_CACHE_VAL(rk_cv_framework_security, 5*ebfedea0SLionel Sambuc[ 6*ebfedea0SLionel Sambucif test "$rk_cv_framework_security" != yes; then 7*ebfedea0SLionel Sambuc ac_save_LIBS="$LIBS" 8*ebfedea0SLionel Sambuc LIBS="$ac_save_LIBS -framework Security -framework CoreFoundation" 9*ebfedea0SLionel Sambuc AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <Security/Security.h> 10*ebfedea0SLionel Sambuc]], 11*ebfedea0SLionel Sambuc[[SecKeychainSearchRef searchRef; 12*ebfedea0SLionel SambucSecKeychainSearchCreateFromAttributes(NULL,kSecCertificateItemClass,NULL, &searchRef); 13*ebfedea0SLionel SambucCFRelease(&searchRef); 14*ebfedea0SLionel Sambuc]])],[rk_cv_framework_security=yes]) 15*ebfedea0SLionel Sambuc LIBS="$ac_save_LIBS" 16*ebfedea0SLionel Sambucfi 17*ebfedea0SLionel Sambuc]) 18*ebfedea0SLionel Sambuc 19*ebfedea0SLionel Sambucif test "$rk_cv_framework_security" = yes; then 20*ebfedea0SLionel Sambuc AC_DEFINE(HAVE_FRAMEWORK_SECURITY, 1, [Have -framework Security]) 21*ebfedea0SLionel Sambuc AC_MSG_RESULT(yes) 22*ebfedea0SLionel Sambucelse 23*ebfedea0SLionel Sambuc AC_MSG_RESULT(no) 24*ebfedea0SLionel Sambucfi 25*ebfedea0SLionel SambucAM_CONDITIONAL(FRAMEWORK_SECURITY, test "$rk_cv_framework_security" = yes) 26*ebfedea0SLionel Sambuc 27*ebfedea0SLionel Sambucif test "$rk_cv_framework_security" = yes; then 28*ebfedea0SLionel Sambuc AC_NEED_PROTO([#include <Security/Security.h>],SecKeyGetCSPHandle) 29*ebfedea0SLionel Sambucfi 30*ebfedea0SLionel Sambuc 31*ebfedea0SLionel Sambuc]) 32