test for -framework Security

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20886 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-04 21:46:55 +00:00
parent 9c322b0357
commit 492b12e998

24
cf/framework-security.m4 Normal file
View File

@@ -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 <Security/Security.h>
]],
[[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)
])