f6897dd9240863f38a4f0d7fef9ebacee43f6dd6
[samba.git] / source4 / build / m4 / rewrite.m4
1 dnl Checks for programs.
2 dnl Unique-to-Samba variables we'll be playing with.
3
4 DYNEXP=
5
6 AC_SUBST(SHLIBEXT)
7 AC_SUBST(LDSHFLAGS)
8 AC_SUBST(SONAMEFLAG)
9 AC_SUBST(PICFLAG)
10
11 AC_SYS_LARGEFILE
12
13 #
14 # Config CPPFLAG settings for strange OS's that must be set
15 # before other tests.
16 #
17 case "$host_os" in
18 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
19     *hpux*)    
20       AC_PROG_CC_FLAG(Ae)
21       # mmap on HPUX is completely broken...
22       AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
23       if test $ac_cv_prog_cc_Ae = yes; then
24         CPPFLAGS="$CPPFLAGS -Ae"
25       fi
26     ;;
27 #
28 # VOS may need to have POSIX support and System V compatibility enabled.
29 #
30     *vos*)
31           case "$CPPFLAGS" in
32               *-D_POSIX_C_SOURCE*)
33                 ;;
34           *)
35                 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
36                 AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support])
37                 ;;
38           esac
39           case "$CPPFLAGS" in
40              *-D_SYSV*|*-D_SVID_SOURCE*)
41                 ;;
42              *)
43                 CPPFLAGS="$CPPFLAGS -D_SYSV"
44                 AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility])
45           esac
46     ;;
47
48 esac
49
50
51 AC_HEADER_DIRENT
52 AC_HEADER_TIME
53 AC_HEADER_SYS_WAIT
54 AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
55 AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h compat.h math.h)
56 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
57 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
58 AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
59 AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h)
60 AC_CHECK_HEADERS(locale.h shadow.h)
61 AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h)
62 AC_CHECK_HEADERS(sys/acl.h)
63
64 AC_CHECK_HEADERS(sys/capability.h)
65
66 AC_CHECK_HEADERS(sys/mount.h, , , [AC_INCLUDES_DEFAULT
67 #ifdef HAVE_SYS_PARAM_H
68 #include <sys/param.h>
69 #endif])
70
71
72 AC_TYPE_SIGNAL
73 AC_TYPE_UID_T
74 AC_TYPE_MODE_T
75 AC_TYPE_OFF_T
76 AC_TYPE_SIZE_T
77 AC_TYPE_PID_T
78 AC_STRUCT_ST_RDEV
79 AC_DIRENT_D_OFF
80 AC_CHECK_TYPE(ino_t,unsigned)
81 AC_CHECK_TYPE(loff_t,off_t)
82 AC_CHECK_TYPE(offset_t,loff_t)
83 AC_CHECK_TYPES(long long)
84
85
86 AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [
87     AC_TRY_COMPILE([
88 #include <sys/types.h>
89 #if STDC_HEADERS
90 #include <stdlib.h>
91 #include <stddef.h>
92 #endif
93 #include <signal.h>],[sig_atomic_t i = 0],
94         samba_cv_sig_atomic_t=yes,samba_cv_sig_atomic_t=no)])
95 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
96    AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
97 fi
98
99 AC_FUNC_MEMCMP
100
101 AC_CHECK_FUNCS(setsid pipe crypt16 getauthuid)
102 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction)
103 AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep)
104 AC_CHECK_FUNCS(backtrace setbuffer)
105
106 AC_SUBST(BLDSHARED)
107 AC_SUBST(BLDMERGED)
108 # Assume non-shared by default and override below
109 BLDSHARED="false"
110 BLDMERGED="true"
111
112 # these are the defaults, good for lots of systems
113 HOST_OS="$host_os"
114 LDSHFLAGS="-shared"
115 SONAMEFLAG="#"
116 SHLD="\${CC}"
117 PICFLAG=""
118 PICSUFFIX="po"
119 POBAD_CC="#"
120 SHLIBEXT="so"
121
122 AC_MSG_CHECKING([ability to build shared libraries])
123
124 # and these are for particular systems
125 case "$host_os" in
126         *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
127                 BLDSHARED="true"
128                 LDSHFLAGS="-shared" 
129                 DYNEXP="-Wl,--export-dynamic"
130                 PICFLAG="-fPIC"
131                 SONAMEFLAG="-Wl,-soname="
132                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
133                 ;;
134         *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
135                 BLDSHARED="true"
136                 LDSHFLAGS="-G"
137                 SONAMEFLAG="-h "
138                 if test "${GCC}" = "yes"; then
139                         PICFLAG="-fPIC"
140                         if test "${ac_cv_prog_gnu_ld}" = "yes"; then
141                                 DYNEXP="-Wl,-E"
142                         fi
143                 else
144                         PICFLAG="-KPIC"
145                         ## ${CFLAGS} added for building 64-bit shared 
146                         ## libs using Sun's Compiler
147                         LDSHFLAGS="-G \${CFLAGS}"
148                         POBAD_CC=""
149                         PICSUFFIX="po.o"
150                 fi
151                 AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
152                 ;;
153         *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
154                 BLDSHARED="true"
155                 LDSHFLAGS="-G"
156                 SONAMEFLAG="-Wl,-h,"
157                 PICFLAG="-KPIC"   # Is this correct for SunOS
158                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
159                 ;;
160         *netbsd* | *freebsd*)  BLDSHARED="true"
161                 LDSHFLAGS="-shared"
162                 DYNEXP="-Wl,--export-dynamic"
163                 SONAMEFLAG="-Wl,-soname,"
164                 PICFLAG="-fPIC -DPIC"
165                 AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
166                 ;;
167         *openbsd*)  BLDSHARED="true"
168                 LDSHFLAGS="-shared"
169                 DYNEXP="-Wl,-Bdynamic"
170                 SONAMEFLAG="-Wl,-soname,"
171                 PICFLAG="-fPIC"
172                 AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
173                 ;;
174         *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
175                 ATTEMPT_WRAP32_BUILD=yes
176                 BLDSHARED="true"
177                 LDSHFLAGS="-set_version sgi1.0 -shared"
178                 SONAMEFLAG="-soname "
179                 SHLD="\${LD}"
180                 if test "${GCC}" = "yes"; then
181                         PICFLAG="-fPIC"
182                 else 
183                         PICFLAG="-KPIC"
184                 fi
185                 AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
186                 ;;
187         *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
188                 BLDSHARED="true"
189                 LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry,-berok"
190                 DYNEXP="-Wl,-brtl,-bexpall,-bbigtoc"
191                 PICFLAG="-O2"
192                 if test "${GCC}" != "yes"; then
193                         ## for funky AIX compiler using strncpy()
194                         CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
195                 fi
196
197                 AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
198                 ;;
199         *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
200                 SHLIBEXT="sl"
201                 # Use special PIC flags for the native HP-UX compiler.
202                 if test $ac_cv_prog_cc_Ae = yes; then
203                         BLDSHARED="true"
204                         SHLD="/usr/bin/ld"
205                         LDSHFLAGS="-B symbolic -b -z"
206                         SONAMEFLAG="+h "
207                         PICFLAG="+z"
208                 fi
209                 DYNEXP="-Wl,-E"
210                 AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
211                 ;;
212         *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
213                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
214                 ;;
215         *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
216                 BLDSHARED="true"
217                 LDSHFLAGS="-shared"
218                 SONAMEFLAG="-Wl,-soname,"
219                 PICFLAG="-fPIC"
220                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
221                 ;;
222         *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
223                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
224                 ;;
225         *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
226                 BLDSHARED="true"
227                 LDSHFLAGS="-shared"
228                 SONAMEFLAG="-Wl,-soname,"
229                 PICFLAG="-KPIC"
230                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
231                 ;;
232         *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
233                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
234                 ;;
235         *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
236                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
237                 ;;
238         *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
239                 case "$host" in
240                         *-univel-*)     if [ test "$GCC" != yes ]; then
241                                         AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
242                                 fi
243                                 LDSHFLAGS="-G"
244                                         DYNEXP="-Bexport"
245                         ;;
246                         *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
247                 esac
248                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
249                 ;;
250
251         *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
252                 if [ test "$GCC" != yes ]; then
253                         AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
254                 fi
255                 LDSHFLAGS="-G"
256                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
257                 ;;
258         *-vms)
259                 BLDMERGED="false"
260                 BLDSHARED="false"
261                 LDSHFLAGS=""
262                 ;;
263         *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
264                 BLDSHARED="false"
265                 BLDMERGED="false"
266                 LDSHFLAGS=""
267                 ;;
268         *)
269                 AC_DEFINE(STAT_ST_BLOCKSIZE,512)
270                 ;;
271 esac
272 AC_MSG_RESULT($BLDSHARED)
273 AC_MSG_CHECKING([linker flags for shared libraries])
274 AC_MSG_RESULT([$LDSHFLAGS])
275 AC_MSG_CHECKING([compiler flags for position-independent code])
276 AC_MSG_RESULT([$PICFLAGS])
277
278 #######################################################
279 # test whether building a shared library actually works
280 if test $BLDSHARED = true; then
281 AC_CACHE_CHECK([whether building shared libraries actually works], 
282                [ac_cv_shlib_works],[
283    ac_cv_shlib_works=no
284    # try building a trivial shared library
285    if test "$PICSUFFIX" = "po"; then
286      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/build/tests/shlib.c &&
287        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
288        ac_cv_shlib_works=yes
289    else
290      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/build/tests/shlib.c &&
291        mv shlib.$PICSUFFIX shlib.po &&
292        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
293        ac_cv_shlib_works=yes
294    fi
295    rm -f shlib.so shlib.po
296 ])
297 if test $ac_cv_shlib_works = no; then
298    BLDSHARED=false
299 fi
300 fi
301
302 AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
303 AC_TRY_RUN([
304 #include <sys/time.h>
305 #include <unistd.h>
306 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
307            samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
308 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
309     AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
310 fi
311
312
313 AC_CACHE_CHECK([for utimbuf],samba_cv_HAVE_UTIMBUF,[
314 AC_TRY_COMPILE([#include <sys/types.h>
315 #include <utime.h>],
316 [struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));],
317 samba_cv_HAVE_UTIMBUF=yes,samba_cv_HAVE_UTIMBUF=no,samba_cv_HAVE_UTIMBUF=cross)])
318 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
319     AC_DEFINE(HAVE_UTIMBUF,1,[Whether struct utimbuf is available])
320 fi
321
322 AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[
323 AC_TRY_RUN([
324 #include <sys/types.h>
325 #include <fcntl.h>
326 #ifndef F_GETLEASE
327 #define F_GETLEASE      1025
328 #endif
329 main() {
330        int fd = open("/dev/null", O_RDONLY);
331        return fcntl(fd, F_GETLEASE, 0) == -1;
332 }
333 ],
334 samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross)])
335 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
336     AC_DEFINE(HAVE_KERNEL_OPLOCKS_LINUX,1,[Whether to use linux kernel oplocks])
337 fi
338
339 AC_CACHE_CHECK([for kernel change notify support],samba_cv_HAVE_KERNEL_CHANGE_NOTIFY,[
340 AC_TRY_RUN([
341 #include <sys/types.h>
342 #include <fcntl.h>
343 #include <signal.h>
344 #ifndef F_NOTIFY
345 #define F_NOTIFY 1026
346 #endif
347 main() {
348         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
349 }
350 ],
351 samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross)])
352 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
353     AC_DEFINE(HAVE_KERNEL_CHANGE_NOTIFY,1,[Whether kernel notifies changes])
354 fi
355
356 AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[
357 AC_TRY_RUN([
358 #include <sys/types.h>
359 #include <fcntl.h>
360 #include <signal.h>
361 #include <sys/file.h>
362 #ifndef LOCK_MAND
363 #define LOCK_MAND       32
364 #define LOCK_READ       64
365 #endif
366 main() {
367         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
368 }
369 ],
370 samba_cv_HAVE_KERNEL_SHARE_MODES=yes,samba_cv_HAVE_KERNEL_SHARE_MODES=no,samba_cv_HAVE_KERNEL_SHARE_MODES=cross)])
371 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
372     AC_DEFINE(HAVE_KERNEL_SHARE_MODES,1,[Whether the kernel supports share modes])
373 fi
374
375 AC_CACHE_CHECK([for IRIX kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS_IRIX,[
376 AC_TRY_COMPILE([#include <sys/types.h>
377 #include <fcntl.h>],
378 [oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;],
379 samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no)])
380 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
381     AC_DEFINE(HAVE_KERNEL_OPLOCKS_IRIX,1,[Whether IRIX kernel oplock type definitions are available])
382 fi
383
384
385 AC_CACHE_CHECK([for ftruncate extend],samba_cv_HAVE_FTRUNCATE_EXTEND,[
386 AC_TRY_RUN([#include "${srcdir-.}/build/tests/ftruncate.c"],
387            samba_cv_HAVE_FTRUNCATE_EXTEND=yes,samba_cv_HAVE_FTRUNCATE_EXTEND=no,samba_cv_HAVE_FTRUNCATE_EXTEND=cross)])
388 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
389     AC_DEFINE(HAVE_FTRUNCATE_EXTEND,1,[Truncate extend])
390 fi
391
392 AC_CACHE_CHECK([for sysconf(_SC_NGROUPS_MAX)],samba_cv_SYSCONF_SC_NGROUPS_MAX,[
393 AC_TRY_RUN([#include <unistd.h>
394 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }],
395 samba_cv_SYSCONF_SC_NGROUPS_MAX=yes,samba_cv_SYSCONF_SC_NGROUPS_MAX=no,samba_cv_SYSCONF_SC_NGROUPS_MAX=cross)])
396 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
397     AC_DEFINE(SYSCONF_SC_NGROUPS_MAX,1,[Whether sysconf(_SC_NGROUPS_MAX) is available])
398 fi
399
400 AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[
401 AC_TRY_RUN([#include "${srcdir-.}/build/tests/shared_mmap.c"],
402            samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)])
403 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
404     AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
405 fi
406
407 AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[
408 AC_TRY_COMPILE([#include <sys/types.h>
409 #include <sys/stat.h>
410 #include <unistd.h>],
411 [struct stat st;  st.st_blocks = 0;],
412 samba_cv_HAVE_STAT_ST_BLOCKS=yes,samba_cv_HAVE_STAT_ST_BLOCKS=no,samba_cv_HAVE_STAT_ST_BLOCKS=cross)])
413 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
414     AC_DEFINE(HAVE_STAT_ST_BLOCKS,1,[Whether the stat struct has a st_block property])
415 fi 
416
417 AC_CACHE_CHECK([for st_blksize in struct stat],samba_cv_HAVE_STAT_ST_BLKSIZE,[
418 AC_TRY_COMPILE([#include <sys/types.h>
419 #include <sys/stat.h>
420 #include <unistd.h>],
421 [struct stat st;  st.st_blksize = 0;],
422 samba_cv_HAVE_STAT_ST_BLKSIZE=yes,samba_cv_HAVE_STAT_ST_BLKSIZE=no,samba_cv_HAVE_STAT_ST_BLKSIZE=cross)])
423 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
424     AC_DEFINE(HAVE_STAT_ST_BLKSIZE,1,[Whether the stat struct has a st_blksize property])
425 fi
426
427 case "$host_os" in
428 *linux*)
429 AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
430 AC_TRY_COMPILE([
431 #ifdef HAVE_SYS_VFS_H
432 #include <sys/vfs.h>
433 #endif
434 #ifdef HAVE_SYS_CAPABILITY_H
435 #include <sys/capability.h>
436 #endif
437 ],[int i;],
438    samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes)])
439 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
440    AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
441 fi
442 ;;
443 esac
444
445 AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[
446 AC_TRY_COMPILE([
447 #include <unistd.h>
448 #ifdef HAVE_FCNTL_H
449 #include <fcntl.h>
450 #endif],
451 [int fd = open("/dev/null", O_DIRECT);],
452 samba_cv_HAVE_OPEN_O_DIRECT=yes,samba_cv_HAVE_OPEN_O_DIRECT=no)])
453 if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
454     AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT])
455 fi