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
|
--- configure.in.orig Tue Nov 14 15:42:15 2006
+++ configure.in Sat Nov 18 03:19:57 2006
@@ -1088,6 +1088,21 @@
AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
fi
+AC_CACHE_CHECK([for struct sigevent type],samba_cv_struct_sigevent, [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <signal.h>],[struct sigevent s;],
+ samba_cv_struct_sigevent=yes,samba_cv_struct_sigevent=no)])
+if test x"$samba_cv_struct_sigevent" = x"yes"; then
+ AC_DEFINE(HAVE_STRUCT_SIGEVENT,1,[Whether we have the struct sigevent])
+ AC_CHECK_MEMBERS([struct sigevent.sigev_value.sival_ptr,struct sigevent.sigev_value.sigval_ptr], , ,
+ [#include <signal.h>])
+fi
+
AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
AC_TRY_COMPILE([
#include <sys/types.h>
@@ -2463,32 +2478,40 @@
# Check if FAM notifications are available. For FAM info, see
# http://oss.sgi.com/projects/fam/
# http://savannah.nongnu.org/projects/fam/
+AC_ARG_ENABLE(fam,
+[ --enable-fam Turn on FAM support (default=auto)])
-AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no])
-if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
- # On IRIX, libfam requires libC, but other FAM implementations might not
- # need it.
- AC_CHECK_LIB(fam, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"],
- [samba_cv_HAVE_LIBFAM=no])
-
- if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
- samba_fam_xtra=-lC
- AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"],
- [samba_cv_HAVE_LIBFAM=no])
- unset samba_fam_xtra
+if test x$enable_fam != xno; then
+ AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no])
+ if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
+ # On IRIX, libfam requires libC, but other FAM implementations
+ # might not need it.
+ AC_CHECK_LIB(fam, FAMOpen2,
+ [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"],
+ [samba_cv_HAVE_LIBFAM=no])
+
+ if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
+ samba_fam_xtra=-lC
+ AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
+ [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"],
+ [samba_cv_HAVE_LIBFAM=no])
+ unset samba_fam_xtra
+ fi
fi
-fi
-if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
- AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1,
- [Whether FAM is file notifications are available])
- AC_TRY_COMPILE([#include <fam.h>],
- [FAMCodes code = FAMChanged;],
- AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1,
- [Whether fam.h contains a typedef for enum FAMCodes]),
- [])
+ if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
+ AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1,
+ [Whether FAM file notifications are available])
+ AC_TRY_COMPILE([#include <fam.h>],
+ [FAMCodes code = FAMChanged;],
+ AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1,
+ [Whether fam.h contains a typedef for enum FAMCodes]),
+ [])
+ fi
+
+ if test x$enable_fam = xyes && test x"$samba_cv_HAVE_LIBFAM" != xyes ; then
+ AC_MSG_ERROR(FAM support requested but FAM library not available )
+ fi
fi
#################################################
|