Skip to content
This repository
Newer
Older
100644 256 lines (203 sloc) 6.907 kb
ba2d215e »
2009-03-12 framework-style new codebase
1 AC_INIT(src/logic/boot.h)
2 AC_CONFIG_AUX_DIR(ac)
c50d9bf4 »
2010-04-03 experimental Solaris 10 porting
3 AC_CANONICAL_TARGET
4
397e9167 »
2010-12-14 version 0.4.13
5 AM_INIT_AUTOMAKE(kumofs, 0.4.13)
ba2d215e »
2009-03-12 framework-style new codebase
6 AC_CONFIG_HEADER(config.h)
7
8
9 AC_SUBST(CFLAGS)
10 CFLAGS="-O4 -Wall $CFLAGS"
11
12 AC_SUBST(CXXFLAGS)
13 CXXFLAGS="-O4 -Wall $CXXFLAGS"
14
15 AC_PROG_CC
16 AC_PROG_CXX
17
18 AC_PROG_LIBTOOL
19 AM_PROG_AS
20 AM_PROG_CC_C_O
21
22
2d153173 »
2010-01-21 configure.in: check __sync_* atomic operations
23 AC_CACHE_CHECK([for __sync_* atomic operations], kumofs_cv_atomic_ops, [
24 AC_TRY_LINK([
25 int atomic_sub(int i) { return __sync_sub_and_fetch(&i, 1); }
26 int atomic_add(int i) { return __sync_add_and_fetch(&i, 1); }
27 int atomic_cas(int i) { return __sync_bool_compare_and_swap(&i, 0, 1); }
28 ], [], kumofs_cv_atomic_ops="yes")
29 ])
30 if test "$kumofs_cv_atomic_ops" != "yes"; then
31 AC_MSG_ERROR([__sync_* atomic operations are not supported.
32
33 Note that gcc < 4.1 is not supported.
34
35 If you are using gcc >= 4.1 and the default target CPU architecture is "i386", try to
397e9167 »
2010-12-14 version 0.4.13
36 add CFLAGS="-march=i686" and CXXFLAGS="-march=i686" options to ./configure as follows:
2d153173 »
2010-01-21 configure.in: check __sync_* atomic operations
37
38 $ ./configure CFLAGS="-march=i686" CXXFLAGS="-march=i686"
39 ])
40 fi
41
42
441ee8c0 »
2010-01-21 configure.in: reject g++ < 4.1
43 AC_LANG_PUSH(C++)
44 AC_CACHE_CHECK([for inner class friend], kumofs_cv_inner_class_friend, [
45 AC_TRY_COMPILE([
46 class base {
47 class inner { int val; friend class base; };
48 class check { void test() { inner r; r.val = 0; } };
49 };
50 ], [], kumofs_cv_inner_class_friend="yes")
51 ])
52 if test "$kumofs_cv_inner_class_friend" != "yes"; then
53 AC_MSG_ERROR([inner class friend is not supported.
54 Note that g++ < 4.1 is not supported. Use g++ >= 4.1.])
55 fi
56 AC_LANG_POP
57
58
ba2d215e »
2009-03-12 framework-style new codebase
59 AC_ARG_WITH([msgpack],
60 AS_HELP_STRING([--with-msgpack=DIR],
61 [specify the root directory for msgpack library]),
62 [msgpack_path="$withval"], [])
63 if test "$msgpack_path" != ""; then
64 CXXFLAGS="$CXXFLAGS -I$msgpack_path/include"
65 CFLAGS="$CFLAGS -I$msgpack_path/include"
66 LDFLAGS="$LDFLAGS -L$msgpack_path/lib"
67 fi
68
69
0d56f910 »
2009-03-13 framework: --enable-tcadb
70 storage_type="tchdb"
ba2d215e »
2009-03-12 framework-style new codebase
71
72
73 AC_ARG_WITH([tokyocabinet],
74 AS_HELP_STRING([--with-tokyocabinet@<:@=DIR@:>@],
75 [use Tokyo Cabinet for the backend storage]),
76 [tokyocabinet_path="$withval"], [])
77 if test "$tokyocabinet_path" != ""; then
78 CXXFLAGS="$CXXFLAGS -I$tokyocabinet_path/include"
79 CFLAGS="$CFLAGS -I$tokyocabinet_path/include"
80 LDFLAGS="$LDFLAGS -L$tokyocabinet_path/lib"
81 fi
82
83
84 #AC_ARG_WITH([luxio],
85 # AS_HELP_STRING([--with-luxio@<:@=DIR@:>@],
86 # [use LuxIO for the backend storage (NOT IMPLEMENTED)]),
87 # [luxio_path="$withval"], [])
88 #if test "$luxio_path" != ""; then
89 # storage_type="luxio"
90 # CXXFLAGS="$CXXFLAGS -I$luxio_path/include"
91 # CFLAGS="$CFLAGS -I$luxio_path/include"
92 # LDFLAGS="$LDFLAGS -L$luxio_path/lib"
93 #fi
94
95
9813d562 »
2009-03-13 framework: Tokyo Cabinet B+ Tree Database module; --enable-tcbdb
96 AC_MSG_CHECKING([if tcbdb is enabled])
97 AC_ARG_ENABLE(tcbdb,
98 AS_HELP_STRING([--enable-tcbdb],
99 [use tcbdb instead of tchdb.]) )
100 if test "$enable_tcbdb" = "yes"; then
101 storage_type="tcbdb"
102 fi
103 AC_MSG_RESULT($enable_tcbdb)
104
105
0d56f910 »
2009-03-13 framework: --enable-tcadb
106 AC_MSG_CHECKING([if tcadb is enabled])
107 AC_ARG_ENABLE(tcadb,
108 AS_HELP_STRING([--enable-tcadb],
109 [use tcadb instead of tchdb.]) )
110 if test "$enable_tcadb" = "yes"; then
111 storage_type="tcadb"
112 fi
113 AC_MSG_RESULT($enable_tcadb)
114
115
116
28aea4fb »
2010-05-21 configure: added --with-jemalloc option that links jemalloc.
117 AC_CHECK_LIB(stdc++, main)
118
119 AC_CHECK_LIB(pthread,pthread_create,,
120 AC_MSG_ERROR([Can't find pthread library]))
121
122 AC_CHECK_LIB(z,deflate,,
123 AC_MSG_ERROR([Can't find zlib library]))
124
125 AC_CHECK_HEADERS(openssl/sha.h,,
126 AC_MSG_ERROR([Can't find openssl header]))
127 AC_CHECK_LIB(crypto,SHA1,,
128 AC_MSG_ERROR([Can't find openssl library]))
129
130
131 AC_MSG_CHECKING([if jemalloc is enabled])
132 AC_ARG_WITH([jemalloc],
133 AS_HELP_STRING([--with-jemalloc@<:@=DIR@:>@],
134 [link jemalloc. This is recommended. See http://www.canonware.com/jemalloc/ for details.]),
135 [with_jemalloc="$withval"], [with_jemalloc="no"])
136 AC_MSG_RESULT($with_jemalloc)
137 if test "$with_jemalloc" != "no"; then
138 if test "$with_jemalloc" != "yes"; then
139 LDFLAGS="$LDFLAGS -L$with_jemalloc/lib"
140 LDFLAGS="$LDFLAGS -L$with_jemalloc/lib64"
141 fi
142 AC_CHECK_LIB(jemalloc,malloc,,
143 AC_MSG_ERROR([Can't find jemalloc library]))
144 fi
145
146
ba2d215e »
2009-03-12 framework-style new codebase
147 AC_MSG_CHECKING([if tcmalloc is enabled])
148 AC_ARG_WITH([tcmalloc],
149 AS_HELP_STRING([--with-tcmalloc@<:@=DIR@:>@],
28aea4fb »
2010-05-21 configure: added --with-jemalloc option that links jemalloc.
150 [link tcmalloc]),
ba2d215e »
2009-03-12 framework-style new codebase
151 [with_tcmalloc="$withval"], [with_tcmalloc="no"])
152 AC_MSG_RESULT($with_tcmalloc)
153 if test "$with_tcmalloc" != "no"; then
154 if test "$with_tcmalloc" != "yes"; then
155 LDFLAGS="$LDFLAGS -L$with_tcmalloc/lib"
156 LDFLAGS="$LDFLAGS -L$with_tcmalloc/lib64"
157 fi
158 AC_CHECK_LIB(tcmalloc,malloc,,
159 AC_MSG_ERROR([Can't find tcmalloc library]))
160 fi
161
162
163 AC_CHECK_LIB(msgpack,main,,
441ee8c0 »
2010-01-21 configure.in: reject g++ < 4.1
164 AC_MSG_ERROR([Can't find msgpack library.
165 --with-msgpack=DIR option may be needed.]))
ba2d215e »
2009-03-12 framework-style new codebase
166
35bfefb8 »
2010-01-18 --as-needed proglem: link msgpackc library. @matsuu++
167 AC_CHECK_LIB(msgpackc,main,,
441ee8c0 »
2010-01-21 configure.in: reject g++ < 4.1
168 AC_MSG_ERROR([Can't find msgpackc library.
169 --with-msgpack=DIR option may be needed.]))
35bfefb8 »
2010-01-18 --as-needed proglem: link msgpackc library. @matsuu++
170
a86d034c »
2009-04-19 add gateway::mod_cache, local cache module
171 AC_CHECK_HEADERS(tchdb.h,,
441ee8c0 »
2010-01-21 configure.in: reject g++ < 4.1
172 AC_MSG_ERROR([Can't find Tokyo Cabinet header.
173 --with-tokyocabinet=DIR option may be needed.]))
a86d034c »
2009-04-19 add gateway::mod_cache, local cache module
174 AC_CHECK_LIB(tokyocabinet,tchdbget,,
441ee8c0 »
2010-01-21 configure.in: reject g++ < 4.1
175 AC_MSG_ERROR([Can't find tokyocabinet library.
176 --with-tokyocabinet=DIR option may be needed.]))
a86d034c »
2009-04-19 add gateway::mod_cache, local cache module
177
c50d9bf4 »
2010-04-03 experimental Solaris 10 porting
178 case "$target_os" in
179 solaris*)
180 AC_CHECK_LIB(socket,accept,,
181 AC_MSG_ERROR([Can't find libsocket.]))
182 AC_CHECK_LIB(nsl,inet_ntop,,
183 AC_MSG_ERROR([Can't find libnsl.]))
184 AC_CHECK_LIB(sendfile,sendfile,,
185 AC_MSG_ERROR([Can't find libsendfile.]))
186 CXXFLAGS="$CXXFLAGS -D_REENTRANT"
187 CFLAGS="$CFLAGS -D_REENTRANT"
188 ;;
189 esac
0d56f910 »
2009-03-13 framework: --enable-tcadb
190
191 AC_MSG_CHECKING([storage type])
ba2d215e »
2009-03-12 framework-style new codebase
192 AC_MSG_RESULT($storage_type)
0d56f910 »
2009-03-13 framework: --enable-tcadb
193
194 AM_CONDITIONAL(STORAGE_TCHDB, test "$storage_type" = "tchdb")
9813d562 »
2009-03-13 framework: Tokyo Cabinet B+ Tree Database module; --enable-tcbdb
195 AM_CONDITIONAL(STORAGE_TCBDB, test "$storage_type" = "tcbdb")
0d56f910 »
2009-03-13 framework: --enable-tcadb
196 AM_CONDITIONAL(STORAGE_TCADB, test "$storage_type" = "tcadb")
197 AM_CONDITIONAL(STORAGE_LUXIO, test "$storage_type" = "luxio")
198
9813d562 »
2009-03-13 framework: Tokyo Cabinet B+ Tree Database module; --enable-tcbdb
199 if test "$storage_type" = "tchdb" -o "$storage_type" = "tcbdb" -o "$storage_type" = "tcadb"; then
ba2d215e »
2009-03-12 framework-style new codebase
200 CXXFLAGS="$CXXFLAGS -DUSE_TOKYOCABINET"
201 CFLAGS="$CFLAGS -DUSE_TOKYOCABINET"
0d56f910 »
2009-03-13 framework: --enable-tcadb
202 fi
203
204 if test "$storage_type" = "luxio"; then
ba2d215e »
2009-03-12 framework-style new codebase
205 AC_LANG_PUSH(C++)
206 AC_CHECK_HEADERS(luxio/btree.h) # FIXME luxio UINT8_MAX
207 #AC_CHECK_HEADERS(luxio/btree.h,,
208 # AC_MSG_ERROR([Can't find luxio header]))
209 AC_LANG_POP
210 fi
211
212
213
214 AC_MSG_CHECKING([if debug option is enabled])
215 AC_ARG_ENABLE(debug,
216 AS_HELP_STRING([--disable-debug],
217 [disable assert macros and omit -g option.]) )
218 if test "$enable_debug" != "no"; then
219 CXXFLAGS="$CXXFLAGS -g"
220 CFLAGS="$CFLAGS -g"
221 else
222 CXXFLAGS="$CXXFLAGS -DNDEBUG"
223 CFLAGS="$CFLAGS -DNDEBUG"
224 fi
225 AC_MSG_RESULT($enable_debug)
226
227
228 AC_MSG_CHECKING([if trace message is enabled])
229 AC_ARG_ENABLE(trace,
230 AS_HELP_STRING([--enable-trace], [enable trace messages.]) )
231 if test "$enable_trace" = "yes"; then
232 CXXFLAGS="$CXXFLAGS -DMLOGGER_LEVEL=0"
233 CFLAGS="$CFLAGS -DMLOGGER_LEVEL=0"
234 else
235 CXXFLAGS="$CXXFLAGS -DMLOGGER_LEVEL=2"
236 CFLAGS="$CFLAGS -DMLOGGER_LEVEL=2"
237 fi
238 AC_MSG_RESULT($enable_trace)
239
240
241 AC_OUTPUT([src/mp/Makefile
242 src/mpsrc/Makefile
2d5a9235 »
2009-04-04 gate: shared_ptr -> auto_ptr optimize, inline optimize
243 src/gate/Makefile
b96aafb1 »
2009-03-12 framework: kumo::server::Storage -> kumo::Storage
244 src/storage/Makefile
ba2d215e »
2009-03-12 framework-style new codebase
245 src/log/Makefile
246 src/kazuhiki/Makefile
247 src/rpc/Makefile
2d4cf83a »
2009-03-13 framework: fix merge
248 src/logic/manager/Makefile
249 src/logic/server/Makefile
250 src/logic/gateway/Makefile
ba2d215e »
2009-03-12 framework-style new codebase
251 src/logic/Makefile
252 src/command/Makefile
253 src/Makefile
254 Makefile])
255
Something went wrong with that request. Please try again.