-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ax_fsevents_have_file_events.m4: update to check support for FSEventS…
…treamSetDispatchQueue
- Loading branch information
1 parent
32ecd36
commit fa17fdc
Showing
1 changed file
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,16 @@ | |
# | ||
# DESCRIPTION | ||
# | ||
# This macro checks if the macOS FSEvents API supports file events. | ||
# This macro checks if the macOS FSEvents API supports file events, and if it | ||
# supports the FSEventStreamSetDispatchQueue function. | ||
# | ||
# If it does, define the ax_cv_fsevents_have_file_events environment variable to | ||
# "yes" and define HAVE_FSEVENTS_FILE_EVENTS. | ||
# If the FSEvents API is supported, the ax_cv_fsevents_have_file_events environment | ||
# variable is defined and set to "yes", and the HAVE_FSEVENTS_FILE_EVENTS symbol is | ||
# defined. | ||
# | ||
# If the FSEventStreamSetDispatchQueue function is supported, the | ||
# ax_cv_fsevents_have_fseventstreamsetdispatchqueue environment variable is | ||
# defined and set to "yes", and the HAVE_FSEVENTS_FILE_EVENTS symbol is defined. | ||
# | ||
# CONTRIBUTING | ||
# | ||
|
@@ -21,14 +27,14 @@ | |
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2014-2021 Enrico M. Crisostomo <[email protected]> | ||
# Copyright (c) 2014-2022 Enrico M. Crisostomo <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 1 | ||
#serial 2 | ||
|
||
AC_DEFUN([AX_FSEVENTS_HAVE_FILE_EVENTS], | ||
[AC_CACHE_CHECK( | ||
|
@@ -43,11 +49,30 @@ AC_DEFUN([AX_FSEVENTS_HAVE_FILE_EVENTS], | |
[ax_cv_fsevents_have_file_events=yes], | ||
[ax_cv_fsevents_have_file_events=no] | ||
) | ||
AC_LANG_POP([C])]) | ||
AC_LANG_POP([C])]) | ||
AC_CACHE_CHECK( | ||
[for FSEventStreamSetDispatchQueue in macOS FSEvents API], | ||
ax_cv_fsevents_have_fseventstreamsetdispatchqueue, | ||
[dnl | ||
AC_LANG_PUSH([C]) | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
[#include <CoreServices/CoreServices.h>], | ||
[FSEventStreamSetDispatchQueue(NULL, NULL);] | ||
)], | ||
[ax_cv_fsevents_have_fseventstreamsetdispatchqueue=yes], | ||
[ax_cv_fsevents_have_fseventstreamsetdispatchqueue=no] | ||
) | ||
AC_LANG_POP([C])]) | ||
if test x"$ax_cv_fsevents_have_file_events" = "xyes" | ||
then | ||
AC_DEFINE(HAVE_FSEVENTS_FILE_EVENTS, | ||
1, | ||
[Define if the file events are supported by macOS FSEvents API.]) | ||
fi | ||
if test x"$ax_cv_fsevents_have_fseventstreamsetdispatchqueue" = "xyes" | ||
then | ||
AC_DEFINE(HAVE_FSEVENTS_FSEVENTSTREAMSETDISPATCHQUEUE, | ||
1, | ||
[Define if the FSEventStreamSetDispatchQueue function is supported by macOS FSEvents API.]) | ||
fi | ||
]) |