Merge lp:~mordred/gearmand/one-makefile into lp:gearmand/1.0
- one-makefile
- Merge into 1.0
Proposed by
Monty Taylor
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~mordred/gearmand/one-makefile |
Merge into: | lp:gearmand/1.0 |
Diff against target: |
3112 lines (+2053/-352) 57 files modified
Makefile.am (+32/-17) benchmark/include.am (+22/-13) bin/include.am (+12/-6) config/autorun.sh (+0/-6) configure.ac (+4/-61) examples/include.am (+37/-25) gearmand/include.am (+17/-12) libgearman-server/gearmand.c (+5/-2) libgearman-server/gearmand_con.c (+8/-3) libgearman-server/gearmand_thread.c (+2/-1) libgearman-server/include.am (+62/-60) libgearman-server/libgearman-server.ver (+0/-1) libgearman/include.am (+38/-36) libgearman/libgearman.ver (+0/-1) m4/pandora_canonical.m4 (+83/-10) m4/pandora_check_cxx_standard.m4 (+9/-2) m4/pandora_cinttypes.m4 (+34/-0) m4/pandora_cstdint.m4 (+33/-0) m4/pandora_cxx_demangle.m4 (+27/-0) m4/pandora_drizzle_build.m4 (+98/-0) m4/pandora_fdatasync.m4 (+25/-0) m4/pandora_have_better_malloc.m4 (+5/-0) m4/pandora_have_gcc_atomics.m4 (+37/-0) m4/pandora_have_libavahi.m4 (+41/-0) m4/pandora_have_libbdb.m4 (+40/-0) m4/pandora_have_libdl.m4 (+51/-0) m4/pandora_have_libevent.m4 (+66/-0) m4/pandora_have_libgearman.m4 (+2/-2) m4/pandora_have_libmemcached.m4 (+0/-1) m4/pandora_have_libpcre.m4 (+73/-0) m4/pandora_have_libreadline.m4 (+242/-0) m4/pandora_have_libtokyocabinet.m4 (+52/-0) m4/pandora_have_libuuid.m4 (+55/-0) m4/pandora_have_libxml2.m4 (+52/-0) m4/pandora_have_libz.m4 (+51/-0) m4/pandora_header_assert.m4 (+2/-2) m4/pandora_libtool.m4 (+10/-0) m4/pandora_plugins.m4 (+17/-5) m4/pandora_pthread.m4 (+180/-0) m4/pandora_run_cpplint.m4 (+8/-0) m4/pandora_sasl.m4 (+133/-0) m4/pandora_shared_ptr.m4 (+3/-0) m4/pandora_stack_direction.m4 (+39/-0) m4/pandora_stl_hash.m4 (+110/-0) m4/pandora_vc_build.m4 (+69/-3) m4/pandora_version.m4 (+11/-0) m4/pandora_warnings.m4 (+12/-5) m4/pandora_with_gettext.m4 (+41/-0) m4/pandora_with_memcached.m4 (+17/-10) scripts/Makefile.am (+0/-8) support/Makefile.am (+0/-11) tests/client_test.c (+4/-0) tests/include.am (+65/-48) tests/memcached_test.c (+4/-0) tests/sqlite_test.c (+5/-1) tests/test_gearmand.c (+4/-0) tests/worker_test.c (+4/-0) |
To merge this branch: | bzr merge lp:~mordred/gearmand/one-makefile |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Pending | ||
Review via email: mp+16352@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile.am' |
2 | --- Makefile.am 2009-09-24 23:43:15 +0000 |
3 | +++ Makefile.am 2009-12-18 19:32:12 +0000 |
4 | @@ -7,25 +7,42 @@ |
5 | |
6 | ACLOCAL_AMFLAGS= -I m4 |
7 | |
8 | -SUBDIRS = \ |
9 | - libgearman \ |
10 | - libgearman-server \ |
11 | - gearmand \ |
12 | - bin \ |
13 | - examples \ |
14 | - scripts \ |
15 | - support \ |
16 | - benchmark \ |
17 | - tests |
18 | - |
19 | -include $(top_srcdir)/docs/man_list |
20 | - |
21 | -EXTRA_DIST= \ |
22 | +bin_PROGRAMS = |
23 | +sbin_PROGRAMS = |
24 | +check_PROGRAMS = |
25 | +noinst_PROGRAMS = |
26 | +lib_LTLIBRARIES = |
27 | +noinst_LTLIBRARIES = |
28 | +nobase_pkginclude_HEADERS = |
29 | +noinst_HEADERS = |
30 | +EXTRA_DIST = |
31 | +CLEANFILES = |
32 | + |
33 | + |
34 | +include benchmark/include.am |
35 | +include bin/include.am |
36 | +include examples/include.am |
37 | +include gearmand/include.am |
38 | +include libgearman/include.am |
39 | +include libgearman-server/include.am |
40 | +include tests/include.am |
41 | + |
42 | +include docs/man_list |
43 | + |
44 | +EXTRA_DIST+= \ |
45 | docs/Doxyfile.api \ |
46 | docs/Doxyfile.dev \ |
47 | docs/api_header.html \ |
48 | docs/dev_header.html \ |
49 | - docs/doxygen.h |
50 | + docs/doxygen.h \ |
51 | + scripts/gearmand-init \ |
52 | + scripts/gearmand.xml \ |
53 | + scripts/gearmand \ |
54 | + scripts/README.solaris \ |
55 | + support/gearmand.spec |
56 | + |
57 | +pkgconfigdir = $(libdir)/pkgconfig |
58 | +pkgconfig_DATA = support/gearmand.pc |
59 | |
60 | docs: all |
61 | ${DOXYGEN} docs/Doxyfile.api |
62 | @@ -33,8 +50,6 @@ |
63 | |
64 | test: check |
65 | |
66 | -valgrind: |
67 | - (cd tests; ${MAKE} valgrind) |
68 | |
69 | rpm: all dist |
70 | cp gearmand-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ |
71 | |
72 | === renamed file 'benchmark/Makefile.am' => 'benchmark/include.am' |
73 | --- benchmark/Makefile.am 2009-04-01 01:49:18 +0000 |
74 | +++ benchmark/include.am 2009-12-18 19:32:12 +0000 |
75 | @@ -1,19 +1,28 @@ |
76 | +# vim:ft=automake |
77 | # Gearman server and library |
78 | # Copyright (C) 2008 Brian Aker, Eric Day |
79 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
80 | # All rights reserved. |
81 | # |
82 | # Use and distribution licensed under the BSD license. See |
83 | # the COPYING file in the parent directory for full text. |
84 | - |
85 | -LDADD= $(LTLIBUUID) $(LTLIBEVENT) $(top_builddir)/libgearman/libgearman.la |
86 | - |
87 | -noinst_PROGRAMS= \ |
88 | - blobslap_client \ |
89 | - blobslap_worker |
90 | - |
91 | -noinst_HEADERS= \ |
92 | - benchmark.h |
93 | - |
94 | -blobslap_client_SOURCES= blobslap_client.c benchmark.c |
95 | - |
96 | -blobslap_worker_SOURCES= blobslap_worker.c benchmark.c |
97 | +# |
98 | +# Included from Top Level Makefile.am |
99 | +# All paths should be given relative to the root |
100 | + |
101 | + |
102 | +noinst_PROGRAMS+= \ |
103 | + benchmark/blobslap_client \ |
104 | + benchmark/blobslap_worker |
105 | + |
106 | +noinst_HEADERS+= \ |
107 | + benchmark/benchmark.h |
108 | + |
109 | +noinst_LTLIBRARIES+= benchmark/libbenchmark.la |
110 | +benchmark_libbenchmark_la_SOURCES= benchmark/benchmark.c |
111 | + |
112 | +benchmark_blobslap_client_SOURCES= benchmark/blobslap_client.c |
113 | +benchmark_blobslap_client_LDADD= benchmark/libbenchmark.la libgearman/libgearman.la |
114 | + |
115 | +benchmark_blobslap_worker_SOURCES= benchmark/blobslap_worker.c |
116 | +benchmark_blobslap_worker_LDADD= benchmark/libbenchmark.la libgearman/libgearman.la |
117 | |
118 | === renamed file 'bin/Makefile.am' => 'bin/include.am' |
119 | --- bin/Makefile.am 2009-07-14 21:46:14 +0000 |
120 | +++ bin/include.am 2009-12-18 19:32:12 +0000 |
121 | @@ -1,12 +1,18 @@ |
122 | +# vim:ft=automake |
123 | # Gearman server and library |
124 | # Copyright (C) 2008 Brian Aker, Eric Day |
125 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
126 | # All rights reserved. |
127 | # |
128 | # Use and distribution licensed under the BSD license. See |
129 | # the COPYING file in the parent directory for full text. |
130 | - |
131 | -bin_PROGRAMS= \ |
132 | - gearman |
133 | - |
134 | -gearman_SOURCES= gearman.c |
135 | -gearman_LDADD= $(top_builddir)/libgearman/libgearman.la ${BETTER_MALLOC_LIBS} |
136 | +# |
137 | +# Included from Top Level Makefile.am |
138 | +# All paths should be given relative to the root |
139 | + |
140 | + |
141 | +bin_PROGRAMS+= \ |
142 | + bin/gearman |
143 | + |
144 | +bin_gearman_SOURCES= bin/gearman.c |
145 | +bin_gearman_LDADD= libgearman/libgearman.la ${BETTER_MALLOC_LIBS} |
146 | |
147 | === modified file 'config/autorun.sh' |
148 | --- config/autorun.sh 2009-09-29 04:30:01 +0000 |
149 | +++ config/autorun.sh 2009-12-18 19:32:12 +0000 |
150 | @@ -68,12 +68,6 @@ |
151 | . config/pre_hook.sh |
152 | fi |
153 | |
154 | -# We need to some file here for the m4_sinclude, even if it's just empty |
155 | -if test ! -f config/plugin.ac |
156 | -then |
157 | - touch config/plugin.ac |
158 | -fi |
159 | - |
160 | # Try to detect the supported binaries if the user didn't |
161 | # override that by pushing the environment variable |
162 | if test x$LIBTOOLIZE = x; then |
163 | |
164 | === modified file 'configure.ac' |
165 | --- configure.ac 2009-12-02 05:22:18 +0000 |
166 | +++ configure.ac 2009-12-18 19:32:12 +0000 |
167 | @@ -43,65 +43,17 @@ |
168 | # or changed |
169 | AC_SUBST(GEARMAN_SERVER_LIBRARY_VERSION) |
170 | |
171 | -# lib versioning when linked with GNU ld. |
172 | -AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[ |
173 | - LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libgearman/libgearman.ver" |
174 | - LD_VERSION_SCRIPT_SERVER="-Wl,--version-script=\$(top_srcdir)/libgearman-server/libgearman-server.ver" |
175 | -]) |
176 | -AC_SUBST(LD_VERSION_SCRIPT) |
177 | -AC_SUBST(LD_VERSION_SCRIPT_SERVER) |
178 | |
179 | PANDORA_REQUIRE_PTHREAD |
180 | - |
181 | -#-------------------------------------------------------------------- |
182 | -# Check for libevent |
183 | -#-------------------------------------------------------------------- |
184 | - |
185 | -AC_LIB_HAVE_LINKFLAGS(event,, |
186 | -[ |
187 | -#include <sys/types.h> |
188 | -#include <sys/time.h> |
189 | -#include <stdlib.h> |
190 | -#include <event.h> |
191 | -],[ |
192 | - struct bufferevent bev; |
193 | - bufferevent_settimeout(&bev, 1, 1); |
194 | - event_init(); |
195 | - event_loop(EVLOOP_ONCE); |
196 | -]) |
197 | -AS_IF([test x$ac_cv_libevent = xno], |
198 | - AC_MSG_ERROR([A recent version of libevent is required to build gearmand. On Debian this can be found in libevent-dev. On RedHat its in libevent-devel. You can also install the latest from source at http://www.monkey.org/~provos/libevent.])) |
199 | - |
200 | - |
201 | -save_LIBS="${LIBS}" |
202 | -LIBS="${LIBS} ${LTLIBEVENT}" |
203 | -AC_CHECK_FUNCS(event_base_new) |
204 | -AC_CHECK_FUNCS(event_base_free) |
205 | -AC_CHECK_FUNCS(event_base_get_method) |
206 | -LIBS="$save_LIBS" |
207 | - |
208 | -#-------------------------------------------------------------------- |
209 | -# Check for libuuid |
210 | -#-------------------------------------------------------------------- |
211 | - |
212 | -AC_CHECK_HEADERS(uuid/uuid.h) |
213 | -if test "x$ac_cv_header_uuid_uuid_h" = "xno" |
214 | -then |
215 | - AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.]) |
216 | -fi |
217 | -AC_LIB_HAVE_LINKFLAGS(uuid,, |
218 | -[ |
219 | -#include <uuid/uuid.h> |
220 | -], |
221 | -[ |
222 | - uuid_t uout; |
223 | - uuid_generate(uout); |
224 | -]) |
225 | +PANDORA_REQUIRE_LIBEVENT |
226 | +PANDORA_REQUIRE_LIBUUID |
227 | + |
228 | |
229 | PANDORA_HAVE_BETTER_MALLOC |
230 | PANDORA_HAVE_LIBSQLITE3 |
231 | PANDORA_HAVE_LIBDRIZZLE |
232 | PANDORA_HAVE_LIBMEMCACHED |
233 | +PANDORA_HAVE_MEMCACHED |
234 | PANDORA_HAVE_LIBPQ |
235 | |
236 | |
237 | @@ -112,15 +64,6 @@ |
238 | |
239 | |
240 | AC_CONFIG_FILES(Makefile |
241 | - libgearman/Makefile |
242 | - libgearman-server/Makefile |
243 | - gearmand/Makefile |
244 | - bin/Makefile |
245 | - tests/Makefile |
246 | - examples/Makefile |
247 | - scripts/Makefile |
248 | - support/Makefile |
249 | - benchmark/Makefile |
250 | scripts/gearmand-init |
251 | scripts/gearmand.xml |
252 | scripts/gearmand |
253 | |
254 | === renamed file 'examples/Makefile.am' => 'examples/include.am' |
255 | --- examples/Makefile.am 2009-04-01 01:49:18 +0000 |
256 | +++ examples/include.am 2009-12-18 19:32:12 +0000 |
257 | @@ -1,31 +1,43 @@ |
258 | +# vim:ft=automake |
259 | # Gearman server and library |
260 | # Copyright (C) 2008 Brian Aker, Eric Day |
261 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
262 | # All rights reserved. |
263 | # |
264 | # Use and distribution licensed under the BSD license. See |
265 | # the COPYING file in the parent directory for full text. |
266 | - |
267 | -LDADD= $(LTLIBUUID) $(LTLIBEVENT) $(top_builddir)/libgearman/libgearman.la |
268 | - |
269 | -noinst_PROGRAMS= \ |
270 | - echo_client \ |
271 | - echo_worker \ |
272 | - reverse_client \ |
273 | - reverse_client_bg \ |
274 | - reverse_client_cb \ |
275 | - reverse_worker \ |
276 | - wc_worker |
277 | - |
278 | -echo_client_SOURCES= echo_client.c |
279 | - |
280 | -echo_worker_SOURCES= echo_worker.c |
281 | - |
282 | -reverse_client_SOURCES= reverse_client.c |
283 | - |
284 | -reverse_client_bg_SOURCES= reverse_client_bg.c |
285 | - |
286 | -reverse_client_cb_SOURCES= reverse_client_cb.c |
287 | - |
288 | -reverse_worker_SOURCES= reverse_worker.c |
289 | - |
290 | -wc_worker_SOURCES= wc_worker.c |
291 | +# |
292 | +# Included from Top Level Makefile.am |
293 | +# All paths should be given relative to the root |
294 | + |
295 | +EXAMPLES_LDADD= $(LTLIBUUID) $(LTLIBEVENT) libgearman/libgearman.la |
296 | + |
297 | +noinst_PROGRAMS+= \ |
298 | + examples/echo_client \ |
299 | + examples/echo_worker \ |
300 | + examples/reverse_client \ |
301 | + examples/reverse_client_bg \ |
302 | + examples/reverse_client_cb \ |
303 | + examples/reverse_worker \ |
304 | + examples/wc_worker |
305 | + |
306 | +examples_echo_client_SOURCES= examples/echo_client.c |
307 | +examples_echo_client_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
308 | + |
309 | +examples_echo_worker_SOURCES= examples/echo_worker.c |
310 | +examples_echo_worker_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
311 | + |
312 | +examples_reverse_client_SOURCES= examples/reverse_client.c |
313 | +examples_reverse_client_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
314 | + |
315 | +examples_reverse_client_bg_SOURCES= examples/reverse_client_bg.c |
316 | +examples_reverse_client_bg_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
317 | + |
318 | +examples_reverse_client_cb_SOURCES= examples/reverse_client_cb.c |
319 | +examples_reverse_client_cb_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
320 | + |
321 | +examples_reverse_worker_SOURCES= examples/reverse_worker.c |
322 | +examples_reverse_worker_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
323 | + |
324 | +examples_wc_worker_SOURCES= examples/wc_worker.c |
325 | +examples_wc_worker_LDADD= $(AM_LDADD) $(EXAMPLES_LDADD) |
326 | |
327 | === renamed file 'gearmand/Makefile.am' => 'gearmand/include.am' |
328 | --- gearmand/Makefile.am 2009-09-24 23:43:15 +0000 |
329 | +++ gearmand/include.am 2009-12-18 19:32:12 +0000 |
330 | @@ -1,20 +1,25 @@ |
331 | +# vim:ft=automake |
332 | # Gearman server and library |
333 | # Copyright (C) 2008 Brian Aker, Eric Day |
334 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
335 | # All rights reserved. |
336 | # |
337 | # Use and distribution licensed under the BSD license. See |
338 | # the COPYING file in the parent directory for full text. |
339 | - |
340 | -sbin_PROGRAMS= gearmand |
341 | - |
342 | -gearmand_LDADD= \ |
343 | - $(top_builddir)/libgearman-server/libgearman-server.la \ |
344 | +# |
345 | +# Included from Top Level Makefile.am |
346 | +# All paths should be given relative to the root |
347 | + |
348 | +sbin_PROGRAMS+= gearmand/gearmand |
349 | + |
350 | +gearmand_gearmand_LDADD= \ |
351 | + libgearman-server/libgearman-server.la \ |
352 | ${BETTER_MALLOC_LIBS} |
353 | |
354 | -gearmand_SOURCES= gearmand.c |
355 | - |
356 | -valgrind: gearmand |
357 | - libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes gearmand |
358 | - |
359 | -debug: gearmand |
360 | - libtool --mode=execute gdb gearmand |
361 | +gearmand_gearmand_SOURCES= gearmand/gearmand.c |
362 | + |
363 | +gearmand-valgrind: gearmand/gearmand |
364 | + $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes gearmand/gearmand |
365 | + |
366 | +gearmand-debug: gearmand/gearmand |
367 | + $(LIBTOOL) --mode=execute gdb gearmand/gearmand |
368 | |
369 | === modified file 'libgearman-server/gearmand.c' |
370 | --- libgearman-server/gearmand.c 2009-10-29 22:01:39 +0000 |
371 | +++ libgearman-server/gearmand.c 2009-12-18 19:32:13 +0000 |
372 | @@ -484,13 +484,15 @@ |
373 | if (!(gearmand->options & GEARMAND_LISTEN_EVENT)) |
374 | return; |
375 | |
376 | + int del_ret= 0; |
377 | for (x= 0; x < gearmand->port_count; x++) |
378 | { |
379 | for (y= 0; y < gearmand->port_list[x].listen_count; y++) |
380 | { |
381 | GEARMAN_INFO(gearmand, "Clearing event for listening socket (%d)", |
382 | gearmand->port_list[x].listen_fd[y]) |
383 | - assert(event_del(&(gearmand->port_list[x].listen_event[y])) == 0); |
384 | + del_ret= event_del(&(gearmand->port_list[x].listen_event[y])); |
385 | + assert(del_ret == 0); |
386 | } |
387 | } |
388 | |
389 | @@ -615,7 +617,8 @@ |
390 | if (gearmand->options & GEARMAND_WAKEUP_EVENT) |
391 | { |
392 | GEARMAN_INFO(gearmand, "Clearing event for wakeup pipe") |
393 | - assert(event_del(&(gearmand->wakeup_event)) == 0); |
394 | + int del_ret= event_del(&(gearmand->wakeup_event)); |
395 | + assert(del_ret == 0); |
396 | gearmand->options&= (gearmand_options_t)~GEARMAND_WAKEUP_EVENT; |
397 | } |
398 | } |
399 | |
400 | === modified file 'libgearman-server/gearmand_con.c' |
401 | --- libgearman-server/gearmand_con.c 2009-10-29 20:18:00 +0000 |
402 | +++ libgearman-server/gearmand_con.c 2009-12-18 19:32:12 +0000 |
403 | @@ -126,13 +126,15 @@ |
404 | |
405 | void gearmand_con_free(gearmand_con_st *dcon) |
406 | { |
407 | - assert(event_del(&(dcon->event)) == 0); |
408 | + int del_ret= event_del(&(dcon->event)); |
409 | + assert(del_ret == 0); |
410 | |
411 | /* This gets around a libevent bug when both POLLIN and POLLOUT are set. */ |
412 | event_set(&(dcon->event), dcon->fd, EV_READ, _con_ready, dcon); |
413 | event_base_set(dcon->thread->base, &(dcon->event)); |
414 | event_add(&(dcon->event), NULL); |
415 | - assert(event_del(&(dcon->event)) == 0); |
416 | + del_ret= event_del(&(dcon->event)); |
417 | + assert(del_ret == 0); |
418 | |
419 | gearman_server_con_free(dcon->server_con); |
420 | GEARMAN_LIST_DEL(dcon->thread->dcon, dcon,) |
421 | @@ -195,7 +197,10 @@ |
422 | if (dcon->last_events != set_events) |
423 | { |
424 | if (dcon->last_events != 0) |
425 | - assert(event_del(&(dcon->event)) == 0); |
426 | + { |
427 | + int del_ret= event_del(&(dcon->event)); |
428 | + assert(del_ret == 0); |
429 | + } |
430 | event_set(&(dcon->event), dcon->fd, set_events | EV_PERSIST, _con_ready, |
431 | dcon); |
432 | event_base_set(dcon->thread->base, &(dcon->event)); |
433 | |
434 | === modified file 'libgearman-server/gearmand_thread.c' |
435 | --- libgearman-server/gearmand_thread.c 2009-10-29 20:18:00 +0000 |
436 | +++ libgearman-server/gearmand_thread.c 2009-12-18 19:32:12 +0000 |
437 | @@ -335,7 +335,8 @@ |
438 | GEARMAN_INFO(thread->gearmand, |
439 | "[%4u] Clearing event for IO thread wakeup pipe", |
440 | thread->count) |
441 | - assert(event_del(&(thread->wakeup_event)) == 0); |
442 | + int del_ret= event_del(&(thread->wakeup_event)); |
443 | + assert(del_ret == 0); |
444 | thread->options&= (gearmand_thread_options_t)~GEARMAND_THREAD_WAKEUP_EVENT; |
445 | } |
446 | } |
447 | |
448 | === renamed file 'libgearman-server/Makefile.am' => 'libgearman-server/include.am' |
449 | --- libgearman-server/Makefile.am 2009-09-29 03:57:09 +0000 |
450 | +++ libgearman-server/include.am 2009-12-18 19:32:12 +0000 |
451 | @@ -1,94 +1,96 @@ |
452 | +# vim:ft=automake |
453 | # Gearman server and library |
454 | # Copyright (C) 2008 Brian Aker, Eric Day |
455 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
456 | # All rights reserved. |
457 | # |
458 | # Use and distribution licensed under the BSD license. See |
459 | # the COPYING file in the parent directory for full text. |
460 | +# |
461 | +# Included from Top Level Makefile.am |
462 | +# All paths should be given relative to the root |
463 | |
464 | if HAVE_LIBDRIZZLE |
465 | -QUEUE_LIBDRIZZLE_H= queue_libdrizzle.h |
466 | -QUEUE_LIBDRIZZLE_C= queue_libdrizzle.c |
467 | +QUEUE_LIBDRIZZLE_H= libgearman-server/queue_libdrizzle.h |
468 | +QUEUE_LIBDRIZZLE_C= libgearman-server/queue_libdrizzle.c |
469 | endif |
470 | |
471 | if HAVE_LIBMEMCACHED |
472 | -QUEUE_LIBMEMCACHED_H= queue_libmemcached.h |
473 | -QUEUE_LIBMEMCACHED_C= queue_libmemcached.c |
474 | +QUEUE_LIBMEMCACHED_H= libgearman-server/queue_libmemcached.h |
475 | +QUEUE_LIBMEMCACHED_C= libgearman-server/queue_libmemcached.c |
476 | endif |
477 | |
478 | if HAVE_LIBSQLITE3 |
479 | -QUEUE_LIBSQLITE3_H= queue_libsqlite3.h |
480 | -QUEUE_LIBSQLITE3_C= queue_libsqlite3.c |
481 | +QUEUE_LIBSQLITE3_H= libgearman-server/queue_libsqlite3.h |
482 | +QUEUE_LIBSQLITE3_C= libgearman-server/queue_libsqlite3.c |
483 | endif |
484 | |
485 | if HAVE_LIBPQ |
486 | -QUEUE_LIBPQ_H= queue_libpq.h |
487 | -QUEUE_LIBPQ_C= queue_libpq.c |
488 | +QUEUE_LIBPQ_H= libgearman-server/queue_libpq.h |
489 | +QUEUE_LIBPQ_C= libgearman-server/queue_libpq.c |
490 | endif |
491 | |
492 | -lib_LTLIBRARIES= libgearman-server.la |
493 | - |
494 | -libgearman_serverincludedir= ${includedir}/libgearman-server |
495 | - |
496 | -dist_libgearman_serverinclude_HEADERS= \ |
497 | - client.h \ |
498 | - conf.h \ |
499 | - conf_module.h \ |
500 | - conn.h \ |
501 | - constants.h \ |
502 | - function.h \ |
503 | - job.h \ |
504 | - packet.h \ |
505 | - server.h \ |
506 | - structs.h \ |
507 | - thread.h \ |
508 | - worker.h \ |
509 | +lib_LTLIBRARIES+= libgearman-server/libgearman-server.la |
510 | + |
511 | + |
512 | +nobase_pkginclude_HEADERS += \ |
513 | $(QUEUE_LIBDRIZZLE_H) \ |
514 | $(QUEUE_LIBMEMCACHED_H) \ |
515 | + $(QUEUE_LIBPQ_H) \ |
516 | $(QUEUE_LIBSQLITE3_H) \ |
517 | - $(QUEUE_LIBPQ_H) \ |
518 | - protocol_http.h \ |
519 | - gearmand.h \ |
520 | - gearmand_thread.h \ |
521 | - gearmand_con.h |
522 | - |
523 | -noinst_HEADERS= \ |
524 | - common.h |
525 | - |
526 | -libgearman_server_la_SOURCES= \ |
527 | - client.c \ |
528 | - conf.c \ |
529 | - conf_module.c \ |
530 | - conn.c \ |
531 | - function.c \ |
532 | - job.c \ |
533 | - packet.c \ |
534 | - server.c \ |
535 | - thread.c \ |
536 | - worker.c \ |
537 | + libgearman-server/client.h \ |
538 | + libgearman-server/conf.h \ |
539 | + libgearman-server/conf_module.h \ |
540 | + libgearman-server/conn.h \ |
541 | + libgearman-server/constants.h \ |
542 | + libgearman-server/function.h \ |
543 | + libgearman-server/gearmand.h \ |
544 | + libgearman-server/gearmand_con.h \ |
545 | + libgearman-server/gearmand_thread.h \ |
546 | + libgearman-server/job.h \ |
547 | + libgearman-server/packet.h \ |
548 | + libgearman-server/protocol_http.h \ |
549 | + libgearman-server/server.h \ |
550 | + libgearman-server/structs.h \ |
551 | + libgearman-server/thread.h \ |
552 | + libgearman-server/worker.h |
553 | + |
554 | +noinst_HEADERS+= \ |
555 | + libgearman-server/common.h |
556 | + |
557 | +libgearman_server_libgearman_server_la_SOURCES= \ |
558 | $(QUEUE_LIBDRIZZLE_C) \ |
559 | $(QUEUE_LIBMEMCACHED_C) \ |
560 | + $(QUEUE_LIBPQ_C) \ |
561 | $(QUEUE_LIBSQLITE3_C) \ |
562 | - $(QUEUE_LIBPQ_C) \ |
563 | - protocol_http.c \ |
564 | - gearmand.c \ |
565 | - gearmand_thread.c \ |
566 | - gearmand_con.c |
567 | + libgearman-server/client.c \ |
568 | + libgearman-server/conf.c \ |
569 | + libgearman-server/conf_module.c \ |
570 | + libgearman-server/conn.c \ |
571 | + libgearman-server/function.c \ |
572 | + libgearman-server/gearmand.c \ |
573 | + libgearman-server/gearmand_con.c \ |
574 | + libgearman-server/gearmand_thread.c \ |
575 | + libgearman-server/job.c \ |
576 | + libgearman-server/packet.c \ |
577 | + libgearman-server/protocol_http.c \ |
578 | + libgearman-server/server.c \ |
579 | + libgearman-server/thread.c \ |
580 | + libgearman-server/worker.c |
581 | |
582 | -libgearman_server_la_CFLAGS= \ |
583 | +libgearman_server_libgearman_server_la_CFLAGS= \ |
584 | ${AM_CFLAGS} \ |
585 | -DBUILDING_LIBGEARMAN |
586 | |
587 | -libgearman_server_la_LDFLAGS= \ |
588 | +libgearman_server_libgearman_server_la_LDFLAGS= \ |
589 | + $(AM_LDFLAGS) \ |
590 | -version-info \ |
591 | - $(GEARMAN_SERVER_LIBRARY_VERSION) \ |
592 | - $(LD_VERSION_SCRIPT_SERVER) |
593 | + $(GEARMAN_SERVER_LIBRARY_VERSION) |
594 | |
595 | -libgearman_server_la_LIBADD= \ |
596 | - $(top_builddir)/libgearman/libgearman.la \ |
597 | +libgearman_server_libgearman_server_la_LIBADD= \ |
598 | + $(LTLIBDRIZZLE) \ |
599 | $(LTLIBEVENT) \ |
600 | - $(LTLIBDRIZZLE) \ |
601 | $(LTLIBMEMCACHED) \ |
602 | + $(LTLIBPQ) \ |
603 | $(LTLIBSQLITE3) \ |
604 | - $(LTLIBPQ) |
605 | - |
606 | -EXTRA_DIST= libgearman-server.ver |
607 | + libgearman/libgearman.la |
608 | |
609 | === removed file 'libgearman-server/libgearman-server.ver' |
610 | --- libgearman-server/libgearman-server.ver 2009-09-29 03:57:09 +0000 |
611 | +++ libgearman-server/libgearman-server.ver 1970-01-01 00:00:00 +0000 |
612 | @@ -1,1 +0,0 @@ |
613 | -libgearman_server_0 { global: *; }; |
614 | |
615 | === renamed file 'libgearman/Makefile.am' => 'libgearman/include.am' |
616 | --- libgearman/Makefile.am 2009-10-29 00:11:45 +0000 |
617 | +++ libgearman/include.am 2009-12-18 19:32:12 +0000 |
618 | @@ -1,49 +1,51 @@ |
619 | +# vim:ft=automake |
620 | # Gearman server and library |
621 | # Copyright (C) 2008 Brian Aker, Eric Day |
622 | +# Copyright (C) 2009 Brian Aker, Eric Day, Monty Taylor |
623 | # All rights reserved. |
624 | # |
625 | # Use and distribution licensed under the BSD license. See |
626 | # the COPYING file in the parent directory for full text. |
627 | - |
628 | -lib_LTLIBRARIES= libgearman.la |
629 | - |
630 | -libgearmanincludedir= ${includedir}/libgearman |
631 | - |
632 | -dist_libgearmaninclude_HEADERS= \ |
633 | - client.h \ |
634 | - conn.h \ |
635 | - constants.h \ |
636 | - gearman.h \ |
637 | - job.h \ |
638 | - packet.h \ |
639 | - structs.h \ |
640 | - task.h \ |
641 | - visibility.h \ |
642 | - worker.h |
643 | - |
644 | -noinst_HEADERS= \ |
645 | - common.h \ |
646 | - gearman_local.h |
647 | - |
648 | -libgearman_la_SOURCES= \ |
649 | - client.c \ |
650 | - conn.c \ |
651 | - gearman.c \ |
652 | - job.c \ |
653 | - packet.c \ |
654 | - task.c \ |
655 | - worker.c |
656 | - |
657 | -libgearman_la_CFLAGS= \ |
658 | +# |
659 | +# Included from Top Level Makefile.am |
660 | +# All paths should be given relative to the root |
661 | + |
662 | +lib_LTLIBRARIES+= libgearman/libgearman.la |
663 | + |
664 | +nobase_pkginclude_HEADERS += \ |
665 | + libgearman/client.h \ |
666 | + libgearman/conn.h \ |
667 | + libgearman/constants.h \ |
668 | + libgearman/gearman.h \ |
669 | + libgearman/job.h \ |
670 | + libgearman/packet.h \ |
671 | + libgearman/structs.h \ |
672 | + libgearman/task.h \ |
673 | + libgearman/visibility.h \ |
674 | + libgearman/worker.h |
675 | + |
676 | +noinst_HEADERS+= \ |
677 | + libgearman/common.h \ |
678 | + libgearman/gearman_local.h |
679 | + |
680 | +libgearman_libgearman_la_SOURCES= \ |
681 | + libgearman/client.c \ |
682 | + libgearman/conn.c \ |
683 | + libgearman/gearman.c \ |
684 | + libgearman/job.c \ |
685 | + libgearman/packet.c \ |
686 | + libgearman/task.c \ |
687 | + libgearman/worker.c |
688 | + |
689 | +libgearman_libgearman_la_CFLAGS= \ |
690 | ${AM_CFLAGS} \ |
691 | -DBUILDING_LIBGEARMAN |
692 | |
693 | -libgearman_la_LDFLAGS= \ |
694 | +libgearman_libgearman_la_LDFLAGS= \ |
695 | + $(AM_LDFLAGS) \ |
696 | -version-info \ |
697 | - $(GEARMAN_LIBRARY_VERSION) \ |
698 | - $(LD_VERSION_SCRIPT) |
699 | + $(GEARMAN_LIBRARY_VERSION) |
700 | |
701 | -libgearman_la_LIBADD= \ |
702 | +libgearman_libgearman_la_LIBADD= \ |
703 | $(LTLIBUUID) |
704 | |
705 | -EXTRA_DIST= libgearman.ver |
706 | |
707 | === removed file 'libgearman/libgearman.ver' |
708 | --- libgearman/libgearman.ver 2009-12-02 05:22:18 +0000 |
709 | +++ libgearman/libgearman.ver 1970-01-01 00:00:00 +0000 |
710 | @@ -1,1 +0,0 @@ |
711 | -libgearman_3 { global: *; }; |
712 | |
713 | === modified file 'm4/pandora_canonical.m4' |
714 | --- m4/pandora_canonical.m4 2009-10-20 18:30:03 +0000 |
715 | +++ m4/pandora_canonical.m4 2009-12-18 19:32:12 +0000 |
716 | @@ -4,7 +4,7 @@ |
717 | dnl with or without modifications, as long as this notice is preserved. |
718 | |
719 | dnl Which version of the canonical setup we're using |
720 | -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.63]) |
721 | +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.86]) |
722 | |
723 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
724 | dnl Force dependency tracking on for Sun Studio builds |
725 | @@ -24,6 +24,8 @@ |
726 | m4_define([PCT_IGNORE_SHARED_PTR],[no]) |
727 | m4_define([PCT_FORCE_GCC42],[no]) |
728 | m4_define([PCT_SRC_IN_SRC],[no]) |
729 | + m4_define([PCT_VERSION_FROM_VC],[no]) |
730 | + m4_define([PCT_USE_VISIBILITY],[yes]) |
731 | m4_foreach([pct_arg],[$*],[ |
732 | m4_case(pct_arg, |
733 | [use-gnulib], [ |
734 | @@ -42,9 +44,17 @@ |
735 | m4_undefine([PCT_FORCE_GCC42]) |
736 | m4_define([PCT_FORCE_GCC42],[yes]) |
737 | ], |
738 | + [skip-visibility], [ |
739 | + m4_undefine([PCT_USE_VISIBILITY]) |
740 | + m4_define([PCT_USE_VISIBILITY],[no]) |
741 | + ], |
742 | [src-in-src], [ |
743 | m4_undefine([PCT_SRC_IN_SRC]) |
744 | m4_define([PCT_SRC_IN_SRC],[yes]) |
745 | + ], |
746 | + [version-from-vc], [ |
747 | + m4_undefine([PCT_VERSION_FROM_VC]) |
748 | + m4_define([PCT_VERSION_FROM_VC],[yes]) |
749 | ]) |
750 | ]) |
751 | |
752 | @@ -58,7 +68,7 @@ |
753 | |
754 | AC_CANONICAL_TARGET |
755 | |
756 | - AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects) |
757 | + AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects foreign) |
758 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
759 | |
760 | m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ]) |
761 | @@ -67,6 +77,11 @@ |
762 | AC_REQUIRE([PANDORA_MAC_GCC42]) |
763 | AC_REQUIRE([PANDORA_64BIT]) |
764 | |
765 | + m4_if(PCT_VERSION_FROM_VC,yes,[ |
766 | + PANDORA_VC_VERSION |
767 | + ]) |
768 | + PANDORA_VERSION |
769 | + |
770 | dnl Once we can use a modern autoconf, we can use this |
771 | dnl AC_PROG_CC_C99 |
772 | AC_REQUIRE([AC_PROG_CXX]) |
773 | @@ -90,6 +105,7 @@ |
774 | AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ |
775 | AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) |
776 | ]) |
777 | + |
778 | ]) |
779 | |
780 | PANDORA_SHARED_PTR |
781 | @@ -104,6 +120,9 @@ |
782 | AC_CONFIG_LIBOBJ_DIR([gnulib]) |
783 | ]) |
784 | |
785 | + PANDORA_CHECK_C_VERSION |
786 | + PANDORA_CHECK_CXX_VERSION |
787 | + |
788 | AC_C_BIGENDIAN |
789 | AC_C_CONST |
790 | AC_C_INLINE |
791 | @@ -114,17 +133,71 @@ |
792 | AC_TYPE_SIZE_T |
793 | AC_SYS_LARGEFILE |
794 | |
795 | - |
796 | - PANDORA_CHECK_C_VERSION |
797 | - PANDORA_CHECK_CXX_VERSION |
798 | + # off_t is not a builtin type |
799 | + AC_CHECK_SIZEOF(off_t, 4) |
800 | + AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[ |
801 | + AC_MSG_ERROR("${PACKAGE} needs an off_t type.") |
802 | + ]) |
803 | + |
804 | + AC_CHECK_SIZEOF(size_t) |
805 | + AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[ |
806 | + AC_MSG_ERROR("${PACKAGE} needs an size_t type.") |
807 | + ]) |
808 | + |
809 | + AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()]) |
810 | + AC_CHECK_SIZEOF(long long) |
811 | + AC_DEFINE_UNQUOTED([SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()]) |
812 | + AC_CACHE_CHECK([if time_t is unsigned], [ac_cv_time_t_unsigned],[ |
813 | + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
814 | + [[ |
815 | +#include <time.h> |
816 | + ]], |
817 | + [[ |
818 | + int array[(((time_t)-1) > 0) ? 1 : -1]; |
819 | + ]]) |
820 | + ],[ |
821 | + ac_cv_time_t_unsigned=yes |
822 | + ],[ |
823 | + ac_cv_time_t_unsigned=no |
824 | + ]) |
825 | + ]) |
826 | + AS_IF([test "$ac_cv_time_t_unsigned" = "yes"],[ |
827 | + AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) |
828 | + ]) |
829 | + |
830 | + dnl AC_FUNC_ALLOCA would test for stack direction if we didn't have a working |
831 | + dnl alloca - but we need to know it anyway for check_stack_overrun. |
832 | + PANDORA_STACK_DIRECTION |
833 | + |
834 | + AC_CHECK_LIBM |
835 | + |
836 | + AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)]) |
837 | + AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)]) |
838 | + |
839 | + |
840 | |
841 | PANDORA_OPTIMIZE |
842 | |
843 | - dnl We need to inject error into the cflags to test if visibility works or not |
844 | - save_CFLAGS="${CFLAGS}" |
845 | - CFLAGS="${CFLAGS} -Werror" |
846 | - gl_VISIBILITY |
847 | - CFLAGS="${save_CFLAGS}" |
848 | + AC_LANG_PUSH(C++) |
849 | + # Test whether madvise() is declared in C++ code -- it is not on some |
850 | + # systems, such as Solaris |
851 | + AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[ |
852 | + #if HAVE_SYS_MMAN_H |
853 | + #include <sys/types.h> |
854 | + #include <sys/mman.h> |
855 | + #endif |
856 | + ]]) |
857 | + AC_LANG_POP() |
858 | + |
859 | + PANDORA_HAVE_GCC_ATOMICS |
860 | + |
861 | + m4_if(PCT_USE_VISIBILITY,[yes],[ |
862 | + dnl We need to inject error into the cflags to test if visibility works or not |
863 | + save_CFLAGS="${CFLAGS}" |
864 | + CFLAGS="${CFLAGS} -Werror" |
865 | + gl_VISIBILITY |
866 | + CFLAGS="${save_CFLAGS}" |
867 | + ]) |
868 | |
869 | PANDORA_HEADER_ASSERT |
870 | |
871 | |
872 | === modified file 'm4/pandora_check_cxx_standard.m4' |
873 | --- m4/pandora_check_cxx_standard.m4 2009-07-08 07:19:19 +0000 |
874 | +++ m4/pandora_check_cxx_standard.m4 2009-12-18 19:32:13 +0000 |
875 | @@ -8,9 +8,16 @@ |
876 | AS_IF([test "$GCC" = "yes"], |
877 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[], |
878 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"], |
879 | - [CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"], |
880 | - [CXXFLAGS="-std=gnu++98"]) |
881 | + [CXX_STANDARD="-std=gnu++0x"], |
882 | + [CXX_STANDARD="-std=gnu++98"]) |
883 | ]) |
884 | ]) |
885 | + AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}" |
886 | + |
887 | + save_CXXFLAGS="${CXXFLAGS}" |
888 | + CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}" |
889 | AC_CXX_HEADER_STDCXX_98 |
890 | + CXXFLAGS="${save_CXXFLAGS}" |
891 | + |
892 | + AC_SUBST([CXX_STANDARD]) |
893 | ]) |
894 | |
895 | === added file 'm4/pandora_cinttypes.m4' |
896 | --- m4/pandora_cinttypes.m4 1970-01-01 00:00:00 +0000 |
897 | +++ m4/pandora_cinttypes.m4 2009-12-18 19:32:12 +0000 |
898 | @@ -0,0 +1,34 @@ |
899 | +# We check two things: where the include file is for cinttypes. We |
900 | +# include AC_TRY_COMPILE for all the combinations we've seen in the |
901 | +# wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or |
902 | +# HAVE_BOOST_CINTTYPES depending |
903 | +# on location. |
904 | + |
905 | +AC_DEFUN([PANDORA_CXX_CINTTYPES], |
906 | + [AC_REQUIRE([PANDORA_CXX_CSTDINT]) |
907 | + AC_MSG_CHECKING(the location of cinttypes) |
908 | + AC_LANG_PUSH(C++) |
909 | + save_CXXFLAGS="${CXXFLAGS}" |
910 | + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" |
911 | + ac_cv_cxx_cinttypes="" |
912 | + for location in tr1/cinttypes boost/cinttypes cinttypes; do |
913 | + if test -z "$ac_cv_cxx_cinttypes"; then |
914 | + AC_TRY_COMPILE([#include $ac_cv_cxx_cstdint; |
915 | + #include <$location>], |
916 | + [uint32_t foo= UINT32_C(1)], |
917 | + [ac_cv_cxx_cinttypes="<$location>";]) |
918 | + fi |
919 | + done |
920 | + AC_LANG_POP() |
921 | + CXXFLAGS="${save_CXXFLAGS}" |
922 | + if test -n "$ac_cv_cxx_cinttypes"; then |
923 | + AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) |
924 | + else |
925 | + ac_cv_cxx_cinttypes="<inttypes.h>" |
926 | + AC_MSG_RESULT() |
927 | + AC_MSG_WARN([Could not find a cinttypes header.]) |
928 | + fi |
929 | + AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++]) |
930 | + AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes, |
931 | + [the location of <cinttypes>]) |
932 | +]) |
933 | |
934 | === added file 'm4/pandora_cstdint.m4' |
935 | --- m4/pandora_cstdint.m4 1970-01-01 00:00:00 +0000 |
936 | +++ m4/pandora_cstdint.m4 2009-12-18 19:32:12 +0000 |
937 | @@ -0,0 +1,33 @@ |
938 | +# We check two things: where the include file is for cstdint. We |
939 | +# include AC_TRY_COMPILE for all the combinations we've seen in the |
940 | +# wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or |
941 | +# HAVE_BOOST_CSTDINT depending |
942 | +# on location. |
943 | + |
944 | +AC_DEFUN([PANDORA_CXX_CSTDINT], |
945 | + [AC_MSG_CHECKING(the location of cstdint) |
946 | + AC_LANG_PUSH(C++) |
947 | + save_CXXFLAGS="${CXXFLAGS}" |
948 | + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" |
949 | + ac_cv_cxx_cstdint="" |
950 | + for location in tr1/cstdint boost/cstdint cstdint; do |
951 | + if test -z "$ac_cv_cxx_cstdint"; then |
952 | + AC_TRY_COMPILE([#include <$location>], |
953 | + [uint32_t t], |
954 | + [ac_cv_cxx_cstdint="<$location>";]) |
955 | + fi |
956 | + done |
957 | + AC_LANG_POP() |
958 | + CXXFLAGS="${save_CXXFLAGS}" |
959 | + if test -n "$ac_cv_cxx_cstdint"; then |
960 | + AC_MSG_RESULT([$ac_cv_cxx_cstdint]) |
961 | + else |
962 | + AC_DEFINE([__STDC_CONSTANT_MACROS],[1],[Use STDC Constant Macros in C++]) |
963 | + AC_DEFINE([__STDC_FORMAT_MACROS],[1],[Use STDC Format Macros in C++]) |
964 | + ac_cv_cxx_cstdint="<stdint.h>" |
965 | + AC_MSG_RESULT() |
966 | + AC_MSG_WARN([Could not find a cstdint header.]) |
967 | + fi |
968 | + AC_DEFINE_UNQUOTED(CSTDINT_H,$ac_cv_cxx_cstdint, |
969 | + [the location of <cstdint>]) |
970 | +]) |
971 | |
972 | === added file 'm4/pandora_cxx_demangle.m4' |
973 | --- m4/pandora_cxx_demangle.m4 1970-01-01 00:00:00 +0000 |
974 | +++ m4/pandora_cxx_demangle.m4 2009-12-18 19:32:12 +0000 |
975 | @@ -0,0 +1,27 @@ |
976 | +dnl Copyright (C) 2009 Sun Microsystems |
977 | +dnl This file is free software; Sun Microsystems |
978 | +dnl gives unlimited permission to copy and/or distribute it, |
979 | +dnl with or without modifications, as long as this notice is preserved. |
980 | + |
981 | +dnl Check for all of the headers and libs that Drizzle needs. We check all |
982 | +dnl of these for plugins too, to ensure that all of the appropriate defines |
983 | +dnl are set. |
984 | + |
985 | +AC_DEFUN([PANDORA_CXX_DEMANGLE],[ |
986 | + AC_LANG_PUSH([C++]) |
987 | + save_CXXFLAGS="${CXXFLAGS}" |
988 | + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" |
989 | + AC_CHECK_HEADERS(cxxabi.h) |
990 | + AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle, |
991 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[ |
992 | + char *foo= 0; int bar= 0; |
993 | + foo= abi::__cxa_demangle(foo, foo, 0, &bar); |
994 | + ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])]) |
995 | + CXXFLAGS="${save_CXXFLAGS}" |
996 | + AC_LANG_POP() |
997 | + |
998 | + AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[ |
999 | + AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1, |
1000 | + [Define to 1 if you have the `abi::__cxa_demangle' function.]) |
1001 | + ]) |
1002 | +]) |
1003 | |
1004 | === added file 'm4/pandora_drizzle_build.m4' |
1005 | --- m4/pandora_drizzle_build.m4 1970-01-01 00:00:00 +0000 |
1006 | +++ m4/pandora_drizzle_build.m4 2009-12-18 19:32:12 +0000 |
1007 | @@ -0,0 +1,98 @@ |
1008 | +dnl Copyright (C) 2009 Sun Microsystems |
1009 | +dnl This file is free software; Sun Microsystems |
1010 | +dnl gives unlimited permission to copy and/or distribute it, |
1011 | +dnl with or without modifications, as long as this notice is preserved. |
1012 | + |
1013 | +dnl Check for all of the headers and libs that Drizzle needs. We check all |
1014 | +dnl of these for plugins too, to ensure that all of the appropriate defines |
1015 | +dnl are set. |
1016 | + |
1017 | +AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ |
1018 | + |
1019 | + dnl We need to turn on our CXXFLAGS to make sure it shows up correctly |
1020 | + PANDORA_CXX_STL_HASH |
1021 | + |
1022 | + PANDORA_CXX_CSTDINT |
1023 | + PANDORA_CXX_CINTTYPES |
1024 | + |
1025 | + AC_STRUCT_TM |
1026 | + |
1027 | + AC_FUNC_ALLOCA |
1028 | + AC_FUNC_UTIME_NULL |
1029 | + AC_FUNC_VPRINTF |
1030 | + |
1031 | + PANDORA_WORKING_FDATASYNC |
1032 | + |
1033 | + AC_CHECK_FUNCS(\ |
1034 | + gethrtime \ |
1035 | + setupterm \ |
1036 | + backtrace \ |
1037 | + backtrace_symbols \ |
1038 | + backtrace_symbols_fd) |
1039 | + |
1040 | + AC_HEADER_STAT |
1041 | + AC_HEADER_DIRENT |
1042 | + AC_HEADER_STDC |
1043 | + AC_HEADER_SYS_WAIT |
1044 | + AC_HEADER_STDBOOL |
1045 | + |
1046 | + AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h) |
1047 | + AC_CHECK_HEADERS(select.h sys/select.h) |
1048 | + AC_CHECK_HEADERS(utime.h sys/utime.h ) |
1049 | + AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h) |
1050 | + AC_CHECK_HEADERS(sched.h) |
1051 | + AC_CHECK_HEADERS(sys/prctl.h) |
1052 | + AC_CHECK_HEADERS(execinfo.h) |
1053 | + AC_CHECK_HEADERS(locale.h) |
1054 | + AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h) |
1055 | + AC_CHECK_HEADERS(paths.h) |
1056 | + |
1057 | + |
1058 | + #-------------------------------------------------------------------- |
1059 | + # Check for system libraries. Adds the library to $LIBS |
1060 | + # and defines HAVE_LIBM etc |
1061 | + #-------------------------------------------------------------------- |
1062 | + |
1063 | + # For the sched_yield() function on Solaris |
1064 | + AC_CHECK_FUNC(sched_yield, [], |
1065 | + [AC_CHECK_LIB(posix4, [sched_yield], |
1066 | + [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])]) |
1067 | + |
1068 | + AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[ |
1069 | + AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)]) |
1070 | + ]) |
1071 | + |
1072 | + AC_CHECK_HEADERS([curses.h term.h],[],[],[[ |
1073 | + #ifdef HAVE_CURSES_H |
1074 | + # include <curses.h> |
1075 | + #endif |
1076 | + ]]) |
1077 | + AC_CHECK_TYPES([uint, ulong]) |
1078 | + |
1079 | + PANDORA_CXX_DEMANGLE |
1080 | + |
1081 | + AH_TOP([ |
1082 | +#ifndef __CONFIG_H__ |
1083 | +#define __CONFIG_H__ |
1084 | + |
1085 | +#if defined(i386) && !defined(__i386__) |
1086 | +#define __i386__ |
1087 | +#endif |
1088 | + |
1089 | + ]) |
1090 | + AH_BOTTOM([ |
1091 | +#if defined(__cplusplus) |
1092 | +# include CSTDINT_H |
1093 | +# include CINTTYPES_H |
1094 | +#else |
1095 | +# include <stdint.h> |
1096 | +# include <inttypes.h> |
1097 | +#endif |
1098 | + |
1099 | +#if !defined(HAVE_ULONG) && !defined(__USE_MISC) |
1100 | +typedef unsigned long int ulong; |
1101 | +#endif |
1102 | + |
1103 | +#endif /* __CONFIG_H__ */ |
1104 | + ]) |
1105 | +]) |
1106 | |
1107 | === added file 'm4/pandora_fdatasync.m4' |
1108 | --- m4/pandora_fdatasync.m4 1970-01-01 00:00:00 +0000 |
1109 | +++ m4/pandora_fdatasync.m4 2009-12-18 19:32:13 +0000 |
1110 | @@ -0,0 +1,25 @@ |
1111 | +dnl Copyright (C) 2009 Sun Microsystems |
1112 | +dnl This file is free software; Sun Microsystems |
1113 | +dnl gives unlimited permission to copy and/or distribute it, |
1114 | +dnl with or without modifications, as long as this notice is preserved. |
1115 | + |
1116 | +#-------------------------------------------------------------------- |
1117 | +# Check for a working fdatasync call |
1118 | +#-------------------------------------------------------------------- |
1119 | + |
1120 | + |
1121 | +AC_DEFUN([PANDORA_WORKING_FDATASYNC],[ |
1122 | + AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[ |
1123 | + AC_LANG_PUSH(C++) |
1124 | + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
1125 | +#include <unistd.h> |
1126 | + ]],[[ |
1127 | +fdatasync(4); |
1128 | + ]])], |
1129 | + [ac_cv_func_fdatasync=yes], |
1130 | + [ac_cv_func_fdatasync=no]) |
1131 | + AC_LANG_POP() |
1132 | + ]) |
1133 | + AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"], |
1134 | + [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])]) |
1135 | +]) |
1136 | \ No newline at end of file |
1137 | |
1138 | === modified file 'm4/pandora_have_better_malloc.m4' |
1139 | --- m4/pandora_have_better_malloc.m4 2009-08-06 22:01:19 +0000 |
1140 | +++ m4/pandora_have_better_malloc.m4 2009-12-18 19:32:12 +0000 |
1141 | @@ -60,3 +60,8 @@ |
1142 | AC_SUBST([BETTER_MALLOC_LIBS]) |
1143 | |
1144 | ]) |
1145 | + |
1146 | +AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[ |
1147 | + AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC]) |
1148 | + LIBS="${LIBS} ${BETTER_MALLOC_LIBS}" |
1149 | +]) |
1150 | \ No newline at end of file |
1151 | |
1152 | === added file 'm4/pandora_have_gcc_atomics.m4' |
1153 | --- m4/pandora_have_gcc_atomics.m4 1970-01-01 00:00:00 +0000 |
1154 | +++ m4/pandora_have_gcc_atomics.m4 2009-12-18 19:32:12 +0000 |
1155 | @@ -0,0 +1,37 @@ |
1156 | +dnl Copyright (C) 2009 Sun Microsystems |
1157 | +dnl This file is free software; Sun Microsystems |
1158 | +dnl gives unlimited permission to copy and/or distribute it, |
1159 | +dnl with or without modifications, as long as this notice is preserved. |
1160 | + |
1161 | +#-------------------------------------------------------------------- |
1162 | +# Check for GCC Atomic Support |
1163 | +#-------------------------------------------------------------------- |
1164 | + |
1165 | + |
1166 | +AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[ |
1167 | + |
1168 | + AC_CACHE_CHECK( |
1169 | + [whether the compiler provides atomic builtins], |
1170 | + [ac_cv_gcc_atomic_builtins], |
1171 | + [AC_RUN_IFELSE( |
1172 | + [AC_LANG_PROGRAM([],[[ |
1173 | + int foo= -10; int bar= 10; |
1174 | + if (!__sync_fetch_and_add(&foo, bar) || foo) |
1175 | + return -1; |
1176 | + bar= __sync_lock_test_and_set(&foo, bar); |
1177 | + if (bar || foo != 10) |
1178 | + return -1; |
1179 | + bar= __sync_val_compare_and_swap(&bar, foo, 15); |
1180 | + if (bar) |
1181 | + return -1; |
1182 | + return 0; |
1183 | + ]])], |
1184 | + [ac_cv_gcc_atomic_builtins=yes], |
1185 | + [ac_cv_gcc_atomic_builtins=no])]) |
1186 | + |
1187 | + AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[ |
1188 | + AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1, |
1189 | + [Define to 1 if compiler provides atomic builtins.]) |
1190 | + ]) |
1191 | + |
1192 | +]) |
1193 | \ No newline at end of file |
1194 | |
1195 | === added file 'm4/pandora_have_libavahi.m4' |
1196 | --- m4/pandora_have_libavahi.m4 1970-01-01 00:00:00 +0000 |
1197 | +++ m4/pandora_have_libavahi.m4 2009-12-18 19:32:12 +0000 |
1198 | @@ -0,0 +1,41 @@ |
1199 | +dnl Copyright (C) 2009 Sun Microsystems |
1200 | +dnl This file is free software; Sun Microsystems |
1201 | +dnl gives unlimited permission to copy and/or distribute it, |
1202 | +dnl with or without modifications, as long as this notice is preserved. |
1203 | + |
1204 | +AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[ |
1205 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1206 | + |
1207 | + dnl -------------------------------------------------------------------- |
1208 | + dnl Check for libavahi |
1209 | + dnl -------------------------------------------------------------------- |
1210 | + |
1211 | + AC_ARG_ENABLE([libavahi], |
1212 | + [AS_HELP_STRING([--disable-libavahi], |
1213 | + [Build with libavahi support @<:@default=on@:>@])], |
1214 | + [ac_enable_libavahi="$enableval"], |
1215 | + [ac_enable_libavahi="yes"]) |
1216 | + |
1217 | + AS_IF([test "x$ac_enable_libavahi" = "xyes"],[ |
1218 | + AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[ |
1219 | + #include <avahi-client/client.h> |
1220 | + #include <avahi-common/simple-watch.h> |
1221 | + ],[ |
1222 | + AvahiSimplePoll *simple_poll= avahi_simple_poll_new(); |
1223 | + ]) |
1224 | + ],[ |
1225 | + ac_cv_libavahi="no" |
1226 | + ]) |
1227 | + |
1228 | + AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"]) |
1229 | +]) |
1230 | + |
1231 | +AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[ |
1232 | + AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) |
1233 | +]) |
1234 | + |
1235 | +AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[ |
1236 | + AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) |
1237 | + AS_IF([test "x${ac_cv_libavahi}" = "xno"], |
1238 | + AC_MSG_ERROR([libavahi is required for ${PACKAGE}])) |
1239 | +]) |
1240 | |
1241 | === added file 'm4/pandora_have_libbdb.m4' |
1242 | --- m4/pandora_have_libbdb.m4 1970-01-01 00:00:00 +0000 |
1243 | +++ m4/pandora_have_libbdb.m4 2009-12-18 19:32:12 +0000 |
1244 | @@ -0,0 +1,40 @@ |
1245 | +dnl Copyright (C) 2009 Sun Microsystems |
1246 | +dnl This file is free software; Sun Microsystems |
1247 | +dnl gives unlimited permission to copy and/or distribute it, |
1248 | +dnl with or without modifications, as long as this notice is preserved. |
1249 | + |
1250 | +AC_DEFUN([_PANDORA_SEARCH_LIBBDB],[ |
1251 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1252 | + |
1253 | + dnl -------------------------------------------------------------------- |
1254 | + dnl Check for bekerely db |
1255 | + dnl -------------------------------------------------------------------- |
1256 | + |
1257 | + AC_ARG_ENABLE([libbdb], |
1258 | + [AS_HELP_STRING([--disable-libbdb], |
1259 | + [Build with libbdb support @<:@default=on@:>@])], |
1260 | + [ac_enable_libbdb="$enableval"], |
1261 | + [ac_enable_libbdb="yes"]) |
1262 | + |
1263 | + AS_IF([test "x$ac_enable_libbdb" = "xyes"],[ |
1264 | + AC_LIB_HAVE_LINKFLAGS(db,,[ |
1265 | + #include <db.h> |
1266 | + ],[ |
1267 | + const char *test= DB_VERSION_STRING; |
1268 | + ]) |
1269 | + ],[ |
1270 | + ac_cv_libbdb="no" |
1271 | + ]) |
1272 | + |
1273 | + AM_CONDITIONAL(HAVE_LIBBDB, [test "x${ac_cv_libbdb}" = "xyes"]) |
1274 | +]) |
1275 | + |
1276 | +AC_DEFUN([PANDORA_HAVE_LIBBDB],[ |
1277 | + AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) |
1278 | +]) |
1279 | + |
1280 | +AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[ |
1281 | + AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) |
1282 | + AS_IF([test "x${ac_cv_libbdb}" = "xno"], |
1283 | + AC_MSG_ERROR([libbdb is required for ${PACKAGE}])) |
1284 | +]) |
1285 | |
1286 | === added file 'm4/pandora_have_libdl.m4' |
1287 | --- m4/pandora_have_libdl.m4 1970-01-01 00:00:00 +0000 |
1288 | +++ m4/pandora_have_libdl.m4 2009-12-18 19:32:12 +0000 |
1289 | @@ -0,0 +1,51 @@ |
1290 | +dnl Copyright (C) 2009 Sun Microsystems |
1291 | +dnl This file is free software; Sun Microsystems |
1292 | +dnl gives unlimited permission to copy and/or distribute it, |
1293 | +dnl with or without modifications, as long as this notice is preserved. |
1294 | + |
1295 | +#-------------------------------------------------------------------- |
1296 | +# Check for libdl |
1297 | +#-------------------------------------------------------------------- |
1298 | + |
1299 | + |
1300 | +AC_DEFUN([_PANDORA_SEARCH_LIBDL],[ |
1301 | + |
1302 | + save_LIBS="$LIBS" |
1303 | + LIBS="" |
1304 | + AC_CHECK_LIB(dl,dlopen) |
1305 | + AC_CHECK_FUNCS(dlopen) |
1306 | + LIBDL_LIBS="$LIBS" |
1307 | + LIBS="$my_save_LIBS" |
1308 | + AC_SUBST(LIBDL_LIBS) |
1309 | + |
1310 | + AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"]) |
1311 | +]) |
1312 | + |
1313 | +AC_DEFUN([_PANDORA_HAVE_LIBDL],[ |
1314 | + |
1315 | + AC_ARG_ENABLE([libdl], |
1316 | + [AS_HELP_STRING([--disable-libdl], |
1317 | + [Build with libdl support @<:@default=on@:>@])], |
1318 | + [ac_enable_libdl="$enableval"], |
1319 | + [ac_enable_libdl="yes"]) |
1320 | + |
1321 | + _PANDORA_SEARCH_LIBDL |
1322 | +]) |
1323 | + |
1324 | + |
1325 | +AC_DEFUN([PANDORA_HAVE_LIBDL],[ |
1326 | + AC_REQUIRE([_PANDORA_HAVE_LIBDL]) |
1327 | +]) |
1328 | + |
1329 | +AC_DEFUN([_PANDORA_REQUIRE_LIBDL],[ |
1330 | + ac_enable_libdl="yes" |
1331 | + _PANDORA_SEARCH_LIBDL |
1332 | + |
1333 | + AS_IF([test "$ac_cv_func_dlopen" != "yes"],[ |
1334 | + AC_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.]) |
1335 | + ]) |
1336 | +]) |
1337 | + |
1338 | +AC_DEFUN([PANDORA_REQUIRE_LIBDL],[ |
1339 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBDL]) |
1340 | +]) |
1341 | |
1342 | === added file 'm4/pandora_have_libevent.m4' |
1343 | --- m4/pandora_have_libevent.m4 1970-01-01 00:00:00 +0000 |
1344 | +++ m4/pandora_have_libevent.m4 2009-12-18 19:32:12 +0000 |
1345 | @@ -0,0 +1,66 @@ |
1346 | +dnl Copyright (C) 2009 Sun Microsystems |
1347 | +dnl This file is free software; Sun Microsystems |
1348 | +dnl gives unlimited permission to copy and/or distribute it, |
1349 | +dnl with or without modifications, as long as this notice is preserved. |
1350 | + |
1351 | +#-------------------------------------------------------------------- |
1352 | +# Check for libevent |
1353 | +#-------------------------------------------------------------------- |
1354 | + |
1355 | + |
1356 | +AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[ |
1357 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1358 | + |
1359 | + AC_LIB_HAVE_LINKFLAGS(event,, |
1360 | + [ |
1361 | + #include <sys/types.h> |
1362 | + #include <sys/time.h> |
1363 | + #include <stdlib.h> |
1364 | + #include <event.h> |
1365 | + ],[ |
1366 | + struct bufferevent bev; |
1367 | + bufferevent_settimeout(&bev, 1, 1); |
1368 | + event_init(); |
1369 | + event_loop(EVLOOP_ONCE); |
1370 | + ]) |
1371 | + |
1372 | + AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"]) |
1373 | + |
1374 | + AS_IF([test "x${ac_cv_libevent}" = "xyes"],[ |
1375 | + save_LIBS="${LIBS}" |
1376 | + LIBS="${LIBS} ${LTLIBEVENT}" |
1377 | + AC_CHECK_FUNCS(event_base_new) |
1378 | + AC_CHECK_FUNCS(event_base_free) |
1379 | + AC_CHECK_FUNCS(event_base_get_method) |
1380 | + LIBS="$save_LIBS" |
1381 | + ]) |
1382 | +]) |
1383 | + |
1384 | +AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[ |
1385 | + |
1386 | + AC_ARG_ENABLE([libevent], |
1387 | + [AS_HELP_STRING([--disable-libevent], |
1388 | + [Build with libevent support @<:@default=on@:>@])], |
1389 | + [ac_enable_libevent="$enableval"], |
1390 | + [ac_enable_libevent="yes"]) |
1391 | + |
1392 | + _PANDORA_SEARCH_LIBEVENT |
1393 | +]) |
1394 | + |
1395 | + |
1396 | +AC_DEFUN([PANDORA_HAVE_LIBEVENT],[ |
1397 | + AC_REQUIRE([_PANDORA_HAVE_LIBEVENT]) |
1398 | +]) |
1399 | + |
1400 | +AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[ |
1401 | + ac_enable_libevent="yes" |
1402 | + _PANDORA_SEARCH_LIBEVENT |
1403 | + |
1404 | + AS_IF([test x$ac_cv_libevent = xno],[ |
1405 | + AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.]) |
1406 | + ]) |
1407 | +]) |
1408 | + |
1409 | +AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[ |
1410 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT]) |
1411 | +]) |
1412 | |
1413 | === modified file 'm4/pandora_have_libgearman.m4' |
1414 | --- m4/pandora_have_libgearman.m4 2009-07-29 18:13:26 +0000 |
1415 | +++ m4/pandora_have_libgearman.m4 2009-12-18 19:32:12 +0000 |
1416 | @@ -21,7 +21,7 @@ |
1417 | #include <libgearman/gearman.h> |
1418 | ],[ |
1419 | gearman_client_st gearman_client; |
1420 | - gearman_version(); |
1421 | + gearman_client_context(&gearman_client); |
1422 | ]) |
1423 | ],[ |
1424 | ac_cv_libgearman="no" |
1425 | @@ -37,5 +37,5 @@ |
1426 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ |
1427 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) |
1428 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], |
1429 | - AC_MSG_ERROR([libgearman is required for ${PACKAGE}])) |
1430 | + AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}])) |
1431 | ]) |
1432 | |
1433 | === modified file 'm4/pandora_have_libmemcached.m4' |
1434 | --- m4/pandora_have_libmemcached.m4 2009-08-06 22:12:44 +0000 |
1435 | +++ m4/pandora_have_libmemcached.m4 2009-12-18 19:32:13 +0000 |
1436 | @@ -30,7 +30,6 @@ |
1437 | |
1438 | AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) |
1439 | |
1440 | - AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ]) |
1441 | ]) |
1442 | |
1443 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ |
1444 | |
1445 | === added file 'm4/pandora_have_libpcre.m4' |
1446 | --- m4/pandora_have_libpcre.m4 1970-01-01 00:00:00 +0000 |
1447 | +++ m4/pandora_have_libpcre.m4 2009-12-18 19:32:12 +0000 |
1448 | @@ -0,0 +1,73 @@ |
1449 | +dnl Copyright (C) 2009 Sun Microsystems |
1450 | +dnl This file is free software; Sun Microsystems |
1451 | +dnl gives unlimited permission to copy and/or distribute it, |
1452 | +dnl with or without modifications, as long as this notice is preserved. |
1453 | + |
1454 | +#-------------------------------------------------------------------- |
1455 | +# Check for libpcre |
1456 | +#-------------------------------------------------------------------- |
1457 | + |
1458 | + |
1459 | +AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[ |
1460 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1461 | + |
1462 | + AC_LIB_HAVE_LINKFLAGS(pcre,, |
1463 | + [#include <pcre.h>], |
1464 | + [ |
1465 | + pcre *re= NULL; |
1466 | + pcre_version(); |
1467 | + ]) |
1468 | + AS_IF([test "x$ac_cv_libpcre" = "xno"], |
1469 | + [ |
1470 | + unset ac_cv_libpcre |
1471 | + unset HAVE_LIBPCRE |
1472 | + unset LIBPCRE |
1473 | + unset LIBPCRE_PREFIX |
1474 | + unset LTLIBPCRE |
1475 | + AC_LIB_HAVE_LINKFLAGS(pcre,, |
1476 | + [#include <pcre/pcre.h>], |
1477 | + [ |
1478 | + pcre *re= NULL; |
1479 | + pcre_version(); |
1480 | + ]) |
1481 | + AS_IF([test "x$ac_cv_libpcre" = "xyes"], [ |
1482 | + ac_cv_pcre_location="<pcre/pcre.h>" |
1483 | + ]) |
1484 | + ],[ |
1485 | + ac_cv_pcre_location="<pcre.h>" |
1486 | + ]) |
1487 | + |
1488 | + AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"]) |
1489 | +]) |
1490 | + |
1491 | +AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[ |
1492 | + |
1493 | + AC_ARG_ENABLE([libpcre], |
1494 | + [AS_HELP_STRING([--disable-libpcre], |
1495 | + [Build with libpcre support @<:@default=on@:>@])], |
1496 | + [ac_enable_libpcre="$enableval"], |
1497 | + [ac_enable_libpcre="yes"]) |
1498 | + |
1499 | + _PANDORA_SEARCH_LIBPCRE |
1500 | +]) |
1501 | + |
1502 | + |
1503 | +AC_DEFUN([PANDORA_HAVE_LIBPCRE],[ |
1504 | + AC_REQUIRE([_PANDORA_HAVE_LIBPCRE]) |
1505 | +]) |
1506 | + |
1507 | +AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[ |
1508 | + ac_enable_libpcre="yes" |
1509 | + _PANDORA_SEARCH_LIBPCRE |
1510 | + |
1511 | + AS_IF([test x$ac_cv_libpcre = xno],[ |
1512 | + AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.]) |
1513 | + ],[ |
1514 | + AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}], |
1515 | + [Location of pcre header]) |
1516 | + ]) |
1517 | +]) |
1518 | + |
1519 | +AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[ |
1520 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE]) |
1521 | +]) |
1522 | |
1523 | === added file 'm4/pandora_have_libreadline.m4' |
1524 | --- m4/pandora_have_libreadline.m4 1970-01-01 00:00:00 +0000 |
1525 | +++ m4/pandora_have_libreadline.m4 2009-12-18 19:32:12 +0000 |
1526 | @@ -0,0 +1,242 @@ |
1527 | +# |
1528 | +# SYNOPSIS |
1529 | +# |
1530 | +# PANDORA_HAVE_LIBREADLINE |
1531 | +# |
1532 | +# DESCRIPTION |
1533 | +# |
1534 | +# Searches for a readline compatible library. If found, defines |
1535 | +# `HAVE_LIBREADLINE'. If the found library has the `add_history' |
1536 | +# function, sets also `HAVE_READLINE_HISTORY'. Also checks for the |
1537 | +# locations of the necessary include files and sets `HAVE_READLINE_H' |
1538 | +# or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or |
1539 | +# 'HAVE_HISTORY_H' if the corresponding include files exists. |
1540 | +# |
1541 | +# The libraries that may be readline compatible are `libedit', |
1542 | +# `libeditline' and `libreadline'. Sometimes we need to link a |
1543 | +# termcap library for readline to work, this macro tests these cases |
1544 | +# too by trying to link with `libtermcap', `libcurses' or |
1545 | +# `libncurses' before giving up. |
1546 | +# |
1547 | +# Here is an example of how to use the information provided by this |
1548 | +# macro to perform the necessary includes or declarations in a C |
1549 | +# file: |
1550 | +# |
1551 | +# #ifdef HAVE_LIBREADLINE |
1552 | +# # if defined(HAVE_READLINE_READLINE_H) |
1553 | +# # include <readline/readline.h> |
1554 | +# # elif defined(HAVE_READLINE_H) |
1555 | +# # include <readline.h> |
1556 | +# # else /* !defined(HAVE_READLINE_H) */ |
1557 | +# extern char *readline (); |
1558 | +# # endif /* !defined(HAVE_READLINE_H) */ |
1559 | +# char *cmdline = NULL; |
1560 | +# #else /* !defined(HAVE_READLINE_READLINE_H) */ |
1561 | +# /* no readline */ |
1562 | +# #endif /* HAVE_LIBREADLINE */ |
1563 | +# |
1564 | +# #ifdef HAVE_READLINE_HISTORY |
1565 | +# # if defined(HAVE_READLINE_HISTORY_H) |
1566 | +# # include <readline/history.h> |
1567 | +# # elif defined(HAVE_HISTORY_H) |
1568 | +# # include <history.h> |
1569 | +# # else /* !defined(HAVE_HISTORY_H) */ |
1570 | +# extern void add_history (); |
1571 | +# extern int write_history (); |
1572 | +# extern int read_history (); |
1573 | +# # endif /* defined(HAVE_READLINE_HISTORY_H) */ |
1574 | +# /* no history */ |
1575 | +# #endif /* HAVE_READLINE_HISTORY */ |
1576 | +# |
1577 | +# LAST MODIFICATION |
1578 | +# |
1579 | +# 2009-11-17 |
1580 | +# |
1581 | +# Based on VL_LIB_READLINE from Ville Laurikari |
1582 | +# |
1583 | +# COPYLEFT |
1584 | +# |
1585 | +# Copyright (c) 2009 Monty Taylor |
1586 | +# Copyright (c) 2002 Ville Laurikari <vl@iki.fi> |
1587 | +# |
1588 | +# Copying and distribution of this file, with or without |
1589 | +# modification, are permitted in any medium without royalty provided |
1590 | +# the copyright notice and this notice are preserved. |
1591 | + |
1592 | +AC_DEFUN([PANDORA_CHECK_TIOCGWINSZ],[ |
1593 | + AC_CACHE_CHECK([for TIOCGWINSZ in sys/ioctl.h], |
1594 | + [pandora_cv_tiocgwinsz_in_ioctl],[ |
1595 | + AC_COMPILE_IFELSE([ |
1596 | + AC_LANG_PROGRAM([[ |
1597 | +#include <sys/types.h> |
1598 | +#include <sys/ioctl.h> |
1599 | + ]],[[ |
1600 | +int x= TIOCGWINSZ; |
1601 | + ]]) |
1602 | + ],[ |
1603 | + pandora_cv_tiocgwinsz_in_ioctl=yes |
1604 | + ],[ |
1605 | + pandora_cv_tiocgwinsz_in_ioctl=no |
1606 | + ]) |
1607 | + ]) |
1608 | + AS_IF([test "$pandora_cv_tiocgwinsz_in_ioctl" = "yes"],[ |
1609 | + AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1], |
1610 | + [READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.]) |
1611 | + ]) |
1612 | +]) |
1613 | + |
1614 | +AC_DEFUN([PANDORA_CHECK_RL_COMPENTRY], [ |
1615 | + AC_CACHE_CHECK([defined rl_compentry_func_t], [pandora_cv_rl_compentry],[ |
1616 | + AC_COMPILE_IFELSE([ |
1617 | + AC_LANG_PROGRAM([[ |
1618 | +#include "stdio.h" |
1619 | +#include "readline/readline.h" |
1620 | + ]],[[ |
1621 | +rl_compentry_func_t *func2= (rl_compentry_func_t*)0; |
1622 | + ]]) |
1623 | + ],[ |
1624 | + pandora_cv_rl_compentry=yes |
1625 | + ],[ |
1626 | + pandora_cv_rl_compentry=no |
1627 | + ]) |
1628 | + ]) |
1629 | + AS_IF([test "$pandora_cv_rl_compentry" = "yes"],[ |
1630 | + AC_DEFINE([HAVE_RL_COMPENTRY], [1], |
1631 | + [Does system provide rl_compentry_func_t]) |
1632 | + ]) |
1633 | + |
1634 | + save_CXXFLAGS="${CXXFLAGS}" |
1635 | + CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" |
1636 | + AC_LANG_PUSH(C++) |
1637 | + AC_CACHE_CHECK([rl_compentry_func_t works], [pandora_cv_rl_compentry_works],[ |
1638 | + AC_COMPILE_IFELSE([ |
1639 | + AC_LANG_PROGRAM([[ |
1640 | +#include "stdio.h" |
1641 | +#include "readline/readline.h" |
1642 | + ]],[[ |
1643 | +rl_completion_entry_function= (rl_compentry_func_t*)NULL; |
1644 | + ]]) |
1645 | + ],[ |
1646 | + pandora_cv_rl_compentry_works=yes |
1647 | + ],[ |
1648 | + pandora_cv_rl_compentry_works=no |
1649 | + ]) |
1650 | + ]) |
1651 | + AS_IF([test "$pandora_cv_rl_compentry_works" = "yes"],[ |
1652 | + AC_DEFINE([HAVE_WORKING_RL_COMPENTRY], [1], |
1653 | + [Does system provide an rl_compentry_func_t that is usable]) |
1654 | + ]) |
1655 | + CXXFLAGS="${save_CXXFLAGS}" |
1656 | + AC_LANG_POP() |
1657 | +]) |
1658 | + |
1659 | + |
1660 | +AC_DEFUN([PANDORA_CHECK_RL_COMPLETION_FUNC], [ |
1661 | + AC_CACHE_CHECK([defined rl_completion_func_t], [pandora_cv_rl_completion],[ |
1662 | + AC_COMPILE_IFELSE([ |
1663 | + AC_LANG_PROGRAM([[ |
1664 | +#include "stdio.h" |
1665 | +#include "readline/readline.h" |
1666 | + ]],[[ |
1667 | +rl_completion_func_t *func1= (rl_completion_func_t*)0; |
1668 | + ]]) |
1669 | + ],[ |
1670 | + pandora_cv_rl_completion=yes |
1671 | + ],[ |
1672 | + pandora_cv_rl_completion=no |
1673 | + ]) |
1674 | + ]) |
1675 | + AS_IF([test "$pandora_cv_rl_completion" = "yes"],[ |
1676 | + AC_DEFINE([HAVE_RL_COMPLETION], [1], |
1677 | + [Does system provide rl_completion_func_t]) |
1678 | + ]) |
1679 | +]) |
1680 | + |
1681 | +AC_DEFUN([_PANDORA_SEARCH_LIBREADLINE], [ |
1682 | + |
1683 | + save_LIBS="${LIBS}" |
1684 | + LIBS="" |
1685 | + |
1686 | + AC_CACHE_CHECK([for a readline compatible library], |
1687 | + ac_cv_libreadline, [ |
1688 | + ORIG_LIBS="$LIBS" |
1689 | + for readline_lib in readline edit editline; do |
1690 | + for termcap_lib in "" termcap curses ncurses; do |
1691 | + if test -z "$termcap_lib"; then |
1692 | + TRY_LIB="-l$readline_lib" |
1693 | + else |
1694 | + TRY_LIB="-l$readline_lib -l$termcap_lib" |
1695 | + fi |
1696 | + LIBS="$ORIG_LIBS $TRY_LIB" |
1697 | + AC_TRY_LINK_FUNC(readline, ac_cv_libreadline="$TRY_LIB") |
1698 | + if test -n "$ac_cv_libreadline"; then |
1699 | + break |
1700 | + fi |
1701 | + done |
1702 | + if test -n "$ac_cv_libreadline"; then |
1703 | + break |
1704 | + fi |
1705 | + done |
1706 | + if test -z "$ac_cv_libreadline"; then |
1707 | + ac_cv_libreadline="no" |
1708 | + LIBS="$ORIG_LIBS" |
1709 | + fi |
1710 | + ]) |
1711 | + |
1712 | + if test "$ac_cv_libreadline" != "no"; then |
1713 | + AC_DEFINE(HAVE_LIBREADLINE, 1, |
1714 | + [Define if you have a readline compatible library]) |
1715 | + AC_CHECK_HEADERS(readline.h readline/readline.h) |
1716 | + AC_CACHE_CHECK([whether readline supports history], |
1717 | + ac_cv_libreadline_history, [ |
1718 | + ac_cv_libreadline_history="no" |
1719 | + AC_TRY_LINK_FUNC(add_history, ac_cv_libreadline_history="yes") |
1720 | + ]) |
1721 | + if test "$ac_cv_libreadline_history" = "yes"; then |
1722 | + AC_DEFINE(HAVE_READLINE_HISTORY, 1, |
1723 | + [Define if your readline library has \`add_history']) |
1724 | + AC_CHECK_HEADERS(history.h readline/history.h) |
1725 | + fi |
1726 | + fi |
1727 | + PANDORA_CHECK_RL_COMPENTRY |
1728 | + PANDORA_CHECK_RL_COMPLETION_FUNC |
1729 | + PANDORA_CHECK_TIOCGWINSZ |
1730 | + |
1731 | + |
1732 | + READLINE_LIBS="${LIBS}" |
1733 | + LIBS="${save_LIBS}" |
1734 | + AC_SUBST(READLINE_LIBS) |
1735 | + |
1736 | + AM_CONDITIONAL(HAVE_LIBREADLINE, [test "x${ac_cv_libreadline}" = "xyes"]) |
1737 | +]) |
1738 | + |
1739 | +AC_DEFUN([_PANDORA_HAVE_LIBREADLINE],[ |
1740 | + |
1741 | + AC_ARG_ENABLE([libreadline], |
1742 | + [AS_HELP_STRING([--disable-libreadline], |
1743 | + [Build with libreadline support @<:@default=on@:>@])], |
1744 | + [ac_enable_libreadline="$enableval"], |
1745 | + [ac_enable_libreadline="yes"]) |
1746 | + |
1747 | + _PANDORA_SEARCH_LIBREADLINE |
1748 | +]) |
1749 | + |
1750 | + |
1751 | +AC_DEFUN([PANDORA_HAVE_LIBREADLINE],[ |
1752 | + AC_REQUIRE([_PANDORA_HAVE_LIBREADLINE]) |
1753 | +]) |
1754 | + |
1755 | +AC_DEFUN([_PANDORA_REQUIRE_LIBREADLINE],[ |
1756 | + ac_enable_libreadline="yes" |
1757 | + _PANDORA_SEARCH_LIBREADLINE |
1758 | + |
1759 | + AS_IF([test "x$ac_cv_libreadline" = "xno"], |
1760 | + AC_MSG_ERROR([libreadline is required for ${PACKAGE}. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.])) |
1761 | + |
1762 | +]) |
1763 | + |
1764 | +AC_DEFUN([PANDORA_REQUIRE_LIBREADLINE],[ |
1765 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBREADLINE]) |
1766 | +]) |
1767 | + |
1768 | + |
1769 | |
1770 | === added file 'm4/pandora_have_libtokyocabinet.m4' |
1771 | --- m4/pandora_have_libtokyocabinet.m4 1970-01-01 00:00:00 +0000 |
1772 | +++ m4/pandora_have_libtokyocabinet.m4 2009-12-18 19:32:12 +0000 |
1773 | @@ -0,0 +1,52 @@ |
1774 | +dnl Copyright (C) 2009 Sun Microsystems |
1775 | +dnl This file is free software; Sun Microsystems |
1776 | +dnl gives unlimited permission to copy and/or distribute it, |
1777 | +dnl with or without modifications, as long as this notice is preserved. |
1778 | + |
1779 | +dnl Provides support for finding libtokyocabinet. |
1780 | +dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET |
1781 | + |
1782 | +AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[ |
1783 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1784 | + |
1785 | + dnl -------------------------------------------------------------------- |
1786 | + dnl Check for libtokyocabinet |
1787 | + dnl -------------------------------------------------------------------- |
1788 | + |
1789 | + AC_ARG_ENABLE([libtokyocabinet], |
1790 | + [AS_HELP_STRING([--disable-libtokyocabinet], |
1791 | + [Build with libtokyocabinet support @<:@default=on@:>@])], |
1792 | + [ac_enable_libtokyocabinet="$enableval"], |
1793 | + [ac_enable_libtokyocabinet="yes"]) |
1794 | + |
1795 | + AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[ |
1796 | + AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[ |
1797 | +#include <tcutil.h> |
1798 | + ],[ |
1799 | +const char *test= tcversion; |
1800 | + ]) |
1801 | + ],[ |
1802 | + ac_cv_libtokyocabinet="no" |
1803 | + ]) |
1804 | + |
1805 | + AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[ |
1806 | + |
1807 | + PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet], [ |
1808 | + ac_cv_libtokyocabinet=yes |
1809 | + LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} |
1810 | + LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} |
1811 | + ],[]) |
1812 | + ]) |
1813 | + |
1814 | + AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"]) |
1815 | +]) |
1816 | + |
1817 | +AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[ |
1818 | + AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) |
1819 | +]) |
1820 | + |
1821 | +AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[ |
1822 | + AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) |
1823 | + AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"], |
1824 | + AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.])) |
1825 | +]) |
1826 | |
1827 | === added file 'm4/pandora_have_libuuid.m4' |
1828 | --- m4/pandora_have_libuuid.m4 1970-01-01 00:00:00 +0000 |
1829 | +++ m4/pandora_have_libuuid.m4 2009-12-18 19:32:13 +0000 |
1830 | @@ -0,0 +1,55 @@ |
1831 | +dnl Copyright (C) 2009 Sun Microsystems |
1832 | +dnl This file is free software; Sun Microsystems |
1833 | +dnl gives unlimited permission to copy and/or distribute it, |
1834 | +dnl with or without modifications, as long as this notice is preserved. |
1835 | + |
1836 | +#-------------------------------------------------------------------- |
1837 | +# Check for libuuid |
1838 | +#-------------------------------------------------------------------- |
1839 | + |
1840 | + |
1841 | +AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[ |
1842 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1843 | + |
1844 | + dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may |
1845 | + dnl not be a lib is weird. |
1846 | + AC_CHECK_HEADERS(uuid/uuid.h) |
1847 | + AC_LIB_HAVE_LINKFLAGS(uuid,, |
1848 | + [ |
1849 | + #include <uuid/uuid.h> |
1850 | + ], |
1851 | + [ |
1852 | + uuid_t uout; |
1853 | + uuid_generate(uout); |
1854 | + ]) |
1855 | + |
1856 | + AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"]) |
1857 | +]) |
1858 | + |
1859 | +AC_DEFUN([_PANDORA_HAVE_LIBUUID],[ |
1860 | + |
1861 | + AC_ARG_ENABLE([libuuid], |
1862 | + [AS_HELP_STRING([--disable-libuuid], |
1863 | + [Build with libuuid support @<:@default=on@:>@])], |
1864 | + [ac_enable_libuuid="$enableval"], |
1865 | + [ac_enable_libuuid="yes"]) |
1866 | + |
1867 | + _PANDORA_SEARCH_LIBUUID |
1868 | +]) |
1869 | + |
1870 | + |
1871 | +AC_DEFUN([PANDORA_HAVE_LIBUUID],[ |
1872 | + AC_REQUIRE([_PANDORA_HAVE_LIBUUID]) |
1873 | +]) |
1874 | + |
1875 | +AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[ |
1876 | + ac_enable_libuuid="yes" |
1877 | + _PANDORA_SEARCH_LIBUUID |
1878 | + AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[ |
1879 | + AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.]) |
1880 | + ]) |
1881 | +]) |
1882 | + |
1883 | +AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[ |
1884 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID]) |
1885 | +]) |
1886 | |
1887 | === added file 'm4/pandora_have_libxml2.m4' |
1888 | --- m4/pandora_have_libxml2.m4 1970-01-01 00:00:00 +0000 |
1889 | +++ m4/pandora_have_libxml2.m4 2009-12-18 19:32:13 +0000 |
1890 | @@ -0,0 +1,52 @@ |
1891 | +dnl Copyright (C) 2009 Sun Microsystems |
1892 | +dnl This file is free software; Sun Microsystems |
1893 | +dnl gives unlimited permission to copy and/or distribute it, |
1894 | +dnl with or without modifications, as long as this notice is preserved. |
1895 | + |
1896 | +dnl Provides support for finding libxml2. |
1897 | +dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2 |
1898 | + |
1899 | +AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[ |
1900 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1901 | + |
1902 | + dnl -------------------------------------------------------------------- |
1903 | + dnl Check for libxml2 |
1904 | + dnl -------------------------------------------------------------------- |
1905 | + |
1906 | + AC_ARG_ENABLE([libxml2], |
1907 | + [AS_HELP_STRING([--disable-libxml2], |
1908 | + [Build with libxml2 support @<:@default=on@:>@])], |
1909 | + [ac_enable_libxml2="$enableval"], |
1910 | + [ac_enable_libxml2="yes"]) |
1911 | + |
1912 | + AS_IF([test "x$ac_enable_libxml2" = "xyes"],[ |
1913 | + AC_LIB_HAVE_LINKFLAGS(xml2,,[ |
1914 | +#include <libxml/xmlversion.h> |
1915 | + ],[ |
1916 | +const char *test= LIBXML_DOTTED_VERSION; |
1917 | + ]) |
1918 | + ],[ |
1919 | + ac_cv_libxml2="no" |
1920 | + ]) |
1921 | + |
1922 | + AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[ |
1923 | + |
1924 | + PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [ |
1925 | + ac_cv_libxml2=yes |
1926 | + LTLIBXML2=${LIBXML2_LIBS} |
1927 | + LIBXML2=${LIBXML2_LIBS} |
1928 | + ],[]) |
1929 | + ]) |
1930 | + |
1931 | + AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"]) |
1932 | +]) |
1933 | + |
1934 | +AC_DEFUN([PANDORA_HAVE_LIBXML2],[ |
1935 | + AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) |
1936 | +]) |
1937 | + |
1938 | +AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[ |
1939 | + AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) |
1940 | + AS_IF([test "x${ac_cv_libxml2}" = "xno"], |
1941 | + AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.])) |
1942 | +]) |
1943 | |
1944 | === added file 'm4/pandora_have_libz.m4' |
1945 | --- m4/pandora_have_libz.m4 1970-01-01 00:00:00 +0000 |
1946 | +++ m4/pandora_have_libz.m4 2009-12-18 19:32:12 +0000 |
1947 | @@ -0,0 +1,51 @@ |
1948 | +dnl Copyright (C) 2009 Sun Microsystems |
1949 | +dnl This file is free software; Sun Microsystems |
1950 | +dnl gives unlimited permission to copy and/or distribute it, |
1951 | +dnl with or without modifications, as long as this notice is preserved. |
1952 | + |
1953 | +#-------------------------------------------------------------------- |
1954 | +# Check for libz |
1955 | +#-------------------------------------------------------------------- |
1956 | + |
1957 | + |
1958 | +AC_DEFUN([_PANDORA_SEARCH_LIBZ],[ |
1959 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1960 | + |
1961 | + AC_LIB_HAVE_LINKFLAGS(z,, |
1962 | + [ |
1963 | + #include <zlib.h> |
1964 | + ],[ |
1965 | + crc32(0, Z_NULL, 0); |
1966 | + ]) |
1967 | + |
1968 | + AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"]) |
1969 | +]) |
1970 | + |
1971 | +AC_DEFUN([_PANDORA_HAVE_LIBZ],[ |
1972 | + |
1973 | + AC_ARG_ENABLE([libz], |
1974 | + [AS_HELP_STRING([--disable-libz], |
1975 | + [Build with libz support @<:@default=on@:>@])], |
1976 | + [ac_enable_libz="$enableval"], |
1977 | + [ac_enable_libz="yes"]) |
1978 | + |
1979 | + _PANDORA_SEARCH_LIBZ |
1980 | +]) |
1981 | + |
1982 | + |
1983 | +AC_DEFUN([PANDORA_HAVE_LIBZ],[ |
1984 | + AC_REQUIRE([_PANDORA_HAVE_LIBZ]) |
1985 | +]) |
1986 | + |
1987 | +AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[ |
1988 | + ac_enable_libz="yes" |
1989 | + _PANDORA_SEARCH_LIBZ |
1990 | + |
1991 | + AS_IF([test x$ac_cv_libz = xno],[ |
1992 | + AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.]) |
1993 | + ]) |
1994 | +]) |
1995 | + |
1996 | +AC_DEFUN([PANDORA_REQUIRE_LIBZ],[ |
1997 | + AC_REQUIRE([_PANDORA_REQUIRE_LIBZ]) |
1998 | +]) |
1999 | |
2000 | === modified file 'm4/pandora_header_assert.m4' |
2001 | --- m4/pandora_header_assert.m4 2009-07-08 07:19:19 +0000 |
2002 | +++ m4/pandora_header_assert.m4 2009-12-18 19:32:12 +0000 |
2003 | @@ -8,6 +8,7 @@ |
2004 | dnl Check whether to enable assertions. |
2005 | AC_DEFUN([PANDORA_HEADER_ASSERT], |
2006 | [ |
2007 | + AC_CHECK_HEADERS(assert.h) |
2008 | AC_MSG_CHECKING([whether to enable assertions]) |
2009 | AC_ARG_ENABLE([assert], |
2010 | [AS_HELP_STRING([--disable-assert], |
2011 | @@ -16,8 +17,7 @@ |
2012 | [ac_cv_assert="yes"]) |
2013 | AC_MSG_RESULT([$ac_cv_assert]) |
2014 | |
2015 | - AS_IF([test "$ac_cv_assert" = "yes"], |
2016 | - [AC_CHECK_HEADERS(assert.h)], |
2017 | + AS_IF([test "$ac_cv_assert" = "no"], |
2018 | [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])]) |
2019 | ]) |
2020 | |
2021 | |
2022 | === modified file 'm4/pandora_libtool.m4' |
2023 | --- m4/pandora_libtool.m4 2009-07-08 07:19:19 +0000 |
2024 | +++ m4/pandora_libtool.m4 2009-12-18 19:32:12 +0000 |
2025 | @@ -4,7 +4,17 @@ |
2026 | dnl with or without modifications, as long as this notice is preserved. |
2027 | |
2028 | AC_DEFUN([PANDORA_LIBTOOL],[ |
2029 | + AC_REQUIRE([AC_DISABLE_STATIC]) |
2030 | AC_REQUIRE([AC_PROG_LIBTOOL]) |
2031 | + m4_ifndef([LT_PREREQ],[ |
2032 | + pandora_have_old_libtool=yes |
2033 | + ],[ |
2034 | + pandora_have_old_libtool=no |
2035 | + ]) |
2036 | + AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ |
2037 | + AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) |
2038 | + ]) |
2039 | + |
2040 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read |
2041 | dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT |
2042 | dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it. |
2043 | |
2044 | === modified file 'm4/pandora_plugins.m4' |
2045 | --- m4/pandora_plugins.m4 2009-09-29 04:30:01 +0000 |
2046 | +++ m4/pandora_plugins.m4 2009-12-18 19:32:13 +0000 |
2047 | @@ -9,20 +9,32 @@ |
2048 | |
2049 | AC_DEFUN([PANDORA_PLUGINS],[ |
2050 | |
2051 | - m4_sinclude(config/plugin.ac) |
2052 | + dnl We do this to prime the files from a fresh checkout. Normally we want |
2053 | + dnl these commands to be executed by make. Perhaps we should split them into |
2054 | + dnl a few shell script snippets in config and make Make call them... we're |
2055 | + dnl going to get there... |
2056 | + dnl ANYWAY - syscmd gets called during aclocal - so before automake. It will |
2057 | + dnl get called probably during autoconf too, so it's important to protect |
2058 | + dnl with test -f ... if the files exist, we don't have the chicken/egg |
2059 | + dnl problem and therefore don't need to do anything here |
2060 | + m4_syscmd([python config/pandora-plugin > /dev/null]) |
2061 | + m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4]) |
2062 | + |
2063 | + m4_sinclude(config/pandora-plugin.ac) |
2064 | + |
2065 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list |
2066 | - AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list], |
2067 | - [List of plugins that should be loaded on startup if no |
2068 | - value is given for --plugin-load]) |
2069 | - |
2070 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` |
2071 | AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL") |
2072 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) |
2073 | + AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list]) |
2074 | m4_ifval(m4_normalize([$1]),[ |
2075 | AC_CONFIG_FILES($*) |
2076 | ],[ |
2077 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list], |
2078 | [List of plugins to be built in]) |
2079 | + AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"], |
2080 | + [List of plugins that should be loaded on startup if no |
2081 | + value is given for --plugin-load]) |
2082 | ]) |
2083 | |
2084 | |
2085 | |
2086 | === modified file 'm4/pandora_pthread.m4' |
2087 | --- m4/pandora_pthread.m4 2009-09-29 04:30:01 +0000 |
2088 | +++ m4/pandora_pthread.m4 2009-12-18 19:32:12 +0000 |
2089 | @@ -53,6 +53,186 @@ |
2090 | [pthread_yield function with one argument]) |
2091 | ]) |
2092 | |
2093 | + AC_CHECK_FUNCS(pthread_attr_getstacksize pthread_attr_setprio \ |
2094 | + pthread_attr_setschedparam \ |
2095 | + pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \ |
2096 | + pthread_key_delete pthread_rwlock_rdlock pthread_setprio \ |
2097 | + pthread_setprio_np pthread_setschedparam pthread_sigmask \ |
2098 | + pthread_attr_create rwlock_init |
2099 | +) |
2100 | + |
2101 | + |
2102 | + |
2103 | +# Check definition of pthread_getspecific |
2104 | +AC_CACHE_CHECK([args to pthread_getspecific], [pandora_cv_getspecific_args], |
2105 | + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2106 | +#if !defined(_REENTRANT) |
2107 | +#define _REENTRANT |
2108 | +#endif |
2109 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2110 | +#define _POSIX_PTHREAD_SEMANTICS |
2111 | +#endif |
2112 | +#include <pthread.h> |
2113 | + ]], [[ |
2114 | +void *pthread_getspecific(pthread_key_t key); |
2115 | +pthread_getspecific((pthread_key_t) NULL); |
2116 | + ]])], |
2117 | + [pandora_cv_getspecific_args=POSIX], |
2118 | + [pandora_cv_getspecific_args=other])]) |
2119 | + if test "$pandora_cv_getspecific_args" = "other" |
2120 | + then |
2121 | + AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1], |
2122 | + [For some non posix threads]) |
2123 | + fi |
2124 | + |
2125 | + # Check definition of pthread_mutex_init |
2126 | + AC_CACHE_CHECK([args to pthread_mutex_init], [pandora_cv_mutex_init_args], |
2127 | + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2128 | +#ifndef _REENTRANT |
2129 | +#define _REENTRANT |
2130 | +#endif |
2131 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2132 | +#define _POSIX_PTHREAD_SEMANTICS |
2133 | +#endif |
2134 | +#include <pthread.h> ]], [[ |
2135 | + pthread_mutexattr_t attr; |
2136 | + pthread_mutex_t mp; |
2137 | + pthread_mutex_init(&mp,&attr); ]])], |
2138 | + [pandora_cv_mutex_init_args=POSIX], |
2139 | + [pandora_cv_mutex_init_args=other])]) |
2140 | + if test "$pandora_cv_mutex_init_args" = "other" |
2141 | + then |
2142 | + AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1], |
2143 | + [For some non posix threads]) |
2144 | + fi |
2145 | +#---END: |
2146 | + |
2147 | +#---START: Used in for client configure |
2148 | +# Check definition of readdir_r |
2149 | +AC_CACHE_CHECK([args to readdir_r], [pandora_cv_readdir_r], |
2150 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
2151 | +#ifndef _REENTRANT |
2152 | +#define _REENTRANT |
2153 | +#endif |
2154 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2155 | +#define _POSIX_PTHREAD_SEMANTICS |
2156 | +#endif |
2157 | +#include <pthread.h> |
2158 | +#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); |
2159 | +readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])], |
2160 | + [pandora_cv_readdir_r=POSIX], |
2161 | + [pandora_cv_readdir_r=other])]) |
2162 | +if test "$pandora_cv_readdir_r" = "POSIX" |
2163 | +then |
2164 | + AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r]) |
2165 | +fi |
2166 | + |
2167 | +# Check definition of posix sigwait() |
2168 | +AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait], |
2169 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
2170 | +#ifndef _REENTRANT |
2171 | +#define _REENTRANT |
2172 | +#endif |
2173 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2174 | +#define _POSIX_PTHREAD_SEMANTICS |
2175 | +#endif |
2176 | +#include <pthread.h> |
2177 | +#include <signal.h> |
2178 | + ]], [[ |
2179 | +#ifndef _AIX |
2180 | +sigset_t set; |
2181 | +int sig; |
2182 | +sigwait(&set,&sig); |
2183 | +#endif |
2184 | + ]])], |
2185 | + [pandora_cv_sigwait=POSIX], |
2186 | + [pandora_cv_sigwait=other])]) |
2187 | +if test "$pandora_cv_sigwait" = "POSIX" |
2188 | +then |
2189 | + AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait]) |
2190 | +fi |
2191 | + |
2192 | +if test "$pandora_cv_sigwait" != "POSIX" |
2193 | +then |
2194 | +unset pandora_cv_sigwait |
2195 | +# Check definition of posix sigwait() |
2196 | +AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait], |
2197 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
2198 | +#ifndef _REENTRANT |
2199 | +#define _REENTRANT |
2200 | +#endif |
2201 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2202 | +#define _POSIX_PTHREAD_SEMANTICS |
2203 | +#endif |
2204 | +#include <pthread.h> |
2205 | +#include <signal.h> |
2206 | + ]], [[ |
2207 | +sigset_t set; |
2208 | +int sig; |
2209 | +sigwait(&set); |
2210 | + ]])], |
2211 | + [pandora_cv_sigwait=NONPOSIX], |
2212 | + [pandora_cv_sigwait=other])]) |
2213 | +if test "$pandora_cv_sigwait" = "NONPOSIX" |
2214 | +then |
2215 | + AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument]) |
2216 | +fi |
2217 | +fi |
2218 | +#---END: |
2219 | + |
2220 | +# Check if pthread_attr_setscope() exists |
2221 | +AC_CACHE_CHECK([for pthread_attr_setscope], [pandora_cv_pthread_attr_setscope], |
2222 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
2223 | +#ifndef _REENTRANT |
2224 | +#define _REENTRANT |
2225 | +#endif |
2226 | +#ifndef _POSIX_PTHREAD_SEMANTICS |
2227 | +#define _POSIX_PTHREAD_SEMANTICS |
2228 | +#endif |
2229 | +#include <pthread.h> |
2230 | + ]], [[ |
2231 | +pthread_attr_t thr_attr; |
2232 | +pthread_attr_setscope(&thr_attr,0); |
2233 | + ]])], |
2234 | + [pandora_cv_pthread_attr_setscope=yes], |
2235 | + [pandora_cv_pthread_attr_setscope=no])]) |
2236 | +if test "$pandora_cv_pthread_attr_setscope" = "yes" |
2237 | +then |
2238 | + AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope]) |
2239 | +fi |
2240 | + |
2241 | + |
2242 | +AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg, |
2243 | +[AC_TRY_LINK([#define _GNU_SOURCE |
2244 | +#include <pthread.h> |
2245 | +#ifdef __cplusplus |
2246 | +extern "C" |
2247 | +#endif |
2248 | +], |
2249 | +[ |
2250 | + pthread_yield(); |
2251 | +], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)]) |
2252 | +if test "$ac_cv_pthread_yield_zero_arg" = "yes" |
2253 | +then |
2254 | + AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1], |
2255 | + [pthread_yield that doesn't take any arguments]) |
2256 | +fi |
2257 | +AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg, |
2258 | +[AC_TRY_LINK([#define _GNU_SOURCE |
2259 | +#include <pthread.h> |
2260 | +#ifdef __cplusplus |
2261 | +extern "C" |
2262 | +#endif |
2263 | +], |
2264 | +[ |
2265 | + pthread_yield(0); |
2266 | +], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)]) |
2267 | +if test "$ac_cv_pthread_yield_one_arg" = "yes" |
2268 | +then |
2269 | + AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1], |
2270 | + [pthread_yield function with one argument]) |
2271 | +fi |
2272 | + |
2273 | CFLAGS="${save_CFLAGS}" |
2274 | CXXFLAGS="${save_CXXFLAGS}" |
2275 | ]) |
2276 | |
2277 | === added file 'm4/pandora_run_cpplint.m4' |
2278 | --- m4/pandora_run_cpplint.m4 1970-01-01 00:00:00 +0000 |
2279 | +++ m4/pandora_run_cpplint.m4 2009-12-18 19:32:12 +0000 |
2280 | @@ -0,0 +1,8 @@ |
2281 | +dnl Copyright (C) 2009 Sun Microsystems |
2282 | +dnl This file is free software; Sun Microsystems |
2283 | +dnl gives unlimited permission to copy and/or distribute it, |
2284 | +dnl with or without modifications, as long as this notice is preserved. |
2285 | + |
2286 | +AC_DEFUN([PANDORA_RUN_CPPLINT],[ |
2287 | + m4_syscmd([python config/make-lint.py]) |
2288 | +]) |
2289 | |
2290 | === added file 'm4/pandora_sasl.m4' |
2291 | --- m4/pandora_sasl.m4 1970-01-01 00:00:00 +0000 |
2292 | +++ m4/pandora_sasl.m4 2009-12-18 19:32:12 +0000 |
2293 | @@ -0,0 +1,133 @@ |
2294 | +dnl Copyright (C) 2009 Sun Microsystems |
2295 | +dnl This file is free software; Sun Microsystems |
2296 | +dnl gives unlimited permission to copy and/or distribute it, |
2297 | +dnl with or without modifications, as long as this notice is preserved. |
2298 | + |
2299 | +AC_DEFUN([_PANDORA_SEARCH_SASL],[ |
2300 | + AC_REQUIRE([AC_LIB_PREFIX]) |
2301 | + |
2302 | + dnl -------------------------------------------------------------------- |
2303 | + dnl Check for sasl |
2304 | + dnl -------------------------------------------------------------------- |
2305 | + AC_ARG_ENABLE([sasl], |
2306 | + [AS_HELP_STRING([--disable-sasl], |
2307 | + [Build with sasl support @<:@default=on@:>@])], |
2308 | + [ac_enable_sasl="$enableval"], |
2309 | + [ac_enable_sasl="yes"]) |
2310 | + |
2311 | + AS_IF([test "x$ac_enable_sasl" = "xyes"], |
2312 | + [ |
2313 | + AC_LIB_HAVE_LINKFLAGS(sasl,,[ |
2314 | + #include <stdlib.h> |
2315 | + #include <sasl/sasl.h> |
2316 | + ],[ |
2317 | + sasl_server_init(NULL, NULL); |
2318 | + ]) |
2319 | + |
2320 | + AS_IF([test "x${ac_cv_libsasl}" != "xyes" ], |
2321 | + [ |
2322 | + AC_LIB_HAVE_LINKFLAGS(sasl2,,[ |
2323 | + #include <stdlib.h> |
2324 | + #include <sasl/sasl.h> |
2325 | + ],[ |
2326 | + sasl_server_init(NULL, NULL); |
2327 | + ]) |
2328 | + HAVE_LIBSASL="$HAVE_LIBSASL2" |
2329 | + LIBSASL="$LIBSASL2" |
2330 | + LIBSASL_PREFIX="$LIBSASL2_PREFIX" |
2331 | + LTLIBSASL="$LT_LIBSASL2" |
2332 | + ]) |
2333 | + ]) |
2334 | + |
2335 | + AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"], |
2336 | + [ac_cv_sasl=yes], |
2337 | + [ac_cv_sasl=no]) |
2338 | + |
2339 | + AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) |
2340 | + AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) |
2341 | + AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"]) |
2342 | +]) |
2343 | + |
2344 | +AC_DEFUN([PANDORA_HAVE_SASL],[ |
2345 | + AC_REQUIRE([_PANDORA_SEARCH_SASL]) |
2346 | +]) |
2347 | + |
2348 | +AC_DEFUN([PANDORA_REQUIRE_SASL],[ |
2349 | + AC_REQUIRE([_PANDORA_SEARCH_SASL]) |
2350 | + AS_IF([test "x${ac_cv_sasl}" = "xno"], |
2351 | + AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}])) |
2352 | +]) |
2353 | + |
2354 | +AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[ |
2355 | + AC_REQUIRE([AC_LIB_PREFIX]) |
2356 | + |
2357 | + dnl -------------------------------------------------------------------- |
2358 | + dnl Check for libsasl |
2359 | + dnl -------------------------------------------------------------------- |
2360 | + |
2361 | + AC_ARG_ENABLE([libsasl], |
2362 | + [AS_HELP_STRING([--disable-libsasl], |
2363 | + [Build with libsasl support @<:@default=on@:>@])], |
2364 | + [ac_enable_libsasl="$enableval"], |
2365 | + [ac_enable_libsasl="yes"]) |
2366 | + |
2367 | + AS_IF([test "x$ac_enable_libsasl" = "xyes"],[ |
2368 | + AC_LIB_HAVE_LINKFLAGS(sasl,,[ |
2369 | + #include <stdlib.h> |
2370 | + #include <sasl/sasl.h> |
2371 | + ],[ |
2372 | + sasl_server_init(NULL, NULL); |
2373 | + ]) |
2374 | + ],[ |
2375 | + ac_cv_libsasl="no" |
2376 | + ]) |
2377 | + |
2378 | + AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) |
2379 | +]) |
2380 | + |
2381 | +AC_DEFUN([PANDORA_HAVE_LIBSASL],[ |
2382 | + AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) |
2383 | +]) |
2384 | + |
2385 | +AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[ |
2386 | + AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) |
2387 | + AS_IF([test "x${ac_cv_libsasl}" = "xno"], |
2388 | + AC_MSG_ERROR([libsasl is required for ${PACKAGE}])) |
2389 | +]) |
2390 | + |
2391 | +AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[ |
2392 | + AC_REQUIRE([AC_LIB_PREFIX]) |
2393 | + |
2394 | + dnl -------------------------------------------------------------------- |
2395 | + dnl Check for libsasl2 |
2396 | + dnl -------------------------------------------------------------------- |
2397 | + |
2398 | + AC_ARG_ENABLE([libsasl2], |
2399 | + [AS_HELP_STRING([--disable-libsasl2], |
2400 | + [Build with libsasl2 support @<:@default=on@:>@])], |
2401 | + [ac_enable_libsasl2="$enableval"], |
2402 | + [ac_enable_libsasl2="yes"]) |
2403 | + |
2404 | + AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[ |
2405 | + AC_LIB_HAVE_LINKFLAGS(sasl2,,[ |
2406 | + #include <stdlib.h> |
2407 | + #include <sasl2/sasl2.h> |
2408 | + ],[ |
2409 | + sasl2_server_init(NULL, NULL); |
2410 | + ]) |
2411 | + ],[ |
2412 | + ac_cv_libsasl2="no" |
2413 | + ]) |
2414 | + |
2415 | + AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) |
2416 | +]) |
2417 | + |
2418 | +AC_DEFUN([PANDORA_HAVE_LIBSASL2],[ |
2419 | + AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) |
2420 | +]) |
2421 | + |
2422 | +AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[ |
2423 | + AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) |
2424 | + AS_IF([test "x${ac_cv_libsasl2}" = "xno"], |
2425 | + AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}])) |
2426 | +]) |
2427 | |
2428 | === modified file 'm4/pandora_shared_ptr.m4' |
2429 | --- m4/pandora_shared_ptr.m4 2009-07-08 07:19:19 +0000 |
2430 | +++ m4/pandora_shared_ptr.m4 2009-12-18 19:32:13 +0000 |
2431 | @@ -20,6 +20,8 @@ |
2432 | AC_DEFUN([PANDORA_SHARED_PTR],[ |
2433 | AC_REQUIRE([PANDORA_CHECK_CXX_STANDARD]) |
2434 | AC_LANG_PUSH(C++) |
2435 | + save_CXXFLAGS="${CXXFLAGS}" |
2436 | + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" |
2437 | AC_CHECK_HEADERS(memory tr1/memory boost/shared_ptr.hpp) |
2438 | AC_CACHE_CHECK([the location of shared_ptr header file], |
2439 | [ac_cv_shared_ptr_h],[ |
2440 | @@ -52,5 +54,6 @@ |
2441 | AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE], |
2442 | ${ac_cv_shared_ptr_namespace}, |
2443 | [The namespace in which SHARED_PTR can be found]) |
2444 | + CXXFLAGS="${save_CXXFLAGS}" |
2445 | AC_LANG_POP() |
2446 | ]) |
2447 | |
2448 | === added file 'm4/pandora_stack_direction.m4' |
2449 | --- m4/pandora_stack_direction.m4 1970-01-01 00:00:00 +0000 |
2450 | +++ m4/pandora_stack_direction.m4 2009-12-18 19:32:12 +0000 |
2451 | @@ -0,0 +1,39 @@ |
2452 | +dnl Copyright (C) 2009 Sun Microsystems |
2453 | +dnl This file is free software; Sun Microsystems |
2454 | +dnl gives unlimited permission to copy and/or distribute it, |
2455 | +dnl with or without modifications, as long as this notice is preserved. |
2456 | + |
2457 | +#-------------------------------------------------------------------- |
2458 | +# Check what direction the stack runs in |
2459 | +#-------------------------------------------------------------------- |
2460 | + |
2461 | +AC_DEFUN([PANDORA_STACK_DIRECTION],[ |
2462 | + AC_REQUIRE([AC_FUNC_ALLOCA]) |
2463 | + AC_CACHE_CHECK([stack direction], [ac_cv_c_stack_direction],[ |
2464 | + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
2465 | +#include <stdlib.h> |
2466 | + int find_stack_direction () |
2467 | + { |
2468 | + static char *addr = 0; |
2469 | + auto char dummy; |
2470 | + if (addr == 0) |
2471 | + { |
2472 | + addr = &dummy; |
2473 | + return find_stack_direction (); |
2474 | + } |
2475 | + else |
2476 | + return (&dummy > addr) ? 1 : -1; |
2477 | + } |
2478 | + ]],[[ |
2479 | + exit (find_stack_direction() < 0); |
2480 | + ]])],[ |
2481 | + ac_cv_c_stack_direction=1 |
2482 | + ],[ |
2483 | + ac_cv_c_stack_direction=-1 |
2484 | + ]) |
2485 | + ]) |
2486 | + AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) |
2487 | +]) |
2488 | + |
2489 | + |
2490 | + |
2491 | |
2492 | === added file 'm4/pandora_stl_hash.m4' |
2493 | --- m4/pandora_stl_hash.m4 1970-01-01 00:00:00 +0000 |
2494 | +++ m4/pandora_stl_hash.m4 2009-12-18 19:32:12 +0000 |
2495 | @@ -0,0 +1,110 @@ |
2496 | +# We check two things: where the include file is for hash_map, and |
2497 | +# what namespace hash_map lives in within that include file. We |
2498 | +# include AC_COMPILE_IFELSE for all the combinations we've seen in the |
2499 | +# wild. We define one of HAVE_HASH_MAP or HAVE_EXT_HASH_MAP depending |
2500 | +# on location, and HASH_NAMESPACE to be the namespace hash_map is |
2501 | +# defined in. |
2502 | +# |
2503 | +# Ideally we'd use AC_CACHE_CHECK, but that only lets us store one value |
2504 | +# at a time, and we need to store two (filename and namespace). |
2505 | +# prints messages itself, so we have to do the message-printing ourselves |
2506 | +# via AC_MSG_CHECKING + AC_MSG_RESULT. (TODO(csilvers): can we cache?) |
2507 | + |
2508 | +AC_DEFUN([PANDORA_CXX_STL_HASH], |
2509 | + [AC_MSG_CHECKING(the location of hash_map) |
2510 | + save_CXXFLAGS="${CXXFLAGS}" |
2511 | + CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" |
2512 | + AC_LANG_PUSH(C++) |
2513 | + ac_cv_cxx_hash_map="" |
2514 | + for location in "" "ext/" "tr1/" ; do |
2515 | + for namespace in __gnu_cxx "" std stdext; do |
2516 | + for classprefix in unordered hash; do |
2517 | + if test -z "$ac_cv_cxx_hash_map"; then |
2518 | + AC_COMPILE_IFELSE( |
2519 | + [AC_LANG_PROGRAM([[#include <${location}${classprefix}_map>]], |
2520 | + [[${namespace}::${classprefix}_map<int, int> t]])], |
2521 | + [ac_cv_cxx_hash_map="<${location}${classprefix}_map>"; |
2522 | + ac_cv_cxx_hash_set="<${location}${classprefix}_set>"; |
2523 | + ac_cv_cxx_hash_namespace="$namespace"; |
2524 | + ac_cv_cxx_hash_map_class="${classprefix}_map"; |
2525 | + ac_cv_cxx_hash_set_class="${classprefix}_set"]) |
2526 | + |
2527 | + fi |
2528 | + done |
2529 | + done |
2530 | + done |
2531 | + |
2532 | + if test -n "$ac_cv_cxx_hash_map"; then |
2533 | + AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map]) |
2534 | + AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set]) |
2535 | + AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map, |
2536 | + [the location of <hash_map>]) |
2537 | + AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set, |
2538 | + [the location of <hash_set>]) |
2539 | + AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace, |
2540 | + [the namespace of hash_map/hash_set]) |
2541 | + AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class, |
2542 | + [the classname of hash_map]) |
2543 | + AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, |
2544 | + [the classname of hash_set]) |
2545 | + AC_MSG_RESULT([$ac_cv_cxx_hash_map]) |
2546 | + else |
2547 | + AC_MSG_RESULT() |
2548 | + AC_MSG_WARN([could not find an STL hash_map]) |
2549 | + fi |
2550 | + AC_CACHE_CHECK( |
2551 | + [whether hash_map has rehash method], |
2552 | + [ac_cv_hash_map_has_rehash], |
2553 | + [AC_COMPILE_IFELSE( |
2554 | + [AC_LANG_PROGRAM([[ |
2555 | +#include HASH_MAP_H |
2556 | +using namespace HASH_NAMESPACE; |
2557 | + ]],[[ |
2558 | +HASH_MAP_CLASS<int, int> test_hash; |
2559 | +test_hash.rehash(100); |
2560 | + ]])], |
2561 | + [ac_cv_hash_map_has_rehash=yes], |
2562 | + [ac_cv_hash_map_has_rehash=no])]) |
2563 | + AS_IF([test $ac_cv_hash_map_has_rehash = yes],[ |
2564 | + AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method]) |
2565 | + ]) |
2566 | + AC_CACHE_CHECK( |
2567 | + [whether hash_map has resize method], |
2568 | + [ac_cv_hash_map_has_resize], |
2569 | + [AC_COMPILE_IFELSE( |
2570 | + [AC_LANG_PROGRAM([[ |
2571 | +#include HASH_MAP_H |
2572 | +using namespace HASH_NAMESPACE; |
2573 | + ]],[[ |
2574 | +HASH_MAP_CLASS<int, int> test_hash; |
2575 | +test_hash.resize(100); |
2576 | + ]])], |
2577 | + [ac_cv_hash_map_has_resize=yes], |
2578 | + [ac_cv_hash_map_has_resize=no])]) |
2579 | + AS_IF([test $ac_cv_hash_map_has_resize = yes],[ |
2580 | + AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method]) |
2581 | + ]) |
2582 | + AC_CACHE_CHECK( |
2583 | + [whether to redefine hash<string>], |
2584 | + [ac_cv_redefine_hash_string], |
2585 | + [AC_COMPILE_IFELSE( |
2586 | + [AC_LANG_PROGRAM([[ |
2587 | +#include HASH_SET_H |
2588 | +#include <string> |
2589 | +using namespace HASH_NAMESPACE; |
2590 | +using namespace std; |
2591 | + ]],[[ |
2592 | +string teststr("test"); |
2593 | +HASH_SET_CLASS<string> test_hash; |
2594 | +HASH_SET_CLASS<string>::iterator iter= test_hash.find(teststr); |
2595 | +if (iter != test_hash.end()) |
2596 | + return 1; |
2597 | + ]])], |
2598 | + [ac_cv_redefine_hash_string=no], |
2599 | + [ac_cv_redefine_hash_string=yes])]) |
2600 | + AS_IF([test $ac_cv_redefine_hash_string = yes],[ |
2601 | + AC_DEFINE(REDEFINE_HASH_STRING, 1, [if hash<string> needs to be defined]) |
2602 | + ]) |
2603 | + CXXFLAGS="${save_CXXFLAGS}" |
2604 | + AC_LANG_POP() |
2605 | +]) |
2606 | |
2607 | === modified file 'm4/pandora_vc_build.m4' |
2608 | --- m4/pandora_vc_build.m4 2009-09-29 04:30:01 +0000 |
2609 | +++ m4/pandora_vc_build.m4 2009-12-18 19:32:13 +0000 |
2610 | @@ -52,6 +52,72 @@ |
2611 | AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display]) |
2612 | AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch]) |
2613 | AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison]) |
2614 | - |
2615 | -]) |
2616 | - |
2617 | +]) |
2618 | + |
2619 | +AC_DEFUN([_PANDORA_READ_FROM_FILE],[ |
2620 | + $1=`grep $1 $2 | cut -f2 -d=` |
2621 | +]) |
2622 | + |
2623 | +AC_DEFUN([PANDORA_VC_VERSION],[ |
2624 | + AC_REQUIRE([PANDORA_BUILDING_FROM_VC]) |
2625 | + |
2626 | + PANDORA_RELEASE_DATE=`date +%Y.%m` |
2627 | + PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m` |
2628 | + |
2629 | + dnl Set some defaults |
2630 | + PANDORA_VC_REVNO="0" |
2631 | + PANDORA_VC_REVID="unknown" |
2632 | + PANDORA_VC_BRANCH="bzr-export" |
2633 | + |
2634 | + AS_IF([test -f ${srcdir}/config/bzr_revinfo],[ |
2635 | + _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/bzr_revinfo) |
2636 | + _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/bzr_revinfo) |
2637 | + _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH], |
2638 | + ${srcdir}/config/bzr_revinfo) |
2639 | + _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE], |
2640 | + ${srcdir}/config/bzr_revinfo) |
2641 | + _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE], |
2642 | + ${srcdir}/config/bzr_revinfo) |
2643 | + _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_COMMENT], |
2644 | + ${srcdir}/config/bzr_revinfo) |
2645 | + ]) |
2646 | + AS_IF([test "${ac_cv_building_from_bzr}" = "yes"],[ |
2647 | +dnl echo "Grabbing changelog and version information from bzr" |
2648 | +dnl bzr log --short > ChangeLog || touch ChangeLog |
2649 | + PANDORA_BZR_REVNO=`bzr revno` |
2650 | + AS_IF([test "x$PANDORA_BZR_REVNO" != "${PANDORA_VC_REVNO}"],[ |
2651 | + PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}" |
2652 | + PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $[]2}' | head -1` |
2653 | + PANDORA_VC_BRANCH=`bzr nick` |
2654 | + AS_IF([test "x${PANDORA_VC_BRANCH}" != "${PACKAGE}"],[ |
2655 | + PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}" |
2656 | + ],[ |
2657 | + PANDORA_RELEASE_COMMENT="trunk" |
2658 | + ]) |
2659 | + ]) |
2660 | + ]) |
2661 | + AS_IF([! test -d config],[mkdir -p config]) |
2662 | + cat > "config/bzr_revinfo" <<EOF |
2663 | +PANDORA_VC_REVNO=${PANDORA_VC_REVNO} |
2664 | +PANDORA_VC_REVID=${PANDORA_VC_REVID} |
2665 | +PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH} |
2666 | +PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE} |
2667 | +PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE} |
2668 | +PANDORA_RELEASE_COMMENT=${PANDORA_RELEASE_COMMENT} |
2669 | +EOF |
2670 | + |
2671 | + PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}" |
2672 | + PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}" |
2673 | + |
2674 | + VERSION="${PANDORA_RELEASE_VERSION}" |
2675 | + AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"], |
2676 | + [The real version of the software]) |
2677 | + AC_SUBST(PANDORA_VC_REVNO) |
2678 | + AC_SUBST(PANDORA_VC_REVID) |
2679 | + AC_SUBST(PANDORA_VC_BRANCH) |
2680 | + AC_SUBST(PANDORA_RELEASE_DATE) |
2681 | + AC_SUBST(PANDORA_RELEASE_NODOTS_DATE) |
2682 | + AC_SUBST(PANDORA_RELEASE_COMMENT) |
2683 | + AC_SUBST(PANDORA_RELEASE_VERSION) |
2684 | + AC_SUBST(PANDORA_RELEASE_ID) |
2685 | +]) |
2686 | |
2687 | === added file 'm4/pandora_version.m4' |
2688 | --- m4/pandora_version.m4 1970-01-01 00:00:00 +0000 |
2689 | +++ m4/pandora_version.m4 2009-12-18 19:32:13 +0000 |
2690 | @@ -0,0 +1,11 @@ |
2691 | +dnl Copyright (C) 2009 Sun Microsystems |
2692 | +dnl This file is free software; Sun Microsystems |
2693 | +dnl gives unlimited permission to copy and/or distribute it, |
2694 | +dnl with or without modifications, as long as this notice is preserved. |
2695 | + |
2696 | +AC_DEFUN([PANDORA_VERSION],[ |
2697 | + |
2698 | + PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \ |
2699 | + awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` |
2700 | + AC_SUBST([PANDORA_HEX_VERSION]) |
2701 | +]) |
2702 | |
2703 | === modified file 'm4/pandora_warnings.m4' |
2704 | --- m4/pandora_warnings.m4 2009-10-20 18:30:03 +0000 |
2705 | +++ m4/pandora_warnings.m4 2009-12-18 19:32:12 +0000 |
2706 | @@ -50,6 +50,7 @@ |
2707 | |
2708 | AS_IF([test "$ac_profiling" = "yes"],[ |
2709 | CC_PROFILING="-pg" |
2710 | + GCOV_LIBS="-pg -lgcov" |
2711 | save_LIBS="${LIBS}" |
2712 | LIBS="" |
2713 | AC_CHECK_LIB(c_p, read) |
2714 | @@ -61,7 +62,12 @@ |
2715 | ]) |
2716 | |
2717 | AS_IF([test "$ac_coverage" = "yes"], |
2718 | - [CC_COVERAGE="-fprofile-arcs -ftest-coverage"]) |
2719 | + [ |
2720 | + CC_COVERAGE="--coverage" |
2721 | + GCOV_LIBS="-lgcov" |
2722 | + ]) |
2723 | + |
2724 | + |
2725 | |
2726 | AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], |
2727 | [W_FAIL="-Werror"]) |
2728 | @@ -129,9 +135,9 @@ |
2729 | |
2730 | AS_IF([test "$INTELCC" = "yes"],[ |
2731 | m4_if(PW_LESS_WARNINGS,[no],[ |
2732 | - BASE_WARNINGS="-w1 -Wall -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" |
2733 | + BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" |
2734 | ],[ |
2735 | - BASE_WARNINGS="-w1 -Wall -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" |
2736 | + BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" |
2737 | ]) |
2738 | CC_WARNINGS="${BASE_WARNINGS}" |
2739 | CXX_WARNINGS="${BASE_WARNINGS}" |
2740 | @@ -217,8 +223,8 @@ |
2741 | AC_INCLUDES_DEFAULT])], |
2742 | [ac_cv_safe_to_use_Wredundant_decls_=yes], |
2743 | [ac_cv_safe_to_use_Wredundant_decls_=no]) |
2744 | - CXXFLAGS="${save_CXXFLAGS}" |
2745 | - AC_LANG_POP()]) |
2746 | + CXXFLAGS="${save_CXXFLAGS}" |
2747 | + AC_LANG_POP()]) |
2748 | AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], |
2749 | [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], |
2750 | [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) |
2751 | @@ -339,5 +345,6 @@ |
2752 | AC_SUBST(PROTOSKIP_WARNINGS) |
2753 | AC_SUBST(INNOBASE_SKIP_WARNINGS) |
2754 | AC_SUBST(NO_WERROR) |
2755 | + AC_SUBST([GCOV_LIBS]) |
2756 | |
2757 | ]) |
2758 | |
2759 | === added file 'm4/pandora_with_gettext.m4' |
2760 | --- m4/pandora_with_gettext.m4 1970-01-01 00:00:00 +0000 |
2761 | +++ m4/pandora_with_gettext.m4 2009-12-18 19:32:12 +0000 |
2762 | @@ -0,0 +1,41 @@ |
2763 | +dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
2764 | +dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
2765 | +dnl |
2766 | +dnl pandora-build: A pedantic build system |
2767 | +dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2768 | +dnl This file is free software; Sun Microsystems |
2769 | +dnl gives unlimited permission to copy and/or distribute it, |
2770 | +dnl with or without modifications, as long as this notice is preserved. |
2771 | +dnl |
2772 | +dnl From Monty Taylor |
2773 | + |
2774 | +AC_DEFUN([PANDORA_WITH_GETTEXT],[ |
2775 | + |
2776 | + m4_syscmd([if test -d po ; then |
2777 | + echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp |
2778 | + PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]` |
2779 | + for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort` |
2780 | + do |
2781 | + if grep gettext.h "$f" | grep include >/dev/null 2>&1 |
2782 | + then |
2783 | + echo "$f" >> po/POTFILES.in.stamp |
2784 | + fi |
2785 | + done |
2786 | + if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1 |
2787 | + then |
2788 | + rm po/POTFILES.in.stamp |
2789 | + else |
2790 | + mv po/POTFILES.in.stamp po/POTFILES.in |
2791 | + fi |
2792 | + fi]) |
2793 | + |
2794 | + AM_GNU_GETTEXT(external, need-formatstring-macros) |
2795 | + AM_GNU_GETTEXT_VERSION([0.17]) |
2796 | + AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[ |
2797 | + AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge, |
2798 | + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) |
2799 | + MSGMERGE="${GMSGMERGE}" |
2800 | + ]) |
2801 | + AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"]) |
2802 | + |
2803 | +]) |
2804 | |
2805 | === modified file 'm4/pandora_with_memcached.m4' |
2806 | --- m4/pandora_with_memcached.m4 2009-07-16 18:04:03 +0000 |
2807 | +++ m4/pandora_with_memcached.m4 2009-12-18 19:32:12 +0000 |
2808 | @@ -3,7 +3,7 @@ |
2809 | dnl gives unlimited permission to copy and/or distribute it, |
2810 | dnl with or without modifications, as long as this notice is preserved. |
2811 | |
2812 | -AC_DEFUN([PANDORA_WITH_MEMCACHED],[ |
2813 | +AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[ |
2814 | |
2815 | AC_ARG_WITH([memcached], |
2816 | [AS_HELP_STRING([--with-memcached], |
2817 | @@ -13,21 +13,28 @@ |
2818 | |
2819 | # just ignore the user if --without-memcached is passed.. it is |
2820 | # only used by make test |
2821 | - AS_IF([test "x$withval" = "xno"],[ |
2822 | + AS_IF([test "x$ac_cv_with_memcached" = "xno"],[ |
2823 | ac_cv_with_memcached=memcached |
2824 | MEMCACHED_BINARY=memcached |
2825 | ],[ |
2826 | - AS_IF([test -f "$withval"],[ |
2827 | - ac_cv_with_memcached=$withval |
2828 | - MEMCACHED_BINARY=$withval |
2829 | + AS_IF([test -f "$ac_cv_with_memcached"],[ |
2830 | + MEMCACHED_BINARY=$ac_cv_with_memcached |
2831 | ],[ |
2832 | AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") |
2833 | - AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ |
2834 | - AC_MSG_ERROR(["could not find memcached binary"]) |
2835 | - ]) |
2836 | ]) |
2837 | ]) |
2838 | AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", |
2839 | [Name of the memcached binary used in make test]) |
2840 | - |
2841 | -]) |
2842 | +]) |
2843 | + |
2844 | +AC_DEFUN([PANDORA_HAVE_MEMCACHED],[ |
2845 | + AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED]) |
2846 | +]) |
2847 | + |
2848 | +AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[ |
2849 | + AC_REQUIRE([PANDORA_HAVE_MEMCACHED]) |
2850 | + AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ |
2851 | + AC_MSG_ERROR(["could not find memcached binary"]) |
2852 | + ]) |
2853 | +]) |
2854 | + |
2855 | |
2856 | === removed file 'scripts/Makefile.am' |
2857 | --- scripts/Makefile.am 2009-05-14 07:52:23 +0000 |
2858 | +++ scripts/Makefile.am 1970-01-01 00:00:00 +0000 |
2859 | @@ -1,8 +0,0 @@ |
2860 | -# Gearman server and library |
2861 | -# Copyright (C) 2008 Brian Aker, Eric Day |
2862 | -# All rights reserved. |
2863 | -# |
2864 | -# Use and distribution licensed under the BSD license. See |
2865 | -# the COPYING file in this directory for full text. |
2866 | - |
2867 | -EXTRA_DIST= gearmand-init gearmand.xml gearmand README.solaris |
2868 | |
2869 | === removed file 'support/Makefile.am' |
2870 | --- support/Makefile.am 2009-04-01 01:49:18 +0000 |
2871 | +++ support/Makefile.am 1970-01-01 00:00:00 +0000 |
2872 | @@ -1,11 +0,0 @@ |
2873 | -# Gearman server and library |
2874 | -# Copyright (C) 2008 Brian Aker, Eric Day |
2875 | -# All rights reserved. |
2876 | -# |
2877 | -# Use and distribution licensed under the BSD license. See |
2878 | -# the COPYING file in this directory for full text. |
2879 | - |
2880 | -EXTRA_DIST = gearmand.spec |
2881 | - |
2882 | -pkgconfigdir = $(libdir)/pkgconfig |
2883 | -pkgconfig_DATA = gearmand.pc |
2884 | |
2885 | === modified file 'tests/client_test.c' |
2886 | --- tests/client_test.c 2009-10-29 20:18:00 +0000 |
2887 | +++ tests/client_test.c 2009-12-18 19:32:13 +0000 |
2888 | @@ -8,6 +8,10 @@ |
2889 | |
2890 | #include "config.h" |
2891 | |
2892 | +#if defined(NDEBUG) |
2893 | +# undef NDEBUG |
2894 | +#endif |
2895 | + |
2896 | #include <assert.h> |
2897 | #include <stdio.h> |
2898 | #include <stdlib.h> |
2899 | |
2900 | === renamed file 'tests/Makefile.am' => 'tests/include.am' |
2901 | --- tests/Makefile.am 2009-12-02 05:22:18 +0000 |
2902 | +++ tests/include.am 2009-12-18 19:32:12 +0000 |
2903 | @@ -5,66 +5,83 @@ |
2904 | # Use and distribution licensed under the BSD license. See |
2905 | # the COPYING file in the parent directory for full text. |
2906 | |
2907 | +noinst_LTLIBRARIES+= tests/libtest.la |
2908 | +tests_libtest_la_SOURCES= tests/test.c tests/test_gearmand.c |
2909 | + |
2910 | +TEST_LDADD = \ |
2911 | + libgearman/libgearman.la \ |
2912 | + libgearman-server/libgearman-server.la \ |
2913 | + tests/libtest.la |
2914 | + |
2915 | if HAVE_LIBMEMCACHED |
2916 | LIBMEMCACHED_PIDFILE = ${abs_top_builddir}/tests/Xumemc.pid |
2917 | -LIBMEMCACHED_TEST= memcached_test |
2918 | +LIBMEMCACHED_TEST= tests/memcached_test |
2919 | LIBMEMCACHED_SETUP= $(MEMCACHED_BINARY) -d -P ${LIBMEMCACHED_PIDFILE} -p 12555 |
2920 | LIBMEMCACHED_TEARDOWN= cat ${LIBMEMCACHED_PIDFILE} | xargs kill |
2921 | LIBMEMCACHED_RM= rm ${LIBMEMCACHED_PIDFILE} |
2922 | -LIBMEMCACHED_RES= memcached_test.res |
2923 | -LIBMEMCACHED_REC= memcached_test.rec |
2924 | -LIBMEMCACHED_RECORD= ./memcached_test > memcached_test.rec |
2925 | -LIBMEMCACHED_RUN= ./memcached_test > memcached_test.res |
2926 | -LIBMEMCACHED_CHECK= diff ${top_srcdir}/tests/memcached_test.rec memcached_test.res |
2927 | -LIBMEMCACHED_VALGRIND= libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes memcached_test |
2928 | -memcached_test_SOURCES= test.c test_gearmand.c memcached_test.c |
2929 | +LIBMEMCACHED_RES= tests/memcached_test.res |
2930 | +LIBMEMCACHED_REC= ${top_srcdir}/tests/memcached_test.rec |
2931 | +LIBMEMCACHED_RECORD= ${LIBMEMCACHED_TEST} > ${LIBMEMCACHED_REC} |
2932 | +LIBMEMCACHED_RUN= ${LIBMEMCACHED_TEST} > ${LIBMEMCACHED_RES} |
2933 | +LIBMEMCACHED_CHECK= diff ${LIBMEMCACHED_REC} ${LIBMEMCACHED_RES} |
2934 | +LIBMEMCACHED_VALGRIND= libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes ${LIBMEMCACHED_TEST} |
2935 | +check_PROGRAMS += tests/memcached_test |
2936 | endif |
2937 | |
2938 | +tests_memcached_test_SOURCES= tests/memcached_test.c |
2939 | +tests_memcached_test_LDADD= ${TEST_LDADD} |
2940 | + |
2941 | if HAVE_LIBSQLITE3 |
2942 | -SQLITE_TEST= sqlite_test |
2943 | -SQLITE_RES= sqlite_test.res |
2944 | -SQLITE_REC= sqlite_test.rec |
2945 | -SQLITE_RECORD= ./sqlite_test > sqlite_test.rec |
2946 | -SQLITE_RUN= ./sqlite_test > sqlite_test.res |
2947 | -SQLITE_CHECK= diff ${top_srcdir}/tests/sqlite_test.rec sqlite_test.res |
2948 | -SQLITE_RM= rm -f gearman.sql gearman.sql-journal |
2949 | -SQLITE_VALGRIND= libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes sqlite_test |
2950 | -sqlite_test_SOURCES= test.c test_gearmand.c sqlite_test.c |
2951 | +SQLITE_TEST= tests/sqlite_test |
2952 | +SQLITE_RES= tests/sqlite_test.res |
2953 | +SQLITE_REC= ${top_srcdir}/tests/sqlite_test.rec |
2954 | +SQLITE_RECORD= ${SQLITE_TEST} > ${SQLITE_REC} |
2955 | +SQLITE_RUN= ${SQLITE_TEST} > ${SQLITE_RES} |
2956 | +SQLITE_CHECK= diff ${SQLITE_REC} ${SQLITE_RES} |
2957 | +SQLITE_RM= rm -f tests/gearman.sql tests/gearman.sql-journal |
2958 | +SQLITE_VALGRIND= libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes ${SQLITE_TEST} |
2959 | +check_PROGRAMS += tests/sqlite_test |
2960 | endif |
2961 | |
2962 | -LDADD= \ |
2963 | - $(LTLIBUUID) \ |
2964 | - $(LTLIBEVENT) \ |
2965 | - $(top_builddir)/libgearman/libgearman.la \ |
2966 | - $(top_builddir)/libgearman-server/libgearman-server.la |
2967 | - |
2968 | -noinst_PROGRAMS= client_test worker_test cpp_test $(LIBMEMCACHED_TEST) $(SQLITE_TEST) |
2969 | -noinst_HEADERS= test.h test_gearmand.h test_worker.h |
2970 | - |
2971 | -client_test_SOURCES= test.c test_gearmand.c test_worker.c client_test.c |
2972 | - |
2973 | -worker_test_SOURCES= test.c test_gearmand.c worker_test.c |
2974 | +tests_sqlite_test_SOURCES= tests/sqlite_test.c |
2975 | +tests_sqlite_test_LDADD= ${TEST_LDADD} |
2976 | + |
2977 | + |
2978 | +check_PROGRAMS+= \ |
2979 | + tests/client_test \ |
2980 | + tests/worker_test \ |
2981 | + tests/cpp_test |
2982 | + |
2983 | +noinst_HEADERS+= \ |
2984 | + tests/test.h \ |
2985 | + tests/test_gearmand.h \ |
2986 | + tests/test_worker.h |
2987 | + |
2988 | +tests_client_test_SOURCES= tests/test_worker.c tests/client_test.c |
2989 | +tests_client_test_LDADD= ${TEST_LDADD} |
2990 | + |
2991 | +tests_worker_test_SOURCES= tests/worker_test.c |
2992 | +tests_worker_test_LDADD= ${TEST_LDADD} |
2993 | |
2994 | # Test linking with C++ application |
2995 | -cpp_test_SOURCES= cpp_test.cc |
2996 | - |
2997 | -CLEANFILES= client_test.res worker_test.res $(LIBMEMCACHED_RES) $(SQLITE_RES) |
2998 | - |
2999 | -EXTRA_DIST= client_test.rec worker_test.rec $(LIBMEMCACHED_REC) $(SQLITE_REC) |
3000 | - |
3001 | -record: client_test worker_test $(LIBMEMCACHED_TEST) $(SQLITE_TEST) |
3002 | - ./client_test > client_test.rec |
3003 | - ./worker_test > worker_test.rec |
3004 | +tests_cpp_test_SOURCES= tests/cpp_test.cc |
3005 | +tests_cpp_test_LDADD= ${TEST_LDADD} |
3006 | + |
3007 | +CLEANFILES+= tests/client_test.res tests/worker_test.res $(LIBMEMCACHED_RES) $(SQLITE_RES) |
3008 | + |
3009 | +EXTRA_DIST+= tests/client_test.rec tests/worker_test.rec $(LIBMEMCACHED_REC) $(SQLITE_REC) |
3010 | + |
3011 | +record: tests/client_test tests/worker_test $(LIBMEMCACHED_TEST) $(SQLITE_TEST) |
3012 | + tests/client_test > tests/client_test.rec |
3013 | + tests/worker_test > tests/worker_test.rec |
3014 | $(LIBMEMCACHED_RECORD) |
3015 | $(SQLITE_RECORD) |
3016 | |
3017 | -test: check |
3018 | - |
3019 | -check: client_test worker_test $(LIBMEMCACHED_TEST) $(SQLITE_TEST) |
3020 | - ./client_test > client_test.res |
3021 | - diff ${top_srcdir}/tests/client_test.rec client_test.res |
3022 | - ./worker_test > worker_test.res |
3023 | - diff ${top_srcdir}/tests/worker_test.rec worker_test.res |
3024 | +check-local: |
3025 | + tests/client_test > tests/client_test.res |
3026 | + diff ${top_srcdir}/tests/client_test.rec tests/client_test.res |
3027 | + tests/worker_test > tests/worker_test.res |
3028 | + diff ${top_srcdir}/tests/worker_test.rec tests/worker_test.res |
3029 | $(LIBMEMCACHED_SETUP) |
3030 | $(LIBMEMCACHED_RUN) |
3031 | $(LIBMEMCACHED_CHECK) |
3032 | @@ -74,8 +91,8 @@ |
3033 | $(SQLITE_CHECK) |
3034 | $(SQLITE_RM) |
3035 | |
3036 | -valgrind: client_test worker_test $(LIBMEMCACHED_TEST) $(SQLITE_VALGRIND) |
3037 | - libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes client_test |
3038 | - libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes worker_test |
3039 | +valgrind: ${check_PROGRAMS} |
3040 | + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/client_test |
3041 | + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/worker_test |
3042 | $(LIBMEMCACHED_VALGRIND) |
3043 | $(SQLITE_VALGRIND) |
3044 | |
3045 | === modified file 'tests/memcached_test.c' |
3046 | --- tests/memcached_test.c 2009-10-29 20:18:00 +0000 |
3047 | +++ tests/memcached_test.c 2009-12-18 19:32:12 +0000 |
3048 | @@ -8,6 +8,10 @@ |
3049 | |
3050 | #include "config.h" |
3051 | |
3052 | +#if defined(NDEBUG) |
3053 | +# undef NDEBUG |
3054 | +#endif |
3055 | + |
3056 | #include <assert.h> |
3057 | #include <stdio.h> |
3058 | #include <stdlib.h> |
3059 | |
3060 | === modified file 'tests/sqlite_test.c' |
3061 | --- tests/sqlite_test.c 2009-11-06 00:38:02 +0000 |
3062 | +++ tests/sqlite_test.c 2009-12-18 19:32:12 +0000 |
3063 | @@ -8,6 +8,10 @@ |
3064 | |
3065 | #include "config.h" |
3066 | |
3067 | +#if defined(NDEBUG) |
3068 | +# undef NDEBUG |
3069 | +#endif |
3070 | + |
3071 | #include <assert.h> |
3072 | #include <stdio.h> |
3073 | #include <stdlib.h> |
3074 | @@ -138,7 +142,7 @@ |
3075 | void *world_create(void) |
3076 | { |
3077 | worker_test_st *test; |
3078 | - const char *argv[2]= { "test_gearmand", "--libsqlite3-db=gearman.sql"}; |
3079 | + const char *argv[2]= { "test_gearmand", "--libsqlite3-db=tests/gearman.sql"}; |
3080 | |
3081 | assert((test= malloc(sizeof(worker_test_st))) != NULL); |
3082 | memset(test, 0, sizeof(worker_test_st)); |
3083 | |
3084 | === modified file 'tests/test_gearmand.c' |
3085 | --- tests/test_gearmand.c 2009-09-24 23:43:15 +0000 |
3086 | +++ tests/test_gearmand.c 2009-12-18 19:32:12 +0000 |
3087 | @@ -8,6 +8,10 @@ |
3088 | |
3089 | #include "config.h" |
3090 | |
3091 | +#if defined(NDEBUG) |
3092 | +# undef NDEBUG |
3093 | +#endif |
3094 | + |
3095 | #include <stdio.h> |
3096 | #include <string.h> |
3097 | #include <assert.h> |
3098 | |
3099 | === modified file 'tests/worker_test.c' |
3100 | --- tests/worker_test.c 2009-11-04 22:09:06 +0000 |
3101 | +++ tests/worker_test.c 2009-12-18 19:32:12 +0000 |
3102 | @@ -8,6 +8,10 @@ |
3103 | |
3104 | #include "config.h" |
3105 | |
3106 | +#if defined(NDEBUG) |
3107 | +# undef NDEBUG |
3108 | +#endif |
3109 | + |
3110 | #include <assert.h> |
3111 | #include <stdio.h> |
3112 | #include <stdlib.h> |
Updated to latest pandora-build.
Moves to the single root makefile model.
Fixes bug#491142.