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
|
AC_SYS_LARGEFILE
#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests.
#
case "$host_os" in
# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
*hpux*)
AC_PROG_CC_FLAG(Ae)
# mmap on HPUX is completely broken...
AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
if test $ac_cv_prog_cc_Ae = yes; then
CPPFLAGS="$CPPFLAGS -Ae"
fi
;;
#
# VOS may need to have POSIX support and System V compatibility enabled.
#
*vos*)
case "$CPPFLAGS" in
*-D_POSIX_C_SOURCE*)
;;
*)
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support])
;;
esac
case "$CPPFLAGS" in
*-D_SYSV*|*-D_SVID_SOURCE*)
;;
*)
CPPFLAGS="$CPPFLAGS -D_SYSV"
AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility])
esac
;;
esac
AC_CHECK_HEADERS(stdarg.h string.h)
AC_TYPE_SIGNAL
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_STRUCT_ST_RDEV
AC_CHECK_TYPE(ino_t,unsigned)
AC_CHECK_TYPE(loff_t,off_t)
AC_CHECK_TYPE(offset_t,loff_t)
AC_CHECK_TYPES(long long)
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer)
AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[
AC_TRY_RUN([#include "${srcdir-.}/build/tests/shared_mmap.c"],
samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)])
if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
fi
AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[
AC_TRY_COMPILE([
#include <unistd.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif],
[int fd = open("/dev/null", O_DIRECT);],
samba_cv_HAVE_OPEN_O_DIRECT=yes,samba_cv_HAVE_OPEN_O_DIRECT=no)])
if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT])
fi
|