-P seems to want an abs path.
[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 save_CXXFLAGS="${CXXFLAGS}"
14 CXXFLAGS="${CXXFLAGS} ${AM_CXXFLAGS}"
15 PANDORA_CXX_STL_HASH
16 CXXFLAGS="${save_CXXFLAGS}"
17
18 PANDORA_CXX_CSTDINT
19 PANDORA_CXX_CINTTYPES
20
21 AC_STRUCT_TM
22
23 AC_FUNC_ALLOCA
24 AC_FUNC_UTIME_NULL
25 AC_FUNC_VPRINTF
26
27 PANDORA_WORKING_FDATASYNC
28
29 AC_CHECK_FUNCS(\
30 gethrtime \
31 setupterm \
32 backtrace \
33 backtrace_symbols \
34 backtrace_symbols_fd)
35
36 AC_HEADER_STAT
37 AC_HEADER_DIRENT
38 AC_HEADER_STDC
39 AC_HEADER_SYS_WAIT
40 AC_HEADER_STDBOOL
41
42 AC_CHECK_HEADERS(sys/fpu.h fpu_control.h ieeefp.h)
43 AC_CHECK_HEADERS(select.h sys/select.h)
44 AC_CHECK_HEADERS(utime.h sys/utime.h )
45 AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
46 AC_CHECK_HEADERS(sched.h)
47 AC_CHECK_HEADERS(sys/prctl.h)
48 AC_CHECK_HEADERS(execinfo.h)
49 AC_CHECK_HEADERS(locale.h)
50 AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
51 AC_CHECK_HEADERS(paths.h)
52
53
54 #--------------------------------------------------------------------
55 # Check for system libraries. Adds the library to $LIBS
56 # and defines HAVE_LIBM etc
57 #--------------------------------------------------------------------
58
59 # For the sched_yield() function on Solaris
60 AC_CHECK_FUNC(sched_yield, [],
61 [AC_CHECK_LIB(posix4, [sched_yield],
62 [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
63
64 AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
65 AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
66 ])
67
68 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
69 #ifdef HAVE_CURSES_H
70 # include <curses.h>
71 #endif
72 ]])
73 AC_CHECK_TYPES([ulong])
74
75 PANDORA_CXX_DEMANGLE
76
77 ])