54f946f1cc0d05cd39d0a77584daa0b5bc6c74c7
[m6w6/libmemcached] / m4 / pandora_drizzle_build.m4
1 dnl Copyright (C) 2009 Sun Microsystems, Inc.
2 dnl This file is free software; Sun Microsystems, Inc.
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
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
8 dnl are set.
9
10 AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
11
12 AC_STRUCT_TM
13
14 AC_FUNC_ALLOCA
15 AC_FUNC_UTIME_NULL
16 AC_FUNC_VPRINTF
17
18 PANDORA_WORKING_FDATASYNC
19
20 AC_CHECK_FUNCS(\
21 gethrtime \
22 setupterm \
23 backtrace \
24 backtrace_symbols \
25 backtrace_symbols_fd)
26
27 AC_HEADER_STAT
28 AC_HEADER_DIRENT
29 AC_HEADER_STDC
30 AC_HEADER_SYS_WAIT
31 AC_HEADER_STDBOOL
32
33 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
34 AC_CHECK_HEADERS(select.h sys/select.h)
35 AC_CHECK_HEADERS(utime.h sys/utime.h )
36 AC_CHECK_HEADERS(synch.h sys/mman.h)
37 AC_CHECK_HEADERS(sched.h)
38 AC_CHECK_HEADERS(sys/prctl.h)
39 AC_CHECK_HEADERS(execinfo.h)
40 AC_CHECK_HEADERS(locale.h)
41 AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
42 AC_CHECK_HEADERS(paths.h)
43
44
45 #--------------------------------------------------------------------
46 # Check for system libraries. Adds the library to $LIBS
47 # and defines HAVE_LIBM etc
48 #--------------------------------------------------------------------
49
50 # For the sched_yield() function on Solaris
51 AC_CHECK_FUNC(sched_yield, [],
52 [AC_CHECK_LIB(posix4, [sched_yield],
53 [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
54
55 AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
56 AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
57 ])
58
59 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
60 #ifdef HAVE_CURSES_H
61 # include <curses.h>
62 #endif
63 ]])
64 AC_CHECK_TYPES([uint, ulong])
65
66 PANDORA_REQUIRE_BISON
67
68 PANDORA_CXX_DEMANGLE
69 PANDORA_REQUIRE_BOOST([1.38])
70 PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
71 PANDORA_REQUIRE_BOOST_THREAD
72 PANDORA_REQUIRE_BOOST_REGEX
73 PANDORA_REQUIRE_BOOST_DATE_TIME
74 PANDORA_REQUIRE_BOOST_FILESYSTEM
75 PANDORA_REQUIRE_BOOST_IOSTREAMS
76
77 ])