1
dnl ===================================================================
2
dnl Licensed to the Apache Software Foundation (ASF) under one
3
dnl or more contributor license agreements. See the NOTICE file
4
dnl distributed with this work for additional information
5
dnl regarding copyright ownership. The ASF licenses this file
6
dnl to you under the Apache License, Version 2.0 (the
7
dnl "License"); you may not use this file except in compliance
8
dnl with the License. You may obtain a copy of the License at
10
dnl http://www.apache.org/licenses/LICENSE-2.0
12
dnl Unless required by applicable law or agreed to in writing,
13
dnl software distributed under the License is distributed on an
14
dnl "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
dnl KIND, either express or implied. See the License for the
16
dnl specific language governing permissions and limitations
17
dnl under the License.
18
dnl ===================================================================
20
dnl Mac OS X specific checks
22
dnl SVN_LIB_MACHO_ITERATE
23
dnl Check for _dyld_image_name and _dyld_image_header availability
24
AC_DEFUN(SVN_LIB_MACHO_ITERATE,
26
AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
27
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
28
#include <mach-o/dyld.h>
29
#include <mach-o/loader.h>
31
const struct mach_header *header = _dyld_get_image_header(0);
32
const char *name = _dyld_get_image_name(0);
33
if (name && header) return 0;
36
AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1],
37
[Is Mach-O low-level _dyld API available?])
44
dnl SVN_LIB_MACOS_PLIST
45
dnl Assign variables for Mac OS property list support
46
AC_DEFUN(SVN_LIB_MACOS_PLIST,
48
AC_MSG_CHECKING([for Mac OS property list utilities])
50
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
51
#include <AvailabilityMacros.h>
52
#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
53
|| !defined(MAC_OS_X_VERSION_10_0) \
54
|| (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0)
55
#error ProperyList API unavailable.
58
dnl ### Hack. We should only need to pass the -framework options when
59
dnl linking libsvn_subr, since it is the only library that uses Keychain.
61
dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
62
dnl OS X frameworks like it does for normal libraries, so we need to
63
dnl explicitly pass the option to all the users of libsvn_subr to allow
64
dnl static builds to link successfully.
66
dnl This does mean that all executables we link will be linked directly
67
dnl to these frameworks - even when building shared libraries - but that
68
dnl shouldn't cause any problems.
70
LIBS="$LIBS -framework CoreFoundation"
71
AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
72
[Is Mac OS property list API available?])
79
dnl SVN_LIB_MACOS_KEYCHAIN
80
dnl Check configure options and assign variables related to Keychain support
82
AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN,
84
AC_ARG_ENABLE(keychain,
85
AS_HELP_STRING([--disable-keychain],
86
[Disable use of Mac OS KeyChain for auth credentials]),
87
[enable_keychain=$enableval],[enable_keychain=yes])
89
AC_MSG_CHECKING([for Mac OS KeyChain Services])
91
if test "$enable_keychain" = "yes"; then
92
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
93
#include <AvailabilityMacros.h>
94
#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
95
|| !defined(MAC_OS_X_VERSION_10_2) \
96
|| (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2)
97
#error KeyChain API unavailable.
100
dnl ### Hack, see SVN_LIB_MACOS_PLIST
101
LIBS="$LIBS -framework Security"
102
LIBS="$LIBS -framework CoreServices"
103
AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])