diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-01 10:06:17 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-01 10:06:17 -0500 |
commit | fc47cc3ed97b328b8ec341320471cff3f538960d (patch) | |
tree | 4ae5389d92146502b88aac2b0fd05b2801bd9af7 /configure.ac | |
parent | 5efbd41daa874154025c9cc8cbe65763f08306bc (diff) | |
parent | 52cb1edda69b7f73b2aa7a8edfbc850a0b3769ff (diff) | |
download | tor-fc47cc3ed97b328b8ec341320471cff3f538960d.tar.gz tor-fc47cc3ed97b328b8ec341320471cff3f538960d.zip |
Merge branch 'maint-0.2.9'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 8ee34070a3..2f556271f9 100644 --- a/configure.ac +++ b/configure.ac @@ -379,14 +379,12 @@ AC_CHECK_FUNCS( accept4 \ backtrace \ backtrace_symbols_fd \ - clock_gettime \ eventfd \ explicit_bzero \ timingsafe_memcmp \ flock \ ftime \ getaddrinfo \ - getentropy \ getifaddrs \ getpass \ getrlimit \ @@ -424,6 +422,34 @@ AC_CHECK_FUNCS( _vscprintf ) +# Apple messed up when they added two functions functions in Sierra: they +# forgot to decorate them with appropriate AVAILABLE_MAC_OS_VERSION +# checks. So we should only probe for those functions if we are sure that we +# are not targetting OSX 10.11 or earlier. +AC_MSG_CHECKING([for a pre-Sierra OSX build target]) +AC_TRY_COMPILE([ +#ifdef __APPLE__ +# include <AvailabilityMacros.h> +# ifndef MAC_OS_VERSION_10_12 +# define MAC_OS_VERSION_10_12 101200 +# endif +# if defined(MAC_OS_X_VERSION_MIN_REQUIRED) +# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_10_12 +# error "Running on Mac OSX 10.11 or earlier" +# endif +# endif +#endif +], [], + [on_macos_pre_10_12=no ; AC_MSG_RESULT([no])], + [on_macos_pre_10_12=yes; AC_MSG_RESULT([yes])]) + +if test "$on_macos_pre_10_12" = "no"; then + AC_CHECK_FUNCS( + clock_gettime \ + getentropy \ + ) +fi + if test "$bwin32" != "true"; then AC_CHECK_HEADERS(pthread.h) AC_CHECK_FUNCS(pthread_create) |