diff --git a/cf/framework-security.m4 b/cf/framework-security.m4 new file mode 100644 index 000000000..72eb2c7b0 --- /dev/null +++ b/cf/framework-security.m4 @@ -0,0 +1,24 @@ +AC_DEFUN([rk_FRAMEWORK_SECURITY], [ + +AC_MSG_CHECKING([for framework security]) +AC_CACHE_VAL(rk_cv_framework_security, +[ +if test "$rk_cv_framework_security" != yes; then + ac_save_LIBS="$LIBS" + LIBS="$ac_save_LIBS -framework Security -framework CoreFoundation" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +]], +[[SecKeychainSearchRef searchRef; +SecKeychainSearchCreateFromAttributes(NULL,kSecCertificateItemClass,NULL, &searchRef); +CFRelease(&searchRef); +]])],[rk_cv_framework_security=yes]) + LIBS="$ac_save_LIBS" +fi +]) + +if test "$rk_cv_framework_security" = yes; then + AC_DEFINE(HAVE_FRAMEWORK_SECURITY, 1, [Have -framework Security]) +fi +AM_CONDITIONAL(FRAMEWORK_SECURITY, test "$rk_cv_framework_security" = yes) + +])