Updated to latest pandora-build. Removed the .ver scripts to be consistent with other...
[awesomized/libmemcached] / m4 / pandora_drizzle_build.m4
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.
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 dnl We need to turn on our CXXFLAGS to make sure it shows up correctly
13 PANDORA_CXX_STL_HASH
14
15 PANDORA_CXX_CSTDINT
16 PANDORA_CXX_CINTTYPES
17
18 AC_STRUCT_TM
19
20 AC_FUNC_ALLOCA
21 AC_FUNC_UTIME_NULL
22 AC_FUNC_VPRINTF
23
24 PANDORA_WORKING_FDATASYNC
25
26 AC_CHECK_FUNCS(\
27 gethrtime \
28 setupterm \
29 backtrace \
30 backtrace_symbols \
31 backtrace_symbols_fd)
32
33 AC_HEADER_STAT
34 AC_HEADER_DIRENT
35 AC_HEADER_STDC
36 AC_HEADER_SYS_WAIT
37 AC_HEADER_STDBOOL
38
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)
49
50
51 #--------------------------------------------------------------------
52 # Check for system libraries. Adds the library to $LIBS
53 # and defines HAVE_LIBM etc
54 #--------------------------------------------------------------------
55
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"])])
60
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)])
63 ])
64
65 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
66 #ifdef HAVE_CURSES_H
67 # include <curses.h>
68 #endif
69 ]])
70 AC_CHECK_TYPES([uint, ulong])
71
72 PANDORA_CXX_DEMANGLE
73
74 AH_TOP([
75 #ifndef __CONFIG_H__
76 #define __CONFIG_H__
77
78 #if defined(i386) && !defined(__i386__)
79 #define __i386__
80 #endif
81
82 ])
83 AH_BOTTOM([
84 #if defined(__cplusplus)
85 # include CSTDINT_H
86 # include CINTTYPES_H
87 #else
88 # include <stdint.h>
89 # include <inttypes.h>
90 #endif
91
92 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)
93 typedef unsigned long int ulong;
94 #endif
95
96 #endif /* __CONFIG_H__ */
97 ])
98 ])