-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.in.automake
205 lines (177 loc) · 5.61 KB
/
configure.in.automake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([Stasis],[0.1],[[email protected]])
AM_INIT_AUTOMAKE() #hello,0.1)
#AM_INIT_AUTOMAKE([subdir-objects]) # @todo use subdir-objects once transition to libtool is done.
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h])
AC_DEFINE([_GNU_SOURCE], [], [Use gnu extensions (needed for sync_data_range)])
# Checks for programs.
#AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
## Need AC_PROG_LIBTOOL
AC_PROG_LIBTOOL
AC_PROG_AWK
AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_LEX
# Checks for libraries.
# For SWIG & Python
# AC_PROG_LIBTOOL
AM_PATH_PYTHON(2.3)
AC_PROG_SWIG(1.3)
SWIG_ENABLE_CXX
SWIG_PYTHON
AM_CONDITIONAL(HAVE_SWIG, test x"$have_swig" = "xyes")
## alas, it won't link if this is put in here.. instead, it's linked in manually in the test directory...
#AC_ARG_ENABLE(efence,
#[ --enable-efence Use electric fence (www.perens.com)],
#[case "$enableval" in \
# yes) efence=yes ;; \
# no) efence=no;; \
# *) efence=no;; \
#esac], [efence=no])
#
#dnl Check for efence
#if test $efence = yes; then
#AC_CHECK_LIB(efence,memalign)
#fi
# Linux has a broken O_DIRECT flag, but we allow people to override it from
# the command line.
test_host_prw=yes
AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <fcntl.h>]], [[
open("a", O_RDONLY | O_DIRECT, 0);
]])],[db_cv_open_o_direct=yes; test_host_prw=no],[db_cv_open_o_direct=no])])
if test "$test_host_prw" = "no" -a "$db_cv_open_o_direct" = "yes"; then
case "$host_os" in
linux*)
# odirect probably works in linux now...
# db_cv_open_o_direct=no;
# AC_MSG_WARN(
# [O_DIRECT interface ignored on $host_os-$host_vendor.]);;
esac
fi
if test "$db_cv_open_o_direct" = "yes"; then
AC_DEFINE(HAVE_O_DIRECT)
AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
fi
#AC_CHECK_LIB([check], [suite_create])
#AC_CHECK_LIB([check], [suite_create],
# have_libcheck=yes,
# have_libcheck=no)
#
#if test x$have_libcheck = xyes ; then
#AM_CONDITIONAL(HAVE_LIBCHECK, true)
#else
#AM_CONDITIONAL(HAVE_LIBCHECK, false)
#AC_MSG_WARN([Check not found; cannot run unit tests!])
#fi
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([pthread], [pthread_create])
AC_ARG_ENABLE([network],
AS_HELP_STRING(--disable-network,Disable old networking code),
if test x$enableval = xno ; then
echo "Networking disabled; not checking for confuse";
have_libconfuse=no
else
AC_CHECK_LIB([confuse], [cfg_set_validate_func],
have_libconfuse=yes, have_libconfuse=no)
fi,
AC_CHECK_LIB([confuse], [cfg_set_validate_func],
have_libconfuse=yes, have_libconfuse=no)
)
AM_CONDITIONAL(HAVE_LIBCONFUSE, test x$have_libconfuse = xyes)
AC_ARG_ENABLE([pobj],
AS_HELP_STRING(--disable-pobj,Don't build pobj),
AM_CONDITIONAL(BUILD_POBJ, test x$enableval = xyes),
AM_CONDITIONAL(BUILD_POBJ, true)
)
AC_ARG_ENABLE([benchmarks],
AS_HELP_STRING(--disable-benchmarks,Don't build benchmarks),
if test x$enableval = xyes ; then
build_benchmarks=yes
else
build_benchmarks=no
fi,
build_benchmarks=yes
)
AC_CONFIG_DB
AM_CONDITIONAL(DB_ENABLED, test $DB_ENABLED = 1)
if test x$build_benchmarks = xyes ; then
if test $DB_ENABLED = 0; then
AC_MSG_WARN([Could not find Berkeley DB; some benchmarks will not be built])
fi
AM_CONDITIONAL(BUILD_BENCHMARKS, true)
else
AM_CONDITIONAL(BUILD_BENCHMARKS, false)
fi
AC_CHECK_LIB([intl], [bindtextdomain])
AC_CHECK_LIB([c], [bindtextdomain])
# Checks for header files.
AC_HEADER_DIRENT
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h errno.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
#AC_TYPE_INT64_T
#AC_TYPE_UINT64_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
#AC_TYPE_SSIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
#enable largefile support.
AC_SYS_LARGEFILE
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
## Assume we have these, and that they work.
## (otherwise, bad stuff happens sometimes)
#AC_FUNC_MALLOC
#AC_FUNC_REALLOC
AC_FUNC_MEMCMP
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([bzero fdatasync floor ftruncate getcwd gettimeofday inet_ntoa localtime_r memmove memset mkdir posix_memalign pow powl socket sqrt strchr strdup strerror strrchr strstr strtol strtoul sync_file_range tcase_set_timeout])
#AC_CONFIG_LIBMYSQLD
AC_CONFIG_FILES([Makefile
benchmarks/Makefile
benchmarks/berkeleyDB/Makefile
libdfa/Makefile
stasis/Makefile
src/2pc/Makefile
src/Makefile
src/apps/Makefile
src/apps/cht/Makefile
src/apps/readOnlyHash/Makefile
src/apps/cyrus/Makefile
src/apps/referential/Makefile
src/libdfa/Makefile
src/stasis/Makefile
src/pobj/Makefile
src/timing/Makefile
test/2pc/Makefile
test/Makefile
test/cht/Makefile
test/dfa/Makefile
test/lladd-old/Makefile
test/stasis/Makefile
test/messages/Makefile
test/monotree/Makefile
test/pobj/Makefile
utilities/Makefile
utilities/swig/Makefile
examples/Makefile
])
AC_OUTPUT