File: framework-security.m4

package info (click to toggle)
heimdal 7.8.git20221117.28daf24%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 37,024 kB
  • sloc: ansic: 363,849; sh: 7,613; javascript: 6,382; makefile: 4,567; perl: 1,936; yacc: 1,786; lex: 732; python: 725; awk: 468; java: 119; asm: 30
file content (31 lines) | stat: -rw-r--r-- 908 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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])
   AC_MSG_RESULT(yes)
else
   AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(FRAMEWORK_SECURITY, test "$rk_cv_framework_security" = yes)

if test "$rk_cv_framework_security" = yes; then
   AC_NEED_PROTO([#include <Security/Security.h>],SecKeyGetCSPHandle)
fi

])