-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathconfigure.ac
More file actions
47 lines (38 loc) · 1.79 KB
/
configure.ac
File metadata and controls
47 lines (38 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Input file for autoconf to generate the configure script.
# See https://www.gnu.org/software/autoconf/manual/autoconf.html for help on
# the macros used in this file.
AC_INIT([streamly], [0.12.0], [streamly@composewell.com], [streamly], [https://streamly.composewell.com])
# To suppress "WARNING: unrecognized options: --with-compiler"
AC_ARG_WITH([compiler], [GHC])
# -----------------------------------------------------------------------------
# Linux: check for inotify constants
# -----------------------------------------------------------------------------
# XXX Do this only for linux
AC_CHECK_DECLS([IN_MASK_CREATE],[],[],[#include <sys/inotify.h>])
AC_CHECK_DECLS([IN_EXCL_UNLINK],[],[],[#include <sys/inotify.h>])
# -----------------------------------------------------------------------------
# macOS: check for FSEvents constants
# -----------------------------------------------------------------------------
AC_DEFUN([AC_CHECK_FSEVENT_CONST],
[
AC_MSG_CHECKING([for $1 usability])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <CoreServices/CoreServices.h>]],
[[unsigned int x = $1; return (x == 0);]]
)],
[AC_DEFINE([HAVE_DECL_]m4_toupper([$1]), [1], [Define to 1 if $1 is usable])
AC_MSG_RESULT([yes])],
[AC_DEFINE([HAVE_DECL_]m4_toupper([$1]), [0], [Define to 0 if $1 is unusable])
AC_MSG_RESULT([no])]
)
])
AC_CHECK_FSEVENT_CONST([kFSEventStreamCreateFlagFileEvents])
AC_CHECK_FSEVENT_CONST([kFSEventStreamCreateFlagFullHistory])
AC_CHECK_FSEVENT_CONST([kFSEventStreamEventFlagItemCloned])
AC_CHECK_FSEVENT_CONST([kFSEventStreamEventFlagItemIsHardlink])
# -----------------------------------------------------------------------------
# Output
# -----------------------------------------------------------------------------
AC_CONFIG_HEADERS([src/config.h])
AC_OUTPUT