HEIMDAL: move code from source4/heimdal* to third_party/heimdal*
[samba.git] / third_party / heimdal / cf / framework-corefoundation.m4
1 AC_DEFUN([rk_FRAMEWORK_COREFOUNDATION], [
2
3 AC_MSG_CHECKING([for framework CoreFoundation])
4 AC_CACHE_VAL(rk_cv_framework_corefoundation,
5 [
6 if test "$rk_cv_framework_corefoundation" != yes; then
7         ac_save_LIBS="$LIBS"
8         LIBS="$ac_save_LIBS -framework CoreFoundation"
9         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <CoreFoundation/CoreFoundation.h>
10 ]],
11 [[CFURLRef url;
12 char path[] = "/";
13 url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (UInt8 *)
14 path, strlen(path), FALSE);
15 CFRelease(url);
16 ]])],[rk_cv_framework_corefoundation=yes])
17         LIBS="$ac_save_LIBS"
18 fi
19 ])
20
21 if test "$rk_cv_framework_corefoundation" = yes; then
22    AC_DEFINE(HAVE_FRAMEWORK_COREFOUNDATION, 1, [Have -framework CoreFoundation])
23    AC_MSG_RESULT(yes)
24 else
25    AC_MSG_RESULT(no)
26 fi
27 AM_CONDITIONAL(FRAMEWORK_COREFOUNDATION, test "$rk_cv_framework_corefoundation" = yes)
28 ])