Merge lp:~mordred/gearmand/update-build into lp:gearmand/1.0
- update-build
- Merge into 1.0
Proposed by
Monty Taylor
Status: | Merged |
---|---|
Merge reported by: | Brian Aker |
Merged at revision: | not available |
Proposed branch: | lp:~mordred/gearmand/update-build |
Merge into: | lp:gearmand/1.0 |
Diff against target: |
5832 lines (+3766/-372) 108 files modified
.quickly (+5/-0) bin/arguments.cc (+3/-1) bin/arguments.h (+3/-0) bin/client.h (+2/-1) bin/function.cc (+4/-3) bin/worker.h (+2/-1) config/autorun.sh (+3/-3) config/lcov.am (+42/-0) config/pandora-plugin (+752/-0) configure.ac (+1/-1) libgearman-server/byte.h (+2/-1) libgearman-server/plugins/protocol/http/protocol.cc (+2/-1) libgearman-server/plugins/queue/drizzle/include.am (+3/-0) libgearman-server/plugins/queue/drizzle/queue.cc (+14/-1) libgearman-server/plugins/queue/libmemcached/queue.cc (+1/-1) libgearman-server/plugins/queue/postgres/queue.cc (+6/-1) libgearman-server/plugins/queue/sqlite/queue.cc (+12/-2) libgearman-server/plugins/queue/tokyocabinet/queue.cc (+6/-1) libgearman/client.cc (+27/-26) libgearman/connection.cc (+22/-21) libgearman/job.cc (+3/-3) libgearman/task.cc (+1/-1) libgearman/universal.cc (+4/-4) libgearman/worker.cc (+15/-14) libtest/test.h (+4/-0) m4/iconv.m4 (+214/-0) m4/pandora_64bit.m4 (+5/-5) m4/pandora_bison.m4 (+33/-0) m4/pandora_canonical.m4 (+16/-14) m4/pandora_check_compiler_version.m4 (+2/-2) m4/pandora_check_cxx_standard.m4 (+3/-3) m4/pandora_cinttypes.m4 (+5/-0) m4/pandora_compile_stdcxx_0x.m4 (+103/-0) m4/pandora_cstdint.m4 (+5/-0) m4/pandora_cxx_demangle.m4 (+2/-2) m4/pandora_drizzle_build.m4 (+18/-47) m4/pandora_enable_dtrace.m4 (+37/-20) m4/pandora_ensure_gcc_version.m4 (+41/-18) m4/pandora_extensions.m4 (+2/-2) m4/pandora_fdatasync.m4 (+2/-2) m4/pandora_flex.m4 (+33/-0) m4/pandora_have_better_malloc.m4 (+2/-4) m4/pandora_have_boost.m4 (+93/-0) m4/pandora_have_gcc_atomics.m4 (+2/-2) m4/pandora_have_libaio.m4 (+56/-0) m4/pandora_have_libavahi.m4 (+3/-3) m4/pandora_have_libbdb.m4 (+3/-3) m4/pandora_have_libboost_date_time.m4 (+46/-0) m4/pandora_have_libboost_filesystem.m4 (+48/-0) m4/pandora_have_libboost_iostreams.m4 (+49/-0) m4/pandora_have_libboost_options.m4 (+47/-0) m4/pandora_have_libboost_regex.m4 (+54/-0) m4/pandora_have_libboost_test.m4 (+45/-0) m4/pandora_have_libboost_thread.m4 (+54/-0) m4/pandora_have_libcassandra.m4 (+1/-1) m4/pandora_have_libcurl.m4 (+62/-0) m4/pandora_have_libdl.m4 (+3/-3) m4/pandora_have_libdrizzle.m4 (+13/-4) m4/pandora_have_libevent.m4 (+3/-3) m4/pandora_have_libgearman.m4 (+3/-3) m4/pandora_have_libgtest.m4 (+47/-0) m4/pandora_have_libhaildb.m4 (+43/-0) m4/pandora_have_libhashkit.m4 (+42/-0) m4/pandora_have_libldap.m4 (+73/-0) m4/pandora_have_libmemcached.m4 (+21/-45) m4/pandora_have_libmysqlclient.m4 (+5/-5) m4/pandora_have_libndbclient.m4 (+80/-0) m4/pandora_have_libpcre.m4 (+73/-0) m4/pandora_have_libpq.m4 (+3/-3) m4/pandora_have_libpqxx.m4 (+44/-0) m4/pandora_have_libreadline.m4 (+3/-3) m4/pandora_have_libsqlite3.m4 (+3/-3) m4/pandora_have_libtokyocabinet.m4 (+3/-3) m4/pandora_have_libuuid.m4 (+3/-3) m4/pandora_have_libvbucket.m4 (+40/-0) m4/pandora_have_libxml2.m4 (+3/-3) m4/pandora_have_libz.m4 (+3/-3) m4/pandora_have_protobuf.m4 (+6/-4) m4/pandora_have_sasl.m4 (+133/-0) m4/pandora_have_thrift.m4 (+1/-1) m4/pandora_header_assert.m4 (+2/-2) m4/pandora_header_stdcxx_98.m4 (+83/-0) m4/pandora_intltool.m4 (+225/-0) m4/pandora_libtool.m4 (+3/-3) m4/pandora_optimize.m4 (+6/-10) m4/pandora_platform.m4 (+30/-3) m4/pandora_plugins.m4 (+14/-5) m4/pandora_print_callstack.m4 (+2/-2) m4/pandora_pthread.m4 (+1/-1) m4/pandora_python3_devel.m4 (+9/-9) m4/pandora_sasl.m4 (+5/-5) m4/pandora_shared_ptr.m4 (+2/-2) m4/pandora_stl_hash.m4 (+6/-1) m4/pandora_vc_build.m4 (+53/-9) m4/pandora_version.m4 (+2/-2) m4/pandora_visibility.m4 (+14/-4) m4/pandora_warnings.m4 (+1/-1) m4/pandora_with_lua.m4 (+55/-0) m4/pandora_with_memcached.m4 (+3/-3) m4/pandora_with_php.m4 (+1/-1) m4/pandora_with_python.m4 (+1/-1) m4/pandora_with_python3.m4 (+1/-1) m4/pandora_with_valgrind.m4 (+17/-0) m4/po.m4 (+449/-0) m4/progtest.m4 (+92/-0) util/instance.h (+5/-1) util/operation.h (+6/-1) util/pidfile.cc (+2/-1) |
To merge this branch: | bzr merge lp:~mordred/gearmand/update-build |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gearman-developers | Pending | ||
Review via email: mp+57985@code.launchpad.net |
Commit message
Description of the change
Updated the pandora-build stuff. This should properly die on too old libmemcached, find new libdrizzle and fix the various c++ warnings.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.quickly' | |||
2 | --- .quickly 1970-01-01 00:00:00 +0000 | |||
3 | +++ .quickly 2011-04-16 05:39:23 +0000 | |||
4 | @@ -0,0 +1,5 @@ | |||
5 | 1 | project = gearmand | ||
6 | 2 | version = 0.4.2 | ||
7 | 3 | template = pandora-build | ||
8 | 4 | project-type = application | ||
9 | 5 | pandora-version = 0.176 | ||
10 | 0 | 6 | ||
11 | === modified file 'bin/arguments.cc' | |||
12 | --- bin/arguments.cc 2011-04-13 04:12:34 +0000 | |||
13 | +++ bin/arguments.cc 2011-04-16 05:39:23 +0000 | |||
14 | @@ -26,6 +26,7 @@ | |||
15 | 26 | { | 26 | { |
16 | 27 | 27 | ||
17 | 28 | Args::Args(int p_argc, char *p_argv[]) : | 28 | Args::Args(int p_argc, char *p_argv[]) : |
18 | 29 | _functions(), | ||
19 | 29 | _host(NULL), | 30 | _host(NULL), |
20 | 30 | _port(0), | 31 | _port(0), |
21 | 31 | _count(0), | 32 | _count(0), |
22 | @@ -41,7 +42,8 @@ | |||
23 | 41 | _priority(GEARMAN_JOB_PRIORITY_NORMAL), | 42 | _priority(GEARMAN_JOB_PRIORITY_NORMAL), |
24 | 42 | _timeout(-1), | 43 | _timeout(-1), |
25 | 43 | argv(p_argv), | 44 | argv(p_argv), |
27 | 44 | _error(0) | 45 | _error(0), |
28 | 46 | _pid_file("") | ||
29 | 45 | { | 47 | { |
30 | 46 | init(p_argc); | 48 | init(p_argc); |
31 | 47 | } | 49 | } |
32 | 48 | 50 | ||
33 | === modified file 'bin/arguments.h' | |||
34 | --- bin/arguments.h 2011-03-03 07:48:59 +0000 | |||
35 | +++ bin/arguments.h 2011-04-16 05:39:23 +0000 | |||
36 | @@ -162,6 +162,9 @@ | |||
37 | 162 | { | 162 | { |
38 | 163 | _functions.push_back(Function(name)); | 163 | _functions.push_back(Function(name)); |
39 | 164 | } | 164 | } |
40 | 165 | |||
41 | 166 | Args(const Args&); | ||
42 | 167 | Args& operator=(const Args&); | ||
43 | 165 | }; | 168 | }; |
44 | 166 | 169 | ||
45 | 167 | } // namespace gearman_client | 170 | } // namespace gearman_client |
46 | 168 | 171 | ||
47 | === modified file 'bin/client.h' | |||
48 | --- bin/client.h 2011-03-08 20:32:44 +0000 | |||
49 | +++ bin/client.h 2011-04-16 05:39:23 +0000 | |||
50 | @@ -40,7 +40,8 @@ | |||
51 | 40 | class Client | 40 | class Client |
52 | 41 | { | 41 | { |
53 | 42 | public: | 42 | public: |
55 | 43 | Client() | 43 | Client() : |
56 | 44 | _client() | ||
57 | 44 | { | 45 | { |
58 | 45 | if (gearman_client_create(&_client) == NULL) | 46 | if (gearman_client_create(&_client) == NULL) |
59 | 46 | { | 47 | { |
60 | 47 | 48 | ||
61 | === modified file 'bin/function.cc' | |||
62 | --- bin/function.cc 2011-03-03 07:48:59 +0000 | |||
63 | +++ bin/function.cc 2011-04-16 05:39:23 +0000 | |||
64 | @@ -14,10 +14,11 @@ | |||
65 | 14 | 14 | ||
66 | 15 | namespace gearman_client | 15 | namespace gearman_client |
67 | 16 | { | 16 | { |
69 | 17 | Function::Function(const char *name_arg) | 17 | Function::Function(const char *name_arg) : |
70 | 18 | _name(), | ||
71 | 19 | _task(), | ||
72 | 20 | _buffer() | ||
73 | 18 | { | 21 | { |
74 | 19 | memset(&_task, 0, sizeof(gearman_task_st)); | ||
75 | 20 | |||
76 | 21 | // copy the name into the _name vector | 22 | // copy the name into the _name vector |
77 | 22 | size_t length= strlen(name_arg); | 23 | size_t length= strlen(name_arg); |
78 | 23 | _name.resize(length +1); | 24 | _name.resize(length +1); |
79 | 24 | 25 | ||
80 | === modified file 'bin/worker.h' | |||
81 | --- bin/worker.h 2011-03-08 20:32:44 +0000 | |||
82 | +++ bin/worker.h 2011-04-16 05:39:23 +0000 | |||
83 | @@ -40,7 +40,8 @@ | |||
84 | 40 | class Worker | 40 | class Worker |
85 | 41 | { | 41 | { |
86 | 42 | public: | 42 | public: |
88 | 43 | Worker() | 43 | Worker() : |
89 | 44 | _worker() | ||
90 | 44 | { | 45 | { |
91 | 45 | if (gearman_worker_create(&_worker) == NULL) | 46 | if (gearman_worker_create(&_worker) == NULL) |
92 | 46 | { | 47 | { |
93 | 47 | 48 | ||
94 | === modified file 'config/autorun.sh' | |||
95 | --- config/autorun.sh 2009-12-18 18:02:39 +0000 | |||
96 | +++ config/autorun.sh 2011-04-16 05:39:23 +0000 | |||
97 | @@ -1,7 +1,7 @@ | |||
98 | 1 | #!/bin/sh | 1 | #!/bin/sh |
99 | 2 | # | 2 | # |
102 | 3 | # Copyright (c) 2006 Jan Kneschke | 3 | # Copyright (C) 2006 Jan Kneschke |
103 | 4 | # Copyright (c) 2009 Sun Microsystems | 4 | # Copyright (C) 2009 Sun Microsystems, Inc. |
104 | 5 | # All rights reserved. | 5 | # All rights reserved. |
105 | 6 | # | 6 | # |
106 | 7 | # Redistribution and use in source and binary forms, with or without | 7 | # Redistribution and use in source and binary forms, with or without |
107 | @@ -35,7 +35,7 @@ | |||
108 | 35 | LIBTOOLIZE_FLAGS=" --automake --copy --force" | 35 | LIBTOOLIZE_FLAGS=" --automake --copy --force" |
109 | 36 | # --add-missing instructs automake to install missing auxiliary files | 36 | # --add-missing instructs automake to install missing auxiliary files |
110 | 37 | # and --force to overwrite them if they already exist | 37 | # and --force to overwrite them if they already exist |
112 | 38 | AUTOMAKE_FLAGS="--add-missing --copy --force" | 38 | AUTOMAKE_FLAGS="--add-missing --copy --force --foreign" |
113 | 39 | ACLOCAL_FLAGS="-I m4" | 39 | ACLOCAL_FLAGS="-I m4" |
114 | 40 | 40 | ||
115 | 41 | ARGV0=$0 | 41 | ARGV0=$0 |
116 | 42 | 42 | ||
117 | === added file 'config/lcov.am' | |||
118 | --- config/lcov.am 1970-01-01 00:00:00 +0000 | |||
119 | +++ config/lcov.am 2011-04-16 05:39:23 +0000 | |||
120 | @@ -0,0 +1,42 @@ | |||
121 | 1 | # Copyright (C) 2010 Hartmut Holzgraefe | ||
122 | 2 | # | ||
123 | 3 | # This program is free software; you can redistribute it and/or modify | ||
124 | 4 | # it under the terms of the GNU General Public License as published by | ||
125 | 5 | # the Free Software Foundation; version 2 of the License. | ||
126 | 6 | # | ||
127 | 7 | # This program is distributed in the hope that it will be useful, | ||
128 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
129 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
130 | 10 | # GNU General Public License for more details. | ||
131 | 11 | # | ||
132 | 12 | # You should have received a copy of the GNU General Public License | ||
133 | 13 | # along with this program; if not, write to the Free Software | ||
134 | 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
135 | 15 | |||
136 | 16 | LCOV = lcov | ||
137 | 17 | LCOV_GENHTML = genhtml | ||
138 | 18 | |||
139 | 19 | lcov: lcov-html | ||
140 | 20 | |||
141 | 21 | lcov-test: lcov-clean-data test | ||
142 | 22 | |||
143 | 23 | drizzle_lcov.info: lcov-test | ||
144 | 24 | @echo "Generating $@" | ||
145 | 25 | $(LCOV) --directory . --capture --base-directory . --output-file $@ | ||
146 | 26 | $(LCOV) --remove $@ '/usr/include/*' --output-file $@ | ||
147 | 27 | $(LCOV) --remove $@ '/usr/local/include/*' --output-file $@ | ||
148 | 28 | @echo | ||
149 | 29 | |||
150 | 30 | lcov-html: drizzle_lcov.info | ||
151 | 31 | @echo "Generating lcov HTML" | ||
152 | 32 | @$(LCOV_GENHTML) --legend --output-directory lcov_html/ --title "Drizzle Code Coverage" $< | ||
153 | 33 | |||
154 | 34 | lcov-clean: | ||
155 | 35 | rm -f drizzle_lcov.info | ||
156 | 36 | rm -rf lcov_data/ | ||
157 | 37 | rm -rf lcov_html/ | ||
158 | 38 | |||
159 | 39 | lcov-clean-data: | ||
160 | 40 | @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f | ||
161 | 41 | |||
162 | 42 | |||
163 | 0 | 43 | ||
164 | === added file 'config/pandora-plugin' | |||
165 | --- config/pandora-plugin 1970-01-01 00:00:00 +0000 | |||
166 | +++ config/pandora-plugin 2011-04-16 05:39:23 +0000 | |||
167 | @@ -0,0 +1,752 @@ | |||
168 | 1 | #!/usr/bin/python | ||
169 | 2 | |||
170 | 3 | # Copyright (C) 2009 Sun Microsystems, Inc. | ||
171 | 4 | # Copyright (C) 2010, 2011 Monty Taylor | ||
172 | 5 | # | ||
173 | 6 | # This program is free software; you can redistribute it and/or modify | ||
174 | 7 | # it under the terms of the GNU General Public License as published by | ||
175 | 8 | # the Free Software Foundation; version 2 of the License. | ||
176 | 9 | # | ||
177 | 10 | # This program is distributed in the hope that it will be useful, | ||
178 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
179 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
180 | 13 | # GNU General Public License for more details. | ||
181 | 14 | # | ||
182 | 15 | # You should have received a copy of the GNU General Public License | ||
183 | 16 | # along with this program; if not, write to the Free Software | ||
184 | 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
185 | 18 | |||
186 | 19 | pandora_plugin_file = 'config/pandora-plugin.ini' | ||
187 | 20 | |||
188 | 21 | # Find plugins in the tree and add them to the build system | ||
189 | 22 | |||
190 | 23 | import ConfigParser, os, sys | ||
191 | 24 | import datetime, time | ||
192 | 25 | import subprocess | ||
193 | 26 | |||
194 | 27 | plugin_am_file=None | ||
195 | 28 | plugin_ac_file=None | ||
196 | 29 | plugin_doc_index=None | ||
197 | 30 | |||
198 | 31 | class ChangeProtectedFile(object): | ||
199 | 32 | |||
200 | 33 | def __init__(self, fname): | ||
201 | 34 | self.bogus_file= False | ||
202 | 35 | self.real_fname= fname | ||
203 | 36 | self.new_fname= "%s.new" % fname | ||
204 | 37 | try: | ||
205 | 38 | self.new_file= open(self.new_fname,'w+') | ||
206 | 39 | except IOError: | ||
207 | 40 | self.bogus_file= True | ||
208 | 41 | |||
209 | 42 | def write(self, text): | ||
210 | 43 | if not self.bogus_file: | ||
211 | 44 | self.new_file.write(text) | ||
212 | 45 | |||
213 | 46 | # We've written all of this out into .new files, now we only copy them | ||
214 | 47 | # over the old ones if they are different, so that we don't cause | ||
215 | 48 | # unnecessary recompiles | ||
216 | 49 | def close(self): | ||
217 | 50 | """Return True if the file had changed.""" | ||
218 | 51 | if self.bogus_file: | ||
219 | 52 | return | ||
220 | 53 | self.new_file.seek(0) | ||
221 | 54 | new_content = self.new_file.read() | ||
222 | 55 | self.new_file.close() | ||
223 | 56 | try: | ||
224 | 57 | old_file = file(self.real_fname, 'r') | ||
225 | 58 | old_content = old_file.read() | ||
226 | 59 | old_file.close() | ||
227 | 60 | except IOError: | ||
228 | 61 | old_content = None | ||
229 | 62 | if new_content != old_content: | ||
230 | 63 | if old_content != None: | ||
231 | 64 | os.unlink(self.real_fname) | ||
232 | 65 | os.rename(self.new_fname, self.real_fname) | ||
233 | 66 | return True | ||
234 | 67 | else: | ||
235 | 68 | try: | ||
236 | 69 | os.unlink(self.new_fname) | ||
237 | 70 | except: | ||
238 | 71 | pass | ||
239 | 72 | |||
240 | 73 | |||
241 | 74 | def write_external_configure(plugin, plugin_file): | ||
242 | 75 | """Write the initial bits of the configure.ac file""" | ||
243 | 76 | if not os.path.exists('m4'): | ||
244 | 77 | os.mkdir('m4') | ||
245 | 78 | plugin_file.write(""" | ||
246 | 79 | AC_PREREQ(2.59)dnl Minimum Autoconf version required. | ||
247 | 80 | AC_INIT([%(name)s],[%(version)s],[%(url)s]) | ||
248 | 81 | AC_CONFIG_SRCDIR([%(main_source)s]) | ||
249 | 82 | AC_CONFIG_AUX_DIR(config) | ||
250 | 83 | |||
251 | 84 | PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42,skip-visibility) | ||
252 | 85 | |||
253 | 86 | PANDORA_REQUIRE_LIBPROTOBUF | ||
254 | 87 | PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0]) | ||
255 | 88 | PANDORA_REQUIRE_PROTOC | ||
256 | 89 | |||
257 | 90 | AC_LANG_PUSH(C++) | ||
258 | 91 | PANDORA_REQUIRE_PTHREAD | ||
259 | 92 | PANDORA_REQUIRE_LIBDL | ||
260 | 93 | AC_LANG_POP | ||
261 | 94 | |||
262 | 95 | PANDORA_USE_BETTER_MALLOC | ||
263 | 96 | |||
264 | 97 | PANDORA_DRIZZLE_BUILD | ||
265 | 98 | """ % plugin) | ||
266 | 99 | |||
267 | 100 | write_plugin_ac(plugin, plugin_file) | ||
268 | 101 | |||
269 | 102 | plugin_file.write(""" | ||
270 | 103 | AC_CONFIG_FILES(Makefile) | ||
271 | 104 | |||
272 | 105 | AC_OUTPUT | ||
273 | 106 | |||
274 | 107 | echo "---" | ||
275 | 108 | echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT" | ||
276 | 109 | echo "" | ||
277 | 110 | echo " * Installation prefix: $prefix" | ||
278 | 111 | echo " * System type: $host_vendor-$host_os" | ||
279 | 112 | echo " * Host CPU: $host_cpu" | ||
280 | 113 | echo " * C Compiler: $CC_VERSION" | ||
281 | 114 | echo " * C++ Compiler: $CXX_VERSION" | ||
282 | 115 | echo " * Debug enabled: $with_debug" | ||
283 | 116 | echo " * Warnings as failure: $ac_cv_warnings_as_errors" | ||
284 | 117 | echo " * C++ cstdint location: $ac_cv_cxx_cstdint" | ||
285 | 118 | echo " * C++ hash_map location: $ac_cv_cxx_hash_map" | ||
286 | 119 | echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace" | ||
287 | 120 | echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace" | ||
288 | 121 | echo "" | ||
289 | 122 | echo "---" | ||
290 | 123 | |||
291 | 124 | """ % plugin) | ||
292 | 125 | |||
293 | 126 | def write_external_makefile(plugin, plugin_file): | ||
294 | 127 | |||
295 | 128 | plugin_file.write(""" | ||
296 | 129 | ACLOCAL_AMFLAGS = -I m4 --force | ||
297 | 130 | VERSION=$(PANDORA_RELEASE_VERSION) | ||
298 | 131 | |||
299 | 132 | pkgplugindir=%(pkgplugindir)s | ||
300 | 133 | EXTRA_DIST = plugin.ini | ||
301 | 134 | |||
302 | 135 | noinst_HEADERS= | ||
303 | 136 | nobase_include_HEADERS= | ||
304 | 137 | nobase_pkginclude_HEADERS= | ||
305 | 138 | check_PROGRAMS= | ||
306 | 139 | noinst_LTLIBRARIES= | ||
307 | 140 | bin_PROGRAMS= | ||
308 | 141 | |||
309 | 142 | |||
310 | 143 | """ % plugin) | ||
311 | 144 | if plugin['headers'] != "": | ||
312 | 145 | plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin) | ||
313 | 146 | if plugin['install_headers'] != "": | ||
314 | 147 | plugin_file.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin) | ||
315 | 148 | if plugin['testsuite']: | ||
316 | 149 | if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "": | ||
317 | 150 | plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin) | ||
318 | 151 | plugin_file.write(""" | ||
319 | 152 | pkgplugin_LTLIBRARIES=%(libname)s.la | ||
320 | 153 | %(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS) | ||
321 | 154 | %(libname)s_la_LIBADD=%(libs)s | ||
322 | 155 | %(libname)s_la_DEPENDENCIES=%(libs)s | ||
323 | 156 | %(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s | ||
324 | 157 | %(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s | ||
325 | 158 | %(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s | ||
326 | 159 | %(libname)s_la_SOURCES=%(sources)s | ||
327 | 160 | check_PROGRAMS += %(tests)s | ||
328 | 161 | """ % plugin) | ||
329 | 162 | plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am') | ||
330 | 163 | if os.path.exists(plugin_am_file): | ||
331 | 164 | plugin_file.write('include %s\n' % plugin_am_file) | ||
332 | 165 | |||
333 | 166 | def write_external_plugin(): | ||
334 | 167 | """Return True if the plugin had changed.""" | ||
335 | 168 | plugin = read_plugin_ini('.') | ||
336 | 169 | expand_plugin_ini(plugin) | ||
337 | 170 | plugin_file = ChangeProtectedFile('configure.ac') | ||
338 | 171 | write_external_configure(plugin, plugin_file) | ||
339 | 172 | result = plugin_file.close() | ||
340 | 173 | plugin_file = ChangeProtectedFile('Makefile.am') | ||
341 | 174 | write_external_makefile(plugin, plugin_file) | ||
342 | 175 | # Write some stub configure.ac and Makefile.am files that include the above | ||
343 | 176 | result = plugin_file.close() or result | ||
344 | 177 | return result | ||
345 | 178 | |||
346 | 179 | def write_plugin(plugin, plugin_ini_list): | ||
347 | 180 | # Since this function is recursive, make sure we're not already in it. | ||
348 | 181 | if plugin.has_key('writing_status'): | ||
349 | 182 | if plugin['writing_status'] == 'done': | ||
350 | 183 | return | ||
351 | 184 | else: | ||
352 | 185 | print "Dependency loop detected with %s" % plugin['name'] | ||
353 | 186 | exit(1) | ||
354 | 187 | |||
355 | 188 | plugin['writing_status'] = 'dependencies' | ||
356 | 189 | |||
357 | 190 | # Write all dependencies first to get around annoying automake bug | ||
358 | 191 | for dependency in plugin['dependency_list']: | ||
359 | 192 | found = False | ||
360 | 193 | for find_plugin in plugin_ini_list: | ||
361 | 194 | if find_plugin['module_name'] == dependency: | ||
362 | 195 | found = True | ||
363 | 196 | write_plugin(find_plugin, plugin_ini_list) | ||
364 | 197 | break | ||
365 | 198 | if found is False: | ||
366 | 199 | print "Could not find dependency %s: %s" % (plugin['name'], dependency) | ||
367 | 200 | exit(1) | ||
368 | 201 | |||
369 | 202 | write_plugin_ac(plugin, plugin_ac_file) | ||
370 | 203 | write_plugin_am(plugin, plugin_am_file) | ||
371 | 204 | write_plugin_docs(plugin, plugin_doc_index, plugin_am_file) | ||
372 | 205 | plugin['writing_status'] = 'done' | ||
373 | 206 | |||
374 | 207 | def write_plugin_docs(plugin, doc_index, plugin_am): | ||
375 | 208 | if plugin['docs'] is not None and os.path.isdir("docs/plugins"): | ||
376 | 209 | if not os.path.exists(os.path.join("docs/plugins",plugin["name"])): | ||
377 | 210 | os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"])) | ||
378 | 211 | doc_index.write(""" | ||
379 | 212 | %(name)s/index""" % plugin) | ||
380 | 213 | plugin_am.write(""" | ||
381 | 214 | EXTRA_DIST+=${top_srcdir}/docs/plugins/%(name)s/*.rst | ||
382 | 215 | """ % plugin) | ||
383 | 216 | |||
384 | 217 | def write_plugin_ac(plugin, plugin_ac): | ||
385 | 218 | # | ||
386 | 219 | # Write plugin config instructions into plugin.ac file. | ||
387 | 220 | # | ||
388 | 221 | plugin_ac_file=os.path.join(plugin['rel_path'],'plugin.ac') | ||
389 | 222 | plugin_m4_dir=os.path.join(plugin['rel_path'],'m4') | ||
390 | 223 | plugin_m4_files=[] | ||
391 | 224 | if os.path.exists(plugin_m4_dir) and os.path.isdir(plugin_m4_dir): | ||
392 | 225 | for m4_file in os.listdir(plugin_m4_dir): | ||
393 | 226 | if os.path.splitext(m4_file)[-1] == '.m4': | ||
394 | 227 | plugin_m4_files.append(os.path.join(plugin['rel_path'], m4_file)) | ||
395 | 228 | plugin_ac.write(""" | ||
396 | 229 | dnl Config for %(title)s | ||
397 | 230 | """ % plugin) | ||
398 | 231 | for m4_file in plugin_m4_files: | ||
399 | 232 | plugin_ac.write('m4_sinclude([%s])\n' % m4_file) | ||
400 | 233 | plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()]) | ||
401 | 234 | |||
402 | 235 | plugin_ac.write(""" | ||
403 | 236 | AC_ARG_WITH([%(name_with_dashes)s-plugin],[ | ||
404 | 237 | dnl indented wierd to make the help output correct | ||
405 | 238 | AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(enabled)s@:>@]) | ||
406 | 239 | AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s]) | ||
407 | 240 | ],[ | ||
408 | 241 | with_%(name)s_plugin="$withval" | ||
409 | 242 | AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[ | ||
410 | 243 | requested_%(name)s_plugin="yes" | ||
411 | 244 | ],[ | ||
412 | 245 | requested_%(name)s_plugin="no" | ||
413 | 246 | ]) | ||
414 | 247 | ],[ | ||
415 | 248 | with_%(name)s_plugin="%(enabled)s" | ||
416 | 249 | requested_%(name)s_plugin="no" | ||
417 | 250 | ]) | ||
418 | 251 | AC_ARG_WITH([static-%(name_with_dashes)s-plugin],[ | ||
419 | 252 | AS_HELP_STRING([--with-static-%(name_with_dashes)s-plugin],[Build Archive Storage Engine. @<:@default=%(static_yesno)s@:>@]) | ||
420 | 253 | AS_HELP_STRING([--without-static-%(name_with_dashes)s-plugin],[Disable building Archive Storage Engine]) | ||
421 | 254 | ],[ | ||
422 | 255 | with_static_%(name)s_plugin=${withval} | ||
423 | 256 | ],[ | ||
424 | 257 | with_static_%(name)s_plugin=%(static_yesno)s | ||
425 | 258 | ]) | ||
426 | 259 | AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[ | ||
427 | 260 | shared_%(name)s_plugin=no | ||
428 | 261 | ],[ | ||
429 | 262 | shared_%(name)s_plugin=yes | ||
430 | 263 | ]) | ||
431 | 264 | AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[ | ||
432 | 265 | dnl indented wierd to make the help output correct | ||
433 | 266 | AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@]) | ||
434 | 267 | AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable loading %(title)s by default.]) | ||
435 | 268 | ], | ||
436 | 269 | [enable_%(name)s_plugin="$enableval"], | ||
437 | 270 | [enable_%(name)s_plugin=%(default_yesno)s]) | ||
438 | 271 | |||
439 | 272 | """ % plugin) | ||
440 | 273 | if os.path.exists(plugin_ac_file): | ||
441 | 274 | plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file) | ||
442 | 275 | # The plugin author has specified some check to make to determine | ||
443 | 276 | # if the plugin can be built. If the plugin is turned on and this | ||
444 | 277 | # check fails, then configure should error out. If the plugin is not | ||
445 | 278 | # turned on, then the normal conditional build stuff should just let | ||
446 | 279 | # it silently not build | ||
447 | 280 | if plugin['has_build_conditional']: | ||
448 | 281 | plugin_ac.write(""" | ||
449 | 282 | AS_IF([test %(build_conditional)s], | ||
450 | 283 | [], dnl build_conditional can only negate | ||
451 | 284 | [ | ||
452 | 285 | AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"], | ||
453 | 286 | [AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])]) | ||
454 | 287 | with_%(name)s_plugin=no | ||
455 | 288 | ]) | ||
456 | 289 | |||
457 | 290 | """ % plugin) | ||
458 | 291 | if not plugin['unconditional']: | ||
459 | 292 | plugin_ac.write(""" | ||
460 | 293 | AM_CONDITIONAL([%(static_build_conditional_tag)s], | ||
461 | 294 | [test %(build_conditional)s -a ! %(shared_build)s]) | ||
462 | 295 | AM_CONDITIONAL([%(shared_build_conditional_tag)s], | ||
463 | 296 | [test %(build_conditional)s -a %(shared_build)s]) | ||
464 | 297 | AM_CONDITIONAL([%(build_conditional_tag)s], | ||
465 | 298 | [test %(build_conditional)s]) | ||
466 | 299 | """ % plugin) | ||
467 | 300 | |||
468 | 301 | plugin_ac.write(""" | ||
469 | 302 | AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[ | ||
470 | 303 | """ % plugin) | ||
471 | 304 | if plugin['testsuite']: | ||
472 | 305 | plugin_ac.write(""" | ||
473 | 306 | pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}" | ||
474 | 307 | """ % plugin) | ||
475 | 308 | plugin_ac.write(""" | ||
476 | 309 | AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[ | ||
477 | 310 | |||
478 | 311 | AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[ | ||
479 | 312 | pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}" | ||
480 | 313 | pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}" | ||
481 | 314 | PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s" | ||
482 | 315 | ]) | ||
483 | 316 | pandora_builtin_list="%(module_name)s,${pandora_builtin_list}" | ||
484 | 317 | pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}" | ||
485 | 318 | pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la" | ||
486 | 319 | ],[ | ||
487 | 320 | AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[ | ||
488 | 321 | pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}" | ||
489 | 322 | ]) | ||
490 | 323 | ]) | ||
491 | 324 | """ % plugin) | ||
492 | 325 | plugin_ac.write("])\n") | ||
493 | 326 | |||
494 | 327 | def fix_file_paths(plugin, files): | ||
495 | 328 | # TODO: determine path to plugin dir relative to top_srcdir... append it to | ||
496 | 329 | # source files if they don't already have it | ||
497 | 330 | new_files="" | ||
498 | 331 | if plugin['plugin_dir'] != ".": | ||
499 | 332 | for file in files.split(): | ||
500 | 333 | if not file.startswith(plugin['rel_path']): | ||
501 | 334 | file= os.path.join(plugin['rel_path'], file) | ||
502 | 335 | new_files= "%s %s" % (new_files, file) | ||
503 | 336 | else: | ||
504 | 337 | new_files= " ".join(plugin['sources'].split()) | ||
505 | 338 | if new_files != "": | ||
506 | 339 | return new_files | ||
507 | 340 | return files | ||
508 | 341 | |||
509 | 342 | def expand_plugin_ini(plugin): | ||
510 | 343 | if plugin['name'] == "**OUT-OF-TREE**": | ||
511 | 344 | print "Out of tree plugins require the name field to be specified in plugin.ini" | ||
512 | 345 | sys.exit(1) | ||
513 | 346 | |||
514 | 347 | if plugin['plugin_dir'] == ".": | ||
515 | 348 | plugin['rel_path']= plugin['plugin_dir'] | ||
516 | 349 | plugin['unconditional']=True | ||
517 | 350 | else: | ||
518 | 351 | plugin['rel_path']= plugin['plugin_dir'][len(config['top_srcdir'])+len(os.path.sep):] | ||
519 | 352 | plugin['unconditional']=False | ||
520 | 353 | |||
521 | 354 | plugin['sources']= fix_file_paths(plugin, plugin['sources']) | ||
522 | 355 | plugin['main_source']= plugin['sources'].split()[0] | ||
523 | 356 | plugin['headers']= fix_file_paths(plugin, plugin['headers']) | ||
524 | 357 | plugin['install_headers']= fix_file_paths(plugin, plugin['install_headers']) | ||
525 | 358 | plugin['tests']= fix_file_paths(plugin, plugin['tests']) | ||
526 | 359 | |||
527 | 360 | # Make a yes/no version for autoconf help messages | ||
528 | 361 | if plugin['load_by_default']: | ||
529 | 362 | plugin['default_yesno']="yes" | ||
530 | 363 | else: | ||
531 | 364 | plugin['default_yesno']="no" | ||
532 | 365 | |||
533 | 366 | if plugin.has_key('extra_dist'): | ||
534 | 367 | plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()]) | ||
535 | 368 | |||
536 | 369 | |||
537 | 370 | if plugin['static']: | ||
538 | 371 | plugin['static_yesno']="yes" | ||
539 | 372 | else: | ||
540 | 373 | plugin['static_yesno']="no" | ||
541 | 374 | plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper() | ||
542 | 375 | plugin['shared_build_conditional_tag']= "BUILD_%s_PLUGIN_SHARED" % plugin['name'].upper() | ||
543 | 376 | plugin['static_build_conditional_tag']= "BUILD_%s_PLUGIN_STATIC" % plugin['name'].upper() | ||
544 | 377 | plugin['name_with_dashes']= plugin['name'].replace('_','-') | ||
545 | 378 | if plugin.has_key('build_conditional'): | ||
546 | 379 | plugin['has_build_conditional']=True | ||
547 | 380 | plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes" -a %(build_conditional)s' % plugin | ||
548 | 381 | else: | ||
549 | 382 | plugin['has_build_conditional']=False | ||
550 | 383 | plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin | ||
551 | 384 | plugin['shared_build']='"x${shared_%(name)s_plugin}" = "xyes"' %plugin | ||
552 | 385 | |||
553 | 386 | if plugin['install']: | ||
554 | 387 | plugin['library_type']= 'pkgplugin' | ||
555 | 388 | else: | ||
556 | 389 | plugin['library_type']= 'noinst' | ||
557 | 390 | |||
558 | 391 | def find_testsuite(plugin_dir): | ||
559 | 392 | for testdir in ['drizzle-tests','tests']: | ||
560 | 393 | if os.path.isdir(os.path.join(plugin_dir,testdir)): | ||
561 | 394 | return testdir | ||
562 | 395 | if os.path.isdir(os.path.join('tests','suite',os.path.basename(plugin_dir))): | ||
563 | 396 | return "" | ||
564 | 397 | return None | ||
565 | 398 | |||
566 | 399 | def find_docs(plugin_dir): | ||
567 | 400 | if os.path.isfile(os.path.join(plugin_dir, "docs", "index.rst")): | ||
568 | 401 | return os.path.join(plugin_dir, "docs") | ||
569 | 402 | |||
570 | 403 | def read_plugin_ini(plugin_dir): | ||
571 | 404 | sources_default="" | ||
572 | 405 | if plugin_dir == ".": | ||
573 | 406 | plugin_name="**OUT-OF-TREE**" | ||
574 | 407 | module_name="**OUT-OF-TREE**" | ||
575 | 408 | else: | ||
576 | 409 | sources_default="%s.cc" % os.path.basename(plugin_dir) | ||
577 | 410 | plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:] | ||
578 | 411 | module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator']) | ||
579 | 412 | plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator']) | ||
580 | 413 | |||
581 | 414 | |||
582 | 415 | plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname']) | ||
583 | 416 | plugin_defaults= dict(sources=sources_default, | ||
584 | 417 | headers="", | ||
585 | 418 | install_headers="", | ||
586 | 419 | cflags="", | ||
587 | 420 | cppflags="", | ||
588 | 421 | cxxflags="", | ||
589 | 422 | libs="", | ||
590 | 423 | ldflags="", | ||
591 | 424 | author="", | ||
592 | 425 | title="", | ||
593 | 426 | description="", | ||
594 | 427 | license="PLUGIN_LICENSE_GPL", | ||
595 | 428 | name=plugin_name, | ||
596 | 429 | module_name=module_name, | ||
597 | 430 | load_by_default=config['default_load_by_default'], | ||
598 | 431 | disabled="False", | ||
599 | 432 | static="False", | ||
600 | 433 | dependencies="", | ||
601 | 434 | dependency_aliases="", | ||
602 | 435 | tests="", | ||
603 | 436 | install=config['default_install']) | ||
604 | 437 | parser=ConfigParser.ConfigParser(defaults= plugin_defaults) | ||
605 | 438 | parser.read(plugin_file) | ||
606 | 439 | plugin=dict(parser.items('plugin')) | ||
607 | 440 | plugin['plugin_dir'] = plugin_dir | ||
608 | 441 | if plugin_dir == '.': | ||
609 | 442 | if not plugin.has_key('url'): | ||
610 | 443 | print "External Plugins are required to specifiy a url" | ||
611 | 444 | plugin['url']= 'http://launchpad.net/%(name)s' % plugin | ||
612 | 445 | sys.exit(1) | ||
613 | 446 | if plugin_dir == '.' and not plugin.has_key('version'): | ||
614 | 447 | print "External Plugins are required to specifiy a version" | ||
615 | 448 | sys.exit(1) | ||
616 | 449 | if not plugin.has_key('version'): | ||
617 | 450 | plugin['version'] = config['default_plugin_version'] | ||
618 | 451 | if plugin.has_key('load_by_default'): | ||
619 | 452 | plugin['load_by_default']=parser.getboolean('plugin','load_by_default') | ||
620 | 453 | if plugin.has_key('disabled'): | ||
621 | 454 | plugin['disabled']=parser.getboolean('plugin','disabled') | ||
622 | 455 | if plugin['disabled']: | ||
623 | 456 | plugin['enabled']="no" | ||
624 | 457 | else: | ||
625 | 458 | plugin['enabled']="yes" | ||
626 | 459 | if plugin.has_key('static'): | ||
627 | 460 | try: | ||
628 | 461 | plugin['static']= parser.getboolean('plugin','static') | ||
629 | 462 | except: | ||
630 | 463 | if plugin['static'][:5] == os.sys.platform[:5]: | ||
631 | 464 | plugin['static']= True | ||
632 | 465 | else: | ||
633 | 466 | plugin['static']= False | ||
634 | 467 | if plugin.has_key('install'): | ||
635 | 468 | plugin['install']= parser.getboolean('plugin','install') | ||
636 | 469 | if plugin.has_key('testsuite'): | ||
637 | 470 | if plugin['testsuite'] == 'disable': | ||
638 | 471 | plugin['testsuite']= False | ||
639 | 472 | plugin['dist_testsuite']= find_testsuite(plugin_dir) | ||
640 | 473 | else: | ||
641 | 474 | plugin_testsuite= find_testsuite(plugin_dir) | ||
642 | 475 | plugin['testsuitedir']=plugin_testsuite | ||
643 | 476 | if plugin_testsuite is not None: | ||
644 | 477 | plugin['testsuite']=True | ||
645 | 478 | else: | ||
646 | 479 | plugin['testsuite']=False | ||
647 | 480 | plugin['docs']= find_docs(plugin_dir) | ||
648 | 481 | |||
649 | 482 | plugin['cflags']+= ' ' + config['extra_cflags'] | ||
650 | 483 | plugin['cppflags']+= ' ' + config['extra_cppflags'] | ||
651 | 484 | plugin['cxxflags']+= ' ' + config['extra_cxxflags'] | ||
652 | 485 | |||
653 | 486 | plugin['libname']= "lib%s%s%s" % (config['plugin_prefix'], | ||
654 | 487 | plugin['name'], | ||
655 | 488 | config['plugin_suffix']) | ||
656 | 489 | if config['force_lowercase_libname']: | ||
657 | 490 | plugin['libname']= plugin['libname'].lower() | ||
658 | 491 | |||
659 | 492 | plugin['root_plugin_dir']= config['root_plugin_dir'] | ||
660 | 493 | plugin['plugin_prefix']= config['plugin_prefix'] | ||
661 | 494 | plugin['plugin_suffix']= config['plugin_suffix'] | ||
662 | 495 | plugin['pkgplugindir']= config['pkgplugindir'] | ||
663 | 496 | |||
664 | 497 | # Dependencies must have a module but dependency aliases are simply added | ||
665 | 498 | # to the variable passed during compile. | ||
666 | 499 | plugin['dependency_list'] = plugin['dependencies'].split() | ||
667 | 500 | dependency_aliases = plugin['dependency_aliases'].split() | ||
668 | 501 | plugin['dependencies'] = ','.join(plugin['dependency_list'] + | ||
669 | 502 | plugin['dependency_aliases'].split()) | ||
670 | 503 | dependency_libs = ["%s/lib%s%s.la" % (config['root_plugin_dir'], | ||
671 | 504 | dependency.lower().replace('::', '_'), | ||
672 | 505 | config['plugin_suffix']) | ||
673 | 506 | for dependency in plugin['dependency_list']] | ||
674 | 507 | plugin['libs'] = " ".join(plugin['libs'].split() + dependency_libs); | ||
675 | 508 | |||
676 | 509 | # Libtool is going to expand: | ||
677 | 510 | # -DPANDORA_MODULE_AUTHOR='"Padraig O'"'"'Sullivan"' | ||
678 | 511 | # to: | ||
679 | 512 | # "-DPANDORA_MODULE_AUTHOR=\"Padraig O'Sullivan\"" | ||
680 | 513 | # So we have to replace internal ''s to '"'"' | ||
681 | 514 | for key in ('author','title','description','version'): | ||
682 | 515 | plugin[key]=plugin[key].replace('"','\\"') | ||
683 | 516 | plugin[key]=plugin[key].replace("'","'\"'\"'") | ||
684 | 517 | return plugin | ||
685 | 518 | |||
686 | 519 | |||
687 | 520 | def write_plugin_am(plugin, plugin_am): | ||
688 | 521 | """Write an automake fragment for this plugin. | ||
689 | 522 | |||
690 | 523 | :param plugin: The plugin dict. | ||
691 | 524 | :param plugin_am: The file to write to. | ||
692 | 525 | """ | ||
693 | 526 | # The .plugin.ini.stamp avoids changing the datestamp on plugin.ini which can | ||
694 | 527 | # confuse VCS systems. | ||
695 | 528 | plugin_am.write(""" | ||
696 | 529 | EXTRA_DIST += %(rel_path)s/plugin.ini | ||
697 | 530 | |||
698 | 531 | # Prevent errors when a plugin dir is removed | ||
699 | 532 | %(rel_path)s/plugin.ini: | ||
700 | 533 | |||
701 | 534 | """ % plugin) | ||
702 | 535 | if plugin.has_key('extra_dist') and plugin['extra_dist'] != "": | ||
703 | 536 | plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin) | ||
704 | 537 | if plugin['headers'] != "": | ||
705 | 538 | plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin) | ||
706 | 539 | if plugin['install_headers'] != "": | ||
707 | 540 | plugin_am.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin) | ||
708 | 541 | if plugin['testsuite']: | ||
709 | 542 | if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "": | ||
710 | 543 | plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin) | ||
711 | 544 | if plugin.has_key('dist_testsuite') and plugin['dist_testsuite'] != "": | ||
712 | 545 | plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin) | ||
713 | 546 | if plugin['docs'] is not None: | ||
714 | 547 | plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin) | ||
715 | 548 | plugin_am.write(""" | ||
716 | 549 | %(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s | ||
717 | 550 | # Include sources in EXTRA_DIST because we might not build this, but we | ||
718 | 551 | # still want the sources to wind up in a tarball | ||
719 | 552 | EXTRA_DIST += %(rel_path)s/plugin.ini %(sources)s | ||
720 | 553 | if %(static_build_conditional_tag)s | ||
721 | 554 | noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la | ||
722 | 555 | %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s | ||
723 | 556 | %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s | ||
724 | 557 | %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS) | ||
725 | 558 | %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s | ||
726 | 559 | %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s | ||
727 | 560 | %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s | ||
728 | 561 | %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s | ||
729 | 562 | check_PROGRAMS += %(tests)s | ||
730 | 563 | PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la | ||
731 | 564 | endif | ||
732 | 565 | EXTRA_DIST += %(rel_path)s/plugin.ini | ||
733 | 566 | if %(shared_build_conditional_tag)s | ||
734 | 567 | %(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la | ||
735 | 568 | %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS) | ||
736 | 569 | %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s | ||
737 | 570 | %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s | ||
738 | 571 | %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s | ||
739 | 572 | %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s | ||
740 | 573 | %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s | ||
741 | 574 | %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s | ||
742 | 575 | check_PROGRAMS += %(tests)s | ||
743 | 576 | endif | ||
744 | 577 | """ % plugin) | ||
745 | 578 | plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am') | ||
746 | 579 | if os.path.exists(plugin_am_file): | ||
747 | 580 | plugin_am.write('include %s\n' % plugin_am_file) | ||
748 | 581 | |||
749 | 582 | # | ||
750 | 583 | # MAIN STARTS HERE: | ||
751 | 584 | # | ||
752 | 585 | |||
753 | 586 | # Parse the pandora-plugin config file | ||
754 | 587 | |||
755 | 588 | config_defaults= dict( | ||
756 | 589 | top_srcdir='.', | ||
757 | 590 | top_builddir='.', | ||
758 | 591 | plugin_ini_fname='plugin.ini', | ||
759 | 592 | plugin_prefix='', | ||
760 | 593 | plugin_suffix='', | ||
761 | 594 | extra_cflags='', | ||
762 | 595 | extra_cppflags='', | ||
763 | 596 | extra_cxxflags='', | ||
764 | 597 | root_plugin_dir='', | ||
765 | 598 | pkgplugindir='', | ||
766 | 599 | default_install='True', | ||
767 | 600 | default_plugin_version='', | ||
768 | 601 | default_load_by_default='False', | ||
769 | 602 | force_lowercase_libname='True', | ||
770 | 603 | plugin_name_separator='_', | ||
771 | 604 | module_name_separator='::' | ||
772 | 605 | ) | ||
773 | 606 | |||
774 | 607 | config_parser = ConfigParser.ConfigParser(defaults=config_defaults) | ||
775 | 608 | config_parser.read(pandora_plugin_file) | ||
776 | 609 | config = dict(config_parser.items('pandora-plugin')) | ||
777 | 610 | config['force_lowercase_libname']=config_parser.getboolean('pandora-plugin','force_lowercase_libname') | ||
778 | 611 | |||
779 | 612 | # I'm 3 seconds away from writing a comprehensive build solution | ||
780 | 613 | if not os.path.exists('config/pandora_vc_revinfo'): | ||
781 | 614 | if os.path.exists('.bzr'): | ||
782 | 615 | bzr_revno= subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE).communicate()[0].strip() | ||
783 | 616 | rev_date= datetime.date.fromtimestamp(time.time()) | ||
784 | 617 | config['default_plugin_version'] = "%d.%02d.%s" % (rev_date.year, rev_date.month, bzr_revno) | ||
785 | 618 | else: | ||
786 | 619 | config['default_plugin_version']=datetime.date.fromtimestamp(time.time()).isoformat() | ||
787 | 620 | else: | ||
788 | 621 | # need to read config/pandora_vc_revno | ||
789 | 622 | pandora_vc_revno=open('config/pandora_vc_revinfo','r').read().split() | ||
790 | 623 | rev_date="" | ||
791 | 624 | bzr_revno="" | ||
792 | 625 | for revno_line in pandora_vc_revno: | ||
793 | 626 | (revno_key,revno_val)= revno_line.split("=") | ||
794 | 627 | if revno_key == 'PANDORA_VC_REVNO': | ||
795 | 628 | bzr_revno=revno_val.strip() | ||
796 | 629 | elif revno_key == 'PANDORA_RELEASE_DATE': | ||
797 | 630 | rev_date=revno_val.strip() | ||
798 | 631 | |||
799 | 632 | config['default_plugin_version'] = "%s.%s" % (rev_date, bzr_revno) | ||
800 | 633 | |||
801 | 634 | actions=[] | ||
802 | 635 | for arg in sys.argv: | ||
803 | 636 | if arg.startswith('--top_srcdir='): | ||
804 | 637 | config['top_srcdir']=arg[12:] | ||
805 | 638 | elif arg.startswith('--top_builddir='): | ||
806 | 639 | config['top_builddir']=arg[14:] | ||
807 | 640 | elif arg == "--force-all": | ||
808 | 641 | actions=['plugin-list','pandora-plugin.am','write'] | ||
809 | 642 | break | ||
810 | 643 | else: | ||
811 | 644 | actions.append(arg) | ||
812 | 645 | if len(actions) == 0: | ||
813 | 646 | actions.append('write') | ||
814 | 647 | |||
815 | 648 | plugin_list=[] | ||
816 | 649 | |||
817 | 650 | def accumulate_plugins(arg, dirname, fnames): | ||
818 | 651 | # plugin_ini_fname is a name in dirname indicating dirname is a plugin. | ||
819 | 652 | if config['plugin_ini_fname'] in fnames: | ||
820 | 653 | arg.append(dirname) | ||
821 | 654 | |||
822 | 655 | os.path.walk(os.path.join(config['top_srcdir'], | ||
823 | 656 | config['root_plugin_dir']), | ||
824 | 657 | accumulate_plugins, | ||
825 | 658 | plugin_list) | ||
826 | 659 | |||
827 | 660 | if not os.path.exists("config/pandora-plugin.am") or "write" in actions: | ||
828 | 661 | plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am')) | ||
829 | 662 | plugin_am_file.write(""" | ||
830 | 663 | # always the current list, generated every build so keep this lean. | ||
831 | 664 | # pandora-plugin.list: datestamp preserved list | ||
832 | 665 | ${srcdir}/config/pandora-plugin.list: .plugin.scan | ||
833 | 666 | .plugin.scan: | ||
834 | 667 | @cd ${top_srcdir} && python config/pandora-plugin plugin-list | ||
835 | 668 | |||
836 | 669 | # Plugins affect configure; so to prevent configure running twice in a tarball | ||
837 | 670 | # build (once up front, once with the right list of plugins, we ship the | ||
838 | 671 | # generated list of plugins and the housekeeping material for that list so it | ||
839 | 672 | # is likewise not updated. | ||
840 | 673 | EXTRA_DIST += \ | ||
841 | 674 | config/pandora-plugin.am \ | ||
842 | 675 | config/pandora-plugin.ac \ | ||
843 | 676 | config/pandora-plugin \ | ||
844 | 677 | config/pandora-plugin.ini | ||
845 | 678 | |||
846 | 679 | |||
847 | 680 | # Seed the list of plugin LDADDS which plugins may extend. | ||
848 | 681 | PANDORA_DYNAMIC_LDADDS= | ||
849 | 682 | |||
850 | 683 | # plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am | ||
851 | 684 | # files. This is invoked when the code to generate such files has altered.""") | ||
852 | 685 | |||
853 | 686 | if not os.path.exists("config/pandora-plugin.ac") or "write" in actions: | ||
854 | 687 | plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac')) | ||
855 | 688 | plugin_ac_file.write("dnl Generated file, run make to rebuild\n") | ||
856 | 689 | plugin_ac_file.write(""" | ||
857 | 690 | AC_ARG_WITH([all-static],[ | ||
858 | 691 | AS_HELP_STRING([--with-all-static],[Link all plugins staticly into the server @<:@default=no@:>@]) | ||
859 | 692 | ],[ | ||
860 | 693 | with_all_static="$withval" | ||
861 | 694 | ],[ | ||
862 | 695 | with_all_static=no | ||
863 | 696 | ]) | ||
864 | 697 | """) | ||
865 | 698 | |||
866 | 699 | if os.path.exists("docs/plugins"): | ||
867 | 700 | if not os.path.exists("docs/plugins/list.rst") or "write" in actions: | ||
868 | 701 | plugin_doc_index = ChangeProtectedFile("docs/plugins/list.rst") | ||
869 | 702 | plugin_doc_index.write(""" | ||
870 | 703 | Plugin Documentation | ||
871 | 704 | ==================== | ||
872 | 705 | |||
873 | 706 | .. toctree:: | ||
874 | 707 | :maxdepth: 2 | ||
875 | 708 | """) | ||
876 | 709 | |||
877 | 710 | |||
878 | 711 | if os.path.exists('plugin.ini'): | ||
879 | 712 | # Are we in a plugin dir which wants to have a self-sufficient build system? | ||
880 | 713 | plugin_list=['.'] | ||
881 | 714 | |||
882 | 715 | write_external_plugin() | ||
883 | 716 | else: | ||
884 | 717 | plugin_list_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.list')) | ||
885 | 718 | for p in plugin_list: | ||
886 | 719 | plugin_list_file.write(p) | ||
887 | 720 | plugin_list_file.write("\n") | ||
888 | 721 | plugin_list.sort() | ||
889 | 722 | plugin_list_file.close() | ||
890 | 723 | |||
891 | 724 | if not os.path.exists("config/pandora-plugin.am") or 'write' in actions: | ||
892 | 725 | plugin_am_file.write("\n${top_srcdir}/config/pandora-plugin.am: ${top_srcdir}/config/pandora-plugin.list ${top_srcdir}/config/pandora-plugin ") | ||
893 | 726 | for plugin_dir in plugin_list: | ||
894 | 727 | plugin_am_file.write("\\\n\t%s/plugin.ini " % plugin_dir) | ||
895 | 728 | plugin_am_file.write("\n\tcd ${top_srcdir} && python config/pandora-plugin write\n") | ||
896 | 729 | plugin_ini_list=[] | ||
897 | 730 | |||
898 | 731 | # Load all plugin.ini files first so we can do dependency tracking. | ||
899 | 732 | for plugin_dir in plugin_list: | ||
900 | 733 | plugin = read_plugin_ini(plugin_dir) | ||
901 | 734 | expand_plugin_ini(plugin) | ||
902 | 735 | plugin_ini_list.append(plugin) | ||
903 | 736 | |||
904 | 737 | # Check for duplicates | ||
905 | 738 | plugin_name_list = [plugin['libname'] for plugin in plugin_ini_list] | ||
906 | 739 | for plugin in plugin_ini_list: | ||
907 | 740 | if plugin_name_list.count(plugin['libname']) != 1: | ||
908 | 741 | print "Duplicate module name %s" % plugin['libname'] | ||
909 | 742 | exit(1) | ||
910 | 743 | |||
911 | 744 | for plugin in plugin_ini_list: | ||
912 | 745 | write_plugin(plugin, plugin_ini_list) | ||
913 | 746 | |||
914 | 747 | if plugin_am_file is not None: | ||
915 | 748 | plugin_am_file.close() | ||
916 | 749 | if plugin_ac_file is not None: | ||
917 | 750 | plugin_ac_file.close() | ||
918 | 751 | if plugin_doc_index is not None: | ||
919 | 752 | plugin_doc_index.close() | ||
920 | 0 | 753 | ||
921 | === modified file 'configure.ac' | |||
922 | --- configure.ac 2011-04-08 03:55:42 +0000 | |||
923 | +++ configure.ac 2011-04-16 05:39:23 +0000 | |||
924 | @@ -12,7 +12,7 @@ | |||
925 | 12 | AC_CONFIG_AUX_DIR(config) | 12 | AC_CONFIG_AUX_DIR(config) |
926 | 13 | AC_CONFIG_MACRO_DIR(m4) | 13 | AC_CONFIG_MACRO_DIR(m4) |
927 | 14 | 14 | ||
929 | 15 | PANDORA_CANONICAL_TARGET(require-cxx) | 15 | PANDORA_CANONICAL_TARGET(require-cxx, no-vc-changelog) |
930 | 16 | 16 | ||
931 | 17 | GEARMAN_LIBRARY_VERSION=5:1:1 | 17 | GEARMAN_LIBRARY_VERSION=5:1:1 |
932 | 18 | # | | | | 18 | # | | | |
933 | 19 | 19 | ||
934 | === modified file 'libgearman-server/byte.h' | |||
935 | --- libgearman-server/byte.h 2011-03-16 22:23:41 +0000 | |||
936 | +++ libgearman-server/byte.h 2011-04-16 05:39:23 +0000 | |||
937 | @@ -43,7 +43,8 @@ | |||
938 | 43 | 43 | ||
939 | 44 | class Byte { | 44 | class Byte { |
940 | 45 | public: | 45 | public: |
942 | 46 | Byte () | 46 | Byte () : |
943 | 47 | _array() | ||
944 | 47 | { } | 48 | { } |
945 | 48 | 49 | ||
946 | 49 | Byte (size_t arg): | 50 | Byte (size_t arg): |
947 | 50 | 51 | ||
948 | === modified file 'libgearman-server/plugins/protocol/http/protocol.cc' | |||
949 | --- libgearman-server/plugins/protocol/http/protocol.cc 2011-03-16 22:23:41 +0000 | |||
950 | +++ libgearman-server/plugins/protocol/http/protocol.cc 2011-04-16 05:39:23 +0000 | |||
951 | @@ -44,7 +44,8 @@ | |||
952 | 44 | HTTP::HTTP() : | 44 | HTTP::HTTP() : |
953 | 45 | Plugin("HTTP"), | 45 | Plugin("HTTP"), |
954 | 46 | _background(false), | 46 | _background(false), |
956 | 47 | _keep_alive(false) | 47 | _keep_alive(false), |
957 | 48 | global_port("") | ||
958 | 48 | { | 49 | { |
959 | 49 | command_line_options().add_options() | 50 | command_line_options().add_options() |
960 | 50 | ("http-port", boost::program_options::value(&global_port)->default_value(GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT), "Port to listen on."); | 51 | ("http-port", boost::program_options::value(&global_port)->default_value(GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT), "Port to listen on."); |
961 | 51 | 52 | ||
962 | === modified file 'libgearman-server/plugins/queue/drizzle/include.am' | |||
963 | --- libgearman-server/plugins/queue/drizzle/include.am 2011-03-16 22:23:41 +0000 | |||
964 | +++ libgearman-server/plugins/queue/drizzle/include.am 2011-04-16 05:39:23 +0000 | |||
965 | @@ -17,5 +17,8 @@ | |||
966 | 17 | libgearman-server/plugins/queue/drizzle/queue.cc | 17 | libgearman-server/plugins/queue/drizzle/queue.cc |
967 | 18 | 18 | ||
968 | 19 | libgearman_server_libgearman_server_la_LIBADD+= $(LTLIBDRIZZLE) | 19 | libgearman_server_libgearman_server_la_LIBADD+= $(LTLIBDRIZZLE) |
969 | 20 | libgearman_server_libgearman_server_la_CXXFLAGS= \ | ||
970 | 21 | $(AM_CXXFLAGS) \ | ||
971 | 22 | $(LIBDRIZZLE_CFLAGS) | ||
972 | 20 | endif | 23 | endif |
973 | 21 | 24 | ||
974 | 22 | 25 | ||
975 | === modified file 'libgearman-server/plugins/queue/drizzle/queue.cc' | |||
976 | --- libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-05 23:59:40 +0000 | |||
977 | +++ libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-16 05:39:23 +0000 | |||
978 | @@ -82,13 +82,26 @@ | |||
979 | 82 | bool mysql_protocol; | 82 | bool mysql_protocol; |
980 | 83 | in_port_t port; | 83 | in_port_t port; |
981 | 84 | private: | 84 | private: |
982 | 85 | Drizzle(const Drizzle&); | ||
983 | 86 | Drizzle& operator=(const Drizzle&); | ||
984 | 85 | }; | 87 | }; |
985 | 86 | 88 | ||
986 | 87 | 89 | ||
987 | 88 | Drizzle::Drizzle () : | 90 | Drizzle::Drizzle () : |
988 | 89 | Queue("libdrizzle"), | 91 | Queue("libdrizzle"), |
989 | 90 | drizzle(NULL), | 92 | drizzle(NULL), |
991 | 91 | con(NULL) | 93 | con(NULL), |
992 | 94 | _result(), | ||
993 | 95 | _query(), | ||
994 | 96 | host(""), | ||
995 | 97 | username(""), | ||
996 | 98 | password(""), | ||
997 | 99 | uds(""), | ||
998 | 100 | user(""), | ||
999 | 101 | schema(""), | ||
1000 | 102 | table(""), | ||
1001 | 103 | mysql_protocol(false), | ||
1002 | 104 | port(0) | ||
1003 | 92 | { | 105 | { |
1004 | 93 | command_line_options().add_options() | 106 | command_line_options().add_options() |
1005 | 94 | ("libdrizzle-host", boost::program_options::value(&host), "Host of server.") | 107 | ("libdrizzle-host", boost::program_options::value(&host), "Host of server.") |
1006 | 95 | 108 | ||
1007 | === modified file 'libgearman-server/plugins/queue/libmemcached/queue.cc' | |||
1008 | --- libgearman-server/plugins/queue/libmemcached/queue.cc 2011-04-05 23:59:40 +0000 | |||
1009 | +++ libgearman-server/plugins/queue/libmemcached/queue.cc 2011-04-16 05:39:23 +0000 | |||
1010 | @@ -79,7 +79,7 @@ | |||
1011 | 79 | } | 79 | } |
1012 | 80 | 80 | ||
1013 | 81 | } // namespace queue | 81 | } // namespace queue |
1015 | 82 | } // namespace plugin | 82 | } // namespace plugins |
1016 | 83 | } // namespace gearmand | 83 | } // namespace gearmand |
1017 | 84 | 84 | ||
1018 | 85 | /* Queue callback functions. */ | 85 | /* Queue callback functions. */ |
1019 | 86 | 86 | ||
1020 | === modified file 'libgearman-server/plugins/queue/postgres/queue.cc' | |||
1021 | --- libgearman-server/plugins/queue/postgres/queue.cc 2011-04-05 23:59:40 +0000 | |||
1022 | +++ libgearman-server/plugins/queue/postgres/queue.cc 2011-04-16 05:39:23 +0000 | |||
1023 | @@ -57,11 +57,16 @@ | |||
1024 | 57 | std::string table; | 57 | std::string table; |
1025 | 58 | std::vector<char> query_buffer; | 58 | std::vector<char> query_buffer; |
1026 | 59 | private: | 59 | private: |
1027 | 60 | Postgres(const Postgres&); | ||
1028 | 61 | Postgres& operator=(const Postgres&); | ||
1029 | 60 | }; | 62 | }; |
1030 | 61 | 63 | ||
1031 | 62 | Postgres::Postgres() : | 64 | Postgres::Postgres() : |
1032 | 63 | Queue("Postgres"), | 65 | Queue("Postgres"), |
1034 | 64 | con(NULL) | 66 | con(NULL), |
1035 | 67 | postgres_connect_string(""), | ||
1036 | 68 | table(""), | ||
1037 | 69 | query_buffer() | ||
1038 | 65 | { | 70 | { |
1039 | 66 | command_line_options().add_options() | 71 | command_line_options().add_options() |
1040 | 67 | ("libpq-conninfo", boost::program_options::value(&postgres_connect_string)->default_value(""), "PostgreSQL connection information string.") | 72 | ("libpq-conninfo", boost::program_options::value(&postgres_connect_string)->default_value(""), "PostgreSQL connection information string.") |
1041 | 68 | 73 | ||
1042 | === modified file 'libgearman-server/plugins/queue/sqlite/queue.cc' | |||
1043 | --- libgearman-server/plugins/queue/sqlite/queue.cc 2011-04-14 05:40:29 +0000 | |||
1044 | +++ libgearman-server/plugins/queue/sqlite/queue.cc 2011-04-16 05:39:23 +0000 | |||
1045 | @@ -40,7 +40,9 @@ | |||
1046 | 40 | namespace plugins { | 40 | namespace plugins { |
1047 | 41 | namespace queue { | 41 | namespace queue { |
1048 | 42 | 42 | ||
1050 | 43 | class Sqlite : public gearmand::plugins::Queue { | 43 | class Sqlite : |
1051 | 44 | public gearmand::plugins::Queue | ||
1052 | 45 | { | ||
1053 | 44 | public: | 46 | public: |
1054 | 45 | Sqlite(); | 47 | Sqlite(); |
1055 | 46 | ~Sqlite(); | 48 | ~Sqlite(); |
1056 | @@ -65,10 +67,18 @@ | |||
1057 | 65 | private: | 67 | private: |
1058 | 66 | std::string _insert_query; | 68 | std::string _insert_query; |
1059 | 67 | std::string _delete_query; | 69 | std::string _delete_query; |
1060 | 70 | Sqlite(const Sqlite&); | ||
1061 | 71 | Sqlite& operator=(const Sqlite&); | ||
1062 | 68 | }; | 72 | }; |
1063 | 69 | 73 | ||
1064 | 70 | Sqlite::Sqlite() : | 74 | Sqlite::Sqlite() : |
1066 | 71 | Queue("sqlite") | 75 | Queue("sqlite"), |
1067 | 76 | schema(""), | ||
1068 | 77 | table(""), | ||
1069 | 78 | db(NULL), | ||
1070 | 79 | in_trans(0), | ||
1071 | 80 | _insert_query(""), | ||
1072 | 81 | _delete_query("") | ||
1073 | 72 | { | 82 | { |
1074 | 73 | command_line_options().add_options() | 83 | command_line_options().add_options() |
1075 | 74 | ("libsqlite3-db", boost::program_options::value(&schema), "Database file to use.") | 84 | ("libsqlite3-db", boost::program_options::value(&schema), "Database file to use.") |
1076 | 75 | 85 | ||
1077 | === modified file 'libgearman-server/plugins/queue/tokyocabinet/queue.cc' | |||
1078 | --- libgearman-server/plugins/queue/tokyocabinet/queue.cc 2011-04-05 23:59:40 +0000 | |||
1079 | +++ libgearman-server/plugins/queue/tokyocabinet/queue.cc 2011-04-16 05:39:23 +0000 | |||
1080 | @@ -37,10 +37,15 @@ | |||
1081 | 37 | std::string filename; | 37 | std::string filename; |
1082 | 38 | bool optimize; | 38 | bool optimize; |
1083 | 39 | private: | 39 | private: |
1084 | 40 | TokyoCabinet(const TokyoCabinet&); | ||
1085 | 41 | TokyoCabinet& operator=(const TokyoCabinet&); | ||
1086 | 40 | }; | 42 | }; |
1087 | 41 | 43 | ||
1088 | 42 | TokyoCabinet::TokyoCabinet() : | 44 | TokyoCabinet::TokyoCabinet() : |
1090 | 43 | Queue("tokyocabinet") | 45 | Queue("tokyocabinet"), |
1091 | 46 | db(NULL), | ||
1092 | 47 | filename(NULL), | ||
1093 | 48 | optimize(false) | ||
1094 | 44 | { | 49 | { |
1095 | 45 | command_line_options().add_options() | 50 | command_line_options().add_options() |
1096 | 46 | ("libtokyocabinet-file", boost::program_options::value(&filename), "File name of the database. [see: man tcadb, tcadbopen() for name guidelines]") | 51 | ("libtokyocabinet-file", boost::program_options::value(&filename), "File name of the database. [see: man tcadb, tcadbopen() for name guidelines]") |
1097 | 47 | 52 | ||
1098 | === modified file 'libgearman/client.cc' | |||
1099 | --- libgearman/client.cc 2011-04-13 04:12:34 +0000 | |||
1100 | +++ libgearman/client.cc 2011-04-16 05:39:23 +0000 | |||
1101 | @@ -204,19 +204,19 @@ | |||
1102 | 204 | memset(&options, 0, sizeof(int32_t)); | 204 | memset(&options, 0, sizeof(int32_t)); |
1103 | 205 | 205 | ||
1104 | 206 | if (client->options.allocated) | 206 | if (client->options.allocated) |
1106 | 207 | options|= (int)GEARMAN_CLIENT_ALLOCATED; | 207 | options|= int(GEARMAN_CLIENT_ALLOCATED); |
1107 | 208 | if (client->options.non_blocking) | 208 | if (client->options.non_blocking) |
1109 | 209 | options|= (int)GEARMAN_CLIENT_NON_BLOCKING; | 209 | options|= int(GEARMAN_CLIENT_NON_BLOCKING); |
1110 | 210 | if (client->options.task_in_use) | 210 | if (client->options.task_in_use) |
1112 | 211 | options|= (int)GEARMAN_CLIENT_TASK_IN_USE; | 211 | options|= int(GEARMAN_CLIENT_TASK_IN_USE); |
1113 | 212 | if (client->options.unbuffered_result) | 212 | if (client->options.unbuffered_result) |
1115 | 213 | options|= (int)GEARMAN_CLIENT_UNBUFFERED_RESULT; | 213 | options|= int(GEARMAN_CLIENT_UNBUFFERED_RESULT); |
1116 | 214 | if (client->options.no_new) | 214 | if (client->options.no_new) |
1118 | 215 | options|= (int)GEARMAN_CLIENT_NO_NEW; | 215 | options|= int(GEARMAN_CLIENT_NO_NEW); |
1119 | 216 | if (client->options.free_tasks) | 216 | if (client->options.free_tasks) |
1121 | 217 | options|= (int)GEARMAN_CLIENT_FREE_TASKS; | 217 | options|= int(GEARMAN_CLIENT_FREE_TASKS); |
1122 | 218 | 218 | ||
1124 | 219 | return (gearman_client_options_t)options; | 219 | return gearman_client_options_t(options); |
1125 | 220 | } | 220 | } |
1126 | 221 | 221 | ||
1127 | 222 | void gearman_client_set_options(gearman_client_st *client, | 222 | void gearman_client_set_options(gearman_client_st *client, |
1128 | @@ -297,7 +297,7 @@ | |||
1129 | 297 | 297 | ||
1130 | 298 | void *gearman_client_context(const gearman_client_st *client) | 298 | void *gearman_client_context(const gearman_client_st *client) |
1131 | 299 | { | 299 | { |
1133 | 300 | return (void *)(client->context); | 300 | return static_cast<void *>(client->context); |
1134 | 301 | } | 301 | } |
1135 | 302 | 302 | ||
1136 | 303 | void gearman_client_set_context(gearman_client_st *client, void *context) | 303 | void gearman_client_set_context(gearman_client_st *client, void *context) |
1137 | @@ -922,14 +922,14 @@ | |||
1138 | 922 | GEARMAN_SERVER_ERROR, | 922 | GEARMAN_SERVER_ERROR, |
1139 | 923 | "gearman_client_run_tasks", | 923 | "gearman_client_run_tasks", |
1140 | 924 | "%s:%.*s", | 924 | "%s:%.*s", |
1144 | 925 | (char *)(client->con->packet.arg[0]), | 925 | static_cast<char *>(client->con->packet.arg[0]), |
1145 | 926 | (int)(client->con->packet.arg_size[1]), | 926 | int(client->con->packet.arg_size[1]), |
1146 | 927 | (char *)(client->con->packet.arg[1])); | 927 | static_cast<char *>(client->con->packet.arg[1])); |
1147 | 928 | 928 | ||
1148 | 929 | return GEARMAN_SERVER_ERROR; | 929 | return GEARMAN_SERVER_ERROR; |
1149 | 930 | } | 930 | } |
1150 | 931 | else if (strncmp(client->task->job_handle, | 931 | else if (strncmp(client->task->job_handle, |
1152 | 932 | (char *)(client->con->packet.arg[0]), | 932 | static_cast<char *>(client->con->packet.arg[0]), |
1153 | 933 | client->con->packet.arg_size[0]) || | 933 | client->con->packet.arg_size[0]) || |
1154 | 934 | (client->con->packet.command != GEARMAN_COMMAND_WORK_FAIL && | 934 | (client->con->packet.command != GEARMAN_COMMAND_WORK_FAIL && |
1155 | 935 | strlen(client->task->job_handle) != client->con->packet.arg_size[0] - 1) || | 935 | strlen(client->task->job_handle) != client->con->packet.arg_size[0] - 1) || |
1156 | @@ -1094,7 +1094,7 @@ | |||
1157 | 1094 | static gearman_return_t _client_add_server(const char *host, in_port_t port, | 1094 | static gearman_return_t _client_add_server(const char *host, in_port_t port, |
1158 | 1095 | void *context) | 1095 | void *context) |
1159 | 1096 | { | 1096 | { |
1161 | 1097 | return gearman_client_add_server((gearman_client_st *)context, host, port); | 1097 | return gearman_client_add_server(static_cast<gearman_client_st *>(context), host, port); |
1162 | 1098 | } | 1098 | } |
1163 | 1099 | 1099 | ||
1164 | 1100 | static gearman_task_st *_client_add_task(gearman_client_st *client, | 1100 | static gearman_task_st *_client_add_task(gearman_client_st *client, |
1165 | @@ -1150,7 +1150,8 @@ | |||
1166 | 1150 | if (command == GEARMAN_COMMAND_SUBMIT_JOB_EPOCH) | 1150 | if (command == GEARMAN_COMMAND_SUBMIT_JOB_EPOCH) |
1167 | 1151 | { | 1151 | { |
1168 | 1152 | char time_string[30]; | 1152 | char time_string[30]; |
1170 | 1153 | int length= snprintf(time_string, sizeof(time_string), "%lld", (long long)when); | 1153 | int length= snprintf(time_string, sizeof(time_string), "%lld", |
1171 | 1154 | static_cast<long long>(when)); | ||
1172 | 1154 | args[2]= time_string; | 1155 | args[2]= time_string; |
1173 | 1155 | args_size[2]= length +1; | 1156 | args_size[2]= length +1; |
1174 | 1156 | args[3]= workload; | 1157 | args[3]= workload; |
1175 | @@ -1300,8 +1301,8 @@ | |||
1176 | 1300 | if (task->recv->command == GEARMAN_COMMAND_JOB_CREATED) | 1301 | if (task->recv->command == GEARMAN_COMMAND_JOB_CREATED) |
1177 | 1301 | { | 1302 | { |
1178 | 1302 | snprintf(task->job_handle, GEARMAN_JOB_HANDLE_SIZE, "%.*s", | 1303 | snprintf(task->job_handle, GEARMAN_JOB_HANDLE_SIZE, "%.*s", |
1181 | 1303 | (int)(task->recv->arg_size[0]), | 1304 | int(task->recv->arg_size[0]), |
1182 | 1304 | (char *)(task->recv->arg[0])); | 1305 | static_cast<char *>(task->recv->arg[0])); |
1183 | 1305 | 1306 | ||
1184 | 1306 | case GEARMAN_TASK_STATE_CREATED: | 1307 | case GEARMAN_TASK_STATE_CREATED: |
1185 | 1307 | if (client->created_fn != NULL) | 1308 | if (client->created_fn != NULL) |
1186 | @@ -1353,12 +1354,12 @@ | |||
1187 | 1353 | { | 1354 | { |
1188 | 1354 | if (task->recv->command == GEARMAN_COMMAND_STATUS_RES) | 1355 | if (task->recv->command == GEARMAN_COMMAND_STATUS_RES) |
1189 | 1355 | { | 1356 | { |
1191 | 1356 | if (atoi((char *)task->recv->arg[1]) == 0) | 1357 | if (atoi(static_cast<char *>(task->recv->arg[1])) == 0) |
1192 | 1357 | task->options.is_known= false; | 1358 | task->options.is_known= false; |
1193 | 1358 | else | 1359 | else |
1194 | 1359 | task->options.is_known= true; | 1360 | task->options.is_known= true; |
1195 | 1360 | 1361 | ||
1197 | 1361 | if (atoi((char *)task->recv->arg[2]) == 0) | 1362 | if (atoi(static_cast<char *>(task->recv->arg[2])) == 0) |
1198 | 1362 | task->options.is_running= false; | 1363 | task->options.is_running= false; |
1199 | 1363 | else | 1364 | else |
1200 | 1364 | task->options.is_running= true; | 1365 | task->options.is_running= true; |
1201 | @@ -1370,11 +1371,11 @@ | |||
1202 | 1370 | x= 1; | 1371 | x= 1; |
1203 | 1371 | } | 1372 | } |
1204 | 1372 | 1373 | ||
1206 | 1373 | task->numerator= (uint32_t)atoi((char *)task->recv->arg[x]); | 1374 | task->numerator= uint32_t(atoi(static_cast<char *>(task->recv->arg[x]))); |
1207 | 1374 | snprintf(status_buffer, 11, "%.*s", | 1375 | snprintf(status_buffer, 11, "%.*s", |
1211 | 1375 | (int)(task->recv->arg_size[x + 1]), | 1376 | int(task->recv->arg_size[x + 1]), |
1212 | 1376 | (char *)(task->recv->arg[x + 1])); | 1377 | static_cast<char *>(task->recv->arg[x + 1])); |
1213 | 1377 | task->denominator= (uint32_t)atoi(status_buffer); | 1378 | task->denominator= uint32_t(atoi(status_buffer)); |
1214 | 1378 | 1379 | ||
1215 | 1379 | case GEARMAN_TASK_STATE_STATUS: | 1380 | case GEARMAN_TASK_STATE_STATUS: |
1216 | 1380 | if (client->status_fn != NULL) | 1381 | if (client->status_fn != NULL) |
1217 | @@ -1507,7 +1508,7 @@ | |||
1218 | 1507 | client->do_data_size= 0; | 1508 | client->do_data_size= 0; |
1219 | 1508 | } | 1509 | } |
1220 | 1509 | 1510 | ||
1222 | 1510 | return (void *)workload; | 1511 | return const_cast<void *>(workload); |
1223 | 1511 | } | 1512 | } |
1224 | 1512 | 1513 | ||
1225 | 1513 | static gearman_return_t _client_do_background(gearman_client_st *client, | 1514 | static gearman_return_t _client_do_background(gearman_client_st *client, |
1226 | @@ -1557,7 +1558,7 @@ | |||
1227 | 1557 | 1558 | ||
1228 | 1558 | static gearman_return_t _client_do_data(gearman_task_st *task) | 1559 | static gearman_return_t _client_do_data(gearman_task_st *task) |
1229 | 1559 | { | 1560 | { |
1231 | 1560 | gearman_client_st *client= (gearman_client_st *)gearman_task_context(task); | 1561 | gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task))); |
1232 | 1561 | 1562 | ||
1233 | 1562 | if (client->do_ret != GEARMAN_SUCCESS) | 1563 | if (client->do_ret != GEARMAN_SUCCESS) |
1234 | 1563 | { | 1564 | { |
1235 | @@ -1581,7 +1582,7 @@ | |||
1236 | 1581 | 1582 | ||
1237 | 1582 | static gearman_return_t _client_do_status(gearman_task_st *task) | 1583 | static gearman_return_t _client_do_status(gearman_task_st *task) |
1238 | 1583 | { | 1584 | { |
1240 | 1584 | gearman_client_st *client= (gearman_client_st *)gearman_task_context(task); | 1585 | gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task))); |
1241 | 1585 | 1586 | ||
1242 | 1586 | if (client->do_ret != GEARMAN_SUCCESS) | 1587 | if (client->do_ret != GEARMAN_SUCCESS) |
1243 | 1587 | { | 1588 | { |
1244 | @@ -1595,7 +1596,7 @@ | |||
1245 | 1595 | 1596 | ||
1246 | 1596 | static gearman_return_t _client_do_fail(gearman_task_st *task) | 1597 | static gearman_return_t _client_do_fail(gearman_task_st *task) |
1247 | 1597 | { | 1598 | { |
1249 | 1598 | gearman_client_st *client= (gearman_client_st *)gearman_task_context(task); | 1599 | gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task))); |
1250 | 1599 | 1600 | ||
1251 | 1600 | client->do_ret= GEARMAN_WORK_FAIL; | 1601 | client->do_ret= GEARMAN_WORK_FAIL; |
1252 | 1601 | return GEARMAN_SUCCESS; | 1602 | return GEARMAN_SUCCESS; |
1253 | 1602 | 1603 | ||
1254 | === modified file 'libgearman/connection.cc' | |||
1255 | --- libgearman/connection.cc 2011-04-14 05:40:29 +0000 | |||
1256 | +++ libgearman/connection.cc 2011-04-16 05:39:23 +0000 | |||
1257 | @@ -252,7 +252,7 @@ | |||
1258 | 252 | NI_MAXHOST); | 252 | NI_MAXHOST); |
1259 | 253 | connection->host[NI_MAXHOST - 1]= 0; | 253 | connection->host[NI_MAXHOST - 1]= 0; |
1260 | 254 | 254 | ||
1262 | 255 | connection->port= (in_port_t)(port == 0 ? GEARMAN_DEFAULT_TCP_PORT : port); | 255 | connection->port= in_port_t(port == 0 ? GEARMAN_DEFAULT_TCP_PORT : port); |
1263 | 256 | } | 256 | } |
1264 | 257 | 257 | ||
1265 | 258 | void gearman_connection_close(gearman_connection_st *connection) | 258 | void gearman_connection_close(gearman_connection_st *connection) |
1266 | @@ -416,14 +416,14 @@ | |||
1267 | 416 | if (connection->send_buffer_size < GEARMAN_SEND_BUFFER_SIZE) | 416 | if (connection->send_buffer_size < GEARMAN_SEND_BUFFER_SIZE) |
1268 | 417 | { | 417 | { |
1269 | 418 | memcpy(connection->send_buffer, | 418 | memcpy(connection->send_buffer, |
1271 | 419 | (char *)packet->data + connection->send_data_offset, | 419 | static_cast<char *>(const_cast<void *>(packet->data)) + connection->send_data_offset, |
1272 | 420 | connection->send_buffer_size); | 420 | connection->send_buffer_size); |
1273 | 421 | connection->send_data_size= 0; | 421 | connection->send_data_size= 0; |
1274 | 422 | connection->send_data_offset= 0; | 422 | connection->send_data_offset= 0; |
1275 | 423 | break; | 423 | break; |
1276 | 424 | } | 424 | } |
1277 | 425 | 425 | ||
1279 | 426 | connection->send_buffer_ptr= (char *)packet->data + connection->send_data_offset; | 426 | connection->send_buffer_ptr= static_cast<char *>(const_cast<void *>(packet->data)) + connection->send_data_offset; |
1280 | 427 | connection->send_state= GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA; | 427 | connection->send_state= GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA; |
1281 | 428 | 428 | ||
1282 | 429 | case GEARMAN_CON_SEND_UNIVERSAL_FLUSH: | 429 | case GEARMAN_CON_SEND_UNIVERSAL_FLUSH: |
1283 | @@ -473,7 +473,7 @@ | |||
1284 | 473 | return GEARMAN_DATA_TOO_LARGE; | 473 | return GEARMAN_DATA_TOO_LARGE; |
1285 | 474 | } | 474 | } |
1286 | 475 | 475 | ||
1288 | 476 | connection->send_buffer_ptr= (char *)data; | 476 | connection->send_buffer_ptr= static_cast<char *>(const_cast<void *>(data)); |
1289 | 477 | connection->send_buffer_size= data_size; | 477 | connection->send_buffer_size= data_size; |
1290 | 478 | 478 | ||
1291 | 479 | *ret_ptr= gearman_connection_flush(connection); | 479 | *ret_ptr= gearman_connection_flush(connection); |
1292 | @@ -500,7 +500,7 @@ | |||
1293 | 500 | connection->addrinfo= NULL; | 500 | connection->addrinfo= NULL; |
1294 | 501 | } | 501 | } |
1295 | 502 | 502 | ||
1297 | 503 | snprintf(port_str, NI_MAXSERV, "%hu", (uint16_t)connection->port); | 503 | snprintf(port_str, NI_MAXSERV, "%hu", uint16_t(connection->port)); |
1298 | 504 | 504 | ||
1299 | 505 | memset(&ai, 0, sizeof(struct addrinfo)); | 505 | memset(&ai, 0, sizeof(struct addrinfo)); |
1300 | 506 | ai.ai_socktype= SOCK_STREAM; | 506 | ai.ai_socktype= SOCK_STREAM; |
1301 | @@ -663,10 +663,10 @@ | |||
1302 | 663 | return GEARMAN_ERRNO; | 663 | return GEARMAN_ERRNO; |
1303 | 664 | } | 664 | } |
1304 | 665 | 665 | ||
1306 | 666 | connection->send_buffer_size-= (size_t)write_size; | 666 | connection->send_buffer_size-= size_t(write_size); |
1307 | 667 | if (connection->send_state == GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA) | 667 | if (connection->send_state == GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA) |
1308 | 668 | { | 668 | { |
1310 | 669 | connection->send_data_offset+= (size_t)write_size; | 669 | connection->send_data_offset+= size_t(write_size); |
1311 | 670 | if (connection->send_data_offset == connection->send_data_size) | 670 | if (connection->send_data_offset == connection->send_data_size) |
1312 | 671 | { | 671 | { |
1313 | 672 | connection->send_data_size= 0; | 672 | connection->send_data_size= 0; |
1314 | @@ -776,7 +776,7 @@ | |||
1315 | 776 | else | 776 | else |
1316 | 777 | { | 777 | { |
1317 | 778 | packet->data= packet->universal->workload_malloc_fn(packet->data_size, | 778 | packet->data= packet->universal->workload_malloc_fn(packet->data_size, |
1319 | 779 | (void *)packet->universal->workload_malloc_context); | 779 | static_cast<void *>(packet->universal->workload_malloc_context)); |
1320 | 780 | } | 780 | } |
1321 | 781 | if (packet->data == NULL) | 781 | if (packet->data == NULL) |
1322 | 782 | { | 782 | { |
1323 | @@ -792,7 +792,7 @@ | |||
1324 | 792 | while (connection->recv_data_size != 0) | 792 | while (connection->recv_data_size != 0) |
1325 | 793 | { | 793 | { |
1326 | 794 | (void)gearman_connection_recv_data(connection, | 794 | (void)gearman_connection_recv_data(connection, |
1328 | 795 | ((uint8_t *)(packet->data)) + | 795 | static_cast<uint8_t *>(const_cast<void *>(packet->data)) + |
1329 | 796 | connection->recv_data_offset, | 796 | connection->recv_data_offset, |
1330 | 797 | packet->data_size - | 797 | packet->data_size - |
1331 | 798 | connection->recv_data_offset, ret_ptr); | 798 | connection->recv_data_offset, ret_ptr); |
1332 | @@ -844,7 +844,8 @@ | |||
1333 | 844 | 844 | ||
1334 | 845 | if (data_size != recv_size) | 845 | if (data_size != recv_size) |
1335 | 846 | { | 846 | { |
1337 | 847 | recv_size+= gearman_connection_read(connection, ((uint8_t *)data) + recv_size, | 847 | recv_size+= gearman_connection_read(connection, |
1338 | 848 | static_cast<uint8_t *>(const_cast<void *>(data)) + recv_size, | ||
1339 | 848 | data_size - recv_size, ret_ptr); | 849 | data_size - recv_size, ret_ptr); |
1340 | 849 | connection->recv_data_offset+= recv_size; | 850 | connection->recv_data_offset+= recv_size; |
1341 | 850 | } | 851 | } |
1342 | @@ -928,7 +929,7 @@ | |||
1343 | 928 | } | 929 | } |
1344 | 929 | 930 | ||
1345 | 930 | *ret_ptr= GEARMAN_SUCCESS; | 931 | *ret_ptr= GEARMAN_SUCCESS; |
1347 | 931 | return (size_t)read_size; | 932 | return size_t(read_size); |
1348 | 932 | } | 933 | } |
1349 | 933 | 934 | ||
1350 | 934 | gearman_return_t gearman_connection_set_events(gearman_connection_st *connection, short events) | 935 | gearman_return_t gearman_connection_set_events(gearman_connection_st *connection, short events) |
1351 | @@ -943,7 +944,7 @@ | |||
1352 | 943 | if (connection->universal->event_watch_fn != NULL) | 944 | if (connection->universal->event_watch_fn != NULL) |
1353 | 944 | { | 945 | { |
1354 | 945 | ret= connection->universal->event_watch_fn(connection, connection->events, | 946 | ret= connection->universal->event_watch_fn(connection, connection->events, |
1356 | 946 | (void *)connection->universal->event_watch_context); | 947 | static_cast<void *>(connection->universal->event_watch_context)); |
1357 | 947 | if (ret != GEARMAN_SUCCESS) | 948 | if (ret != GEARMAN_SUCCESS) |
1358 | 948 | { | 949 | { |
1359 | 949 | gearman_connection_close(connection); | 950 | gearman_connection_close(connection); |
1360 | @@ -971,7 +972,7 @@ | |||
1361 | 971 | connection->universal->event_watch_fn != NULL) | 972 | connection->universal->event_watch_fn != NULL) |
1362 | 972 | { | 973 | { |
1363 | 973 | ret= connection->universal->event_watch_fn(connection, connection->events, | 974 | ret= connection->universal->event_watch_fn(connection, connection->events, |
1365 | 974 | (void *)connection->universal->event_watch_context); | 975 | static_cast<void *>(connection->universal->event_watch_context)); |
1366 | 975 | if (ret != GEARMAN_SUCCESS) | 976 | if (ret != GEARMAN_SUCCESS) |
1367 | 976 | { | 977 | { |
1368 | 977 | gearman_connection_close(connection); | 978 | gearman_connection_close(connection); |
1369 | @@ -979,7 +980,7 @@ | |||
1370 | 979 | } | 980 | } |
1371 | 980 | } | 981 | } |
1372 | 981 | 982 | ||
1374 | 982 | connection->events&= (short)~revents; | 983 | connection->events&= short(~revents); |
1375 | 983 | 984 | ||
1376 | 984 | return GEARMAN_SUCCESS; | 985 | return GEARMAN_SUCCESS; |
1377 | 985 | } | 986 | } |
1378 | @@ -996,7 +997,7 @@ | |||
1379 | 996 | 997 | ||
1380 | 997 | ret= 1; | 998 | ret= 1; |
1381 | 998 | ret= setsockopt(connection->fd, IPPROTO_TCP, TCP_NODELAY, &ret, | 999 | ret= setsockopt(connection->fd, IPPROTO_TCP, TCP_NODELAY, &ret, |
1383 | 999 | (socklen_t)sizeof(int)); | 1000 | socklen_t(sizeof(int))); |
1384 | 1000 | if (ret == -1 && errno != EOPNOTSUPP) | 1001 | if (ret == -1 && errno != EOPNOTSUPP) |
1385 | 1001 | { | 1002 | { |
1386 | 1002 | gearman_perror(connection->universal, "setsockopt(TCP_NODELAY)"); | 1003 | gearman_perror(connection->universal, "setsockopt(TCP_NODELAY)"); |
1387 | @@ -1006,7 +1007,7 @@ | |||
1388 | 1006 | linger.l_onoff= 1; | 1007 | linger.l_onoff= 1; |
1389 | 1007 | linger.l_linger= GEARMAN_DEFAULT_SOCKET_TIMEOUT; | 1008 | linger.l_linger= GEARMAN_DEFAULT_SOCKET_TIMEOUT; |
1390 | 1008 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_LINGER, &linger, | 1009 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_LINGER, &linger, |
1392 | 1009 | (socklen_t)sizeof(struct linger)); | 1010 | socklen_t(sizeof(struct linger))); |
1393 | 1010 | if (ret == -1) | 1011 | if (ret == -1) |
1394 | 1011 | { | 1012 | { |
1395 | 1012 | gearman_perror(connection->universal, "setsockopt(SO_LINGER)"); | 1013 | gearman_perror(connection->universal, "setsockopt(SO_LINGER)"); |
1396 | @@ -1016,7 +1017,7 @@ | |||
1397 | 1016 | waittime.tv_sec= GEARMAN_DEFAULT_SOCKET_TIMEOUT; | 1017 | waittime.tv_sec= GEARMAN_DEFAULT_SOCKET_TIMEOUT; |
1398 | 1017 | waittime.tv_usec= 0; | 1018 | waittime.tv_usec= 0; |
1399 | 1018 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDTIMEO, &waittime, | 1019 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDTIMEO, &waittime, |
1401 | 1019 | (socklen_t)sizeof(struct timeval)); | 1020 | socklen_t(sizeof(struct timeval))); |
1402 | 1020 | if (ret == -1 && errno != ENOPROTOOPT) | 1021 | if (ret == -1 && errno != ENOPROTOOPT) |
1403 | 1021 | { | 1022 | { |
1404 | 1022 | gearman_perror(connection->universal, "setsockopt(SO_SNDTIMEO)"); | 1023 | gearman_perror(connection->universal, "setsockopt(SO_SNDTIMEO)"); |
1405 | @@ -1024,7 +1025,7 @@ | |||
1406 | 1024 | } | 1025 | } |
1407 | 1025 | 1026 | ||
1408 | 1026 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVTIMEO, &waittime, | 1027 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVTIMEO, &waittime, |
1410 | 1027 | (socklen_t)sizeof(struct timeval)); | 1028 | socklen_t(sizeof(struct timeval))); |
1411 | 1028 | if (ret == -1 && errno != ENOPROTOOPT) | 1029 | if (ret == -1 && errno != ENOPROTOOPT) |
1412 | 1029 | { | 1030 | { |
1413 | 1030 | gearman_perror(connection->universal, "setsockopt(SO_RCVTIMEO)"); | 1031 | gearman_perror(connection->universal, "setsockopt(SO_RCVTIMEO)"); |
1414 | @@ -1032,7 +1033,7 @@ | |||
1415 | 1032 | } | 1033 | } |
1416 | 1033 | 1034 | ||
1417 | 1034 | ret= GEARMAN_DEFAULT_SOCKET_SEND_SIZE; | 1035 | ret= GEARMAN_DEFAULT_SOCKET_SEND_SIZE; |
1419 | 1035 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDBUF, &ret, (socklen_t)sizeof(int)); | 1036 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDBUF, &ret, socklen_t(sizeof(int))); |
1420 | 1036 | if (ret == -1) | 1037 | if (ret == -1) |
1421 | 1037 | { | 1038 | { |
1422 | 1038 | gearman_perror(connection->universal, "setsockopt(SO_SNDBUF)"); | 1039 | gearman_perror(connection->universal, "setsockopt(SO_SNDBUF)"); |
1423 | @@ -1042,7 +1043,7 @@ | |||
1424 | 1042 | #if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) | 1043 | #if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) |
1425 | 1043 | { | 1044 | { |
1426 | 1044 | ret= 1; | 1045 | ret= 1; |
1428 | 1045 | setsockopt(connection->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&ret, sizeof(int)); | 1046 | setsockopt(connection->fd, SOL_SOCKET, SO_NOSIGPIPE, static_cast<void *>(&ret), sizeof(int)); |
1429 | 1046 | 1047 | ||
1430 | 1047 | // This is not considered a fatal error | 1048 | // This is not considered a fatal error |
1431 | 1048 | if (ret == -1) | 1049 | if (ret == -1) |
1432 | @@ -1053,7 +1054,7 @@ | |||
1433 | 1053 | #endif | 1054 | #endif |
1434 | 1054 | 1055 | ||
1435 | 1055 | ret= GEARMAN_DEFAULT_SOCKET_RECV_SIZE; | 1056 | ret= GEARMAN_DEFAULT_SOCKET_RECV_SIZE; |
1437 | 1056 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVBUF, &ret, (socklen_t)sizeof(int)); | 1057 | ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVBUF, &ret, socklen_t(sizeof(int))); |
1438 | 1057 | if (ret == -1) | 1058 | if (ret == -1) |
1439 | 1058 | { | 1059 | { |
1440 | 1059 | gearman_perror(connection->universal, "setsockopt(SO_RCVBUF)"); | 1060 | gearman_perror(connection->universal, "setsockopt(SO_RCVBUF)"); |
1441 | 1060 | 1061 | ||
1442 | === modified file 'libgearman/job.cc' | |||
1443 | --- libgearman/job.cc 2011-04-13 04:12:34 +0000 | |||
1444 | +++ libgearman/job.cc 2011-04-16 05:39:23 +0000 | |||
1445 | @@ -288,18 +288,18 @@ | |||
1446 | 288 | 288 | ||
1447 | 289 | const char *gearman_job_handle(const gearman_job_st *job) | 289 | const char *gearman_job_handle(const gearman_job_st *job) |
1448 | 290 | { | 290 | { |
1450 | 291 | return (const char *)job->assigned.arg[0]; | 291 | return static_cast<const char *>(job->assigned.arg[0]); |
1451 | 292 | } | 292 | } |
1452 | 293 | 293 | ||
1453 | 294 | const char *gearman_job_function_name(const gearman_job_st *job) | 294 | const char *gearman_job_function_name(const gearman_job_st *job) |
1454 | 295 | { | 295 | { |
1456 | 296 | return (const char *)job->assigned.arg[1]; | 296 | return static_cast<const char *>(job->assigned.arg[1]); |
1457 | 297 | } | 297 | } |
1458 | 298 | 298 | ||
1459 | 299 | const char *gearman_job_unique(const gearman_job_st *job) | 299 | const char *gearman_job_unique(const gearman_job_st *job) |
1460 | 300 | { | 300 | { |
1461 | 301 | if (job->assigned.command == GEARMAN_COMMAND_JOB_ASSIGN_UNIQ) | 301 | if (job->assigned.command == GEARMAN_COMMAND_JOB_ASSIGN_UNIQ) |
1463 | 302 | return (const char *)job->assigned.arg[2]; | 302 | return static_cast<const char *>(job->assigned.arg[2]); |
1464 | 303 | return ""; | 303 | return ""; |
1465 | 304 | } | 304 | } |
1466 | 305 | 305 | ||
1467 | 306 | 306 | ||
1468 | === modified file 'libgearman/task.cc' | |||
1469 | --- libgearman/task.cc 2011-04-13 04:12:34 +0000 | |||
1470 | +++ libgearman/task.cc 2011-04-16 05:39:23 +0000 | |||
1471 | @@ -110,7 +110,7 @@ | |||
1472 | 110 | if (task != &(task->client->do_task) && task->context != NULL && | 110 | if (task != &(task->client->do_task) && task->context != NULL && |
1473 | 111 | task->client->task_context_free_fn != NULL) | 111 | task->client->task_context_free_fn != NULL) |
1474 | 112 | { | 112 | { |
1476 | 113 | task->client->task_context_free_fn(task, (void *)task->context); | 113 | task->client->task_context_free_fn(task, static_cast<void *>(task->context)); |
1477 | 114 | } | 114 | } |
1478 | 115 | 115 | ||
1479 | 116 | if (task->client->task_list == task) | 116 | if (task->client->task_list == task) |
1480 | 117 | 117 | ||
1481 | === modified file 'libgearman/universal.cc' | |||
1482 | --- libgearman/universal.cc 2011-04-14 05:40:29 +0000 | |||
1483 | +++ libgearman/universal.cc 2011-04-16 05:39:23 +0000 | |||
1484 | @@ -404,7 +404,7 @@ | |||
1485 | 404 | } | 404 | } |
1486 | 405 | 405 | ||
1487 | 406 | size= strlen(gearman_strerror(rc)); | 406 | size= strlen(gearman_strerror(rc)); |
1489 | 407 | ptr= (char *)memcpy(log_buffer, gearman_strerror(rc), size); | 407 | ptr= static_cast<char *>(memcpy(log_buffer, gearman_strerror(rc), size)); |
1490 | 408 | ptr+= size; | 408 | ptr+= size; |
1491 | 409 | 409 | ||
1492 | 410 | ptr[0]= '>'; | 410 | ptr[0]= '>'; |
1493 | @@ -412,7 +412,7 @@ | |||
1494 | 412 | ptr++; | 412 | ptr++; |
1495 | 413 | 413 | ||
1496 | 414 | size= strlen(function); | 414 | size= strlen(function); |
1498 | 415 | ptr= (char *)memcpy(ptr, (void*)function, size); | 415 | ptr= static_cast<char *>(memcpy(ptr, static_cast<void*>(const_cast<char *>(function)), size)); |
1499 | 416 | ptr+= size; | 416 | ptr+= size; |
1500 | 417 | 417 | ||
1501 | 418 | ptr[0]= ':'; | 418 | ptr[0]= ':'; |
1502 | @@ -420,7 +420,7 @@ | |||
1503 | 420 | ptr++; | 420 | ptr++; |
1504 | 421 | 421 | ||
1505 | 422 | va_start(args, format); | 422 | va_start(args, format); |
1507 | 423 | size+= (size_t)vsnprintf(ptr, GEARMAN_MAX_ERROR_SIZE - size, format, args); | 423 | size+= size_t(vsnprintf(ptr, GEARMAN_MAX_ERROR_SIZE - size, format, args)); |
1508 | 424 | va_end(args); | 424 | va_end(args); |
1509 | 425 | 425 | ||
1510 | 426 | if (universal->log_fn == NULL) | 426 | if (universal->log_fn == NULL) |
1511 | @@ -433,7 +433,7 @@ | |||
1512 | 433 | else | 433 | else |
1513 | 434 | { | 434 | { |
1514 | 435 | universal->log_fn(log_buffer, GEARMAN_VERBOSE_FATAL, | 435 | universal->log_fn(log_buffer, GEARMAN_VERBOSE_FATAL, |
1516 | 436 | (void *)universal->log_context); | 436 | static_cast<void *>(universal->log_context)); |
1517 | 437 | } | 437 | } |
1518 | 438 | } | 438 | } |
1519 | 439 | 439 | ||
1520 | 440 | 440 | ||
1521 | === modified file 'libgearman/worker.cc' | |||
1522 | --- libgearman/worker.cc 2011-04-14 05:40:29 +0000 | |||
1523 | +++ libgearman/worker.cc 2011-04-16 05:39:23 +0000 | |||
1524 | @@ -187,7 +187,7 @@ | |||
1525 | 187 | else | 187 | else |
1526 | 188 | { | 188 | { |
1527 | 189 | (&worker->universal)->workload_free_fn(worker->work_result, | 189 | (&worker->universal)->workload_free_fn(worker->work_result, |
1529 | 190 | (void *)(&worker->universal)->workload_free_context); | 190 | static_cast<void *>((&worker->universal)->workload_free_context)); |
1530 | 191 | } | 191 | } |
1531 | 192 | } | 192 | } |
1532 | 193 | 193 | ||
1533 | @@ -219,25 +219,25 @@ | |||
1534 | 219 | memset(&options, 0, sizeof(gearman_worker_options_t)); | 219 | memset(&options, 0, sizeof(gearman_worker_options_t)); |
1535 | 220 | 220 | ||
1536 | 221 | if (worker->options.allocated) | 221 | if (worker->options.allocated) |
1538 | 222 | options|= (int)GEARMAN_WORKER_ALLOCATED; | 222 | options|= int(GEARMAN_WORKER_ALLOCATED); |
1539 | 223 | if (worker->options.non_blocking) | 223 | if (worker->options.non_blocking) |
1541 | 224 | options|= (int)GEARMAN_WORKER_NON_BLOCKING; | 224 | options|= int(GEARMAN_WORKER_NON_BLOCKING); |
1542 | 225 | if (worker->options.packet_init) | 225 | if (worker->options.packet_init) |
1544 | 226 | options|= (int)GEARMAN_WORKER_PACKET_INIT; | 226 | options|= int(GEARMAN_WORKER_PACKET_INIT); |
1545 | 227 | if (worker->options.grab_job_in_use) | 227 | if (worker->options.grab_job_in_use) |
1547 | 228 | options|= (int)GEARMAN_WORKER_GRAB_JOB_IN_USE; | 228 | options|= int(GEARMAN_WORKER_GRAB_JOB_IN_USE); |
1548 | 229 | if (worker->options.pre_sleep_in_use) | 229 | if (worker->options.pre_sleep_in_use) |
1550 | 230 | options|= (int)GEARMAN_WORKER_PRE_SLEEP_IN_USE; | 230 | options|= int(GEARMAN_WORKER_PRE_SLEEP_IN_USE); |
1551 | 231 | if (worker->options.work_job_in_use) | 231 | if (worker->options.work_job_in_use) |
1553 | 232 | options|= (int)GEARMAN_WORKER_WORK_JOB_IN_USE; | 232 | options|= int(GEARMAN_WORKER_WORK_JOB_IN_USE); |
1554 | 233 | if (worker->options.change) | 233 | if (worker->options.change) |
1556 | 234 | options|= (int)GEARMAN_WORKER_CHANGE; | 234 | options|= int(GEARMAN_WORKER_CHANGE); |
1557 | 235 | if (worker->options.grab_uniq) | 235 | if (worker->options.grab_uniq) |
1559 | 236 | options|= (int)GEARMAN_WORKER_GRAB_UNIQ; | 236 | options|= int(GEARMAN_WORKER_GRAB_UNIQ); |
1560 | 237 | if (worker->options.timeout_return) | 237 | if (worker->options.timeout_return) |
1562 | 238 | options|= (int)GEARMAN_WORKER_TIMEOUT_RETURN; | 238 | options|= int(GEARMAN_WORKER_TIMEOUT_RETURN); |
1563 | 239 | 239 | ||
1565 | 240 | return (gearman_worker_options_t)options; | 240 | return gearman_worker_options_t(options); |
1566 | 241 | } | 241 | } |
1567 | 242 | 242 | ||
1568 | 243 | void gearman_worker_set_options(gearman_worker_st *worker, | 243 | void gearman_worker_set_options(gearman_worker_st *worker, |
1569 | @@ -713,7 +713,7 @@ | |||
1570 | 713 | else | 713 | else |
1571 | 714 | { | 714 | { |
1572 | 715 | if ((&worker->universal)->timeout > 0) | 715 | if ((&worker->universal)->timeout > 0) |
1574 | 716 | usleep((unsigned int)(&worker->universal)->timeout * 1000); | 716 | usleep(static_cast<unsigned int>((&worker->universal)->timeout) * 1000); |
1575 | 717 | 717 | ||
1576 | 718 | if (worker->options.timeout_return) | 718 | if (worker->options.timeout_return) |
1577 | 719 | { | 719 | { |
1578 | @@ -841,7 +841,7 @@ | |||
1579 | 841 | 841 | ||
1580 | 842 | case GEARMAN_WORKER_WORK_UNIVERSAL_FUNCTION: | 842 | case GEARMAN_WORKER_WORK_UNIVERSAL_FUNCTION: |
1581 | 843 | worker->work_result= worker->work_function->worker_fn(&(worker->work_job), | 843 | worker->work_result= worker->work_function->worker_fn(&(worker->work_job), |
1583 | 844 | (void *)worker->work_function->context, | 844 | static_cast<void *>(worker->work_function->context), |
1584 | 845 | &(worker->work_result_size), &ret); | 845 | &(worker->work_result_size), &ret); |
1585 | 846 | if (ret == GEARMAN_WORK_FAIL) | 846 | if (ret == GEARMAN_WORK_FAIL) |
1586 | 847 | { | 847 | { |
1587 | @@ -1020,7 +1020,8 @@ | |||
1588 | 1020 | static gearman_return_t _worker_add_server(const char *host, in_port_t port, | 1020 | static gearman_return_t _worker_add_server(const char *host, in_port_t port, |
1589 | 1021 | void *context) | 1021 | void *context) |
1590 | 1022 | { | 1022 | { |
1592 | 1023 | return gearman_worker_add_server((gearman_worker_st *)context, host, port); | 1023 | return gearman_worker_add_server(static_cast<gearman_worker_st *>(context), |
1593 | 1024 | host, port); | ||
1594 | 1024 | } | 1025 | } |
1595 | 1025 | 1026 | ||
1596 | 1026 | static gearman_return_t _worker_function_create(gearman_worker_st *worker, | 1027 | static gearman_return_t _worker_function_create(gearman_worker_st *worker, |
1597 | 1027 | 1028 | ||
1598 | === modified file 'libtest/test.h' | |||
1599 | --- libtest/test.h 2011-03-28 00:28:55 +0000 | |||
1600 | +++ libtest/test.h 2011-04-16 05:39:23 +0000 | |||
1601 | @@ -116,6 +116,10 @@ | |||
1602 | 116 | 116 | ||
1603 | 117 | virtual ~world_st() | 117 | virtual ~world_st() |
1604 | 118 | { } | 118 | { } |
1605 | 119 | |||
1606 | 120 | private: | ||
1607 | 121 | world_st(const world_st&); | ||
1608 | 122 | world_st& operator=(const world_st&); | ||
1609 | 119 | }; | 123 | }; |
1610 | 120 | 124 | ||
1611 | 121 | 125 | ||
1612 | 122 | 126 | ||
1613 | === added file 'm4/iconv.m4' | |||
1614 | --- m4/iconv.m4 1970-01-01 00:00:00 +0000 | |||
1615 | +++ m4/iconv.m4 2011-04-16 05:39:23 +0000 | |||
1616 | @@ -0,0 +1,214 @@ | |||
1617 | 1 | # iconv.m4 serial 11 (gettext-0.18.1) | ||
1618 | 2 | dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. | ||
1619 | 3 | dnl This file is free software; the Free Software Foundation | ||
1620 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1621 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1622 | 6 | |||
1623 | 7 | dnl From Bruno Haible. | ||
1624 | 8 | |||
1625 | 9 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | ||
1626 | 10 | [ | ||
1627 | 11 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
1628 | 12 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
1629 | 13 | AC_REQUIRE([AC_LIB_RPATH]) | ||
1630 | 14 | |||
1631 | 15 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
1632 | 16 | dnl accordingly. | ||
1633 | 17 | AC_LIB_LINKFLAGS_BODY([iconv]) | ||
1634 | 18 | ]) | ||
1635 | 19 | |||
1636 | 20 | AC_DEFUN([AM_ICONV_LINK], | ||
1637 | 21 | [ | ||
1638 | 22 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | ||
1639 | 23 | dnl those with the standalone portable GNU libiconv installed). | ||
1640 | 24 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
1641 | 25 | |||
1642 | 26 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
1643 | 27 | dnl accordingly. | ||
1644 | 28 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
1645 | 29 | |||
1646 | 30 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, | ||
1647 | 31 | dnl because if the user has installed libiconv and not disabled its use | ||
1648 | 32 | dnl via --without-libiconv-prefix, he wants to use it. The first | ||
1649 | 33 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. | ||
1650 | 34 | am_save_CPPFLAGS="$CPPFLAGS" | ||
1651 | 35 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | ||
1652 | 36 | |||
1653 | 37 | AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ | ||
1654 | 38 | am_cv_func_iconv="no, consider installing GNU libiconv" | ||
1655 | 39 | am_cv_lib_iconv=no | ||
1656 | 40 | AC_TRY_LINK([#include <stdlib.h> | ||
1657 | 41 | #include <iconv.h>], | ||
1658 | 42 | [iconv_t cd = iconv_open("",""); | ||
1659 | 43 | iconv(cd,NULL,NULL,NULL,NULL); | ||
1660 | 44 | iconv_close(cd);], | ||
1661 | 45 | [am_cv_func_iconv=yes]) | ||
1662 | 46 | if test "$am_cv_func_iconv" != yes; then | ||
1663 | 47 | am_save_LIBS="$LIBS" | ||
1664 | 48 | LIBS="$LIBS $LIBICONV" | ||
1665 | 49 | AC_TRY_LINK([#include <stdlib.h> | ||
1666 | 50 | #include <iconv.h>], | ||
1667 | 51 | [iconv_t cd = iconv_open("",""); | ||
1668 | 52 | iconv(cd,NULL,NULL,NULL,NULL); | ||
1669 | 53 | iconv_close(cd);], | ||
1670 | 54 | [am_cv_lib_iconv=yes] | ||
1671 | 55 | [am_cv_func_iconv=yes]) | ||
1672 | 56 | LIBS="$am_save_LIBS" | ||
1673 | 57 | fi | ||
1674 | 58 | ]) | ||
1675 | 59 | if test "$am_cv_func_iconv" = yes; then | ||
1676 | 60 | AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ | ||
1677 | 61 | dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. | ||
1678 | 62 | am_save_LIBS="$LIBS" | ||
1679 | 63 | if test $am_cv_lib_iconv = yes; then | ||
1680 | 64 | LIBS="$LIBS $LIBICONV" | ||
1681 | 65 | fi | ||
1682 | 66 | AC_TRY_RUN([ | ||
1683 | 67 | #include <iconv.h> | ||
1684 | 68 | #include <string.h> | ||
1685 | 69 | int main () | ||
1686 | 70 | { | ||
1687 | 71 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful | ||
1688 | 72 | returns. */ | ||
1689 | 73 | { | ||
1690 | 74 | iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); | ||
1691 | 75 | if (cd_utf8_to_88591 != (iconv_t)(-1)) | ||
1692 | 76 | { | ||
1693 | 77 | static const char input[] = "\342\202\254"; /* EURO SIGN */ | ||
1694 | 78 | char buf[10]; | ||
1695 | 79 | const char *inptr = input; | ||
1696 | 80 | size_t inbytesleft = strlen (input); | ||
1697 | 81 | char *outptr = buf; | ||
1698 | 82 | size_t outbytesleft = sizeof (buf); | ||
1699 | 83 | size_t res = iconv (cd_utf8_to_88591, | ||
1700 | 84 | (char **) &inptr, &inbytesleft, | ||
1701 | 85 | &outptr, &outbytesleft); | ||
1702 | 86 | if (res == 0) | ||
1703 | 87 | return 1; | ||
1704 | 88 | } | ||
1705 | 89 | } | ||
1706 | 90 | /* Test against Solaris 10 bug: Failures are not distinguishable from | ||
1707 | 91 | successful returns. */ | ||
1708 | 92 | { | ||
1709 | 93 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); | ||
1710 | 94 | if (cd_ascii_to_88591 != (iconv_t)(-1)) | ||
1711 | 95 | { | ||
1712 | 96 | static const char input[] = "\263"; | ||
1713 | 97 | char buf[10]; | ||
1714 | 98 | const char *inptr = input; | ||
1715 | 99 | size_t inbytesleft = strlen (input); | ||
1716 | 100 | char *outptr = buf; | ||
1717 | 101 | size_t outbytesleft = sizeof (buf); | ||
1718 | 102 | size_t res = iconv (cd_ascii_to_88591, | ||
1719 | 103 | (char **) &inptr, &inbytesleft, | ||
1720 | 104 | &outptr, &outbytesleft); | ||
1721 | 105 | if (res == 0) | ||
1722 | 106 | return 1; | ||
1723 | 107 | } | ||
1724 | 108 | } | ||
1725 | 109 | #if 0 /* This bug could be worked around by the caller. */ | ||
1726 | 110 | /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ | ||
1727 | 111 | { | ||
1728 | 112 | iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); | ||
1729 | 113 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
1730 | 114 | { | ||
1731 | 115 | static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; | ||
1732 | 116 | char buf[50]; | ||
1733 | 117 | const char *inptr = input; | ||
1734 | 118 | size_t inbytesleft = strlen (input); | ||
1735 | 119 | char *outptr = buf; | ||
1736 | 120 | size_t outbytesleft = sizeof (buf); | ||
1737 | 121 | size_t res = iconv (cd_88591_to_utf8, | ||
1738 | 122 | (char **) &inptr, &inbytesleft, | ||
1739 | 123 | &outptr, &outbytesleft); | ||
1740 | 124 | if ((int)res > 0) | ||
1741 | 125 | return 1; | ||
1742 | 126 | } | ||
1743 | 127 | } | ||
1744 | 128 | #endif | ||
1745 | 129 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is | ||
1746 | 130 | provided. */ | ||
1747 | 131 | if (/* Try standardized names. */ | ||
1748 | 132 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | ||
1749 | 133 | /* Try IRIX, OSF/1 names. */ | ||
1750 | 134 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | ||
1751 | 135 | /* Try AIX names. */ | ||
1752 | 136 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | ||
1753 | 137 | /* Try HP-UX names. */ | ||
1754 | 138 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | ||
1755 | 139 | return 1; | ||
1756 | 140 | return 0; | ||
1757 | 141 | }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], | ||
1758 | 142 | [case "$host_os" in | ||
1759 | 143 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | ||
1760 | 144 | *) am_cv_func_iconv_works="guessing yes" ;; | ||
1761 | 145 | esac]) | ||
1762 | 146 | LIBS="$am_save_LIBS" | ||
1763 | 147 | ]) | ||
1764 | 148 | case "$am_cv_func_iconv_works" in | ||
1765 | 149 | *no) am_func_iconv=no am_cv_lib_iconv=no ;; | ||
1766 | 150 | *) am_func_iconv=yes ;; | ||
1767 | 151 | esac | ||
1768 | 152 | else | ||
1769 | 153 | am_func_iconv=no am_cv_lib_iconv=no | ||
1770 | 154 | fi | ||
1771 | 155 | if test "$am_func_iconv" = yes; then | ||
1772 | 156 | AC_DEFINE([HAVE_ICONV], [1], | ||
1773 | 157 | [Define if you have the iconv() function and it works.]) | ||
1774 | 158 | fi | ||
1775 | 159 | if test "$am_cv_lib_iconv" = yes; then | ||
1776 | 160 | AC_MSG_CHECKING([how to link with libiconv]) | ||
1777 | 161 | AC_MSG_RESULT([$LIBICONV]) | ||
1778 | 162 | else | ||
1779 | 163 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | ||
1780 | 164 | dnl either. | ||
1781 | 165 | CPPFLAGS="$am_save_CPPFLAGS" | ||
1782 | 166 | LIBICONV= | ||
1783 | 167 | LTLIBICONV= | ||
1784 | 168 | fi | ||
1785 | 169 | AC_SUBST([LIBICONV]) | ||
1786 | 170 | AC_SUBST([LTLIBICONV]) | ||
1787 | 171 | ]) | ||
1788 | 172 | |||
1789 | 173 | dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to | ||
1790 | 174 | dnl avoid warnings like | ||
1791 | 175 | dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". | ||
1792 | 176 | dnl This is tricky because of the way 'aclocal' is implemented: | ||
1793 | 177 | dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. | ||
1794 | 178 | dnl Otherwise aclocal's initial scan pass would miss the macro definition. | ||
1795 | 179 | dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. | ||
1796 | 180 | dnl Otherwise aclocal would emit many "Use of uninitialized value $1" | ||
1797 | 181 | dnl warnings. | ||
1798 | 182 | m4_define([gl_iconv_AC_DEFUN], | ||
1799 | 183 | m4_version_prereq([2.64], | ||
1800 | 184 | [[AC_DEFUN_ONCE( | ||
1801 | 185 | [$1], [$2])]], | ||
1802 | 186 | [[AC_DEFUN( | ||
1803 | 187 | [$1], [$2])]])) | ||
1804 | 188 | gl_iconv_AC_DEFUN([AM_ICONV], | ||
1805 | 189 | [ | ||
1806 | 190 | AM_ICONV_LINK | ||
1807 | 191 | if test "$am_cv_func_iconv" = yes; then | ||
1808 | 192 | AC_MSG_CHECKING([for iconv declaration]) | ||
1809 | 193 | AC_CACHE_VAL([am_cv_proto_iconv], [ | ||
1810 | 194 | AC_TRY_COMPILE([ | ||
1811 | 195 | #include <stdlib.h> | ||
1812 | 196 | #include <iconv.h> | ||
1813 | 197 | extern | ||
1814 | 198 | #ifdef __cplusplus | ||
1815 | 199 | "C" | ||
1816 | 200 | #endif | ||
1817 | 201 | #if defined(__STDC__) || defined(__cplusplus) | ||
1818 | 202 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | ||
1819 | 203 | #else | ||
1820 | 204 | size_t iconv(); | ||
1821 | 205 | #endif | ||
1822 | 206 | ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) | ||
1823 | 207 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) | ||
1824 | 208 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | ||
1825 | 209 | AC_MSG_RESULT([ | ||
1826 | 210 | $am_cv_proto_iconv]) | ||
1827 | 211 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | ||
1828 | 212 | [Define as const if the declaration of iconv() needs const.]) | ||
1829 | 213 | fi | ||
1830 | 214 | ]) | ||
1831 | 0 | 215 | ||
1832 | === modified file 'm4/pandora_64bit.m4' | |||
1833 | --- m4/pandora_64bit.m4 2009-09-29 04:30:01 +0000 | |||
1834 | +++ m4/pandora_64bit.m4 2011-04-16 05:39:23 +0000 | |||
1835 | @@ -1,5 +1,5 @@ | |||
1838 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
1839 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
1840 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
1841 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
1842 | 5 | 5 | ||
1843 | @@ -20,9 +20,9 @@ | |||
1844 | 20 | [isainfo_b=`${ISAINFO} -b`], | 20 | [isainfo_b=`${ISAINFO} -b`], |
1845 | 21 | [isainfo_b="x"]) | 21 | [isainfo_b="x"]) |
1846 | 22 | 22 | ||
1848 | 23 | AS_IF([test "$isainfo_b" != "x"],[ | 23 | AS_IF([test "$isainfo_b" != "x" -a "$isainfo_b" != "32"],[ |
1849 | 24 | 24 | ||
1851 | 25 | isainfo_k=`${ISAINFO} -k` | 25 | isainfo_k=`${ISAINFO} -k` |
1852 | 26 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}" | 26 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}" |
1853 | 27 | 27 | ||
1854 | 28 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ | 28 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ |
1855 | @@ -32,7 +32,7 @@ | |||
1856 | 32 | ]) | 32 | ]) |
1857 | 33 | 33 | ||
1858 | 34 | AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ | 34 | AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ |
1860 | 35 | dnl The user hasn't overridden the default libdir, so we'll | 35 | dnl The user hasn't overridden the default libdir, so we'll |
1861 | 36 | dnl the dir suffix to match solaris 32/64-bit policy | 36 | dnl the dir suffix to match solaris 32/64-bit policy |
1862 | 37 | libdir="${libdir}/${isainfo_k}" | 37 | libdir="${libdir}/${isainfo_k}" |
1863 | 38 | ]) | 38 | ]) |
1864 | 39 | 39 | ||
1865 | === added file 'm4/pandora_bison.m4' | |||
1866 | --- m4/pandora_bison.m4 1970-01-01 00:00:00 +0000 | |||
1867 | +++ m4/pandora_bison.m4 2011-04-16 05:39:23 +0000 | |||
1868 | @@ -0,0 +1,33 @@ | |||
1869 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
1870 | 2 | dnl Copyright (C) 2010 Hartmut Holzgraefe | ||
1871 | 3 | dnl This file is free software; Monty Taylor and Hartmut Holzgraefe | ||
1872 | 4 | dnl give unlimited permission to copy and/or distribute it, | ||
1873 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1874 | 6 | |||
1875 | 7 | AC_DEFUN([_PANDORA_SEARCH_BISON],[ | ||
1876 | 8 | |||
1877 | 9 | dnl -------------------------------------------------------------------- | ||
1878 | 10 | dnl Check for bison | ||
1879 | 11 | dnl -------------------------------------------------------------------- | ||
1880 | 12 | |||
1881 | 13 | AC_CHECK_PROGS([YACC], ['bison -y'], [:]) | ||
1882 | 14 | AS_IF([test "x$YACC" = "x:"],[ | ||
1883 | 15 | pandora_have_bison=no | ||
1884 | 16 | YACC='if test -f "$@"; then echo "WARNING: no proper bison binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper bison binary found"; exit 1; fi;' | ||
1885 | 17 | ],[ | ||
1886 | 18 | pandora_have_bison=yes | ||
1887 | 19 | ]) | ||
1888 | 20 | |||
1889 | 21 | AM_CONDITIONAL(HAVE_BISON, [test "x${pandora_have_bison}" = "xyes"]) | ||
1890 | 22 | ]) | ||
1891 | 23 | |||
1892 | 24 | AC_DEFUN([PANDORA_HAVE_BISON],[ | ||
1893 | 25 | AC_REQUIRE([_PANDORA_SEARCH_BISON]) | ||
1894 | 26 | ]) | ||
1895 | 27 | |||
1896 | 28 | AC_DEFUN([PANDORA_REQUIRE_BISON],[ | ||
1897 | 29 | AC_REQUIRE([PANDORA_HAVE_BISON]) | ||
1898 | 30 | AS_IF([test "x${pandora_have_bison}" = "xno" -a "$pandora_building_from_bzr" = "yes"], | ||
1899 | 31 | PANDORA_MSG_ERROR(["bison is required for ${PACKAGE} to build from a bzr branch"]) | ||
1900 | 32 | ) | ||
1901 | 33 | ]) | ||
1902 | 0 | 34 | ||
1903 | === modified file 'm4/pandora_canonical.m4' | |||
1904 | --- m4/pandora_canonical.m4 2011-03-03 07:48:59 +0000 | |||
1905 | +++ m4/pandora_canonical.m4 2011-04-16 05:39:23 +0000 | |||
1906 | @@ -4,7 +4,15 @@ | |||
1907 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
1908 | 5 | 5 | ||
1909 | 6 | dnl Which version of the canonical setup we're using | 6 | dnl Which version of the canonical setup we're using |
1911 | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171]) | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.177]) |
1912 | 8 | |||
1913 | 9 | AC_DEFUN([PANDORA_MSG_ERROR],[ | ||
1914 | 10 | AS_IF([test "x${pandora_cv_skip_requires}" != "xno"],[ | ||
1915 | 11 | AC_MSG_ERROR($1) | ||
1916 | 12 | ],[ | ||
1917 | 13 | AC_MSG_WARN($1) | ||
1918 | 14 | ]) | ||
1919 | 15 | ]) | ||
1920 | 8 | 16 | ||
1921 | 9 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ | 17 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
1922 | 10 | AC_ARG_ENABLE([fat-binaries], | 18 | AC_ARG_ENABLE([fat-binaries], |
1923 | @@ -25,7 +33,7 @@ | |||
1924 | 25 | 33 | ||
1925 | 26 | AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[ | 34 | AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[ |
1926 | 27 | AS_IF([test "x${prefix}" = "x"],[ | 35 | AS_IF([test "x${prefix}" = "x"],[ |
1928 | 28 | AC_MSG_ERROR([--prefix requires an argument]) | 36 | PANDORA_MSG_ERROR([--prefix requires an argument]) |
1929 | 29 | ]) | 37 | ]) |
1930 | 30 | ]) | 38 | ]) |
1931 | 31 | 39 | ||
1932 | @@ -115,7 +123,7 @@ | |||
1933 | 115 | vc_changelog=yes | 123 | vc_changelog=yes |
1934 | 116 | ]) | 124 | ]) |
1935 | 117 | m4_if(PCT_VERSION_FROM_VC,yes,[ | 125 | m4_if(PCT_VERSION_FROM_VC,yes,[ |
1937 | 118 | PANDORA_VC_VERSION | 126 | PANDORA_VC_INFO_HEADER |
1938 | 119 | ],[ | 127 | ],[ |
1939 | 120 | PANDORA_TEST_VC_DIR | 128 | PANDORA_TEST_VC_DIR |
1940 | 121 | 129 | ||
1941 | @@ -151,7 +159,7 @@ | |||
1942 | 151 | PANDORA_CHECK_CXX_STANDARD | 159 | PANDORA_CHECK_CXX_STANDARD |
1943 | 152 | m4_if(PCT_REQUIRE_CXX, [yes], [ | 160 | m4_if(PCT_REQUIRE_CXX, [yes], [ |
1944 | 153 | AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ | 161 | AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ |
1946 | 154 | AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) | 162 | PANDORA_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) |
1947 | 155 | ]) | 163 | ]) |
1948 | 156 | ]) | 164 | ]) |
1949 | 157 | PANDORA_CXX_CSTDINT | 165 | PANDORA_CXX_CSTDINT |
1950 | @@ -182,12 +190,12 @@ | |||
1951 | 182 | # off_t is not a builtin type | 190 | # off_t is not a builtin type |
1952 | 183 | AC_CHECK_SIZEOF(off_t, 4) | 191 | AC_CHECK_SIZEOF(off_t, 4) |
1953 | 184 | AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[ | 192 | AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[ |
1955 | 185 | AC_MSG_ERROR("${PACKAGE} needs an off_t type.") | 193 | PANDORA_MSG_ERROR("${PACKAGE} needs an off_t type.") |
1956 | 186 | ]) | 194 | ]) |
1957 | 187 | 195 | ||
1958 | 188 | AC_CHECK_SIZEOF(size_t) | 196 | AC_CHECK_SIZEOF(size_t) |
1959 | 189 | AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[ | 197 | AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[ |
1961 | 190 | AC_MSG_ERROR("${PACKAGE} needs an size_t type.") | 198 | PANDORA_MSG_ERROR("${PACKAGE} needs an size_t type.") |
1962 | 191 | ]) | 199 | ]) |
1963 | 192 | 200 | ||
1964 | 193 | AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()]) | 201 | AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()]) |
1965 | @@ -268,6 +276,7 @@ | |||
1966 | 268 | 276 | ||
1967 | 269 | AC_LIB_PREFIX | 277 | AC_LIB_PREFIX |
1968 | 270 | PANDORA_HAVE_BETTER_MALLOC | 278 | PANDORA_HAVE_BETTER_MALLOC |
1969 | 279 | PANDORA_WITH_VALGRIND | ||
1970 | 271 | 280 | ||
1971 | 272 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) | 281 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
1972 | 273 | AC_CHECK_PROGS([PERL], [perl]) | 282 | AC_CHECK_PROGS([PERL], [perl]) |
1973 | @@ -328,6 +337,7 @@ | |||
1974 | 328 | #error "You should include config.h as your first include file" | 337 | #error "You should include config.h as your first include file" |
1975 | 329 | #endif | 338 | #endif |
1976 | 330 | 339 | ||
1977 | 340 | #include <config/top.h> | ||
1978 | 331 | ]) | 341 | ]) |
1979 | 332 | mkdir -p config | 342 | mkdir -p config |
1980 | 333 | cat > config/top.h.stamp <<EOF_CONFIG_TOP | 343 | cat > config/top.h.stamp <<EOF_CONFIG_TOP |
1981 | @@ -374,14 +384,6 @@ | |||
1982 | 374 | #define SOCKET_ERROR -1 | 384 | #define SOCKET_ERROR -1 |
1983 | 375 | #define closesocket(a) close(a) | 385 | #define closesocket(a) close(a) |
1984 | 376 | #define get_socket_errno() errno | 386 | #define get_socket_errno() errno |
1985 | 377 | #endif // TARGET_OS_WINDOWS | ||
1986 | 378 | |||
1987 | 379 | #ifndef HAVE_MSG_NOSIGNAL | ||
1988 | 380 | #define MSG_NOSIGNAL 0 | ||
1989 | 381 | #endif | ||
1990 | 382 | |||
1991 | 383 | #ifndef HAVE_MSG_DONTWAIT | ||
1992 | 384 | #define MSG_DONTWAIT 0 | ||
1993 | 385 | #endif | 387 | #endif |
1994 | 386 | 388 | ||
1995 | 387 | #if defined(__cplusplus) | 389 | #if defined(__cplusplus) |
1996 | 388 | 390 | ||
1997 | === modified file 'm4/pandora_check_compiler_version.m4' | |||
1998 | --- m4/pandora_check_compiler_version.m4 2009-07-08 07:19:19 +0000 | |||
1999 | +++ m4/pandora_check_compiler_version.m4 2011-04-16 05:39:23 +0000 | |||
2000 | @@ -1,5 +1,5 @@ | |||
2003 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2004 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2005 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2006 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2007 | 5 | 5 | ||
2008 | 6 | 6 | ||
2009 | === modified file 'm4/pandora_check_cxx_standard.m4' | |||
2010 | --- m4/pandora_check_cxx_standard.m4 2009-12-18 18:02:39 +0000 | |||
2011 | +++ m4/pandora_check_cxx_standard.m4 2011-04-16 05:39:23 +0000 | |||
2012 | @@ -1,10 +1,10 @@ | |||
2015 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2016 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2017 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2018 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2019 | 5 | 5 | ||
2020 | 6 | AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[ | 6 | AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[ |
2022 | 7 | AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X]) | 7 | dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X]) |
2023 | 8 | AS_IF([test "$GCC" = "yes"], | 8 | AS_IF([test "$GCC" = "yes"], |
2024 | 9 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[], | 9 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[], |
2025 | 10 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"], | 10 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"], |
2026 | 11 | 11 | ||
2027 | === modified file 'm4/pandora_cinttypes.m4' | |||
2028 | --- m4/pandora_cinttypes.m4 2009-12-18 18:02:39 +0000 | |||
2029 | +++ m4/pandora_cinttypes.m4 2011-04-16 05:39:23 +0000 | |||
2030 | @@ -1,3 +1,8 @@ | |||
2031 | 1 | # Copyright (C) 2008 Sun Microsystems, Inc. | ||
2032 | 2 | # This file is free software; Sun Microsystems, Inc. | ||
2033 | 3 | # gives unlimited permission to copy and/or distribute it, | ||
2034 | 4 | # with or without modifications, as long as this notice is preserved. | ||
2035 | 5 | |||
2036 | 1 | # We check two things: where the include file is for cinttypes. We | 6 | # We check two things: where the include file is for cinttypes. We |
2037 | 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the | 7 | # include AC_TRY_COMPILE for all the combinations we've seen in the |
2038 | 3 | # wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or | 8 | # wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or |
2039 | 4 | 9 | ||
2040 | === added file 'm4/pandora_compile_stdcxx_0x.m4' | |||
2041 | --- m4/pandora_compile_stdcxx_0x.m4 1970-01-01 00:00:00 +0000 | |||
2042 | +++ m4/pandora_compile_stdcxx_0x.m4 2011-04-16 05:39:23 +0000 | |||
2043 | @@ -0,0 +1,103 @@ | |||
2044 | 1 | # =========================================================================== | ||
2045 | 2 | # http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html | ||
2046 | 3 | # =========================================================================== | ||
2047 | 4 | # | ||
2048 | 5 | # SYNOPSIS | ||
2049 | 6 | # | ||
2050 | 7 | # AC_CXX_COMPILE_STDCXX_0X | ||
2051 | 8 | # | ||
2052 | 9 | # DESCRIPTION | ||
2053 | 10 | # | ||
2054 | 11 | # Check for baseline language coverage in the compiler for the C++0x | ||
2055 | 12 | # standard. | ||
2056 | 13 | # | ||
2057 | 14 | # LICENSE | ||
2058 | 15 | # | ||
2059 | 16 | # Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com> | ||
2060 | 17 | # | ||
2061 | 18 | # Copying and distribution of this file, with or without modification, are | ||
2062 | 19 | # permitted in any medium without royalty provided the copyright notice | ||
2063 | 20 | # and this notice are preserved. | ||
2064 | 21 | |||
2065 | 22 | AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [ | ||
2066 | 23 | AC_CACHE_CHECK(if g++ supports C++0x features without additional flags, | ||
2067 | 24 | ac_cv_cxx_compile_cxx0x_native, | ||
2068 | 25 | [AC_LANG_SAVE | ||
2069 | 26 | AC_LANG_CPLUSPLUS | ||
2070 | 27 | AC_TRY_COMPILE([ | ||
2071 | 28 | template <typename T> | ||
2072 | 29 | struct check | ||
2073 | 30 | { | ||
2074 | 31 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | ||
2075 | 32 | }; | ||
2076 | 33 | |||
2077 | 34 | typedef check<check<bool>> right_angle_brackets; | ||
2078 | 35 | |||
2079 | 36 | int a; | ||
2080 | 37 | decltype(a) b; | ||
2081 | 38 | |||
2082 | 39 | typedef check<int> check_type; | ||
2083 | 40 | check_type c; | ||
2084 | 41 | check_type&& cr = c;],, | ||
2085 | 42 | ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no) | ||
2086 | 43 | AC_LANG_RESTORE | ||
2087 | 44 | ]) | ||
2088 | 45 | |||
2089 | 46 | AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x, | ||
2090 | 47 | ac_cv_cxx_compile_cxx0x_cxx, | ||
2091 | 48 | [AC_LANG_SAVE | ||
2092 | 49 | AC_LANG_CPLUSPLUS | ||
2093 | 50 | ac_save_CXXFLAGS="$CXXFLAGS" | ||
2094 | 51 | CXXFLAGS="$CXXFLAGS -std=c++0x" | ||
2095 | 52 | AC_TRY_COMPILE([ | ||
2096 | 53 | template <typename T> | ||
2097 | 54 | struct check | ||
2098 | 55 | { | ||
2099 | 56 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | ||
2100 | 57 | }; | ||
2101 | 58 | |||
2102 | 59 | typedef check<check<bool>> right_angle_brackets; | ||
2103 | 60 | |||
2104 | 61 | int a; | ||
2105 | 62 | decltype(a) b; | ||
2106 | 63 | |||
2107 | 64 | typedef check<int> check_type; | ||
2108 | 65 | check_type c; | ||
2109 | 66 | check_type&& cr = c;],, | ||
2110 | 67 | ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no) | ||
2111 | 68 | CXXFLAGS="$ac_save_CXXFLAGS" | ||
2112 | 69 | AC_LANG_RESTORE | ||
2113 | 70 | ]) | ||
2114 | 71 | |||
2115 | 72 | AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x, | ||
2116 | 73 | ac_cv_cxx_compile_cxx0x_gxx, | ||
2117 | 74 | [AC_LANG_SAVE | ||
2118 | 75 | AC_LANG_CPLUSPLUS | ||
2119 | 76 | ac_save_CXXFLAGS="$CXXFLAGS" | ||
2120 | 77 | CXXFLAGS="$CXXFLAGS -std=gnu++0x" | ||
2121 | 78 | AC_TRY_COMPILE([ | ||
2122 | 79 | template <typename T> | ||
2123 | 80 | struct check | ||
2124 | 81 | { | ||
2125 | 82 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | ||
2126 | 83 | }; | ||
2127 | 84 | |||
2128 | 85 | typedef check<check<bool>> right_angle_brackets; | ||
2129 | 86 | |||
2130 | 87 | int a; | ||
2131 | 88 | decltype(a) b; | ||
2132 | 89 | |||
2133 | 90 | typedef check<int> check_type; | ||
2134 | 91 | check_type c; | ||
2135 | 92 | check_type&& cr = c;],, | ||
2136 | 93 | ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no) | ||
2137 | 94 | CXXFLAGS="$ac_save_CXXFLAGS" | ||
2138 | 95 | AC_LANG_RESTORE | ||
2139 | 96 | ]) | ||
2140 | 97 | |||
2141 | 98 | if test "$ac_cv_cxx_compile_cxx0x_native" = yes || | ||
2142 | 99 | test "$ac_cv_cxx_compile_cxx0x_cxx" = yes || | ||
2143 | 100 | test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then | ||
2144 | 101 | AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ]) | ||
2145 | 102 | fi | ||
2146 | 103 | ]) | ||
2147 | 0 | 104 | ||
2148 | === modified file 'm4/pandora_cstdint.m4' | |||
2149 | --- m4/pandora_cstdint.m4 2009-12-18 18:02:39 +0000 | |||
2150 | +++ m4/pandora_cstdint.m4 2011-04-16 05:39:23 +0000 | |||
2151 | @@ -1,3 +1,8 @@ | |||
2152 | 1 | # Copyright (C) 2008 Sun Microsystems, Inc. | ||
2153 | 2 | # This file is free software; Sun Microsystems, Inc. | ||
2154 | 3 | # gives unlimited permission to copy and/or distribute it, | ||
2155 | 4 | # with or without modifications, as long as this notice is preserved. | ||
2156 | 5 | |||
2157 | 1 | # We check two things: where the include file is for cstdint. We | 6 | # We check two things: where the include file is for cstdint. We |
2158 | 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the | 7 | # include AC_TRY_COMPILE for all the combinations we've seen in the |
2159 | 3 | # wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or | 8 | # wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or |
2160 | 4 | 9 | ||
2161 | === modified file 'm4/pandora_cxx_demangle.m4' | |||
2162 | --- m4/pandora_cxx_demangle.m4 2009-12-18 18:02:39 +0000 | |||
2163 | +++ m4/pandora_cxx_demangle.m4 2011-04-16 05:39:23 +0000 | |||
2164 | @@ -1,5 +1,5 @@ | |||
2167 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2168 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2169 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2170 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2171 | 5 | 5 | ||
2172 | 6 | 6 | ||
2173 | === modified file 'm4/pandora_drizzle_build.m4' | |||
2174 | --- m4/pandora_drizzle_build.m4 2010-04-06 00:33:06 +0000 | |||
2175 | +++ m4/pandora_drizzle_build.m4 2011-04-16 05:39:23 +0000 | |||
2176 | @@ -1,5 +1,5 @@ | |||
2179 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2180 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2181 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2182 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2183 | 5 | 5 | ||
2184 | @@ -9,11 +9,6 @@ | |||
2185 | 9 | 9 | ||
2186 | 10 | AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ | 10 | AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ |
2187 | 11 | 11 | ||
2188 | 12 | PANDORA_HAVE_CXX_UNORDERED | ||
2189 | 13 | |||
2190 | 14 | PANDORA_CXX_CSTDINT | ||
2191 | 15 | PANDORA_CXX_CINTTYPES | ||
2192 | 16 | |||
2193 | 17 | AC_STRUCT_TM | 12 | AC_STRUCT_TM |
2194 | 18 | 13 | ||
2195 | 19 | AC_FUNC_ALLOCA | 14 | AC_FUNC_ALLOCA |
2196 | @@ -38,7 +33,7 @@ | |||
2197 | 38 | AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h) | 33 | AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h) |
2198 | 39 | AC_CHECK_HEADERS(select.h sys/select.h) | 34 | AC_CHECK_HEADERS(select.h sys/select.h) |
2199 | 40 | AC_CHECK_HEADERS(utime.h sys/utime.h ) | 35 | AC_CHECK_HEADERS(utime.h sys/utime.h ) |
2201 | 41 | AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h) | 36 | AC_CHECK_HEADERS(synch.h sys/mman.h) |
2202 | 42 | AC_CHECK_HEADERS(sched.h) | 37 | AC_CHECK_HEADERS(sched.h) |
2203 | 43 | AC_CHECK_HEADERS(sys/prctl.h) | 38 | AC_CHECK_HEADERS(sys/prctl.h) |
2204 | 44 | AC_CHECK_HEADERS(execinfo.h) | 39 | AC_CHECK_HEADERS(execinfo.h) |
2205 | @@ -68,44 +63,20 @@ | |||
2206 | 68 | ]]) | 63 | ]]) |
2207 | 69 | AC_CHECK_TYPES([uint, ulong]) | 64 | AC_CHECK_TYPES([uint, ulong]) |
2208 | 70 | 65 | ||
2209 | 66 | PANDORA_REQUIRE_BISON | ||
2210 | 67 | |||
2211 | 71 | PANDORA_CXX_DEMANGLE | 68 | PANDORA_CXX_DEMANGLE |
2251 | 72 | PANDORA_REQUIRE_BOOST([1.32]) | 69 | PANDORA_REQUIRE_BOOST([1.38]) |
2252 | 73 | 70 | PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS | |
2253 | 74 | 71 | PANDORA_REQUIRE_BOOST_THREAD | |
2254 | 75 | AH_TOP([ | 72 | PANDORA_REQUIRE_BOOST_REGEX |
2255 | 76 | #ifndef __CONFIG_H__ | 73 | PANDORA_REQUIRE_BOOST_DATE_TIME |
2256 | 77 | #define __CONFIG_H__ | 74 | PANDORA_REQUIRE_BOOST_FILESYSTEM |
2257 | 78 | 75 | PANDORA_REQUIRE_BOOST_IOSTREAMS | |
2258 | 79 | #include "config/top.h" | 76 | |
2259 | 80 | ]) | 77 | LIBDRIZZLE_CPPFLAGS="-I\${top_builddir}/libdrizzle-2.0 -I\${top_srcdir}/libdrizzle-2.0" |
2260 | 81 | mkdir -p config | 78 | OLDLIBDRIZZLE_CPPFLAGS="-I\${top_builddir}/libdrizzle-1.0 -I\${top_srcdir}/libdrizzle-1.0" |
2261 | 82 | cat > config/top.h.stamp <<EOF_CONFIG_TOP | 79 | AC_SUBST([LIBDRIZZLE_CPPFLAGS]) |
2262 | 83 | 80 | AC_SUBST([OLDLIBDRIZZLE_CPPFLAGS]) | |
2263 | 84 | #if defined(i386) && !defined(__i386__) | 81 | |
2225 | 85 | #define __i386__ | ||
2226 | 86 | #endif | ||
2227 | 87 | |||
2228 | 88 | #if defined(_FILE_OFFSET_BITS) | ||
2229 | 89 | # undef _FILE_OFFSET_BITS | ||
2230 | 90 | #endif | ||
2231 | 91 | EOF_CONFIG_TOP | ||
2232 | 92 | diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h | ||
2233 | 93 | rm -f config/top.h.stamp | ||
2234 | 94 | |||
2235 | 95 | |||
2236 | 96 | AH_BOTTOM([ | ||
2237 | 97 | #if defined(__cplusplus) | ||
2238 | 98 | # include CSTDINT_H | ||
2239 | 99 | # include CINTTYPES_H | ||
2240 | 100 | #else | ||
2241 | 101 | # include <stdint.h> | ||
2242 | 102 | # include <inttypes.h> | ||
2243 | 103 | #endif | ||
2244 | 104 | |||
2245 | 105 | #if !defined(HAVE_ULONG) && !defined(__USE_MISC) | ||
2246 | 106 | typedef unsigned long int ulong; | ||
2247 | 107 | #endif | ||
2248 | 108 | |||
2249 | 109 | #endif /* __CONFIG_H__ */ | ||
2250 | 110 | ]) | ||
2264 | 111 | ]) | 82 | ]) |
2265 | 112 | 83 | ||
2266 | === modified file 'm4/pandora_enable_dtrace.m4' | |||
2267 | --- m4/pandora_enable_dtrace.m4 2009-09-29 04:30:01 +0000 | |||
2268 | +++ m4/pandora_enable_dtrace.m4 2011-04-16 05:39:23 +0000 | |||
2269 | @@ -1,5 +1,5 @@ | |||
2272 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2273 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2274 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2275 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2276 | 5 | 5 | ||
2277 | @@ -8,32 +8,49 @@ | |||
2278 | 8 | dnl --------------------------------------------------------------------------- | 8 | dnl --------------------------------------------------------------------------- |
2279 | 9 | AC_DEFUN([PANDORA_ENABLE_DTRACE],[ | 9 | AC_DEFUN([PANDORA_ENABLE_DTRACE],[ |
2280 | 10 | AC_ARG_ENABLE([dtrace], | 10 | AC_ARG_ENABLE([dtrace], |
2285 | 11 | [AS_HELP_STRING([--enable-dtrace], | 11 | [AS_HELP_STRING([--disable-dtrace], |
2286 | 12 | [Build with support for the DTRACE. @<:@default=off@:>@])], | 12 | [Build with support for the DTRACE. @<:@default=on@:>@])], |
2287 | 13 | [ac_cv_enable_dtrace="yes"], | 13 | [ac_cv_enable_dtrace="$enableval"], |
2288 | 14 | [ac_cv_enable_dtrace="no"]) | 14 | [ac_cv_enable_dtrace="yes"]) |
2289 | 15 | 15 | ||
2290 | 16 | AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[ | 16 | AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[ |
2291 | 17 | AC_CHECK_PROGS([DTRACE], [dtrace]) | 17 | AC_CHECK_PROGS([DTRACE], [dtrace]) |
2303 | 18 | AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[ | 18 | AC_CHECK_HEADERS(sys/sdt.h) |
2304 | 19 | AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support]) | 19 | |
2305 | 20 | AC_MSG_CHECKING([if dtrace should instrument object files]) | 20 | AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[ |
2306 | 21 | dnl DTrace on MacOSX does not use -G option | 21 | |
2307 | 22 | cat >conftest.d <<_ACEOF | 22 | AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[ |
2308 | 23 | provider Example { | 23 | cat >conftest.d <<_ACEOF |
2309 | 24 | probe increment(int); | 24 | provider Example { |
2310 | 25 | }; | 25 | probe increment(int); |
2311 | 26 | _ACEOF | 26 | }; |
2312 | 27 | $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero | 27 | _ACEOF |
2313 | 28 | AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes], | 28 | $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero |
2314 | 29 | AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes], | ||
2315 | 30 | [ac_cv_dtrace_works=no]) | ||
2316 | 31 | rm -f conftest.h conftest.d | ||
2317 | 32 | ]) | ||
2318 | 33 | AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[ | ||
2319 | 34 | AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support]) | ||
2320 | 35 | ]) | ||
2321 | 36 | AC_CACHE_CHECK([if dtrace should instrument object files], | ||
2322 | 37 | [ac_cv_dtrace_needs_objects],[ | ||
2323 | 38 | dnl DTrace on MacOSX does not use -G option | ||
2324 | 39 | cat >conftest.d <<_ACEOF | ||
2325 | 40 | provider Example { | ||
2326 | 41 | probe increment(int); | ||
2327 | 42 | }; | ||
2328 | 43 | _ACEOF | ||
2329 | 44 | $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero | ||
2330 | 45 | AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes], | ||
2331 | 29 | [ac_cv_dtrace_needs_objects=no]) | 46 | [ac_cv_dtrace_needs_objects=no]) |
2334 | 30 | rm -f conftest.d.o conftest.d | 47 | rm -f conftest.d.o conftest.d |
2335 | 31 | AC_MSG_RESULT($ac_cv_dtrace_needs_objects) | 48 | ]) |
2336 | 32 | AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX | 49 | AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX |
2337 | 33 | ac_cv_have_dtrace=yes | 50 | ac_cv_have_dtrace=yes |
2338 | 34 | ])]) | 51 | ])]) |
2339 | 35 | 52 | ||
2341 | 36 | AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_have_dtrace" = "xyes"]) | 53 | AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"]) |
2342 | 37 | AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS], | 54 | AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS], |
2343 | 38 | [test "x$ac_cv_dtrace_needs_objects" = "xyes"]) | 55 | [test "x$ac_cv_dtrace_needs_objects" = "xyes"]) |
2344 | 39 | 56 | ||
2345 | 40 | 57 | ||
2346 | === modified file 'm4/pandora_ensure_gcc_version.m4' | |||
2347 | --- m4/pandora_ensure_gcc_version.m4 2009-09-29 04:30:01 +0000 | |||
2348 | +++ m4/pandora_ensure_gcc_version.m4 2011-04-16 05:39:23 +0000 | |||
2349 | @@ -1,8 +1,22 @@ | |||
2352 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2353 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2354 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2355 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2356 | 5 | 5 | ||
2357 | 6 | AC_DEFUN([_PANDORA_TRY_GCC],[ | ||
2358 | 7 | pushdef([Name],[translit([$1],[./-], [___])]) | ||
2359 | 8 | pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
2360 | 9 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
2361 | 10 | AC_CHECK_PROGS([CC]NAME,[gcc$1]) | ||
2362 | 11 | AC_CHECK_PROGS([CXX]NAME,[g++$1]) | ||
2363 | 12 | AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CC_set}" = "x"], | ||
2364 | 13 | [CC="${CC]NAME[}"]) | ||
2365 | 14 | AS_IF([test "x${CXX]NAME[}" != "x" -a "x${ac_cv_env_CCX_set}" = "x"], | ||
2366 | 15 | [CXX="${CXX]NAME[}"]) | ||
2367 | 16 | AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CPP_set}" = "x"], | ||
2368 | 17 | [CPP="${CC]NAME[} -E"]) | ||
2369 | 18 | ]) | ||
2370 | 19 | |||
2371 | 6 | dnl If the user is on a Mac and didn't ask for a specific compiler | 20 | dnl If the user is on a Mac and didn't ask for a specific compiler |
2372 | 7 | dnl You're gonna get 4.2. | 21 | dnl You're gonna get 4.2. |
2373 | 8 | AC_DEFUN([PANDORA_MAC_GCC42], | 22 | AC_DEFUN([PANDORA_MAC_GCC42], |
2374 | @@ -10,30 +24,39 @@ | |||
2375 | 10 | AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ | 24 | AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ |
2376 | 11 | host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'` | 25 | host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'` |
2377 | 12 | AS_IF([test "$host_os_version" -lt 10],[ | 26 | AS_IF([test "$host_os_version" -lt 10],[ |
2384 | 13 | AS_IF([test -f /usr/bin/gcc-4.2], | 27 | _PANDORA_TRY_GCC([-4.2]) |
2379 | 14 | [ | ||
2380 | 15 | CPP="/usr/bin/gcc-4.2 -E" | ||
2381 | 16 | CC=/usr/bin/gcc-4.2 | ||
2382 | 17 | CXX=/usr/bin/g++-4.2 | ||
2383 | 18 | ]) | ||
2385 | 19 | ]) | 28 | ]) |
2386 | 20 | ]) | 29 | ]) |
2387 | 21 | ]) | 30 | ]) |
2388 | 22 | ]) | 31 | ]) |
2389 | 23 | 32 | ||
2390 | 33 | dnl If the user is on CentOS or RHEL and didn't ask for a specific compiler | ||
2391 | 34 | dnl You're gonna get 4.4 (forward compatible with 4.5) | ||
2392 | 35 | AC_DEFUN([PANDORA_RH_GCC44], | ||
2393 | 36 | [AS_IF([test "$GCC" = "yes"],[ | ||
2394 | 37 | AS_IF([test "x${ac_cv_env_CC_set}" = "x"],[ | ||
2395 | 38 | _PANDORA_TRY_GCC([44]) | ||
2396 | 39 | _PANDORA_TRY_GCC([45]) | ||
2397 | 40 | ]) | ||
2398 | 41 | ]) | ||
2399 | 42 | ]) | ||
2400 | 43 | |||
2401 | 24 | dnl | 44 | dnl |
2402 | 25 | AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[ | 45 | AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[ |
2403 | 26 | AC_REQUIRE([PANDORA_MAC_GCC42]) | 46 | AC_REQUIRE([PANDORA_MAC_GCC42]) |
2407 | 27 | AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent], | 47 | AC_REQUIRE([PANDORA_RH_GCC44]) |
2408 | 28 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 48 | AS_IF([test "$GCC" = "yes"],[ |
2409 | 29 | #if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1)) | 49 | AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent], |
2410 | 50 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
2411 | 51 | #if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2)) | ||
2412 | 30 | # error GCC is Too Old! | 52 | # error GCC is Too Old! |
2413 | 31 | #endif | 53 | #endif |
2421 | 32 | ]])], | 54 | ]])], |
2422 | 33 | [ac_cv_gcc_recent=yes], | 55 | [ac_cv_gcc_recent=yes], |
2423 | 34 | [ac_cv_gcc_recent=no])]) | 56 | [ac_cv_gcc_recent=no])]) |
2424 | 35 | AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"], | 57 | AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"], |
2425 | 36 | AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2])) | 58 | PANDORA_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2])) |
2426 | 37 | AS_IF([test "$ac_cv_gcc_recent" = "no"], | 59 | AS_IF([test "$ac_cv_gcc_recent" = "no"], |
2427 | 38 | AC_MSG_ERROR([Your version of GCC is too old. At least version 4.1 is required])) | 60 | PANDORA_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required. On RHEL/CentOS systems this is found in the gcc44 and gcc44-c++ packages.])) |
2428 | 61 | ]) | ||
2429 | 39 | ]) | 62 | ]) |
2430 | 40 | 63 | ||
2431 | === modified file 'm4/pandora_extensions.m4' | |||
2432 | --- m4/pandora_extensions.m4 2009-09-29 04:30:01 +0000 | |||
2433 | +++ m4/pandora_extensions.m4 2011-04-16 05:39:23 +0000 | |||
2434 | @@ -1,5 +1,5 @@ | |||
2437 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2438 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2439 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2440 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2441 | 5 | 5 | ||
2442 | 6 | 6 | ||
2443 | === modified file 'm4/pandora_fdatasync.m4' | |||
2444 | --- m4/pandora_fdatasync.m4 2010-04-06 00:33:06 +0000 | |||
2445 | +++ m4/pandora_fdatasync.m4 2011-04-16 05:39:23 +0000 | |||
2446 | @@ -1,5 +1,5 @@ | |||
2449 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2450 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2451 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2452 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2453 | 5 | 5 | ||
2454 | 6 | 6 | ||
2455 | === added file 'm4/pandora_flex.m4' | |||
2456 | --- m4/pandora_flex.m4 1970-01-01 00:00:00 +0000 | |||
2457 | +++ m4/pandora_flex.m4 2011-04-16 05:39:23 +0000 | |||
2458 | @@ -0,0 +1,33 @@ | |||
2459 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
2460 | 2 | dnl Copyright (C) 2010 Hartmut Holzgraefe | ||
2461 | 3 | dnl This file is free software; Monty Taylor and Hartmut Holzgraefe | ||
2462 | 4 | dnl give unlimited permission to copy and/or distribute it, | ||
2463 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
2464 | 6 | |||
2465 | 7 | AC_DEFUN([_PANDORA_SEARCH_FLEX],[ | ||
2466 | 8 | |||
2467 | 9 | dnl -------------------------------------------------------------------- | ||
2468 | 10 | dnl Check for flex | ||
2469 | 11 | dnl -------------------------------------------------------------------- | ||
2470 | 12 | |||
2471 | 13 | AC_CHECK_PROGS([LEX], ['flex'], [:]) | ||
2472 | 14 | AS_IF([test "x$LEX" = "x:"],[ | ||
2473 | 15 | pandora_have_flex=no | ||
2474 | 16 | LEX='if test -f "$@"; then echo "WARNING: no proper flex binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper flex binary found"; exit 1; fi;' | ||
2475 | 17 | ],[ | ||
2476 | 18 | pandora_have_flex=yes | ||
2477 | 19 | ]) | ||
2478 | 20 | |||
2479 | 21 | AM_CONDITIONAL(HAVE_FLEX, [test "x${pandora_have_flex}" = "xyes"]) | ||
2480 | 22 | ]) | ||
2481 | 23 | |||
2482 | 24 | AC_DEFUN([PANDORA_HAVE_FLEX],[ | ||
2483 | 25 | AC_REQUIRE([_PANDORA_SEARCH_FLEX]) | ||
2484 | 26 | ]) | ||
2485 | 27 | |||
2486 | 28 | AC_DEFUN([PANDORA_REQUIRE_FLEX],[ | ||
2487 | 29 | AC_REQUIRE([PANDORA_HAVE_FLEX]) | ||
2488 | 30 | AS_IF([test "x${pandora_have_flex}" = "xno" -a "$pandora_building_from_bzr" = "yes"], | ||
2489 | 31 | PANDORA_MSG_ERROR(["flex is required for ${PACKAGE} to build from a bzr branch"]) | ||
2490 | 32 | ) | ||
2491 | 33 | ]) | ||
2492 | 0 | 34 | ||
2493 | === modified file 'm4/pandora_have_better_malloc.m4' | |||
2494 | --- m4/pandora_have_better_malloc.m4 2010-01-13 10:48:24 +0000 | |||
2495 | +++ m4/pandora_have_better_malloc.m4 2011-04-16 05:39:23 +0000 | |||
2496 | @@ -1,11 +1,9 @@ | |||
2499 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2500 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2501 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2502 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2503 | 5 | 5 | ||
2504 | 6 | AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ | 6 | AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ |
2505 | 7 | AC_REQUIRE([AC_FUNC_MALLOC]) | ||
2506 | 8 | AC_REQUIRE([AC_FUNC_REALLOC]) | ||
2507 | 9 | AC_REQUIRE([AC_LIB_PREFIX]) | 7 | AC_REQUIRE([AC_LIB_PREFIX]) |
2508 | 10 | 8 | ||
2509 | 11 | AC_ARG_ENABLE([umem], | 9 | AC_ARG_ENABLE([umem], |
2510 | 12 | 10 | ||
2511 | === added file 'm4/pandora_have_boost.m4' | |||
2512 | --- m4/pandora_have_boost.m4 1970-01-01 00:00:00 +0000 | |||
2513 | +++ m4/pandora_have_boost.m4 2011-04-16 05:39:23 +0000 | |||
2514 | @@ -0,0 +1,93 @@ | |||
2515 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
2516 | 2 | dnl This file is free software; Monty Taylor | ||
2517 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2518 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2519 | 5 | |||
2520 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST],[ | ||
2521 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2522 | 8 | |||
2523 | 9 | dnl -------------------------------------------------------------------- | ||
2524 | 10 | dnl Check for boost | ||
2525 | 11 | dnl -------------------------------------------------------------------- | ||
2526 | 12 | |||
2527 | 13 | AC_ARG_ENABLE([boost], | ||
2528 | 14 | [AS_HELP_STRING([--disable-boost], | ||
2529 | 15 | [Build with boost support @<:@default=on@:>@])], | ||
2530 | 16 | [ac_enable_boost="$enableval"], | ||
2531 | 17 | [ac_enable_boost="yes"]) | ||
2532 | 18 | |||
2533 | 19 | AS_IF([test "x$ac_enable_boost" = "xyes"],[ | ||
2534 | 20 | dnl link against libc because we're just looking for headers here | ||
2535 | 21 | AC_LANG_PUSH(C++) | ||
2536 | 22 | AC_LIB_HAVE_LINKFLAGS(c,, | ||
2537 | 23 | [#include <boost/pool/pool.hpp>], | ||
2538 | 24 | [boost::pool<> test_pool(1);], | ||
2539 | 25 | [system]) | ||
2540 | 26 | AC_LANG_POP() | ||
2541 | 27 | ],[ | ||
2542 | 28 | ac_cv_boost="no" | ||
2543 | 29 | ]) | ||
2544 | 30 | |||
2545 | 31 | |||
2546 | 32 | AS_IF([test "x$1" != "x"],[ | ||
2547 | 33 | AC_CACHE_CHECK([if boost is recent enough], | ||
2548 | 34 | [pandora_cv_recent_boost],[ | ||
2549 | 35 | pandora_need_boost_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d00", $[]1, $[]2 ;'` | ||
2550 | 36 | AS_IF([test "x${pandora_need_boost_version}" = "x000000"],[ | ||
2551 | 37 | pandora_cv_recent_boost=yes | ||
2552 | 38 | ],[ | ||
2553 | 39 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
2554 | 40 | #include <boost/version.hpp> | ||
2555 | 41 | |||
2556 | 42 | #if BOOST_VERSION < ${pandora_need_boost_version} | ||
2557 | 43 | # error boost too old! | ||
2558 | 44 | #endif | ||
2559 | 45 | ]],[[]]) | ||
2560 | 46 | ],[ | ||
2561 | 47 | pandora_cv_recent_boost=yes | ||
2562 | 48 | ],[ | ||
2563 | 49 | pandora_cv_recent_boost=no | ||
2564 | 50 | ]) | ||
2565 | 51 | ]) | ||
2566 | 52 | ]) | ||
2567 | 53 | AS_IF([test "x${pandora_cv_recent_boost}" = "xno"],[ | ||
2568 | 54 | ac_cv_boost=no | ||
2569 | 55 | ]) | ||
2570 | 56 | ]) | ||
2571 | 57 | |||
2572 | 58 | AS_IF([test "x${ac_gcc_profile_mode}" = "xyes"],[ | ||
2573 | 59 | AC_CACHE_CHECK([if boost is recent enough for GCC Profile Mode], | ||
2574 | 60 | [pandora_cv_boost_profile],[ | ||
2575 | 61 | pandora_need_boost_version=104300 | ||
2576 | 62 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
2577 | 63 | #include <boost/version.hpp> | ||
2578 | 64 | |||
2579 | 65 | #if BOOST_VERSION < ${pandora_need_boost_version} | ||
2580 | 66 | # error boost too old! | ||
2581 | 67 | #endif | ||
2582 | 68 | ]],[[]]) | ||
2583 | 69 | ],[ | ||
2584 | 70 | pandora_cv_boost_profile=yes | ||
2585 | 71 | ],[ | ||
2586 | 72 | pandora_cv_boost_profile=no | ||
2587 | 73 | ]) | ||
2588 | 74 | ]) | ||
2589 | 75 | AS_IF([test "x${pandora_cv_boost_profile}" = "xyes"],[ | ||
2590 | 76 | AC_DEFINE([BOOST_DETAIL_NO_CONTAINER_FWD],[1],[Disable forward decl of stl in boost]) | ||
2591 | 77 | ]) | ||
2592 | 78 | ]) | ||
2593 | 79 | |||
2594 | 80 | AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"]) | ||
2595 | 81 | |||
2596 | 82 | ]) | ||
2597 | 83 | |||
2598 | 84 | AC_DEFUN([PANDORA_HAVE_BOOST],[ | ||
2599 | 85 | _PANDORA_SEARCH_BOOST($1) | ||
2600 | 86 | ]) | ||
2601 | 87 | |||
2602 | 88 | AC_DEFUN([PANDORA_REQUIRE_BOOST],[ | ||
2603 | 89 | PANDORA_HAVE_BOOST($1) | ||
2604 | 90 | AS_IF([test x$ac_cv_boost = xno], | ||
2605 | 91 | PANDORA_MSG_ERROR([boost is required for ${PACKAGE}])) | ||
2606 | 92 | ]) | ||
2607 | 93 | |||
2608 | 0 | 94 | ||
2609 | === modified file 'm4/pandora_have_gcc_atomics.m4' | |||
2610 | --- m4/pandora_have_gcc_atomics.m4 2010-04-06 00:33:06 +0000 | |||
2611 | +++ m4/pandora_have_gcc_atomics.m4 2011-04-16 05:39:23 +0000 | |||
2612 | @@ -1,5 +1,5 @@ | |||
2615 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2616 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2617 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2618 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2619 | 5 | 5 | ||
2620 | 6 | 6 | ||
2621 | === added file 'm4/pandora_have_libaio.m4' | |||
2622 | --- m4/pandora_have_libaio.m4 1970-01-01 00:00:00 +0000 | |||
2623 | +++ m4/pandora_have_libaio.m4 2011-04-16 05:39:23 +0000 | |||
2624 | @@ -0,0 +1,56 @@ | |||
2625 | 1 | dnl Copyright (C) 2011 Andrew Hutchings | ||
2626 | 2 | dnl This file is free software; Sun Microsystems, Inc. | ||
2627 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2628 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2629 | 5 | |||
2630 | 6 | #-------------------------------------------------------------------- | ||
2631 | 7 | # Check for libaio | ||
2632 | 8 | #-------------------------------------------------------------------- | ||
2633 | 9 | |||
2634 | 10 | |||
2635 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[ | ||
2636 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2637 | 13 | |||
2638 | 14 | AC_CHECK_HEADERS(libaio.h) | ||
2639 | 15 | AC_LIB_HAVE_LINKFLAGS(aio,, | ||
2640 | 16 | [ | ||
2641 | 17 | #include <libaio.h> | ||
2642 | 18 | ], | ||
2643 | 19 | [ | ||
2644 | 20 | int aio_cmd= IO_CMD_PREAD; | ||
2645 | 21 | ]) | ||
2646 | 22 | |||
2647 | 23 | AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"]) | ||
2648 | 24 | |||
2649 | 25 | AS_IF([test "x${ac_cv_libaio}" = "xyes"],[ | ||
2650 | 26 | AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB]) | ||
2651 | 27 | ]) | ||
2652 | 28 | ]) | ||
2653 | 29 | |||
2654 | 30 | AC_DEFUN([_PANDORA_HAVE_LIBAIO],[ | ||
2655 | 31 | |||
2656 | 32 | AC_ARG_ENABLE([libaio], | ||
2657 | 33 | [AS_HELP_STRING([--disable-libaio], | ||
2658 | 34 | [Build with libaio support @<:@default=on@:>@])], | ||
2659 | 35 | [ac_enable_libaio="$enableval"], | ||
2660 | 36 | [ac_enable_libaio="yes"]) | ||
2661 | 37 | |||
2662 | 38 | _PANDORA_SEARCH_LIBAIO | ||
2663 | 39 | ]) | ||
2664 | 40 | |||
2665 | 41 | |||
2666 | 42 | AC_DEFUN([PANDORA_HAVE_LIBAIO],[ | ||
2667 | 43 | AC_REQUIRE([_PANDORA_HAVE_LIBAIO]) | ||
2668 | 44 | ]) | ||
2669 | 45 | |||
2670 | 46 | AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[ | ||
2671 | 47 | ac_enable_libaio="yes" | ||
2672 | 48 | _PANDORA_SEARCH_LIBAIO | ||
2673 | 49 | AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[ | ||
2674 | 50 | PANDORA_MSG_ERROR([Couldn't find libaio.h. On Debian this can be found in libaio-dev. On Redhat this can be found in libaio-devel.]) | ||
2675 | 51 | ]) | ||
2676 | 52 | ]) | ||
2677 | 53 | |||
2678 | 54 | AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[ | ||
2679 | 55 | AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO]) | ||
2680 | 56 | ]) | ||
2681 | 0 | 57 | ||
2682 | === modified file 'm4/pandora_have_libavahi.m4' | |||
2683 | --- m4/pandora_have_libavahi.m4 2009-12-18 18:02:39 +0000 | |||
2684 | +++ m4/pandora_have_libavahi.m4 2011-04-16 05:39:23 +0000 | |||
2685 | @@ -1,5 +1,5 @@ | |||
2688 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2689 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2690 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2691 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2692 | 5 | 5 | ||
2693 | @@ -37,5 +37,5 @@ | |||
2694 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[ | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[ |
2695 | 38 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) | 38 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) |
2696 | 39 | AS_IF([test "x${ac_cv_libavahi}" = "xno"], | 39 | AS_IF([test "x${ac_cv_libavahi}" = "xno"], |
2698 | 40 | AC_MSG_ERROR([libavahi is required for ${PACKAGE}])) | 40 | PANDORA_MSG_ERROR([libavahi is required for ${PACKAGE}])) |
2699 | 41 | ]) | 41 | ]) |
2700 | 42 | 42 | ||
2701 | === modified file 'm4/pandora_have_libbdb.m4' | |||
2702 | --- m4/pandora_have_libbdb.m4 2009-12-18 18:02:39 +0000 | |||
2703 | +++ m4/pandora_have_libbdb.m4 2011-04-16 05:39:23 +0000 | |||
2704 | @@ -1,5 +1,5 @@ | |||
2707 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2708 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
2709 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2710 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2711 | 5 | 5 | ||
2712 | @@ -36,5 +36,5 @@ | |||
2713 | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[ | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[ |
2714 | 37 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) | 37 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) |
2715 | 38 | AS_IF([test "x${ac_cv_libbdb}" = "xno"], | 38 | AS_IF([test "x${ac_cv_libbdb}" = "xno"], |
2717 | 39 | AC_MSG_ERROR([libbdb is required for ${PACKAGE}])) | 39 | PANDORA_MSG_ERROR([libbdb is required for ${PACKAGE}])) |
2718 | 40 | ]) | 40 | ]) |
2719 | 41 | 41 | ||
2720 | === added file 'm4/pandora_have_libboost_date_time.m4' | |||
2721 | --- m4/pandora_have_libboost_date_time.m4 1970-01-01 00:00:00 +0000 | |||
2722 | +++ m4/pandora_have_libboost_date_time.m4 2011-04-16 05:39:23 +0000 | |||
2723 | @@ -0,0 +1,46 @@ | |||
2724 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
2725 | 2 | dnl This file is free software; Monty Taylor | ||
2726 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2727 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2728 | 5 | |||
2729 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[ | ||
2730 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2731 | 8 | AC_REQUIRE([ACX_PTHREAD]) | ||
2732 | 9 | |||
2733 | 10 | dnl -------------------------------------------------------------------- | ||
2734 | 11 | dnl Check for Boost.Date_Time | ||
2735 | 12 | dnl -------------------------------------------------------------------- | ||
2736 | 13 | |||
2737 | 14 | AC_LANG_PUSH(C++) | ||
2738 | 15 | AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[ | ||
2739 | 16 | #include <boost/date_time.hpp> | ||
2740 | 17 | ],[ | ||
2741 | 18 | boost::gregorian::date weekstart(2002,2,1); | ||
2742 | 19 | ]) | ||
2743 | 20 | AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[ | ||
2744 | 21 | AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[ | ||
2745 | 22 | #include <boost/date_time.hpp> | ||
2746 | 23 | ],[ | ||
2747 | 24 | boost::gregorian::date weekstart(2002,2,1); | ||
2748 | 25 | ]) | ||
2749 | 26 | ]) | ||
2750 | 27 | AC_LANG_POP() | ||
2751 | 28 | |||
2752 | 29 | AM_CONDITIONAL(HAVE_BOOST_DATE_TIME, | ||
2753 | 30 | [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"]) | ||
2754 | 31 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}" | ||
2755 | 32 | AC_SUBST(BOOST_LIBS) | ||
2756 | 33 | ]) | ||
2757 | 34 | |||
2758 | 35 | AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[ | ||
2759 | 36 | PANDORA_HAVE_BOOST($1) | ||
2760 | 37 | _PANDORA_SEARCH_BOOST_DATE_TIME($1) | ||
2761 | 38 | ]) | ||
2762 | 39 | |||
2763 | 40 | AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[ | ||
2764 | 41 | PANDORA_REQUIRE_BOOST($1) | ||
2765 | 42 | _PANDORA_SEARCH_BOOST_DATE_TIME($1) | ||
2766 | 43 | AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"], | ||
2767 | 44 | PANDORA_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}])) | ||
2768 | 45 | ]) | ||
2769 | 46 | |||
2770 | 0 | 47 | ||
2771 | === added file 'm4/pandora_have_libboost_filesystem.m4' | |||
2772 | --- m4/pandora_have_libboost_filesystem.m4 1970-01-01 00:00:00 +0000 | |||
2773 | +++ m4/pandora_have_libboost_filesystem.m4 2011-04-16 05:39:23 +0000 | |||
2774 | @@ -0,0 +1,48 @@ | |||
2775 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
2776 | 2 | dnl This file is free software; Monty Taylor | ||
2777 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2778 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2779 | 5 | |||
2780 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[ | ||
2781 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2782 | 8 | |||
2783 | 9 | dnl -------------------------------------------------------------------- | ||
2784 | 10 | dnl Check for Boost.Filesystem | ||
2785 | 11 | dnl -------------------------------------------------------------------- | ||
2786 | 12 | |||
2787 | 13 | AC_LANG_PUSH(C++) | ||
2788 | 14 | AC_DEFINE([BOOST_FILESYSTEM_DEPRECATED], [1], | ||
2789 | 15 | [Use the v2 interface until we can stop using old versions]) | ||
2790 | 16 | |||
2791 | 17 | AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,boost_system-mt,[ | ||
2792 | 18 | #include <boost/filesystem.hpp> | ||
2793 | 19 | ],[ | ||
2794 | 20 | boost::filesystem::path my_path("some_dir/file.txt"); | ||
2795 | 21 | ]) | ||
2796 | 22 | AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[ | ||
2797 | 23 | AC_LIB_HAVE_LINKFLAGS(boost_filesystem,boost_system,[ | ||
2798 | 24 | #include <boost/filesystem.hpp> | ||
2799 | 25 | ],[ | ||
2800 | 26 | boost::filesystem::path my_path("some_dir/file.txt"); | ||
2801 | 27 | ]) | ||
2802 | 28 | ]) | ||
2803 | 29 | AC_LANG_POP() | ||
2804 | 30 | |||
2805 | 31 | AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM, | ||
2806 | 32 | [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"]) | ||
2807 | 33 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}" | ||
2808 | 34 | AC_SUBST(BOOST_LIBS) | ||
2809 | 35 | ]) | ||
2810 | 36 | |||
2811 | 37 | AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[ | ||
2812 | 38 | PANDORA_HAVE_BOOST($1) | ||
2813 | 39 | _PANDORA_SEARCH_BOOST_FILESYSTEM($1) | ||
2814 | 40 | ]) | ||
2815 | 41 | |||
2816 | 42 | AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[ | ||
2817 | 43 | PANDORA_REQUIRE_BOOST($1) | ||
2818 | 44 | _PANDORA_SEARCH_BOOST_FILESYSTEM($1) | ||
2819 | 45 | AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"], | ||
2820 | 46 | PANDORA_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}])) | ||
2821 | 47 | ]) | ||
2822 | 48 | |||
2823 | 0 | 49 | ||
2824 | === added file 'm4/pandora_have_libboost_iostreams.m4' | |||
2825 | --- m4/pandora_have_libboost_iostreams.m4 1970-01-01 00:00:00 +0000 | |||
2826 | +++ m4/pandora_have_libboost_iostreams.m4 2011-04-16 05:39:23 +0000 | |||
2827 | @@ -0,0 +1,49 @@ | |||
2828 | 1 | dnl Copyright (C) 2010 Andrew Hutchings | ||
2829 | 2 | dnl This file is free software; Andrew Hutchings | ||
2830 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2831 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2832 | 5 | |||
2833 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_IOSTREAMS],[ | ||
2834 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2835 | 8 | |||
2836 | 9 | dnl -------------------------------------------------------------------- | ||
2837 | 10 | dnl Check for Boost.Iostreams | ||
2838 | 11 | dnl -------------------------------------------------------------------- | ||
2839 | 12 | |||
2840 | 13 | AC_LANG_PUSH(C++) | ||
2841 | 14 | AC_LIB_HAVE_LINKFLAGS(boost_iostreams-mt,,[ | ||
2842 | 15 | #include <boost/iostreams/stream.hpp> | ||
2843 | 16 | #include <boost/iostreams/device/array.hpp> | ||
2844 | 17 | ],[ | ||
2845 | 18 | const char* input= "hello world"; | ||
2846 | 19 | boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input)); | ||
2847 | 20 | ]) | ||
2848 | 21 | AS_IF([test "x${ac_cv_libboost_iostreams_mt}" = "xno"],[ | ||
2849 | 22 | AC_LIB_HAVE_LINKFLAGS(boost_iostreams,,[ | ||
2850 | 23 | #include <boost/iostreams/stream.hpp> | ||
2851 | 24 | #include <boost/iostreams/device/array.hpp> | ||
2852 | 25 | ],[ | ||
2853 | 26 | const char* input= "hello world"; | ||
2854 | 27 | boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input)); | ||
2855 | 28 | ]) | ||
2856 | 29 | ]) | ||
2857 | 30 | AC_LANG_POP() | ||
2858 | 31 | |||
2859 | 32 | AM_CONDITIONAL(HAVE_BOOST_IOSTREAMS, | ||
2860 | 33 | [test "x${ac_cv_libboost_iostreams}" = "xyes" -o "x${ac_cv_libboost_iostreams_mt}" = "xyes"]) | ||
2861 | 34 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_IOSTREAMS_MT} ${LTLIBBOOST_IOSTREAMS}" | ||
2862 | 35 | AC_SUBST(BOOST_LIBS) | ||
2863 | 36 | ]) | ||
2864 | 37 | |||
2865 | 38 | AC_DEFUN([PANDORA_HAVE_BOOST_IOSTREAMS],[ | ||
2866 | 39 | PANDORA_HAVE_BOOST($1) | ||
2867 | 40 | _PANDORA_SEARCH_BOOST_IOSTREAMS($1) | ||
2868 | 41 | ]) | ||
2869 | 42 | |||
2870 | 43 | AC_DEFUN([PANDORA_REQUIRE_BOOST_IOSTREAMS],[ | ||
2871 | 44 | PANDORA_REQUIRE_BOOST($1) | ||
2872 | 45 | _PANDORA_SEARCH_BOOST_IOSTREAMS($1) | ||
2873 | 46 | AS_IF([test "x${ac_cv_libboost_iostreams}" = "xno" -a "x${ac_cv_libboost_iostreams_mt}" = "xno"], | ||
2874 | 47 | PANDORA_MSG_ERROR([Boost.Iostreams is required for ${PACKAGE}])) | ||
2875 | 48 | ]) | ||
2876 | 49 | |||
2877 | 0 | 50 | ||
2878 | === added file 'm4/pandora_have_libboost_options.m4' | |||
2879 | --- m4/pandora_have_libboost_options.m4 1970-01-01 00:00:00 +0000 | |||
2880 | +++ m4/pandora_have_libboost_options.m4 2011-04-16 05:39:23 +0000 | |||
2881 | @@ -0,0 +1,47 @@ | |||
2882 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
2883 | 2 | dnl This file is free software; Monty Taylor | ||
2884 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2885 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2886 | 5 | |||
2887 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[ | ||
2888 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2889 | 8 | |||
2890 | 9 | dnl -------------------------------------------------------------------- | ||
2891 | 10 | dnl Check for boost::program_options | ||
2892 | 11 | dnl -------------------------------------------------------------------- | ||
2893 | 12 | |||
2894 | 13 | AC_LANG_PUSH(C++) | ||
2895 | 14 | AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[ | ||
2896 | 15 | #include <boost/program_options.hpp> | ||
2897 | 16 | ],[ | ||
2898 | 17 | boost::program_options::options_description d; | ||
2899 | 18 | d.add_options()("a","some option"); | ||
2900 | 19 | ]) | ||
2901 | 20 | AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[ | ||
2902 | 21 | AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[ | ||
2903 | 22 | #include <boost/program_options.hpp> | ||
2904 | 23 | ],[ | ||
2905 | 24 | boost::program_options::options_description d; | ||
2906 | 25 | d.add_options()("a","some option"); | ||
2907 | 26 | ]) | ||
2908 | 27 | ]) | ||
2909 | 28 | AC_LANG_POP() | ||
2910 | 29 | |||
2911 | 30 | AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS, | ||
2912 | 31 | [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"]) | ||
2913 | 32 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}" | ||
2914 | 33 | AC_SUBST(BOOST_LIBS) | ||
2915 | 34 | ]) | ||
2916 | 35 | |||
2917 | 36 | AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[ | ||
2918 | 37 | PANDORA_HAVE_BOOST($1) | ||
2919 | 38 | _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1) | ||
2920 | 39 | ]) | ||
2921 | 40 | |||
2922 | 41 | AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[ | ||
2923 | 42 | PANDORA_REQUIRE_BOOST($1) | ||
2924 | 43 | _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1) | ||
2925 | 44 | AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"], | ||
2926 | 45 | PANDORA_MSG_ERROR([boost::program_options is required for ${PACKAGE}])) | ||
2927 | 46 | ]) | ||
2928 | 47 | |||
2929 | 0 | 48 | ||
2930 | === added file 'm4/pandora_have_libboost_regex.m4' | |||
2931 | --- m4/pandora_have_libboost_regex.m4 1970-01-01 00:00:00 +0000 | |||
2932 | +++ m4/pandora_have_libboost_regex.m4 2011-04-16 05:39:23 +0000 | |||
2933 | @@ -0,0 +1,54 @@ | |||
2934 | 1 | dnl Copyright (C) 2010 Andrew Hutchings | ||
2935 | 2 | dnl This file is free software; Andrew Hutchings | ||
2936 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2937 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2938 | 5 | |||
2939 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_REGEX],[ | ||
2940 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
2941 | 8 | AC_REQUIRE([ACX_PTHREAD]) | ||
2942 | 9 | |||
2943 | 10 | dnl -------------------------------------------------------------------- | ||
2944 | 11 | dnl Check for boost::regex | ||
2945 | 12 | dnl -------------------------------------------------------------------- | ||
2946 | 13 | |||
2947 | 14 | save_CFLAGS="${CFLAGS}" | ||
2948 | 15 | save_CXXFLAGS="${CXXFLAGS}" | ||
2949 | 16 | CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" | ||
2950 | 17 | CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}" | ||
2951 | 18 | |||
2952 | 19 | AC_LANG_PUSH(C++) | ||
2953 | 20 | AC_LIB_HAVE_LINKFLAGS(boost_regex-mt,,[ | ||
2954 | 21 | #include <boost/regex.hpp> | ||
2955 | 22 | ],[ | ||
2956 | 23 | boost::regex test_regex("drizzle"); | ||
2957 | 24 | ]) | ||
2958 | 25 | AS_IF([test "x${ac_cv_libboost_regex_mt}" = "xno"],[ | ||
2959 | 26 | AC_LIB_HAVE_LINKFLAGS(boost_regex,,[ | ||
2960 | 27 | #include <boost/regex.hpp> | ||
2961 | 28 | ],[ | ||
2962 | 29 | boost::regex test_regex("drizzle"); | ||
2963 | 30 | ]) | ||
2964 | 31 | ]) | ||
2965 | 32 | AC_LANG_POP() | ||
2966 | 33 | CFLAGS="${save_CFLAGS}" | ||
2967 | 34 | CXXFLAGS="${save_CXXFLAGS}" | ||
2968 | 35 | |||
2969 | 36 | |||
2970 | 37 | AM_CONDITIONAL(HAVE_BOOST_REGEX, | ||
2971 | 38 | [test "x${ac_cv_libboost_regex}" = "xyes" -o "x${ac_cv_libboost_regex_mt}" = "xyes"]) | ||
2972 | 39 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_REGEX_MT} ${LTLIBBOOST_REGEX}" | ||
2973 | 40 | AC_SUBST(BOOST_LIBS) | ||
2974 | 41 | ]) | ||
2975 | 42 | |||
2976 | 43 | AC_DEFUN([PANDORA_HAVE_BOOST_REGEX],[ | ||
2977 | 44 | PANDORA_HAVE_BOOST($1) | ||
2978 | 45 | _PANDORA_SEARCH_BOOST_REGEX($1) | ||
2979 | 46 | ]) | ||
2980 | 47 | |||
2981 | 48 | AC_DEFUN([PANDORA_REQUIRE_BOOST_REGEX],[ | ||
2982 | 49 | PANDORA_REQUIRE_BOOST($1) | ||
2983 | 50 | _PANDORA_SEARCH_BOOST_REGEX($1) | ||
2984 | 51 | AS_IF([test "x${ac_cv_libboost_regex}" = "xno" -a "x${ac_cv_libboost_regex_mt}" = "xno"], | ||
2985 | 52 | PANDORA_MSG_ERROR([boost::regex is required for ${PACKAGE}])) | ||
2986 | 53 | ]) | ||
2987 | 54 | |||
2988 | 0 | 55 | ||
2989 | === added file 'm4/pandora_have_libboost_test.m4' | |||
2990 | --- m4/pandora_have_libboost_test.m4 1970-01-01 00:00:00 +0000 | |||
2991 | +++ m4/pandora_have_libboost_test.m4 2011-04-16 05:39:23 +0000 | |||
2992 | @@ -0,0 +1,45 @@ | |||
2993 | 1 | dnl Copyright (C) 2011 Andrew Hutchings | ||
2994 | 2 | dnl This file is free software; Andrew Hutchings | ||
2995 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
2996 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
2997 | 5 | |||
2998 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_TEST],[ | ||
2999 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3000 | 8 | |||
3001 | 9 | dnl -------------------------------------------------------------------- | ||
3002 | 10 | dnl Check for boost::test | ||
3003 | 11 | dnl -------------------------------------------------------------------- | ||
3004 | 12 | |||
3005 | 13 | AC_LANG_PUSH(C++) | ||
3006 | 14 | AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework-mt,,[ | ||
3007 | 15 | #include <boost/test/unit_test.hpp> | ||
3008 | 16 | ],[ | ||
3009 | 17 | boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages); | ||
3010 | 18 | ]) | ||
3011 | 19 | AS_IF([test "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],[ | ||
3012 | 20 | AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework,,[ | ||
3013 | 21 | #include <boost/test/unit_test.hpp> | ||
3014 | 22 | ],[ | ||
3015 | 23 | boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages); | ||
3016 | 24 | ]) | ||
3017 | 25 | ]) | ||
3018 | 26 | AC_LANG_POP() | ||
3019 | 27 | |||
3020 | 28 | AM_CONDITIONAL(HAVE_BOOST_TEST, | ||
3021 | 29 | [test "x${ac_cv_libboost_unit_test_framework}" = "xyes" -o "x${ac_cv_libboost_unit_test_framework_mt}" = "xyes"]) | ||
3022 | 30 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_TEST_MT} ${LTLIBBOOST_TEST}" | ||
3023 | 31 | AC_SUBST(BOOST_LIBS) | ||
3024 | 32 | ]) | ||
3025 | 33 | |||
3026 | 34 | AC_DEFUN([PANDORA_HAVE_BOOST_TEST],[ | ||
3027 | 35 | PANDORA_HAVE_BOOST($1) | ||
3028 | 36 | _PANDORA_SEARCH_BOOST_TEST($1) | ||
3029 | 37 | ]) | ||
3030 | 38 | |||
3031 | 39 | AC_DEFUN([PANDORA_REQUIRE_BOOST_TEST],[ | ||
3032 | 40 | PANDORA_REQUIRE_BOOST($1) | ||
3033 | 41 | _PANDORA_SEARCH_BOOST_TEST($1) | ||
3034 | 42 | AS_IF([test "x${ac_cv_libboost_unit_test_framework}" = "xno" -a "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"], | ||
3035 | 43 | PANDORA_MSG_ERROR([boost::test is required for ${PACKAGE}])) | ||
3036 | 44 | ]) | ||
3037 | 45 | |||
3038 | 0 | 46 | ||
3039 | === added file 'm4/pandora_have_libboost_thread.m4' | |||
3040 | --- m4/pandora_have_libboost_thread.m4 1970-01-01 00:00:00 +0000 | |||
3041 | +++ m4/pandora_have_libboost_thread.m4 2011-04-16 05:39:23 +0000 | |||
3042 | @@ -0,0 +1,54 @@ | |||
3043 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
3044 | 2 | dnl This file is free software; Monty Taylor | ||
3045 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3046 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3047 | 5 | |||
3048 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_THREAD],[ | ||
3049 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3050 | 8 | AC_REQUIRE([ACX_PTHREAD]) | ||
3051 | 9 | |||
3052 | 10 | dnl -------------------------------------------------------------------- | ||
3053 | 11 | dnl Check for boost::thread | ||
3054 | 12 | dnl -------------------------------------------------------------------- | ||
3055 | 13 | |||
3056 | 14 | save_CFLAGS="${CFLAGS}" | ||
3057 | 15 | save_CXXFLAGS="${CXXFLAGS}" | ||
3058 | 16 | CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" | ||
3059 | 17 | CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}" | ||
3060 | 18 | |||
3061 | 19 | AC_LANG_PUSH(C++) | ||
3062 | 20 | AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[ | ||
3063 | 21 | #include <boost/thread.hpp> | ||
3064 | 22 | ],[ | ||
3065 | 23 | boost::thread id; | ||
3066 | 24 | ]) | ||
3067 | 25 | AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[ | ||
3068 | 26 | AC_LIB_HAVE_LINKFLAGS(boost_thread,,[ | ||
3069 | 27 | #include <boost/thread.hpp> | ||
3070 | 28 | ],[ | ||
3071 | 29 | boost::thread id; | ||
3072 | 30 | ]) | ||
3073 | 31 | ]) | ||
3074 | 32 | AC_LANG_POP() | ||
3075 | 33 | CFLAGS="${save_CFLAGS}" | ||
3076 | 34 | CXXFLAGS="${save_CXXFLAGS}" | ||
3077 | 35 | |||
3078 | 36 | |||
3079 | 37 | AM_CONDITIONAL(HAVE_BOOST_THREAD, | ||
3080 | 38 | [test "x${ac_cv_libboost_thread}" = "xyes" -o "x${ac_cv_libboost_thread_mt}" = "xyes"]) | ||
3081 | 39 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_THREAD_MT} ${LTLIBBOOST_THREAD}" | ||
3082 | 40 | AC_SUBST(BOOST_LIBS) | ||
3083 | 41 | ]) | ||
3084 | 42 | |||
3085 | 43 | AC_DEFUN([PANDORA_HAVE_BOOST_THREAD],[ | ||
3086 | 44 | PANDORA_HAVE_BOOST($1) | ||
3087 | 45 | _PANDORA_SEARCH_BOOST_THREAD($1) | ||
3088 | 46 | ]) | ||
3089 | 47 | |||
3090 | 48 | AC_DEFUN([PANDORA_REQUIRE_BOOST_THREAD],[ | ||
3091 | 49 | PANDORA_REQUIRE_BOOST($1) | ||
3092 | 50 | _PANDORA_SEARCH_BOOST_THREAD($1) | ||
3093 | 51 | AS_IF([test "x${ac_cv_libboost_thread}" = "xno" -a "x${ac_cv_libboost_thread_mt}" = "xno"], | ||
3094 | 52 | PANDORA_MSG_ERROR([boost::thread is required for ${PACKAGE}])) | ||
3095 | 53 | ]) | ||
3096 | 54 | |||
3097 | 0 | 55 | ||
3098 | === modified file 'm4/pandora_have_libcassandra.m4' | |||
3099 | --- m4/pandora_have_libcassandra.m4 2010-04-06 00:33:06 +0000 | |||
3100 | +++ m4/pandora_have_libcassandra.m4 2011-04-16 05:39:23 +0000 | |||
3101 | @@ -39,6 +39,6 @@ | |||
3102 | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[ | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[ |
3103 | 40 | AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA]) | 40 | AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA]) |
3104 | 41 | AS_IF([test "x$ac_cv_libcassandra" = "xno"],[ | 41 | AS_IF([test "x$ac_cv_libcassandra" = "xno"],[ |
3106 | 42 | AC_MSG_ERROR([libcassandra is required for ${PACKAGE}]) | 42 | PANDORA_MSG_ERROR([libcassandra is required for ${PACKAGE}]) |
3107 | 43 | ]) | 43 | ]) |
3108 | 44 | ]) | 44 | ]) |
3109 | 45 | 45 | ||
3110 | === added file 'm4/pandora_have_libcurl.m4' | |||
3111 | --- m4/pandora_have_libcurl.m4 1970-01-01 00:00:00 +0000 | |||
3112 | +++ m4/pandora_have_libcurl.m4 2011-04-16 05:39:23 +0000 | |||
3113 | @@ -0,0 +1,62 @@ | |||
3114 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
3115 | 2 | dnl This file is free software; Monty Taylor | ||
3116 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3117 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3118 | 5 | |||
3119 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBCURL],[ | ||
3120 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3121 | 8 | |||
3122 | 9 | dnl -------------------------------------------------------------------- | ||
3123 | 10 | dnl Check for libcurl | ||
3124 | 11 | dnl -------------------------------------------------------------------- | ||
3125 | 12 | |||
3126 | 13 | AC_ARG_ENABLE([libcurl], | ||
3127 | 14 | [AS_HELP_STRING([--disable-libcurl], | ||
3128 | 15 | [Build with libcurl support @<:@default=on@:>@])], | ||
3129 | 16 | [ac_enable_libcurl="$enableval"], | ||
3130 | 17 | [ac_enable_libcurl="yes"]) | ||
3131 | 18 | |||
3132 | 19 | AS_IF([test "x$ac_enable_libcurl" = "xyes"],[ | ||
3133 | 20 | AC_LIB_HAVE_LINKFLAGS(curl,, | ||
3134 | 21 | [#include <curl/curl.h>], | ||
3135 | 22 | [ | ||
3136 | 23 | CURL *handle; | ||
3137 | 24 | handle=curl_easy_init(); | ||
3138 | 25 | ]) | ||
3139 | 26 | ],[ | ||
3140 | 27 | ac_cv_libcurl="no" | ||
3141 | 28 | ]) | ||
3142 | 29 | |||
3143 | 30 | AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME], | ||
3144 | 31 | [pandora_cv_curl_have_username],[ | ||
3145 | 32 | AC_COMPILE_IFELSE([ | ||
3146 | 33 | AC_LANG_PROGRAM( | ||
3147 | 34 | [[ | ||
3148 | 35 | CURL *handle; | ||
3149 | 36 | handle=curl_easy_init(); | ||
3150 | 37 | rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo"); | ||
3151 | 38 | ]])], | ||
3152 | 39 | [pandora_cv_curl_have_username=yes], | ||
3153 | 40 | [pandora_cv_curl_have_username=no]) | ||
3154 | 41 | ]) | ||
3155 | 42 | |||
3156 | 43 | AM_CONDITIONAL(HAVE_LIBCURL,[test "x${ac_cv_libcurl}" = "xyes"]) | ||
3157 | 44 | AS_IF([test "x$pandora_cv_curl_have_username" = "xyes"], | ||
3158 | 45 | AC_DEFINE([HAVE_CURLOPT_USERNAME],[1], | ||
3159 | 46 | [Does libcurl provide the CURLOPT_USERNAME constant])) | ||
3160 | 47 | |||
3161 | 48 | ]) | ||
3162 | 49 | |||
3163 | 50 | AC_DEFUN([PANDORA_HAVE_LIBCURL],[ | ||
3164 | 51 | AC_REQUIRE([_PANDORA_SEARCH_LIBCURL]) | ||
3165 | 52 | AS_IF([test "x${ac_cv_libcurl}" = "xno"],[ | ||
3166 | 53 | AC_MSG_WARN([libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel.]) | ||
3167 | 54 | ]) | ||
3168 | 55 | ]) | ||
3169 | 56 | |||
3170 | 57 | AC_DEFUN([PANDORA_REQUIRE_LIBCURL],[ | ||
3171 | 58 | PANDORA_HAVE_LIBCURL($1) | ||
3172 | 59 | AS_IF([test "x${ac_cv_libcurl}" = "xno"],[ | ||
3173 | 60 | PANDORA_MSG_ERROR([libcurl is required for ${PACKAGE}]) | ||
3174 | 61 | ]) | ||
3175 | 62 | ]) | ||
3176 | 0 | 63 | ||
3177 | === modified file 'm4/pandora_have_libdl.m4' | |||
3178 | --- m4/pandora_have_libdl.m4 2010-01-13 10:48:24 +0000 | |||
3179 | +++ m4/pandora_have_libdl.m4 2011-04-16 05:39:23 +0000 | |||
3180 | @@ -1,5 +1,5 @@ | |||
3183 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3184 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3185 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3186 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3187 | 5 | 5 | ||
3188 | @@ -42,7 +42,7 @@ | |||
3189 | 42 | _PANDORA_SEARCH_LIBDL | 42 | _PANDORA_SEARCH_LIBDL |
3190 | 43 | 43 | ||
3191 | 44 | AS_IF([test "$ac_cv_func_dlopen" != "yes"],[ | 44 | AS_IF([test "$ac_cv_func_dlopen" != "yes"],[ |
3193 | 45 | 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.]) | 45 | PANDORA_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.]) |
3194 | 46 | ]) | 46 | ]) |
3195 | 47 | ]) | 47 | ]) |
3196 | 48 | 48 | ||
3197 | 49 | 49 | ||
3198 | === modified file 'm4/pandora_have_libdrizzle.m4' | |||
3199 | --- m4/pandora_have_libdrizzle.m4 2010-04-06 00:33:06 +0000 | |||
3200 | +++ m4/pandora_have_libdrizzle.m4 2011-04-16 05:39:23 +0000 | |||
3201 | @@ -1,5 +1,5 @@ | |||
3204 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3205 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3206 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3207 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3208 | 5 | 5 | ||
3209 | @@ -27,6 +27,15 @@ | |||
3210 | 27 | ac_cv_libdrizzle="no" | 27 | ac_cv_libdrizzle="no" |
3211 | 28 | ]) | 28 | ]) |
3212 | 29 | 29 | ||
3213 | 30 | AS_IF([test "${ac_cv_libdrizzle}" = "no" -a "${ac_enable_libdrizzle}" = "yes"],[ | ||
3214 | 31 | |||
3215 | 32 | PKG_CHECK_MODULES([LIBDRIZZLE], [libdrizzle-1.0], [ | ||
3216 | 33 | ac_cv_libdrizzle=yes | ||
3217 | 34 | LTLIBDRIZZLE=${LIBDRIZZLE_LIBS} | ||
3218 | 35 | LIBDRIZZLE=${LIBDRIZZLE_LIBS} | ||
3219 | 36 | ],[test x = y]) | ||
3220 | 37 | ]) | ||
3221 | 38 | |||
3222 | 30 | AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) | 39 | AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) |
3223 | 31 | ]) | 40 | ]) |
3224 | 32 | 41 | ||
3225 | @@ -37,7 +46,7 @@ | |||
3226 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ | 46 | AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ |
3227 | 38 | AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) | 47 | AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) |
3228 | 39 | AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[ | 48 | AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[ |
3230 | 40 | AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]) | 49 | PANDORA_MSG_ERROR([libdrizzle is required for ${PACKAGE}]) |
3231 | 41 | ],[ | 50 | ],[ |
3232 | 42 | dnl We need at least 0.8 on Solaris non-sparc | 51 | dnl We need at least 0.8 on Solaris non-sparc |
3233 | 43 | AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[ | 52 | AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[ |
3234 | @@ -56,6 +65,6 @@ | |||
3235 | 56 | [pandora_cv_libdrizzle_recent=yes], | 65 | [pandora_cv_libdrizzle_recent=yes], |
3236 | 57 | [pandora_cv_libdrizzle_recent=no])]) | 66 | [pandora_cv_libdrizzle_recent=no])]) |
3237 | 58 | AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[ | 67 | AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[ |
3239 | 59 | AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8]) | 68 | PANDORA_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8]) |
3240 | 60 | ]) | 69 | ]) |
3241 | 61 | ]) | 70 | ]) |
3242 | 62 | 71 | ||
3243 | === modified file 'm4/pandora_have_libevent.m4' | |||
3244 | --- m4/pandora_have_libevent.m4 2009-12-18 18:02:39 +0000 | |||
3245 | +++ m4/pandora_have_libevent.m4 2011-04-16 05:39:23 +0000 | |||
3246 | @@ -1,5 +1,5 @@ | |||
3249 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3250 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3251 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3252 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3253 | 5 | 5 | ||
3254 | @@ -57,7 +57,7 @@ | |||
3255 | 57 | _PANDORA_SEARCH_LIBEVENT | 57 | _PANDORA_SEARCH_LIBEVENT |
3256 | 58 | 58 | ||
3257 | 59 | AS_IF([test x$ac_cv_libevent = xno],[ | 59 | AS_IF([test x$ac_cv_libevent = xno],[ |
3259 | 60 | 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.]) | 60 | PANDORA_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.]) |
3260 | 61 | ]) | 61 | ]) |
3261 | 62 | ]) | 62 | ]) |
3262 | 63 | 63 | ||
3263 | 64 | 64 | ||
3264 | === modified file 'm4/pandora_have_libgearman.m4' | |||
3265 | --- m4/pandora_have_libgearman.m4 2009-12-18 19:25:00 +0000 | |||
3266 | +++ m4/pandora_have_libgearman.m4 2011-04-16 05:39:23 +0000 | |||
3267 | @@ -1,5 +1,5 @@ | |||
3270 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3271 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3272 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3273 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3274 | 5 | 5 | ||
3275 | @@ -37,5 +37,5 @@ | |||
3276 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ |
3277 | 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) | 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) |
3278 | 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], | 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], |
3280 | 40 | AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}])) | 40 | PANDORA_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}])) |
3281 | 41 | ]) | 41 | ]) |
3282 | 42 | 42 | ||
3283 | === added file 'm4/pandora_have_libgtest.m4' | |||
3284 | --- m4/pandora_have_libgtest.m4 1970-01-01 00:00:00 +0000 | |||
3285 | +++ m4/pandora_have_libgtest.m4 2011-04-16 05:39:23 +0000 | |||
3286 | @@ -0,0 +1,47 @@ | |||
3287 | 1 | dnl Copyright (C) 2010 Monty Taylor | ||
3288 | 2 | dnl This file is free software; Monty Taylor | ||
3289 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3290 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3291 | 5 | |||
3292 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[ | ||
3293 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3294 | 8 | |||
3295 | 9 | dnl -------------------------------------------------------------------- | ||
3296 | 10 | dnl Check for libgtest | ||
3297 | 11 | dnl -------------------------------------------------------------------- | ||
3298 | 12 | |||
3299 | 13 | AC_ARG_ENABLE([libgtest], | ||
3300 | 14 | [AS_HELP_STRING([--disable-libgtest], | ||
3301 | 15 | [Build with libgtest support @<:@default=on@:>@])], | ||
3302 | 16 | [ac_enable_libgtest="$enableval"], | ||
3303 | 17 | [ac_enable_libgtest="yes"]) | ||
3304 | 18 | |||
3305 | 19 | AS_IF([test "x$ac_enable_libgtest" = "xyes"],[ | ||
3306 | 20 | AC_LANG_PUSH(C++) | ||
3307 | 21 | save_CXXFLAGS="${CXXFLAGS}" | ||
3308 | 22 | CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" | ||
3309 | 23 | AC_LIB_HAVE_LINKFLAGS(gtest,,[ | ||
3310 | 24 | #include <gtest/gtest.h> | ||
3311 | 25 | TEST(pandora_test_libgtest, PandoraTest) | ||
3312 | 26 | { | ||
3313 | 27 | ASSERT_EQ(1, 1); | ||
3314 | 28 | } | ||
3315 | 29 | ],[]) | ||
3316 | 30 | CXXFLAGS="${save_CXXFLAGS}" | ||
3317 | 31 | AC_LANG_POP() | ||
3318 | 32 | ],[ | ||
3319 | 33 | ac_cv_libgtest="no" | ||
3320 | 34 | ]) | ||
3321 | 35 | |||
3322 | 36 | AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"]) | ||
3323 | 37 | ]) | ||
3324 | 38 | |||
3325 | 39 | AC_DEFUN([PANDORA_HAVE_LIBGTEST],[ | ||
3326 | 40 | AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST]) | ||
3327 | 41 | ]) | ||
3328 | 42 | |||
3329 | 43 | AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[ | ||
3330 | 44 | AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST]) | ||
3331 | 45 | AS_IF([test "x${ac_cv_libgtest}" = "xno"], | ||
3332 | 46 | PANDORA_MSG_ERROR([libgtest is required for ${PACKAGE}])) | ||
3333 | 47 | ]) | ||
3334 | 0 | 48 | ||
3335 | === added file 'm4/pandora_have_libhaildb.m4' | |||
3336 | --- m4/pandora_have_libhaildb.m4 1970-01-01 00:00:00 +0000 | |||
3337 | +++ m4/pandora_have_libhaildb.m4 2011-04-16 05:39:23 +0000 | |||
3338 | @@ -0,0 +1,43 @@ | |||
3339 | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
3340 | 2 | dnl This file is free software; Sun Microsystems, Inc. | ||
3341 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3342 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3343 | 5 | |||
3344 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[ | ||
3345 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3346 | 8 | |||
3347 | 9 | dnl -------------------------------------------------------------------- | ||
3348 | 10 | dnl Check for libhaildb | ||
3349 | 11 | dnl -------------------------------------------------------------------- | ||
3350 | 12 | |||
3351 | 13 | AC_ARG_ENABLE([libhaildb], | ||
3352 | 14 | [AS_HELP_STRING([--disable-libhaildb], | ||
3353 | 15 | [Build with libhaildb support @<:@default=on@:>@])], | ||
3354 | 16 | [ac_enable_libhaildb="$enableval"], | ||
3355 | 17 | [ac_enable_libhaildb="yes"]) | ||
3356 | 18 | |||
3357 | 19 | |||
3358 | 20 | AS_IF([test "x$ac_enable_libhaildb" = "xyes"],[ | ||
3359 | 21 | AC_LIB_HAVE_LINKFLAGS(haildb,,[ | ||
3360 | 22 | #include <haildb.h> | ||
3361 | 23 | ],[ | ||
3362 | 24 | ib_update_table_statistics(NULL); | ||
3363 | 25 | ]) | ||
3364 | 26 | AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[ | ||
3365 | 27 | AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h]) | ||
3366 | 28 | ]) | ||
3367 | 29 | ],[ | ||
3368 | 30 | ac_cv_libhaildb="no" | ||
3369 | 31 | ]) | ||
3370 | 32 | AM_CONDITIONAL(HAVE_LIBHAILDB, [test "x${ac_cv_libhaildb}" = "xyes"]) | ||
3371 | 33 | ]) | ||
3372 | 34 | |||
3373 | 35 | AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[ | ||
3374 | 36 | AC_REQUIRE([_PANDORA_SEARCH_LIBHAILDB]) | ||
3375 | 37 | ]) | ||
3376 | 38 | |||
3377 | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[ | ||
3378 | 40 | AC_REQUIRE([PANDORA_HAVE_LIBHAILDB]) | ||
3379 | 41 | AS_IF([test "x${ac_cv_libhaildb}" = "xno"], | ||
3380 | 42 | PANDORA_MSG_ERROR([libhaildb 2.3.2 or later is required for ${PACKAGE}])) | ||
3381 | 43 | ]) | ||
3382 | 0 | 44 | ||
3383 | === added file 'm4/pandora_have_libhashkit.m4' | |||
3384 | --- m4/pandora_have_libhashkit.m4 1970-01-01 00:00:00 +0000 | |||
3385 | +++ m4/pandora_have_libhashkit.m4 2011-04-16 05:39:23 +0000 | |||
3386 | @@ -0,0 +1,42 @@ | |||
3387 | 1 | dnl Copyright (C) 2010 NorthScale | ||
3388 | 2 | dnl This file is free software; NorthScale | ||
3389 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3390 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3391 | 5 | |||
3392 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[ | ||
3393 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3394 | 8 | |||
3395 | 9 | dnl -------------------------------------------------------------------- | ||
3396 | 10 | dnl Check for libhashkit | ||
3397 | 11 | dnl -------------------------------------------------------------------- | ||
3398 | 12 | |||
3399 | 13 | AC_ARG_ENABLE([libhashkit], | ||
3400 | 14 | [AS_HELP_STRING([--disable-libhashkit], | ||
3401 | 15 | [Build with libhashkit support @<:@default=on@:>@])], | ||
3402 | 16 | [ac_enable_libhashkit="$enableval"], | ||
3403 | 17 | [ac_enable_libhashkit="yes"]) | ||
3404 | 18 | |||
3405 | 19 | AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[ | ||
3406 | 20 | AC_LIB_HAVE_LINKFLAGS(hashkit,,[ | ||
3407 | 21 | #include <libhashkit/hashkit.h> | ||
3408 | 22 | ],[ | ||
3409 | 23 | hashkit_st foo; | ||
3410 | 24 | hashkit_st *kit = hashkit_create(&foo); | ||
3411 | 25 | hashkit_free(kit); | ||
3412 | 26 | ]) | ||
3413 | 27 | ],[ | ||
3414 | 28 | ac_cv_libhashkit="no" | ||
3415 | 29 | ]) | ||
3416 | 30 | |||
3417 | 31 | AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"]) | ||
3418 | 32 | ]) | ||
3419 | 33 | |||
3420 | 34 | AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[ | ||
3421 | 35 | AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT]) | ||
3422 | 36 | ]) | ||
3423 | 37 | |||
3424 | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[ | ||
3425 | 39 | AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT]) | ||
3426 | 40 | AS_IF([test x$ac_cv_libhashkit = xno], | ||
3427 | 41 | PANDORA_MSG_ERROR([libhashkit is required for ${PACKAGE}])) | ||
3428 | 42 | ]) | ||
3429 | 0 | 43 | ||
3430 | === added file 'm4/pandora_have_libldap.m4' | |||
3431 | --- m4/pandora_have_libldap.m4 1970-01-01 00:00:00 +0000 | |||
3432 | +++ m4/pandora_have_libldap.m4 2011-04-16 05:39:23 +0000 | |||
3433 | @@ -0,0 +1,73 @@ | |||
3434 | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
3435 | 2 | dnl This file is free software; Sun Microsystems, Inc. | ||
3436 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3437 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3438 | 5 | |||
3439 | 6 | #-------------------------------------------------------------------- | ||
3440 | 7 | # Check for libldap | ||
3441 | 8 | #-------------------------------------------------------------------- | ||
3442 | 9 | |||
3443 | 10 | |||
3444 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[ | ||
3445 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3446 | 13 | |||
3447 | 14 | AC_LIB_HAVE_LINKFLAGS(ldap,, | ||
3448 | 15 | [#include <ldap.h>], | ||
3449 | 16 | [ | ||
3450 | 17 | LDAP *ldap; | ||
3451 | 18 | ldap_initialize(&ldap, "ldap://localhost/"); | ||
3452 | 19 | ]) | ||
3453 | 20 | AS_IF([test "x$ac_cv_libldap" = "xno"], | ||
3454 | 21 | [ | ||
3455 | 22 | unset ac_cv_libldap | ||
3456 | 23 | unset HAVE_LIBLDAP | ||
3457 | 24 | unset LIBLDAP | ||
3458 | 25 | unset LIBLDAP_PREFIX | ||
3459 | 26 | unset LTLIBLDAP | ||
3460 | 27 | AC_LIB_HAVE_LINKFLAGS(ldap,, | ||
3461 | 28 | [#include <ldap/ldap.h>], | ||
3462 | 29 | [ | ||
3463 | 30 | LDAP *ldap; | ||
3464 | 31 | ldap_initialize(&ldap, "ldap://localhost/"); | ||
3465 | 32 | ]) | ||
3466 | 33 | AS_IF([test "x$ac_cv_libldap" = "xyes"], [ | ||
3467 | 34 | ac_cv_ldap_location="<ldap/ldap.h>" | ||
3468 | 35 | ]) | ||
3469 | 36 | ],[ | ||
3470 | 37 | ac_cv_ldap_location="<ldap.h>" | ||
3471 | 38 | ]) | ||
3472 | 39 | |||
3473 | 40 | AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"]) | ||
3474 | 41 | ]) | ||
3475 | 42 | |||
3476 | 43 | AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[ | ||
3477 | 44 | |||
3478 | 45 | AC_ARG_ENABLE([libldap], | ||
3479 | 46 | [AS_HELP_STRING([--disable-libldap], | ||
3480 | 47 | [Build with libldap support @<:@default=on@:>@])], | ||
3481 | 48 | [ac_enable_libldap="$enableval"], | ||
3482 | 49 | [ac_enable_libldap="yes"]) | ||
3483 | 50 | |||
3484 | 51 | _PANDORA_SEARCH_LIBLDAP | ||
3485 | 52 | ]) | ||
3486 | 53 | |||
3487 | 54 | |||
3488 | 55 | AC_DEFUN([PANDORA_HAVE_LIBLDAP],[ | ||
3489 | 56 | AC_REQUIRE([_PANDORA_HAVE_LIBLDAP]) | ||
3490 | 57 | ]) | ||
3491 | 58 | |||
3492 | 59 | AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[ | ||
3493 | 60 | ac_enable_libldap="yes" | ||
3494 | 61 | _PANDORA_SEARCH_LIBLDAP | ||
3495 | 62 | |||
3496 | 63 | AS_IF([test x$ac_cv_libldap = xno],[ | ||
3497 | 64 | PANDORA_MSG_ERROR([libldap is required for ${PACKAGE}. On Debian this can be found in libldap2-dev. On RedHat this can be found in openldap-devel.]) | ||
3498 | 65 | ],[ | ||
3499 | 66 | AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}], | ||
3500 | 67 | [Location of ldap header]) | ||
3501 | 68 | ]) | ||
3502 | 69 | ]) | ||
3503 | 70 | |||
3504 | 71 | AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[ | ||
3505 | 72 | AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP]) | ||
3506 | 73 | ]) | ||
3507 | 0 | 74 | ||
3508 | === modified file 'm4/pandora_have_libmemcached.m4' | |||
3509 | --- m4/pandora_have_libmemcached.m4 2011-02-14 23:35:15 +0000 | |||
3510 | +++ m4/pandora_have_libmemcached.m4 2011-04-16 05:39:23 +0000 | |||
3511 | @@ -1,5 +1,5 @@ | |||
3514 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3515 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3516 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3517 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3518 | 5 | 5 | ||
3519 | @@ -11,15 +11,27 @@ | |||
3520 | 11 | dnl -------------------------------------------------------------------- | 11 | dnl -------------------------------------------------------------------- |
3521 | 12 | 12 | ||
3522 | 13 | AC_ARG_ENABLE([libmemcached], | 13 | AC_ARG_ENABLE([libmemcached], |
3525 | 14 | [AS_HELP_STRING([--enable-libmemcached], | 14 | [AS_HELP_STRING([--disable-libmemcached], |
3526 | 15 | [Build with libmemcached support @<:@default=off@:>@])], | 15 | [Build with libmemcached support @<:@default=on@:>@])], |
3527 | 16 | [ac_enable_libmemcached="$enableval"], | 16 | [ac_enable_libmemcached="$enableval"], |
3529 | 17 | [ac_enable_libmemcached="no"]) | 17 | [ac_enable_libmemcached="yes"]) |
3530 | 18 | 18 | ||
3531 | 19 | AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[ | 19 | AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[ |
3532 | 20 | |||
3533 | 21 | AS_IF([test "x$pandora_check_libmemcached_version" != "x"],[ | ||
3534 | 22 | pandora_need_libmemcached_version=`echo "$pandora_check_libmemcached_version" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'` | ||
3535 | 23 | ],[ | ||
3536 | 24 | pandora_need_libmemcached_version=000000 | ||
3537 | 25 | ]) | ||
3538 | 26 | |||
3539 | 20 | AC_LIB_HAVE_LINKFLAGS(memcached,,[ | 27 | AC_LIB_HAVE_LINKFLAGS(memcached,,[ |
3540 | 21 | #include <libmemcached/memcached.h> | 28 | #include <libmemcached/memcached.h> |
3541 | 29 | #include <libmemcached/configure.h> | ||
3542 | 30 | #if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]${pandora_need_libmemcached_version}[ | ||
3543 | 31 | # error libmemcached too old! | ||
3544 | 32 | #endif | ||
3545 | 22 | ],[ | 33 | ],[ |
3546 | 34 | |||
3547 | 23 | memcached_st memc; | 35 | memcached_st memc; |
3548 | 24 | memcached_dump_func *df; | 36 | memcached_dump_func *df; |
3549 | 25 | memcached_lib_version(); | 37 | memcached_lib_version(); |
3550 | @@ -51,56 +63,20 @@ | |||
3551 | 51 | AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[ | 63 | AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[ |
3552 | 52 | AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef]) | 64 | AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef]) |
3553 | 53 | ]) | 65 | ]) |
3588 | 54 | ]) | 66 | |
3589 | 55 | 67 | AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes"]) | |
3556 | 56 | AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[ | ||
3557 | 57 | |||
3558 | 58 | AC_CACHE_CHECK([if libmemcached is recent enough], | ||
3559 | 59 | [pandora_cv_recent_libmemcached],[ | ||
3560 | 60 | AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[ | ||
3561 | 61 | pandora_cv_recent_libmemcached=no | ||
3562 | 62 | ],[ | ||
3563 | 63 | AS_IF([test "x$1" != "x"],[ | ||
3564 | 64 | pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'` | ||
3565 | 65 | AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[ | ||
3566 | 66 | pandora_cv_recent_libmemcached=yes | ||
3567 | 67 | ],[ | ||
3568 | 68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
3569 | 69 | #include <libmemcached/configure.h> | ||
3570 | 70 | |||
3571 | 71 | #if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[ | ||
3572 | 72 | # error libmemcached too old! | ||
3573 | 73 | #endif | ||
3574 | 74 | ]],[[]]) | ||
3575 | 75 | ],[ | ||
3576 | 76 | pandora_cv_recent_libmemcached=yes | ||
3577 | 77 | ],[ | ||
3578 | 78 | pandora_cv_recent_libmemcached=no | ||
3579 | 79 | ]) | ||
3580 | 80 | ]) | ||
3581 | 81 | ],[ | ||
3582 | 82 | pandora_cv_recent_libmemcached=yes | ||
3583 | 83 | ]) | ||
3584 | 84 | ]) | ||
3585 | 85 | ]) | ||
3586 | 86 | |||
3587 | 87 | AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"]) | ||
3590 | 88 | 68 | ||
3591 | 89 | ]) | 69 | ]) |
3592 | 90 | 70 | ||
3593 | 91 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ | 71 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ |
3596 | 92 | AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED]) | 72 | pandora_check_libmemcached_version=$1 |
3597 | 93 | _PANDORA_RECENT_LIBMEMCACHED($1) | 73 | _PANDORA_SEARCH_LIBMEMCACHED |
3598 | 94 | ]) | 74 | ]) |
3599 | 95 | 75 | ||
3600 | 96 | AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[ | 76 | AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[ |
3601 | 97 | PANDORA_HAVE_LIBMEMCACHED($1) | 77 | PANDORA_HAVE_LIBMEMCACHED($1) |
3602 | 98 | AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"], | ||
3603 | 99 | AC_MSG_ERROR([libmemcached is required for ${PACKAGE}])) | ||
3604 | 100 | ]) | 78 | ]) |
3605 | 101 | 79 | ||
3606 | 102 | AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[ | 80 | AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[ |
3607 | 103 | PANDORA_HAVE_LIBMEMCACHED($1) | 81 | PANDORA_HAVE_LIBMEMCACHED($1) |
3608 | 104 | AS_IF([test x$ac_cv_libmemcachedprotocol = xno], | ||
3609 | 105 | AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}])) | ||
3610 | 106 | ]) | 82 | ]) |
3611 | 107 | 83 | ||
3612 | === modified file 'm4/pandora_have_libmysqlclient.m4' | |||
3613 | --- m4/pandora_have_libmysqlclient.m4 2010-01-28 21:58:37 +0000 | |||
3614 | +++ m4/pandora_have_libmysqlclient.m4 2011-04-16 05:39:23 +0000 | |||
3615 | @@ -68,7 +68,7 @@ | |||
3616 | 68 | AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[ | 68 | AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[ |
3617 | 69 | AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT]) | 69 | AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT]) |
3618 | 70 | AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"], | 70 | AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"], |
3620 | 71 | AC_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}])) | 71 | PANDORA_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}])) |
3621 | 72 | ]) | 72 | ]) |
3622 | 73 | 73 | ||
3623 | 74 | AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[ | 74 | AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[ |
3624 | @@ -102,20 +102,20 @@ | |||
3625 | 102 | MYSQL_INCLUDES="$IBASE $ADDIFLAGS" | 102 | MYSQL_INCLUDES="$IBASE $ADDIFLAGS" |
3626 | 103 | 103 | ||
3627 | 104 | 104 | ||
3629 | 105 | dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[AC_MSG_ERROR([Can't link against libmysqlclient_r])]) | 105 | dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[PANDORA_MSG_ERROR([Can't link against libmysqlclient_r])]) |
3630 | 106 | dnl First test to see if we can run with only ndbclient | 106 | dnl First test to see if we can run with only ndbclient |
3631 | 107 | AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else | 107 | AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else |
3632 | 108 | LDFLAGS="$LDFLAGS -lmysys -ldbug" | 108 | LDFLAGS="$LDFLAGS -lmysys -ldbug" |
3633 | 109 | AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,) | 109 | AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,) |
3634 | 110 | AC_CHECK_LIB([ndbclient],[ndb_init],,[ | 110 | AC_CHECK_LIB([ndbclient],[ndb_init],,[ |
3636 | 111 | AC_MSG_ERROR([Can't link against libndbclient])]) | 111 | PANDORA_MSG_ERROR([Can't link against libndbclient])]) |
3637 | 112 | AC_CHECK_LIB([mystrings],[decimal_bin_size],,[ | 112 | AC_CHECK_LIB([mystrings],[decimal_bin_size],,[ |
3639 | 113 | AC_MSG_ERROR([Can't find decimal_bin_size])])]) | 113 | PANDORA_MSG_ERROR([Can't find decimal_bin_size])])]) |
3640 | 114 | AC_MSG_CHECKING(for NdbApi headers) | 114 | AC_MSG_CHECKING(for NdbApi headers) |
3641 | 115 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[]) | 115 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[]) |
3642 | 116 | AS_IF([test "$ndbapi_found" = "yes"], | 116 | AS_IF([test "$ndbapi_found" = "yes"], |
3643 | 117 | [AC_MSG_RESULT(found)], | 117 | [AC_MSG_RESULT(found)], |
3645 | 118 | [AC_MSG_ERROR([Couldn't find NdbApi.hpp!])]) | 118 | [PANDORA_MSG_ERROR([Couldn't find NdbApi.hpp!])]) |
3646 | 119 | AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop) | 119 | AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop) |
3647 | 120 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[]) | 120 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[]) |
3648 | 121 | AS_IF([test "$have_cge63" = "yes"], | 121 | AS_IF([test "$have_cge63" = "yes"], |
3649 | 122 | 122 | ||
3650 | === added file 'm4/pandora_have_libndbclient.m4' | |||
3651 | --- m4/pandora_have_libndbclient.m4 1970-01-01 00:00:00 +0000 | |||
3652 | +++ m4/pandora_have_libndbclient.m4 2011-04-16 05:39:23 +0000 | |||
3653 | @@ -0,0 +1,80 @@ | |||
3654 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
3655 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
3656 | 3 | dnl | ||
3657 | 4 | dnl Copyright (C) 2010 Monty Taylor | ||
3658 | 5 | dnl This file is free software; Sun Microsystems | ||
3659 | 6 | dnl gives unlimited permission to copy and/or distribute it, | ||
3660 | 7 | dnl with or without modifications, as long as this notice is preserved. | ||
3661 | 8 | dnl | ||
3662 | 9 | |||
3663 | 10 | AC_DEFUN([_PANDORA_SEARCH_LIBNDBCLIENT],[ | ||
3664 | 11 | |||
3665 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3666 | 13 | AC_REQUIRE([PANDORA_WITH_MYSQL]) | ||
3667 | 14 | |||
3668 | 15 | AC_ARG_ENABLE([libndbclient], | ||
3669 | 16 | [AS_HELP_STRING([--disable-libndbclient], | ||
3670 | 17 | [Build with libndbclient support @<:@default=on@:>@])], | ||
3671 | 18 | [ac_enable_libndbclient="$enableval"], | ||
3672 | 19 | [ac_enable_libndbclient="yes"]) | ||
3673 | 20 | |||
3674 | 21 | AC_ARG_WITH([libndbclient-prefix], | ||
3675 | 22 | [AS_HELP_STRING([--with-libndbclient-prefix], | ||
3676 | 23 | [search for libndbclient in DIR])], | ||
3677 | 24 | [ac_with_libndbclient=${withval}], | ||
3678 | 25 | [ac_with_libndbclient=${pandora_cv_mysql_base}]) | ||
3679 | 26 | |||
3680 | 27 | save_LIBS="${LIBS}" | ||
3681 | 28 | LIBS="" | ||
3682 | 29 | save_CPPFLAGS="${CPPFLAGS}" | ||
3683 | 30 | AS_IF([test "x${ac_with_libndbclient}" != "x"],[ | ||
3684 | 31 | LIBS="-L${ac_with_libndbclient}/lib/mysql -L${ac_with_libndbclient}/lib" | ||
3685 | 32 | AS_IF([test "$GCC" = "yes"],[ | ||
3686 | 33 | ndb_include_prefix="-isystem " | ||
3687 | 34 | ],[ | ||
3688 | 35 | ndb_include_prefix="-I" | ||
3689 | 36 | ]) | ||
3690 | 37 | CPPFLAGS="${CPPFLAGS} ${ndb_include_prefix}${ac_with_libndbclient}/include ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/ndbapi ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/mgmapi" | ||
3691 | 38 | ]) | ||
3692 | 39 | LIBS="${LIBS} -lndbclient -lmysqlclient_r" | ||
3693 | 40 | |||
3694 | 41 | AC_CACHE_CHECK([if NdbApi works],[ac_cv_libndbclient],[ | ||
3695 | 42 | AC_LANG_PUSH(C++) | ||
3696 | 43 | AC_LINK_IFELSE([ | ||
3697 | 44 | AC_LANG_PROGRAM([[ | ||
3698 | 45 | #include <NdbApi.hpp> | ||
3699 | 46 | ]],[[ | ||
3700 | 47 | Ndb *ndb; | ||
3701 | 48 | ndb_init(); | ||
3702 | 49 | ]]) | ||
3703 | 50 | ],[ | ||
3704 | 51 | ac_cv_libndbclient=yes | ||
3705 | 52 | ],[ | ||
3706 | 53 | ac_cv_libndbclient=no | ||
3707 | 54 | ]) | ||
3708 | 55 | ]) | ||
3709 | 56 | AC_LANG_POP() | ||
3710 | 57 | |||
3711 | 58 | LIBNDBCLIENT="${LIBS}" | ||
3712 | 59 | LTLIBNDBCLIENT="${LIBS}" | ||
3713 | 60 | AC_SUBST([LIBNDBCLIENT]) | ||
3714 | 61 | AC_SUBST([LTLIBNDBCLIENT]) | ||
3715 | 62 | |||
3716 | 63 | AS_IF([test "x${ac_cv_libndbclient}" = "xno"],[ | ||
3717 | 64 | CPPFLAGS="${save_CPPFLAGS}" | ||
3718 | 65 | ]) | ||
3719 | 66 | LIBS="${save_LIBS}" | ||
3720 | 67 | |||
3721 | 68 | AM_CONDITIONAL(HAVE_LIBNDBCLIENT, [test "x${ac_cv_libndbclient}" = "xyes"]) | ||
3722 | 69 | ]) | ||
3723 | 70 | |||
3724 | 71 | AC_DEFUN([PANDORA_HAVE_LIBNDBCLIENT],[ | ||
3725 | 72 | AC_REQUIRE([_PANDORA_SEARCH_LIBNDBCLIENT]) | ||
3726 | 73 | ]) | ||
3727 | 74 | |||
3728 | 75 | AC_DEFUN([PANDORA_REQUIRE_LIBNDBCLIENT],[ | ||
3729 | 76 | AC_REQUIRE([PANDORA_HAVE_LIBNDBCLIENT]) | ||
3730 | 77 | AS_IF([test "x${ac_cv_libndbclient}" = "xno"], | ||
3731 | 78 | PANDORA_MSG_ERROR([libndbclient is required for ${PACKAGE}])) | ||
3732 | 79 | ]) | ||
3733 | 80 | |||
3734 | 0 | 81 | ||
3735 | === added file 'm4/pandora_have_libpcre.m4' | |||
3736 | --- m4/pandora_have_libpcre.m4 1970-01-01 00:00:00 +0000 | |||
3737 | +++ m4/pandora_have_libpcre.m4 2011-04-16 05:39:23 +0000 | |||
3738 | @@ -0,0 +1,73 @@ | |||
3739 | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
3740 | 2 | dnl This file is free software; Sun Microsystems, Inc. | ||
3741 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3742 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3743 | 5 | |||
3744 | 6 | #-------------------------------------------------------------------- | ||
3745 | 7 | # Check for libpcre | ||
3746 | 8 | #-------------------------------------------------------------------- | ||
3747 | 9 | |||
3748 | 10 | |||
3749 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[ | ||
3750 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3751 | 13 | |||
3752 | 14 | AC_LIB_HAVE_LINKFLAGS(pcre,, | ||
3753 | 15 | [#include <pcre.h>], | ||
3754 | 16 | [ | ||
3755 | 17 | pcre *re= NULL; | ||
3756 | 18 | pcre_version(); | ||
3757 | 19 | ]) | ||
3758 | 20 | AS_IF([test "x$ac_cv_libpcre" = "xno"], | ||
3759 | 21 | [ | ||
3760 | 22 | unset ac_cv_libpcre | ||
3761 | 23 | unset HAVE_LIBPCRE | ||
3762 | 24 | unset LIBPCRE | ||
3763 | 25 | unset LIBPCRE_PREFIX | ||
3764 | 26 | unset LTLIBPCRE | ||
3765 | 27 | AC_LIB_HAVE_LINKFLAGS(pcre,, | ||
3766 | 28 | [#include <pcre/pcre.h>], | ||
3767 | 29 | [ | ||
3768 | 30 | pcre *re= NULL; | ||
3769 | 31 | pcre_version(); | ||
3770 | 32 | ]) | ||
3771 | 33 | AS_IF([test "x$ac_cv_libpcre" = "xyes"], [ | ||
3772 | 34 | ac_cv_pcre_location="<pcre/pcre.h>" | ||
3773 | 35 | ]) | ||
3774 | 36 | ],[ | ||
3775 | 37 | ac_cv_pcre_location="<pcre.h>" | ||
3776 | 38 | ]) | ||
3777 | 39 | |||
3778 | 40 | AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"]) | ||
3779 | 41 | ]) | ||
3780 | 42 | |||
3781 | 43 | AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[ | ||
3782 | 44 | |||
3783 | 45 | AC_ARG_ENABLE([libpcre], | ||
3784 | 46 | [AS_HELP_STRING([--disable-libpcre], | ||
3785 | 47 | [Build with libpcre support @<:@default=on@:>@])], | ||
3786 | 48 | [ac_enable_libpcre="$enableval"], | ||
3787 | 49 | [ac_enable_libpcre="yes"]) | ||
3788 | 50 | |||
3789 | 51 | _PANDORA_SEARCH_LIBPCRE | ||
3790 | 52 | ]) | ||
3791 | 53 | |||
3792 | 54 | |||
3793 | 55 | AC_DEFUN([PANDORA_HAVE_LIBPCRE],[ | ||
3794 | 56 | AC_REQUIRE([_PANDORA_HAVE_LIBPCRE]) | ||
3795 | 57 | ]) | ||
3796 | 58 | |||
3797 | 59 | AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[ | ||
3798 | 60 | ac_enable_libpcre="yes" | ||
3799 | 61 | _PANDORA_SEARCH_LIBPCRE | ||
3800 | 62 | |||
3801 | 63 | AS_IF([test x$ac_cv_libpcre = xno],[ | ||
3802 | 64 | PANDORA_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.]) | ||
3803 | 65 | ],[ | ||
3804 | 66 | AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}], | ||
3805 | 67 | [Location of pcre header]) | ||
3806 | 68 | ]) | ||
3807 | 69 | ]) | ||
3808 | 70 | |||
3809 | 71 | AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[ | ||
3810 | 72 | AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE]) | ||
3811 | 73 | ]) | ||
3812 | 0 | 74 | ||
3813 | === modified file 'm4/pandora_have_libpq.m4' | |||
3814 | --- m4/pandora_have_libpq.m4 2009-07-29 18:13:26 +0000 | |||
3815 | +++ m4/pandora_have_libpq.m4 2011-04-16 05:39:23 +0000 | |||
3816 | @@ -1,5 +1,5 @@ | |||
3819 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3820 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3821 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3822 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3823 | 5 | 5 | ||
3824 | @@ -42,5 +42,5 @@ | |||
3825 | 42 | AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ | 42 | AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ |
3826 | 43 | AC_REQUIRE([PANDORA_HAVE_LIBPQ]) | 43 | AC_REQUIRE([PANDORA_HAVE_LIBPQ]) |
3827 | 44 | AS_IF([test "x${ac_cv_libpq}" = "xno"], | 44 | AS_IF([test "x${ac_cv_libpq}" = "xno"], |
3829 | 45 | AC_MSG_ERROR([libpq is required for ${PACKAGE}])) | 45 | PANDORA_MSG_ERROR([libpq is required for ${PACKAGE}])) |
3830 | 46 | ]) | 46 | ]) |
3831 | 47 | 47 | ||
3832 | === added file 'm4/pandora_have_libpqxx.m4' | |||
3833 | --- m4/pandora_have_libpqxx.m4 1970-01-01 00:00:00 +0000 | |||
3834 | +++ m4/pandora_have_libpqxx.m4 2011-04-16 05:39:23 +0000 | |||
3835 | @@ -0,0 +1,44 @@ | |||
3836 | 1 | dnl Copyright (C) 2010 Padraig O'Sullivan | ||
3837 | 2 | dnl This file is free software; | ||
3838 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3839 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3840 | 5 | |||
3841 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[ | ||
3842 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3843 | 8 | |||
3844 | 9 | dnl -------------------------------------------------------------------- | ||
3845 | 10 | dnl Check for libpqxx | ||
3846 | 11 | dnl -------------------------------------------------------------------- | ||
3847 | 12 | |||
3848 | 13 | AC_ARG_ENABLE([libpqxx], | ||
3849 | 14 | [AS_HELP_STRING([--disable-libpqxx], | ||
3850 | 15 | [Build with libpqxx support @<:@default=on@:>@])], | ||
3851 | 16 | [ac_enable_libpqxx="$enableval"], | ||
3852 | 17 | [ac_enable_libpqxx="yes"]) | ||
3853 | 18 | |||
3854 | 19 | AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[ | ||
3855 | 20 | AC_LANG_PUSH([C++]) | ||
3856 | 21 | AC_LIB_HAVE_LINKFLAGS(pqxx,,[ | ||
3857 | 22 | #include <pqxx/pqxx> | ||
3858 | 23 | ],[ | ||
3859 | 24 | pqxx::connection conn("dbname=test"); | ||
3860 | 25 | ]) | ||
3861 | 26 | AC_LANG_POP() | ||
3862 | 27 | ],[ | ||
3863 | 28 | ac_cv_libpqxx="no" | ||
3864 | 29 | ]) | ||
3865 | 30 | |||
3866 | 31 | AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"]) | ||
3867 | 32 | |||
3868 | 33 | ]) | ||
3869 | 34 | |||
3870 | 35 | AC_DEFUN([PANDORA_HAVE_LIBPQXX],[ | ||
3871 | 36 | AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX]) | ||
3872 | 37 | ]) | ||
3873 | 38 | |||
3874 | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[ | ||
3875 | 40 | AC_REQUIRE([PANDORA_HAVE_LIBPQXX]) | ||
3876 | 41 | AS_IF([test "x$ac_cv_libpqxx" = "xno"],[ | ||
3877 | 42 | PANDORA_MSG_ERROR([libpqxx is required for ${PACKAGE}]) | ||
3878 | 43 | ]) | ||
3879 | 44 | ]) | ||
3880 | 0 | 45 | ||
3881 | === modified file 'm4/pandora_have_libreadline.m4' | |||
3882 | --- m4/pandora_have_libreadline.m4 2009-12-18 18:02:39 +0000 | |||
3883 | +++ m4/pandora_have_libreadline.m4 2011-04-16 05:39:23 +0000 | |||
3884 | @@ -56,8 +56,8 @@ | |||
3885 | 56 | # | 56 | # |
3886 | 57 | # COPYLEFT | 57 | # COPYLEFT |
3887 | 58 | # | 58 | # |
3890 | 59 | # Copyright (c) 2009 Monty Taylor | 59 | # Copyright (C) 2009 Monty Taylor |
3891 | 60 | # Copyright (c) 2002 Ville Laurikari <vl@iki.fi> | 60 | # Copyright (C) 2002 Ville Laurikari <vl@iki.fi> |
3892 | 61 | # | 61 | # |
3893 | 62 | # Copying and distribution of this file, with or without | 62 | # Copying and distribution of this file, with or without |
3894 | 63 | # modification, are permitted in any medium without royalty provided | 63 | # modification, are permitted in any medium without royalty provided |
3895 | @@ -231,7 +231,7 @@ | |||
3896 | 231 | _PANDORA_SEARCH_LIBREADLINE | 231 | _PANDORA_SEARCH_LIBREADLINE |
3897 | 232 | 232 | ||
3898 | 233 | AS_IF([test "x$ac_cv_libreadline" = "xno"], | 233 | AS_IF([test "x$ac_cv_libreadline" = "xno"], |
3900 | 234 | 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.])) | 234 | PANDORA_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.])) |
3901 | 235 | 235 | ||
3902 | 236 | ]) | 236 | ]) |
3903 | 237 | 237 | ||
3904 | 238 | 238 | ||
3905 | === modified file 'm4/pandora_have_libsqlite3.m4' | |||
3906 | --- m4/pandora_have_libsqlite3.m4 2009-07-29 18:13:26 +0000 | |||
3907 | +++ m4/pandora_have_libsqlite3.m4 2011-04-16 05:39:23 +0000 | |||
3908 | @@ -1,5 +1,5 @@ | |||
3911 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3912 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3913 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3914 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3915 | 5 | 5 | ||
3916 | @@ -38,5 +38,5 @@ | |||
3917 | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[ | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[ |
3918 | 39 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) | 39 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) |
3919 | 40 | AS_IF([test "x${ac_cv_libsqlite3}" = "xno"], | 40 | AS_IF([test "x${ac_cv_libsqlite3}" = "xno"], |
3921 | 41 | AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}])) | 41 | PANDORA_MSG_ERROR([libsqlite3 is required for ${PACKAGE}])) |
3922 | 42 | ]) | 42 | ]) |
3923 | 43 | 43 | ||
3924 | === modified file 'm4/pandora_have_libtokyocabinet.m4' | |||
3925 | --- m4/pandora_have_libtokyocabinet.m4 2010-04-06 00:33:06 +0000 | |||
3926 | +++ m4/pandora_have_libtokyocabinet.m4 2011-04-16 05:39:23 +0000 | |||
3927 | @@ -1,5 +1,5 @@ | |||
3930 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3931 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3932 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3933 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3934 | 5 | 5 | ||
3935 | @@ -50,5 +50,5 @@ | |||
3936 | 50 | AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[ | 50 | AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[ |
3937 | 51 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) | 51 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) |
3938 | 52 | AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"], | 52 | AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"], |
3940 | 53 | AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.])) | 53 | PANDORA_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.])) |
3941 | 54 | ]) | 54 | ]) |
3942 | 55 | 55 | ||
3943 | === modified file 'm4/pandora_have_libuuid.m4' | |||
3944 | --- m4/pandora_have_libuuid.m4 2009-12-18 18:02:39 +0000 | |||
3945 | +++ m4/pandora_have_libuuid.m4 2011-04-16 05:39:23 +0000 | |||
3946 | @@ -1,5 +1,5 @@ | |||
3949 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
3950 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
3951 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
3952 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
3953 | 5 | 5 | ||
3954 | @@ -46,7 +46,7 @@ | |||
3955 | 46 | ac_enable_libuuid="yes" | 46 | ac_enable_libuuid="yes" |
3956 | 47 | _PANDORA_SEARCH_LIBUUID | 47 | _PANDORA_SEARCH_LIBUUID |
3957 | 48 | AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[ | 48 | AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[ |
3959 | 49 | 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.]) | 49 | PANDORA_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.]) |
3960 | 50 | ]) | 50 | ]) |
3961 | 51 | ]) | 51 | ]) |
3962 | 52 | 52 | ||
3963 | 53 | 53 | ||
3964 | === added file 'm4/pandora_have_libvbucket.m4' | |||
3965 | --- m4/pandora_have_libvbucket.m4 1970-01-01 00:00:00 +0000 | |||
3966 | +++ m4/pandora_have_libvbucket.m4 2011-04-16 05:39:23 +0000 | |||
3967 | @@ -0,0 +1,40 @@ | |||
3968 | 1 | dnl Copyright (C) 2010 NorthScale | ||
3969 | 2 | dnl This file is free software; NorthScale | ||
3970 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
3971 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
3972 | 5 | |||
3973 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[ | ||
3974 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
3975 | 8 | |||
3976 | 9 | dnl -------------------------------------------------------------------- | ||
3977 | 10 | dnl Check for libvbucket | ||
3978 | 11 | dnl -------------------------------------------------------------------- | ||
3979 | 12 | |||
3980 | 13 | AC_ARG_ENABLE([libvbucket], | ||
3981 | 14 | [AS_HELP_STRING([--disable-libvbucket], | ||
3982 | 15 | [Build with libvbucket support @<:@default=on@:>@])], | ||
3983 | 16 | [ac_enable_libvbucket="$enableval"], | ||
3984 | 17 | [ac_enable_libvbucket="yes"]) | ||
3985 | 18 | |||
3986 | 19 | AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[ | ||
3987 | 20 | AC_LIB_HAVE_LINKFLAGS(vbucket,,[ | ||
3988 | 21 | #include <libvbucket/vbucket.h> | ||
3989 | 22 | ],[ | ||
3990 | 23 | VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL); | ||
3991 | 24 | ]) | ||
3992 | 25 | ],[ | ||
3993 | 26 | ac_cv_libvbucket="no" | ||
3994 | 27 | ]) | ||
3995 | 28 | |||
3996 | 29 | AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"]) | ||
3997 | 30 | ]) | ||
3998 | 31 | |||
3999 | 32 | AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[ | ||
4000 | 33 | AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET]) | ||
4001 | 34 | ]) | ||
4002 | 35 | |||
4003 | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[ | ||
4004 | 37 | AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET]) | ||
4005 | 38 | AS_IF([test x$ac_cv_libvbucket = xno], | ||
4006 | 39 | PANDORA_MSG_ERROR([libvbucket is required for ${PACKAGE}])) | ||
4007 | 40 | ]) | ||
4008 | 0 | 41 | ||
4009 | === modified file 'm4/pandora_have_libxml2.m4' | |||
4010 | --- m4/pandora_have_libxml2.m4 2009-12-18 18:02:39 +0000 | |||
4011 | +++ m4/pandora_have_libxml2.m4 2011-04-16 05:39:23 +0000 | |||
4012 | @@ -1,5 +1,5 @@ | |||
4015 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4016 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4017 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4018 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4019 | 5 | 5 | ||
4020 | @@ -48,5 +48,5 @@ | |||
4021 | 48 | AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[ | 48 | AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[ |
4022 | 49 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) | 49 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) |
4023 | 50 | AS_IF([test "x${ac_cv_libxml2}" = "xno"], | 50 | AS_IF([test "x${ac_cv_libxml2}" = "xno"], |
4025 | 51 | AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.])) | 51 | PANDORA_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.])) |
4026 | 52 | ]) | 52 | ]) |
4027 | 53 | 53 | ||
4028 | === modified file 'm4/pandora_have_libz.m4' | |||
4029 | --- m4/pandora_have_libz.m4 2009-12-18 18:02:39 +0000 | |||
4030 | +++ m4/pandora_have_libz.m4 2011-04-16 05:39:23 +0000 | |||
4031 | @@ -1,5 +1,5 @@ | |||
4034 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4035 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4036 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4037 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4038 | 5 | 5 | ||
4039 | @@ -42,7 +42,7 @@ | |||
4040 | 42 | _PANDORA_SEARCH_LIBZ | 42 | _PANDORA_SEARCH_LIBZ |
4041 | 43 | 43 | ||
4042 | 44 | AS_IF([test x$ac_cv_libz = xno],[ | 44 | AS_IF([test x$ac_cv_libz = xno],[ |
4044 | 45 | 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.]) | 45 | PANDORA_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.]) |
4045 | 46 | ]) | 46 | ]) |
4046 | 47 | ]) | 47 | ]) |
4047 | 48 | 48 | ||
4048 | 49 | 49 | ||
4049 | === modified file 'm4/pandora_have_protobuf.m4' | |||
4050 | --- m4/pandora_have_protobuf.m4 2009-09-29 04:30:01 +0000 | |||
4051 | +++ m4/pandora_have_protobuf.m4 2011-04-16 05:39:23 +0000 | |||
4052 | @@ -23,7 +23,9 @@ | |||
4053 | 23 | [#include <google/protobuf/descriptor.h>], | 23 | [#include <google/protobuf/descriptor.h>], |
4054 | 24 | [google::protobuf::FileDescriptor* file;], | 24 | [google::protobuf::FileDescriptor* file;], |
4055 | 25 | [system]) | 25 | [system]) |
4057 | 26 | CXXFLAGS="${save_CXXFLAGS}" | 26 | CXXFLAGS="${PTHREAD_CFLAGS} ${save_CXXFLAGS}" |
4058 | 27 | LIBPROTOBUF="${LIBPROTOBUF} ${PTHREAD_LIBS}" | ||
4059 | 28 | LTLIBPROTOBUF="${LTLIBPROTOBUF} ${PTHREAD_LIBS}" | ||
4060 | 27 | AC_LANG_POP() | 29 | AC_LANG_POP() |
4061 | 28 | ]) | 30 | ]) |
4062 | 29 | 31 | ||
4063 | @@ -34,7 +36,7 @@ | |||
4064 | 34 | AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[ | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[ |
4065 | 35 | AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF]) | 37 | AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF]) |
4066 | 36 | AS_IF([test x$ac_cv_libprotobuf = xno], | 38 | AS_IF([test x$ac_cv_libprotobuf = xno], |
4068 | 37 | AC_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.])) | 39 | PANDORA_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.])) |
4069 | 38 | ]) | 40 | ]) |
4070 | 39 | 41 | ||
4071 | 40 | AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[ | 42 | AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[ |
4072 | @@ -56,7 +58,7 @@ | |||
4073 | 56 | [drizzle_cv_protobuf_recent=yes], | 58 | [drizzle_cv_protobuf_recent=yes], |
4074 | 57 | [drizzle_cv_protobuf_recent=no])]) | 59 | [drizzle_cv_protobuf_recent=no])]) |
4075 | 58 | AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[ | 60 | AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[ |
4077 | 59 | AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver]) | 61 | PANDORA_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver]) |
4078 | 60 | ]) | 62 | ]) |
4079 | 61 | AC_LANG_POP() | 63 | AC_LANG_POP() |
4080 | 62 | ]) | 64 | ]) |
4081 | @@ -73,7 +75,7 @@ | |||
4082 | 73 | AC_DEFUN([PANDORA_REQUIRE_PROTOC],[ | 75 | AC_DEFUN([PANDORA_REQUIRE_PROTOC],[ |
4083 | 74 | AC_REQUIRE([PANDORA_HAVE_PROTOC]) | 76 | AC_REQUIRE([PANDORA_HAVE_PROTOC]) |
4084 | 75 | AS_IF([test "x$PROTOC" = "xno"],[ | 77 | AS_IF([test "x$PROTOC" = "xno"],[ |
4086 | 76 | AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.]) | 78 | PANDORA_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.]) |
4087 | 77 | ]) | 79 | ]) |
4088 | 78 | ]) | 80 | ]) |
4089 | 79 | 81 | ||
4090 | 80 | 82 | ||
4091 | === added file 'm4/pandora_have_sasl.m4' | |||
4092 | --- m4/pandora_have_sasl.m4 1970-01-01 00:00:00 +0000 | |||
4093 | +++ m4/pandora_have_sasl.m4 2011-04-16 05:39:23 +0000 | |||
4094 | @@ -0,0 +1,133 @@ | |||
4095 | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
4096 | 2 | dnl This file is free software; Sun Microsystems, Inc. | ||
4097 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
4098 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
4099 | 5 | |||
4100 | 6 | AC_DEFUN([_PANDORA_SEARCH_SASL],[ | ||
4101 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
4102 | 8 | |||
4103 | 9 | dnl -------------------------------------------------------------------- | ||
4104 | 10 | dnl Check for sasl | ||
4105 | 11 | dnl -------------------------------------------------------------------- | ||
4106 | 12 | AC_ARG_ENABLE([sasl], | ||
4107 | 13 | [AS_HELP_STRING([--disable-sasl], | ||
4108 | 14 | [Build with sasl support @<:@default=on@:>@])], | ||
4109 | 15 | [ac_enable_sasl="$enableval"], | ||
4110 | 16 | [ac_enable_sasl="yes"]) | ||
4111 | 17 | |||
4112 | 18 | AS_IF([test "x$ac_enable_sasl" = "xyes"], | ||
4113 | 19 | [ | ||
4114 | 20 | AC_LIB_HAVE_LINKFLAGS(sasl,,[ | ||
4115 | 21 | #include <stdlib.h> | ||
4116 | 22 | #include <sasl/sasl.h> | ||
4117 | 23 | ],[ | ||
4118 | 24 | sasl_server_init(NULL, NULL); | ||
4119 | 25 | ]) | ||
4120 | 26 | |||
4121 | 27 | AS_IF([test "x${ac_cv_libsasl}" != "xyes" ], | ||
4122 | 28 | [ | ||
4123 | 29 | AC_LIB_HAVE_LINKFLAGS(sasl2,,[ | ||
4124 | 30 | #include <stdlib.h> | ||
4125 | 31 | #include <sasl/sasl.h> | ||
4126 | 32 | ],[ | ||
4127 | 33 | sasl_server_init(NULL, NULL); | ||
4128 | 34 | ]) | ||
4129 | 35 | HAVE_LIBSASL="$HAVE_LIBSASL2" | ||
4130 | 36 | LIBSASL="$LIBSASL2" | ||
4131 | 37 | LIBSASL_PREFIX="$LIBSASL2_PREFIX" | ||
4132 | 38 | LTLIBSASL="$LT_LIBSASL2" | ||
4133 | 39 | ]) | ||
4134 | 40 | ]) | ||
4135 | 41 | |||
4136 | 42 | AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"], | ||
4137 | 43 | [ac_cv_sasl=yes], | ||
4138 | 44 | [ac_cv_sasl=no]) | ||
4139 | 45 | |||
4140 | 46 | AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) | ||
4141 | 47 | AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) | ||
4142 | 48 | AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"]) | ||
4143 | 49 | ]) | ||
4144 | 50 | |||
4145 | 51 | AC_DEFUN([PANDORA_HAVE_SASL],[ | ||
4146 | 52 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) | ||
4147 | 53 | ]) | ||
4148 | 54 | |||
4149 | 55 | AC_DEFUN([PANDORA_REQUIRE_SASL],[ | ||
4150 | 56 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) | ||
4151 | 57 | AS_IF([test "x${ac_cv_sasl}" = "xno"], | ||
4152 | 58 | PANDORA_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}])) | ||
4153 | 59 | ]) | ||
4154 | 60 | |||
4155 | 61 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[ | ||
4156 | 62 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
4157 | 63 | |||
4158 | 64 | dnl -------------------------------------------------------------------- | ||
4159 | 65 | dnl Check for libsasl | ||
4160 | 66 | dnl -------------------------------------------------------------------- | ||
4161 | 67 | |||
4162 | 68 | AC_ARG_ENABLE([libsasl], | ||
4163 | 69 | [AS_HELP_STRING([--disable-libsasl], | ||
4164 | 70 | [Build with libsasl support @<:@default=on@:>@])], | ||
4165 | 71 | [ac_enable_libsasl="$enableval"], | ||
4166 | 72 | [ac_enable_libsasl="yes"]) | ||
4167 | 73 | |||
4168 | 74 | AS_IF([test "x$ac_enable_libsasl" = "xyes"],[ | ||
4169 | 75 | AC_LIB_HAVE_LINKFLAGS(sasl,,[ | ||
4170 | 76 | #include <stdlib.h> | ||
4171 | 77 | #include <sasl/sasl.h> | ||
4172 | 78 | ],[ | ||
4173 | 79 | sasl_server_init(NULL, NULL); | ||
4174 | 80 | ]) | ||
4175 | 81 | ],[ | ||
4176 | 82 | ac_cv_libsasl="no" | ||
4177 | 83 | ]) | ||
4178 | 84 | |||
4179 | 85 | AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) | ||
4180 | 86 | ]) | ||
4181 | 87 | |||
4182 | 88 | AC_DEFUN([PANDORA_HAVE_LIBSASL],[ | ||
4183 | 89 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) | ||
4184 | 90 | ]) | ||
4185 | 91 | |||
4186 | 92 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[ | ||
4187 | 93 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) | ||
4188 | 94 | AS_IF([test "x${ac_cv_libsasl}" = "xno"], | ||
4189 | 95 | PANDORA_MSG_ERROR([libsasl is required for ${PACKAGE}])) | ||
4190 | 96 | ]) | ||
4191 | 97 | |||
4192 | 98 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[ | ||
4193 | 99 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
4194 | 100 | |||
4195 | 101 | dnl -------------------------------------------------------------------- | ||
4196 | 102 | dnl Check for libsasl2 | ||
4197 | 103 | dnl -------------------------------------------------------------------- | ||
4198 | 104 | |||
4199 | 105 | AC_ARG_ENABLE([libsasl2], | ||
4200 | 106 | [AS_HELP_STRING([--disable-libsasl2], | ||
4201 | 107 | [Build with libsasl2 support @<:@default=on@:>@])], | ||
4202 | 108 | [ac_enable_libsasl2="$enableval"], | ||
4203 | 109 | [ac_enable_libsasl2="yes"]) | ||
4204 | 110 | |||
4205 | 111 | AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[ | ||
4206 | 112 | AC_LIB_HAVE_LINKFLAGS(sasl2,,[ | ||
4207 | 113 | #include <stdlib.h> | ||
4208 | 114 | #include <sasl2/sasl2.h> | ||
4209 | 115 | ],[ | ||
4210 | 116 | sasl2_server_init(NULL, NULL); | ||
4211 | 117 | ]) | ||
4212 | 118 | ],[ | ||
4213 | 119 | ac_cv_libsasl2="no" | ||
4214 | 120 | ]) | ||
4215 | 121 | |||
4216 | 122 | AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) | ||
4217 | 123 | ]) | ||
4218 | 124 | |||
4219 | 125 | AC_DEFUN([PANDORA_HAVE_LIBSASL2],[ | ||
4220 | 126 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) | ||
4221 | 127 | ]) | ||
4222 | 128 | |||
4223 | 129 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[ | ||
4224 | 130 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) | ||
4225 | 131 | AS_IF([test "x${ac_cv_libsasl2}" = "xno"], | ||
4226 | 132 | PANDORA_MSG_ERROR([libsasl2 is required for ${PACKAGE}])) | ||
4227 | 133 | ]) | ||
4228 | 0 | 134 | ||
4229 | === modified file 'm4/pandora_have_thrift.m4' | |||
4230 | --- m4/pandora_have_thrift.m4 2010-04-06 00:33:06 +0000 | |||
4231 | +++ m4/pandora_have_thrift.m4 2011-04-16 05:39:23 +0000 | |||
4232 | @@ -39,7 +39,7 @@ | |||
4233 | 39 | AC_DEFUN([PANDORA_REQUIRE_THRIFT],[ | 39 | AC_DEFUN([PANDORA_REQUIRE_THRIFT],[ |
4234 | 40 | AC_REQUIRE([PANDORA_HAVE_THRIFT]) | 40 | AC_REQUIRE([PANDORA_HAVE_THRIFT]) |
4235 | 41 | AS_IF([test x$ac_cv_thrift= xno],[ | 41 | AS_IF([test x$ac_cv_thrift= xno],[ |
4237 | 42 | AC_MSG_ERROR([thrift required for ${PACKAGE}]) | 42 | PANDORA_MSG_ERROR([thrift required for ${PACKAGE}]) |
4238 | 43 | ]) | 43 | ]) |
4239 | 44 | ]) | 44 | ]) |
4240 | 45 | 45 | ||
4241 | 46 | 46 | ||
4242 | === modified file 'm4/pandora_header_assert.m4' | |||
4243 | --- m4/pandora_header_assert.m4 2009-12-18 19:25:00 +0000 | |||
4244 | +++ m4/pandora_header_assert.m4 2011-04-16 05:39:23 +0000 | |||
4245 | @@ -1,5 +1,5 @@ | |||
4248 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4249 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4250 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4251 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4252 | 5 | 5 | ||
4253 | 6 | 6 | ||
4254 | === added file 'm4/pandora_header_stdcxx_98.m4' | |||
4255 | --- m4/pandora_header_stdcxx_98.m4 1970-01-01 00:00:00 +0000 | |||
4256 | +++ m4/pandora_header_stdcxx_98.m4 2011-04-16 05:39:23 +0000 | |||
4257 | @@ -0,0 +1,83 @@ | |||
4258 | 1 | # =========================================================================== | ||
4259 | 2 | # http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html | ||
4260 | 3 | # =========================================================================== | ||
4261 | 4 | # | ||
4262 | 5 | # SYNOPSIS | ||
4263 | 6 | # | ||
4264 | 7 | # AC_CXX_HEADER_STDCXX_98 | ||
4265 | 8 | # | ||
4266 | 9 | # DESCRIPTION | ||
4267 | 10 | # | ||
4268 | 11 | # Check for complete library coverage of the C++1998/2003 standard. | ||
4269 | 12 | # | ||
4270 | 13 | # LICENSE | ||
4271 | 14 | # | ||
4272 | 15 | # Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com> | ||
4273 | 16 | # | ||
4274 | 17 | # Copying and distribution of this file, with or without modification, are | ||
4275 | 18 | # permitted in any medium without royalty provided the copyright notice | ||
4276 | 19 | # and this notice are preserved. | ||
4277 | 20 | |||
4278 | 21 | AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [ | ||
4279 | 22 | AC_CACHE_CHECK(for ISO C++ 98 include files, | ||
4280 | 23 | ac_cv_cxx_stdcxx_98, | ||
4281 | 24 | [AC_LANG_SAVE | ||
4282 | 25 | AC_LANG_CPLUSPLUS | ||
4283 | 26 | AC_TRY_COMPILE([ | ||
4284 | 27 | #include <cassert> | ||
4285 | 28 | #include <cctype> | ||
4286 | 29 | #include <cerrno> | ||
4287 | 30 | #include <cfloat> | ||
4288 | 31 | #include <ciso646> | ||
4289 | 32 | #include <climits> | ||
4290 | 33 | #include <clocale> | ||
4291 | 34 | #include <cmath> | ||
4292 | 35 | #include <csetjmp> | ||
4293 | 36 | #include <csignal> | ||
4294 | 37 | #include <cstdarg> | ||
4295 | 38 | #include <cstddef> | ||
4296 | 39 | #include <cstdio> | ||
4297 | 40 | #include <cstdlib> | ||
4298 | 41 | #include <cstring> | ||
4299 | 42 | #include <ctime> | ||
4300 | 43 | |||
4301 | 44 | #include <algorithm> | ||
4302 | 45 | #include <bitset> | ||
4303 | 46 | #include <complex> | ||
4304 | 47 | #include <deque> | ||
4305 | 48 | #include <exception> | ||
4306 | 49 | #include <fstream> | ||
4307 | 50 | #include <functional> | ||
4308 | 51 | #include <iomanip> | ||
4309 | 52 | #include <ios> | ||
4310 | 53 | #include <iosfwd> | ||
4311 | 54 | #include <iostream> | ||
4312 | 55 | #include <istream> | ||
4313 | 56 | #include <iterator> | ||
4314 | 57 | #include <limits> | ||
4315 | 58 | #include <list> | ||
4316 | 59 | #include <locale> | ||
4317 | 60 | #include <map> | ||
4318 | 61 | #include <memory> | ||
4319 | 62 | #include <new> | ||
4320 | 63 | #include <numeric> | ||
4321 | 64 | #include <ostream> | ||
4322 | 65 | #include <queue> | ||
4323 | 66 | #include <set> | ||
4324 | 67 | #include <sstream> | ||
4325 | 68 | #include <stack> | ||
4326 | 69 | #include <stdexcept> | ||
4327 | 70 | #include <streambuf> | ||
4328 | 71 | #include <string> | ||
4329 | 72 | #include <typeinfo> | ||
4330 | 73 | #include <utility> | ||
4331 | 74 | #include <valarray> | ||
4332 | 75 | #include <vector> | ||
4333 | 76 | ],, | ||
4334 | 77 | ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no) | ||
4335 | 78 | AC_LANG_RESTORE | ||
4336 | 79 | ]) | ||
4337 | 80 | if test "$ac_cv_cxx_stdcxx_98" = yes; then | ||
4338 | 81 | AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ]) | ||
4339 | 82 | fi | ||
4340 | 83 | ]) | ||
4341 | 0 | 84 | ||
4342 | === added file 'm4/pandora_intltool.m4' | |||
4343 | --- m4/pandora_intltool.m4 1970-01-01 00:00:00 +0000 | |||
4344 | +++ m4/pandora_intltool.m4 2011-04-16 05:39:23 +0000 | |||
4345 | @@ -0,0 +1,225 @@ | |||
4346 | 1 | ## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- | ||
4347 | 2 | ## Copyright (C) 2001 Eazel, Inc. | ||
4348 | 3 | ## Author: Maciej Stachowiak <mjs@noisehavoc.org> | ||
4349 | 4 | ## Kenneth Christiansen <kenneth@gnu.org> | ||
4350 | 5 | ## | ||
4351 | 6 | ## This program is free software; you can redistribute it and/or modify | ||
4352 | 7 | ## it under the terms of the GNU General Public License as published by | ||
4353 | 8 | ## the Free Software Foundation; either version 2 of the License, or | ||
4354 | 9 | ## (at your option) any later version. | ||
4355 | 10 | ## | ||
4356 | 11 | ## This program is distributed in the hope that it will be useful, but | ||
4357 | 12 | ## WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4358 | 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
4359 | 14 | ## General Public License for more details. | ||
4360 | 15 | ## | ||
4361 | 16 | ## You should have received a copy of the GNU General Public License | ||
4362 | 17 | ## along with this program; if not, write to the Free Software | ||
4363 | 18 | ## Foundation, Inc., 51 Franklin Place - Suite 330, Boston, MA 02110-1301, USA. | ||
4364 | 19 | ## | ||
4365 | 20 | ## As a special exception to the GNU General Public License, if you | ||
4366 | 21 | ## distribute this file as part of a program that contains a | ||
4367 | 22 | ## configuration script generated by Autoconf, you may include it under | ||
4368 | 23 | ## the same distribution terms that you use for the rest of that program. | ||
4369 | 24 | |||
4370 | 25 | dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) | ||
4371 | 26 | # serial 40 IT_PROG_INTLTOOL | ||
4372 | 27 | AC_DEFUN([IT_PROG_INTLTOOL], [ | ||
4373 | 28 | AC_PREREQ([2.50])dnl | ||
4374 | 29 | AC_REQUIRE([AM_NLS])dnl | ||
4375 | 30 | |||
4376 | 31 | case "$am__api_version" in | ||
4377 | 32 | 1.[01234]) | ||
4378 | 33 | PANDORA_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) | ||
4379 | 34 | ;; | ||
4380 | 35 | *) | ||
4381 | 36 | ;; | ||
4382 | 37 | esac | ||
4383 | 38 | |||
4384 | 39 | if test -n "$1"; then | ||
4385 | 40 | AC_MSG_CHECKING([for intltool >= $1]) | ||
4386 | 41 | |||
4387 | 42 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` | ||
4388 | 43 | INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` | ||
4389 | 44 | [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` | ||
4390 | 45 | ] | ||
4391 | 46 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) | ||
4392 | 47 | AS_IF([test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"],[ | ||
4393 | 48 | pandora_have_intltool=yes | ||
4394 | 49 | ],[ | ||
4395 | 50 | pandora_have_intltool=no | ||
4396 | 51 | AC_MSG_WARN([Your intltool is too old. You need intltool $1 or later.]) | ||
4397 | 52 | ]) | ||
4398 | 53 | fi | ||
4399 | 54 | AC_CHECK_HEADERS([libintl.h]) | ||
4400 | 55 | AS_IF([test "x${ac_cv_header_libintl_h}" = "xfalse" -o "x${ac_cv_header_libintl_h}" = "xno"],[ | ||
4401 | 56 | pandora_have_intltool=no | ||
4402 | 57 | ]) | ||
4403 | 58 | |||
4404 | 59 | AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) | ||
4405 | 60 | AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) | ||
4406 | 61 | AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) | ||
4407 | 62 | if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then | ||
4408 | 63 | AC_MSG_WARN([The intltool scripts were not found. Please install intltool.]) | ||
4409 | 64 | AC_MSG_WARN([On Debian: apt-get install intltool. On Redhat: yum install intltool]) | ||
4410 | 65 | fi | ||
4411 | 66 | |||
4412 | 67 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4413 | 68 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4414 | 69 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4415 | 70 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4416 | 71 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' | ||
4417 | 72 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4418 | 73 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4419 | 74 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4420 | 75 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4421 | 76 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4422 | 77 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4423 | 78 | INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' | ||
4424 | 79 | INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4425 | 80 | INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4426 | 81 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4427 | 82 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4428 | 83 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4429 | 84 | INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4430 | 85 | INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' | ||
4431 | 86 | |||
4432 | 87 | _IT_SUBST(INTLTOOL_DESKTOP_RULE) | ||
4433 | 88 | _IT_SUBST(INTLTOOL_DIRECTORY_RULE) | ||
4434 | 89 | _IT_SUBST(INTLTOOL_KEYS_RULE) | ||
4435 | 90 | _IT_SUBST(INTLTOOL_PROP_RULE) | ||
4436 | 91 | _IT_SUBST(INTLTOOL_OAF_RULE) | ||
4437 | 92 | _IT_SUBST(INTLTOOL_PONG_RULE) | ||
4438 | 93 | _IT_SUBST(INTLTOOL_SERVER_RULE) | ||
4439 | 94 | _IT_SUBST(INTLTOOL_SHEET_RULE) | ||
4440 | 95 | _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) | ||
4441 | 96 | _IT_SUBST(INTLTOOL_UI_RULE) | ||
4442 | 97 | _IT_SUBST(INTLTOOL_XAM_RULE) | ||
4443 | 98 | _IT_SUBST(INTLTOOL_KBD_RULE) | ||
4444 | 99 | _IT_SUBST(INTLTOOL_XML_RULE) | ||
4445 | 100 | _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) | ||
4446 | 101 | _IT_SUBST(INTLTOOL_CAVES_RULE) | ||
4447 | 102 | _IT_SUBST(INTLTOOL_SCHEMAS_RULE) | ||
4448 | 103 | _IT_SUBST(INTLTOOL_THEME_RULE) | ||
4449 | 104 | _IT_SUBST(INTLTOOL_SERVICE_RULE) | ||
4450 | 105 | _IT_SUBST(INTLTOOL_POLICY_RULE) | ||
4451 | 106 | |||
4452 | 107 | # Check the gettext tools to make sure they are GNU | ||
4453 | 108 | AC_PATH_PROG(XGETTEXT, xgettext) | ||
4454 | 109 | AC_PATH_PROG(MSGMERGE, msgmerge) | ||
4455 | 110 | AC_PATH_PROG(MSGFMT, msgfmt) | ||
4456 | 111 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | ||
4457 | 112 | if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then | ||
4458 | 113 | AC_MSG_WARN([GNU gettext tools not found; required for intltool]) | ||
4459 | 114 | fi | ||
4460 | 115 | xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" | ||
4461 | 116 | mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" | ||
4462 | 117 | mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" | ||
4463 | 118 | if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then | ||
4464 | 119 | AC_MSG_WARN([GNU gettext tools not found; required for intltool]) | ||
4465 | 120 | fi | ||
4466 | 121 | |||
4467 | 122 | AC_PATH_PROG(INTLTOOL_PERL, perl) | ||
4468 | 123 | if test -z "$INTLTOOL_PERL"; then | ||
4469 | 124 | AC_MSG_WARN([perl not found]) | ||
4470 | 125 | fi | ||
4471 | 126 | AC_MSG_CHECKING([for perl >= 5.8.1]) | ||
4472 | 127 | $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 | ||
4473 | 128 | if test $? -ne 0; then | ||
4474 | 129 | AC_MSG_WARN([perl 5.8.1 is required for intltool]) | ||
4475 | 130 | else | ||
4476 | 131 | IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" | ||
4477 | 132 | AC_MSG_RESULT([$IT_PERL_VERSION]) | ||
4478 | 133 | fi | ||
4479 | 134 | if test "x$2" != "xno-xml"; then | ||
4480 | 135 | AC_MSG_CHECKING([for XML::Parser]) | ||
4481 | 136 | if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then | ||
4482 | 137 | AC_MSG_RESULT([ok]) | ||
4483 | 138 | else | ||
4484 | 139 | AC_MSG_WARN([XML::Parser perl module is required for intltool]) | ||
4485 | 140 | fi | ||
4486 | 141 | fi | ||
4487 | 142 | |||
4488 | 143 | # Substitute ALL_LINGUAS so we can use it in po/Makefile | ||
4489 | 144 | AC_SUBST(ALL_LINGUAS) | ||
4490 | 145 | |||
4491 | 146 | # Set DATADIRNAME correctly if it is not set yet | ||
4492 | 147 | # (copied from glib-gettext.m4) | ||
4493 | 148 | if test -z "$DATADIRNAME"; then | ||
4494 | 149 | AC_LINK_IFELSE( | ||
4495 | 150 | [AC_LANG_PROGRAM([[]], | ||
4496 | 151 | [[extern int _nl_msg_cat_cntr; | ||
4497 | 152 | return _nl_msg_cat_cntr]])], | ||
4498 | 153 | [DATADIRNAME=share], | ||
4499 | 154 | [case $host in | ||
4500 | 155 | *-*-solaris*) | ||
4501 | 156 | dnl On Solaris, if bind_textdomain_codeset is in libc, | ||
4502 | 157 | dnl GNU format message catalog is always supported, | ||
4503 | 158 | dnl since both are added to the libc all together. | ||
4504 | 159 | dnl Hence, we'd like to go with DATADIRNAME=share | ||
4505 | 160 | dnl in this case. | ||
4506 | 161 | AC_CHECK_FUNC(bind_textdomain_codeset, | ||
4507 | 162 | [DATADIRNAME=share], [DATADIRNAME=lib]) | ||
4508 | 163 | ;; | ||
4509 | 164 | *) | ||
4510 | 165 | [DATADIRNAME=lib] | ||
4511 | 166 | ;; | ||
4512 | 167 | esac]) | ||
4513 | 168 | fi | ||
4514 | 169 | AC_SUBST(DATADIRNAME) | ||
4515 | 170 | |||
4516 | 171 | IT_PO_SUBDIR([po]) | ||
4517 | 172 | ]) | ||
4518 | 173 | |||
4519 | 174 | |||
4520 | 175 | # IT_PO_SUBDIR(DIRNAME) | ||
4521 | 176 | # --------------------- | ||
4522 | 177 | # All po subdirs have to be declared with this macro; the subdir "po" is | ||
4523 | 178 | # declared by IT_PROG_INTLTOOL. | ||
4524 | 179 | # | ||
4525 | 180 | AC_DEFUN([IT_PO_SUBDIR], | ||
4526 | 181 | [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. | ||
4527 | 182 | dnl | ||
4528 | 183 | dnl The following CONFIG_COMMANDS should be exetuted at the very end | ||
4529 | 184 | dnl of config.status. | ||
4530 | 185 | AC_CONFIG_COMMANDS_PRE([ | ||
4531 | 186 | AC_CONFIG_COMMANDS([$1/stamp-it], [ | ||
4532 | 187 | if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then | ||
4533 | 188 | AC_MSG_WARN([$1/Makefile.in.in was not created by intltoolize.]) | ||
4534 | 189 | else | ||
4535 | 190 | rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" | ||
4536 | 191 | >"$1/stamp-it.tmp" | ||
4537 | 192 | [sed '/^#/d | ||
4538 | 193 | s/^[[].*] *// | ||
4539 | 194 | /^[ ]*$/d | ||
4540 | 195 | '"s|^| $ac_top_srcdir/|" \ | ||
4541 | 196 | "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" | ||
4542 | 197 | ] | ||
4543 | 198 | [sed '/^POTFILES =/,/[^\\]$/ { | ||
4544 | 199 | /^POTFILES =/!d | ||
4545 | 200 | r $1/POTFILES | ||
4546 | 201 | } | ||
4547 | 202 | ' "$1/Makefile.in" >"$1/Makefile"] | ||
4548 | 203 | rm -f "$1/Makefile.tmp" | ||
4549 | 204 | mv "$1/stamp-it.tmp" "$1/stamp-it" | ||
4550 | 205 | fi | ||
4551 | 206 | ]) | ||
4552 | 207 | ])dnl | ||
4553 | 208 | ]) | ||
4554 | 209 | |||
4555 | 210 | # _IT_SUBST(VARIABLE) | ||
4556 | 211 | # ------------------- | ||
4557 | 212 | # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST | ||
4558 | 213 | # | ||
4559 | 214 | AC_DEFUN([_IT_SUBST], | ||
4560 | 215 | [ | ||
4561 | 216 | AC_SUBST([$1]) | ||
4562 | 217 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) | ||
4563 | 218 | ] | ||
4564 | 219 | ) | ||
4565 | 220 | |||
4566 | 221 | # deprecated macros | ||
4567 | 222 | AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) | ||
4568 | 223 | # A hint is needed for aclocal from Automake <= 1.9.4: | ||
4569 | 224 | # AC_DEFUN([AC_PROG_INTLTOOL], ...) | ||
4570 | 225 | |||
4571 | 0 | 226 | ||
4572 | === modified file 'm4/pandora_libtool.m4' | |||
4573 | --- m4/pandora_libtool.m4 2009-12-18 18:02:39 +0000 | |||
4574 | +++ m4/pandora_libtool.m4 2011-04-16 05:39:23 +0000 | |||
4575 | @@ -1,5 +1,5 @@ | |||
4578 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4579 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4580 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4581 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4582 | 5 | 5 | ||
4583 | @@ -12,7 +12,7 @@ | |||
4584 | 12 | pandora_have_old_libtool=no | 12 | pandora_have_old_libtool=no |
4585 | 13 | ]) | 13 | ]) |
4586 | 14 | AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ | 14 | AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ |
4588 | 15 | AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) | 15 | PANDORA_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) |
4589 | 16 | ]) | 16 | ]) |
4590 | 17 | 17 | ||
4591 | 18 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read | 18 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read |
4592 | 19 | 19 | ||
4593 | === modified file 'm4/pandora_optimize.m4' | |||
4594 | --- m4/pandora_optimize.m4 2009-12-24 17:19:53 +0000 | |||
4595 | +++ m4/pandora_optimize.m4 2011-04-16 05:39:23 +0000 | |||
4596 | @@ -1,5 +1,5 @@ | |||
4599 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4600 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4601 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4602 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4603 | 5 | 5 | ||
4604 | @@ -22,25 +22,21 @@ | |||
4605 | 22 | dnl with using AC_CC_STD_C99 above | 22 | dnl with using AC_CC_STD_C99 above |
4606 | 23 | CC="${CC} -std=gnu99" | 23 | CC="${CC} -std=gnu99" |
4607 | 24 | 24 | ||
4609 | 25 | AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}" | 25 | AM_CPPFLAGS="-g ${AM_CPPFLAGS}" |
4610 | 26 | 26 | ||
4611 | 27 | DEBUG_CFLAGS="-O0" | 27 | DEBUG_CFLAGS="-O0" |
4612 | 28 | DEBUG_CXXFLAGS="-O0" | 28 | DEBUG_CXXFLAGS="-O0" |
4613 | 29 | 29 | ||
4616 | 30 | OPTIMIZE_CFLAGS="-O3" | 30 | OPTIMIZE_CFLAGS="-O2" |
4617 | 31 | OPTIMIZE_CXXFLAGS="-O3" | 31 | OPTIMIZE_CXXFLAGS="-O2" |
4618 | 32 | ]) | 32 | ]) |
4619 | 33 | AS_IF([test "$INTELCC" = "yes"],[ | 33 | AS_IF([test "$INTELCC" = "yes"],[ |
4620 | 34 | dnl Once we can use a modern autoconf, we can replace the std=gnu99 here | ||
4621 | 35 | dnl with using AC_CC_STD_C99 above | ||
4622 | 36 | CC="${CC} -std=c99" | ||
4623 | 37 | |||
4624 | 38 | AM_CPPFLAGS="-g ${AM_CPPFLAGS}" | 34 | AM_CPPFLAGS="-g ${AM_CPPFLAGS}" |
4625 | 39 | 35 | ||
4626 | 40 | DEBUG_CFLAGS="-O0" | 36 | DEBUG_CFLAGS="-O0" |
4627 | 41 | DEBUG_CXXFLAGS="-O0" | 37 | DEBUG_CXXFLAGS="-O0" |
4628 | 42 | 38 | ||
4630 | 43 | OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static" | 39 | OPTIMIZE_CFLAGS="-xHOST -O2 -no-prec-div -static" |
4631 | 44 | OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}" | 40 | OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}" |
4632 | 45 | 41 | ||
4633 | 46 | ]) | 42 | ]) |
4634 | 47 | 43 | ||
4635 | === modified file 'm4/pandora_platform.m4' | |||
4636 | --- m4/pandora_platform.m4 2011-04-14 05:40:29 +0000 | |||
4637 | +++ m4/pandora_platform.m4 2011-04-16 05:39:23 +0000 | |||
4638 | @@ -23,7 +23,7 @@ | |||
4639 | 23 | 23 | ||
4640 | 24 | 24 | ||
4641 | 25 | case "$host_os" in | 25 | case "$host_os" in |
4643 | 26 | *solaris*|*freebsd*) | 26 | *solaris*) |
4644 | 27 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ | 27 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ |
4645 | 28 | CPPFLAGS="${CPPFLAGS} -I/usr/local/include" | 28 | CPPFLAGS="${CPPFLAGS} -I/usr/local/include" |
4646 | 29 | ]) | 29 | ]) |
4647 | @@ -32,6 +32,15 @@ | |||
4648 | 32 | LDFLAGS="${LDFLAGS} -L/usr/local/lib" | 32 | LDFLAGS="${LDFLAGS} -L/usr/local/lib" |
4649 | 33 | ]) | 33 | ]) |
4650 | 34 | ;; | 34 | ;; |
4651 | 35 | *freebsd*) | ||
4652 | 36 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ | ||
4653 | 37 | CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include" | ||
4654 | 38 | ]) | ||
4655 | 39 | |||
4656 | 40 | AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ | ||
4657 | 41 | LDFLAGS="${LDFLAGS} -L/usr/local/lib" | ||
4658 | 42 | ]) | ||
4659 | 43 | ;; | ||
4660 | 35 | esac | 44 | esac |
4661 | 36 | 45 | ||
4662 | 37 | PANDORA_OPTIMIZE_BITFIELD=1 | 46 | PANDORA_OPTIMIZE_BITFIELD=1 |
4663 | @@ -50,6 +59,7 @@ | |||
4664 | 50 | *solaris*) | 59 | *solaris*) |
4665 | 51 | TARGET_SOLARIS="true" | 60 | TARGET_SOLARIS="true" |
4666 | 52 | PANDORA_OPTIMIZE_BITFIELD=0 | 61 | PANDORA_OPTIMIZE_BITFIELD=0 |
4667 | 62 | AS_IF([test "x${USE_NLS}" = "xyes"],[LIBS="${LIBS} -lintl"]) | ||
4668 | 53 | AC_SUBST(TARGET_SOLARIS) | 63 | AC_SUBST(TARGET_SOLARIS) |
4669 | 54 | AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) | 64 | AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) |
4670 | 55 | ;; | 65 | ;; |
4671 | @@ -59,12 +69,29 @@ | |||
4672 | 59 | AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) | 69 | AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) |
4673 | 60 | AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) | 70 | AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) |
4674 | 61 | ;; | 71 | ;; |
4676 | 62 | *) | 72 | *mingw32*) |
4677 | 73 | TARGET_WINDOWS="true" | ||
4678 | 74 | AC_SUBST(TARGET_WINDOWS) | ||
4679 | 75 | AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows]) | ||
4680 | 76 | AC_DEFINE([WINVER], [WindowsXP], [Version of Windows]) | ||
4681 | 77 | AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work]) | ||
4682 | 78 | AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) | ||
4683 | 79 | AH_BOTTOM([ | ||
4684 | 80 | #ifndef HAVE_SYS_SOCKET_H | ||
4685 | 81 | # define SHUT_RD SD_RECEIVE | ||
4686 | 82 | # define SHUT_WR SD_SEND | ||
4687 | 83 | # define SHUT_RDWR SD_BOTH | ||
4688 | 84 | #endif | ||
4689 | 85 | ]) | ||
4690 | 86 | |||
4691 | 87 | LIBS="$LIBS -lwsock32 -lws2_32" | ||
4692 | 88 | AM_CFLAGS="${AM_CFLAGS} -I\${top_srcdir}/win32/mingw -I\${top_builddir}/win32/mingw -I\${top_srcdir}/win32 -I\${top_builddir}/win32" | ||
4693 | 63 | ;; | 89 | ;; |
4694 | 64 | esac | 90 | esac |
4695 | 91 | AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"]) | ||
4696 | 92 | AM_CONDITIONAL(TARGET_OSX, [test "x${TARGET_OSX}" = "xtrue"]) | ||
4697 | 65 | 93 | ||
4698 | 66 | AC_SUBST(PANDORA_OPTIMIZE_BITFIELD) | 94 | AC_SUBST(PANDORA_OPTIMIZE_BITFIELD) |
4699 | 67 | AM_CONDITIONAL(TARGET_OSX,[test "${TARGET_OSX}" = "yes"]) | ||
4700 | 68 | 95 | ||
4701 | 69 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) | 96 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
4702 | 70 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) | 97 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) |
4703 | 71 | 98 | ||
4704 | === modified file 'm4/pandora_plugins.m4' | |||
4705 | --- m4/pandora_plugins.m4 2010-04-06 00:33:06 +0000 | |||
4706 | +++ m4/pandora_plugins.m4 2011-04-16 05:39:23 +0000 | |||
4707 | @@ -1,5 +1,5 @@ | |||
4710 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4711 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4712 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4713 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4714 | 5 | dnl-------------------------------------------------------------------- | 5 | dnl-------------------------------------------------------------------- |
4715 | @@ -17,21 +17,30 @@ | |||
4716 | 17 | dnl get called probably during autoconf too, so it's important to protect | 17 | dnl get called probably during autoconf too, so it's important to protect |
4717 | 18 | dnl with test -f ... if the files exist, we don't have the chicken/egg | 18 | dnl with test -f ... if the files exist, we don't have the chicken/egg |
4718 | 19 | dnl problem and therefore don't need to do anything here | 19 | dnl problem and therefore don't need to do anything here |
4720 | 20 | m4_syscmd([python config/pandora-plugin > /dev/null]) | 20 | m4_syscmd([PYTHON=${PYTHON:-python} && $PYTHON config/pandora-plugin > /dev/null]) |
4721 | 21 | m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4]) | 21 | m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4]) |
4722 | 22 | 22 | ||
4723 | 23 | m4_sinclude(config/pandora-plugin.ac) | 23 | m4_sinclude(config/pandora-plugin.ac) |
4724 | 24 | 24 | ||
4725 | 25 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list | 25 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list |
4726 | 26 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` | 26 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` |
4728 | 27 | AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL") | 27 | pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'` |
4729 | 28 | pandora_builtin_load_list=`echo $pandora_builtin_load_list | sed 's/, *$//'` | ||
4730 | 29 | pandora_builtin_load_symbols_list=`echo $pandora_builtin_load_symbols_list | sed 's/, *$//'` | ||
4731 | 30 | AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL") | ||
4732 | 31 | AS_IF([test "x$pandora_builtin_load_symbols_list" = "x"], pandora_builtin_load_symbols_list="NULL") | ||
4733 | 28 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) | 32 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) |
4734 | 33 | AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list]) | ||
4735 | 34 | AC_SUBST([PANDORA_BUILTIN_LOAD_LIST],[$pandora_builtin_load_list]) | ||
4736 | 35 | AC_SUBST([PANDORA_BUILTIN_LOAD_SYMBOLS_LIST],[$pandora_builtin_load_symbols_list]) | ||
4737 | 29 | AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list]) | 36 | AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list]) |
4738 | 30 | m4_ifval(m4_normalize([$1]),[ | 37 | m4_ifval(m4_normalize([$1]),[ |
4739 | 31 | AC_CONFIG_FILES($*) | 38 | AC_CONFIG_FILES($*) |
4740 | 32 | ],[ | 39 | ],[ |
4742 | 33 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list], | 40 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],["$pandora_builtin_list"], |
4743 | 34 | [List of plugins to be built in]) | 41 | [List of plugins to be built in]) |
4744 | 42 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_SYMBOLS_LIST],["$pandora_builtin_symbols_list"], | ||
4745 | 43 | [List of builtin plugin symbols to be built in]) | ||
4746 | 35 | AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"], | 44 | AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"], |
4747 | 36 | [List of plugins that should be loaded on startup if no | 45 | [List of plugins that should be loaded on startup if no |
4748 | 37 | value is given for --plugin-load]) | 46 | value is given for --plugin-load]) |
4749 | 38 | 47 | ||
4750 | === modified file 'm4/pandora_print_callstack.m4' | |||
4751 | --- m4/pandora_print_callstack.m4 2010-01-13 10:48:24 +0000 | |||
4752 | +++ m4/pandora_print_callstack.m4 2011-04-16 05:39:23 +0000 | |||
4753 | @@ -1,5 +1,5 @@ | |||
4756 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4757 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4758 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4759 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4760 | 5 | 5 | ||
4761 | 6 | 6 | ||
4762 | === modified file 'm4/pandora_pthread.m4' | |||
4763 | --- m4/pandora_pthread.m4 2009-12-18 19:25:00 +0000 | |||
4764 | +++ m4/pandora_pthread.m4 2011-04-16 05:39:23 +0000 | |||
4765 | @@ -254,5 +254,5 @@ | |||
4766 | 254 | AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[ | 254 | AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[ |
4767 | 255 | AC_REQUIRE([PANDORA_HAVE_PTHREAD]) | 255 | AC_REQUIRE([PANDORA_HAVE_PTHREAD]) |
4768 | 256 | AS_IF([test "x$acx_pthread_ok" != "xyes"],[ | 256 | AS_IF([test "x$acx_pthread_ok" != "xyes"],[ |
4770 | 257 | AC_MSG_ERROR(could not find libpthread)]) | 257 | PANDORA_MSG_ERROR(could not find libpthread)]) |
4771 | 258 | ]) | 258 | ]) |
4772 | 259 | 259 | ||
4773 | === modified file 'm4/pandora_python3_devel.m4' | |||
4774 | --- m4/pandora_python3_devel.m4 2009-09-29 04:30:01 +0000 | |||
4775 | +++ m4/pandora_python3_devel.m4 2011-04-16 05:39:23 +0000 | |||
4776 | @@ -4,12 +4,12 @@ | |||
4777 | 4 | dnl pandora-build: A pedantic build system | 4 | dnl pandora-build: A pedantic build system |
4778 | 5 | dnl | 5 | dnl |
4779 | 6 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | 6 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4786 | 7 | dnl Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> | 7 | dnl Copyright (C) 2008 Sebastian Huber <sebastian-huber@web.de> |
4787 | 8 | dnl Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca> | 8 | dnl Copyright (C) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca> |
4788 | 9 | dnl Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> | 9 | dnl Copyright (C) 2008 Rafael Laboissiere <rafael@laboissiere.net> |
4789 | 10 | dnl Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za> | 10 | dnl Copyright (C) 2008 Andrew Collier <colliera@ukzn.ac.za> |
4790 | 11 | dnl Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org> | 11 | dnl Copyright (C) 2008 Matteo Settenvini <matteo@member.fsf.org> |
4791 | 12 | dnl Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org> | 12 | dnl Copyright (C) 2008 Horst Knorr <hk_classes@knoda.org> |
4792 | 13 | dnl | 13 | dnl |
4793 | 14 | dnl This program is free software: you can redistribute it and/or modify it | 14 | dnl This program is free software: you can redistribute it and/or modify it |
4794 | 15 | dnl under the terms of the GNU General Public License as published by the | 15 | dnl under the terms of the GNU General Public License as published by the |
4795 | @@ -76,7 +76,7 @@ | |||
4796 | 76 | AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]]) | 76 | AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]]) |
4797 | 77 | ]) | 77 | ]) |
4798 | 78 | AS_IF([test -z "$PYTHON3"],[ | 78 | AS_IF([test -z "$PYTHON3"],[ |
4800 | 79 | AC_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path]) | 79 | PANDORA_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path]) |
4801 | 80 | PYTHON3_VERSION="" | 80 | PYTHON3_VERSION="" |
4802 | 81 | ]) | 81 | ]) |
4803 | 82 | 82 | ||
4804 | @@ -92,7 +92,7 @@ | |||
4805 | 92 | AC_MSG_RESULT([yes]) | 92 | AC_MSG_RESULT([yes]) |
4806 | 93 | else | 93 | else |
4807 | 94 | AC_MSG_RESULT([no]) | 94 | AC_MSG_RESULT([no]) |
4809 | 95 | AC_MSG_ERROR([this package requires Python $1. | 95 | PANDORA_MSG_ERROR([this package requires Python $1. |
4810 | 96 | If you have it installed, but it isn't the default Python | 96 | If you have it installed, but it isn't the default Python |
4811 | 97 | interpreter in your system path, please pass the PYTHON3_VERSION | 97 | interpreter in your system path, please pass the PYTHON3_VERSION |
4812 | 98 | variable to configure. See ``configure --help'' for reference. | 98 | variable to configure. See ``configure --help'' for reference. |
4813 | @@ -110,7 +110,7 @@ | |||
4814 | 110 | AC_MSG_RESULT([yes]) | 110 | AC_MSG_RESULT([yes]) |
4815 | 111 | else | 111 | else |
4816 | 112 | AC_MSG_RESULT([no]) | 112 | AC_MSG_RESULT([no]) |
4818 | 113 | AC_MSG_ERROR([cannot import Python3 module "distutils". | 113 | PANDORA_MSG_ERROR([cannot import Python3 module "distutils". |
4819 | 114 | Please check your Python3 installation. The error was: | 114 | Please check your Python3 installation. The error was: |
4820 | 115 | $ac_python3_distutils_result]) | 115 | $ac_python3_distutils_result]) |
4821 | 116 | PYTHON3_VERSION="" | 116 | PYTHON3_VERSION="" |
4822 | 117 | 117 | ||
4823 | === modified file 'm4/pandora_sasl.m4' | |||
4824 | --- m4/pandora_sasl.m4 2009-12-18 18:02:39 +0000 | |||
4825 | +++ m4/pandora_sasl.m4 2011-04-16 05:39:23 +0000 | |||
4826 | @@ -1,5 +1,5 @@ | |||
4829 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4830 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4831 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4832 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4833 | 5 | 5 | ||
4834 | @@ -55,7 +55,7 @@ | |||
4835 | 55 | AC_DEFUN([PANDORA_REQUIRE_SASL],[ | 55 | AC_DEFUN([PANDORA_REQUIRE_SASL],[ |
4836 | 56 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) | 56 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) |
4837 | 57 | AS_IF([test "x${ac_cv_sasl}" = "xno"], | 57 | AS_IF([test "x${ac_cv_sasl}" = "xno"], |
4839 | 58 | AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}])) | 58 | PANDORA_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}])) |
4840 | 59 | ]) | 59 | ]) |
4841 | 60 | 60 | ||
4842 | 61 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[ | 61 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[ |
4843 | @@ -92,7 +92,7 @@ | |||
4844 | 92 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[ | 92 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[ |
4845 | 93 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) | 93 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) |
4846 | 94 | AS_IF([test "x${ac_cv_libsasl}" = "xno"], | 94 | AS_IF([test "x${ac_cv_libsasl}" = "xno"], |
4848 | 95 | AC_MSG_ERROR([libsasl is required for ${PACKAGE}])) | 95 | PANDORA_MSG_ERROR([libsasl is required for ${PACKAGE}])) |
4849 | 96 | ]) | 96 | ]) |
4850 | 97 | 97 | ||
4851 | 98 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[ | 98 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[ |
4852 | @@ -129,5 +129,5 @@ | |||
4853 | 129 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[ | 129 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[ |
4854 | 130 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) | 130 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) |
4855 | 131 | AS_IF([test "x${ac_cv_libsasl2}" = "xno"], | 131 | AS_IF([test "x${ac_cv_libsasl2}" = "xno"], |
4857 | 132 | AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}])) | 132 | PANDORA_MSG_ERROR([libsasl2 is required for ${PACKAGE}])) |
4858 | 133 | ]) | 133 | ]) |
4859 | 134 | 134 | ||
4860 | === modified file 'm4/pandora_shared_ptr.m4' | |||
4861 | --- m4/pandora_shared_ptr.m4 2009-12-18 18:02:39 +0000 | |||
4862 | +++ m4/pandora_shared_ptr.m4 2011-04-16 05:39:23 +0000 | |||
4863 | @@ -1,5 +1,5 @@ | |||
4866 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4867 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4868 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4869 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4870 | 5 | 5 | ||
4871 | 6 | 6 | ||
4872 | === modified file 'm4/pandora_stl_hash.m4' | |||
4873 | --- m4/pandora_stl_hash.m4 2010-04-06 00:33:06 +0000 | |||
4874 | +++ m4/pandora_stl_hash.m4 2011-04-16 05:39:23 +0000 | |||
4875 | @@ -1,3 +1,8 @@ | |||
4876 | 1 | # Copyright (C) 2008 Sun Microsystems, Inc. | ||
4877 | 2 | # This file is free software; Sun Microsystems, Inc. | ||
4878 | 3 | # gives unlimited permission to copy and/or distribute it, | ||
4879 | 4 | # with or without modifications, as long as this notice is preserved. | ||
4880 | 5 | |||
4881 | 1 | # We check two things: where the include file is for unordered_map, and | 6 | # We check two things: where the include file is for unordered_map, and |
4882 | 2 | # what namespace unordered_map lives in within that include file. We | 7 | # what namespace unordered_map lives in within that include file. We |
4883 | 3 | # include AC_COMPILE_IFELSE for all the combinations we've seen in the | 8 | # include AC_COMPILE_IFELSE for all the combinations we've seen in the |
4884 | @@ -83,7 +88,7 @@ | |||
4885 | 83 | AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[ | 88 | AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[ |
4886 | 84 | AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED]) | 89 | AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED]) |
4887 | 85 | AS_IF([test "x${pandora_has_unordered}" != "xyes"],[ | 90 | AS_IF([test "x${pandora_has_unordered}" != "xyes"],[ |
4889 | 86 | AC_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}. | 91 | PANDORA_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}. |
4890 | 87 | Implementations can be found in Recent versions of gcc and in boost]) | 92 | Implementations can be found in Recent versions of gcc and in boost]) |
4891 | 88 | ]) | 93 | ]) |
4892 | 89 | ]) | 94 | ]) |
4893 | 90 | 95 | ||
4894 | === modified file 'm4/pandora_vc_build.m4' | |||
4895 | --- m4/pandora_vc_build.m4 2010-04-06 00:33:06 +0000 | |||
4896 | +++ m4/pandora_vc_build.m4 2011-04-16 05:39:23 +0000 | |||
4897 | @@ -1,5 +1,5 @@ | |||
4900 | 1 | dnl Copyright (C) 2009 Sun Microsystems | 1 | dnl Copyright (C) 2009 Sun Microsystems, Inc. |
4901 | 2 | dnl This file is free software; Sun Microsystems | 2 | dnl This file is free software; Sun Microsystems, Inc. |
4902 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
4903 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
4904 | 5 | 5 | ||
4905 | @@ -36,7 +36,14 @@ | |||
4906 | 36 | ]) | 36 | ]) |
4907 | 37 | 37 | ||
4908 | 38 | AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ | 38 | AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ |
4910 | 39 | m4_syscmd(PANDORA_TEST_VC_DIR [ | 39 | m4_syscmd(PANDORA_TEST_VC_DIR |
4911 | 40 | m4_if(PCT_NO_VC_CHANGELOG,yes,[ | ||
4912 | 41 | vc_changelog=no | ||
4913 | 42 | ],[ | ||
4914 | 43 | vc_changelog=yes | ||
4915 | 44 | ]) | ||
4916 | 45 | |||
4917 | 46 | [ | ||
4918 | 40 | 47 | ||
4919 | 41 | PANDORA_RELEASE_DATE=`date +%Y.%m` | 48 | PANDORA_RELEASE_DATE=`date +%Y.%m` |
4920 | 42 | PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m` | 49 | PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m` |
4921 | @@ -53,6 +60,18 @@ | |||
4922 | 53 | PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}" | 60 | PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}" |
4923 | 54 | PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1` | 61 | PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1` |
4924 | 55 | PANDORA_VC_BRANCH=`bzr nick` | 62 | PANDORA_VC_BRANCH=`bzr nick` |
4925 | 63 | PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1` | ||
4926 | 64 | PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' ' | tail -1` | ||
4927 | 65 | if test "x${vc_changelog}" = "xyes"; then | ||
4928 | 66 | bzr log --gnu > ChangeLog | ||
4929 | 67 | fi | ||
4930 | 68 | fi | ||
4931 | 69 | elif test "${pandora_building_from_git}" = "yes"; then | ||
4932 | 70 | echo "# Grabbing changelog and version information from git" | ||
4933 | 71 | PANDORA_GIT_REVID=`git --no-pager log --max-count=1 | cut -f2 -d' ' | head -1` | ||
4934 | 72 | if test "x$PANDORA_GIT_REVID" != "x${PANDORA_VC_REVNO}" ; then | ||
4935 | 73 | PANDORA_VC_REVID="${PANDORA_GIT_REVID}" | ||
4936 | 74 | PANDORA_VC_BRANCH=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '` | ||
4937 | 56 | fi | 75 | fi |
4938 | 57 | fi | 76 | fi |
4939 | 58 | 77 | ||
4940 | @@ -60,17 +79,21 @@ | |||
4941 | 60 | mkdir -p config | 79 | mkdir -p config |
4942 | 61 | fi | 80 | fi |
4943 | 62 | 81 | ||
4945 | 63 | cat > config/pandora_vc_revinfo.tmp <<EOF | 82 | if test "${pandora_building_from_bzr}" = "yes" -o ! -f config/pandora_vc_revinfo ; then |
4946 | 83 | cat > config/pandora_vc_revinfo.tmp <<EOF | ||
4947 | 64 | PANDORA_VC_REVNO=${PANDORA_VC_REVNO} | 84 | PANDORA_VC_REVNO=${PANDORA_VC_REVNO} |
4948 | 65 | PANDORA_VC_REVID=${PANDORA_VC_REVID} | 85 | PANDORA_VC_REVID=${PANDORA_VC_REVID} |
4949 | 66 | PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH} | 86 | PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH} |
4950 | 87 | PANDORA_VC_TAG=${PANDORA_VC_TAG} | ||
4951 | 88 | PANDORA_VC_LATEST_TAG=${PANDORA_VC_LATEST_TAG} | ||
4952 | 67 | PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE} | 89 | PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE} |
4953 | 68 | PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE} | 90 | PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE} |
4954 | 69 | EOF | 91 | EOF |
4957 | 70 | if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then | 92 | if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then |
4958 | 71 | mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo | 93 | mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo |
4959 | 94 | fi | ||
4960 | 95 | rm -f config/pandora_vc_revinfo.tmp | ||
4961 | 72 | fi | 96 | fi |
4962 | 73 | rm -f config/pandora_vc_revinfo.tmp | ||
4963 | 74 | ]) | 97 | ]) |
4964 | 75 | ]) | 98 | ]) |
4965 | 76 | 99 | ||
4966 | @@ -88,6 +111,10 @@ | |||
4967 | 88 | _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo) | 111 | _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo) |
4968 | 89 | _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH], | 112 | _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH], |
4969 | 90 | ${srcdir}/config/pandora_vc_revinfo) | 113 | ${srcdir}/config/pandora_vc_revinfo) |
4970 | 114 | _PANDORA_READ_FROM_FILE([PANDORA_VC_TAG], | ||
4971 | 115 | ${srcdir}/config/pandora_vc_revinfo) | ||
4972 | 116 | _PANDORA_READ_FROM_FILE([PANDORA_VC_LATEST_TAG], | ||
4973 | 117 | ${srcdir}/config/pandora_vc_revinfo) | ||
4974 | 91 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE], | 118 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE], |
4975 | 92 | ${srcdir}/config/pandora_vc_revinfo) | 119 | ${srcdir}/config/pandora_vc_revinfo) |
4976 | 93 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE], | 120 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE], |
4977 | @@ -99,8 +126,25 @@ | |||
4978 | 99 | PANDORA_RELEASE_COMMENT="trunk" | 126 | PANDORA_RELEASE_COMMENT="trunk" |
4979 | 100 | ]) | 127 | ]) |
4980 | 101 | 128 | ||
4983 | 102 | PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}" | 129 | AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[ |
4984 | 103 | PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}" | 130 | PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}" |
4985 | 131 | changequote(<<, >>)dnl | ||
4986 | 132 | PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'` | ||
4987 | 133 | changequote([, ])dnl | ||
4988 | 134 | ],[ | ||
4989 | 135 | AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[ | ||
4990 | 136 | PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}" | ||
4991 | 137 | changequote(<<, >>)dnl | ||
4992 | 138 | PANDORA_RELEASE_ID=`echo ${PANDORA_VC_LATEST_TAG} | sed 's/[^0-9]//g'` | ||
4993 | 139 | changequote([, ])dnl | ||
4994 | 140 | ],[ | ||
4995 | 141 | PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}" | ||
4996 | 142 | changequote(<<, >>)dnl | ||
4997 | 143 | PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_DATE} | sed 's/[^0-9]//g'` | ||
4998 | 144 | changequote([, ])dnl | ||
4999 | 145 | ]) | ||
5000 | 146 | ]) |
The diff has been truncated for viewing.