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

Proposed by Monty Taylor
Status: Merged
Merge reported by: Brian Aker
Merged at revision: not available
Proposed branch: lp:~mordred/gearmand/update-build
Merge into: lp:gearmand/1.0
Diff against target: 5832 lines (+3766/-372)
108 files modified
.quickly (+5/-0)
bin/arguments.cc (+3/-1)
bin/arguments.h (+3/-0)
bin/client.h (+2/-1)
bin/function.cc (+4/-3)
bin/worker.h (+2/-1)
config/autorun.sh (+3/-3)
config/lcov.am (+42/-0)
config/pandora-plugin (+752/-0)
configure.ac (+1/-1)
libgearman-server/byte.h (+2/-1)
libgearman-server/plugins/protocol/http/protocol.cc (+2/-1)
libgearman-server/plugins/queue/drizzle/include.am (+3/-0)
libgearman-server/plugins/queue/drizzle/queue.cc (+14/-1)
libgearman-server/plugins/queue/libmemcached/queue.cc (+1/-1)
libgearman-server/plugins/queue/postgres/queue.cc (+6/-1)
libgearman-server/plugins/queue/sqlite/queue.cc (+12/-2)
libgearman-server/plugins/queue/tokyocabinet/queue.cc (+6/-1)
libgearman/client.cc (+27/-26)
libgearman/connection.cc (+22/-21)
libgearman/job.cc (+3/-3)
libgearman/task.cc (+1/-1)
libgearman/universal.cc (+4/-4)
libgearman/worker.cc (+15/-14)
libtest/test.h (+4/-0)
m4/iconv.m4 (+214/-0)
m4/pandora_64bit.m4 (+5/-5)
m4/pandora_bison.m4 (+33/-0)
m4/pandora_canonical.m4 (+16/-14)
m4/pandora_check_compiler_version.m4 (+2/-2)
m4/pandora_check_cxx_standard.m4 (+3/-3)
m4/pandora_cinttypes.m4 (+5/-0)
m4/pandora_compile_stdcxx_0x.m4 (+103/-0)
m4/pandora_cstdint.m4 (+5/-0)
m4/pandora_cxx_demangle.m4 (+2/-2)
m4/pandora_drizzle_build.m4 (+18/-47)
m4/pandora_enable_dtrace.m4 (+37/-20)
m4/pandora_ensure_gcc_version.m4 (+41/-18)
m4/pandora_extensions.m4 (+2/-2)
m4/pandora_fdatasync.m4 (+2/-2)
m4/pandora_flex.m4 (+33/-0)
m4/pandora_have_better_malloc.m4 (+2/-4)
m4/pandora_have_boost.m4 (+93/-0)
m4/pandora_have_gcc_atomics.m4 (+2/-2)
m4/pandora_have_libaio.m4 (+56/-0)
m4/pandora_have_libavahi.m4 (+3/-3)
m4/pandora_have_libbdb.m4 (+3/-3)
m4/pandora_have_libboost_date_time.m4 (+46/-0)
m4/pandora_have_libboost_filesystem.m4 (+48/-0)
m4/pandora_have_libboost_iostreams.m4 (+49/-0)
m4/pandora_have_libboost_options.m4 (+47/-0)
m4/pandora_have_libboost_regex.m4 (+54/-0)
m4/pandora_have_libboost_test.m4 (+45/-0)
m4/pandora_have_libboost_thread.m4 (+54/-0)
m4/pandora_have_libcassandra.m4 (+1/-1)
m4/pandora_have_libcurl.m4 (+62/-0)
m4/pandora_have_libdl.m4 (+3/-3)
m4/pandora_have_libdrizzle.m4 (+13/-4)
m4/pandora_have_libevent.m4 (+3/-3)
m4/pandora_have_libgearman.m4 (+3/-3)
m4/pandora_have_libgtest.m4 (+47/-0)
m4/pandora_have_libhaildb.m4 (+43/-0)
m4/pandora_have_libhashkit.m4 (+42/-0)
m4/pandora_have_libldap.m4 (+73/-0)
m4/pandora_have_libmemcached.m4 (+21/-45)
m4/pandora_have_libmysqlclient.m4 (+5/-5)
m4/pandora_have_libndbclient.m4 (+80/-0)
m4/pandora_have_libpcre.m4 (+73/-0)
m4/pandora_have_libpq.m4 (+3/-3)
m4/pandora_have_libpqxx.m4 (+44/-0)
m4/pandora_have_libreadline.m4 (+3/-3)
m4/pandora_have_libsqlite3.m4 (+3/-3)
m4/pandora_have_libtokyocabinet.m4 (+3/-3)
m4/pandora_have_libuuid.m4 (+3/-3)
m4/pandora_have_libvbucket.m4 (+40/-0)
m4/pandora_have_libxml2.m4 (+3/-3)
m4/pandora_have_libz.m4 (+3/-3)
m4/pandora_have_protobuf.m4 (+6/-4)
m4/pandora_have_sasl.m4 (+133/-0)
m4/pandora_have_thrift.m4 (+1/-1)
m4/pandora_header_assert.m4 (+2/-2)
m4/pandora_header_stdcxx_98.m4 (+83/-0)
m4/pandora_intltool.m4 (+225/-0)
m4/pandora_libtool.m4 (+3/-3)
m4/pandora_optimize.m4 (+6/-10)
m4/pandora_platform.m4 (+30/-3)
m4/pandora_plugins.m4 (+14/-5)
m4/pandora_print_callstack.m4 (+2/-2)
m4/pandora_pthread.m4 (+1/-1)
m4/pandora_python3_devel.m4 (+9/-9)
m4/pandora_sasl.m4 (+5/-5)
m4/pandora_shared_ptr.m4 (+2/-2)
m4/pandora_stl_hash.m4 (+6/-1)
m4/pandora_vc_build.m4 (+53/-9)
m4/pandora_version.m4 (+2/-2)
m4/pandora_visibility.m4 (+14/-4)
m4/pandora_warnings.m4 (+1/-1)
m4/pandora_with_lua.m4 (+55/-0)
m4/pandora_with_memcached.m4 (+3/-3)
m4/pandora_with_php.m4 (+1/-1)
m4/pandora_with_python.m4 (+1/-1)
m4/pandora_with_python3.m4 (+1/-1)
m4/pandora_with_valgrind.m4 (+17/-0)
m4/po.m4 (+449/-0)
m4/progtest.m4 (+92/-0)
util/instance.h (+5/-1)
util/operation.h (+6/-1)
util/pidfile.cc (+2/-1)
To merge this branch: bzr merge lp:~mordred/gearmand/update-build
Reviewer Review Type Date Requested Status
Gearman-developers 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
=== added file '.quickly'
--- .quickly 1970-01-01 00:00:00 +0000
+++ .quickly 2011-04-16 05:39:23 +0000
@@ -0,0 +1,5 @@
1project = gearmand
2version = 0.4.2
3template = pandora-build
4project-type = application
5pandora-version = 0.176
06
=== modified file 'bin/arguments.cc'
--- bin/arguments.cc 2011-04-13 04:12:34 +0000
+++ bin/arguments.cc 2011-04-16 05:39:23 +0000
@@ -26,6 +26,7 @@
26{26{
2727
28Args::Args(int p_argc, char *p_argv[]) :28Args::Args(int p_argc, char *p_argv[]) :
29 _functions(),
29 _host(NULL),30 _host(NULL),
30 _port(0),31 _port(0),
31 _count(0),32 _count(0),
@@ -41,7 +42,8 @@
41 _priority(GEARMAN_JOB_PRIORITY_NORMAL),42 _priority(GEARMAN_JOB_PRIORITY_NORMAL),
42 _timeout(-1),43 _timeout(-1),
43 argv(p_argv),44 argv(p_argv),
44 _error(0)45 _error(0),
46 _pid_file("")
45{47{
46 init(p_argc);48 init(p_argc);
47}49}
4850
=== modified file 'bin/arguments.h'
--- bin/arguments.h 2011-03-03 07:48:59 +0000
+++ bin/arguments.h 2011-04-16 05:39:23 +0000
@@ -162,6 +162,9 @@
162 {162 {
163 _functions.push_back(Function(name));163 _functions.push_back(Function(name));
164 }164 }
165
166 Args(const Args&);
167 Args& operator=(const Args&);
165};168};
166169
167} // namespace gearman_client170} // namespace gearman_client
168171
=== modified file 'bin/client.h'
--- bin/client.h 2011-03-08 20:32:44 +0000
+++ bin/client.h 2011-04-16 05:39:23 +0000
@@ -40,7 +40,8 @@
40class Client40class Client
41{41{
42public:42public:
43 Client()43 Client() :
44 _client()
44 {45 {
45 if (gearman_client_create(&_client) == NULL)46 if (gearman_client_create(&_client) == NULL)
46 {47 {
4748
=== modified file 'bin/function.cc'
--- bin/function.cc 2011-03-03 07:48:59 +0000
+++ bin/function.cc 2011-04-16 05:39:23 +0000
@@ -14,10 +14,11 @@
1414
15namespace gearman_client15namespace gearman_client
16{16{
17Function::Function(const char *name_arg)17Function::Function(const char *name_arg) :
18 _name(),
19 _task(),
20 _buffer()
18{21{
19 memset(&_task, 0, sizeof(gearman_task_st));
20
21 // copy the name into the _name vector22 // copy the name into the _name vector
22 size_t length= strlen(name_arg);23 size_t length= strlen(name_arg);
23 _name.resize(length +1);24 _name.resize(length +1);
2425
=== modified file 'bin/worker.h'
--- bin/worker.h 2011-03-08 20:32:44 +0000
+++ bin/worker.h 2011-04-16 05:39:23 +0000
@@ -40,7 +40,8 @@
40class Worker40class Worker
41{41{
42public:42public:
43 Worker()43 Worker() :
44 _worker()
44 {45 {
45 if (gearman_worker_create(&_worker) == NULL)46 if (gearman_worker_create(&_worker) == NULL)
46 {47 {
4748
=== modified file 'config/autorun.sh'
--- config/autorun.sh 2009-12-18 18:02:39 +0000
+++ config/autorun.sh 2011-04-16 05:39:23 +0000
@@ -1,7 +1,7 @@
1#!/bin/sh1#!/bin/sh
2#2#
3# Copyright (c) 2006 Jan Kneschke3# Copyright (C) 2006 Jan Kneschke
4# Copyright (c) 2009 Sun Microsystems4# Copyright (C) 2009 Sun Microsystems, Inc.
5# All rights reserved.5# All rights reserved.
6# 6#
7# Redistribution and use in source and binary forms, with or without7# Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
35LIBTOOLIZE_FLAGS=" --automake --copy --force"35LIBTOOLIZE_FLAGS=" --automake --copy --force"
36# --add-missing instructs automake to install missing auxiliary files36# --add-missing instructs automake to install missing auxiliary files
37# and --force to overwrite them if they already exist37# and --force to overwrite them if they already exist
38AUTOMAKE_FLAGS="--add-missing --copy --force"38AUTOMAKE_FLAGS="--add-missing --copy --force --foreign"
39ACLOCAL_FLAGS="-I m4"39ACLOCAL_FLAGS="-I m4"
4040
41ARGV0=$041ARGV0=$0
4242
=== added file 'config/lcov.am'
--- config/lcov.am 1970-01-01 00:00:00 +0000
+++ config/lcov.am 2011-04-16 05:39:23 +0000
@@ -0,0 +1,42 @@
1# Copyright (C) 2010 Hartmut Holzgraefe
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; version 2 of the License.
6#
7# This program is distributed in the hope that it will be useful,
8# but WITHOUT ANY WARRANTY; without even the implied warranty of
9# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10# GNU General Public License for more details.
11#
12# You should have received a copy of the GNU General Public License
13# along with this program; if not, write to the Free Software
14# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15
16LCOV = lcov
17LCOV_GENHTML = genhtml
18
19lcov: lcov-html
20
21lcov-test: lcov-clean-data test
22
23drizzle_lcov.info: lcov-test
24 @echo "Generating $@"
25 $(LCOV) --directory . --capture --base-directory . --output-file $@
26 $(LCOV) --remove $@ '/usr/include/*' --output-file $@
27 $(LCOV) --remove $@ '/usr/local/include/*' --output-file $@
28 @echo
29
30lcov-html: drizzle_lcov.info
31 @echo "Generating lcov HTML"
32 @$(LCOV_GENHTML) --legend --output-directory lcov_html/ --title "Drizzle Code Coverage" $<
33
34lcov-clean:
35 rm -f drizzle_lcov.info
36 rm -rf lcov_data/
37 rm -rf lcov_html/
38
39lcov-clean-data:
40 @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
41
42
043
=== added file 'config/pandora-plugin'
--- config/pandora-plugin 1970-01-01 00:00:00 +0000
+++ config/pandora-plugin 2011-04-16 05:39:23 +0000
@@ -0,0 +1,752 @@
1#!/usr/bin/python
2
3# Copyright (C) 2009 Sun Microsystems, Inc.
4# Copyright (C) 2010, 2011 Monty Taylor
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19pandora_plugin_file = 'config/pandora-plugin.ini'
20
21# Find plugins in the tree and add them to the build system
22
23import ConfigParser, os, sys
24import datetime, time
25import subprocess
26
27plugin_am_file=None
28plugin_ac_file=None
29plugin_doc_index=None
30
31class ChangeProtectedFile(object):
32
33 def __init__(self, fname):
34 self.bogus_file= False
35 self.real_fname= fname
36 self.new_fname= "%s.new" % fname
37 try:
38 self.new_file= open(self.new_fname,'w+')
39 except IOError:
40 self.bogus_file= True
41
42 def write(self, text):
43 if not self.bogus_file:
44 self.new_file.write(text)
45
46 # We've written all of this out into .new files, now we only copy them
47 # over the old ones if they are different, so that we don't cause
48 # unnecessary recompiles
49 def close(self):
50 """Return True if the file had changed."""
51 if self.bogus_file:
52 return
53 self.new_file.seek(0)
54 new_content = self.new_file.read()
55 self.new_file.close()
56 try:
57 old_file = file(self.real_fname, 'r')
58 old_content = old_file.read()
59 old_file.close()
60 except IOError:
61 old_content = None
62 if new_content != old_content:
63 if old_content != None:
64 os.unlink(self.real_fname)
65 os.rename(self.new_fname, self.real_fname)
66 return True
67 else:
68 try:
69 os.unlink(self.new_fname)
70 except:
71 pass
72
73
74def write_external_configure(plugin, plugin_file):
75 """Write the initial bits of the configure.ac file"""
76 if not os.path.exists('m4'):
77 os.mkdir('m4')
78 plugin_file.write("""
79AC_PREREQ(2.59)dnl Minimum Autoconf version required.
80AC_INIT([%(name)s],[%(version)s],[%(url)s])
81AC_CONFIG_SRCDIR([%(main_source)s])
82AC_CONFIG_AUX_DIR(config)
83
84PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42,skip-visibility)
85
86PANDORA_REQUIRE_LIBPROTOBUF
87PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
88PANDORA_REQUIRE_PROTOC
89
90AC_LANG_PUSH(C++)
91PANDORA_REQUIRE_PTHREAD
92PANDORA_REQUIRE_LIBDL
93AC_LANG_POP
94
95PANDORA_USE_BETTER_MALLOC
96
97PANDORA_DRIZZLE_BUILD
98""" % plugin)
99
100 write_plugin_ac(plugin, plugin_file)
101
102 plugin_file.write("""
103AC_CONFIG_FILES(Makefile)
104
105AC_OUTPUT
106
107echo "---"
108echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
109echo ""
110echo " * Installation prefix: $prefix"
111echo " * System type: $host_vendor-$host_os"
112echo " * Host CPU: $host_cpu"
113echo " * C Compiler: $CC_VERSION"
114echo " * C++ Compiler: $CXX_VERSION"
115echo " * Debug enabled: $with_debug"
116echo " * Warnings as failure: $ac_cv_warnings_as_errors"
117echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
118echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
119echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
120echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"
121echo ""
122echo "---"
123
124 """ % plugin)
125
126def write_external_makefile(plugin, plugin_file):
127
128 plugin_file.write("""
129ACLOCAL_AMFLAGS = -I m4 --force
130VERSION=$(PANDORA_RELEASE_VERSION)
131
132pkgplugindir=%(pkgplugindir)s
133EXTRA_DIST = plugin.ini
134
135noinst_HEADERS=
136nobase_include_HEADERS=
137nobase_pkginclude_HEADERS=
138check_PROGRAMS=
139noinst_LTLIBRARIES=
140bin_PROGRAMS=
141
142
143""" % plugin)
144 if plugin['headers'] != "":
145 plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin)
146 if plugin['install_headers'] != "":
147 plugin_file.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
148 if plugin['testsuite']:
149 if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
150 plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
151 plugin_file.write("""
152pkgplugin_LTLIBRARIES=%(libname)s.la
153%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
154%(libname)s_la_LIBADD=%(libs)s
155%(libname)s_la_DEPENDENCIES=%(libs)s
156%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
157%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
158%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
159%(libname)s_la_SOURCES=%(sources)s
160check_PROGRAMS += %(tests)s
161""" % plugin)
162 plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
163 if os.path.exists(plugin_am_file):
164 plugin_file.write('include %s\n' % plugin_am_file)
165
166def write_external_plugin():
167 """Return True if the plugin had changed."""
168 plugin = read_plugin_ini('.')
169 expand_plugin_ini(plugin)
170 plugin_file = ChangeProtectedFile('configure.ac')
171 write_external_configure(plugin, plugin_file)
172 result = plugin_file.close()
173 plugin_file = ChangeProtectedFile('Makefile.am')
174 write_external_makefile(plugin, plugin_file)
175 # Write some stub configure.ac and Makefile.am files that include the above
176 result = plugin_file.close() or result
177 return result
178
179def write_plugin(plugin, plugin_ini_list):
180 # Since this function is recursive, make sure we're not already in it.
181 if plugin.has_key('writing_status'):
182 if plugin['writing_status'] == 'done':
183 return
184 else:
185 print "Dependency loop detected with %s" % plugin['name']
186 exit(1)
187
188 plugin['writing_status'] = 'dependencies'
189
190 # Write all dependencies first to get around annoying automake bug
191 for dependency in plugin['dependency_list']:
192 found = False
193 for find_plugin in plugin_ini_list:
194 if find_plugin['module_name'] == dependency:
195 found = True
196 write_plugin(find_plugin, plugin_ini_list)
197 break
198 if found is False:
199 print "Could not find dependency %s: %s" % (plugin['name'], dependency)
200 exit(1)
201
202 write_plugin_ac(plugin, plugin_ac_file)
203 write_plugin_am(plugin, plugin_am_file)
204 write_plugin_docs(plugin, plugin_doc_index, plugin_am_file)
205 plugin['writing_status'] = 'done'
206
207def write_plugin_docs(plugin, doc_index, plugin_am):
208 if plugin['docs'] is not None and os.path.isdir("docs/plugins"):
209 if not os.path.exists(os.path.join("docs/plugins",plugin["name"])):
210 os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"]))
211 doc_index.write("""
212 %(name)s/index""" % plugin)
213 plugin_am.write("""
214EXTRA_DIST+=${top_srcdir}/docs/plugins/%(name)s/*.rst
215""" % plugin)
216
217def write_plugin_ac(plugin, plugin_ac):
218 #
219 # Write plugin config instructions into plugin.ac file.
220 #
221 plugin_ac_file=os.path.join(plugin['rel_path'],'plugin.ac')
222 plugin_m4_dir=os.path.join(plugin['rel_path'],'m4')
223 plugin_m4_files=[]
224 if os.path.exists(plugin_m4_dir) and os.path.isdir(plugin_m4_dir):
225 for m4_file in os.listdir(plugin_m4_dir):
226 if os.path.splitext(m4_file)[-1] == '.m4':
227 plugin_m4_files.append(os.path.join(plugin['rel_path'], m4_file))
228 plugin_ac.write("""
229dnl Config for %(title)s
230""" % plugin)
231 for m4_file in plugin_m4_files:
232 plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
233 plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
234
235 plugin_ac.write("""
236AC_ARG_WITH([%(name_with_dashes)s-plugin],[
237dnl indented wierd to make the help output correct
238AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(enabled)s@:>@])
239AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s])
240 ],[
241 with_%(name)s_plugin="$withval"
242 AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
243 requested_%(name)s_plugin="yes"
244 ],[
245 requested_%(name)s_plugin="no"
246 ])
247 ],[
248 with_%(name)s_plugin="%(enabled)s"
249 requested_%(name)s_plugin="no"
250 ])
251AC_ARG_WITH([static-%(name_with_dashes)s-plugin],[
252AS_HELP_STRING([--with-static-%(name_with_dashes)s-plugin],[Build Archive Storage Engine. @<:@default=%(static_yesno)s@:>@])
253AS_HELP_STRING([--without-static-%(name_with_dashes)s-plugin],[Disable building Archive Storage Engine])
254 ],[
255 with_static_%(name)s_plugin=${withval}
256 ],[
257 with_static_%(name)s_plugin=%(static_yesno)s
258])
259AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
260 shared_%(name)s_plugin=no
261 ],[
262 shared_%(name)s_plugin=yes
263])
264AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
265dnl indented wierd to make the help output correct
266AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@])
267AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable loading %(title)s by default.])
268 ],
269 [enable_%(name)s_plugin="$enableval"],
270 [enable_%(name)s_plugin=%(default_yesno)s])
271
272""" % plugin)
273 if os.path.exists(plugin_ac_file):
274 plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file)
275 # The plugin author has specified some check to make to determine
276 # if the plugin can be built. If the plugin is turned on and this
277 # check fails, then configure should error out. If the plugin is not
278 # turned on, then the normal conditional build stuff should just let
279 # it silently not build
280 if plugin['has_build_conditional']:
281 plugin_ac.write("""
282AS_IF([test %(build_conditional)s],
283 [], dnl build_conditional can only negate
284 [
285 AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"],
286 [AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])])
287 with_%(name)s_plugin=no
288 ])
289
290""" % plugin)
291 if not plugin['unconditional']:
292 plugin_ac.write("""
293AM_CONDITIONAL([%(static_build_conditional_tag)s],
294 [test %(build_conditional)s -a ! %(shared_build)s])
295AM_CONDITIONAL([%(shared_build_conditional_tag)s],
296 [test %(build_conditional)s -a %(shared_build)s])
297AM_CONDITIONAL([%(build_conditional_tag)s],
298 [test %(build_conditional)s])
299 """ % plugin)
300
301 plugin_ac.write("""
302AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
303""" % plugin)
304 if plugin['testsuite']:
305 plugin_ac.write("""
306 pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
307 """ % plugin)
308 plugin_ac.write("""
309 AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
310
311 AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
312 pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}"
313 pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}"
314 PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
315 ])
316 pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
317 pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
318 pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
319 ],[
320 AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
321 pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
322 ])
323 ])
324 """ % plugin)
325 plugin_ac.write("])\n")
326
327def fix_file_paths(plugin, files):
328 # TODO: determine path to plugin dir relative to top_srcdir... append it to
329 # source files if they don't already have it
330 new_files=""
331 if plugin['plugin_dir'] != ".":
332 for file in files.split():
333 if not file.startswith(plugin['rel_path']):
334 file= os.path.join(plugin['rel_path'], file)
335 new_files= "%s %s" % (new_files, file)
336 else:
337 new_files= " ".join(plugin['sources'].split())
338 if new_files != "":
339 return new_files
340 return files
341
342def expand_plugin_ini(plugin):
343 if plugin['name'] == "**OUT-OF-TREE**":
344 print "Out of tree plugins require the name field to be specified in plugin.ini"
345 sys.exit(1)
346
347 if plugin['plugin_dir'] == ".":
348 plugin['rel_path']= plugin['plugin_dir']
349 plugin['unconditional']=True
350 else:
351 plugin['rel_path']= plugin['plugin_dir'][len(config['top_srcdir'])+len(os.path.sep):]
352 plugin['unconditional']=False
353
354 plugin['sources']= fix_file_paths(plugin, plugin['sources'])
355 plugin['main_source']= plugin['sources'].split()[0]
356 plugin['headers']= fix_file_paths(plugin, plugin['headers'])
357 plugin['install_headers']= fix_file_paths(plugin, plugin['install_headers'])
358 plugin['tests']= fix_file_paths(plugin, plugin['tests'])
359
360 # Make a yes/no version for autoconf help messages
361 if plugin['load_by_default']:
362 plugin['default_yesno']="yes"
363 else:
364 plugin['default_yesno']="no"
365
366 if plugin.has_key('extra_dist'):
367 plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
368
369
370 if plugin['static']:
371 plugin['static_yesno']="yes"
372 else:
373 plugin['static_yesno']="no"
374 plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
375 plugin['shared_build_conditional_tag']= "BUILD_%s_PLUGIN_SHARED" % plugin['name'].upper()
376 plugin['static_build_conditional_tag']= "BUILD_%s_PLUGIN_STATIC" % plugin['name'].upper()
377 plugin['name_with_dashes']= plugin['name'].replace('_','-')
378 if plugin.has_key('build_conditional'):
379 plugin['has_build_conditional']=True
380 plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes" -a %(build_conditional)s' % plugin
381 else:
382 plugin['has_build_conditional']=False
383 plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
384 plugin['shared_build']='"x${shared_%(name)s_plugin}" = "xyes"' %plugin
385
386 if plugin['install']:
387 plugin['library_type']= 'pkgplugin'
388 else:
389 plugin['library_type']= 'noinst'
390
391def find_testsuite(plugin_dir):
392 for testdir in ['drizzle-tests','tests']:
393 if os.path.isdir(os.path.join(plugin_dir,testdir)):
394 return testdir
395 if os.path.isdir(os.path.join('tests','suite',os.path.basename(plugin_dir))):
396 return ""
397 return None
398
399def find_docs(plugin_dir):
400 if os.path.isfile(os.path.join(plugin_dir, "docs", "index.rst")):
401 return os.path.join(plugin_dir, "docs")
402
403def read_plugin_ini(plugin_dir):
404 sources_default=""
405 if plugin_dir == ".":
406 plugin_name="**OUT-OF-TREE**"
407 module_name="**OUT-OF-TREE**"
408 else:
409 sources_default="%s.cc" % os.path.basename(plugin_dir)
410 plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:]
411 module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator'])
412 plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator'])
413
414
415 plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname'])
416 plugin_defaults= dict(sources=sources_default,
417 headers="",
418 install_headers="",
419 cflags="",
420 cppflags="",
421 cxxflags="",
422 libs="",
423 ldflags="",
424 author="",
425 title="",
426 description="",
427 license="PLUGIN_LICENSE_GPL",
428 name=plugin_name,
429 module_name=module_name,
430 load_by_default=config['default_load_by_default'],
431 disabled="False",
432 static="False",
433 dependencies="",
434 dependency_aliases="",
435 tests="",
436 install=config['default_install'])
437 parser=ConfigParser.ConfigParser(defaults= plugin_defaults)
438 parser.read(plugin_file)
439 plugin=dict(parser.items('plugin'))
440 plugin['plugin_dir'] = plugin_dir
441 if plugin_dir == '.':
442 if not plugin.has_key('url'):
443 print "External Plugins are required to specifiy a url"
444 plugin['url']= 'http://launchpad.net/%(name)s' % plugin
445 sys.exit(1)
446 if plugin_dir == '.' and not plugin.has_key('version'):
447 print "External Plugins are required to specifiy a version"
448 sys.exit(1)
449 if not plugin.has_key('version'):
450 plugin['version'] = config['default_plugin_version']
451 if plugin.has_key('load_by_default'):
452 plugin['load_by_default']=parser.getboolean('plugin','load_by_default')
453 if plugin.has_key('disabled'):
454 plugin['disabled']=parser.getboolean('plugin','disabled')
455 if plugin['disabled']:
456 plugin['enabled']="no"
457 else:
458 plugin['enabled']="yes"
459 if plugin.has_key('static'):
460 try:
461 plugin['static']= parser.getboolean('plugin','static')
462 except:
463 if plugin['static'][:5] == os.sys.platform[:5]:
464 plugin['static']= True
465 else:
466 plugin['static']= False
467 if plugin.has_key('install'):
468 plugin['install']= parser.getboolean('plugin','install')
469 if plugin.has_key('testsuite'):
470 if plugin['testsuite'] == 'disable':
471 plugin['testsuite']= False
472 plugin['dist_testsuite']= find_testsuite(plugin_dir)
473 else:
474 plugin_testsuite= find_testsuite(plugin_dir)
475 plugin['testsuitedir']=plugin_testsuite
476 if plugin_testsuite is not None:
477 plugin['testsuite']=True
478 else:
479 plugin['testsuite']=False
480 plugin['docs']= find_docs(plugin_dir)
481
482 plugin['cflags']+= ' ' + config['extra_cflags']
483 plugin['cppflags']+= ' ' + config['extra_cppflags']
484 plugin['cxxflags']+= ' ' + config['extra_cxxflags']
485
486 plugin['libname']= "lib%s%s%s" % (config['plugin_prefix'],
487 plugin['name'],
488 config['plugin_suffix'])
489 if config['force_lowercase_libname']:
490 plugin['libname']= plugin['libname'].lower()
491
492 plugin['root_plugin_dir']= config['root_plugin_dir']
493 plugin['plugin_prefix']= config['plugin_prefix']
494 plugin['plugin_suffix']= config['plugin_suffix']
495 plugin['pkgplugindir']= config['pkgplugindir']
496
497 # Dependencies must have a module but dependency aliases are simply added
498 # to the variable passed during compile.
499 plugin['dependency_list'] = plugin['dependencies'].split()
500 dependency_aliases = plugin['dependency_aliases'].split()
501 plugin['dependencies'] = ','.join(plugin['dependency_list'] +
502 plugin['dependency_aliases'].split())
503 dependency_libs = ["%s/lib%s%s.la" % (config['root_plugin_dir'],
504 dependency.lower().replace('::', '_'),
505 config['plugin_suffix'])
506 for dependency in plugin['dependency_list']]
507 plugin['libs'] = " ".join(plugin['libs'].split() + dependency_libs);
508
509# Libtool is going to expand:
510# -DPANDORA_MODULE_AUTHOR='"Padraig O'"'"'Sullivan"'
511# to:
512# "-DPANDORA_MODULE_AUTHOR=\"Padraig O'Sullivan\""
513# So we have to replace internal ''s to '"'"'
514 for key in ('author','title','description','version'):
515 plugin[key]=plugin[key].replace('"','\\"')
516 plugin[key]=plugin[key].replace("'","'\"'\"'")
517 return plugin
518
519
520def write_plugin_am(plugin, plugin_am):
521 """Write an automake fragment for this plugin.
522
523 :param plugin: The plugin dict.
524 :param plugin_am: The file to write to.
525 """
526 # The .plugin.ini.stamp avoids changing the datestamp on plugin.ini which can
527 # confuse VCS systems.
528 plugin_am.write("""
529EXTRA_DIST += %(rel_path)s/plugin.ini
530
531# Prevent errors when a plugin dir is removed
532%(rel_path)s/plugin.ini:
533
534""" % plugin)
535 if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":
536 plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)
537 if plugin['headers'] != "":
538 plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
539 if plugin['install_headers'] != "":
540 plugin_am.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
541 if plugin['testsuite']:
542 if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
543 plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
544 if plugin.has_key('dist_testsuite') and plugin['dist_testsuite'] != "":
545 plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin)
546 if plugin['docs'] is not None:
547 plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin)
548 plugin_am.write("""
549%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
550# Include sources in EXTRA_DIST because we might not build this, but we
551# still want the sources to wind up in a tarball
552EXTRA_DIST += %(rel_path)s/plugin.ini %(sources)s
553if %(static_build_conditional_tag)s
554 noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
555 %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
556 %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
557 %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
558 %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
559 %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
560 %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
561 %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
562 check_PROGRAMS += %(tests)s
563 PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
564endif
565EXTRA_DIST += %(rel_path)s/plugin.ini
566if %(shared_build_conditional_tag)s
567 %(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
568 %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
569 %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
570 %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
571 %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
572 %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
573 %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
574 %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
575 check_PROGRAMS += %(tests)s
576endif
577""" % plugin)
578 plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
579 if os.path.exists(plugin_am_file):
580 plugin_am.write('include %s\n' % plugin_am_file)
581
582#
583# MAIN STARTS HERE:
584#
585
586# Parse the pandora-plugin config file
587
588config_defaults= dict(
589 top_srcdir='.',
590 top_builddir='.',
591 plugin_ini_fname='plugin.ini',
592 plugin_prefix='',
593 plugin_suffix='',
594 extra_cflags='',
595 extra_cppflags='',
596 extra_cxxflags='',
597 root_plugin_dir='',
598 pkgplugindir='',
599 default_install='True',
600 default_plugin_version='',
601 default_load_by_default='False',
602 force_lowercase_libname='True',
603 plugin_name_separator='_',
604 module_name_separator='::'
605)
606
607config_parser = ConfigParser.ConfigParser(defaults=config_defaults)
608config_parser.read(pandora_plugin_file)
609config = dict(config_parser.items('pandora-plugin'))
610config['force_lowercase_libname']=config_parser.getboolean('pandora-plugin','force_lowercase_libname')
611
612# I'm 3 seconds away from writing a comprehensive build solution
613if not os.path.exists('config/pandora_vc_revinfo'):
614 if os.path.exists('.bzr'):
615 bzr_revno= subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE).communicate()[0].strip()
616 rev_date= datetime.date.fromtimestamp(time.time())
617 config['default_plugin_version'] = "%d.%02d.%s" % (rev_date.year, rev_date.month, bzr_revno)
618 else:
619 config['default_plugin_version']=datetime.date.fromtimestamp(time.time()).isoformat()
620else:
621 # need to read config/pandora_vc_revno
622 pandora_vc_revno=open('config/pandora_vc_revinfo','r').read().split()
623 rev_date=""
624 bzr_revno=""
625 for revno_line in pandora_vc_revno:
626 (revno_key,revno_val)= revno_line.split("=")
627 if revno_key == 'PANDORA_VC_REVNO':
628 bzr_revno=revno_val.strip()
629 elif revno_key == 'PANDORA_RELEASE_DATE':
630 rev_date=revno_val.strip()
631
632 config['default_plugin_version'] = "%s.%s" % (rev_date, bzr_revno)
633
634actions=[]
635for arg in sys.argv:
636 if arg.startswith('--top_srcdir='):
637 config['top_srcdir']=arg[12:]
638 elif arg.startswith('--top_builddir='):
639 config['top_builddir']=arg[14:]
640 elif arg == "--force-all":
641 actions=['plugin-list','pandora-plugin.am','write']
642 break
643 else:
644 actions.append(arg)
645if len(actions) == 0:
646 actions.append('write')
647
648plugin_list=[]
649
650def accumulate_plugins(arg, dirname, fnames):
651 # plugin_ini_fname is a name in dirname indicating dirname is a plugin.
652 if config['plugin_ini_fname'] in fnames:
653 arg.append(dirname)
654
655os.path.walk(os.path.join(config['top_srcdir'],
656 config['root_plugin_dir']),
657 accumulate_plugins,
658 plugin_list)
659
660if not os.path.exists("config/pandora-plugin.am") or "write" in actions:
661 plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am'))
662 plugin_am_file.write("""
663# always the current list, generated every build so keep this lean.
664# pandora-plugin.list: datestamp preserved list
665${srcdir}/config/pandora-plugin.list: .plugin.scan
666.plugin.scan:
667 @cd ${top_srcdir} && python config/pandora-plugin plugin-list
668
669# Plugins affect configure; so to prevent configure running twice in a tarball
670# build (once up front, once with the right list of plugins, we ship the
671# generated list of plugins and the housekeeping material for that list so it
672# is likewise not updated.
673EXTRA_DIST += \
674 config/pandora-plugin.am \
675 config/pandora-plugin.ac \
676 config/pandora-plugin \
677 config/pandora-plugin.ini
678
679
680# Seed the list of plugin LDADDS which plugins may extend.
681PANDORA_DYNAMIC_LDADDS=
682
683# plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am
684# files. This is invoked when the code to generate such files has altered.""")
685
686if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
687 plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
688 plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
689 plugin_ac_file.write("""
690AC_ARG_WITH([all-static],[
691AS_HELP_STRING([--with-all-static],[Link all plugins staticly into the server @<:@default=no@:>@])
692],[
693 with_all_static="$withval"
694 ],[
695 with_all_static=no
696])
697 """)
698
699if os.path.exists("docs/plugins"):
700 if not os.path.exists("docs/plugins/list.rst") or "write" in actions:
701 plugin_doc_index = ChangeProtectedFile("docs/plugins/list.rst")
702 plugin_doc_index.write("""
703Plugin Documentation
704====================
705
706.. toctree::
707 :maxdepth: 2
708""")
709
710
711if os.path.exists('plugin.ini'):
712 # Are we in a plugin dir which wants to have a self-sufficient build system?
713 plugin_list=['.']
714
715 write_external_plugin()
716else:
717 plugin_list_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.list'))
718 for p in plugin_list:
719 plugin_list_file.write(p)
720 plugin_list_file.write("\n")
721 plugin_list.sort()
722 plugin_list_file.close()
723
724if not os.path.exists("config/pandora-plugin.am") or 'write' in actions:
725 plugin_am_file.write("\n${top_srcdir}/config/pandora-plugin.am: ${top_srcdir}/config/pandora-plugin.list ${top_srcdir}/config/pandora-plugin ")
726 for plugin_dir in plugin_list:
727 plugin_am_file.write("\\\n\t%s/plugin.ini " % plugin_dir)
728 plugin_am_file.write("\n\tcd ${top_srcdir} && python config/pandora-plugin write\n")
729 plugin_ini_list=[]
730
731 # Load all plugin.ini files first so we can do dependency tracking.
732 for plugin_dir in plugin_list:
733 plugin = read_plugin_ini(plugin_dir)
734 expand_plugin_ini(plugin)
735 plugin_ini_list.append(plugin)
736
737 # Check for duplicates
738 plugin_name_list = [plugin['libname'] for plugin in plugin_ini_list]
739 for plugin in plugin_ini_list:
740 if plugin_name_list.count(plugin['libname']) != 1:
741 print "Duplicate module name %s" % plugin['libname']
742 exit(1)
743
744 for plugin in plugin_ini_list:
745 write_plugin(plugin, plugin_ini_list)
746
747if plugin_am_file is not None:
748 plugin_am_file.close()
749if plugin_ac_file is not None:
750 plugin_ac_file.close()
751if plugin_doc_index is not None:
752 plugin_doc_index.close()
0753
=== modified file 'configure.ac'
--- configure.ac 2011-04-08 03:55:42 +0000
+++ configure.ac 2011-04-16 05:39:23 +0000
@@ -12,7 +12,7 @@
12AC_CONFIG_AUX_DIR(config)12AC_CONFIG_AUX_DIR(config)
13AC_CONFIG_MACRO_DIR(m4)13AC_CONFIG_MACRO_DIR(m4)
1414
15PANDORA_CANONICAL_TARGET(require-cxx)15PANDORA_CANONICAL_TARGET(require-cxx, no-vc-changelog)
1616
17GEARMAN_LIBRARY_VERSION=5:1:117GEARMAN_LIBRARY_VERSION=5:1:1
18# | | |18# | | |
1919
=== modified file 'libgearman-server/byte.h'
--- libgearman-server/byte.h 2011-03-16 22:23:41 +0000
+++ libgearman-server/byte.h 2011-04-16 05:39:23 +0000
@@ -43,7 +43,8 @@
4343
44class Byte {44class Byte {
45public:45public:
46 Byte ()46 Byte () :
47 _array()
47 { }48 { }
4849
49 Byte (size_t arg):50 Byte (size_t arg):
5051
=== modified file 'libgearman-server/plugins/protocol/http/protocol.cc'
--- libgearman-server/plugins/protocol/http/protocol.cc 2011-03-16 22:23:41 +0000
+++ libgearman-server/plugins/protocol/http/protocol.cc 2011-04-16 05:39:23 +0000
@@ -44,7 +44,8 @@
44HTTP::HTTP() :44HTTP::HTTP() :
45 Plugin("HTTP"),45 Plugin("HTTP"),
46 _background(false),46 _background(false),
47 _keep_alive(false)47 _keep_alive(false),
48 global_port("")
48{49{
49 command_line_options().add_options()50 command_line_options().add_options()
50 ("http-port", boost::program_options::value(&global_port)->default_value(GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT), "Port to listen on.");51 ("http-port", boost::program_options::value(&global_port)->default_value(GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT), "Port to listen on.");
5152
=== modified file 'libgearman-server/plugins/queue/drizzle/include.am'
--- libgearman-server/plugins/queue/drizzle/include.am 2011-03-16 22:23:41 +0000
+++ libgearman-server/plugins/queue/drizzle/include.am 2011-04-16 05:39:23 +0000
@@ -17,5 +17,8 @@
17 libgearman-server/plugins/queue/drizzle/queue.cc17 libgearman-server/plugins/queue/drizzle/queue.cc
1818
19libgearman_server_libgearman_server_la_LIBADD+= $(LTLIBDRIZZLE)19libgearman_server_libgearman_server_la_LIBADD+= $(LTLIBDRIZZLE)
20libgearman_server_libgearman_server_la_CXXFLAGS= \
21 $(AM_CXXFLAGS) \
22 $(LIBDRIZZLE_CFLAGS)
20endif23endif
2124
2225
=== modified file 'libgearman-server/plugins/queue/drizzle/queue.cc'
--- libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-05 23:59:40 +0000
+++ libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-16 05:39:23 +0000
@@ -82,13 +82,26 @@
82 bool mysql_protocol;82 bool mysql_protocol;
83 in_port_t port;83 in_port_t port;
84private:84private:
85 Drizzle(const Drizzle&);
86 Drizzle& operator=(const Drizzle&);
85};87};
8688
8789
88Drizzle::Drizzle () :90Drizzle::Drizzle () :
89 Queue("libdrizzle"),91 Queue("libdrizzle"),
90 drizzle(NULL),92 drizzle(NULL),
91 con(NULL)93 con(NULL),
94 _result(),
95 _query(),
96 host(""),
97 username(""),
98 password(""),
99 uds(""),
100 user(""),
101 schema(""),
102 table(""),
103 mysql_protocol(false),
104 port(0)
92{105{
93 command_line_options().add_options()106 command_line_options().add_options()
94 ("libdrizzle-host", boost::program_options::value(&host), "Host of server.")107 ("libdrizzle-host", boost::program_options::value(&host), "Host of server.")
95108
=== modified file 'libgearman-server/plugins/queue/libmemcached/queue.cc'
--- libgearman-server/plugins/queue/libmemcached/queue.cc 2011-04-05 23:59:40 +0000
+++ libgearman-server/plugins/queue/libmemcached/queue.cc 2011-04-16 05:39:23 +0000
@@ -79,7 +79,7 @@
79}79}
8080
81} // namespace queue81} // namespace queue
82} // namespace plugin82} // namespace plugins
83} // namespace gearmand83} // namespace gearmand
8484
85/* Queue callback functions. */85/* Queue callback functions. */
8686
=== modified file 'libgearman-server/plugins/queue/postgres/queue.cc'
--- libgearman-server/plugins/queue/postgres/queue.cc 2011-04-05 23:59:40 +0000
+++ libgearman-server/plugins/queue/postgres/queue.cc 2011-04-16 05:39:23 +0000
@@ -57,11 +57,16 @@
57 std::string table;57 std::string table;
58 std::vector<char> query_buffer;58 std::vector<char> query_buffer;
59private:59private:
60 Postgres(const Postgres&);
61 Postgres& operator=(const Postgres&);
60};62};
6163
62Postgres::Postgres() :64Postgres::Postgres() :
63 Queue("Postgres"),65 Queue("Postgres"),
64 con(NULL)66 con(NULL),
67 postgres_connect_string(""),
68 table(""),
69 query_buffer()
65{70{
66 command_line_options().add_options()71 command_line_options().add_options()
67 ("libpq-conninfo", boost::program_options::value(&postgres_connect_string)->default_value(""), "PostgreSQL connection information string.")72 ("libpq-conninfo", boost::program_options::value(&postgres_connect_string)->default_value(""), "PostgreSQL connection information string.")
6873
=== modified file 'libgearman-server/plugins/queue/sqlite/queue.cc'
--- libgearman-server/plugins/queue/sqlite/queue.cc 2011-04-14 05:40:29 +0000
+++ libgearman-server/plugins/queue/sqlite/queue.cc 2011-04-16 05:39:23 +0000
@@ -40,7 +40,9 @@
40namespace plugins {40namespace plugins {
41namespace queue {41namespace queue {
4242
43class Sqlite : public gearmand::plugins::Queue {43class Sqlite :
44 public gearmand::plugins::Queue
45{
44public:46public:
45 Sqlite();47 Sqlite();
46 ~Sqlite();48 ~Sqlite();
@@ -65,10 +67,18 @@
65private:67private:
66 std::string _insert_query;68 std::string _insert_query;
67 std::string _delete_query;69 std::string _delete_query;
70 Sqlite(const Sqlite&);
71 Sqlite& operator=(const Sqlite&);
68};72};
6973
70Sqlite::Sqlite() :74Sqlite::Sqlite() :
71 Queue("sqlite")75 Queue("sqlite"),
76 schema(""),
77 table(""),
78 db(NULL),
79 in_trans(0),
80 _insert_query(""),
81 _delete_query("")
72{82{
73 command_line_options().add_options()83 command_line_options().add_options()
74 ("libsqlite3-db", boost::program_options::value(&schema), "Database file to use.")84 ("libsqlite3-db", boost::program_options::value(&schema), "Database file to use.")
7585
=== modified file 'libgearman-server/plugins/queue/tokyocabinet/queue.cc'
--- libgearman-server/plugins/queue/tokyocabinet/queue.cc 2011-04-05 23:59:40 +0000
+++ libgearman-server/plugins/queue/tokyocabinet/queue.cc 2011-04-16 05:39:23 +0000
@@ -37,10 +37,15 @@
37 std::string filename;37 std::string filename;
38 bool optimize;38 bool optimize;
39private:39private:
40 TokyoCabinet(const TokyoCabinet&);
41 TokyoCabinet& operator=(const TokyoCabinet&);
40};42};
4143
42TokyoCabinet::TokyoCabinet() :44TokyoCabinet::TokyoCabinet() :
43 Queue("tokyocabinet")45 Queue("tokyocabinet"),
46 db(NULL),
47 filename(NULL),
48 optimize(false)
44{49{
45 command_line_options().add_options()50 command_line_options().add_options()
46 ("libtokyocabinet-file", boost::program_options::value(&filename), "File name of the database. [see: man tcadb, tcadbopen() for name guidelines]")51 ("libtokyocabinet-file", boost::program_options::value(&filename), "File name of the database. [see: man tcadb, tcadbopen() for name guidelines]")
4752
=== modified file 'libgearman/client.cc'
--- libgearman/client.cc 2011-04-13 04:12:34 +0000
+++ libgearman/client.cc 2011-04-16 05:39:23 +0000
@@ -204,19 +204,19 @@
204 memset(&options, 0, sizeof(int32_t));204 memset(&options, 0, sizeof(int32_t));
205205
206 if (client->options.allocated)206 if (client->options.allocated)
207 options|= (int)GEARMAN_CLIENT_ALLOCATED;207 options|= int(GEARMAN_CLIENT_ALLOCATED);
208 if (client->options.non_blocking)208 if (client->options.non_blocking)
209 options|= (int)GEARMAN_CLIENT_NON_BLOCKING;209 options|= int(GEARMAN_CLIENT_NON_BLOCKING);
210 if (client->options.task_in_use)210 if (client->options.task_in_use)
211 options|= (int)GEARMAN_CLIENT_TASK_IN_USE;211 options|= int(GEARMAN_CLIENT_TASK_IN_USE);
212 if (client->options.unbuffered_result)212 if (client->options.unbuffered_result)
213 options|= (int)GEARMAN_CLIENT_UNBUFFERED_RESULT;213 options|= int(GEARMAN_CLIENT_UNBUFFERED_RESULT);
214 if (client->options.no_new)214 if (client->options.no_new)
215 options|= (int)GEARMAN_CLIENT_NO_NEW;215 options|= int(GEARMAN_CLIENT_NO_NEW);
216 if (client->options.free_tasks)216 if (client->options.free_tasks)
217 options|= (int)GEARMAN_CLIENT_FREE_TASKS;217 options|= int(GEARMAN_CLIENT_FREE_TASKS);
218218
219 return (gearman_client_options_t)options;219 return gearman_client_options_t(options);
220}220}
221221
222void gearman_client_set_options(gearman_client_st *client,222void gearman_client_set_options(gearman_client_st *client,
@@ -297,7 +297,7 @@
297297
298void *gearman_client_context(const gearman_client_st *client)298void *gearman_client_context(const gearman_client_st *client)
299{299{
300 return (void *)(client->context);300 return static_cast<void *>(client->context);
301}301}
302302
303void gearman_client_set_context(gearman_client_st *client, void *context)303void gearman_client_set_context(gearman_client_st *client, void *context)
@@ -922,14 +922,14 @@
922 GEARMAN_SERVER_ERROR,922 GEARMAN_SERVER_ERROR,
923 "gearman_client_run_tasks",923 "gearman_client_run_tasks",
924 "%s:%.*s",924 "%s:%.*s",
925 (char *)(client->con->packet.arg[0]),925 static_cast<char *>(client->con->packet.arg[0]),
926 (int)(client->con->packet.arg_size[1]),926 int(client->con->packet.arg_size[1]),
927 (char *)(client->con->packet.arg[1]));927 static_cast<char *>(client->con->packet.arg[1]));
928928
929 return GEARMAN_SERVER_ERROR;929 return GEARMAN_SERVER_ERROR;
930 }930 }
931 else if (strncmp(client->task->job_handle,931 else if (strncmp(client->task->job_handle,
932 (char *)(client->con->packet.arg[0]),932 static_cast<char *>(client->con->packet.arg[0]),
933 client->con->packet.arg_size[0]) ||933 client->con->packet.arg_size[0]) ||
934 (client->con->packet.command != GEARMAN_COMMAND_WORK_FAIL &&934 (client->con->packet.command != GEARMAN_COMMAND_WORK_FAIL &&
935 strlen(client->task->job_handle) != client->con->packet.arg_size[0] - 1) ||935 strlen(client->task->job_handle) != client->con->packet.arg_size[0] - 1) ||
@@ -1094,7 +1094,7 @@
1094static gearman_return_t _client_add_server(const char *host, in_port_t port,1094static gearman_return_t _client_add_server(const char *host, in_port_t port,
1095 void *context)1095 void *context)
1096{1096{
1097 return gearman_client_add_server((gearman_client_st *)context, host, port);1097 return gearman_client_add_server(static_cast<gearman_client_st *>(context), host, port);
1098}1098}
10991099
1100static gearman_task_st *_client_add_task(gearman_client_st *client,1100static gearman_task_st *_client_add_task(gearman_client_st *client,
@@ -1150,7 +1150,8 @@
1150 if (command == GEARMAN_COMMAND_SUBMIT_JOB_EPOCH)1150 if (command == GEARMAN_COMMAND_SUBMIT_JOB_EPOCH)
1151 {1151 {
1152 char time_string[30];1152 char time_string[30];
1153 int length= snprintf(time_string, sizeof(time_string), "%lld", (long long)when);1153 int length= snprintf(time_string, sizeof(time_string), "%lld",
1154 static_cast<long long>(when));
1154 args[2]= time_string;1155 args[2]= time_string;
1155 args_size[2]= length +1;1156 args_size[2]= length +1;
1156 args[3]= workload;1157 args[3]= workload;
@@ -1300,8 +1301,8 @@
1300 if (task->recv->command == GEARMAN_COMMAND_JOB_CREATED)1301 if (task->recv->command == GEARMAN_COMMAND_JOB_CREATED)
1301 {1302 {
1302 snprintf(task->job_handle, GEARMAN_JOB_HANDLE_SIZE, "%.*s",1303 snprintf(task->job_handle, GEARMAN_JOB_HANDLE_SIZE, "%.*s",
1303 (int)(task->recv->arg_size[0]),1304 int(task->recv->arg_size[0]),
1304 (char *)(task->recv->arg[0]));1305 static_cast<char *>(task->recv->arg[0]));
13051306
1306 case GEARMAN_TASK_STATE_CREATED:1307 case GEARMAN_TASK_STATE_CREATED:
1307 if (client->created_fn != NULL)1308 if (client->created_fn != NULL)
@@ -1353,12 +1354,12 @@
1353 {1354 {
1354 if (task->recv->command == GEARMAN_COMMAND_STATUS_RES)1355 if (task->recv->command == GEARMAN_COMMAND_STATUS_RES)
1355 {1356 {
1356 if (atoi((char *)task->recv->arg[1]) == 0)1357 if (atoi(static_cast<char *>(task->recv->arg[1])) == 0)
1357 task->options.is_known= false;1358 task->options.is_known= false;
1358 else1359 else
1359 task->options.is_known= true;1360 task->options.is_known= true;
13601361
1361 if (atoi((char *)task->recv->arg[2]) == 0)1362 if (atoi(static_cast<char *>(task->recv->arg[2])) == 0)
1362 task->options.is_running= false;1363 task->options.is_running= false;
1363 else1364 else
1364 task->options.is_running= true;1365 task->options.is_running= true;
@@ -1370,11 +1371,11 @@
1370 x= 1;1371 x= 1;
1371 }1372 }
13721373
1373 task->numerator= (uint32_t)atoi((char *)task->recv->arg[x]);1374 task->numerator= uint32_t(atoi(static_cast<char *>(task->recv->arg[x])));
1374 snprintf(status_buffer, 11, "%.*s",1375 snprintf(status_buffer, 11, "%.*s",
1375 (int)(task->recv->arg_size[x + 1]),1376 int(task->recv->arg_size[x + 1]),
1376 (char *)(task->recv->arg[x + 1]));1377 static_cast<char *>(task->recv->arg[x + 1]));
1377 task->denominator= (uint32_t)atoi(status_buffer);1378 task->denominator= uint32_t(atoi(status_buffer));
13781379
1379 case GEARMAN_TASK_STATE_STATUS:1380 case GEARMAN_TASK_STATE_STATUS:
1380 if (client->status_fn != NULL)1381 if (client->status_fn != NULL)
@@ -1507,7 +1508,7 @@
1507 client->do_data_size= 0;1508 client->do_data_size= 0;
1508 }1509 }
15091510
1510 return (void *)workload;1511 return const_cast<void *>(workload);
1511}1512}
15121513
1513static gearman_return_t _client_do_background(gearman_client_st *client,1514static gearman_return_t _client_do_background(gearman_client_st *client,
@@ -1557,7 +1558,7 @@
15571558
1558static gearman_return_t _client_do_data(gearman_task_st *task)1559static gearman_return_t _client_do_data(gearman_task_st *task)
1559{1560{
1560 gearman_client_st *client= (gearman_client_st *)gearman_task_context(task);1561 gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task)));
15611562
1562 if (client->do_ret != GEARMAN_SUCCESS)1563 if (client->do_ret != GEARMAN_SUCCESS)
1563 {1564 {
@@ -1581,7 +1582,7 @@
15811582
1582static gearman_return_t _client_do_status(gearman_task_st *task)1583static gearman_return_t _client_do_status(gearman_task_st *task)
1583{1584{
1584 gearman_client_st *client= (gearman_client_st *)gearman_task_context(task);1585 gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task)));
15851586
1586 if (client->do_ret != GEARMAN_SUCCESS)1587 if (client->do_ret != GEARMAN_SUCCESS)
1587 {1588 {
@@ -1595,7 +1596,7 @@
15951596
1596static gearman_return_t _client_do_fail(gearman_task_st *task)1597static gearman_return_t _client_do_fail(gearman_task_st *task)
1597{1598{
1598 gearman_client_st *client= (gearman_client_st *)gearman_task_context(task);1599 gearman_client_st *client= const_cast<gearman_client_st *>(static_cast<const gearman_client_st *>(gearman_task_context(task)));
15991600
1600 client->do_ret= GEARMAN_WORK_FAIL;1601 client->do_ret= GEARMAN_WORK_FAIL;
1601 return GEARMAN_SUCCESS;1602 return GEARMAN_SUCCESS;
16021603
=== modified file 'libgearman/connection.cc'
--- libgearman/connection.cc 2011-04-14 05:40:29 +0000
+++ libgearman/connection.cc 2011-04-16 05:39:23 +0000
@@ -252,7 +252,7 @@
252 NI_MAXHOST);252 NI_MAXHOST);
253 connection->host[NI_MAXHOST - 1]= 0;253 connection->host[NI_MAXHOST - 1]= 0;
254254
255 connection->port= (in_port_t)(port == 0 ? GEARMAN_DEFAULT_TCP_PORT : port);255 connection->port= in_port_t(port == 0 ? GEARMAN_DEFAULT_TCP_PORT : port);
256}256}
257257
258void gearman_connection_close(gearman_connection_st *connection)258void gearman_connection_close(gearman_connection_st *connection)
@@ -416,14 +416,14 @@
416 if (connection->send_buffer_size < GEARMAN_SEND_BUFFER_SIZE)416 if (connection->send_buffer_size < GEARMAN_SEND_BUFFER_SIZE)
417 {417 {
418 memcpy(connection->send_buffer,418 memcpy(connection->send_buffer,
419 (char *)packet->data + connection->send_data_offset,419 static_cast<char *>(const_cast<void *>(packet->data)) + connection->send_data_offset,
420 connection->send_buffer_size);420 connection->send_buffer_size);
421 connection->send_data_size= 0;421 connection->send_data_size= 0;
422 connection->send_data_offset= 0;422 connection->send_data_offset= 0;
423 break;423 break;
424 }424 }
425425
426 connection->send_buffer_ptr= (char *)packet->data + connection->send_data_offset;426 connection->send_buffer_ptr= static_cast<char *>(const_cast<void *>(packet->data)) + connection->send_data_offset;
427 connection->send_state= GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA;427 connection->send_state= GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA;
428428
429 case GEARMAN_CON_SEND_UNIVERSAL_FLUSH:429 case GEARMAN_CON_SEND_UNIVERSAL_FLUSH:
@@ -473,7 +473,7 @@
473 return GEARMAN_DATA_TOO_LARGE;473 return GEARMAN_DATA_TOO_LARGE;
474 }474 }
475475
476 connection->send_buffer_ptr= (char *)data;476 connection->send_buffer_ptr= static_cast<char *>(const_cast<void *>(data));
477 connection->send_buffer_size= data_size;477 connection->send_buffer_size= data_size;
478478
479 *ret_ptr= gearman_connection_flush(connection);479 *ret_ptr= gearman_connection_flush(connection);
@@ -500,7 +500,7 @@
500 connection->addrinfo= NULL;500 connection->addrinfo= NULL;
501 }501 }
502502
503 snprintf(port_str, NI_MAXSERV, "%hu", (uint16_t)connection->port);503 snprintf(port_str, NI_MAXSERV, "%hu", uint16_t(connection->port));
504504
505 memset(&ai, 0, sizeof(struct addrinfo));505 memset(&ai, 0, sizeof(struct addrinfo));
506 ai.ai_socktype= SOCK_STREAM;506 ai.ai_socktype= SOCK_STREAM;
@@ -663,10 +663,10 @@
663 return GEARMAN_ERRNO;663 return GEARMAN_ERRNO;
664 }664 }
665665
666 connection->send_buffer_size-= (size_t)write_size;666 connection->send_buffer_size-= size_t(write_size);
667 if (connection->send_state == GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA)667 if (connection->send_state == GEARMAN_CON_SEND_UNIVERSAL_FLUSH_DATA)
668 {668 {
669 connection->send_data_offset+= (size_t)write_size;669 connection->send_data_offset+= size_t(write_size);
670 if (connection->send_data_offset == connection->send_data_size)670 if (connection->send_data_offset == connection->send_data_size)
671 {671 {
672 connection->send_data_size= 0;672 connection->send_data_size= 0;
@@ -776,7 +776,7 @@
776 else776 else
777 {777 {
778 packet->data= packet->universal->workload_malloc_fn(packet->data_size,778 packet->data= packet->universal->workload_malloc_fn(packet->data_size,
779 (void *)packet->universal->workload_malloc_context);779 static_cast<void *>(packet->universal->workload_malloc_context));
780 }780 }
781 if (packet->data == NULL)781 if (packet->data == NULL)
782 {782 {
@@ -792,7 +792,7 @@
792 while (connection->recv_data_size != 0)792 while (connection->recv_data_size != 0)
793 {793 {
794 (void)gearman_connection_recv_data(connection,794 (void)gearman_connection_recv_data(connection,
795 ((uint8_t *)(packet->data)) +795 static_cast<uint8_t *>(const_cast<void *>(packet->data)) +
796 connection->recv_data_offset,796 connection->recv_data_offset,
797 packet->data_size -797 packet->data_size -
798 connection->recv_data_offset, ret_ptr);798 connection->recv_data_offset, ret_ptr);
@@ -844,7 +844,8 @@
844844
845 if (data_size != recv_size)845 if (data_size != recv_size)
846 {846 {
847 recv_size+= gearman_connection_read(connection, ((uint8_t *)data) + recv_size,847 recv_size+= gearman_connection_read(connection,
848 static_cast<uint8_t *>(const_cast<void *>(data)) + recv_size,
848 data_size - recv_size, ret_ptr);849 data_size - recv_size, ret_ptr);
849 connection->recv_data_offset+= recv_size;850 connection->recv_data_offset+= recv_size;
850 }851 }
@@ -928,7 +929,7 @@
928 }929 }
929930
930 *ret_ptr= GEARMAN_SUCCESS;931 *ret_ptr= GEARMAN_SUCCESS;
931 return (size_t)read_size;932 return size_t(read_size);
932}933}
933934
934gearman_return_t gearman_connection_set_events(gearman_connection_st *connection, short events)935gearman_return_t gearman_connection_set_events(gearman_connection_st *connection, short events)
@@ -943,7 +944,7 @@
943 if (connection->universal->event_watch_fn != NULL)944 if (connection->universal->event_watch_fn != NULL)
944 {945 {
945 ret= connection->universal->event_watch_fn(connection, connection->events,946 ret= connection->universal->event_watch_fn(connection, connection->events,
946 (void *)connection->universal->event_watch_context);947 static_cast<void *>(connection->universal->event_watch_context));
947 if (ret != GEARMAN_SUCCESS)948 if (ret != GEARMAN_SUCCESS)
948 {949 {
949 gearman_connection_close(connection);950 gearman_connection_close(connection);
@@ -971,7 +972,7 @@
971 connection->universal->event_watch_fn != NULL)972 connection->universal->event_watch_fn != NULL)
972 {973 {
973 ret= connection->universal->event_watch_fn(connection, connection->events,974 ret= connection->universal->event_watch_fn(connection, connection->events,
974 (void *)connection->universal->event_watch_context);975 static_cast<void *>(connection->universal->event_watch_context));
975 if (ret != GEARMAN_SUCCESS)976 if (ret != GEARMAN_SUCCESS)
976 {977 {
977 gearman_connection_close(connection);978 gearman_connection_close(connection);
@@ -979,7 +980,7 @@
979 }980 }
980 }981 }
981982
982 connection->events&= (short)~revents;983 connection->events&= short(~revents);
983984
984 return GEARMAN_SUCCESS;985 return GEARMAN_SUCCESS;
985}986}
@@ -996,7 +997,7 @@
996997
997 ret= 1;998 ret= 1;
998 ret= setsockopt(connection->fd, IPPROTO_TCP, TCP_NODELAY, &ret,999 ret= setsockopt(connection->fd, IPPROTO_TCP, TCP_NODELAY, &ret,
999 (socklen_t)sizeof(int));1000 socklen_t(sizeof(int)));
1000 if (ret == -1 && errno != EOPNOTSUPP)1001 if (ret == -1 && errno != EOPNOTSUPP)
1001 {1002 {
1002 gearman_perror(connection->universal, "setsockopt(TCP_NODELAY)");1003 gearman_perror(connection->universal, "setsockopt(TCP_NODELAY)");
@@ -1006,7 +1007,7 @@
1006 linger.l_onoff= 1;1007 linger.l_onoff= 1;
1007 linger.l_linger= GEARMAN_DEFAULT_SOCKET_TIMEOUT;1008 linger.l_linger= GEARMAN_DEFAULT_SOCKET_TIMEOUT;
1008 ret= setsockopt(connection->fd, SOL_SOCKET, SO_LINGER, &linger,1009 ret= setsockopt(connection->fd, SOL_SOCKET, SO_LINGER, &linger,
1009 (socklen_t)sizeof(struct linger));1010 socklen_t(sizeof(struct linger)));
1010 if (ret == -1)1011 if (ret == -1)
1011 {1012 {
1012 gearman_perror(connection->universal, "setsockopt(SO_LINGER)");1013 gearman_perror(connection->universal, "setsockopt(SO_LINGER)");
@@ -1016,7 +1017,7 @@
1016 waittime.tv_sec= GEARMAN_DEFAULT_SOCKET_TIMEOUT;1017 waittime.tv_sec= GEARMAN_DEFAULT_SOCKET_TIMEOUT;
1017 waittime.tv_usec= 0;1018 waittime.tv_usec= 0;
1018 ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDTIMEO, &waittime,1019 ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDTIMEO, &waittime,
1019 (socklen_t)sizeof(struct timeval));1020 socklen_t(sizeof(struct timeval)));
1020 if (ret == -1 && errno != ENOPROTOOPT)1021 if (ret == -1 && errno != ENOPROTOOPT)
1021 {1022 {
1022 gearman_perror(connection->universal, "setsockopt(SO_SNDTIMEO)");1023 gearman_perror(connection->universal, "setsockopt(SO_SNDTIMEO)");
@@ -1024,7 +1025,7 @@
1024 }1025 }
10251026
1026 ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVTIMEO, &waittime,1027 ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVTIMEO, &waittime,
1027 (socklen_t)sizeof(struct timeval));1028 socklen_t(sizeof(struct timeval)));
1028 if (ret == -1 && errno != ENOPROTOOPT)1029 if (ret == -1 && errno != ENOPROTOOPT)
1029 {1030 {
1030 gearman_perror(connection->universal, "setsockopt(SO_RCVTIMEO)");1031 gearman_perror(connection->universal, "setsockopt(SO_RCVTIMEO)");
@@ -1032,7 +1033,7 @@
1032 }1033 }
10331034
1034 ret= GEARMAN_DEFAULT_SOCKET_SEND_SIZE;1035 ret= GEARMAN_DEFAULT_SOCKET_SEND_SIZE;
1035 ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDBUF, &ret, (socklen_t)sizeof(int));1036 ret= setsockopt(connection->fd, SOL_SOCKET, SO_SNDBUF, &ret, socklen_t(sizeof(int)));
1036 if (ret == -1)1037 if (ret == -1)
1037 {1038 {
1038 gearman_perror(connection->universal, "setsockopt(SO_SNDBUF)");1039 gearman_perror(connection->universal, "setsockopt(SO_SNDBUF)");
@@ -1042,7 +1043,7 @@
1042#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)1043#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
1043 {1044 {
1044 ret= 1;1045 ret= 1;
1045 setsockopt(connection->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&ret, sizeof(int));1046 setsockopt(connection->fd, SOL_SOCKET, SO_NOSIGPIPE, static_cast<void *>(&ret), sizeof(int));
10461047
1047 // This is not considered a fatal error 1048 // This is not considered a fatal error
1048 if (ret == -1)1049 if (ret == -1)
@@ -1053,7 +1054,7 @@
1053#endif1054#endif
10541055
1055 ret= GEARMAN_DEFAULT_SOCKET_RECV_SIZE;1056 ret= GEARMAN_DEFAULT_SOCKET_RECV_SIZE;
1056 ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVBUF, &ret, (socklen_t)sizeof(int));1057 ret= setsockopt(connection->fd, SOL_SOCKET, SO_RCVBUF, &ret, socklen_t(sizeof(int)));
1057 if (ret == -1)1058 if (ret == -1)
1058 {1059 {
1059 gearman_perror(connection->universal, "setsockopt(SO_RCVBUF)");1060 gearman_perror(connection->universal, "setsockopt(SO_RCVBUF)");
10601061
=== modified file 'libgearman/job.cc'
--- libgearman/job.cc 2011-04-13 04:12:34 +0000
+++ libgearman/job.cc 2011-04-16 05:39:23 +0000
@@ -288,18 +288,18 @@
288288
289const char *gearman_job_handle(const gearman_job_st *job)289const char *gearman_job_handle(const gearman_job_st *job)
290{290{
291 return (const char *)job->assigned.arg[0];291 return static_cast<const char *>(job->assigned.arg[0]);
292}292}
293293
294const char *gearman_job_function_name(const gearman_job_st *job)294const char *gearman_job_function_name(const gearman_job_st *job)
295{295{
296 return (const char *)job->assigned.arg[1];296 return static_cast<const char *>(job->assigned.arg[1]);
297}297}
298298
299const char *gearman_job_unique(const gearman_job_st *job)299const char *gearman_job_unique(const gearman_job_st *job)
300{300{
301 if (job->assigned.command == GEARMAN_COMMAND_JOB_ASSIGN_UNIQ)301 if (job->assigned.command == GEARMAN_COMMAND_JOB_ASSIGN_UNIQ)
302 return (const char *)job->assigned.arg[2];302 return static_cast<const char *>(job->assigned.arg[2]);
303 return "";303 return "";
304}304}
305305
306306
=== modified file 'libgearman/task.cc'
--- libgearman/task.cc 2011-04-13 04:12:34 +0000
+++ libgearman/task.cc 2011-04-16 05:39:23 +0000
@@ -110,7 +110,7 @@
110 if (task != &(task->client->do_task) && task->context != NULL &&110 if (task != &(task->client->do_task) && task->context != NULL &&
111 task->client->task_context_free_fn != NULL)111 task->client->task_context_free_fn != NULL)
112 {112 {
113 task->client->task_context_free_fn(task, (void *)task->context);113 task->client->task_context_free_fn(task, static_cast<void *>(task->context));
114 }114 }
115115
116 if (task->client->task_list == task)116 if (task->client->task_list == task)
117117
=== modified file 'libgearman/universal.cc'
--- libgearman/universal.cc 2011-04-14 05:40:29 +0000
+++ libgearman/universal.cc 2011-04-16 05:39:23 +0000
@@ -404,7 +404,7 @@
404 }404 }
405405
406 size= strlen(gearman_strerror(rc));406 size= strlen(gearman_strerror(rc));
407 ptr= (char *)memcpy(log_buffer, gearman_strerror(rc), size);407 ptr= static_cast<char *>(memcpy(log_buffer, gearman_strerror(rc), size));
408 ptr+= size;408 ptr+= size;
409409
410 ptr[0]= '>';410 ptr[0]= '>';
@@ -412,7 +412,7 @@
412 ptr++;412 ptr++;
413413
414 size= strlen(function);414 size= strlen(function);
415 ptr= (char *)memcpy(ptr, (void*)function, size);415 ptr= static_cast<char *>(memcpy(ptr, static_cast<void*>(const_cast<char *>(function)), size));
416 ptr+= size;416 ptr+= size;
417417
418 ptr[0]= ':';418 ptr[0]= ':';
@@ -420,7 +420,7 @@
420 ptr++;420 ptr++;
421421
422 va_start(args, format);422 va_start(args, format);
423 size+= (size_t)vsnprintf(ptr, GEARMAN_MAX_ERROR_SIZE - size, format, args);423 size+= size_t(vsnprintf(ptr, GEARMAN_MAX_ERROR_SIZE - size, format, args));
424 va_end(args);424 va_end(args);
425425
426 if (universal->log_fn == NULL)426 if (universal->log_fn == NULL)
@@ -433,7 +433,7 @@
433 else433 else
434 {434 {
435 universal->log_fn(log_buffer, GEARMAN_VERBOSE_FATAL,435 universal->log_fn(log_buffer, GEARMAN_VERBOSE_FATAL,
436 (void *)universal->log_context);436 static_cast<void *>(universal->log_context));
437 }437 }
438}438}
439439
440440
=== modified file 'libgearman/worker.cc'
--- libgearman/worker.cc 2011-04-14 05:40:29 +0000
+++ libgearman/worker.cc 2011-04-16 05:39:23 +0000
@@ -187,7 +187,7 @@
187 else187 else
188 {188 {
189 (&worker->universal)->workload_free_fn(worker->work_result,189 (&worker->universal)->workload_free_fn(worker->work_result,
190 (void *)(&worker->universal)->workload_free_context);190 static_cast<void *>((&worker->universal)->workload_free_context));
191 }191 }
192 }192 }
193193
@@ -219,25 +219,25 @@
219 memset(&options, 0, sizeof(gearman_worker_options_t));219 memset(&options, 0, sizeof(gearman_worker_options_t));
220220
221 if (worker->options.allocated)221 if (worker->options.allocated)
222 options|= (int)GEARMAN_WORKER_ALLOCATED;222 options|= int(GEARMAN_WORKER_ALLOCATED);
223 if (worker->options.non_blocking)223 if (worker->options.non_blocking)
224 options|= (int)GEARMAN_WORKER_NON_BLOCKING;224 options|= int(GEARMAN_WORKER_NON_BLOCKING);
225 if (worker->options.packet_init)225 if (worker->options.packet_init)
226 options|= (int)GEARMAN_WORKER_PACKET_INIT;226 options|= int(GEARMAN_WORKER_PACKET_INIT);
227 if (worker->options.grab_job_in_use)227 if (worker->options.grab_job_in_use)
228 options|= (int)GEARMAN_WORKER_GRAB_JOB_IN_USE;228 options|= int(GEARMAN_WORKER_GRAB_JOB_IN_USE);
229 if (worker->options.pre_sleep_in_use)229 if (worker->options.pre_sleep_in_use)
230 options|= (int)GEARMAN_WORKER_PRE_SLEEP_IN_USE;230 options|= int(GEARMAN_WORKER_PRE_SLEEP_IN_USE);
231 if (worker->options.work_job_in_use)231 if (worker->options.work_job_in_use)
232 options|= (int)GEARMAN_WORKER_WORK_JOB_IN_USE;232 options|= int(GEARMAN_WORKER_WORK_JOB_IN_USE);
233 if (worker->options.change)233 if (worker->options.change)
234 options|= (int)GEARMAN_WORKER_CHANGE;234 options|= int(GEARMAN_WORKER_CHANGE);
235 if (worker->options.grab_uniq)235 if (worker->options.grab_uniq)
236 options|= (int)GEARMAN_WORKER_GRAB_UNIQ;236 options|= int(GEARMAN_WORKER_GRAB_UNIQ);
237 if (worker->options.timeout_return)237 if (worker->options.timeout_return)
238 options|= (int)GEARMAN_WORKER_TIMEOUT_RETURN;238 options|= int(GEARMAN_WORKER_TIMEOUT_RETURN);
239239
240 return (gearman_worker_options_t)options;240 return gearman_worker_options_t(options);
241}241}
242242
243void gearman_worker_set_options(gearman_worker_st *worker,243void gearman_worker_set_options(gearman_worker_st *worker,
@@ -713,7 +713,7 @@
713 else713 else
714 {714 {
715 if ((&worker->universal)->timeout > 0)715 if ((&worker->universal)->timeout > 0)
716 usleep((unsigned int)(&worker->universal)->timeout * 1000);716 usleep(static_cast<unsigned int>((&worker->universal)->timeout) * 1000);
717717
718 if (worker->options.timeout_return)718 if (worker->options.timeout_return)
719 {719 {
@@ -841,7 +841,7 @@
841841
842 case GEARMAN_WORKER_WORK_UNIVERSAL_FUNCTION:842 case GEARMAN_WORKER_WORK_UNIVERSAL_FUNCTION:
843 worker->work_result= worker->work_function->worker_fn(&(worker->work_job),843 worker->work_result= worker->work_function->worker_fn(&(worker->work_job),
844 (void *)worker->work_function->context,844 static_cast<void *>(worker->work_function->context),
845 &(worker->work_result_size), &ret);845 &(worker->work_result_size), &ret);
846 if (ret == GEARMAN_WORK_FAIL)846 if (ret == GEARMAN_WORK_FAIL)
847 {847 {
@@ -1020,7 +1020,8 @@
1020static gearman_return_t _worker_add_server(const char *host, in_port_t port,1020static gearman_return_t _worker_add_server(const char *host, in_port_t port,
1021 void *context)1021 void *context)
1022{1022{
1023 return gearman_worker_add_server((gearman_worker_st *)context, host, port);1023 return gearman_worker_add_server(static_cast<gearman_worker_st *>(context),
1024 host, port);
1024}1025}
10251026
1026static gearman_return_t _worker_function_create(gearman_worker_st *worker,1027static gearman_return_t _worker_function_create(gearman_worker_st *worker,
10271028
=== modified file 'libtest/test.h'
--- libtest/test.h 2011-03-28 00:28:55 +0000
+++ libtest/test.h 2011-04-16 05:39:23 +0000
@@ -116,6 +116,10 @@
116116
117 virtual ~world_st()117 virtual ~world_st()
118 { }118 { }
119
120private:
121 world_st(const world_st&);
122 world_st& operator=(const world_st&);
119};123};
120124
121125
122126
=== added file 'm4/iconv.m4'
--- m4/iconv.m4 1970-01-01 00:00:00 +0000
+++ m4/iconv.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,214 @@
1# iconv.m4 serial 11 (gettext-0.18.1)
2dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
10[
11 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
12 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
13 AC_REQUIRE([AC_LIB_RPATH])
14
15 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
16 dnl accordingly.
17 AC_LIB_LINKFLAGS_BODY([iconv])
18])
19
20AC_DEFUN([AM_ICONV_LINK],
21[
22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23 dnl those with the standalone portable GNU libiconv installed).
24 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
25
26 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
27 dnl accordingly.
28 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
29
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, he wants to use it. The first
33 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36
37 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h>
41#include <iconv.h>],
42 [iconv_t cd = iconv_open("","");
43 iconv(cd,NULL,NULL,NULL,NULL);
44 iconv_close(cd);],
45 [am_cv_func_iconv=yes])
46 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV"
49 AC_TRY_LINK([#include <stdlib.h>
50#include <iconv.h>],
51 [iconv_t cd = iconv_open("","");
52 iconv(cd,NULL,NULL,NULL,NULL);
53 iconv_close(cd);],
54 [am_cv_lib_iconv=yes]
55 [am_cv_func_iconv=yes])
56 LIBS="$am_save_LIBS"
57 fi
58 ])
59 if test "$am_cv_func_iconv" = yes; then
60 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
61 dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
62 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then
64 LIBS="$LIBS $LIBICONV"
65 fi
66 AC_TRY_RUN([
67#include <iconv.h>
68#include <string.h>
69int main ()
70{
71 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72 returns. */
73 {
74 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
75 if (cd_utf8_to_88591 != (iconv_t)(-1))
76 {
77 static const char input[] = "\342\202\254"; /* EURO SIGN */
78 char buf[10];
79 const char *inptr = input;
80 size_t inbytesleft = strlen (input);
81 char *outptr = buf;
82 size_t outbytesleft = sizeof (buf);
83 size_t res = iconv (cd_utf8_to_88591,
84 (char **) &inptr, &inbytesleft,
85 &outptr, &outbytesleft);
86 if (res == 0)
87 return 1;
88 }
89 }
90 /* Test against Solaris 10 bug: Failures are not distinguishable from
91 successful returns. */
92 {
93 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
94 if (cd_ascii_to_88591 != (iconv_t)(-1))
95 {
96 static const char input[] = "\263";
97 char buf[10];
98 const char *inptr = input;
99 size_t inbytesleft = strlen (input);
100 char *outptr = buf;
101 size_t outbytesleft = sizeof (buf);
102 size_t res = iconv (cd_ascii_to_88591,
103 (char **) &inptr, &inbytesleft,
104 &outptr, &outbytesleft);
105 if (res == 0)
106 return 1;
107 }
108 }
109#if 0 /* This bug could be worked around by the caller. */
110 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
111 {
112 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
113 if (cd_88591_to_utf8 != (iconv_t)(-1))
114 {
115 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
116 char buf[50];
117 const char *inptr = input;
118 size_t inbytesleft = strlen (input);
119 char *outptr = buf;
120 size_t outbytesleft = sizeof (buf);
121 size_t res = iconv (cd_88591_to_utf8,
122 (char **) &inptr, &inbytesleft,
123 &outptr, &outbytesleft);
124 if ((int)res > 0)
125 return 1;
126 }
127 }
128#endif
129 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
130 provided. */
131 if (/* Try standardized names. */
132 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
133 /* Try IRIX, OSF/1 names. */
134 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
135 /* Try AIX names. */
136 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
137 /* Try HP-UX names. */
138 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
139 return 1;
140 return 0;
141}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
142 [case "$host_os" in
143 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
144 *) am_cv_func_iconv_works="guessing yes" ;;
145 esac])
146 LIBS="$am_save_LIBS"
147 ])
148 case "$am_cv_func_iconv_works" in
149 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
150 *) am_func_iconv=yes ;;
151 esac
152 else
153 am_func_iconv=no am_cv_lib_iconv=no
154 fi
155 if test "$am_func_iconv" = yes; then
156 AC_DEFINE([HAVE_ICONV], [1],
157 [Define if you have the iconv() function and it works.])
158 fi
159 if test "$am_cv_lib_iconv" = yes; then
160 AC_MSG_CHECKING([how to link with libiconv])
161 AC_MSG_RESULT([$LIBICONV])
162 else
163 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
164 dnl either.
165 CPPFLAGS="$am_save_CPPFLAGS"
166 LIBICONV=
167 LTLIBICONV=
168 fi
169 AC_SUBST([LIBICONV])
170 AC_SUBST([LTLIBICONV])
171])
172
173dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
174dnl avoid warnings like
175dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
176dnl This is tricky because of the way 'aclocal' is implemented:
177dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
178dnl Otherwise aclocal's initial scan pass would miss the macro definition.
179dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
180dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
181dnl warnings.
182m4_define([gl_iconv_AC_DEFUN],
183 m4_version_prereq([2.64],
184 [[AC_DEFUN_ONCE(
185 [$1], [$2])]],
186 [[AC_DEFUN(
187 [$1], [$2])]]))
188gl_iconv_AC_DEFUN([AM_ICONV],
189[
190 AM_ICONV_LINK
191 if test "$am_cv_func_iconv" = yes; then
192 AC_MSG_CHECKING([for iconv declaration])
193 AC_CACHE_VAL([am_cv_proto_iconv], [
194 AC_TRY_COMPILE([
195#include <stdlib.h>
196#include <iconv.h>
197extern
198#ifdef __cplusplus
199"C"
200#endif
201#if defined(__STDC__) || defined(__cplusplus)
202size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
203#else
204size_t iconv();
205#endif
206], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
207 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
208 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
209 AC_MSG_RESULT([
210 $am_cv_proto_iconv])
211 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
212 [Define as const if the declaration of iconv() needs const.])
213 fi
214])
0215
=== modified file 'm4/pandora_64bit.m4'
--- m4/pandora_64bit.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_64bit.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -20,9 +20,9 @@
20 [isainfo_b=`${ISAINFO} -b`],20 [isainfo_b=`${ISAINFO} -b`],
21 [isainfo_b="x"])21 [isainfo_b="x"])
2222
23 AS_IF([test "$isainfo_b" != "x"],[23 AS_IF([test "$isainfo_b" != "x" -a "$isainfo_b" != "32"],[
2424
25 isainfo_k=`${ISAINFO} -k` 25 isainfo_k=`${ISAINFO} -k`
26 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"26 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"
2727
28 AS_IF([test "x$ac_enable_64bit" = "xyes"],[28 AS_IF([test "x$ac_enable_64bit" = "xyes"],[
@@ -32,7 +32,7 @@
32 ])32 ])
3333
34 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[34 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
35 dnl The user hasn't overridden the default libdir, so we'll 35 dnl The user hasn't overridden the default libdir, so we'll
36 dnl the dir suffix to match solaris 32/64-bit policy36 dnl the dir suffix to match solaris 32/64-bit policy
37 libdir="${libdir}/${isainfo_k}"37 libdir="${libdir}/${isainfo_k}"
38 ])38 ])
3939
=== added file 'm4/pandora_bison.m4'
--- m4/pandora_bison.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_bison.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,33 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl Copyright (C) 2010 Hartmut Holzgraefe
3dnl This file is free software; Monty Taylor and Hartmut Holzgraefe
4dnl give unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([_PANDORA_SEARCH_BISON],[
8
9 dnl --------------------------------------------------------------------
10 dnl Check for bison
11 dnl --------------------------------------------------------------------
12
13 AC_CHECK_PROGS([YACC], ['bison -y'], [:])
14 AS_IF([test "x$YACC" = "x:"],[
15 pandora_have_bison=no
16 YACC='if test -f "$@"; then echo "WARNING: no proper bison binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper bison binary found"; exit 1; fi;'
17 ],[
18 pandora_have_bison=yes
19 ])
20
21 AM_CONDITIONAL(HAVE_BISON, [test "x${pandora_have_bison}" = "xyes"])
22])
23
24AC_DEFUN([PANDORA_HAVE_BISON],[
25 AC_REQUIRE([_PANDORA_SEARCH_BISON])
26])
27
28AC_DEFUN([PANDORA_REQUIRE_BISON],[
29 AC_REQUIRE([PANDORA_HAVE_BISON])
30 AS_IF([test "x${pandora_have_bison}" = "xno" -a "$pandora_building_from_bzr" = "yes"],
31 PANDORA_MSG_ERROR(["bison is required for ${PACKAGE} to build from a bzr branch"])
32 )
33])
034
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2011-03-03 07:48:59 +0000
+++ m4/pandora_canonical.m4 2011-04-16 05:39:23 +0000
@@ -4,7 +4,15 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.177])
8
9AC_DEFUN([PANDORA_MSG_ERROR],[
10 AS_IF([test "x${pandora_cv_skip_requires}" != "xno"],[
11 AC_MSG_ERROR($1)
12 ],[
13 AC_MSG_WARN($1)
14 ])
15])
816
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[17AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 AC_ARG_ENABLE([fat-binaries],18 AC_ARG_ENABLE([fat-binaries],
@@ -25,7 +33,7 @@
2533
26AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[34AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[
27 AS_IF([test "x${prefix}" = "x"],[35 AS_IF([test "x${prefix}" = "x"],[
28 AC_MSG_ERROR([--prefix requires an argument])36 PANDORA_MSG_ERROR([--prefix requires an argument])
29 ])37 ])
30])38])
3139
@@ -115,7 +123,7 @@
115 vc_changelog=yes123 vc_changelog=yes
116 ])124 ])
117 m4_if(PCT_VERSION_FROM_VC,yes,[125 m4_if(PCT_VERSION_FROM_VC,yes,[
118 PANDORA_VC_VERSION126 PANDORA_VC_INFO_HEADER
119 ],[127 ],[
120 PANDORA_TEST_VC_DIR128 PANDORA_TEST_VC_DIR
121129
@@ -151,7 +159,7 @@
151 PANDORA_CHECK_CXX_STANDARD159 PANDORA_CHECK_CXX_STANDARD
152 m4_if(PCT_REQUIRE_CXX, [yes], [160 m4_if(PCT_REQUIRE_CXX, [yes], [
153 AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[161 AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
154 AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])162 PANDORA_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
155 ])163 ])
156 ])164 ])
157 PANDORA_CXX_CSTDINT165 PANDORA_CXX_CSTDINT
@@ -182,12 +190,12 @@
182 # off_t is not a builtin type190 # off_t is not a builtin type
183 AC_CHECK_SIZEOF(off_t, 4)191 AC_CHECK_SIZEOF(off_t, 4)
184 AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[192 AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[
185 AC_MSG_ERROR("${PACKAGE} needs an off_t type.")193 PANDORA_MSG_ERROR("${PACKAGE} needs an off_t type.")
186 ])194 ])
187195
188 AC_CHECK_SIZEOF(size_t)196 AC_CHECK_SIZEOF(size_t)
189 AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[197 AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[
190 AC_MSG_ERROR("${PACKAGE} needs an size_t type.")198 PANDORA_MSG_ERROR("${PACKAGE} needs an size_t type.")
191 ])199 ])
192200
193 AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])201 AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])
@@ -268,6 +276,7 @@
268276
269 AC_LIB_PREFIX277 AC_LIB_PREFIX
270 PANDORA_HAVE_BETTER_MALLOC278 PANDORA_HAVE_BETTER_MALLOC
279 PANDORA_WITH_VALGRIND
271280
272 AC_CHECK_PROGS([DOXYGEN], [doxygen])281 AC_CHECK_PROGS([DOXYGEN], [doxygen])
273 AC_CHECK_PROGS([PERL], [perl])282 AC_CHECK_PROGS([PERL], [perl])
@@ -328,6 +337,7 @@
328#error "You should include config.h as your first include file"337#error "You should include config.h as your first include file"
329#endif338#endif
330339
340#include <config/top.h>
331])341])
332 mkdir -p config342 mkdir -p config
333 cat > config/top.h.stamp <<EOF_CONFIG_TOP343 cat > config/top.h.stamp <<EOF_CONFIG_TOP
@@ -374,14 +384,6 @@
374#define SOCKET_ERROR -1384#define SOCKET_ERROR -1
375#define closesocket(a) close(a)385#define closesocket(a) close(a)
376#define get_socket_errno() errno386#define get_socket_errno() errno
377#endif // TARGET_OS_WINDOWS
378
379#ifndef HAVE_MSG_NOSIGNAL
380#define MSG_NOSIGNAL 0
381#endif
382
383#ifndef HAVE_MSG_DONTWAIT
384#define MSG_DONTWAIT 0
385#endif387#endif
386388
387#if defined(__cplusplus)389#if defined(__cplusplus)
388390
=== modified file 'm4/pandora_check_compiler_version.m4'
--- m4/pandora_check_compiler_version.m4 2009-07-08 07:19:19 +0000
+++ m4/pandora_check_compiler_version.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== modified file 'm4/pandora_check_cxx_standard.m4'
--- m4/pandora_check_cxx_standard.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_check_cxx_standard.m4 2011-04-16 05:39:23 +0000
@@ -1,10 +1,10 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[6AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
7 AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])7 dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
8 AS_IF([test "$GCC" = "yes"],8 AS_IF([test "$GCC" = "yes"],
9 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],9 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
10 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],10 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
1111
=== modified file 'm4/pandora_cinttypes.m4'
--- m4/pandora_cinttypes.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_cinttypes.m4 2011-04-16 05:39:23 +0000
@@ -1,3 +1,8 @@
1# Copyright (C) 2008 Sun Microsystems, Inc.
2# This file is free software; Sun Microsystems, Inc.
3# gives unlimited permission to copy and/or distribute it,
4# with or without modifications, as long as this notice is preserved.
5
1# We check two things: where the include file is for cinttypes. We6# We check two things: where the include file is for cinttypes. We
2# include AC_TRY_COMPILE for all the combinations we've seen in the7# include AC_TRY_COMPILE for all the combinations we've seen in the
3# wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or 8# wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or
49
=== added file 'm4/pandora_compile_stdcxx_0x.m4'
--- m4/pandora_compile_stdcxx_0x.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_compile_stdcxx_0x.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,103 @@
1# ===========================================================================
2# http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7# AC_CXX_COMPILE_STDCXX_0X
8#
9# DESCRIPTION
10#
11# Check for baseline language coverage in the compiler for the C++0x
12# standard.
13#
14# LICENSE
15#
16# Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com>
17#
18# Copying and distribution of this file, with or without modification, are
19# permitted in any medium without royalty provided the copyright notice
20# and this notice are preserved.
21
22AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [
23 AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
24 ac_cv_cxx_compile_cxx0x_native,
25 [AC_LANG_SAVE
26 AC_LANG_CPLUSPLUS
27 AC_TRY_COMPILE([
28 template <typename T>
29 struct check
30 {
31 static_assert(sizeof(int) <= sizeof(T), "not big enough");
32 };
33
34 typedef check<check<bool>> right_angle_brackets;
35
36 int a;
37 decltype(a) b;
38
39 typedef check<int> check_type;
40 check_type c;
41 check_type&& cr = c;],,
42 ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
43 AC_LANG_RESTORE
44 ])
45
46 AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
47 ac_cv_cxx_compile_cxx0x_cxx,
48 [AC_LANG_SAVE
49 AC_LANG_CPLUSPLUS
50 ac_save_CXXFLAGS="$CXXFLAGS"
51 CXXFLAGS="$CXXFLAGS -std=c++0x"
52 AC_TRY_COMPILE([
53 template <typename T>
54 struct check
55 {
56 static_assert(sizeof(int) <= sizeof(T), "not big enough");
57 };
58
59 typedef check<check<bool>> right_angle_brackets;
60
61 int a;
62 decltype(a) b;
63
64 typedef check<int> check_type;
65 check_type c;
66 check_type&& cr = c;],,
67 ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
68 CXXFLAGS="$ac_save_CXXFLAGS"
69 AC_LANG_RESTORE
70 ])
71
72 AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
73 ac_cv_cxx_compile_cxx0x_gxx,
74 [AC_LANG_SAVE
75 AC_LANG_CPLUSPLUS
76 ac_save_CXXFLAGS="$CXXFLAGS"
77 CXXFLAGS="$CXXFLAGS -std=gnu++0x"
78 AC_TRY_COMPILE([
79 template <typename T>
80 struct check
81 {
82 static_assert(sizeof(int) <= sizeof(T), "not big enough");
83 };
84
85 typedef check<check<bool>> right_angle_brackets;
86
87 int a;
88 decltype(a) b;
89
90 typedef check<int> check_type;
91 check_type c;
92 check_type&& cr = c;],,
93 ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
94 CXXFLAGS="$ac_save_CXXFLAGS"
95 AC_LANG_RESTORE
96 ])
97
98 if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
99 test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
100 test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
101 AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
102 fi
103])
0104
=== modified file 'm4/pandora_cstdint.m4'
--- m4/pandora_cstdint.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_cstdint.m4 2011-04-16 05:39:23 +0000
@@ -1,3 +1,8 @@
1# Copyright (C) 2008 Sun Microsystems, Inc.
2# This file is free software; Sun Microsystems, Inc.
3# gives unlimited permission to copy and/or distribute it,
4# with or without modifications, as long as this notice is preserved.
5
1# We check two things: where the include file is for cstdint. We6# We check two things: where the include file is for cstdint. We
2# include AC_TRY_COMPILE for all the combinations we've seen in the7# include AC_TRY_COMPILE for all the combinations we've seen in the
3# wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or 8# wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or
49
=== modified file 'm4/pandora_cxx_demangle.m4'
--- m4/pandora_cxx_demangle.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_cxx_demangle.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== modified file 'm4/pandora_drizzle_build.m4'
--- m4/pandora_drizzle_build.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_drizzle_build.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -9,11 +9,6 @@
99
10AC_DEFUN([PANDORA_DRIZZLE_BUILD],[10AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
1111
12 PANDORA_HAVE_CXX_UNORDERED
13
14 PANDORA_CXX_CSTDINT
15 PANDORA_CXX_CINTTYPES
16
17 AC_STRUCT_TM12 AC_STRUCT_TM
1813
19 AC_FUNC_ALLOCA14 AC_FUNC_ALLOCA
@@ -38,7 +33,7 @@
38 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)33 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
39 AC_CHECK_HEADERS(select.h sys/select.h)34 AC_CHECK_HEADERS(select.h sys/select.h)
40 AC_CHECK_HEADERS(utime.h sys/utime.h )35 AC_CHECK_HEADERS(utime.h sys/utime.h )
41 AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)36 AC_CHECK_HEADERS(synch.h sys/mman.h)
42 AC_CHECK_HEADERS(sched.h)37 AC_CHECK_HEADERS(sched.h)
43 AC_CHECK_HEADERS(sys/prctl.h)38 AC_CHECK_HEADERS(sys/prctl.h)
44 AC_CHECK_HEADERS(execinfo.h)39 AC_CHECK_HEADERS(execinfo.h)
@@ -68,44 +63,20 @@
68 ]])63 ]])
69 AC_CHECK_TYPES([uint, ulong])64 AC_CHECK_TYPES([uint, ulong])
7065
66 PANDORA_REQUIRE_BISON
67
71 PANDORA_CXX_DEMANGLE68 PANDORA_CXX_DEMANGLE
72 PANDORA_REQUIRE_BOOST([1.32])69 PANDORA_REQUIRE_BOOST([1.38])
7370 PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
7471 PANDORA_REQUIRE_BOOST_THREAD
75 AH_TOP([72 PANDORA_REQUIRE_BOOST_REGEX
76#ifndef __CONFIG_H__73 PANDORA_REQUIRE_BOOST_DATE_TIME
77#define __CONFIG_H__74 PANDORA_REQUIRE_BOOST_FILESYSTEM
7875 PANDORA_REQUIRE_BOOST_IOSTREAMS
79#include "config/top.h"76
80])77 LIBDRIZZLE_CPPFLAGS="-I\${top_builddir}/libdrizzle-2.0 -I\${top_srcdir}/libdrizzle-2.0"
81 mkdir -p config78 OLDLIBDRIZZLE_CPPFLAGS="-I\${top_builddir}/libdrizzle-1.0 -I\${top_srcdir}/libdrizzle-1.0"
82 cat > config/top.h.stamp <<EOF_CONFIG_TOP79 AC_SUBST([LIBDRIZZLE_CPPFLAGS])
8380 AC_SUBST([OLDLIBDRIZZLE_CPPFLAGS])
84#if defined(i386) && !defined(__i386__)81
85#define __i386__
86#endif
87
88#if defined(_FILE_OFFSET_BITS)
89# undef _FILE_OFFSET_BITS
90#endif
91EOF_CONFIG_TOP
92 diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
93 rm -f config/top.h.stamp
94
95
96 AH_BOTTOM([
97#if defined(__cplusplus)
98# include CSTDINT_H
99# include CINTTYPES_H
100#else
101# include <stdint.h>
102# include <inttypes.h>
103#endif
104
105#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
106typedef unsigned long int ulong;
107#endif
108
109#endif /* __CONFIG_H__ */
110 ])
111])82])
11283
=== modified file 'm4/pandora_enable_dtrace.m4'
--- m4/pandora_enable_dtrace.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_enable_dtrace.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -8,32 +8,49 @@
8dnl ---------------------------------------------------------------------------8dnl ---------------------------------------------------------------------------
9AC_DEFUN([PANDORA_ENABLE_DTRACE],[9AC_DEFUN([PANDORA_ENABLE_DTRACE],[
10 AC_ARG_ENABLE([dtrace],10 AC_ARG_ENABLE([dtrace],
11 [AS_HELP_STRING([--enable-dtrace],11 [AS_HELP_STRING([--disable-dtrace],
12 [Build with support for the DTRACE. @<:@default=off@:>@])],12 [Build with support for the DTRACE. @<:@default=on@:>@])],
13 [ac_cv_enable_dtrace="yes"],13 [ac_cv_enable_dtrace="$enableval"],
14 [ac_cv_enable_dtrace="no"])14 [ac_cv_enable_dtrace="yes"])
1515
16 AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[16 AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
17 AC_CHECK_PROGS([DTRACE], [dtrace])17 AC_CHECK_PROGS([DTRACE], [dtrace])
18 AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[18 AC_CHECK_HEADERS(sys/sdt.h)
19 AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])19
20 AC_MSG_CHECKING([if dtrace should instrument object files])20 AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[
21 dnl DTrace on MacOSX does not use -G option21
22 cat >conftest.d <<_ACEOF22 AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
23provider Example {23 cat >conftest.d <<_ACEOF
24 probe increment(int);24provider Example {
25};25 probe increment(int);
26_ACEOF26};
27 $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero27_ACEOF
28 AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],28 $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero
29 AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes],
30 [ac_cv_dtrace_works=no])
31 rm -f conftest.h conftest.d
32 ])
33 AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[
34 AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
35 ])
36 AC_CACHE_CHECK([if dtrace should instrument object files],
37 [ac_cv_dtrace_needs_objects],[
38 dnl DTrace on MacOSX does not use -G option
39 cat >conftest.d <<_ACEOF
40provider Example {
41 probe increment(int);
42};
43_ACEOF
44 $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero
45 AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
29 [ac_cv_dtrace_needs_objects=no])46 [ac_cv_dtrace_needs_objects=no])
30 rm -f conftest.d.o conftest.d47 rm -f conftest.d.o conftest.d
31 AC_MSG_RESULT($ac_cv_dtrace_needs_objects)48 ])
32 AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX49 AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX
33 ac_cv_have_dtrace=yes50 ac_cv_have_dtrace=yes
34 ])])51 ])])
3552
36AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_have_dtrace" = "xyes"])53AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"])
37AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],54AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],
38 [test "x$ac_cv_dtrace_needs_objects" = "xyes"])55 [test "x$ac_cv_dtrace_needs_objects" = "xyes"])
3956
4057
=== modified file 'm4/pandora_ensure_gcc_version.m4'
--- m4/pandora_ensure_gcc_version.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_ensure_gcc_version.m4 2011-04-16 05:39:23 +0000
@@ -1,8 +1,22 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6AC_DEFUN([_PANDORA_TRY_GCC],[
7 pushdef([Name],[translit([$1],[./-], [___])])
8 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
9 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
10 AC_CHECK_PROGS([CC]NAME,[gcc$1])
11 AC_CHECK_PROGS([CXX]NAME,[g++$1])
12 AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CC_set}" = "x"],
13 [CC="${CC]NAME[}"])
14 AS_IF([test "x${CXX]NAME[}" != "x" -a "x${ac_cv_env_CCX_set}" = "x"],
15 [CXX="${CXX]NAME[}"])
16 AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CPP_set}" = "x"],
17 [CPP="${CC]NAME[} -E"])
18])
19
6dnl If the user is on a Mac and didn't ask for a specific compiler20dnl If the user is on a Mac and didn't ask for a specific compiler
7dnl You're gonna get 4.2.21dnl You're gonna get 4.2.
8AC_DEFUN([PANDORA_MAC_GCC42],22AC_DEFUN([PANDORA_MAC_GCC42],
@@ -10,30 +24,39 @@
10 AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[24 AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[
11 host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'`25 host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'`
12 AS_IF([test "$host_os_version" -lt 10],[26 AS_IF([test "$host_os_version" -lt 10],[
13 AS_IF([test -f /usr/bin/gcc-4.2],27 _PANDORA_TRY_GCC([-4.2])
14 [
15 CPP="/usr/bin/gcc-4.2 -E"
16 CC=/usr/bin/gcc-4.2
17 CXX=/usr/bin/g++-4.2
18 ])
19 ])28 ])
20 ])29 ])
21 ])30 ])
22])31])
2332
33dnl If the user is on CentOS or RHEL and didn't ask for a specific compiler
34dnl You're gonna get 4.4 (forward compatible with 4.5)
35AC_DEFUN([PANDORA_RH_GCC44],
36 [AS_IF([test "$GCC" = "yes"],[
37 AS_IF([test "x${ac_cv_env_CC_set}" = "x"],[
38 _PANDORA_TRY_GCC([44])
39 _PANDORA_TRY_GCC([45])
40 ])
41 ])
42])
43
24dnl 44dnl
25AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[45AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[
26 AC_REQUIRE([PANDORA_MAC_GCC42])46 AC_REQUIRE([PANDORA_MAC_GCC42])
27 AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent],47 AC_REQUIRE([PANDORA_RH_GCC44])
28 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[48 AS_IF([test "$GCC" = "yes"],[
29#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))49 AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent],
50 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
51#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2))
30# error GCC is Too Old!52# error GCC is Too Old!
31#endif53#endif
32 ]])],54 ]])],
33 [ac_cv_gcc_recent=yes],55 [ac_cv_gcc_recent=yes],
34 [ac_cv_gcc_recent=no])])56 [ac_cv_gcc_recent=no])])
35 AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"],57 AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"],
36 AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2]))58 PANDORA_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2]))
37 AS_IF([test "$ac_cv_gcc_recent" = "no"],59 AS_IF([test "$ac_cv_gcc_recent" = "no"],
38 AC_MSG_ERROR([Your version of GCC is too old. At least version 4.1 is required]))60 PANDORA_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required. On RHEL/CentOS systems this is found in the gcc44 and gcc44-c++ packages.]))
61 ])
39])62])
4063
=== modified file 'm4/pandora_extensions.m4'
--- m4/pandora_extensions.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_extensions.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== modified file 'm4/pandora_fdatasync.m4'
--- m4/pandora_fdatasync.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_fdatasync.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== added file 'm4/pandora_flex.m4'
--- m4/pandora_flex.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_flex.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,33 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl Copyright (C) 2010 Hartmut Holzgraefe
3dnl This file is free software; Monty Taylor and Hartmut Holzgraefe
4dnl give unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([_PANDORA_SEARCH_FLEX],[
8
9 dnl --------------------------------------------------------------------
10 dnl Check for flex
11 dnl --------------------------------------------------------------------
12
13 AC_CHECK_PROGS([LEX], ['flex'], [:])
14 AS_IF([test "x$LEX" = "x:"],[
15 pandora_have_flex=no
16 LEX='if test -f "$@"; then echo "WARNING: no proper flex binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper flex binary found"; exit 1; fi;'
17 ],[
18 pandora_have_flex=yes
19 ])
20
21 AM_CONDITIONAL(HAVE_FLEX, [test "x${pandora_have_flex}" = "xyes"])
22])
23
24AC_DEFUN([PANDORA_HAVE_FLEX],[
25 AC_REQUIRE([_PANDORA_SEARCH_FLEX])
26])
27
28AC_DEFUN([PANDORA_REQUIRE_FLEX],[
29 AC_REQUIRE([PANDORA_HAVE_FLEX])
30 AS_IF([test "x${pandora_have_flex}" = "xno" -a "$pandora_building_from_bzr" = "yes"],
31 PANDORA_MSG_ERROR(["flex is required for ${PACKAGE} to build from a bzr branch"])
32 )
33])
034
=== modified file 'm4/pandora_have_better_malloc.m4'
--- m4/pandora_have_better_malloc.m4 2010-01-13 10:48:24 +0000
+++ m4/pandora_have_better_malloc.m4 2011-04-16 05:39:23 +0000
@@ -1,11 +1,9 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[6AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[
7 AC_REQUIRE([AC_FUNC_MALLOC])
8 AC_REQUIRE([AC_FUNC_REALLOC])
9 AC_REQUIRE([AC_LIB_PREFIX])7 AC_REQUIRE([AC_LIB_PREFIX])
108
11 AC_ARG_ENABLE([umem],9 AC_ARG_ENABLE([umem],
1210
=== added file 'm4/pandora_have_boost.m4'
--- m4/pandora_have_boost.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_boost.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,93 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for boost
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([boost],
14 [AS_HELP_STRING([--disable-boost],
15 [Build with boost support @<:@default=on@:>@])],
16 [ac_enable_boost="$enableval"],
17 [ac_enable_boost="yes"])
18
19 AS_IF([test "x$ac_enable_boost" = "xyes"],[
20 dnl link against libc because we're just looking for headers here
21 AC_LANG_PUSH(C++)
22 AC_LIB_HAVE_LINKFLAGS(c,,
23 [#include <boost/pool/pool.hpp>],
24 [boost::pool<> test_pool(1);],
25 [system])
26 AC_LANG_POP()
27 ],[
28 ac_cv_boost="no"
29 ])
30
31
32 AS_IF([test "x$1" != "x"],[
33 AC_CACHE_CHECK([if boost is recent enough],
34 [pandora_cv_recent_boost],[
35 pandora_need_boost_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d00", $[]1, $[]2 ;'`
36 AS_IF([test "x${pandora_need_boost_version}" = "x000000"],[
37 pandora_cv_recent_boost=yes
38 ],[
39 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
40#include <boost/version.hpp>
41
42#if BOOST_VERSION < ${pandora_need_boost_version}
43# error boost too old!
44#endif
45 ]],[[]])
46 ],[
47 pandora_cv_recent_boost=yes
48 ],[
49 pandora_cv_recent_boost=no
50 ])
51 ])
52 ])
53 AS_IF([test "x${pandora_cv_recent_boost}" = "xno"],[
54 ac_cv_boost=no
55 ])
56 ])
57
58 AS_IF([test "x${ac_gcc_profile_mode}" = "xyes"],[
59 AC_CACHE_CHECK([if boost is recent enough for GCC Profile Mode],
60 [pandora_cv_boost_profile],[
61 pandora_need_boost_version=104300
62 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
63#include <boost/version.hpp>
64
65#if BOOST_VERSION < ${pandora_need_boost_version}
66# error boost too old!
67#endif
68 ]],[[]])
69 ],[
70 pandora_cv_boost_profile=yes
71 ],[
72 pandora_cv_boost_profile=no
73 ])
74 ])
75 AS_IF([test "x${pandora_cv_boost_profile}" = "xyes"],[
76 AC_DEFINE([BOOST_DETAIL_NO_CONTAINER_FWD],[1],[Disable forward decl of stl in boost])
77 ])
78 ])
79
80 AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"])
81
82])
83
84AC_DEFUN([PANDORA_HAVE_BOOST],[
85 _PANDORA_SEARCH_BOOST($1)
86])
87
88AC_DEFUN([PANDORA_REQUIRE_BOOST],[
89 PANDORA_HAVE_BOOST($1)
90 AS_IF([test x$ac_cv_boost = xno],
91 PANDORA_MSG_ERROR([boost is required for ${PACKAGE}]))
92])
93
094
=== modified file 'm4/pandora_have_gcc_atomics.m4'
--- m4/pandora_have_gcc_atomics.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_have_gcc_atomics.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== added file 'm4/pandora_have_libaio.m4'
--- m4/pandora_have_libaio.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libaio.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,56 @@
1dnl Copyright (C) 2011 Andrew Hutchings
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libaio
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_CHECK_HEADERS(libaio.h)
15 AC_LIB_HAVE_LINKFLAGS(aio,,
16 [
17 #include <libaio.h>
18 ],
19 [
20 int aio_cmd= IO_CMD_PREAD;
21 ])
22
23 AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"])
24
25 AS_IF([test "x${ac_cv_libaio}" = "xyes"],[
26 AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB])
27 ])
28])
29
30AC_DEFUN([_PANDORA_HAVE_LIBAIO],[
31
32 AC_ARG_ENABLE([libaio],
33 [AS_HELP_STRING([--disable-libaio],
34 [Build with libaio support @<:@default=on@:>@])],
35 [ac_enable_libaio="$enableval"],
36 [ac_enable_libaio="yes"])
37
38 _PANDORA_SEARCH_LIBAIO
39])
40
41
42AC_DEFUN([PANDORA_HAVE_LIBAIO],[
43 AC_REQUIRE([_PANDORA_HAVE_LIBAIO])
44])
45
46AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[
47 ac_enable_libaio="yes"
48 _PANDORA_SEARCH_LIBAIO
49 AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[
50 PANDORA_MSG_ERROR([Couldn't find libaio.h. On Debian this can be found in libaio-dev. On Redhat this can be found in libaio-devel.])
51 ])
52])
53
54AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[
55 AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO])
56])
057
=== modified file 'm4/pandora_have_libavahi.m4'
--- m4/pandora_have_libavahi.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libavahi.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -37,5 +37,5 @@
37AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[37AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[
38 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])38 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
39 AS_IF([test "x${ac_cv_libavahi}" = "xno"],39 AS_IF([test "x${ac_cv_libavahi}" = "xno"],
40 AC_MSG_ERROR([libavahi is required for ${PACKAGE}]))40 PANDORA_MSG_ERROR([libavahi is required for ${PACKAGE}]))
41])41])
4242
=== modified file 'm4/pandora_have_libbdb.m4'
--- m4/pandora_have_libbdb.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libbdb.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -36,5 +36,5 @@
36AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[36AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[
37 AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])37 AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])
38 AS_IF([test "x${ac_cv_libbdb}" = "xno"],38 AS_IF([test "x${ac_cv_libbdb}" = "xno"],
39 AC_MSG_ERROR([libbdb is required for ${PACKAGE}]))39 PANDORA_MSG_ERROR([libbdb is required for ${PACKAGE}]))
40])40])
4141
=== added file 'm4/pandora_have_libboost_date_time.m4'
--- m4/pandora_have_libboost_date_time.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_date_time.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,46 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8 AC_REQUIRE([ACX_PTHREAD])
9
10 dnl --------------------------------------------------------------------
11 dnl Check for Boost.Date_Time
12 dnl --------------------------------------------------------------------
13
14 AC_LANG_PUSH(C++)
15 AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[
16 #include <boost/date_time.hpp>
17 ],[
18 boost::gregorian::date weekstart(2002,2,1);
19 ])
20 AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[
21 AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[
22 #include <boost/date_time.hpp>
23 ],[
24 boost::gregorian::date weekstart(2002,2,1);
25 ])
26 ])
27 AC_LANG_POP()
28
29 AM_CONDITIONAL(HAVE_BOOST_DATE_TIME,
30 [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"])
31 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}"
32 AC_SUBST(BOOST_LIBS)
33])
34
35AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[
36 PANDORA_HAVE_BOOST($1)
37 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
38])
39
40AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[
41 PANDORA_REQUIRE_BOOST($1)
42 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
43 AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"],
44 PANDORA_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}]))
45])
46
047
=== added file 'm4/pandora_have_libboost_filesystem.m4'
--- m4/pandora_have_libboost_filesystem.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_filesystem.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,48 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for Boost.Filesystem
11 dnl --------------------------------------------------------------------
12
13 AC_LANG_PUSH(C++)
14 AC_DEFINE([BOOST_FILESYSTEM_DEPRECATED], [1],
15 [Use the v2 interface until we can stop using old versions])
16
17 AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,boost_system-mt,[
18 #include <boost/filesystem.hpp>
19 ],[
20 boost::filesystem::path my_path("some_dir/file.txt");
21 ])
22 AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[
23 AC_LIB_HAVE_LINKFLAGS(boost_filesystem,boost_system,[
24 #include <boost/filesystem.hpp>
25 ],[
26 boost::filesystem::path my_path("some_dir/file.txt");
27 ])
28 ])
29 AC_LANG_POP()
30
31 AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
32 [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
33 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
34 AC_SUBST(BOOST_LIBS)
35])
36
37AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[
38 PANDORA_HAVE_BOOST($1)
39 _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
40])
41
42AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[
43 PANDORA_REQUIRE_BOOST($1)
44 _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
45 AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"],
46 PANDORA_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}]))
47])
48
049
=== added file 'm4/pandora_have_libboost_iostreams.m4'
--- m4/pandora_have_libboost_iostreams.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_iostreams.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,49 @@
1dnl Copyright (C) 2010 Andrew Hutchings
2dnl This file is free software; Andrew Hutchings
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_IOSTREAMS],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for Boost.Iostreams
11 dnl --------------------------------------------------------------------
12
13 AC_LANG_PUSH(C++)
14 AC_LIB_HAVE_LINKFLAGS(boost_iostreams-mt,,[
15 #include <boost/iostreams/stream.hpp>
16 #include <boost/iostreams/device/array.hpp>
17 ],[
18 const char* input= "hello world";
19 boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
20 ])
21 AS_IF([test "x${ac_cv_libboost_iostreams_mt}" = "xno"],[
22 AC_LIB_HAVE_LINKFLAGS(boost_iostreams,,[
23 #include <boost/iostreams/stream.hpp>
24 #include <boost/iostreams/device/array.hpp>
25 ],[
26 const char* input= "hello world";
27 boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
28 ])
29 ])
30 AC_LANG_POP()
31
32 AM_CONDITIONAL(HAVE_BOOST_IOSTREAMS,
33 [test "x${ac_cv_libboost_iostreams}" = "xyes" -o "x${ac_cv_libboost_iostreams_mt}" = "xyes"])
34 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_IOSTREAMS_MT} ${LTLIBBOOST_IOSTREAMS}"
35 AC_SUBST(BOOST_LIBS)
36])
37
38AC_DEFUN([PANDORA_HAVE_BOOST_IOSTREAMS],[
39 PANDORA_HAVE_BOOST($1)
40 _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
41])
42
43AC_DEFUN([PANDORA_REQUIRE_BOOST_IOSTREAMS],[
44 PANDORA_REQUIRE_BOOST($1)
45 _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
46 AS_IF([test "x${ac_cv_libboost_iostreams}" = "xno" -a "x${ac_cv_libboost_iostreams_mt}" = "xno"],
47 PANDORA_MSG_ERROR([Boost.Iostreams is required for ${PACKAGE}]))
48])
49
050
=== added file 'm4/pandora_have_libboost_options.m4'
--- m4/pandora_have_libboost_options.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_options.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,47 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for boost::program_options
11 dnl --------------------------------------------------------------------
12
13 AC_LANG_PUSH(C++)
14 AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[
15 #include <boost/program_options.hpp>
16 ],[
17 boost::program_options::options_description d;
18 d.add_options()("a","some option");
19 ])
20 AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[
21 AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
22 #include <boost/program_options.hpp>
23 ],[
24 boost::program_options::options_description d;
25 d.add_options()("a","some option");
26 ])
27 ])
28 AC_LANG_POP()
29
30 AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
31 [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"])
32 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}"
33 AC_SUBST(BOOST_LIBS)
34])
35
36AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
37 PANDORA_HAVE_BOOST($1)
38 _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
39])
40
41AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
42 PANDORA_REQUIRE_BOOST($1)
43 _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
44 AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"],
45 PANDORA_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))
46])
47
048
=== added file 'm4/pandora_have_libboost_regex.m4'
--- m4/pandora_have_libboost_regex.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_regex.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,54 @@
1dnl Copyright (C) 2010 Andrew Hutchings
2dnl This file is free software; Andrew Hutchings
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_REGEX],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8 AC_REQUIRE([ACX_PTHREAD])
9
10 dnl --------------------------------------------------------------------
11 dnl Check for boost::regex
12 dnl --------------------------------------------------------------------
13
14 save_CFLAGS="${CFLAGS}"
15 save_CXXFLAGS="${CXXFLAGS}"
16 CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
17 CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
18
19 AC_LANG_PUSH(C++)
20 AC_LIB_HAVE_LINKFLAGS(boost_regex-mt,,[
21 #include <boost/regex.hpp>
22 ],[
23 boost::regex test_regex("drizzle");
24 ])
25 AS_IF([test "x${ac_cv_libboost_regex_mt}" = "xno"],[
26 AC_LIB_HAVE_LINKFLAGS(boost_regex,,[
27 #include <boost/regex.hpp>
28 ],[
29 boost::regex test_regex("drizzle");
30 ])
31 ])
32 AC_LANG_POP()
33 CFLAGS="${save_CFLAGS}"
34 CXXFLAGS="${save_CXXFLAGS}"
35
36
37 AM_CONDITIONAL(HAVE_BOOST_REGEX,
38 [test "x${ac_cv_libboost_regex}" = "xyes" -o "x${ac_cv_libboost_regex_mt}" = "xyes"])
39 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_REGEX_MT} ${LTLIBBOOST_REGEX}"
40 AC_SUBST(BOOST_LIBS)
41])
42
43AC_DEFUN([PANDORA_HAVE_BOOST_REGEX],[
44 PANDORA_HAVE_BOOST($1)
45 _PANDORA_SEARCH_BOOST_REGEX($1)
46])
47
48AC_DEFUN([PANDORA_REQUIRE_BOOST_REGEX],[
49 PANDORA_REQUIRE_BOOST($1)
50 _PANDORA_SEARCH_BOOST_REGEX($1)
51 AS_IF([test "x${ac_cv_libboost_regex}" = "xno" -a "x${ac_cv_libboost_regex_mt}" = "xno"],
52 PANDORA_MSG_ERROR([boost::regex is required for ${PACKAGE}]))
53])
54
055
=== added file 'm4/pandora_have_libboost_test.m4'
--- m4/pandora_have_libboost_test.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_test.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,45 @@
1dnl Copyright (C) 2011 Andrew Hutchings
2dnl This file is free software; Andrew Hutchings
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_TEST],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for boost::test
11 dnl --------------------------------------------------------------------
12
13 AC_LANG_PUSH(C++)
14 AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework-mt,,[
15 #include <boost/test/unit_test.hpp>
16 ],[
17 boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
18 ])
19 AS_IF([test "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],[
20 AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework,,[
21 #include <boost/test/unit_test.hpp>
22 ],[
23 boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
24 ])
25 ])
26 AC_LANG_POP()
27
28 AM_CONDITIONAL(HAVE_BOOST_TEST,
29 [test "x${ac_cv_libboost_unit_test_framework}" = "xyes" -o "x${ac_cv_libboost_unit_test_framework_mt}" = "xyes"])
30 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_TEST_MT} ${LTLIBBOOST_TEST}"
31 AC_SUBST(BOOST_LIBS)
32])
33
34AC_DEFUN([PANDORA_HAVE_BOOST_TEST],[
35 PANDORA_HAVE_BOOST($1)
36 _PANDORA_SEARCH_BOOST_TEST($1)
37])
38
39AC_DEFUN([PANDORA_REQUIRE_BOOST_TEST],[
40 PANDORA_REQUIRE_BOOST($1)
41 _PANDORA_SEARCH_BOOST_TEST($1)
42 AS_IF([test "x${ac_cv_libboost_unit_test_framework}" = "xno" -a "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],
43 PANDORA_MSG_ERROR([boost::test is required for ${PACKAGE}]))
44])
45
046
=== added file 'm4/pandora_have_libboost_thread.m4'
--- m4/pandora_have_libboost_thread.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_thread.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,54 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_THREAD],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8 AC_REQUIRE([ACX_PTHREAD])
9
10 dnl --------------------------------------------------------------------
11 dnl Check for boost::thread
12 dnl --------------------------------------------------------------------
13
14 save_CFLAGS="${CFLAGS}"
15 save_CXXFLAGS="${CXXFLAGS}"
16 CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
17 CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
18
19 AC_LANG_PUSH(C++)
20 AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[
21 #include <boost/thread.hpp>
22 ],[
23 boost::thread id;
24 ])
25 AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[
26 AC_LIB_HAVE_LINKFLAGS(boost_thread,,[
27 #include <boost/thread.hpp>
28 ],[
29 boost::thread id;
30 ])
31 ])
32 AC_LANG_POP()
33 CFLAGS="${save_CFLAGS}"
34 CXXFLAGS="${save_CXXFLAGS}"
35
36
37 AM_CONDITIONAL(HAVE_BOOST_THREAD,
38 [test "x${ac_cv_libboost_thread}" = "xyes" -o "x${ac_cv_libboost_thread_mt}" = "xyes"])
39 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_THREAD_MT} ${LTLIBBOOST_THREAD}"
40 AC_SUBST(BOOST_LIBS)
41])
42
43AC_DEFUN([PANDORA_HAVE_BOOST_THREAD],[
44 PANDORA_HAVE_BOOST($1)
45 _PANDORA_SEARCH_BOOST_THREAD($1)
46])
47
48AC_DEFUN([PANDORA_REQUIRE_BOOST_THREAD],[
49 PANDORA_REQUIRE_BOOST($1)
50 _PANDORA_SEARCH_BOOST_THREAD($1)
51 AS_IF([test "x${ac_cv_libboost_thread}" = "xno" -a "x${ac_cv_libboost_thread_mt}" = "xno"],
52 PANDORA_MSG_ERROR([boost::thread is required for ${PACKAGE}]))
53])
54
055
=== modified file 'm4/pandora_have_libcassandra.m4'
--- m4/pandora_have_libcassandra.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_have_libcassandra.m4 2011-04-16 05:39:23 +0000
@@ -39,6 +39,6 @@
39AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[39AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[
40 AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA])40 AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA])
41 AS_IF([test "x$ac_cv_libcassandra" = "xno"],[41 AS_IF([test "x$ac_cv_libcassandra" = "xno"],[
42 AC_MSG_ERROR([libcassandra is required for ${PACKAGE}])42 PANDORA_MSG_ERROR([libcassandra is required for ${PACKAGE}])
43 ])43 ])
44])44])
4545
=== added file 'm4/pandora_have_libcurl.m4'
--- m4/pandora_have_libcurl.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libcurl.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,62 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBCURL],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libcurl
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libcurl],
14 [AS_HELP_STRING([--disable-libcurl],
15 [Build with libcurl support @<:@default=on@:>@])],
16 [ac_enable_libcurl="$enableval"],
17 [ac_enable_libcurl="yes"])
18
19 AS_IF([test "x$ac_enable_libcurl" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(curl,,
21 [#include <curl/curl.h>],
22 [
23 CURL *handle;
24 handle=curl_easy_init();
25 ])
26 ],[
27 ac_cv_libcurl="no"
28 ])
29
30 AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
31 [pandora_cv_curl_have_username],[
32 AC_COMPILE_IFELSE([
33 AC_LANG_PROGRAM(
34 [[
35 CURL *handle;
36 handle=curl_easy_init();
37 rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
38 ]])],
39 [pandora_cv_curl_have_username=yes],
40 [pandora_cv_curl_have_username=no])
41 ])
42
43 AM_CONDITIONAL(HAVE_LIBCURL,[test "x${ac_cv_libcurl}" = "xyes"])
44 AS_IF([test "x$pandora_cv_curl_have_username" = "xyes"],
45 AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
46 [Does libcurl provide the CURLOPT_USERNAME constant]))
47
48])
49
50AC_DEFUN([PANDORA_HAVE_LIBCURL],[
51 AC_REQUIRE([_PANDORA_SEARCH_LIBCURL])
52 AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
53 AC_MSG_WARN([libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel.])
54 ])
55])
56
57AC_DEFUN([PANDORA_REQUIRE_LIBCURL],[
58 PANDORA_HAVE_LIBCURL($1)
59 AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
60 PANDORA_MSG_ERROR([libcurl is required for ${PACKAGE}])
61 ])
62])
063
=== modified file 'm4/pandora_have_libdl.m4'
--- m4/pandora_have_libdl.m4 2010-01-13 10:48:24 +0000
+++ m4/pandora_have_libdl.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -42,7 +42,7 @@
42 _PANDORA_SEARCH_LIBDL42 _PANDORA_SEARCH_LIBDL
4343
44 AS_IF([test "$ac_cv_func_dlopen" != "yes"],[44 AS_IF([test "$ac_cv_func_dlopen" != "yes"],[
45 AC_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.])45 PANDORA_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.])
46 ])46 ])
47])47])
4848
4949
=== modified file 'm4/pandora_have_libdrizzle.m4'
--- m4/pandora_have_libdrizzle.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_have_libdrizzle.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -27,6 +27,15 @@
27 ac_cv_libdrizzle="no"27 ac_cv_libdrizzle="no"
28 ])28 ])
29 29
30 AS_IF([test "${ac_cv_libdrizzle}" = "no" -a "${ac_enable_libdrizzle}" = "yes"],[
31
32 PKG_CHECK_MODULES([LIBDRIZZLE], [libdrizzle-1.0], [
33 ac_cv_libdrizzle=yes
34 LTLIBDRIZZLE=${LIBDRIZZLE_LIBS}
35 LIBDRIZZLE=${LIBDRIZZLE_LIBS}
36 ],[test x = y])
37 ])
38
30 AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])39 AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])
31])40])
3241
@@ -37,7 +46,7 @@
37AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[46AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[
38 AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])47 AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])
39 AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[48 AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[
40 AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])49 PANDORA_MSG_ERROR([libdrizzle is required for ${PACKAGE}])
41 ],[50 ],[
42 dnl We need at least 0.8 on Solaris non-sparc51 dnl We need at least 0.8 on Solaris non-sparc
43 AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[52 AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[
@@ -56,6 +65,6 @@
56 [pandora_cv_libdrizzle_recent=yes],65 [pandora_cv_libdrizzle_recent=yes],
57 [pandora_cv_libdrizzle_recent=no])])66 [pandora_cv_libdrizzle_recent=no])])
58 AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[67 AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[
59 AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8])68 PANDORA_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8])
60 ])69 ])
61])70])
6271
=== modified file 'm4/pandora_have_libevent.m4'
--- m4/pandora_have_libevent.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libevent.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -57,7 +57,7 @@
57 _PANDORA_SEARCH_LIBEVENT57 _PANDORA_SEARCH_LIBEVENT
5858
59 AS_IF([test x$ac_cv_libevent = xno],[59 AS_IF([test x$ac_cv_libevent = xno],[
60 AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.])60 PANDORA_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.])
61 ])61 ])
62])62])
6363
6464
=== modified file 'm4/pandora_have_libgearman.m4'
--- m4/pandora_have_libgearman.m4 2009-12-18 19:25:00 +0000
+++ m4/pandora_have_libgearman.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -37,5 +37,5 @@
37AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[37AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
38 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])38 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
39 AS_IF([test "x${ac_cv_libgearman}" = "xno"],39 AS_IF([test "x${ac_cv_libgearman}" = "xno"],
40 AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))40 PANDORA_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))
41])41])
4242
=== added file 'm4/pandora_have_libgtest.m4'
--- m4/pandora_have_libgtest.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libgtest.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,47 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libgtest
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libgtest],
14 [AS_HELP_STRING([--disable-libgtest],
15 [Build with libgtest support @<:@default=on@:>@])],
16 [ac_enable_libgtest="$enableval"],
17 [ac_enable_libgtest="yes"])
18
19 AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
20 AC_LANG_PUSH(C++)
21 save_CXXFLAGS="${CXXFLAGS}"
22 CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
23 AC_LIB_HAVE_LINKFLAGS(gtest,,[
24 #include <gtest/gtest.h>
25TEST(pandora_test_libgtest, PandoraTest)
26{
27 ASSERT_EQ(1, 1);
28}
29 ],[])
30 CXXFLAGS="${save_CXXFLAGS}"
31 AC_LANG_POP()
32 ],[
33 ac_cv_libgtest="no"
34 ])
35
36 AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
37])
38
39AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
40 AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
41])
42
43AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[
44 AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
45 AS_IF([test "x${ac_cv_libgtest}" = "xno"],
46 PANDORA_MSG_ERROR([libgtest is required for ${PACKAGE}]))
47])
048
=== added file 'm4/pandora_have_libhaildb.m4'
--- m4/pandora_have_libhaildb.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libhaildb.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,43 @@
1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libhaildb
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libhaildb],
14 [AS_HELP_STRING([--disable-libhaildb],
15 [Build with libhaildb support @<:@default=on@:>@])],
16 [ac_enable_libhaildb="$enableval"],
17 [ac_enable_libhaildb="yes"])
18
19
20 AS_IF([test "x$ac_enable_libhaildb" = "xyes"],[
21 AC_LIB_HAVE_LINKFLAGS(haildb,,[
22 #include <haildb.h>
23 ],[
24 ib_update_table_statistics(NULL);
25 ])
26 AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
27 AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
28 ])
29 ],[
30 ac_cv_libhaildb="no"
31 ])
32 AM_CONDITIONAL(HAVE_LIBHAILDB, [test "x${ac_cv_libhaildb}" = "xyes"])
33])
34
35AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[
36 AC_REQUIRE([_PANDORA_SEARCH_LIBHAILDB])
37])
38
39AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[
40 AC_REQUIRE([PANDORA_HAVE_LIBHAILDB])
41 AS_IF([test "x${ac_cv_libhaildb}" = "xno"],
42 PANDORA_MSG_ERROR([libhaildb 2.3.2 or later is required for ${PACKAGE}]))
43])
044
=== added file 'm4/pandora_have_libhashkit.m4'
--- m4/pandora_have_libhashkit.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libhashkit.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,42 @@
1dnl Copyright (C) 2010 NorthScale
2dnl This file is free software; NorthScale
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libhashkit
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libhashkit],
14 [AS_HELP_STRING([--disable-libhashkit],
15 [Build with libhashkit support @<:@default=on@:>@])],
16 [ac_enable_libhashkit="$enableval"],
17 [ac_enable_libhashkit="yes"])
18
19 AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(hashkit,,[
21 #include <libhashkit/hashkit.h>
22 ],[
23 hashkit_st foo;
24 hashkit_st *kit = hashkit_create(&foo);
25 hashkit_free(kit);
26 ])
27 ],[
28 ac_cv_libhashkit="no"
29 ])
30
31 AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"])
32])
33
34AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[
35 AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT])
36])
37
38AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[
39 AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT])
40 AS_IF([test x$ac_cv_libhashkit = xno],
41 PANDORA_MSG_ERROR([libhashkit is required for ${PACKAGE}]))
42])
043
=== added file 'm4/pandora_have_libldap.m4'
--- m4/pandora_have_libldap.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libldap.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,73 @@
1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libldap
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(ldap,,
15 [#include <ldap.h>],
16 [
17 LDAP *ldap;
18 ldap_initialize(&ldap, "ldap://localhost/");
19 ])
20 AS_IF([test "x$ac_cv_libldap" = "xno"],
21 [
22 unset ac_cv_libldap
23 unset HAVE_LIBLDAP
24 unset LIBLDAP
25 unset LIBLDAP_PREFIX
26 unset LTLIBLDAP
27 AC_LIB_HAVE_LINKFLAGS(ldap,,
28 [#include <ldap/ldap.h>],
29 [
30 LDAP *ldap;
31 ldap_initialize(&ldap, "ldap://localhost/");
32 ])
33 AS_IF([test "x$ac_cv_libldap" = "xyes"], [
34 ac_cv_ldap_location="<ldap/ldap.h>"
35 ])
36 ],[
37 ac_cv_ldap_location="<ldap.h>"
38 ])
39
40 AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"])
41])
42
43AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[
44
45 AC_ARG_ENABLE([libldap],
46 [AS_HELP_STRING([--disable-libldap],
47 [Build with libldap support @<:@default=on@:>@])],
48 [ac_enable_libldap="$enableval"],
49 [ac_enable_libldap="yes"])
50
51 _PANDORA_SEARCH_LIBLDAP
52])
53
54
55AC_DEFUN([PANDORA_HAVE_LIBLDAP],[
56 AC_REQUIRE([_PANDORA_HAVE_LIBLDAP])
57])
58
59AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[
60 ac_enable_libldap="yes"
61 _PANDORA_SEARCH_LIBLDAP
62
63 AS_IF([test x$ac_cv_libldap = xno],[
64 PANDORA_MSG_ERROR([libldap is required for ${PACKAGE}. On Debian this can be found in libldap2-dev. On RedHat this can be found in openldap-devel.])
65 ],[
66 AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}],
67 [Location of ldap header])
68 ])
69])
70
71AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[
72 AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP])
73])
074
=== modified file 'm4/pandora_have_libmemcached.m4'
--- m4/pandora_have_libmemcached.m4 2011-02-14 23:35:15 +0000
+++ m4/pandora_have_libmemcached.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -11,15 +11,27 @@
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
1212
13 AC_ARG_ENABLE([libmemcached],13 AC_ARG_ENABLE([libmemcached],
14 [AS_HELP_STRING([--enable-libmemcached],14 [AS_HELP_STRING([--disable-libmemcached],
15 [Build with libmemcached support @<:@default=off@:>@])],15 [Build with libmemcached support @<:@default=on@:>@])],
16 [ac_enable_libmemcached="$enableval"],16 [ac_enable_libmemcached="$enableval"],
17 [ac_enable_libmemcached="no"])17 [ac_enable_libmemcached="yes"])
1818
19 AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[19 AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
20
21 AS_IF([test "x$pandora_check_libmemcached_version" != "x"],[
22 pandora_need_libmemcached_version=`echo "$pandora_check_libmemcached_version" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
23 ],[
24 pandora_need_libmemcached_version=000000
25 ])
26
20 AC_LIB_HAVE_LINKFLAGS(memcached,,[27 AC_LIB_HAVE_LINKFLAGS(memcached,,[
21 #include <libmemcached/memcached.h>28 #include <libmemcached/memcached.h>
29 #include <libmemcached/configure.h>
30 #if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]${pandora_need_libmemcached_version}[
31 # error libmemcached too old!
32 #endif
22 ],[33 ],[
34
23 memcached_st memc;35 memcached_st memc;
24 memcached_dump_func *df;36 memcached_dump_func *df;
25 memcached_lib_version();37 memcached_lib_version();
@@ -51,56 +63,20 @@
51 AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[63 AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
52 AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])64 AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
53 ])65 ])
54])66
5567 AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes"])
56AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
57
58 AC_CACHE_CHECK([if libmemcached is recent enough],
59 [pandora_cv_recent_libmemcached],[
60 AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
61 pandora_cv_recent_libmemcached=no
62 ],[
63 AS_IF([test "x$1" != "x"],[
64 pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
65 AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
66 pandora_cv_recent_libmemcached=yes
67 ],[
68 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
69#include <libmemcached/configure.h>
70
71#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
72# error libmemcached too old!
73#endif
74 ]],[[]])
75 ],[
76 pandora_cv_recent_libmemcached=yes
77 ],[
78 pandora_cv_recent_libmemcached=no
79 ])
80 ])
81 ],[
82 pandora_cv_recent_libmemcached=yes
83 ])
84 ])
85 ])
86
87 AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
88 68
89])69])
9070
91AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[71AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
92 AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])72 pandora_check_libmemcached_version=$1
93 _PANDORA_RECENT_LIBMEMCACHED($1)73 _PANDORA_SEARCH_LIBMEMCACHED
94])74])
9575
96AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[76AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
97 PANDORA_HAVE_LIBMEMCACHED($1)77 PANDORA_HAVE_LIBMEMCACHED($1)
98 AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
99 AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
100])78])
10179
102AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[80AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
103 PANDORA_HAVE_LIBMEMCACHED($1)81 PANDORA_HAVE_LIBMEMCACHED($1)
104 AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
105 AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))
106])82])
10783
=== modified file 'm4/pandora_have_libmysqlclient.m4'
--- m4/pandora_have_libmysqlclient.m4 2010-01-28 21:58:37 +0000
+++ m4/pandora_have_libmysqlclient.m4 2011-04-16 05:39:23 +0000
@@ -68,7 +68,7 @@
68AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[68AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[
69 AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT])69 AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT])
70 AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"],70 AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"],
71 AC_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}]))71 PANDORA_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}]))
72])72])
7373
74 AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[74 AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[
@@ -102,20 +102,20 @@
102 MYSQL_INCLUDES="$IBASE $ADDIFLAGS" 102 MYSQL_INCLUDES="$IBASE $ADDIFLAGS"
103103
104 104
105 dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[AC_MSG_ERROR([Can't link against libmysqlclient_r])])105 dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[PANDORA_MSG_ERROR([Can't link against libmysqlclient_r])])
106 dnl First test to see if we can run with only ndbclient106 dnl First test to see if we can run with only ndbclient
107 AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else107 AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else
108 LDFLAGS="$LDFLAGS -lmysys -ldbug"108 LDFLAGS="$LDFLAGS -lmysys -ldbug"
109 AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,)109 AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,)
110 AC_CHECK_LIB([ndbclient],[ndb_init],,[110 AC_CHECK_LIB([ndbclient],[ndb_init],,[
111 AC_MSG_ERROR([Can't link against libndbclient])])111 PANDORA_MSG_ERROR([Can't link against libndbclient])])
112 AC_CHECK_LIB([mystrings],[decimal_bin_size],,[112 AC_CHECK_LIB([mystrings],[decimal_bin_size],,[
113 AC_MSG_ERROR([Can't find decimal_bin_size])])])113 PANDORA_MSG_ERROR([Can't find decimal_bin_size])])])
114 AC_MSG_CHECKING(for NdbApi headers)114 AC_MSG_CHECKING(for NdbApi headers)
115 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[])115 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[])
116 AS_IF([test "$ndbapi_found" = "yes"], 116 AS_IF([test "$ndbapi_found" = "yes"],
117 [AC_MSG_RESULT(found)],117 [AC_MSG_RESULT(found)],
118 [AC_MSG_ERROR([Couldn't find NdbApi.hpp!])])118 [PANDORA_MSG_ERROR([Couldn't find NdbApi.hpp!])])
119 AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop)119 AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop)
120 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[])120 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[])
121 AS_IF([test "$have_cge63" = "yes"],121 AS_IF([test "$have_cge63" = "yes"],
122122
=== added file 'm4/pandora_have_libndbclient.m4'
--- m4/pandora_have_libndbclient.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libndbclient.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,80 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl Copyright (C) 2010 Monty Taylor
5dnl This file is free software; Sun Microsystems
6dnl gives unlimited permission to copy and/or distribute it,
7dnl with or without modifications, as long as this notice is preserved.
8dnl
9
10AC_DEFUN([_PANDORA_SEARCH_LIBNDBCLIENT],[
11
12 AC_REQUIRE([AC_LIB_PREFIX])
13 AC_REQUIRE([PANDORA_WITH_MYSQL])
14
15 AC_ARG_ENABLE([libndbclient],
16 [AS_HELP_STRING([--disable-libndbclient],
17 [Build with libndbclient support @<:@default=on@:>@])],
18 [ac_enable_libndbclient="$enableval"],
19 [ac_enable_libndbclient="yes"])
20
21 AC_ARG_WITH([libndbclient-prefix],
22 [AS_HELP_STRING([--with-libndbclient-prefix],
23 [search for libndbclient in DIR])],
24 [ac_with_libndbclient=${withval}],
25 [ac_with_libndbclient=${pandora_cv_mysql_base}])
26
27 save_LIBS="${LIBS}"
28 LIBS=""
29 save_CPPFLAGS="${CPPFLAGS}"
30 AS_IF([test "x${ac_with_libndbclient}" != "x"],[
31 LIBS="-L${ac_with_libndbclient}/lib/mysql -L${ac_with_libndbclient}/lib"
32 AS_IF([test "$GCC" = "yes"],[
33 ndb_include_prefix="-isystem "
34 ],[
35 ndb_include_prefix="-I"
36 ])
37 CPPFLAGS="${CPPFLAGS} ${ndb_include_prefix}${ac_with_libndbclient}/include ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/ndbapi ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/mgmapi"
38 ])
39 LIBS="${LIBS} -lndbclient -lmysqlclient_r"
40
41 AC_CACHE_CHECK([if NdbApi works],[ac_cv_libndbclient],[
42 AC_LANG_PUSH(C++)
43 AC_LINK_IFELSE([
44 AC_LANG_PROGRAM([[
45#include <NdbApi.hpp>
46 ]],[[
47Ndb *ndb;
48ndb_init();
49 ]])
50 ],[
51 ac_cv_libndbclient=yes
52 ],[
53 ac_cv_libndbclient=no
54 ])
55 ])
56 AC_LANG_POP()
57
58 LIBNDBCLIENT="${LIBS}"
59 LTLIBNDBCLIENT="${LIBS}"
60 AC_SUBST([LIBNDBCLIENT])
61 AC_SUBST([LTLIBNDBCLIENT])
62
63 AS_IF([test "x${ac_cv_libndbclient}" = "xno"],[
64 CPPFLAGS="${save_CPPFLAGS}"
65 ])
66 LIBS="${save_LIBS}"
67
68 AM_CONDITIONAL(HAVE_LIBNDBCLIENT, [test "x${ac_cv_libndbclient}" = "xyes"])
69])
70
71AC_DEFUN([PANDORA_HAVE_LIBNDBCLIENT],[
72 AC_REQUIRE([_PANDORA_SEARCH_LIBNDBCLIENT])
73])
74
75AC_DEFUN([PANDORA_REQUIRE_LIBNDBCLIENT],[
76 AC_REQUIRE([PANDORA_HAVE_LIBNDBCLIENT])
77 AS_IF([test "x${ac_cv_libndbclient}" = "xno"],
78 PANDORA_MSG_ERROR([libndbclient is required for ${PACKAGE}]))
79])
80
081
=== added file 'm4/pandora_have_libpcre.m4'
--- m4/pandora_have_libpcre.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libpcre.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,73 @@
1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libpcre
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(pcre,,
15 [#include <pcre.h>],
16 [
17 pcre *re= NULL;
18 pcre_version();
19 ])
20 AS_IF([test "x$ac_cv_libpcre" = "xno"],
21 [
22 unset ac_cv_libpcre
23 unset HAVE_LIBPCRE
24 unset LIBPCRE
25 unset LIBPCRE_PREFIX
26 unset LTLIBPCRE
27 AC_LIB_HAVE_LINKFLAGS(pcre,,
28 [#include <pcre/pcre.h>],
29 [
30 pcre *re= NULL;
31 pcre_version();
32 ])
33 AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
34 ac_cv_pcre_location="<pcre/pcre.h>"
35 ])
36 ],[
37 ac_cv_pcre_location="<pcre.h>"
38 ])
39
40 AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
41])
42
43AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
44
45 AC_ARG_ENABLE([libpcre],
46 [AS_HELP_STRING([--disable-libpcre],
47 [Build with libpcre support @<:@default=on@:>@])],
48 [ac_enable_libpcre="$enableval"],
49 [ac_enable_libpcre="yes"])
50
51 _PANDORA_SEARCH_LIBPCRE
52])
53
54
55AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
56 AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
57])
58
59AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
60 ac_enable_libpcre="yes"
61 _PANDORA_SEARCH_LIBPCRE
62
63 AS_IF([test x$ac_cv_libpcre = xno],[
64 PANDORA_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])
65 ],[
66 AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
67 [Location of pcre header])
68 ])
69])
70
71AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
72 AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])
73])
074
=== modified file 'm4/pandora_have_libpq.m4'
--- m4/pandora_have_libpq.m4 2009-07-29 18:13:26 +0000
+++ m4/pandora_have_libpq.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -42,5 +42,5 @@
42AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[42AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[
43 AC_REQUIRE([PANDORA_HAVE_LIBPQ])43 AC_REQUIRE([PANDORA_HAVE_LIBPQ])
44 AS_IF([test "x${ac_cv_libpq}" = "xno"],44 AS_IF([test "x${ac_cv_libpq}" = "xno"],
45 AC_MSG_ERROR([libpq is required for ${PACKAGE}]))45 PANDORA_MSG_ERROR([libpq is required for ${PACKAGE}]))
46])46])
4747
=== added file 'm4/pandora_have_libpqxx.m4'
--- m4/pandora_have_libpqxx.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libpqxx.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,44 @@
1dnl Copyright (C) 2010 Padraig O'Sullivan
2dnl This file is free software;
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libpqxx
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libpqxx],
14 [AS_HELP_STRING([--disable-libpqxx],
15 [Build with libpqxx support @<:@default=on@:>@])],
16 [ac_enable_libpqxx="$enableval"],
17 [ac_enable_libpqxx="yes"])
18
19 AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[
20 AC_LANG_PUSH([C++])
21 AC_LIB_HAVE_LINKFLAGS(pqxx,,[
22 #include <pqxx/pqxx>
23 ],[
24 pqxx::connection conn("dbname=test");
25 ])
26 AC_LANG_POP()
27 ],[
28 ac_cv_libpqxx="no"
29 ])
30
31 AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"])
32
33])
34
35AC_DEFUN([PANDORA_HAVE_LIBPQXX],[
36 AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX])
37])
38
39AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[
40 AC_REQUIRE([PANDORA_HAVE_LIBPQXX])
41 AS_IF([test "x$ac_cv_libpqxx" = "xno"],[
42 PANDORA_MSG_ERROR([libpqxx is required for ${PACKAGE}])
43 ])
44])
045
=== modified file 'm4/pandora_have_libreadline.m4'
--- m4/pandora_have_libreadline.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libreadline.m4 2011-04-16 05:39:23 +0000
@@ -56,8 +56,8 @@
56#56#
57# COPYLEFT57# COPYLEFT
58#58#
59# Copyright (c) 2009 Monty Taylor59# Copyright (C) 2009 Monty Taylor
60# Copyright (c) 2002 Ville Laurikari <vl@iki.fi>60# Copyright (C) 2002 Ville Laurikari <vl@iki.fi>
61#61#
62# Copying and distribution of this file, with or without62# Copying and distribution of this file, with or without
63# modification, are permitted in any medium without royalty provided63# modification, are permitted in any medium without royalty provided
@@ -231,7 +231,7 @@
231 _PANDORA_SEARCH_LIBREADLINE231 _PANDORA_SEARCH_LIBREADLINE
232232
233 AS_IF([test "x$ac_cv_libreadline" = "xno"],233 AS_IF([test "x$ac_cv_libreadline" = "xno"],
234 AC_MSG_ERROR([libreadline is required for ${PACKAGE}. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.]))234 PANDORA_MSG_ERROR([libreadline is required for ${PACKAGE}. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.]))
235235
236])236])
237237
238238
=== modified file 'm4/pandora_have_libsqlite3.m4'
--- m4/pandora_have_libsqlite3.m4 2009-07-29 18:13:26 +0000
+++ m4/pandora_have_libsqlite3.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -38,5 +38,5 @@
38AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[38AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[
39 AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])39 AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])
40 AS_IF([test "x${ac_cv_libsqlite3}" = "xno"],40 AS_IF([test "x${ac_cv_libsqlite3}" = "xno"],
41 AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}]))41 PANDORA_MSG_ERROR([libsqlite3 is required for ${PACKAGE}]))
42])42])
4343
=== modified file 'm4/pandora_have_libtokyocabinet.m4'
--- m4/pandora_have_libtokyocabinet.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_have_libtokyocabinet.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
5 5
@@ -50,5 +50,5 @@
50AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[50AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[
51 AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])51 AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
52 AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"],52 AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"],
53 AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.]))53 PANDORA_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.]))
54])54])
5555
=== modified file 'm4/pandora_have_libuuid.m4'
--- m4/pandora_have_libuuid.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libuuid.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -46,7 +46,7 @@
46 ac_enable_libuuid="yes"46 ac_enable_libuuid="yes"
47 _PANDORA_SEARCH_LIBUUID47 _PANDORA_SEARCH_LIBUUID
48 AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[48 AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
49 AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])49 PANDORA_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.])
50 ])50 ])
51])51])
5252
5353
=== added file 'm4/pandora_have_libvbucket.m4'
--- m4/pandora_have_libvbucket.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libvbucket.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,40 @@
1dnl Copyright (C) 2010 NorthScale
2dnl This file is free software; NorthScale
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libvbucket
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libvbucket],
14 [AS_HELP_STRING([--disable-libvbucket],
15 [Build with libvbucket support @<:@default=on@:>@])],
16 [ac_enable_libvbucket="$enableval"],
17 [ac_enable_libvbucket="yes"])
18
19 AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(vbucket,,[
21 #include <libvbucket/vbucket.h>
22 ],[
23 VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL);
24 ])
25 ],[
26 ac_cv_libvbucket="no"
27 ])
28
29 AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"])
30])
31
32AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[
33 AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET])
34])
35
36AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[
37 AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET])
38 AS_IF([test x$ac_cv_libvbucket = xno],
39 PANDORA_MSG_ERROR([libvbucket is required for ${PACKAGE}]))
40])
041
=== modified file 'm4/pandora_have_libxml2.m4'
--- m4/pandora_have_libxml2.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libxml2.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
5 5
@@ -48,5 +48,5 @@
48AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[48AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[
49 AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])49 AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
50 AS_IF([test "x${ac_cv_libxml2}" = "xno"],50 AS_IF([test "x${ac_cv_libxml2}" = "xno"],
51 AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.]))51 PANDORA_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.]))
52])52])
5353
=== modified file 'm4/pandora_have_libz.m4'
--- m4/pandora_have_libz.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_have_libz.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -42,7 +42,7 @@
42 _PANDORA_SEARCH_LIBZ42 _PANDORA_SEARCH_LIBZ
4343
44 AS_IF([test x$ac_cv_libz = xno],[44 AS_IF([test x$ac_cv_libz = xno],[
45 AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.])45 PANDORA_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.])
46 ])46 ])
47])47])
4848
4949
=== modified file 'm4/pandora_have_protobuf.m4'
--- m4/pandora_have_protobuf.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_have_protobuf.m4 2011-04-16 05:39:23 +0000
@@ -23,7 +23,9 @@
23 [#include <google/protobuf/descriptor.h>],23 [#include <google/protobuf/descriptor.h>],
24 [google::protobuf::FileDescriptor* file;],24 [google::protobuf::FileDescriptor* file;],
25 [system])25 [system])
26 CXXFLAGS="${save_CXXFLAGS}"26 CXXFLAGS="${PTHREAD_CFLAGS} ${save_CXXFLAGS}"
27 LIBPROTOBUF="${LIBPROTOBUF} ${PTHREAD_LIBS}"
28 LTLIBPROTOBUF="${LTLIBPROTOBUF} ${PTHREAD_LIBS}"
27 AC_LANG_POP()29 AC_LANG_POP()
28])30])
2931
@@ -34,7 +36,7 @@
34AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[36AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[
35 AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF])37 AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF])
36 AS_IF([test x$ac_cv_libprotobuf = xno],38 AS_IF([test x$ac_cv_libprotobuf = xno],
37 AC_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))39 PANDORA_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
38])40])
3941
40AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[42AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[
@@ -56,7 +58,7 @@
56 [drizzle_cv_protobuf_recent=yes],58 [drizzle_cv_protobuf_recent=yes],
57 [drizzle_cv_protobuf_recent=no])])59 [drizzle_cv_protobuf_recent=no])])
58 AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[60 AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[
59 AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver])61 PANDORA_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver])
60 ])62 ])
61 AC_LANG_POP()63 AC_LANG_POP()
62])64])
@@ -73,7 +75,7 @@
73AC_DEFUN([PANDORA_REQUIRE_PROTOC],[75AC_DEFUN([PANDORA_REQUIRE_PROTOC],[
74 AC_REQUIRE([PANDORA_HAVE_PROTOC])76 AC_REQUIRE([PANDORA_HAVE_PROTOC])
75 AS_IF([test "x$PROTOC" = "xno"],[77 AS_IF([test "x$PROTOC" = "xno"],[
76 AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.])78 PANDORA_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.])
77 ])79 ])
78])80])
7981
8082
=== added file 'm4/pandora_have_sasl.m4'
--- m4/pandora_have_sasl.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_sasl.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,133 @@
1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_SASL],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for sasl
11 dnl --------------------------------------------------------------------
12 AC_ARG_ENABLE([sasl],
13 [AS_HELP_STRING([--disable-sasl],
14 [Build with sasl support @<:@default=on@:>@])],
15 [ac_enable_sasl="$enableval"],
16 [ac_enable_sasl="yes"])
17
18 AS_IF([test "x$ac_enable_sasl" = "xyes"],
19 [
20 AC_LIB_HAVE_LINKFLAGS(sasl,,[
21 #include <stdlib.h>
22 #include <sasl/sasl.h>
23 ],[
24 sasl_server_init(NULL, NULL);
25 ])
26
27 AS_IF([test "x${ac_cv_libsasl}" != "xyes" ],
28 [
29 AC_LIB_HAVE_LINKFLAGS(sasl2,,[
30 #include <stdlib.h>
31 #include <sasl/sasl.h>
32 ],[
33 sasl_server_init(NULL, NULL);
34 ])
35 HAVE_LIBSASL="$HAVE_LIBSASL2"
36 LIBSASL="$LIBSASL2"
37 LIBSASL_PREFIX="$LIBSASL2_PREFIX"
38 LTLIBSASL="$LT_LIBSASL2"
39 ])
40 ])
41
42 AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"],
43 [ac_cv_sasl=yes],
44 [ac_cv_sasl=no])
45
46 AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
47 AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
48 AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"])
49])
50
51AC_DEFUN([PANDORA_HAVE_SASL],[
52 AC_REQUIRE([_PANDORA_SEARCH_SASL])
53])
54
55AC_DEFUN([PANDORA_REQUIRE_SASL],[
56 AC_REQUIRE([_PANDORA_SEARCH_SASL])
57 AS_IF([test "x${ac_cv_sasl}" = "xno"],
58 PANDORA_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
59])
60
61AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
62 AC_REQUIRE([AC_LIB_PREFIX])
63
64 dnl --------------------------------------------------------------------
65 dnl Check for libsasl
66 dnl --------------------------------------------------------------------
67
68 AC_ARG_ENABLE([libsasl],
69 [AS_HELP_STRING([--disable-libsasl],
70 [Build with libsasl support @<:@default=on@:>@])],
71 [ac_enable_libsasl="$enableval"],
72 [ac_enable_libsasl="yes"])
73
74 AS_IF([test "x$ac_enable_libsasl" = "xyes"],[
75 AC_LIB_HAVE_LINKFLAGS(sasl,,[
76 #include <stdlib.h>
77 #include <sasl/sasl.h>
78 ],[
79 sasl_server_init(NULL, NULL);
80 ])
81 ],[
82 ac_cv_libsasl="no"
83 ])
84
85 AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
86])
87
88AC_DEFUN([PANDORA_HAVE_LIBSASL],[
89 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
90])
91
92AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
93 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
94 AS_IF([test "x${ac_cv_libsasl}" = "xno"],
95 PANDORA_MSG_ERROR([libsasl is required for ${PACKAGE}]))
96])
97
98AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
99 AC_REQUIRE([AC_LIB_PREFIX])
100
101 dnl --------------------------------------------------------------------
102 dnl Check for libsasl2
103 dnl --------------------------------------------------------------------
104
105 AC_ARG_ENABLE([libsasl2],
106 [AS_HELP_STRING([--disable-libsasl2],
107 [Build with libsasl2 support @<:@default=on@:>@])],
108 [ac_enable_libsasl2="$enableval"],
109 [ac_enable_libsasl2="yes"])
110
111 AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[
112 AC_LIB_HAVE_LINKFLAGS(sasl2,,[
113 #include <stdlib.h>
114 #include <sasl2/sasl2.h>
115 ],[
116 sasl2_server_init(NULL, NULL);
117 ])
118 ],[
119 ac_cv_libsasl2="no"
120 ])
121
122 AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
123])
124
125AC_DEFUN([PANDORA_HAVE_LIBSASL2],[
126 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
127])
128
129AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
130 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
131 AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
132 PANDORA_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
133])
0134
=== modified file 'm4/pandora_have_thrift.m4'
--- m4/pandora_have_thrift.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_have_thrift.m4 2011-04-16 05:39:23 +0000
@@ -39,7 +39,7 @@
39AC_DEFUN([PANDORA_REQUIRE_THRIFT],[39AC_DEFUN([PANDORA_REQUIRE_THRIFT],[
40 AC_REQUIRE([PANDORA_HAVE_THRIFT])40 AC_REQUIRE([PANDORA_HAVE_THRIFT])
41 AS_IF([test x$ac_cv_thrift= xno],[41 AS_IF([test x$ac_cv_thrift= xno],[
42 AC_MSG_ERROR([thrift required for ${PACKAGE}])42 PANDORA_MSG_ERROR([thrift required for ${PACKAGE}])
43 ])43 ])
44])44])
4545
4646
=== modified file 'm4/pandora_header_assert.m4'
--- m4/pandora_header_assert.m4 2009-12-18 19:25:00 +0000
+++ m4/pandora_header_assert.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== added file 'm4/pandora_header_stdcxx_98.m4'
--- m4/pandora_header_stdcxx_98.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_header_stdcxx_98.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,83 @@
1# ===========================================================================
2# http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7# AC_CXX_HEADER_STDCXX_98
8#
9# DESCRIPTION
10#
11# Check for complete library coverage of the C++1998/2003 standard.
12#
13# LICENSE
14#
15# Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com>
16#
17# Copying and distribution of this file, with or without modification, are
18# permitted in any medium without royalty provided the copyright notice
19# and this notice are preserved.
20
21AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [
22 AC_CACHE_CHECK(for ISO C++ 98 include files,
23 ac_cv_cxx_stdcxx_98,
24 [AC_LANG_SAVE
25 AC_LANG_CPLUSPLUS
26 AC_TRY_COMPILE([
27 #include <cassert>
28 #include <cctype>
29 #include <cerrno>
30 #include <cfloat>
31 #include <ciso646>
32 #include <climits>
33 #include <clocale>
34 #include <cmath>
35 #include <csetjmp>
36 #include <csignal>
37 #include <cstdarg>
38 #include <cstddef>
39 #include <cstdio>
40 #include <cstdlib>
41 #include <cstring>
42 #include <ctime>
43
44 #include <algorithm>
45 #include <bitset>
46 #include <complex>
47 #include <deque>
48 #include <exception>
49 #include <fstream>
50 #include <functional>
51 #include <iomanip>
52 #include <ios>
53 #include <iosfwd>
54 #include <iostream>
55 #include <istream>
56 #include <iterator>
57 #include <limits>
58 #include <list>
59 #include <locale>
60 #include <map>
61 #include <memory>
62 #include <new>
63 #include <numeric>
64 #include <ostream>
65 #include <queue>
66 #include <set>
67 #include <sstream>
68 #include <stack>
69 #include <stdexcept>
70 #include <streambuf>
71 #include <string>
72 #include <typeinfo>
73 #include <utility>
74 #include <valarray>
75 #include <vector>
76 ],,
77 ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
78 AC_LANG_RESTORE
79 ])
80 if test "$ac_cv_cxx_stdcxx_98" = yes; then
81 AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
82 fi
83])
084
=== added file 'm4/pandora_intltool.m4'
--- m4/pandora_intltool.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_intltool.m4 2011-04-16 05:39:23 +0000
@@ -0,0 +1,225 @@
1## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
2## Copyright (C) 2001 Eazel, Inc.
3## Author: Maciej Stachowiak <mjs@noisehavoc.org>
4## Kenneth Christiansen <kenneth@gnu.org>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 2 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful, but
12## WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14## General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, write to the Free Software
18## Foundation, Inc., 51 Franklin Place - Suite 330, Boston, MA 02110-1301, USA.
19##
20## As a special exception to the GNU General Public License, if you
21## distribute this file as part of a program that contains a
22## configuration script generated by Autoconf, you may include it under
23## the same distribution terms that you use for the rest of that program.
24
25dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
26# serial 40 IT_PROG_INTLTOOL
27AC_DEFUN([IT_PROG_INTLTOOL], [
28AC_PREREQ([2.50])dnl
29AC_REQUIRE([AM_NLS])dnl
30
31case "$am__api_version" in
32 1.[01234])
33 PANDORA_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
34 ;;
35 *)
36 ;;
37esac
38
39if test -n "$1"; then
40 AC_MSG_CHECKING([for intltool >= $1])
41
42 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
43 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
44 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
45 ]
46 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
47 AS_IF([test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"],[
48 pandora_have_intltool=yes
49 ],[
50 pandora_have_intltool=no
51 AC_MSG_WARN([Your intltool is too old. You need intltool $1 or later.])
52 ])
53fi
54AC_CHECK_HEADERS([libintl.h])
55AS_IF([test "x${ac_cv_header_libintl_h}" = "xfalse" -o "x${ac_cv_header_libintl_h}" = "xno"],[
56 pandora_have_intltool=no
57])
58
59AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
60AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
61AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
62if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
63 AC_MSG_WARN([The intltool scripts were not found. Please install intltool.])
64 AC_MSG_WARN([On Debian: apt-get install intltool. On Redhat: yum install intltool])
65fi
66
67 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
68INTLTOOL_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 $< [$]@'
69 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
70 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
71 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
72 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
73 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
74 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
75INTLTOOL_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 $< [$]@'
76 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
77 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
78 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
79 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
80 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
81 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
82 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
83 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
84 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
85 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
86
87_IT_SUBST(INTLTOOL_DESKTOP_RULE)
88_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
89_IT_SUBST(INTLTOOL_KEYS_RULE)
90_IT_SUBST(INTLTOOL_PROP_RULE)
91_IT_SUBST(INTLTOOL_OAF_RULE)
92_IT_SUBST(INTLTOOL_PONG_RULE)
93_IT_SUBST(INTLTOOL_SERVER_RULE)
94_IT_SUBST(INTLTOOL_SHEET_RULE)
95_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
96_IT_SUBST(INTLTOOL_UI_RULE)
97_IT_SUBST(INTLTOOL_XAM_RULE)
98_IT_SUBST(INTLTOOL_KBD_RULE)
99_IT_SUBST(INTLTOOL_XML_RULE)
100_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
101_IT_SUBST(INTLTOOL_CAVES_RULE)
102_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
103_IT_SUBST(INTLTOOL_THEME_RULE)
104_IT_SUBST(INTLTOOL_SERVICE_RULE)
105_IT_SUBST(INTLTOOL_POLICY_RULE)
106
107# Check the gettext tools to make sure they are GNU
108AC_PATH_PROG(XGETTEXT, xgettext)
109AC_PATH_PROG(MSGMERGE, msgmerge)
110AC_PATH_PROG(MSGFMT, msgfmt)
111AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
112if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
113 AC_MSG_WARN([GNU gettext tools not found; required for intltool])
114fi
115xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
116mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
117mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
118if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
119 AC_MSG_WARN([GNU gettext tools not found; required for intltool])
120fi
121
122AC_PATH_PROG(INTLTOOL_PERL, perl)
123if test -z "$INTLTOOL_PERL"; then
124 AC_MSG_WARN([perl not found])
125fi
126AC_MSG_CHECKING([for perl >= 5.8.1])
127$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
128if test $? -ne 0; then
129 AC_MSG_WARN([perl 5.8.1 is required for intltool])
130else
131 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
132 AC_MSG_RESULT([$IT_PERL_VERSION])
133fi
134if test "x$2" != "xno-xml"; then
135 AC_MSG_CHECKING([for XML::Parser])
136 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
137 AC_MSG_RESULT([ok])
138 else
139 AC_MSG_WARN([XML::Parser perl module is required for intltool])
140 fi
141fi
142
143# Substitute ALL_LINGUAS so we can use it in po/Makefile
144AC_SUBST(ALL_LINGUAS)
145
146# Set DATADIRNAME correctly if it is not set yet
147# (copied from glib-gettext.m4)
148if test -z "$DATADIRNAME"; then
149 AC_LINK_IFELSE(
150 [AC_LANG_PROGRAM([[]],
151 [[extern int _nl_msg_cat_cntr;
152 return _nl_msg_cat_cntr]])],
153 [DATADIRNAME=share],
154 [case $host in
155 *-*-solaris*)
156 dnl On Solaris, if bind_textdomain_codeset is in libc,
157 dnl GNU format message catalog is always supported,
158 dnl since both are added to the libc all together.
159 dnl Hence, we'd like to go with DATADIRNAME=share
160 dnl in this case.
161 AC_CHECK_FUNC(bind_textdomain_codeset,
162 [DATADIRNAME=share], [DATADIRNAME=lib])
163 ;;
164 *)
165 [DATADIRNAME=lib]
166 ;;
167 esac])
168fi
169AC_SUBST(DATADIRNAME)
170
171IT_PO_SUBDIR([po])
172])
173
174
175# IT_PO_SUBDIR(DIRNAME)
176# ---------------------
177# All po subdirs have to be declared with this macro; the subdir "po" is
178# declared by IT_PROG_INTLTOOL.
179#
180AC_DEFUN([IT_PO_SUBDIR],
181[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
182dnl
183dnl The following CONFIG_COMMANDS should be exetuted at the very end
184dnl of config.status.
185AC_CONFIG_COMMANDS_PRE([
186 AC_CONFIG_COMMANDS([$1/stamp-it], [
187 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
188 AC_MSG_WARN([$1/Makefile.in.in was not created by intltoolize.])
189 else
190 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
191 >"$1/stamp-it.tmp"
192 [sed '/^#/d
193 s/^[[].*] *//
194 /^[ ]*$/d
195 '"s|^| $ac_top_srcdir/|" \
196 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
197 ]
198 [sed '/^POTFILES =/,/[^\\]$/ {
199 /^POTFILES =/!d
200 r $1/POTFILES
201 }
202 ' "$1/Makefile.in" >"$1/Makefile"]
203 rm -f "$1/Makefile.tmp"
204 mv "$1/stamp-it.tmp" "$1/stamp-it"
205 fi
206 ])
207])dnl
208])
209
210# _IT_SUBST(VARIABLE)
211# -------------------
212# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
213#
214AC_DEFUN([_IT_SUBST],
215[
216AC_SUBST([$1])
217m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
218]
219)
220
221# deprecated macros
222AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
223# A hint is needed for aclocal from Automake <= 1.9.4:
224# AC_DEFUN([AC_PROG_INTLTOOL], ...)
225
0226
=== modified file 'm4/pandora_libtool.m4'
--- m4/pandora_libtool.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_libtool.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -12,7 +12,7 @@
12 pandora_have_old_libtool=no12 pandora_have_old_libtool=no
13 ])13 ])
14 AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[14 AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[
15 AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2])15 PANDORA_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2])
16 ])16 ])
1717
18 dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read18 dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read
1919
=== modified file 'm4/pandora_optimize.m4'
--- m4/pandora_optimize.m4 2009-12-24 17:19:53 +0000
+++ m4/pandora_optimize.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -22,25 +22,21 @@
22 dnl with using AC_CC_STD_C99 above22 dnl with using AC_CC_STD_C99 above
23 CC="${CC} -std=gnu99"23 CC="${CC} -std=gnu99"
2424
25 AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}"25 AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
2626
27 DEBUG_CFLAGS="-O0"27 DEBUG_CFLAGS="-O0"
28 DEBUG_CXXFLAGS="-O0"28 DEBUG_CXXFLAGS="-O0"
2929
30 OPTIMIZE_CFLAGS="-O3"30 OPTIMIZE_CFLAGS="-O2"
31 OPTIMIZE_CXXFLAGS="-O3"31 OPTIMIZE_CXXFLAGS="-O2"
32 ])32 ])
33 AS_IF([test "$INTELCC" = "yes"],[33 AS_IF([test "$INTELCC" = "yes"],[
34 dnl Once we can use a modern autoconf, we can replace the std=gnu99 here
35 dnl with using AC_CC_STD_C99 above
36 CC="${CC} -std=c99"
37
38 AM_CPPFLAGS="-g ${AM_CPPFLAGS}"34 AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
3935
40 DEBUG_CFLAGS="-O0"36 DEBUG_CFLAGS="-O0"
41 DEBUG_CXXFLAGS="-O0"37 DEBUG_CXXFLAGS="-O0"
4238
43 OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static"39 OPTIMIZE_CFLAGS="-xHOST -O2 -no-prec-div -static"
44 OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}"40 OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}"
4541
46 ])42 ])
4743
=== modified file 'm4/pandora_platform.m4'
--- m4/pandora_platform.m4 2011-04-14 05:40:29 +0000
+++ m4/pandora_platform.m4 2011-04-16 05:39:23 +0000
@@ -23,7 +23,7 @@
2323
2424
25 case "$host_os" in25 case "$host_os" in
26 *solaris*|*freebsd*)26 *solaris*)
27 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[27 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
28 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"28 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
29 ])29 ])
@@ -32,6 +32,15 @@
32 LDFLAGS="${LDFLAGS} -L/usr/local/lib"32 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
33 ])33 ])
34 ;;34 ;;
35 *freebsd*)
36 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
37 CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include"
38 ])
39
40 AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
41 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
42 ])
43 ;;
35 esac44 esac
3645
37 PANDORA_OPTIMIZE_BITFIELD=146 PANDORA_OPTIMIZE_BITFIELD=1
@@ -50,6 +59,7 @@
50 *solaris*)59 *solaris*)
51 TARGET_SOLARIS="true"60 TARGET_SOLARIS="true"
52 PANDORA_OPTIMIZE_BITFIELD=061 PANDORA_OPTIMIZE_BITFIELD=0
62 AS_IF([test "x${USE_NLS}" = "xyes"],[LIBS="${LIBS} -lintl"])
53 AC_SUBST(TARGET_SOLARIS)63 AC_SUBST(TARGET_SOLARIS)
54 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])64 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
55 ;;65 ;;
@@ -59,12 +69,29 @@
59 AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD])69 AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD])
60 AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])70 AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])
61 ;;71 ;;
62 *)72 *mingw32*)
73 TARGET_WINDOWS="true"
74 AC_SUBST(TARGET_WINDOWS)
75 AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows])
76 AC_DEFINE([WINVER], [WindowsXP], [Version of Windows])
77 AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work])
78 AC_DEFINE([EAI_SYSTEM], [11], [Another magical number])
79 AH_BOTTOM([
80#ifndef HAVE_SYS_SOCKET_H
81# define SHUT_RD SD_RECEIVE
82# define SHUT_WR SD_SEND
83# define SHUT_RDWR SD_BOTH
84#endif
85 ])
86
87 LIBS="$LIBS -lwsock32 -lws2_32"
88 AM_CFLAGS="${AM_CFLAGS} -I\${top_srcdir}/win32/mingw -I\${top_builddir}/win32/mingw -I\${top_srcdir}/win32 -I\${top_builddir}/win32"
63 ;;89 ;;
64 esac90 esac
91 AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"])
92 AM_CONDITIONAL(TARGET_OSX, [test "x${TARGET_OSX}" = "xtrue"])
6593
66 AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)94 AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
67 AM_CONDITIONAL(TARGET_OSX,[test "${TARGET_OSX}" = "yes"])
6895
69 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])96 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
70 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])97 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
7198
=== modified file 'm4/pandora_plugins.m4'
--- m4/pandora_plugins.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_plugins.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
5dnl--------------------------------------------------------------------5dnl--------------------------------------------------------------------
@@ -17,21 +17,30 @@
17 dnl get called probably during autoconf too, so it's important to protect17 dnl get called probably during autoconf too, so it's important to protect
18 dnl with test -f ... if the files exist, we don't have the chicken/egg 18 dnl with test -f ... if the files exist, we don't have the chicken/egg
19 dnl problem and therefore don't need to do anything here19 dnl problem and therefore don't need to do anything here
20 m4_syscmd([python config/pandora-plugin > /dev/null])20 m4_syscmd([PYTHON=${PYTHON:-python} && $PYTHON config/pandora-plugin > /dev/null])
21 m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])21 m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
2222
23 m4_sinclude(config/pandora-plugin.ac)23 m4_sinclude(config/pandora-plugin.ac)
2424
25 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list25 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
26 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`26 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
27 AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL")27 pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'`
28 pandora_builtin_load_list=`echo $pandora_builtin_load_list | sed 's/, *$//'`
29 pandora_builtin_load_symbols_list=`echo $pandora_builtin_load_symbols_list | sed 's/, *$//'`
30 AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL")
31 AS_IF([test "x$pandora_builtin_load_symbols_list" = "x"], pandora_builtin_load_symbols_list="NULL")
28 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])32 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
33 AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list])
34 AC_SUBST([PANDORA_BUILTIN_LOAD_LIST],[$pandora_builtin_load_list])
35 AC_SUBST([PANDORA_BUILTIN_LOAD_SYMBOLS_LIST],[$pandora_builtin_load_symbols_list])
29 AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])36 AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
30 m4_ifval(m4_normalize([$1]),[37 m4_ifval(m4_normalize([$1]),[
31 AC_CONFIG_FILES($*)38 AC_CONFIG_FILES($*)
32 ],[39 ],[
33 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list],40 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],["$pandora_builtin_list"],
34 [List of plugins to be built in])41 [List of plugins to be built in])
42 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_SYMBOLS_LIST],["$pandora_builtin_symbols_list"],
43 [List of builtin plugin symbols to be built in])
35 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],44 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],
36 [List of plugins that should be loaded on startup if no45 [List of plugins that should be loaded on startup if no
37 value is given for --plugin-load])46 value is given for --plugin-load])
3847
=== modified file 'm4/pandora_print_callstack.m4'
--- m4/pandora_print_callstack.m4 2010-01-13 10:48:24 +0000
+++ m4/pandora_print_callstack.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== modified file 'm4/pandora_pthread.m4'
--- m4/pandora_pthread.m4 2009-12-18 19:25:00 +0000
+++ m4/pandora_pthread.m4 2011-04-16 05:39:23 +0000
@@ -254,5 +254,5 @@
254AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[254AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[
255 AC_REQUIRE([PANDORA_HAVE_PTHREAD])255 AC_REQUIRE([PANDORA_HAVE_PTHREAD])
256 AS_IF([test "x$acx_pthread_ok" != "xyes"],[256 AS_IF([test "x$acx_pthread_ok" != "xyes"],[
257 AC_MSG_ERROR(could not find libpthread)])257 PANDORA_MSG_ERROR(could not find libpthread)])
258])258])
259259
=== modified file 'm4/pandora_python3_devel.m4'
--- m4/pandora_python3_devel.m4 2009-09-29 04:30:01 +0000
+++ m4/pandora_python3_devel.m4 2011-04-16 05:39:23 +0000
@@ -4,12 +4,12 @@
4dnl pandora-build: A pedantic build system4dnl pandora-build: A pedantic build system
5dnl5dnl
6dnl Copyright (C) 2009 Sun Microsystems, Inc.6dnl Copyright (C) 2009 Sun Microsystems, Inc.
7dnl Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>7dnl Copyright (C) 2008 Sebastian Huber <sebastian-huber@web.de>
8dnl Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>8dnl Copyright (C) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
9dnl Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>9dnl Copyright (C) 2008 Rafael Laboissiere <rafael@laboissiere.net>
10dnl Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>10dnl Copyright (C) 2008 Andrew Collier <colliera@ukzn.ac.za>
11dnl Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org>11dnl Copyright (C) 2008 Matteo Settenvini <matteo@member.fsf.org>
12dnl Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org>12dnl Copyright (C) 2008 Horst Knorr <hk_classes@knoda.org>
13dnl13dnl
14dnl This program is free software: you can redistribute it and/or modify it14dnl This program is free software: you can redistribute it and/or modify it
15dnl under the terms of the GNU General Public License as published by the15dnl under the terms of the GNU General Public License as published by the
@@ -76,7 +76,7 @@
76 AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]])76 AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]])
77 ])77 ])
78 AS_IF([test -z "$PYTHON3"],[78 AS_IF([test -z "$PYTHON3"],[
79 AC_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path])79 PANDORA_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path])
80 PYTHON3_VERSION=""80 PYTHON3_VERSION=""
81 ])81 ])
8282
@@ -92,7 +92,7 @@
92 AC_MSG_RESULT([yes])92 AC_MSG_RESULT([yes])
93 else93 else
94 AC_MSG_RESULT([no])94 AC_MSG_RESULT([no])
95 AC_MSG_ERROR([this package requires Python $1.95 PANDORA_MSG_ERROR([this package requires Python $1.
96If you have it installed, but it isn't the default Python96If you have it installed, but it isn't the default Python
97interpreter in your system path, please pass the PYTHON3_VERSION97interpreter in your system path, please pass the PYTHON3_VERSION
98variable to configure. See ``configure --help'' for reference.98variable to configure. See ``configure --help'' for reference.
@@ -110,7 +110,7 @@
110 AC_MSG_RESULT([yes])110 AC_MSG_RESULT([yes])
111 else111 else
112 AC_MSG_RESULT([no])112 AC_MSG_RESULT([no])
113 AC_MSG_ERROR([cannot import Python3 module "distutils".113 PANDORA_MSG_ERROR([cannot import Python3 module "distutils".
114Please check your Python3 installation. The error was:114Please check your Python3 installation. The error was:
115$ac_python3_distutils_result])115$ac_python3_distutils_result])
116 PYTHON3_VERSION=""116 PYTHON3_VERSION=""
117117
=== modified file 'm4/pandora_sasl.m4'
--- m4/pandora_sasl.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_sasl.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -55,7 +55,7 @@
55AC_DEFUN([PANDORA_REQUIRE_SASL],[55AC_DEFUN([PANDORA_REQUIRE_SASL],[
56 AC_REQUIRE([_PANDORA_SEARCH_SASL])56 AC_REQUIRE([_PANDORA_SEARCH_SASL])
57 AS_IF([test "x${ac_cv_sasl}" = "xno"],57 AS_IF([test "x${ac_cv_sasl}" = "xno"],
58 AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))58 PANDORA_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
59])59])
6060
61AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[61AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
@@ -92,7 +92,7 @@
92AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[92AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
93 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])93 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
94 AS_IF([test "x${ac_cv_libsasl}" = "xno"],94 AS_IF([test "x${ac_cv_libsasl}" = "xno"],
95 AC_MSG_ERROR([libsasl is required for ${PACKAGE}]))95 PANDORA_MSG_ERROR([libsasl is required for ${PACKAGE}]))
96])96])
9797
98AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[98AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
@@ -129,5 +129,5 @@
129AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[129AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
130 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])130 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
131 AS_IF([test "x${ac_cv_libsasl2}" = "xno"],131 AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
132 AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))132 PANDORA_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
133])133])
134134
=== modified file 'm4/pandora_shared_ptr.m4'
--- m4/pandora_shared_ptr.m4 2009-12-18 18:02:39 +0000
+++ m4/pandora_shared_ptr.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
66
=== modified file 'm4/pandora_stl_hash.m4'
--- m4/pandora_stl_hash.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_stl_hash.m4 2011-04-16 05:39:23 +0000
@@ -1,3 +1,8 @@
1# Copyright (C) 2008 Sun Microsystems, Inc.
2# This file is free software; Sun Microsystems, Inc.
3# gives unlimited permission to copy and/or distribute it,
4# with or without modifications, as long as this notice is preserved.
5
1# We check two things: where the include file is for unordered_map, and6# We check two things: where the include file is for unordered_map, and
2# what namespace unordered_map lives in within that include file. We7# what namespace unordered_map lives in within that include file. We
3# include AC_COMPILE_IFELSE for all the combinations we've seen in the8# include AC_COMPILE_IFELSE for all the combinations we've seen in the
@@ -83,7 +88,7 @@
83AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[88AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[
84 AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED])89 AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED])
85 AS_IF([test "x${pandora_has_unordered}" != "xyes"],[90 AS_IF([test "x${pandora_has_unordered}" != "xyes"],[
86 AC_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}.91 PANDORA_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}.
87 Implementations can be found in Recent versions of gcc and in boost])92 Implementations can be found in Recent versions of gcc and in boost])
88 ])93 ])
89])94])
9095
=== modified file 'm4/pandora_vc_build.m4'
--- m4/pandora_vc_build.m4 2010-04-06 00:33:06 +0000
+++ m4/pandora_vc_build.m4 2011-04-16 05:39:23 +0000
@@ -1,5 +1,5 @@
1dnl Copyright (C) 2009 Sun Microsystems1dnl Copyright (C) 2009 Sun Microsystems, Inc.
2dnl This file is free software; Sun Microsystems2dnl This file is free software; Sun Microsystems, Inc.
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
@@ -36,7 +36,14 @@
36])36])
3737
38AC_DEFUN([PANDORA_BUILDING_FROM_VC],[38AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
39 m4_syscmd(PANDORA_TEST_VC_DIR [39 m4_syscmd(PANDORA_TEST_VC_DIR
40 m4_if(PCT_NO_VC_CHANGELOG,yes,[
41 vc_changelog=no
42 ],[
43 vc_changelog=yes
44 ])
45
46 [
4047
41 PANDORA_RELEASE_DATE=`date +%Y.%m`48 PANDORA_RELEASE_DATE=`date +%Y.%m`
42 PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`49 PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
@@ -53,6 +60,18 @@
53 PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"60 PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
54 PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`61 PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
55 PANDORA_VC_BRANCH=`bzr nick`62 PANDORA_VC_BRANCH=`bzr nick`
63 PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
64 PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' ' | tail -1`
65 if test "x${vc_changelog}" = "xyes"; then
66 bzr log --gnu > ChangeLog
67 fi
68 fi
69 elif test "${pandora_building_from_git}" = "yes"; then
70 echo "# Grabbing changelog and version information from git"
71 PANDORA_GIT_REVID=`git --no-pager log --max-count=1 | cut -f2 -d' ' | head -1`
72 if test "x$PANDORA_GIT_REVID" != "x${PANDORA_VC_REVNO}" ; then
73 PANDORA_VC_REVID="${PANDORA_GIT_REVID}"
74 PANDORA_VC_BRANCH=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '`
56 fi75 fi
57 fi76 fi
5877
@@ -60,17 +79,21 @@
60 mkdir -p config79 mkdir -p config
61 fi80 fi
6281
63 cat > config/pandora_vc_revinfo.tmp <<EOF82 if test "${pandora_building_from_bzr}" = "yes" -o ! -f config/pandora_vc_revinfo ; then
83 cat > config/pandora_vc_revinfo.tmp <<EOF
64PANDORA_VC_REVNO=${PANDORA_VC_REVNO}84PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
65PANDORA_VC_REVID=${PANDORA_VC_REVID}85PANDORA_VC_REVID=${PANDORA_VC_REVID}
66PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}86PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
87PANDORA_VC_TAG=${PANDORA_VC_TAG}
88PANDORA_VC_LATEST_TAG=${PANDORA_VC_LATEST_TAG}
67PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}89PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
68PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}90PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
69EOF91EOF
70 if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then92 if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then
71 mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo93 mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo
94 fi
95 rm -f config/pandora_vc_revinfo.tmp
72 fi96 fi
73 rm -f config/pandora_vc_revinfo.tmp
74 ])97 ])
75])98])
76 99
@@ -88,6 +111,10 @@
88 _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)111 _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)
89 _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],112 _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
90 ${srcdir}/config/pandora_vc_revinfo)113 ${srcdir}/config/pandora_vc_revinfo)
114 _PANDORA_READ_FROM_FILE([PANDORA_VC_TAG],
115 ${srcdir}/config/pandora_vc_revinfo)
116 _PANDORA_READ_FROM_FILE([PANDORA_VC_LATEST_TAG],
117 ${srcdir}/config/pandora_vc_revinfo)
91 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],118 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
92 ${srcdir}/config/pandora_vc_revinfo)119 ${srcdir}/config/pandora_vc_revinfo)
93 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],120 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
@@ -99,8 +126,25 @@
99 PANDORA_RELEASE_COMMENT="trunk"126 PANDORA_RELEASE_COMMENT="trunk"
100 ])127 ])
101 128
102 PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"129 AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[
103 PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"130 PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
131 changequote(<<, >>)dnl
132 PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'`
133 changequote([, ])dnl
134 ],[
135 AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[
136 PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}"
137 changequote(<<, >>)dnl
138 PANDORA_RELEASE_ID=`echo ${PANDORA_VC_LATEST_TAG} | sed 's/[^0-9]//g'`
139 changequote([, ])dnl
140 ],[
141 PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
142 changequote(<<, >>)dnl
143 PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_DATE} | sed 's/[^0-9]//g'`
144 changequote([, ])dnl
145 ])
146 ])
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches