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 PANDORA_HAVE_CXX_UNORDERED
23 PANDORA_WORKING_FDATASYNC
38 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
39 AC_CHECK_HEADERS(select.h sys/select.h)
40 AC_CHECK_HEADERS(utime.h sys/utime.h )
41 AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
42 AC_CHECK_HEADERS(sched.h)
43 AC_CHECK_HEADERS(sys/prctl.h)
44 AC_CHECK_HEADERS(execinfo.h)
45 AC_CHECK_HEADERS(locale.h)
46 AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
47 AC_CHECK_HEADERS(paths.h)
50 #--------------------------------------------------------------------
51 # Check for system libraries. Adds the library to $LIBS
52 # and defines HAVE_LIBM etc
53 #--------------------------------------------------------------------
55 # For the sched_yield() function on Solaris
56 AC_CHECK_FUNC(sched_yield, [],
57 [AC_CHECK_LIB(posix4, [sched_yield],
58 [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
60 AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
61 AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
64 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
69 AC_CHECK_TYPES([uint, ulong])
72 PANDORA_REQUIRE_BOOST([1.38])
73 PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
80 #include "config/top.h"
83 cat > config/top.h.stamp <<EOF_CONFIG_TOP
85 #if defined(i386) && !defined(__i386__)
89 #if defined(_FILE_OFFSET_BITS)
90 # undef _FILE_OFFSET_BITS
93 diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
94 rm -f config/top.h.stamp
98 #if defined(__cplusplus)
100 # include CINTTYPES_H
103 # include <inttypes.h>
106 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)
107 typedef unsigned long int ulong;
110 #endif /* __CONFIG_H__ */