301-cross-compilation-macos.patch 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --- a/build/ac-macros/macosx.m4 2016-02-09 01:24:13.181409245 -0500
  2. +++ b/build/ac-macros/macosx.m4 2016-02-09 01:25:15.873408288 -0500
  3. @@ -17,94 +17,4 @@ dnl specific language governing permis
  4. dnl under the License.
  5. dnl ===================================================================
  6. dnl
  7. -dnl Mac OS X specific checks
  8. -dnl SVN_LIB_MACHO_ITERATE
  9. -dnl Check for _dyld_image_name and _dyld_image_header availability
  10. -AC_DEFUN(SVN_LIB_MACHO_ITERATE,
  11. -[
  12. - AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
  13. - AC_RUN_IFELSE([AC_LANG_PROGRAM([[
  14. - #include <mach-o/dyld.h>
  15. - #include <mach-o/loader.h>
  16. - ]],[[
  17. - const struct mach_header *header = _dyld_get_image_header(0);
  18. - const char *name = _dyld_get_image_name(0);
  19. - if (name && header) return 0;
  20. - return 1;
  21. - ]])],[
  22. - AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1],
  23. - [Is Mach-O low-level _dyld API available?])
  24. - AC_MSG_RESULT([yes])
  25. - ],[
  26. - AC_MSG_RESULT([no])
  27. - ])
  28. -])
  29. -
  30. -dnl SVN_LIB_MACOS_PLIST
  31. -dnl Assign variables for Mac OS property list support
  32. -AC_DEFUN(SVN_LIB_MACOS_PLIST,
  33. -[
  34. - AC_MSG_CHECKING([for Mac OS property list utilities])
  35. -
  36. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  37. - #include <AvailabilityMacros.h>
  38. - #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
  39. - || !defined(MAC_OS_X_VERSION_10_0) \
  40. - || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0)
  41. - #error ProperyList API unavailable.
  42. - #endif
  43. - ]],[[]])],[
  44. - dnl ### Hack. We should only need to pass the -framework options when
  45. - dnl linking libsvn_subr, since it is the only library that uses Keychain.
  46. - dnl
  47. - dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
  48. - dnl OS X frameworks like it does for normal libraries, so we need to
  49. - dnl explicitly pass the option to all the users of libsvn_subr to allow
  50. - dnl static builds to link successfully.
  51. - dnl
  52. - dnl This does mean that all executables we link will be linked directly
  53. - dnl to these frameworks - even when building shared libraries - but that
  54. - dnl shouldn't cause any problems.
  55. -
  56. - LIBS="$LIBS -framework CoreFoundation"
  57. - AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
  58. - [Is Mac OS property list API available?])
  59. - AC_MSG_RESULT([yes])
  60. - ],[
  61. - AC_MSG_RESULT([no])
  62. - ])
  63. -])
  64. -
  65. -dnl SVN_LIB_MACOS_KEYCHAIN
  66. -dnl Check configure options and assign variables related to Keychain support
  67. -
  68. -AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN,
  69. -[
  70. - AC_ARG_ENABLE(keychain,
  71. - AS_HELP_STRING([--disable-keychain],
  72. - [Disable use of Mac OS KeyChain for auth credentials]),
  73. - [enable_keychain=$enableval],[enable_keychain=yes])
  74. -
  75. - AC_MSG_CHECKING([for Mac OS KeyChain Services])
  76. -
  77. - if test "$enable_keychain" = "yes"; then
  78. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  79. - #include <AvailabilityMacros.h>
  80. - #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
  81. - || !defined(MAC_OS_X_VERSION_10_2) \
  82. - || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2)
  83. - #error KeyChain API unavailable.
  84. - #endif
  85. - ]],[[]])],[
  86. - dnl ### Hack, see SVN_LIB_MACOS_PLIST
  87. - LIBS="$LIBS -framework Security"
  88. - LIBS="$LIBS -framework CoreServices"
  89. - AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])
  90. - AC_MSG_RESULT([yes])
  91. - ],[
  92. - enable_keychain=no
  93. - AC_MSG_RESULT([no])
  94. - ])
  95. - fi
  96. -])