1 dnl Copyright (C) 2009 Sun Microsystems
2 dnl This file is free software; Sun Microsystems
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 dnl Check for all of the headers and libs that Drizzle needs. We check all
7 dnl of these for plugins too, to ensure that all of the appropriate defines
10 AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
12 dnl We need to turn on our CXXFLAGS to make sure it shows up correctly
24 PANDORA_WORKING_FDATASYNC
39 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
40 AC_CHECK_HEADERS(select.h sys/select.h)
41 AC_CHECK_HEADERS(utime.h sys/utime.h )
42 AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
43 AC_CHECK_HEADERS(sched.h)
44 AC_CHECK_HEADERS(sys/prctl.h)
45 AC_CHECK_HEADERS(execinfo.h)
46 AC_CHECK_HEADERS(locale.h)
47 AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
48 AC_CHECK_HEADERS(paths.h)
51 #--------------------------------------------------------------------
52 # Check for system libraries. Adds the library to $LIBS
53 # and defines HAVE_LIBM etc
54 #--------------------------------------------------------------------
56 # For the sched_yield() function on Solaris
57 AC_CHECK_FUNC(sched_yield, [],
58 [AC_CHECK_LIB(posix4, [sched_yield],
59 [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
61 AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
62 AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
65 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
70 AC_CHECK_TYPES([uint, ulong])
78 #include "config/top.h"
81 cat > config/top.h.stamp <<EOF_CONFIG_TOP
83 #if defined(i386) && !defined(__i386__)
87 #if defined(_FILE_OFFSET_BITS)
88 # undef _FILE_OFFSET_BITS
91 diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
92 rm -f config/top.h.stamp
96 #if defined(__cplusplus)
101 # include <inttypes.h>
104 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)
105 typedef unsigned long int ulong;
108 #endif /* __CONFIG_H__ */