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