diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-12-06 00:57:29 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-12-06 00:57:29 +0000 |
commit | 9d93fc18da56f6edce851f53b5a0c252c14209cd (patch) | |
tree | 4f847d7d4017f41823e8cbeaffa65d65fdcb0ae5 /m4 | |
parent | 5575c36c4e267662e3e19f61bcc54cde7b57f519 (diff) |
efl: simplify inotify by moving it to common.
also deprecate very ancient inotify usage by direct syscall.
SVN revision: 80292
Diffstat (limited to 'm4')
-rw-r--r-- | m4/eio_check_options.m4 | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/m4/eio_check_options.m4 b/m4/eio_check_options.m4 index 485dd85595..5fb901273c 100644 --- a/m4/eio_check_options.m4 +++ b/m4/eio_check_options.m4 | |||
@@ -1,47 +1,3 @@ | |||
1 | dnl use: EIO_CHECK_INOTIFY([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
2 | AC_DEFUN([EIO_CHECK_INOTIFY], | ||
3 | [ | ||
4 | _eio_have_inotify="no" | ||
5 | |||
6 | dnl We need to check if the right inotify version is accessible | ||
7 | |||
8 | dnl It is hard to find a good test on how to check the correct | ||
9 | dnl inotify version. They changed the headers a lot. | ||
10 | dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls | ||
11 | dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h | ||
12 | dnl so with this check you need a very new kernel and kernel-headers! | ||
13 | |||
14 | if ! test "x${have_windows}" = "xyes" ; then | ||
15 | |||
16 | AC_CHECK_LIB([c], [inotify_init], | ||
17 | [ | ||
18 | AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ]) | ||
19 | AC_DEFINE([HAVE_SYS_INOTIFY], [1], [ File monitoring with Inotify - sys/inotify.h ]) | ||
20 | _eio_have_inotify="yes" | ||
21 | ], | ||
22 | [ | ||
23 | AC_TRY_COMPILE( | ||
24 | [ | ||
25 | #include <asm/unistd.h> | ||
26 | #include <linux/inotify.h> | ||
27 | ], | ||
28 | [ | ||
29 | int a = __NR_inotify_init; int b = IN_MOVE_SELF; | ||
30 | ], | ||
31 | [ | ||
32 | AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ]) | ||
33 | _eio_have_inotify="yes" | ||
34 | ], | ||
35 | [_eio_have_inotify="no"]) | ||
36 | ]) | ||
37 | fi | ||
38 | |||
39 | AC_MSG_CHECKING([whether inotify is to be used for filemonitoring]) | ||
40 | AC_MSG_RESULT([${_eio_have_inotify}]) | ||
41 | |||
42 | AS_IF([test "x${_eio_have_inotify}" = "xyes"], [$1], [$2]) | ||
43 | ]) | ||
44 | |||
45 | dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | 1 | dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
46 | AC_DEFUN([EIO_CHECK_NOTIFY_WIN32], | 2 | AC_DEFUN([EIO_CHECK_NOTIFY_WIN32], |
47 | [ | 3 | [ |