PageRenderTime 51ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/m4/osx.m4

http://github.com/mozy/mordor
m4 | 92 lines | 88 code | 4 blank | 0 comment | 0 complexity | dbcd58dd6ee367521ce318e82923e6ec MD5 | raw file
Possible License(s): BSD-3-Clause
  1. dnl Defines COREFOUNDATION_FRAMEWORK_LIBS.
  2. AC_DEFUN([AX_CHECK_COREFOUNDATION_FRAMEWORK],
  3. [
  4. AC_CACHE_CHECK([for CFRetain],
  5. gt_cv_func_CFRetain,
  6. [gt_save_LIBS="$LIBS"
  7. LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
  8. AC_TRY_LINK([#include <CoreFoundation/CFBase.h>],
  9. [CFRetain(NULL)],
  10. [gt_cv_func_CFRetain=yes],
  11. [gt_cv_func_CFRetain=no])
  12. LIBS="$gt_save_LIBS"])
  13. if test $gt_cv_func_CFRetain = yes; then
  14. AC_DEFINE([HAVE_COREFOUNDATION_FRAMEWORK], 1,
  15. [Define to 1 if you have the MacOS X CoreFoundation framework.])
  16. fi
  17. COREFOUNDATION_FRAMEWORK_LIBS=
  18. if test $gt_cv_func_CFRetain = yes; then
  19. COREFOUNDATION_FRAMEWORK_LIBS="-Wl,-framework -Wl,CoreFoundation"
  20. fi
  21. AC_SUBST([COREFOUNDATION_FRAMEWORK_LIBS])
  22. ])
  23. dnl Defines SYSTEMCONFIGURATION_FRAMEWORK_LIBS.
  24. AC_DEFUN([AX_CHECK_SYSTEMCONFIGURATION_FRAMEWORK],
  25. [
  26. AC_CACHE_CHECK([for SCDynamicStoreCreate],
  27. gt_cv_func_SCDynamicStoreCreate,
  28. [gt_save_LIBS="$LIBS"
  29. LIBS="$LIBS -Wl,-framework -Wl,SystemConfiguration"
  30. AC_TRY_LINK([#include <SystemConfiguration/SystemConfiguration.h>],
  31. [SCDynamicStoreCreate(NULL, NULL, NULL, NULL)],
  32. [gt_cv_func_SCDynamicStoreCreate=yes],
  33. [gt_cv_func_SCDynamicStoreCreate=no])
  34. LIBS="$gt_save_LIBS"])
  35. if test $gt_cv_func_SCDynamicStoreCreate = yes; then
  36. AC_DEFINE([HAVE_SYSTEMCONFIGURATION_FRAMEWORK], 1,
  37. [Define to 1 if you have the MacOS X SystemConfiguration framework.])
  38. fi
  39. SYSTEMCONFIGURATION_FRAMEWORK_LIBS=
  40. if test $gt_cv_func_SCDynamicStoreCreate = yes; then
  41. SYSTEMCONFIGURATION_FRAMEWORK_LIBS="-Wl,-framework -Wl,SystemConfiguration"
  42. fi
  43. AC_SUBST([SYSTEMCONFIGURATION_FRAMEWORK_LIBS])
  44. ])
  45. dnl Defines CORESERVICES_FRAMEWORK_LIBS.
  46. AC_DEFUN([AX_CHECK_CORESERVICES_FRAMEWORK],
  47. [
  48. AC_CACHE_CHECK([for CFNetworkCopyProxiesForURL],
  49. gt_cv_func_CFNetworkCopyProxiesForURL,
  50. [gt_save_LIBS="$LIBS"
  51. LIBS="$LIBS -Wl,-framework -Wl,CoreServices"
  52. AC_TRY_LINK([#include <CoreServices/CoreServices.h>],
  53. [CFNetworkCopyProxiesForURL(NULL, NULL)],
  54. [gt_cv_func_CFNetworkCopyProxiesForURL=yes],
  55. [gt_cv_func_CFNetworkCopyProxiesForURL=no])
  56. LIBS="$gt_save_LIBS"])
  57. if test $gt_cv_func_CFNetworkCopyProxiesForURL = yes; then
  58. AC_DEFINE([HAVE_CORESERVICES_FRAMEWORK], 1,
  59. [Define to 1 if you have the MacOS X CoreServices framework.])
  60. fi
  61. CORESERVICES_FRAMEWORK_LIBS=
  62. if test $gt_cv_func_CFNetworkCopyProxiesForURL = yes; then
  63. CORESERVICES_FRAMEWORK_LIBS="-Wl,-framework -Wl,CoreServices"
  64. fi
  65. AC_SUBST([CORESERVICES_FRAMEWORK_LIBS])
  66. ])
  67. dnl Defines SECURITY_FRAMEWORK_LIBS.
  68. AC_DEFUN([AX_CHECK_SECURITY_FRAMEWORK],
  69. [
  70. AC_CACHE_CHECK([for SecKeychainItemFreeContent],
  71. gt_cv_func_SecKeychainItemFreeContent,
  72. [gt_save_LIBS="$LIBS"
  73. LIBS="$LIBS -Wl,-framework -Wl,Security"
  74. AC_TRY_LINK([#include <Security/SecKeychain.h>],
  75. [SecKeychainItemFreeContent(NULL, NULL)],
  76. [gt_cv_func_SecKeychainItemFreeContent=yes],
  77. [gt_cv_func_SecKeychainItemFreeContent=no])
  78. LIBS="$gt_save_LIBS"])
  79. if test $gt_cv_func_SecKeychainItemFreeContent = yes; then
  80. AC_DEFINE([HAVE_SECURITY_FRAMEWORK], 1,
  81. [Define to 1 if you have the MacOS X Security framework.])
  82. fi
  83. SECURITY_FRAMEWORK_LIBS=
  84. if test $gt_cv_func_SecKeychainItemFreeContent = yes; then
  85. SECURITY_FRAMEWORK_LIBS="-Wl,-framework -Wl,Security"
  86. fi
  87. AC_SUBST([SECURITY_FRAMEWORK_LIBS])
  88. ])