source: trunk/server/lib/replace/system/config.m4

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 4.0 KB
Line 
1# filesys
2AC_HEADER_DIRENT
3AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h)
4AC_CHECK_HEADERS(sys/acl.h acl/libacl.h sys/file.h)
5
6# select
7AC_CHECK_HEADERS(sys/select.h)
8
9# poll
10AC_CHECK_HEADERS(poll.h)
11AC_CHECK_FUNCS(poll,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/poll.o"])
12
13# time
14AC_CHECK_HEADERS(sys/time.h utime.h)
15AC_HEADER_TIME
16AC_CHECK_FUNCS(utime utimes)
17
18AC_CACHE_CHECK([if gettimeofday takes TZ argument],libreplace_cv_HAVE_GETTIMEOFDAY_TZ,[
19AC_TRY_RUN([
20#include <sys/time.h>
21#include <unistd.h>
22main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
23 libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=no,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes)])
24if test x"$libreplace_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
25 AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
26fi
27
28# wait
29AC_HEADER_SYS_WAIT
30
31# capability
32AC_CHECK_HEADERS(sys/capability.h)
33
34case "$host_os" in
35*linux*)
36AC_CACHE_CHECK([for broken RedHat 7.2 system header files],libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
37AC_TRY_COMPILE([
38 #ifdef HAVE_SYS_VFS_H
39 #include <sys/vfs.h>
40 #endif
41 #ifdef HAVE_SYS_CAPABILITY_H
42 #include <sys/capability.h>
43 #endif
44 ],[
45 int i;
46 ],
47 libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,
48 libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
49)])
50if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
51 AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
52fi
53
54AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
55AC_TRY_COMPILE([
56 #ifdef HAVE_SYS_CAPABILITY_H
57 #include <sys/capability.h>
58 #endif
59 #include <linux/types.h>
60 ],[
61 __s8 i;
62 ],
63 libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,
64 libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
65)])
66if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
67 AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
68fi
69;;
70esac
71
72# passwd
73AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h)
74AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
75AC_HAVE_DECL(getpwent_r, [
76 #include <unistd.h>
77 #include <pwd.h>
78 ])
79AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)],
80 [
81 #ifndef HAVE_GETPWENT_R_DECL
82 #error missing getpwent_r prototype
83 #endif
84 return NULL;
85 ],[
86 AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function prototype])
87 ],[],[
88 #include <unistd.h>
89 #include <pwd.h>
90 ])
91AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)],
92 [
93 #ifndef HAVE_GETPWENT_R_DECL
94 #error missing getpwent_r prototype
95 #endif
96 return NULL;
97 ],[
98 AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to solaris) function prototype])
99 ],[],[
100 #include <unistd.h>
101 #include <pwd.h>
102 ])
103AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r)
104AC_HAVE_DECL(getgrent_r, [
105 #include <unistd.h>
106 #include <grp.h>
107 ])
108AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, int buflen)],
109 [
110 #ifndef HAVE_GETGRENT_R_DECL
111 #error missing getgrent_r prototype
112 #endif
113 return NULL;
114 ],[
115 AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function prototype])
116 ],[],[
117 #include <unistd.h>
118 #include <grp.h>
119 ])
120
121AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)],
122 [
123 #ifndef HAVE_GETGRENT_R_DECL
124 #error missing getgrent_r prototype
125 #endif
126 return NULL;
127 ],[
128 AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype])
129 ],[],[
130 #include <unistd.h>
131 #include <grp.h>
132 ])
133AC_CHECK_FUNCS(getgrouplist)
134
135# locale
136AC_CHECK_HEADERS(ctype.h locale.h langinfo.h)
137
138# glob
139AC_CHECK_HEADERS(fnmatch.h)
140
141# shmem
142AC_CHECK_HEADERS(sys/ipc.h sys/mman.h sys/shm.h )
143
144# terminal
145AC_CHECK_HEADERS(termios.h termio.h sys/termio.h )
Note: See TracBrowser for help on using the repository browser.