source: branches/samba-3.5.x/lib/replace/system/config.m4

Last change on this file was 620, checked in by Herwig Bauernfeind, 14 years ago

Samba 3.5: Update trunk to 3.5.11

File size: 3.4 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# time
10AC_CHECK_HEADERS(sys/time.h utime.h)
11AC_HEADER_TIME
12AC_CHECK_FUNCS(utime utimes)
13
14# wait
15AC_HEADER_SYS_WAIT
16
17# capability
18AC_CHECK_HEADERS(sys/capability.h)
19
20case "$host_os" in
21*linux*)
22AC_CACHE_CHECK([for broken RedHat 7.2 system header files],libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
23AC_TRY_COMPILE([
24 #ifdef HAVE_SYS_VFS_H
25 #include <sys/vfs.h>
26 #endif
27 #ifdef HAVE_SYS_CAPABILITY_H
28 #include <sys/capability.h>
29 #endif
30 ],[
31 int i;
32 ],
33 libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,
34 libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
35)])
36if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
37 AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
38fi
39
40AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
41AC_TRY_COMPILE([
42 #ifdef HAVE_SYS_CAPABILITY_H
43 #include <sys/capability.h>
44 #endif
45 #include <linux/types.h>
46 ],[
47 __s8 i;
48 ],
49 libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,
50 libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
51)])
52if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
53 AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
54fi
55;;
56esac
57
58# passwd
59AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h)
60AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
61AC_HAVE_DECL(getpwent_r, [
62 #include <unistd.h>
63 #include <pwd.h>
64 ])
65AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)],
66 [
67 #ifndef HAVE_GETPWENT_R_DECL
68 #error missing getpwent_r prototype
69 #endif
70 return NULL;
71 ],[
72 AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function prototype])
73 ],[],[
74 #include <unistd.h>
75 #include <pwd.h>
76 ])
77AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)],
78 [
79 #ifndef HAVE_GETPWENT_R_DECL
80 #error missing getpwent_r prototype
81 #endif
82 return NULL;
83 ],[
84 AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to solaris) function prototype])
85 ],[],[
86 #include <unistd.h>
87 #include <pwd.h>
88 ])
89AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r)
90AC_HAVE_DECL(getgrent_r, [
91 #include <unistd.h>
92 #include <grp.h>
93 ])
94AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, int buflen)],
95 [
96 #ifndef HAVE_GETGRENT_R_DECL
97 #error missing getgrent_r prototype
98 #endif
99 return NULL;
100 ],[
101 AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function prototype])
102 ],[],[
103 #include <unistd.h>
104 #include <grp.h>
105 ])
106
107AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)],
108 [
109 #ifndef HAVE_GETGRENT_R_DECL
110 #error missing getgrent_r prototype
111 #endif
112 return NULL;
113 ],[
114 AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype])
115 ],[],[
116 #include <unistd.h>
117 #include <grp.h>
118 ])
119AC_CHECK_FUNCS(getgrouplist)
120
121# locale
122AC_CHECK_HEADERS(ctype.h locale.h langinfo.h)
123
124# glob
125AC_CHECK_HEADERS(fnmatch.h)
126
127# shmem
128AC_CHECK_HEADERS(sys/ipc.h sys/mman.h sys/shm.h )
129
130# terminal
131AC_CHECK_HEADERS(termios.h termio.h sys/termio.h )
Note: See TracBrowser for help on using the repository browser.