Merge lp:~mordred/gearmand/update-build into lp:gearmand/1.0

Proposed by Monty Taylor on 2011-04-16
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
Reviewer Review Type Date Requested Status
Gearman-developers 2011-04-16 Pending
Review via email: mp+57985@code.launchpad.net

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

Subscribers

People subscribed via source and target branches