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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
AC_DEFUN([KMAIL_CHECK_INDEXLIB],
[
AC_REQUIRE([KDE_CHECK_LIB64])
AC_MSG_CHECKING(for indexlib)
missing_indexlib=ignore
AC_ARG_ENABLE(indexlib,
AC_HELP_STRING([--enable-indexlib],[Enable EXPERIMENTAL full-text indexing in KMail.
Use are your own risk!]),
AC_DEFINE(HAVE_INDEXLIB,1,[Define if you want EXPERIMENTAL full-text indexing in KMail])
missing_indexlib=no
)
AM_CONDITIONAL(add_indexlib, test no = "$missing_indexlib")
])
dnl The following test is taken from tdelibs/kio/kio
dnl ------------------------------------------------------------------------
dnl Try to find if we have Linux Inode based Dir Notification
dnl ------------------------------------------------------------------------
AC_ARG_ENABLE(inotify,
AC_HELP_STRING([--disable-inotify],[enable use of Linux inode notifications]),
[ kde_enable_inotify=$enableval ], [kde_enable_inotify=yes])dnl
AC_CHECK_GNU_EXTENSIONS
if test "x$kde_enable_inotify" = "xyes"; then
AC_MSG_CHECKING([for Linux Inotify Notification])
AC_CACHE_VAL(kde_cv_have_inotify,
[
kde_cv_have_inotify=no
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILE(
[
#include <asm/unistd.h>
#define _S390_BITOPS_H
#include <linux/inotify.h>
],
[
#ifndef IN_ALL_EVENTS
#error no inotify notification
#endif
#ifndef __NR_inotify_init
#error no __NR_inotify_init
#endif
],kde_cv_have_inotify=yes,kde_cv_have_inotify=no)
AC_LANG_RESTORE
])
AC_CACHE_VAL(kde_cv_have_sys_inotify,
[
kde_cv_have_sys_inotify=no
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILE(
[
#include <sys/inotify.h>
],
[
#ifndef IN_ALL_EVENTS
#error no inotify notification
#endif
],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no)
AC_LANG_RESTORE
])
if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification])
if test "$kde_cv_have_sys_inotify" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify])
fi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
KMAIL_CHECK_INDEXLIB
|