summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-12-04 17:40:58 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-12-04 17:40:58 +0000
commit81c86b19f6b432c5d6701bd025d5b2cf308fba4c (patch)
tree44f76300c96fddf3be01d97afb3025227350ee92 /m4
parent633e29c5a50fa1a1087df88d8d9859c79a83e486 (diff)
merge: eio + fix compilation on windows + minor fixes + po files
don't move eio to IN-EFL right now SVN revision: 80180
Diffstat (limited to 'm4')
-rw-r--r--m4/eio_check_options.m456
1 files changed, 56 insertions, 0 deletions
diff --git a/m4/eio_check_options.m4 b/m4/eio_check_options.m4
new file mode 100644
index 0000000..485dd85
--- /dev/null
+++ b/m4/eio_check_options.m4
@@ -0,0 +1,56 @@
1dnl use: EIO_CHECK_INOTIFY([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([EIO_CHECK_INOTIFY],
3[
4_eio_have_inotify="no"
5
6dnl We need to check if the right inotify version is accessible
7
8dnl It is hard to find a good test on how to check the correct
9dnl inotify version. They changed the headers a lot.
10dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls
11dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h
12dnl so with this check you need a very new kernel and kernel-headers!
13
14if ! 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 [
29int 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 ])
37fi
38
39AC_MSG_CHECKING([whether inotify is to be used for filemonitoring])
40AC_MSG_RESULT([${_eio_have_inotify}])
41
42AS_IF([test "x${_eio_have_inotify}" = "xyes"], [$1], [$2])
43])
44
45dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
46AC_DEFUN([EIO_CHECK_NOTIFY_WIN32],
47[
48if test "x${have_win32}" = "xyes" ; then
49 AC_DEFINE([HAVE_NOTIFY_WIN32], [1], [ File monitoring with Windows notification ])
50fi
51
52AC_MSG_CHECKING([whether Windows notification is to be used for filemonitoring])
53AC_MSG_RESULT([${have_win32}])
54
55AS_IF([test "x${have_win32}" = "xyes"], [$1], [$2])
56])