Merge lp:~mordred/libmemcached/fix-debian-patches into lp:~tangent-org/libmemcached/trunk

Proposed by Monty Taylor
Status: Merged
Merged at revision: 848
Proposed branch: lp:~mordred/libmemcached/fix-debian-patches
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 5341 lines (+4221/-411)
45 files modified
.quickly (+5/-0)
Makefile.am (+15/-1)
config/autorun.sh (+29/-8)
config/pandora-plugin (+667/-0)
config/uncrustify.cfg (+1112/-0)
configure.ac (+12/-2)
docs/Makefile.am (+4/-2)
docs/memcat.pod (+1/-1)
m4/ac_cxx_header_stdcxx_98.m4 (+22/-6)
m4/acx_pthread.m4 (+68/-73)
m4/gettext.m4 (+379/-0)
m4/iconv.m4 (+180/-0)
m4/pandora_canonical.m4 (+44/-38)
m4/pandora_clock_gettime.m4 (+15/-0)
m4/pandora_drizzle_build.m4 (+4/-2)
m4/pandora_enable_dtrace.m4 (+32/-17)
m4/pandora_ensure_gcc_version.m4 (+39/-16)
m4/pandora_fdatasync.m4 (+2/-2)
m4/pandora_have_boost.m4 (+73/-0)
m4/pandora_have_gcc_atomics.m4 (+2/-2)
m4/pandora_have_libboost_options.m4 (+47/-0)
m4/pandora_have_libcassandra.m4 (+44/-0)
m4/pandora_have_libdrizzle.m4 (+16/-10)
m4/pandora_have_libgtest.m4 (+44/-0)
m4/pandora_have_libhashkit.m4 (+42/-0)
m4/pandora_have_libinnodb.m4 (+64/-0)
m4/pandora_have_libldap.m4 (+73/-0)
m4/pandora_have_libmemcached.m4 (+49/-5)
m4/pandora_have_libmysqlclient.m4 (+146/-0)
m4/pandora_have_libndbclient.m4 (+80/-0)
m4/pandora_have_libpqxx.m4 (+44/-0)
m4/pandora_have_libtokyocabinet.m4 (+4/-2)
m4/pandora_have_libvbucket.m4 (+40/-0)
m4/pandora_have_thrift.m4 (+45/-0)
m4/pandora_platform.m4 (+5/-0)
m4/pandora_plugins.m4 (+7/-3)
m4/pandora_sasl.m4 (+1/-1)
m4/pandora_stl_hash.m4 (+87/-108)
m4/pandora_use_pipe.m4 (+1/-1)
m4/pandora_vc_build.m4 (+98/-89)
m4/pandora_warnings.m4 (+11/-3)
m4/pandora_with_gettext.m4 (+12/-9)
m4/po.m4 (+449/-0)
m4/progtest.m4 (+92/-0)
tests/include.am (+15/-10)
To merge this branch: bzr merge lp:~mordred/libmemcached/fix-debian-patches
Reviewer Review Type Date Requested Status
Brian Aker Pending
Review via email: mp+27446@code.launchpad.net

This proposal supersedes a proposal from 2010-05-29.

Description of the change

Merges in spelling fix and non-included-files patches from the debian build.
Updates to latest pandora-build.

To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote : Posted in a previous version of this proposal
Download full text (208.5 KiB)

Failed on FreeBSD.

On May 29, 2010, at 10:34 AM, Monty Taylor wrote:

> Monty Taylor has proposed merging lp:~mordred/libmemcached/fix-debian-patches into lp:libmemcached.
>
> Requested reviews:
> Brian Aker (brianaker)
>
>
> Merges in spelling fix and non-included-files patches from the debian build.
> Updates to latest pandora-build.
> --
> https://code.launchpad.net/~mordred/libmemcached/fix-debian-patches/+merge/26368
> You are requested to review the proposed merge of lp:~mordred/libmemcached/fix-debian-patches into lp:libmemcached.
> === added file '.quickly'
> --- .quickly 1970-01-01 00:00:00 +0000
> +++ .quickly 2010-05-29 17:34:31 +0000
> @@ -0,0 +1,5 @@
> +project = libmemcached
> +version = 0.4.2
> +template = pandora-build
> +project-type = library
> +pandora-version = 0.131
>
> === modified file 'Makefile.am'
> --- Makefile.am 2010-04-05 16:41:24 +0000
> +++ Makefile.am 2010-05-29 17:34:31 +0000
> @@ -14,7 +14,21 @@
> nobase_include_HEADERS =
> EXTRA_HEADERS =
> BUILT_SOURCES=
> -EXTRA_DIST = README.FIRST
> +EXTRA_DIST= \
> + ${srcdir}/m4/pandora_*.m4 \
> + .quickly \
> + README.FIRST \
> + config/autorun.sh \
> + config/pandora-plugin \
> + config/uncrustify.cfg \
> + m4/ac_cxx_header_stdcxx_98.m4 \
> + m4/acx_pthread.m4 \
> + m4/gettext.m4 \
> + m4/iconv.m4 \
> + m4/pkg.m4 \
> + m4/po.m4 \
> + m4/progtest.m4
> +
>
> SUBDIRS = docs
>
>
> === modified file 'config/autorun.sh'
> --- config/autorun.sh 2009-09-16 09:02:26 +0000
> +++ config/autorun.sh 2010-05-29 17:34:31 +0000
> @@ -1,5 +1,32 @@
> #!/bin/sh
> -# Taken from lighthttpd server (BSD). Thanks Jan!
> +#
> +# Copyright (c) 2006 Jan Kneschke
> +# Copyright (c) 2009 Sun Microsystems
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions are met:
> +#
> +# 1. Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# 2. Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in the
> +# documentation and/or other materials provided with the distribution.
> +# 3. The name of the author may not be used to endorse or promote products
> +# derived from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
> +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> +# NEGLIGENCE OR OTHERWISE) ...

Revision history for this message
Brian Aker (brianaker) wrote : Posted in a previous version of this proposal

This is still not compiling.

Cheers,
   -Brian

review: Needs Fixing
Revision history for this message
Monty Taylor (mordred) wrote :

No idea why this didn't show up in other projects - this is a full-on pandora-build bug.

Fixed now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.quickly'
2--- .quickly 1970-01-01 00:00:00 +0000
3+++ .quickly 2010-06-13 16:37:23 +0000
4@@ -0,0 +1,5 @@
5+project = libmemcached
6+version = 0.4.2
7+template = pandora-build
8+project-type = library
9+pandora-version = 0.134
10
11=== modified file 'Makefile.am'
12--- Makefile.am 2010-04-05 16:41:24 +0000
13+++ Makefile.am 2010-06-13 16:37:23 +0000
14@@ -14,7 +14,21 @@
15 nobase_include_HEADERS =
16 EXTRA_HEADERS =
17 BUILT_SOURCES=
18-EXTRA_DIST = README.FIRST
19+EXTRA_DIST= \
20+ ${srcdir}/m4/pandora_*.m4 \
21+ .quickly \
22+ README.FIRST \
23+ config/autorun.sh \
24+ config/pandora-plugin \
25+ config/uncrustify.cfg \
26+ m4/ac_cxx_header_stdcxx_98.m4 \
27+ m4/acx_pthread.m4 \
28+ m4/gettext.m4 \
29+ m4/iconv.m4 \
30+ m4/pkg.m4 \
31+ m4/po.m4 \
32+ m4/progtest.m4
33+
34
35 SUBDIRS = docs
36
37
38=== modified file 'config/autorun.sh'
39--- config/autorun.sh 2009-09-16 09:02:26 +0000
40+++ config/autorun.sh 2010-06-13 16:37:23 +0000
41@@ -1,5 +1,32 @@
42 #!/bin/sh
43-# Taken from lighthttpd server (BSD). Thanks Jan!
44+#
45+# Copyright (c) 2006 Jan Kneschke
46+# Copyright (c) 2009 Sun Microsystems
47+# All rights reserved.
48+#
49+# Redistribution and use in source and binary forms, with or without
50+# modification, are permitted provided that the following conditions are met:
51+#
52+# 1. Redistributions of source code must retain the above copyright
53+# notice, this list of conditions and the following disclaimer.
54+# 2. Redistributions in binary form must reproduce the above copyright
55+# notice, this list of conditions and the following disclaimer in the
56+# documentation and/or other materials provided with the distribution.
57+# 3. The name of the author may not be used to endorse or promote products
58+# derived from this software without specific prior written permission.
59+#
60+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
61+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
62+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
63+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
64+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
65+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
66+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
67+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
68+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
69+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
70+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
71+#
72 # Run this to generate all the initial makefiles, etc.
73
74 die() { echo "$@"; exit 1; }
75@@ -8,7 +35,7 @@
76 LIBTOOLIZE_FLAGS=" --automake --copy --force"
77 # --add-missing instructs automake to install missing auxiliary files
78 # and --force to overwrite them if they already exist
79-AUTOMAKE_FLAGS="--add-missing --copy --force"
80+AUTOMAKE_FLAGS="--add-missing --copy --force --foreign"
81 ACLOCAL_FLAGS="-I m4"
82
83 ARGV0=$0
84@@ -41,12 +68,6 @@
85 . config/pre_hook.sh
86 fi
87
88-# We need to some file here for the m4_sinclude, even if it's just empty
89-if test ! -f config/plugin.ac
90-then
91- touch config/plugin.ac
92-fi
93-
94 # Try to detect the supported binaries if the user didn't
95 # override that by pushing the environment variable
96 if test x$LIBTOOLIZE = x; then
97
98=== added file 'config/pandora-plugin'
99--- config/pandora-plugin 1970-01-01 00:00:00 +0000
100+++ config/pandora-plugin 2010-06-13 16:37:23 +0000
101@@ -0,0 +1,667 @@
102+#!/usr/bin/python
103+
104+# Copyright (C) 2009 Sun Microsystems
105+#
106+# This program is free software; you can redistribute it and/or modify
107+# it under the terms of the GNU General Public License as published by
108+# the Free Software Foundation; version 2 of the License.
109+#
110+# This program is distributed in the hope that it will be useful,
111+# but WITHOUT ANY WARRANTY; without even the implied warranty of
112+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113+# GNU General Public License for more details.
114+#
115+# You should have received a copy of the GNU General Public License
116+# along with this program; if not, write to the Free Software
117+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
118+
119+pandora_plugin_file = 'config/pandora-plugin.ini'
120+
121+# Find plugins in the tree and add them to the build system
122+
123+import ConfigParser, os, sys
124+import datetime, time
125+import subprocess
126+
127+plugin_am_file=None
128+plugin_ac_file=None
129+
130+class ChangeProtectedFile(object):
131+
132+ def __init__(self, fname):
133+ self.bogus_file= False
134+ self.real_fname= fname
135+ self.new_fname= "%s.new" % fname
136+ try:
137+ self.new_file= open(self.new_fname,'w+')
138+ except IOError:
139+ self.bogus_file= True
140+
141+ def write(self, text):
142+ if not self.bogus_file:
143+ self.new_file.write(text)
144+
145+ # We've written all of this out into .new files, now we only copy them
146+ # over the old ones if they are different, so that we don't cause
147+ # unnecessary recompiles
148+ def close(self):
149+ """Return True if the file had changed."""
150+ if self.bogus_file:
151+ return
152+ self.new_file.seek(0)
153+ new_content = self.new_file.read()
154+ self.new_file.close()
155+ try:
156+ old_file = file(self.real_fname, 'r')
157+ old_content = old_file.read()
158+ old_file.close()
159+ except IOError:
160+ old_content = None
161+ if new_content != old_content:
162+ if old_content != None:
163+ os.unlink(self.real_fname)
164+ os.rename(self.new_fname, self.real_fname)
165+ return True
166+ else:
167+ try:
168+ os.unlink(self.new_fname)
169+ except:
170+ pass
171+
172+
173+def write_external_configure(plugin, plugin_file):
174+ """Write the initial bits of the configure.ac file"""
175+ if not os.path.exists('m4'):
176+ os.mkdir('m4')
177+ plugin_file.write("""
178+AC_PREREQ(2.59)dnl Minimum Autoconf version required.
179+AC_INIT([%(name)s],[%(version)s],[%(url)s])
180+AC_CONFIG_SRCDIR([%(main_source)s])
181+AC_CONFIG_AUX_DIR(config)
182+
183+PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42,skip-visibility)
184+
185+PANDORA_REQUIRE_LIBPROTOBUF
186+PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
187+PANDORA_REQUIRE_PROTOC
188+
189+AC_LANG_PUSH(C++)
190+PANDORA_REQUIRE_PTHREAD
191+PANDORA_REQUIRE_LIBDL
192+AC_LANG_POP
193+
194+PANDORA_USE_BETTER_MALLOC
195+
196+PANDORA_DRIZZLE_BUILD
197+""" % plugin)
198+
199+ write_plugin_ac(plugin, plugin_file)
200+
201+ plugin_file.write("""
202+AC_CONFIG_FILES(Makefile)
203+
204+AC_OUTPUT
205+
206+echo "---"
207+echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
208+echo ""
209+echo " * Installation prefix: $prefix"
210+echo " * System type: $host_vendor-$host_os"
211+echo " * Host CPU: $host_cpu"
212+echo " * C Compiler: $CC_VERSION"
213+echo " * C++ Compiler: $CXX_VERSION"
214+echo " * Debug enabled: $with_debug"
215+echo " * Warnings as failure: $ac_cv_warnings_as_errors"
216+echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
217+echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
218+echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
219+echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"
220+echo ""
221+echo "---"
222+
223+ """ % plugin)
224+
225+def write_external_makefile(plugin, plugin_file):
226+
227+ plugin_file.write("""
228+ACLOCAL_AMFLAGS = -I m4 --force
229+VERSION=$(PANDORA_RELEASE_VERSION)
230+
231+pkgplugindir=%(pkgplugindir)s
232+EXTRA_DIST = plugin.ini
233+
234+""" % plugin)
235+ if plugin['headers'] != "":
236+ plugin_file.write("noinst_HEADERS = %(headers)s\n" % plugin)
237+ if plugin['install_headers'] != "":
238+ plugin_file.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
239+ if plugin['testsuite']:
240+ if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
241+ plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
242+ plugin_file.write("""
243+pkgplugin_LTLIBRARIES=%(libname)s.la
244+%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
245+%(libname)s_la_LIBADD=%(libs)s
246+%(libname)s_la_DEPENDENCIES=%(libs)s
247+%(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
248+%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
249+%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
250+%(libname)s_la_SOURCES=%(sources)s
251+check_PROGRAMS += %(tests)s
252+""" % plugin)
253+ plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
254+ if os.path.exists(plugin_am_file):
255+ plugin_file.write('include %s\n' % plugin_am_file)
256+
257+def write_external_plugin():
258+ """Return True if the plugin had changed."""
259+ plugin = read_plugin_ini('.')
260+ expand_plugin_ini(plugin)
261+ plugin_file = ChangeProtectedFile('configure.ac')
262+ write_external_configure(plugin, plugin_file)
263+ result = plugin_file.close()
264+ plugin_file = ChangeProtectedFile('Makefile.am')
265+ write_external_makefile(plugin, plugin_file)
266+ # Write some stub configure.ac and Makefile.am files that include the above
267+ result = plugin_file.close() or result
268+ return result
269+
270+def write_plugin(plugin, plugin_ini_list):
271+ # Since this function is recursive, make sure we're not already in it.
272+ if plugin.has_key('writing_status'):
273+ if plugin['writing_status'] == 'done':
274+ return
275+ else:
276+ print "Dependency loop detected with %s" % plugin['name']
277+ exit(1)
278+
279+ plugin['writing_status'] = 'dependencies'
280+
281+ # Write all dependencies first to get around annoying automake bug
282+ for dependency in plugin['dependency_list']:
283+ found = False
284+ for find_plugin in plugin_ini_list:
285+ if find_plugin['module_name'] == dependency:
286+ found = True
287+ write_plugin(find_plugin, plugin_ini_list)
288+ break
289+ if found is False:
290+ print "Could not find dependency %s: %s" % (plugin['name'], dependency)
291+ exit(1)
292+
293+ write_plugin_ac(plugin, plugin_ac_file)
294+ write_plugin_am(plugin, plugin_am_file)
295+ plugin['writing_status'] = 'done'
296+
297+def write_plugin_ac(plugin, plugin_ac):
298+ #
299+ # Write plugin config instructions into plugin.ac file.
300+ #
301+ plugin_ac_file=os.path.join(plugin['rel_path'],'plugin.ac')
302+ plugin_m4_dir=os.path.join(plugin['rel_path'],'m4')
303+ plugin_m4_files=[]
304+ if os.path.exists(plugin_m4_dir) and os.path.isdir(plugin_m4_dir):
305+ for m4_file in os.listdir(plugin_m4_dir):
306+ if os.path.splitext(m4_file)[-1] == '.m4':
307+ plugin_m4_files.append(os.path.join(plugin['rel_path'], m4_file))
308+ plugin_ac.write("""
309+dnl Config for %(title)s
310+""" % plugin)
311+ for m4_file in plugin_m4_files:
312+ plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
313+ plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
314+
315+ plugin_ac.write("""
316+AC_ARG_WITH([%(name_with_dashes)s-plugin],[
317+dnl indented wierd to make the help output correct
318+AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(enabled)s@:>@])
319+AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s])
320+ ],[
321+ with_%(name)s_plugin="$withval"
322+ AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
323+ requested_%(name)s_plugin="yes"
324+ ],[
325+ requested_%(name)s_plugin="no"
326+ ])
327+ ],[
328+ with_%(name)s_plugin="%(enabled)s"
329+ requested_%(name)s_plugin="no"
330+ ])
331+AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
332+dnl indented wierd to make the help output correct
333+AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(default_yesno)s@:>@])
334+AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable building %(title)s])
335+ ],
336+ [enable_%(name)s_plugin="$enableval"],
337+ [enable_%(name)s_plugin=%(default_yesno)s])
338+
339+""" % plugin)
340+ if os.path.exists(plugin_ac_file):
341+ plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file)
342+ # The plugin author has specified some check to make to determine
343+ # if the plugin can be built. If the plugin is turned on and this
344+ # check fails, then configure should error out. If the plugin is not
345+ # turned on, then the normal conditional build stuff should just let
346+ # it silently not build
347+ if plugin['has_build_conditional']:
348+ plugin_ac.write("""
349+AS_IF([test %(build_conditional)s],
350+ [], dnl build_conditional can only negate
351+ [
352+ AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"],
353+ [AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])])
354+ with_%(name)s_plugin=no
355+ ])
356+
357+""" % plugin)
358+ if not plugin['unconditional']:
359+ plugin_ac.write("""
360+AM_CONDITIONAL([%(build_conditional_tag)s],
361+ [test %(build_conditional)s])
362+ """ % plugin)
363+
364+ plugin_ac.write("""
365+AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
366+ [
367+""" % plugin)
368+ if plugin['testsuite']:
369+ plugin_ac.write("""
370+ pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
371+ """ % plugin)
372+ if plugin['static']:
373+ plugin_ac.write("""
374+ AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
375+ pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
376+ pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
377+ pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
378+ PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
379+ ])
380+ """ % plugin)
381+
382+ else:
383+ plugin_ac.write("""
384+ AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
385+ pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
386+ ])
387+ """ % plugin)
388+ plugin_ac.write(" ])\n")
389+
390+def fix_file_paths(plugin, files):
391+ # TODO: determine path to plugin dir relative to top_srcdir... append it to
392+ # source files if they don't already have it
393+ new_files=""
394+ if plugin['plugin_dir'] != ".":
395+ for file in files.split():
396+ if not file.startswith(plugin['rel_path']):
397+ file= os.path.join(plugin['rel_path'], file)
398+ new_files= "%s %s" % (new_files, file)
399+ else:
400+ new_files= " ".join(plugin['sources'].split())
401+ if new_files != "":
402+ return new_files
403+ return files
404+
405+def expand_plugin_ini(plugin):
406+ if plugin['name'] == "**OUT-OF-TREE**":
407+ print "Out of tree plugins require the name field to be specified in plugin.ini"
408+ sys.exit(1)
409+
410+ if plugin['plugin_dir'] == ".":
411+ plugin['rel_path']= plugin['plugin_dir']
412+ plugin['unconditional']=True
413+ else:
414+ plugin['rel_path']= plugin['plugin_dir'][len(config['top_srcdir'])+len(os.path.sep):]
415+ plugin['unconditional']=False
416+
417+ plugin['sources']= fix_file_paths(plugin, plugin['sources'])
418+ plugin['main_source']= plugin['sources'].split()[0]
419+ plugin['headers']= fix_file_paths(plugin, plugin['headers'])
420+ plugin['install_headers']= fix_file_paths(plugin, plugin['install_headers'])
421+ plugin['tests']= fix_file_paths(plugin, plugin['tests'])
422+
423+ # Make a yes/no version for autoconf help messages
424+ if plugin['load_by_default'] or plugin['static']:
425+ plugin['default_yesno']="yes"
426+ else:
427+ plugin['default_yesno']="no"
428+
429+
430+ plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
431+ plugin['name_with_dashes']= plugin['name'].replace('_','-')
432+ if plugin.has_key('build_conditional'):
433+ plugin['has_build_conditional']=True
434+ plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes" -a %(build_conditional)s' % plugin
435+ else:
436+ plugin['has_build_conditional']=False
437+ plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
438+
439+ if plugin['install']:
440+ plugin['library_type']= 'pkgplugin'
441+ else:
442+ plugin['library_type']= 'noinst'
443+
444+def find_testsuite(plugin_dir):
445+ for testdir in ['drizzle-tests','tests']:
446+ if os.path.isdir(os.path.join(plugin_dir,testdir)):
447+ return testdir
448+ if os.path.isdir(os.path.join('tests','suite',os.path.basename(plugin_dir))):
449+ return ""
450+ return None
451+
452+def read_plugin_ini(plugin_dir):
453+ if plugin_dir == ".":
454+ plugin_name="**OUT-OF-TREE**"
455+ else:
456+ short_name=os.path.basename(plugin_dir)
457+ plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:]
458+ module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator'])
459+ plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator'])
460+
461+
462+ plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname'])
463+ plugin_defaults= dict(sources="%s.cc" % short_name,
464+ headers="",
465+ install_headers="",
466+ cflags="",
467+ cppflags="",
468+ cxxflags="",
469+ libs="",
470+ ldflags="",
471+ author="",
472+ title="",
473+ description="",
474+ license="PLUGIN_LICENSE_GPL",
475+ name=plugin_name,
476+ module_name=module_name,
477+ load_by_default=config['default_load_by_default'],
478+ disabled="False",
479+ static="False",
480+ dependencies="",
481+ dependency_aliases="",
482+ tests="",
483+ install=config['default_install'])
484+ parser=ConfigParser.ConfigParser(defaults= plugin_defaults)
485+ parser.read(plugin_file)
486+ plugin=dict(parser.items('plugin'))
487+ plugin['plugin_dir'] = plugin_dir
488+ if plugin_dir == '.':
489+ if not plugin.has_key('url'):
490+ print "External Plugins are required to specifiy a url"
491+ plugin['url']= 'http://launchpad.net/%(name)s' % plugin
492+ sys.exit(1)
493+ if plugin_dir == '.' and not plugin.has_key('version'):
494+ print "External Plugins are required to specifiy a version"
495+ sys.exit(1)
496+ if not plugin.has_key('version'):
497+ plugin['version'] = config['default_plugin_version']
498+
499+ if plugin.has_key('load_by_default'):
500+ plugin['load_by_default']=parser.getboolean('plugin','load_by_default')
501+ if plugin.has_key('disabled'):
502+ plugin['disabled']=parser.getboolean('plugin','disabled')
503+ if plugin['disabled']:
504+ plugin['enabled']="no"
505+ else:
506+ plugin['enabled']="yes"
507+ if plugin.has_key('static'):
508+ plugin['static']= parser.getboolean('plugin','static')
509+ if plugin.has_key('install'):
510+ plugin['install']= parser.getboolean('plugin','install')
511+ if plugin.has_key('testsuite'):
512+ if plugin['testsuite'] == 'disable':
513+ plugin['testsuite']= False
514+ else:
515+ plugin_testsuite= find_testsuite(plugin_dir)
516+ plugin['testsuitedir']=plugin_testsuite
517+ if plugin_testsuite is not None:
518+ plugin['testsuite']=True
519+ else:
520+ plugin['testsuite']=False
521+
522+ plugin['cflags']+= ' ' + config['extra_cflags']
523+ plugin['cppflags']+= ' ' + config['extra_cppflags']
524+ plugin['cxxflags']+= ' ' + config['extra_cxxflags']
525+
526+ plugin['libname']= "lib%s%s%s" % (config['plugin_prefix'],
527+ plugin['name'],
528+ config['plugin_suffix'])
529+ if config['force_lowercase_libname']:
530+ plugin['libname']= plugin['libname'].lower()
531+
532+ plugin['root_plugin_dir']= config['root_plugin_dir']
533+ plugin['plugin_prefix']= config['plugin_prefix']
534+ plugin['plugin_suffix']= config['plugin_suffix']
535+ plugin['pkgplugindir']= config['pkgplugindir']
536+
537+ # Dependencies must have a module but dependency aliases are simply added
538+ # to the variable passed during compile.
539+ plugin['dependency_list'] = plugin['dependencies'].split()
540+ dependency_aliases = plugin['dependency_aliases'].split()
541+ plugin['dependencies'] = ','.join(plugin['dependency_list'] +
542+ plugin['dependency_aliases'].split())
543+ dependency_libs = ["%s/lib%s%s.la" % (config['root_plugin_dir'],
544+ dependency.lower().replace('::', '_'),
545+ config['plugin_suffix'])
546+ for dependency in plugin['dependency_list']]
547+ plugin['libs'] = " ".join(plugin['libs'].split() + dependency_libs);
548+
549+# Libtool is going to expand:
550+# -DPANDORA_MODULE_AUTHOR='"Padraig O'"'"'Sullivan"'
551+# to:
552+# "-DPANDORA_MODULE_AUTHOR=\"Padraig O'Sullivan\""
553+# So we have to replace internal ''s to '"'"'
554+ for key in ('author','title','description','version'):
555+ plugin[key]=plugin[key].replace('"','\\"')
556+ plugin[key]=plugin[key].replace("'","'\"'\"'")
557+ return plugin
558+
559+
560+def write_plugin_am(plugin, plugin_am):
561+ """Write an automake fragment for this plugin.
562+
563+ :param plugin: The plugin dict.
564+ :param plugin_am: The file to write to.
565+ """
566+ # The .plugin.ini.stamp avoids changing the datestamp on plugin.ini which can
567+ # confuse VCS systems.
568+ plugin_am.write("""
569+EXTRA_DIST += %(rel_path)s/plugin.ini
570+
571+# Prevent errors when a plugin dir is removed
572+%(rel_path)s/plugin.ini:
573+
574+""" % plugin)
575+ if plugin['headers'] != "":
576+ plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
577+ if plugin['install_headers'] != "":
578+ plugin_am.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
579+ if plugin['testsuite']:
580+ if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
581+ plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
582+ if plugin['static']:
583+ plugin_am.write("""
584+%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
585+EXTRA_DIST += %(rel_path)s/plugin.ini
586+if %(build_conditional_tag)s
587+ noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
588+ %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
589+ %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
590+ %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
591+ %(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
592+ %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
593+ %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
594+ %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
595+ check_PROGRAMS += %(tests)s
596+ PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
597+endif
598+""" % plugin)
599+ else:
600+ plugin_am.write("""
601+%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
602+EXTRA_DIST += %(rel_path)s/plugin.ini
603+if %(build_conditional_tag)s
604+ %(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
605+ %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
606+ %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
607+ %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
608+ %(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
609+ %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
610+ %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
611+ %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
612+ check_PROGRAMS += %(tests)s
613+endif
614+""" % plugin)
615+ plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
616+ if os.path.exists(plugin_am_file):
617+ plugin_am.write('include %s\n' % plugin_am_file)
618+
619+#
620+# MAIN STARTS HERE:
621+#
622+
623+# Parse the pandora-plugin config file
624+
625+config_defaults= dict(
626+ top_srcdir='.',
627+ top_builddir='.',
628+ plugin_ini_fname='plugin.ini',
629+ plugin_prefix='',
630+ plugin_suffix='',
631+ extra_cflags='',
632+ extra_cppflags='',
633+ extra_cxxflags='',
634+ root_plugin_dir='',
635+ pkgplugindir='',
636+ default_install='True',
637+ default_plugin_version='',
638+ default_load_by_default='False',
639+ force_lowercase_libname='True',
640+ plugin_name_separator='_',
641+ module_name_separator='::'
642+)
643+
644+config_parser = ConfigParser.ConfigParser(defaults=config_defaults)
645+config_parser.read(pandora_plugin_file)
646+config = dict(config_parser.items('pandora-plugin'))
647+config['force_lowercase_libname']=config_parser.getboolean('pandora-plugin','force_lowercase_libname')
648+
649+# I'm 3 seconds away from writing a comprehensive build solution
650+if not os.path.exists('config/pandora_vc_revinfo'):
651+ if os.path.exists('.bzr'):
652+ bzr_revno= subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE).communicate()[0].strip()
653+ rev_date= datetime.date.fromtimestamp(time.time())
654+ config['default_plugin_version'] = "%d.%02d.%s" % (rev_date.year, rev_date.month, bzr_revno)
655+ else:
656+ config['default_plugin_version']=datetime.date.fromtimestamp(time.time()).isoformat()
657+else:
658+ # need to read config/pandora_vc_revno
659+ pandora_vc_revno=open('config/pandora_vc_revinfo','r').read().split()
660+ rev_date=""
661+ bzr_revno=""
662+ for revno_line in pandora_vc_revno:
663+ (revno_key,revno_val)= revno_line.split("=")
664+ if revno_key == 'PANDORA_VC_REVNO':
665+ bzr_revno=revno_val.strip()
666+ elif revno_key == 'PANDORA_RELEASE_DATE':
667+ rev_date=revno_val.strip()
668+
669+ config['default_plugin_version'] = "%s.%s" % (rev_date, bzr_revno)
670+
671+actions=[]
672+for arg in sys.argv:
673+ if arg.startswith('--top_srcdir='):
674+ config['top_srcdir']=arg[12:]
675+ elif arg.startswith('--top_builddir='):
676+ config['top_builddir']=arg[14:]
677+ elif arg == "--force-all":
678+ actions=['plugin-list','pandora-plugin.am','write']
679+ break
680+ else:
681+ actions.append(arg)
682+if len(actions) == 0:
683+ actions.append('write')
684+
685+plugin_list=[]
686+
687+def accumulate_plugins(arg, dirname, fnames):
688+ # plugin_ini_fname is a name in dirname indicating dirname is a plugin.
689+ if config['plugin_ini_fname'] in fnames:
690+ arg.append(dirname)
691+
692+os.path.walk(os.path.join(config['top_srcdir'],
693+ config['root_plugin_dir']),
694+ accumulate_plugins,
695+ plugin_list)
696+
697+
698+if not os.path.exists("config/pandora-plugin.am") or "write" in actions:
699+ plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am'))
700+ plugin_am_file.write("""
701+# always the current list, generated every build so keep this lean.
702+# pandora-plugin.list: datestamp preserved list
703+${srcdir}/config/pandora-plugin.list: .plugin.scan
704+.plugin.scan:
705+ @cd ${top_srcdir} && python config/pandora-plugin plugin-list
706+
707+# Plugins affect configure; so to prevent configure running twice in a tarball
708+# build (once up front, once with the right list of plugins, we ship the
709+# generated list of plugins and the housekeeping material for that list so it
710+# is likewise not updated.
711+EXTRA_DIST += \
712+ config/pandora-plugin.am \
713+ config/pandora-plugin.ac \
714+ config/pandora-plugin \
715+ config/pandora-plugin.ini
716+
717+
718+# Seed the list of plugin LDADDS which plugins may extend.
719+PANDORA_DYNAMIC_LDADDS=
720+
721+# plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am
722+# files. This is invoked when the code to generate such files has altered.""")
723+
724+if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
725+ plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
726+ plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
727+
728+
729+if os.path.exists('plugin.ini'):
730+ # Are we in a plugin dir which wants to have a self-sufficient build system?
731+ plugin_list=['.']
732+
733+ write_external_plugin()
734+else:
735+ plugin_list_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.list'))
736+ for p in plugin_list:
737+ plugin_list_file.write(p)
738+ plugin_list_file.write("\n")
739+ plugin_list.sort()
740+ plugin_list_file.close()
741+
742+if not os.path.exists("config/pandora-plugin.am") or 'write' in actions:
743+ plugin_am_file.write("\n${top_srcdir}/config/pandora-plugin.am: ${top_srcdir}/config/pandora-plugin.list ${top_srcdir}/config/pandora-plugin ")
744+ for plugin_dir in plugin_list:
745+ plugin_am_file.write("\\\n\t%s/plugin.ini " % plugin_dir)
746+ plugin_am_file.write("\n\tcd ${top_srcdir} && python config/pandora-plugin write\n")
747+ plugin_ini_list=[]
748+
749+ # Load all plugin.ini files first so we can do dependency tracking.
750+ for plugin_dir in plugin_list:
751+ plugin = read_plugin_ini(plugin_dir)
752+ expand_plugin_ini(plugin)
753+ plugin_ini_list.append(plugin)
754+
755+ # Check for duplicates
756+ plugin_name_list = [plugin['libname'] for plugin in plugin_ini_list]
757+ for plugin in plugin_ini_list:
758+ if plugin_name_list.count(plugin['libname']) != 1:
759+ print "Duplicate module name %s" % plugin['libname']
760+ exit(1)
761+
762+ for plugin in plugin_ini_list:
763+ write_plugin(plugin, plugin_ini_list)
764+
765+if plugin_am_file is not None:
766+ plugin_am_file.close()
767+if plugin_ac_file is not None:
768+ plugin_ac_file.close()
769
770=== added file 'config/uncrustify.cfg'
771--- config/uncrustify.cfg 1970-01-01 00:00:00 +0000
772+++ config/uncrustify.cfg 2010-06-13 16:37:23 +0000
773@@ -0,0 +1,1112 @@
774+#
775+# Uncrustify options (with comments) for Pandora Projects
776+#
777+
778+nl_after_brace_close = TRUE
779+
780+# The type of line endings
781+newlines = lf # auto/lf/crlf/cr
782+
783+# The original size of tabs in the input
784+input_tab_size = 8 # number
785+
786+# The size of tabs in the output (only used if align_with_tabs=true)
787+output_tab_size = 3 # number
788+
789+# The ascii value of the string escape char, usually 92 (\) or 94 (^). (Pawn)
790+string_escape_char = 92 # number
791+
792+# Alternate string escape char for Pawn. Only works right before the quote char.
793+string_escape_char2 = 0 # number
794+
795+#
796+# Indenting
797+#
798+
799+# The number of columns to indent per level.
800+# Usually 2, 3, 4, or 8.
801+indent_columns = 2 # number
802+
803+# How to use tabs when indenting code
804+# 0=spaces only
805+# 1=indent with tabs, align with spaces
806+# 2=indent and align with tabs
807+indent_with_tabs = 0 # number
808+
809+# Whether to indent strings broken by '\' so that they line up
810+indent_align_string = true # false/true
811+
812+# The number of spaces to indent multi-line XML strings.
813+# Requires indent_align_string=True
814+indent_xml_string = 0 # number
815+
816+# Spaces to indent '{' from level
817+indent_brace = 0 # number
818+
819+# Whether braces are indented to the body level
820+indent_braces = false # false/true
821+
822+# Disabled indenting function braces if indent_braces is true
823+indent_braces_no_func = false # false/true
824+
825+# Indent based on the size of the brace parent, ie 'if' => 3 spaces, 'for' => 4 spaces, etc.
826+indent_brace_parent = false # false/true
827+
828+# Whether the 'namespace' body is indented
829+indent_namespace = false # false/true
830+
831+# Whether the 'extern "C"' body is indented
832+indent_extern = false # false/true
833+
834+# Whether the 'class' body is indented
835+indent_class = true # false/true
836+
837+# Whether to indent the stuff after a leading class colon
838+indent_class_colon = true # false/true
839+
840+# False=treat 'else\nif' as 'else if' for indenting purposes
841+# True=indent the 'if' one level
842+indent_else_if = false # false/true
843+
844+# True: indent continued function call parameters one indent level
845+# False: align parameters under the open paren
846+indent_func_call_param = false # false/true
847+
848+# Same as indent_func_call_param, but for function defs
849+indent_func_def_param = false # false/true
850+
851+# Same as indent_func_call_param, but for function protos
852+indent_func_proto_param = false # false/true
853+
854+# Same as indent_func_call_param, but for class declarations
855+indent_func_class_param = false # false/true
856+
857+# Same as indent_func_call_param, but for class variable constructors
858+indent_func_ctor_var_param = false # false/true
859+
860+# Same as indent_func_call_param, but for templates
861+indent_template_param = false # false/true
862+
863+# Double the indent for indent_func_xxx_param options
864+indent_func_param_double = false # false/true
865+
866+# Indentation column for standalone 'const' function decl/proto qualifier
867+indent_func_const = 0 # number
868+
869+# Indentation column for standalone 'throw' function decl/proto qualifier
870+indent_func_throw = 0 # number
871+
872+# The number of spaces to indent a continued '->' or '.'
873+# Usually set to 0, 1, or indent_columns.
874+indent_member = 3 # number
875+
876+# Spaces to indent single line ('//') comments on lines before code
877+indent_sing_line_comments = 0 # number
878+
879+# If set, will indent trailing single line ('//') comments relative
880+# to the code instead of trying to keep the same absolute column
881+indent_relative_single_line_comments = false # false/true
882+
883+# Spaces to indent 'case' from 'switch'
884+# Usually 0 or indent_columns.
885+indent_switch_case = 0 # number
886+
887+# Spaces to shift the 'case' line, without affecting any other lines
888+# Usually 0.
889+indent_case_shift = 0 # number
890+
891+# Spaces to indent '{' from 'case'.
892+# By default, the brace will appear under the 'c' in case.
893+# Usually set to 0 or indent_columns.
894+indent_case_brace = 0 # number
895+
896+# Whether to indent comments found in first column
897+indent_col1_comment = false # false/true
898+
899+# How to indent goto labels
900+# >0 : absolute column where 1 is the leftmost column
901+# <=0 : subtract from brace indent
902+indent_label = 1 # number
903+
904+# Same as indent_label, but for access specifiers that are followed by a colon
905+indent_access_spec = 1 # number
906+
907+# Indent the code after an access specifier by one level.
908+# If set, this option forces 'indent_access_spec=0'
909+indent_access_spec_body = false # false/true
910+
911+# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
912+indent_paren_nl = false # false/true
913+
914+# Controls the indent of a close paren after a newline.
915+# 0: Indent to body level
916+# 1: Align under the open paren
917+# 2: Indent to the brace level
918+indent_paren_close = 0 # number
919+
920+# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
921+indent_comma_paren = false # false/true
922+
923+# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
924+indent_bool_paren = false # false/true
925+
926+# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
927+indent_square_nl = false # false/true
928+
929+# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
930+indent_preserve_sql = false # false/true
931+
932+#
933+# Spacing options
934+#
935+
936+# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
937+sp_arith = force # ignore/add/remove/force
938+
939+# Add or remove space before assignment operator '=', '+=', etc
940+sp_before_assign = remove # ignore/add/remove/force
941+
942+# Add or remove space after assignment operator '=', '+=', etc
943+sp_after_assign = force # ignore/add/remove/force
944+
945+# Add or remove space around assignment '=' in enum
946+sp_enum_assign = ignore # ignore/add/remove/force
947+
948+# Add or remove space around boolean operators '&&' and '||'
949+sp_bool = force # ignore/add/remove/force
950+
951+# Add or remove space around compare operator '<', '>', '==', etc
952+sp_compare = force # ignore/add/remove/force
953+
954+# Add or remove space inside '(' and ')'
955+sp_inside_paren = remove # ignore/add/remove/force
956+
957+# Add or remove space between nested parens
958+sp_paren_paren = remove # ignore/add/remove/force
959+
960+# Whether to balance spaces inside nested parens
961+sp_balance_nested_parens = false # false/true
962+
963+# Add or remove space between ')' and '{'
964+sp_paren_brace = ignore # ignore/add/remove/force
965+
966+# Add or remove space before pointer star '*'
967+sp_before_ptr_star = force # ignore/add/remove/force
968+
969+# Add or remove space before pointer star '*' that isn't followed by a variable name
970+# If set to 'ignore', sp_before_ptr_star is used instead.
971+sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
972+
973+# Add or remove space between pointer stars '*'
974+sp_between_ptr_star = remove # ignore/add/remove/force
975+
976+# Add or remove space after pointer star '*', if followed by a word.
977+sp_after_ptr_star = remove # ignore/add/remove/force
978+
979+# Add or remove space after a pointer star '*', if followed by a func proto/def.
980+sp_after_ptr_star_func = ignore # ignore/add/remove/force
981+
982+# Add or remove space before a pointer star '*', if followed by a func proto/def.
983+sp_before_ptr_star_func = ignore # ignore/add/remove/force
984+
985+# Add or remove space before a reference sign '&'
986+sp_before_byref = remove # ignore/add/remove/force
987+
988+# Add or remove space before a reference sign '&' that isn't followed by a variable name
989+# If set to 'ignore', sp_before_byref is used instead.
990+sp_before_unnamed_byref = ignore # ignore/add/remove/force
991+
992+# Add or remove space after reference sign '&', if followed by a word.
993+sp_after_byref = force # ignore/add/remove/force
994+
995+# Add or remove space after a reference sign '&', if followed by a func proto/def.
996+sp_after_byref_func = ignore # ignore/add/remove/force
997+
998+# Add or remove space before a reference sign '&', if followed by a func proto/def.
999+sp_before_byref_func = ignore # ignore/add/remove/force
1000+
1001+# Add or remove space between type and word
1002+sp_after_type = force # ignore/add/remove/force
1003+
1004+# Add or remove space in 'template <' vs 'template<'.
1005+# If set to ignore, sp_before_angle is used.
1006+sp_template_angle = ignore # ignore/add/remove/force
1007+
1008+# Add or remove space before '<>'
1009+sp_before_angle = remove # ignore/add/remove/force
1010+
1011+# Add or remove space inside '<' and '>'
1012+sp_inside_angle = remove # ignore/add/remove/force
1013+
1014+# Add or remove space after '<>'
1015+sp_after_angle = force # ignore/add/remove/force
1016+
1017+# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
1018+sp_angle_paren = ignore # ignore/add/remove/force
1019+
1020+# Add or remove space between '<>' and a word as in 'List<byte> m;'
1021+sp_angle_word = ignore # ignore/add/remove/force
1022+
1023+# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
1024+sp_before_sparen = force # ignore/add/remove/force
1025+
1026+# Add or remove space inside if-condition '(' and ')'
1027+sp_inside_sparen = remove # ignore/add/remove/force
1028+
1029+# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
1030+sp_after_sparen = force # ignore/add/remove/force
1031+
1032+# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
1033+sp_sparen_brace = add # ignore/add/remove/force
1034+
1035+# Add or remove space before empty statement ';' on 'if', 'for' and 'while'
1036+sp_special_semi = ignore # ignore/add/remove/force
1037+
1038+# Add or remove space before ';'
1039+sp_before_semi = remove # ignore/add/remove/force
1040+
1041+# Add or remove space before ';' in non-empty 'for' statements
1042+sp_before_semi_for = ignore # ignore/add/remove/force
1043+
1044+# Add or remove space before a semicolon of an empty part of a for statment.
1045+sp_before_semi_for_empty = force # ignore/add/remove/force
1046+
1047+# Add or remove space after the final semicolon of an empty part of a for statment: for ( ; ; <here> ).
1048+sp_after_semi_for_empty = ignore # ignore/add/remove/force
1049+
1050+# Add or remove space before '[' (except '[]')
1051+sp_before_square = ignore # ignore/add/remove/force
1052+
1053+# Add or remove space before '[]'
1054+sp_before_squares = ignore # ignore/add/remove/force
1055+
1056+# Add or remove space inside '[' and ']'
1057+sp_inside_square = remove # ignore/add/remove/force
1058+
1059+# Add or remove space after ','
1060+sp_after_comma = force # ignore/add/remove/force
1061+
1062+# Add or remove space before ','
1063+sp_before_comma = remove # ignore/add/remove/force
1064+
1065+# Add or remove space after class ':'
1066+sp_after_class_colon = ignore # ignore/add/remove/force
1067+
1068+# Add or remove space before class ':'
1069+sp_before_class_colon = ignore # ignore/add/remove/force
1070+
1071+# Add or remove space between 'operator' and operator sign
1072+sp_after_operator = ignore # ignore/add/remove/force
1073+
1074+# Add or remove space between the operator symbol and the open paren, as in 'operator ++('
1075+sp_after_operator_sym = ignore # ignore/add/remove/force
1076+
1077+# Add or remove space after C/D cast, ie 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
1078+sp_after_cast = remove # ignore/add/remove/force
1079+
1080+# Add or remove spaces inside cast parens
1081+sp_inside_paren_cast = remove # ignore/add/remove/force
1082+
1083+# Add or remove space between the type and open paren in a C++ cast, ie 'int(exp)' vs 'int (exp)'
1084+sp_cpp_cast_paren = remove # ignore/add/remove/force
1085+
1086+# Add or remove space between 'sizeof' and '('
1087+sp_sizeof_paren = remove # ignore/add/remove/force
1088+
1089+# Add or remove space after the tag keyword (Pawn)
1090+sp_after_tag = ignore # ignore/add/remove/force
1091+
1092+# Add or remove space inside enum '{' and '}'
1093+sp_inside_braces_enum = force # ignore/add/remove/force
1094+
1095+# Add or remove space inside struct/union '{' and '}'
1096+sp_inside_braces_struct = force # ignore/add/remove/force
1097+
1098+# Add or remove space inside '{' and '}'
1099+sp_inside_braces = force # ignore/add/remove/force
1100+
1101+# Add or remove space inside '{}'
1102+sp_inside_braces_empty = ignore # ignore/add/remove/force
1103+
1104+# Add or remove space between return type and function name
1105+# A minimum of 1 is forced except for pointer return types.
1106+sp_type_func = force # ignore/add/remove/force
1107+
1108+# Add or remove space between function name and '(' on function declaration
1109+sp_func_proto_paren = remove # ignore/add/remove/force
1110+
1111+# Add or remove space between function name and '(' on function definition
1112+sp_func_def_paren = remove # ignore/add/remove/force
1113+
1114+# Add or remove space inside empty function '()'
1115+sp_inside_fparens = ignore # ignore/add/remove/force
1116+
1117+# Add or remove space inside function '(' and ')'
1118+sp_inside_fparen = remove # ignore/add/remove/force
1119+
1120+# Add or remove space between ']' and '(' when part of a function call.
1121+sp_square_fparen = ignore # ignore/add/remove/force
1122+
1123+# Add or remove space between ')' and '{' of function
1124+sp_fparen_brace = add # ignore/add/remove/force
1125+
1126+# Add or remove space between function name and '(' on function calls
1127+sp_func_call_paren = remove # ignore/add/remove/force
1128+
1129+# Add or remove space between the user function name and '(' on function calls
1130+# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
1131+sp_func_call_user_paren = ignore # ignore/add/remove/force
1132+
1133+# Add or remove space between a constructor/destructor and the open paren
1134+sp_func_class_paren = remove # ignore/add/remove/force
1135+
1136+# Add or remove space between 'return' and '('
1137+sp_return_paren = remove # ignore/add/remove/force
1138+
1139+# Add or remove space between '__attribute__' and '('
1140+sp_attribute_paren = remove # ignore/add/remove/force
1141+
1142+# Add or remove space between 'defined' and '(' in '#if defined (FOO)'
1143+sp_defined_paren = remove # ignore/add/remove/force
1144+
1145+# Add or remove space between 'throw' and '(' in 'throw (something)'
1146+sp_throw_paren = ignore # ignore/add/remove/force
1147+
1148+# Add or remove space between macro and value
1149+sp_macro = ignore # ignore/add/remove/force
1150+
1151+# Add or remove space between macro function ')' and value
1152+sp_macro_func = ignore # ignore/add/remove/force
1153+
1154+# Add or remove space between 'else' and '{' if on the same line
1155+sp_else_brace = ignore # ignore/add/remove/force
1156+
1157+# Add or remove space between '}' and 'else' if on the same line
1158+sp_brace_else = ignore # ignore/add/remove/force
1159+
1160+# Add or remove space between '}' and the name of a typedef on the same line
1161+sp_brace_typedef = force # ignore/add/remove/force
1162+
1163+# Add or remove space between 'catch' and '{' if on the same line
1164+sp_catch_brace = ignore # ignore/add/remove/force
1165+
1166+# Add or remove space between '}' and 'catch' if on the same line
1167+sp_brace_catch = ignore # ignore/add/remove/force
1168+
1169+# Add or remove space between 'finally' and '{' if on the same line
1170+sp_finally_brace = ignore # ignore/add/remove/force
1171+
1172+# Add or remove space between '}' and 'finally' if on the same line
1173+sp_brace_finally = ignore # ignore/add/remove/force
1174+
1175+# Add or remove space between 'try' and '{' if on the same line
1176+sp_try_brace = ignore # ignore/add/remove/force
1177+
1178+# Add or remove space between get/set and '{' if on the same line
1179+sp_getset_brace = ignore # ignore/add/remove/force
1180+
1181+# Add or remove space before the '::' operator
1182+sp_before_dc = remove # ignore/add/remove/force
1183+
1184+# Add or remove space after the '::' operator
1185+sp_after_dc = remove # ignore/add/remove/force
1186+
1187+# Add or remove around the D named array initializer ':' operator
1188+sp_d_array_colon = ignore # ignore/add/remove/force
1189+
1190+# Add or remove space after the '!' (not) operator.
1191+sp_not = force # ignore/add/remove/force
1192+
1193+# Add or remove space after the '~' (invert) operator.
1194+sp_inv = remove # ignore/add/remove/force
1195+
1196+# Add or remove space after the '&' (address-of) operator.
1197+# This does not affect the spacing after a '&' that is part of a type.
1198+sp_addr = remove # ignore/add/remove/force
1199+
1200+# Add or remove space around the '.' or '->' operators
1201+sp_member = remove # ignore/add/remove/force
1202+
1203+# Add or remove space after the '*' (dereference) operator.
1204+# This does not affect the spacing after a '*' that is part of a type.
1205+sp_deref = remove # ignore/add/remove/force
1206+
1207+# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'
1208+sp_sign = remove # ignore/add/remove/force
1209+
1210+# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'
1211+sp_incdec = remove # ignore/add/remove/force
1212+
1213+# Add or remove space before a backslash-newline at the end of a line
1214+sp_before_nl_cont = add # ignore/add/remove/force
1215+
1216+# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
1217+sp_after_oc_scope = ignore # ignore/add/remove/force
1218+
1219+# Add or remove space after the colon in message specs
1220+# '-(int) f:(int) x;' vs '-(int) f: (int) x;'
1221+sp_after_oc_colon = ignore # ignore/add/remove/force
1222+
1223+# Add or remove space before the colon in message specs
1224+# '-(int) f: (int) x;' vs '-(int) f : (int) x;'
1225+sp_before_oc_colon = ignore # ignore/add/remove/force
1226+
1227+# Add or remove space after the colon in message specs
1228+# '[object setValue:1];' vs '[object setValue: 1];'
1229+sp_after_send_oc_colon = ignore # ignore/add/remove/force
1230+
1231+# Add or remove space before the colon in message specs
1232+# '[object setValue:1];' vs '[object setValue :1];'
1233+sp_before_send_oc_colon = ignore # ignore/add/remove/force
1234+
1235+# Add or remove space after the (type) in message specs
1236+# '-(int) f: (int) x;' vs '-(int) f: (int)x;'
1237+sp_after_oc_type = ignore # ignore/add/remove/force
1238+
1239+# Add or remove space around the ':' in 'b ? t : f'
1240+sp_cond_colon = ignore # ignore/add/remove/force
1241+
1242+# Add or remove space around the '?' in 'b ? t : f'
1243+sp_cond_question = ignore # ignore/add/remove/force
1244+
1245+# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
1246+sp_case_label = remove # ignore/add/remove/force
1247+
1248+#
1249+# Code alignment (not left column spaces/tabs)
1250+#
1251+
1252+# Whether to keep non-indenting tabs
1253+align_keep_tabs = false # false/true
1254+
1255+# Whether to use tabs for alinging
1256+align_with_tabs = false # false/true
1257+
1258+# Whether to bump out to the next tab when aligning
1259+align_on_tabstop = false # false/true
1260+
1261+# Whether to left-align numbers
1262+align_number_left = false # false/true
1263+
1264+# Align variable definitions in prototypes and functions
1265+align_func_params = false # false/true
1266+
1267+# Align parameters in single-line functions that have the same name.
1268+# The function names must already be aligned with each other.
1269+align_same_func_call_params = false # false/true
1270+
1271+# The span for aligning variable definitions (0=don't align)
1272+align_var_def_span = 1 # number
1273+
1274+# How to align the star in variable definitions.
1275+# 0=Part of the type 'void * foo;'
1276+# 1=Part of the variable 'void *foo;'
1277+# 2=Dangling 'void *foo;'
1278+align_var_def_star_style = 1 # number
1279+
1280+# How to align the '&' in variable definitions.
1281+# 0=Part of the type
1282+# 1=Part of the variable
1283+# 2=Dangling
1284+align_var_def_amp_style = 0 # number
1285+
1286+# The threshold for aligning variable definitions (0=no limit)
1287+align_var_def_thresh = 1 # number
1288+
1289+# The gap for aligning variable definitions
1290+align_var_def_gap = 0 # number
1291+
1292+# Whether to align the colon in struct bit fields
1293+align_var_def_colon = false # false/true
1294+
1295+# Whether to align inline struct/enum/union variable definitions
1296+align_var_def_inline = false # false/true
1297+
1298+# The span for aligning on '=' in assignments (0=don't align)
1299+align_assign_span = 0 # number
1300+
1301+# The threshold for aligning on '=' in assignments (0=no limit)
1302+align_assign_thresh = 12 # number
1303+
1304+# The span for aligning on '=' in enums (0=don't align)
1305+align_enum_equ_span = 0 # number
1306+
1307+# The threshold for aligning on '=' in enums (0=no limit)
1308+align_enum_equ_thresh = 0 # number
1309+
1310+# The span for aligning struct/union (0=don't align)
1311+align_var_struct_span = 0 # number
1312+
1313+# The threshold for aligning struct/union member definitions (0=no limit)
1314+align_var_struct_thresh = 0 # number
1315+
1316+# The gap for aligning struct/union member definitions
1317+align_var_struct_gap = 0 # number
1318+
1319+# The span for aligning struct initializer values (0=don't align)
1320+align_struct_init_span = 3 # number
1321+
1322+# The minimum space between the type and the synonym of a typedef
1323+align_typedef_gap = 3 # number
1324+
1325+# The span for aligning single-line typedefs (0=don't align)
1326+align_typedef_span = 5 # number
1327+
1328+# How to align typedef'd functions with other typedefs
1329+# 0: Don't mix them at all
1330+# 1: align the open paren with the types
1331+# 2: align the function type name with the other type names
1332+align_typedef_func = 0 # number
1333+
1334+# Controls the positioning of the '*' in typedefs. Just try it.
1335+# 0: Align on typdef type, ignore '*'
1336+# 1: The '*' is part of type name: typedef int *pint;
1337+# 2: The '*' is part of the type, but dangling: typedef int *pint;
1338+align_typedef_star_style = 0 # number
1339+
1340+# Controls the positioning of the '&' in typedefs. Just try it.
1341+# 0: Align on typdef type, ignore '&'
1342+# 1: The '&' is part of type name: typedef int &pint;
1343+# 2: The '&' is part of the type, but dangling: typedef int &pint;
1344+align_typedef_amp_style = 0 # number
1345+
1346+# The span for aligning comments that end lines (0=don't align)
1347+align_right_cmt_span = 3 # number
1348+
1349+# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
1350+align_right_cmt_mix = false # false/true
1351+
1352+# If a trailing comment is more than this number of columns away from the text it follows,
1353+# it will qualify for being aligned.
1354+align_right_cmt_gap = 0 # number
1355+
1356+# The span for aligning function prototypes (0=don't align)
1357+align_func_proto_span = 0 # number
1358+
1359+# Minimum gap between the return type and the function name.
1360+align_func_proto_gap = 0 # number
1361+
1362+# Whether to mix aligning prototype and variable declarations.
1363+# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
1364+align_mix_var_proto = false # false/true
1365+
1366+# Align single-line functions with function prototypes, uses align_func_proto_span
1367+align_single_line_func = false # false/true
1368+
1369+# Aligning the open brace of single-line functions.
1370+# Requires align_single_line_func=true, uses align_func_proto_span
1371+align_single_line_brace = false # false/true
1372+
1373+# Gap for align_single_line_brace.
1374+align_single_line_brace_gap = 0 # number
1375+
1376+# The span for aligning ObjC msg spec (0=don't align)
1377+align_oc_msg_spec_span = 0 # number
1378+
1379+# Whether to align macros wrapped with a backslash and a newline.
1380+# This will not work right if the macro contains a multi-line comment.
1381+align_nl_cont = true # false/true
1382+
1383+# The minimum space between label and value of a preprocessor define
1384+align_pp_define_gap = 4 # number
1385+
1386+# The span for aligning on '#define' bodies (0=don't align)
1387+align_pp_define_span = 3 # number
1388+
1389+# Align lines that start with '<<' with previous '<<'. Default=true
1390+align_left_shift = true # false/true
1391+
1392+#
1393+# Newline adding and removing options
1394+#
1395+
1396+# Whether to collapse empty blocks between '{' and '}'
1397+nl_collapse_empty_body = true # false/true
1398+
1399+# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
1400+nl_assign_leave_one_liners = false # false/true
1401+
1402+# Don't split one-line braced statements inside a class xx { } body
1403+nl_class_leave_one_liners = false # false/true
1404+
1405+# Don't split one-line enums: 'enum foo { BAR = 15 };'
1406+nl_enum_leave_one_liners = false # false/true
1407+
1408+# Don't split one-line get or set functions
1409+nl_getset_leave_one_liners = false # false/true
1410+
1411+# Don't split one-line function definitions - 'int foo() { return 0; }'
1412+nl_func_leave_one_liners = false # false/true
1413+
1414+# Don't split one-line if/else statements - 'if(a) b++;'
1415+nl_if_leave_one_liners = false # false/true
1416+
1417+# Add or remove newlines at the start of the file
1418+nl_start_of_file = remove # ignore/add/remove/force
1419+
1420+# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
1421+nl_start_of_file_min = 0 # number
1422+
1423+# Add or remove newline at the end of the file
1424+nl_end_of_file = force # ignore/add/remove/force
1425+
1426+# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
1427+nl_end_of_file_min = 1 # number
1428+
1429+# Add or remove newline between '=' and '{'
1430+nl_assign_brace = force # ignore/add/remove/force
1431+
1432+# Add or remove newline between '=' and '[' (D only)
1433+nl_assign_square = force # ignore/add/remove/force
1434+
1435+# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
1436+nl_after_square_assign = force # ignore/add/remove/force
1437+
1438+# The number of newlines after a block of variable definitions
1439+nl_func_var_def_blk = 1 # number
1440+
1441+# Add or remove newline between a function call's ')' and '{', as in:
1442+# list_for_each(item, &list) { }
1443+nl_fcall_brace = force # ignore/add/remove/force
1444+
1445+# Add or remove newline between 'enum' and '{'
1446+nl_enum_brace = force # ignore/add/remove/force
1447+
1448+# Add or remove newline between 'struct and '{'
1449+nl_struct_brace = force # ignore/add/remove/force
1450+
1451+# Add or remove newline between 'union' and '{'
1452+nl_union_brace = force # ignore/add/remove/force
1453+
1454+# Add or remove newline between 'if' and '{'
1455+nl_if_brace = force # ignore/add/remove/force
1456+
1457+# Add or remove newline between '}' and 'else'
1458+nl_brace_else = force # ignore/add/remove/force
1459+
1460+# Add or remove newline between 'else if' and '{'
1461+# If set to ignore, nl_if_brace is used instead
1462+nl_elseif_brace = force # ignore/add/remove/force
1463+
1464+# Add or remove newline between 'else' and '{'
1465+nl_else_brace = force # ignore/add/remove/force
1466+
1467+# Add or remove newline between 'else' and 'if'
1468+nl_else_if = remove # ignore/add/remove/force
1469+
1470+# Add or remove newline between '}' and 'finally'
1471+nl_brace_finally = force # ignore/add/remove/force
1472+
1473+# Add or remove newline between 'finally' and '{'
1474+nl_finally_brace = force # ignore/add/remove/force
1475+
1476+# Add or remove newline between 'try' and '{'
1477+nl_try_brace = force # ignore/add/remove/force
1478+
1479+# Add or remove newline between get/set and '{'
1480+nl_getset_brace = force # ignore/add/remove/force
1481+
1482+# Add or remove newline between 'for' and '{'
1483+nl_for_brace = force # ignore/add/remove/force
1484+
1485+# Add or remove newline between 'catch' and '{'
1486+nl_catch_brace = force # ignore/add/remove/force
1487+
1488+# Add or remove newline between '}' and 'catch'
1489+nl_brace_catch = force # ignore/add/remove/force
1490+
1491+# Add or remove newline between 'while' and '{'
1492+nl_while_brace = force # ignore/add/remove/force
1493+
1494+# Add or remove newline between 'do' and '{'
1495+nl_do_brace = force # ignore/add/remove/force
1496+
1497+# Add or remove newline between '}' and 'while' of 'do' statement
1498+nl_brace_while = force # ignore/add/remove/force
1499+
1500+# Add or remove newline between 'switch' and '{'
1501+nl_switch_brace = force # ignore/add/remove/force
1502+
1503+# Add or remove newline when condition spans two or more lines
1504+nl_multi_line_cond = false # false/true
1505+
1506+# Force a newline in a define after the macro name for multi-line defines.
1507+nl_multi_line_define = true # false/true
1508+
1509+# Whether to put a newline before 'case' statement
1510+nl_before_case = true # false/true
1511+
1512+# Add or remove newline between ')' and 'throw'
1513+nl_before_throw = ignore # ignore/add/remove/force
1514+
1515+# Whether to put a newline after 'case' statement
1516+nl_after_case = true # false/true
1517+
1518+# Newline between namespace and {
1519+nl_namespace_brace = add # ignore/add/remove/force
1520+
1521+# Add or remove newline between 'template<>' and whatever follows.
1522+nl_template_class = add # ignore/add/remove/force
1523+
1524+# Add or remove newline between 'class' and '{'
1525+nl_class_brace = add # ignore/add/remove/force
1526+
1527+# Add or remove newline after each ',' in the constructor member initialization
1528+nl_class_init_args = force # ignore/add/remove/force
1529+
1530+# Add or remove newline between return type and function name in definition
1531+nl_func_type_name = ignore # ignore/add/remove/force
1532+
1533+# Add or remove newline between return type and function name in a prototype
1534+nl_func_proto_type_name = remove # ignore/add/remove/force
1535+
1536+# Add or remove newline between a function name and the opening '('
1537+nl_func_paren = remove # ignore/add/remove/force
1538+
1539+# Add or remove newline after '(' in a function declaration
1540+nl_func_decl_start = remove # ignore/add/remove/force
1541+
1542+# Add or remove newline after each ',' in a function declaration
1543+nl_func_decl_args = remove # ignore/add/remove/force
1544+
1545+# Add or remove newline before the ')' in a function declaration
1546+nl_func_decl_end = remove # ignore/add/remove/force
1547+
1548+# Add or remove newline between function signature and '{'
1549+nl_fdef_brace = add # ignore/add/remove/force
1550+
1551+# Whether to put a newline after 'return' statement
1552+nl_after_return = true # false/true
1553+
1554+# Add or remove a newline between the return keyword and return expression.
1555+nl_return_expr = remove # ignore/add/remove/force
1556+
1557+# Whether to put a newline after semicolons, except in 'for' statements
1558+nl_after_semicolon = true # false/true
1559+
1560+# Whether to put a newline after brace open.
1561+# This also adds a newline before the matching brace close.
1562+nl_after_brace_open = true # false/true
1563+
1564+# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
1565+# placed between the open brace and a trailing single-line comment.
1566+nl_after_brace_open_cmt = false # false/true
1567+
1568+# Whether to put a newline after a virtual brace open.
1569+# These occur in un-braced if/while/do/for statement bodies.
1570+nl_after_vbrace_open = true # false/true
1571+
1572+# Whether to alter newlines in '#define' macros
1573+nl_define_macro = true # false/true
1574+
1575+# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
1576+nl_squeeze_ifdef = false # false/true
1577+
1578+# Add or remove newline before 'if'
1579+nl_before_if = ignore # ignore/add/remove/force
1580+
1581+# Add or remove newline after 'if'
1582+nl_after_if = ignore # ignore/add/remove/force
1583+
1584+# Add or remove newline before 'for'
1585+nl_before_for = ignore # ignore/add/remove/force
1586+
1587+# Add or remove newline after 'for'
1588+nl_after_for = ignore # ignore/add/remove/force
1589+
1590+# Add or remove newline before 'while'
1591+nl_before_while = ignore # ignore/add/remove/force
1592+
1593+# Add or remove newline after 'while'
1594+nl_after_while = ignore # ignore/add/remove/force
1595+
1596+# Add or remove newline before 'switch'
1597+nl_before_switch = force # ignore/add/remove/force
1598+
1599+# Add or remove newline after 'switch'
1600+nl_after_switch = force # ignore/add/remove/force
1601+
1602+# Add or remove newline before 'do'
1603+nl_before_do = ignore # ignore/add/remove/force
1604+
1605+# Add or remove newline after 'do'
1606+nl_after_do = ignore # ignore/add/remove/force
1607+
1608+# Whether to double-space commented-entries in struct/enum
1609+nl_ds_struct_enum_cmt = false # false/true
1610+
1611+# Whether to double-space before the close brace of a struct/union/enum
1612+nl_ds_struct_enum_close_brace = false # false/true
1613+
1614+# Add or remove a newline around a class colon.
1615+# Related to pos_class_colon, nl_class_init_args, and pos_comma.
1616+nl_class_colon = ignore # ignore/add/remove/force
1617+
1618+# Change simple unbraced if statements into a one-liner
1619+# 'if(b)\n i++;' => 'if(b) i++;'
1620+nl_create_if_one_liner = false # false/true
1621+
1622+# Change simple unbraced for statements into a one-liner
1623+# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'
1624+nl_create_for_one_liner = false # false/true
1625+
1626+# Change simple unbraced while statements into a one-liner
1627+# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'
1628+nl_create_while_one_liner = false # false/true
1629+
1630+#
1631+# Positioning options
1632+#
1633+
1634+# The position of arithmetic operators in wrapped expressions
1635+pos_arith = lead # ignore/lead/trail
1636+
1637+# The position of assignment in wrapped expressions
1638+pos_assign = trail # ignore/lead/trail
1639+
1640+# The position of boolean operators in wrapped expressions
1641+pos_bool = lead # ignore/lead/trail
1642+
1643+# The position of the comma in wrapped expressions
1644+pos_comma = trail # ignore/lead/trail
1645+
1646+# The position of the comma in the constructor initialization list
1647+pos_class_comma = trail # ignore/lead/trail
1648+
1649+# The position of colons between constructor and member initialization
1650+pos_class_colon = lead # ignore/lead/trail
1651+
1652+#
1653+# Line Splitting options
1654+#
1655+
1656+# Try to limit code width to N number of columns
1657+code_width = 76 # number
1658+
1659+# Whether to fully split long 'for' statements at semi-colons
1660+ls_for_split_full = true # false/true
1661+
1662+# Whether to fully split long function protos/calls at commas
1663+ls_func_split_full = true # false/true
1664+
1665+#
1666+# Blank line options
1667+#
1668+
1669+# The maximum consecutive newlines
1670+nl_max = 4 # number
1671+
1672+# The number of newlines after a function prototype, if followed by another function prototype
1673+nl_after_func_proto = 0 # number
1674+
1675+# The number of newlines after a function prototype, if not followed by another function prototype
1676+nl_after_func_proto_group = 3 # number
1677+
1678+# The number of newlines after '}' of a multi-line function body
1679+nl_after_func_body = 3 # number
1680+
1681+# The number of newlines after '}' of a single line function body
1682+nl_after_func_body_one_liner = 1 # number
1683+
1684+# The minimum number of newlines before a multi-line comment.
1685+# Doesn't apply if after a brace open or another multi-line comment.
1686+nl_before_block_comment = 2 # number
1687+
1688+# The minimum number of newlines before a single-line C comment.
1689+# Doesn't apply if after a brace open or other single-line C comments.
1690+nl_before_c_comment = 1 # number
1691+
1692+# The minimum number of newlines before a CPP comment.
1693+# Doesn't apply if after a brace open or other CPP comments.
1694+nl_before_cpp_comment = 0 # number
1695+
1696+# Whether to force a newline after a mulit-line comment.
1697+nl_after_multiline_comment = false # false/true
1698+
1699+# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
1700+# Will not change the newline count if after a brace open.
1701+# 0 = No change.
1702+nl_before_access_spec = 1 # number
1703+
1704+# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
1705+# 0 = No change.
1706+nl_after_access_spec = 1 # number
1707+
1708+# The number of newlines between a function def and the function comment.
1709+# 0 = No change.
1710+nl_comment_func_def = 0 # number
1711+
1712+# Whether to remove blank lines after '{'
1713+eat_blanks_after_open_brace = true # false/true
1714+
1715+# Whether to remove blank lines before '}'
1716+eat_blanks_before_close_brace = true # false/true
1717+
1718+#
1719+# Code modifying options (non-whitespace)
1720+#
1721+
1722+# Add or remove braces on single-line 'do' statement
1723+mod_full_brace_do = add # ignore/add/remove/force
1724+
1725+# Add or remove braces on single-line 'for' statement
1726+mod_full_brace_for = add # ignore/add/remove/force
1727+
1728+# Add or remove braces on single-line function defintions. (Pawn)
1729+mod_full_brace_function = ignore # ignore/add/remove/force
1730+
1731+# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
1732+mod_full_brace_if = ignore # ignore/add/remove/force
1733+
1734+# Don't remove braces around statements that span N newlines
1735+mod_full_brace_nl = 0 # number
1736+
1737+# Add or remove braces on single-line 'while' statement
1738+mod_full_brace_while = add # ignore/add/remove/force
1739+
1740+# Add or remove unnecessary paren on 'return' statement
1741+mod_paren_on_return = remove # ignore/add/remove/force
1742+
1743+# Whether to change optional semicolons to real semicolons
1744+mod_pawn_semicolon = false # false/true
1745+
1746+# Add parens on 'while' and 'if' statement around bools
1747+mod_full_paren_if_bool = true # false/true
1748+
1749+# Whether to remove superfluous semicolons
1750+mod_remove_extra_semicolon = true # false/true
1751+
1752+# If a function body exceeds the specified number of newlines and doesn't have a comment after
1753+# the close brace, a comment will be added.
1754+mod_add_long_function_closebrace_comment = 5 # number
1755+
1756+# If a switch body exceeds the specified number of newlines and doesn't have a comment after
1757+# the close brace, a comment will be added.
1758+mod_add_long_switch_closebrace_comment = 5 # number
1759+
1760+# If TRUE, will sort consecutive single-line 'import' statements [Java, D]
1761+mod_sort_import = false # false/true
1762+
1763+# If TRUE, will sort consecutive single-line 'using' statements [C#]
1764+mod_sort_using = false # false/true
1765+
1766+# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
1767+# This is generally a bad idea, as it may break your code.
1768+mod_sort_include = false # false/true
1769+
1770+# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
1771+mod_move_case_break = false # false/true
1772+
1773+# If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
1774+mod_remove_empty_return = true # false/true
1775+
1776+#
1777+# Comment modifications
1778+#
1779+
1780+# Try to wrap comments at cmt_width columns
1781+cmt_width = 0 # number
1782+
1783+# If false, disable all multi-line comment changes, including cmt_width and leading chars.
1784+# Default is true.
1785+cmt_indent_multi = true # false/true
1786+
1787+# Whether to group c-comments that look like they are in a block
1788+cmt_c_group = false # false/true
1789+
1790+# Whether to put an empty '/*' on the first line of the combined c-comment
1791+cmt_c_nl_start = false # false/true
1792+
1793+# Whether to put a newline before the closing '*/' of the combined c-comment
1794+cmt_c_nl_end = false # false/true
1795+
1796+# Whether to group cpp-comments that look like they are in a block
1797+cmt_cpp_group = false # false/true
1798+
1799+# Whether to put an empty '/*' on the first line of the combined cpp-comment
1800+cmt_cpp_nl_start = false # false/true
1801+
1802+# Whether to put a newline before the closing '*/' of the combined cpp-comment
1803+cmt_cpp_nl_end = false # false/true
1804+
1805+# Whether to change cpp-comments into c-comments
1806+cmt_cpp_to_c = false # false/true
1807+
1808+# Whether to put a star on subsequent comment lines
1809+cmt_star_cont = true # false/true
1810+
1811+# The number of spaces to insert at the start of subsequent comment lines
1812+cmt_sp_before_star_cont = 0 # number
1813+
1814+# The number of spaces to insert after the star on subsequent comment lines
1815+cmt_sp_after_star_cont = 1 # number
1816+
1817+# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
1818+# the comment are the same length. Default=True
1819+cmt_multi_check_last = true # false/true
1820+
1821+# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
1822+# Will substitue $(filename) with the current file's name.
1823+cmt_insert_file_header = "" # string
1824+
1825+# The filename that contains text to insert before a function implementation if the function isn't preceeded with a C/C++ comment.
1826+# Will substitue $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
1827+# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
1828+cmt_insert_func_header = "" # string
1829+
1830+# The filename that contains text to insert before a class if the class isn't preceeded with a C/C++ comment.
1831+# Will substitue $(class) with the class name.
1832+cmt_insert_class_header = "" # string
1833+
1834+# If a preprocessor is encountered when stepping backwards from a function name, then
1835+# this option decides whether the comment should be inserted.
1836+# Affects cmt_insert_func_header and cmt_insert_class_header.
1837+cmt_insert_before_preproc = false # false/true
1838+
1839+#
1840+# Preprocessor options
1841+#
1842+
1843+# Control indent of preprocessors inside #if blocks at brace level 0
1844+pp_indent = remove # ignore/add/remove/force
1845+
1846+# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
1847+pp_indent_at_level = false # false/true
1848+
1849+# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
1850+pp_indent_count = 1 # number
1851+
1852+# Add or remove space after # based on pp_level of #if blocks
1853+pp_space = add # ignore/add/remove/force
1854+
1855+# Sets the number of spaces added with pp_space
1856+pp_space_count = 1 # number
1857+
1858+# The indent for #region and #endregion in C# and '#pragma region' in C/C++
1859+pp_indent_region = 0 # number
1860+
1861+# Whether to indent the code between #region and #endregion
1862+pp_region_indent_code = false # false/true
1863+
1864+# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
1865+pp_indent_if = 0 # number
1866+
1867+# Control whether to indent the code between #if, #else and #endif when not at file-level
1868+pp_if_indent_code = false # false/true
1869+
1870+# Whether to indent '#define' at the brace level (true) or from column 1 (false)
1871+pp_define_at_level = false # false/true
1872+
1873+# You can force a token to be a type with the 'type' option.
1874+# Example:
1875+# type myfoo1 myfoo2
1876+#
1877+# You can create custom macro-based indentation using macro-open,
1878+# macro-else and macro-close.
1879+# Example:
1880+# macro-open BEGIN_TEMPLATE_MESSAGE_MAP
1881+# macro-open BEGIN_MESSAGE_MAP
1882+# macro-close END_MESSAGE_MAP
1883+#
1884+# You can assign any keyword to any type with the set option.
1885+# set func_call_user _ N_
1886
1887=== modified file 'configure.ac'
1888--- configure.ac 2010-06-13 08:54:40 +0000
1889+++ configure.ac 2010-06-13 16:37:23 +0000
1890@@ -10,8 +10,6 @@
1891 AC_INIT([libmemcached],[0.41],[http://libmemcached.org/])
1892 AC_CONFIG_SRCDIR([libmemcached/memcached.c])
1893 AC_CONFIG_AUX_DIR(config)
1894-AM_CONFIG_HEADER([config.h])
1895-AC_CONFIG_MACRO_DIR([m4])
1896
1897 PANDORA_CANONICAL_TARGET
1898
1899@@ -94,3 +92,15 @@
1900 echo ""
1901 echo "---"
1902
1903+case "$host_os" in
1904+ *freebsd*)
1905+ echo "*****"
1906+ echo "*"
1907+ echo "* NOTE: You are on FreeBSD. BSD make will not work."
1908+ echo "*"
1909+ echo "* use 'gmake' To build libmemcached"
1910+ echo "*"
1911+ echo "*****"
1912+ ;;
1913+esac
1914+
1915
1916=== modified file 'docs/Makefile.am'
1917--- docs/Makefile.am 2010-03-03 10:50:13 +0000
1918+++ docs/Makefile.am 2010-06-13 16:37:23 +0000
1919@@ -308,8 +308,10 @@
1920 memcached_get.pod \
1921 memcached_memory_allocators.pod \
1922 memcached_pool.pod \
1923- memcached_quit.pod \
1924- memcached_server_st.pod \
1925+ memcached_quit.pod \
1926+ memcached_result_st.pod \
1927+ memcached_sasl.pod \
1928+ memcached_server_st.pod \
1929 memcached_servers.pod \
1930 memcached_set.pod \
1931 memcached_stats.pod \
1932
1933=== modified file 'docs/memcat.pod'
1934--- docs/memcat.pod 2010-01-14 21:37:53 +0000
1935+++ docs/memcat.pod 2010-06-13 16:37:23 +0000
1936@@ -8,7 +8,7 @@
1937
1938 =head1 DESCRIPTION
1939
1940-B<memcat> outputs to stdout the value a single or mutiple set of keys
1941+B<memcat> outputs to stdout the value a single or multiple set of keys
1942 stored in a memcached(1) server. If any key is not found an error is returned.
1943
1944 It is similar to the standard UNIX cat(1) utility.
1945
1946=== removed directory 'lib'
1947=== modified file 'm4/ac_cxx_header_stdcxx_98.m4'
1948--- m4/ac_cxx_header_stdcxx_98.m4 2009-07-08 07:37:38 +0000
1949+++ m4/ac_cxx_header_stdcxx_98.m4 2010-06-13 16:37:23 +0000
1950@@ -1,12 +1,28 @@
1951-dnl Copyright © 2008 Benjamin Kosnik <bkoz@redhat.com>
1952-
1953-dnl Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
1954-
1955+# ===========================================================================
1956+# http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html
1957+# ===========================================================================
1958+#
1959+# SYNOPSIS
1960+#
1961+# AC_CXX_HEADER_STDCXX_98
1962+#
1963+# DESCRIPTION
1964+#
1965+# Check for complete library coverage of the C++1998/2003 standard.
1966+#
1967+# LICENSE
1968+#
1969+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
1970+#
1971+# Copying and distribution of this file, with or without modification, are
1972+# permitted in any medium without royalty provided the copyright notice
1973+# and this notice are preserved.
1974
1975 AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [
1976 AC_CACHE_CHECK(for ISO C++ 98 include files,
1977 ac_cv_cxx_stdcxx_98,
1978- [AC_LANG_PUSH(C++)
1979+ [AC_LANG_SAVE
1980+ AC_LANG_CPLUSPLUS
1981 AC_TRY_COMPILE([
1982 #include <cassert>
1983 #include <cctype>
1984@@ -59,7 +75,7 @@
1985 #include <vector>
1986 ],,
1987 ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
1988- AC_LANG_POP()
1989+ AC_LANG_RESTORE
1990 ])
1991 if test "$ac_cv_cxx_stdcxx_98" = yes; then
1992 AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
1993
1994=== modified file 'm4/acx_pthread.m4'
1995--- m4/acx_pthread.m4 2009-06-14 21:24:48 +0000
1996+++ m4/acx_pthread.m4 2010-06-13 16:37:23 +0000
1997@@ -1,4 +1,6 @@
1998-##### http://autoconf-archive.cryp.to/acx_pthread.html
1999+# ===========================================================================
2000+# http://autoconf-archive.cryp.to/acx_pthread.html
2001+# ===========================================================================
2002 #
2003 # SYNOPSIS
2004 #
2005@@ -6,87 +8,77 @@
2006 #
2007 # DESCRIPTION
2008 #
2009-# This macro figures out how to build C programs using POSIX threads.
2010-# It sets the PTHREAD_LIBS output variable to the threads library and
2011-# linker flags, and the PTHREAD_CFLAGS output variable to any special
2012-# C compiler flags that are needed. (The user can also force certain
2013-# compiler flags/libs to be tested by setting these environment
2014-# variables.)
2015+# This macro figures out how to build C programs using POSIX threads. It
2016+# sets the PTHREAD_LIBS output variable to the threads library and linker
2017+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
2018+# flags that are needed. (The user can also force certain compiler
2019+# flags/libs to be tested by setting these environment variables.)
2020 #
2021 # Also sets PTHREAD_CC to any special C compiler that is needed for
2022-# multi-threaded programs (defaults to the value of CC otherwise).
2023-# (This is necessary on AIX to use the special cc_r compiler alias.)
2024-#
2025-# NOTE: You are assumed to not only compile your program with these
2026-# flags, but also link it with them as well. e.g. you should link
2027-# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
2028-# $LIBS
2029-#
2030-# If you are only building threads programs, you may wish to use
2031-# these variables in your default LIBS, CFLAGS, and CC:
2032+# multi-threaded programs (defaults to the value of CC otherwise). (This
2033+# is necessary on AIX to use the special cc_r compiler alias.)
2034+#
2035+# NOTE: You are assumed to not only compile your program with these flags,
2036+# but also link it with them as well. e.g. you should link with
2037+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
2038+#
2039+# If you are only building threads programs, you may wish to use these
2040+# variables in your default LIBS, CFLAGS, and CC:
2041 #
2042 # LIBS="$PTHREAD_LIBS $LIBS"
2043 # CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2044 # CC="$PTHREAD_CC"
2045 #
2046-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
2047-# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
2048-# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
2049-#
2050-# ACTION-IF-FOUND is a list of shell commands to run if a threads
2051-# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
2052-# run it if it is not found. If ACTION-IF-FOUND is not specified, the
2053-# default action will define HAVE_PTHREAD.
2054-#
2055-# Please let the authors know if this macro fails on any platform, or
2056-# if you have any other suggestions or comments. This macro was based
2057-# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
2058-# (with help from M. Frigo), as well as ac_pthread and hb_pthread
2059-# macros posted by Alejandro Forero Cuervo to the autoconf macro
2060-# repository. We are also grateful for the helpful feedback of
2061-# numerous users.
2062-#
2063-# LAST MODIFICATION
2064-#
2065-# 2006-05-29
2066-#
2067-# COPYLEFT
2068-#
2069-# Copyright (c) 2006 Steven G. Johnson <stevenj@alum.mit.edu>
2070-#
2071-# This program is free software; you can redistribute it and/or
2072-# modify it under the terms of the GNU General Public License as
2073-# published by the Free Software Foundation; either version 2 of the
2074-# License, or (at your option) any later version.
2075+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
2076+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
2077+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
2078+#
2079+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
2080+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
2081+# is not found. If ACTION-IF-FOUND is not specified, the default action
2082+# will define HAVE_PTHREAD.
2083+#
2084+# Please let the authors know if this macro fails on any platform, or if
2085+# you have any other suggestions or comments. This macro was based on work
2086+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
2087+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
2088+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
2089+# grateful for the helpful feedback of numerous users.
2090+#
2091+# LICENSE
2092+#
2093+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
2094+#
2095+# This program is free software: you can redistribute it and/or modify it
2096+# under the terms of the GNU General Public License as published by the
2097+# Free Software Foundation, either version 3 of the License, or (at your
2098+# option) any later version.
2099 #
2100 # This program is distributed in the hope that it will be useful, but
2101 # WITHOUT ANY WARRANTY; without even the implied warranty of
2102-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2103-# General Public License for more details.
2104-#
2105-# You should have received a copy of the GNU General Public License
2106-# along with this program; if not, write to the Free Software
2107-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2108-# 02111-1307, USA.
2109-#
2110-# As a special exception, the respective Autoconf Macro's copyright
2111-# owner gives unlimited permission to copy, distribute and modify the
2112-# configure scripts that are the output of Autoconf when processing
2113-# the Macro. You need not follow the terms of the GNU General Public
2114-# License when using or distributing such scripts, even though
2115-# portions of the text of the Macro appear in them. The GNU General
2116-# Public License (GPL) does govern all other use of the material that
2117-# constitutes the Autoconf Macro.
2118-#
2119-# This special exception to the GPL applies to versions of the
2120-# Autoconf Macro released by the Autoconf Macro Archive. When you
2121-# make and distribute a modified version of the Autoconf Macro, you
2122-# may extend this special exception to the GPL to apply to your
2123-# modified version as well.
2124+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
2125+# Public License for more details.
2126+#
2127+# You should have received a copy of the GNU General Public License along
2128+# with this program. If not, see <http://www.gnu.org/licenses/>.
2129+#
2130+# As a special exception, the respective Autoconf Macro's copyright owner
2131+# gives unlimited permission to copy, distribute and modify the configure
2132+# scripts that are the output of Autoconf when processing the Macro. You
2133+# need not follow the terms of the GNU General Public License when using
2134+# or distributing such scripts, even though portions of the text of the
2135+# Macro appear in them. The GNU General Public License (GPL) does govern
2136+# all other use of the material that constitutes the Autoconf Macro.
2137+#
2138+# This special exception to the GPL applies to versions of the Autoconf
2139+# Macro released by the Autoconf Archive. When you make and distribute a
2140+# modified version of the Autoconf Macro, you may extend this special
2141+# exception to the GPL to apply to your modified version as well.
2142
2143 AC_DEFUN([ACX_PTHREAD], [
2144 AC_REQUIRE([AC_CANONICAL_HOST])
2145-AC_LANG_PUSH([C])
2146+AC_LANG_SAVE
2147+AC_LANG_C
2148 acx_pthread_ok=no
2149
2150 # We used to check for pthread.h first, but this fails if pthread.h
2151@@ -199,9 +191,11 @@
2152 # pthread_cleanup_push because it is one of the few pthread
2153 # functions on Solaris that doesn't have a non-functional libc stub.
2154 # We try pthread_create on general principles.
2155- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t th; pthread_join(th, 0);
2156+ AC_TRY_LINK([#include <pthread.h>],
2157+ [pthread_t th; pthread_join(th, 0);
2158 pthread_attr_init(0); pthread_cleanup_push(0, 0);
2159- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[])
2160+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
2161+ [acx_pthread_ok=yes])
2162
2163 LIBS="$save_LIBS"
2164 CFLAGS="$save_CFLAGS"
2165@@ -227,7 +221,8 @@
2166 AC_MSG_CHECKING([for joinable pthread attribute])
2167 attr_name=unknown
2168 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
2169- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[int attr=$attr; return attr;]])],[attr_name=$attr; break],[])
2170+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
2171+ [attr_name=$attr; break])
2172 done
2173 AC_MSG_RESULT($attr_name)
2174 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
2175@@ -272,5 +267,5 @@
2176 acx_pthread_ok=no
2177 $2
2178 fi
2179-AC_LANG_POP([])
2180+AC_LANG_RESTORE
2181 ])dnl ACX_PTHREAD
2182
2183=== added file 'm4/gettext.m4'
2184--- m4/gettext.m4 1970-01-01 00:00:00 +0000
2185+++ m4/gettext.m4 2010-06-13 16:37:23 +0000
2186@@ -0,0 +1,379 @@
2187+# gettext.m4 serial 60 (gettext-0.17)
2188+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
2189+dnl This file is free software; the Free Software Foundation
2190+dnl gives unlimited permission to copy and/or distribute it,
2191+dnl with or without modifications, as long as this notice is preserved.
2192+dnl
2193+dnl This file can can be used in projects which are not available under
2194+dnl the GNU General Public License or the GNU Library General Public
2195+dnl License but which still want to provide support for the GNU gettext
2196+dnl functionality.
2197+dnl Please note that the actual code of the GNU gettext library is covered
2198+dnl by the GNU Library General Public License, and the rest of the GNU
2199+dnl gettext package package is covered by the GNU General Public License.
2200+dnl They are *not* in the public domain.
2201+
2202+dnl Authors:
2203+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2204+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
2205+
2206+dnl Macro to add for using GNU gettext.
2207+
2208+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
2209+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
2210+dnl default (if it is not specified or empty) is 'no-libtool'.
2211+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
2212+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
2213+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
2214+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
2215+dnl depending on --{enable,disable}-{shared,static} and on the presence of
2216+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
2217+dnl $(top_builddir)/intl/libintl.a will be created.
2218+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
2219+dnl implementations (in libc or libintl) without the ngettext() function
2220+dnl will be ignored. If NEEDSYMBOL is specified and is
2221+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
2222+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
2223+dnl INTLDIR is used to find the intl libraries. If empty,
2224+dnl the value `$(top_builddir)/intl/' is used.
2225+dnl
2226+dnl The result of the configuration is one of three cases:
2227+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
2228+dnl and used.
2229+dnl Catalog format: GNU --> install in $(datadir)
2230+dnl Catalog extension: .mo after installation, .gmo in source tree
2231+dnl 2) GNU gettext has been found in the system's C library.
2232+dnl Catalog format: GNU --> install in $(datadir)
2233+dnl Catalog extension: .mo after installation, .gmo in source tree
2234+dnl 3) No internationalization, always use English msgid.
2235+dnl Catalog format: none
2236+dnl Catalog extension: none
2237+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
2238+dnl The use of .gmo is historical (it was needed to avoid overwriting the
2239+dnl GNU format catalogs when building on a platform with an X/Open gettext),
2240+dnl but we keep it in order not to force irrelevant filename changes on the
2241+dnl maintainers.
2242+dnl
2243+AC_DEFUN([AM_GNU_GETTEXT],
2244+[
2245+ dnl Argument checking.
2246+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
2247+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
2248+])])])])])
2249+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
2250+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
2251+])])])])
2252+ dnl Hardcode this, because the previous ifdef just wasn't working
2253+ define([gt_included_intl],[no])
2254+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
2255+ gt_NEEDS_INIT
2256+ AM_GNU_GETTEXT_NEED([$2])
2257+
2258+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
2259+ dnl ifelse(gt_included_intl, yes, [
2260+ dnl AC_REQUIRE([AM_INTL_SUBDIR])dnl
2261+ dnl ])
2262+
2263+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2264+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2265+ AC_REQUIRE([AC_LIB_RPATH])
2266+
2267+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
2268+ dnl Ideally we would do this search only after the
2269+ dnl if test "$USE_NLS" = "yes"; then
2270+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
2271+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
2272+ dnl the configure script would need to contain the same shell code
2273+ dnl again, outside any 'if'. There are two solutions:
2274+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
2275+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
2276+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
2277+ dnl documented, we avoid it.
2278+ ifelse(gt_included_intl, yes, , [
2279+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2280+ ])
2281+
2282+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
2283+ gt_INTL_MACOSX
2284+
2285+ dnl Set USE_NLS.
2286+ AC_REQUIRE([AM_NLS])
2287+
2288+ ifelse(gt_included_intl, yes, [
2289+ BUILD_INCLUDED_LIBINTL=no
2290+ USE_INCLUDED_LIBINTL=no
2291+ ])
2292+ LIBINTL=
2293+ LTLIBINTL=
2294+ POSUB=
2295+
2296+ dnl Add a version number to the cache macros.
2297+ case " $gt_needs " in
2298+ *" need-formatstring-macros "*) gt_api_version=3 ;;
2299+ *" need-ngettext "*) gt_api_version=2 ;;
2300+ *) gt_api_version=1 ;;
2301+ esac
2302+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
2303+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
2304+
2305+ dnl If we use NLS figure out what method
2306+ if test "$USE_NLS" = "yes"; then
2307+ gt_use_preinstalled_gnugettext=no
2308+ ifelse(gt_included_intl, yes, [
2309+ AC_MSG_CHECKING([whether included gettext is requested])
2310+ AC_ARG_WITH(included-gettext,
2311+ [ --with-included-gettext use the GNU gettext library included here],
2312+ nls_cv_force_use_gnu_gettext=$withval,
2313+ nls_cv_force_use_gnu_gettext=no)
2314+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
2315+
2316+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2317+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2318+ ])
2319+ dnl User does not insist on using GNU NLS library. Figure out what
2320+ dnl to use. If GNU gettext is available we use this. Else we have
2321+ dnl to fall back to GNU NLS library.
2322+
2323+ if test $gt_api_version -ge 3; then
2324+ gt_revision_test_code='
2325+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
2326+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
2327+#endif
2328+changequote(,)dnl
2329+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
2330+changequote([,])dnl
2331+'
2332+ else
2333+ gt_revision_test_code=
2334+ fi
2335+ if test $gt_api_version -ge 2; then
2336+ gt_expression_test_code=' + * ngettext ("", "", 0)'
2337+ else
2338+ gt_expression_test_code=
2339+ fi
2340+
2341+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
2342+ [AC_TRY_LINK([#include <libintl.h>
2343+$gt_revision_test_code
2344+extern int _nl_msg_cat_cntr;
2345+extern int *_nl_domain_bindings;],
2346+ [bindtextdomain ("", "");
2347+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
2348+ [eval "$gt_func_gnugettext_libc=yes"],
2349+ [eval "$gt_func_gnugettext_libc=no"])])
2350+
2351+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
2352+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
2353+ ifelse(gt_included_intl, yes, , [
2354+ AM_ICONV_LINK
2355+ ])
2356+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
2357+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
2358+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
2359+ dnl even if libiconv doesn't exist.
2360+ AC_LIB_LINKFLAGS_BODY([intl])
2361+ AC_CACHE_CHECK([for GNU gettext in libintl],
2362+ [$gt_func_gnugettext_libintl],
2363+ [gt_save_CPPFLAGS="$CPPFLAGS"
2364+ CPPFLAGS="$CPPFLAGS $INCINTL"
2365+ gt_save_LIBS="$LIBS"
2366+ LIBS="$LIBS $LIBINTL"
2367+ dnl Now see whether libintl exists and does not depend on libiconv.
2368+ AC_TRY_LINK([#include <libintl.h>
2369+$gt_revision_test_code
2370+extern int _nl_msg_cat_cntr;
2371+extern
2372+#ifdef __cplusplus
2373+"C"
2374+#endif
2375+const char *_nl_expand_alias (const char *);],
2376+ [bindtextdomain ("", "");
2377+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
2378+ [eval "$gt_func_gnugettext_libintl=yes"],
2379+ [eval "$gt_func_gnugettext_libintl=no"])
2380+ dnl Now see whether libintl exists and depends on libiconv.
2381+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
2382+ LIBS="$LIBS $LIBICONV"
2383+ AC_TRY_LINK([#include <libintl.h>
2384+$gt_revision_test_code
2385+extern int _nl_msg_cat_cntr;
2386+extern
2387+#ifdef __cplusplus
2388+"C"
2389+#endif
2390+const char *_nl_expand_alias (const char *);],
2391+ [bindtextdomain ("", "");
2392+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
2393+ [LIBINTL="$LIBINTL $LIBICONV"
2394+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
2395+ eval "$gt_func_gnugettext_libintl=yes"
2396+ ])
2397+ fi
2398+ CPPFLAGS="$gt_save_CPPFLAGS"
2399+ LIBS="$gt_save_LIBS"])
2400+ fi
2401+
2402+ dnl If an already present or preinstalled GNU gettext() is found,
2403+ dnl use it. But if this macro is used in GNU gettext, and GNU
2404+ dnl gettext is already preinstalled in libintl, we update this
2405+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
2406+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
2407+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
2408+ && test "$PACKAGE" != gettext-runtime \
2409+ && test "$PACKAGE" != gettext-tools; }; then
2410+ gt_use_preinstalled_gnugettext=yes
2411+ else
2412+ dnl Reset the values set by searching for libintl.
2413+ LIBINTL=
2414+ LTLIBINTL=
2415+ INCINTL=
2416+ fi
2417+
2418+ ifelse(gt_included_intl, yes, [
2419+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
2420+ dnl GNU gettext is not found in the C library.
2421+ dnl Fall back on included GNU gettext library.
2422+ nls_cv_use_gnu_gettext=yes
2423+ fi
2424+ fi
2425+
2426+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
2427+ dnl Mark actions used to generate GNU NLS library.
2428+ BUILD_INCLUDED_LIBINTL=yes
2429+ USE_INCLUDED_LIBINTL=yes
2430+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
2431+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
2432+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
2433+ fi
2434+
2435+ CATOBJEXT=
2436+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
2437+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
2438+ dnl Mark actions to use GNU gettext tools.
2439+ CATOBJEXT=.gmo
2440+ fi
2441+ ])
2442+
2443+ if test -n "$INTL_MACOSX_LIBS"; then
2444+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
2445+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
2446+ dnl Some extra flags are needed during linking.
2447+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
2448+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
2449+ fi
2450+ fi
2451+
2452+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
2453+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
2454+ AC_DEFINE(ENABLE_NLS, 1,
2455+ [Define to 1 if translation of program messages to the user's native language
2456+ is requested.])
2457+ else
2458+ USE_NLS=no
2459+ fi
2460+ fi
2461+
2462+ AC_MSG_CHECKING([whether to use NLS])
2463+ AC_MSG_RESULT([$USE_NLS])
2464+ if test "$USE_NLS" = "yes"; then
2465+ AC_MSG_CHECKING([where the gettext function comes from])
2466+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
2467+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
2468+ gt_source="external libintl"
2469+ else
2470+ gt_source="libc"
2471+ fi
2472+ else
2473+ gt_source="included intl directory"
2474+ fi
2475+ AC_MSG_RESULT([$gt_source])
2476+ fi
2477+
2478+ if test "$USE_NLS" = "yes"; then
2479+
2480+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
2481+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
2482+ AC_MSG_CHECKING([how to link with libintl])
2483+ AC_MSG_RESULT([$LIBINTL])
2484+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
2485+ fi
2486+
2487+ dnl For backward compatibility. Some packages may be using this.
2488+ AC_DEFINE(HAVE_GETTEXT, 1,
2489+ [Define if the GNU gettext() function is already present or preinstalled.])
2490+ AC_DEFINE(HAVE_DCGETTEXT, 1,
2491+ [Define if the GNU dcgettext() function is already present or preinstalled.])
2492+ fi
2493+
2494+ dnl We need to process the po/ directory.
2495+ POSUB=po
2496+ fi
2497+
2498+ ifelse(gt_included_intl, yes, [
2499+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
2500+ dnl to 'yes' because some of the testsuite requires it.
2501+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
2502+ BUILD_INCLUDED_LIBINTL=yes
2503+ fi
2504+
2505+ dnl Make all variables we use known to autoconf.
2506+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
2507+ AC_SUBST(USE_INCLUDED_LIBINTL)
2508+ AC_SUBST(CATOBJEXT)
2509+
2510+ dnl For backward compatibility. Some configure.ins may be using this.
2511+ nls_cv_header_intl=
2512+ nls_cv_header_libgt=
2513+
2514+ dnl For backward compatibility. Some Makefiles may be using this.
2515+ DATADIRNAME=share
2516+ AC_SUBST(DATADIRNAME)
2517+
2518+ dnl For backward compatibility. Some Makefiles may be using this.
2519+ INSTOBJEXT=.mo
2520+ AC_SUBST(INSTOBJEXT)
2521+
2522+ dnl For backward compatibility. Some Makefiles may be using this.
2523+ GENCAT=gencat
2524+ AC_SUBST(GENCAT)
2525+
2526+ dnl For backward compatibility. Some Makefiles may be using this.
2527+ INTLOBJS=
2528+ if test "$USE_INCLUDED_LIBINTL" = yes; then
2529+ INTLOBJS="\$(GETTOBJS)"
2530+ fi
2531+ AC_SUBST(INTLOBJS)
2532+
2533+ dnl Enable libtool support if the surrounding package wishes it.
2534+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
2535+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
2536+ ])
2537+
2538+ dnl For backward compatibility. Some Makefiles may be using this.
2539+ INTLLIBS="$LIBINTL"
2540+ AC_SUBST(INTLLIBS)
2541+
2542+ dnl Make all documented variables known to autoconf.
2543+ AC_SUBST(LIBINTL)
2544+ AC_SUBST(LTLIBINTL)
2545+ AC_SUBST(POSUB)
2546+])
2547+
2548+
2549+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
2550+m4_define([gt_NEEDS_INIT],
2551+[
2552+ m4_divert_text([DEFAULTS], [gt_needs=])
2553+ m4_define([gt_NEEDS_INIT], [])
2554+])
2555+
2556+
2557+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
2558+AC_DEFUN([AM_GNU_GETTEXT_NEED],
2559+[
2560+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
2561+])
2562+
2563+
2564+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
2565+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
2566
2567=== added file 'm4/iconv.m4'
2568--- m4/iconv.m4 1970-01-01 00:00:00 +0000
2569+++ m4/iconv.m4 2010-06-13 16:37:23 +0000
2570@@ -0,0 +1,180 @@
2571+# iconv.m4 serial AM6 (gettext-0.17)
2572+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
2573+dnl This file is free software; the Free Software Foundation
2574+dnl gives unlimited permission to copy and/or distribute it,
2575+dnl with or without modifications, as long as this notice is preserved.
2576+
2577+dnl From Bruno Haible.
2578+
2579+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2580+[
2581+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2582+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2583+ AC_REQUIRE([AC_LIB_RPATH])
2584+
2585+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2586+ dnl accordingly.
2587+ AC_LIB_LINKFLAGS_BODY([iconv])
2588+])
2589+
2590+AC_DEFUN([AM_ICONV_LINK],
2591+[
2592+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2593+ dnl those with the standalone portable GNU libiconv installed).
2594+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2595+
2596+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2597+ dnl accordingly.
2598+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2599+
2600+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2601+ dnl because if the user has installed libiconv and not disabled its use
2602+ dnl via --without-libiconv-prefix, he wants to use it. The first
2603+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2604+ am_save_CPPFLAGS="$CPPFLAGS"
2605+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2606+
2607+ AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
2608+ am_cv_func_iconv="no, consider installing GNU libiconv"
2609+ am_cv_lib_iconv=no
2610+ AC_TRY_LINK([#include <stdlib.h>
2611+#include <iconv.h>],
2612+ [iconv_t cd = iconv_open("","");
2613+ iconv(cd,NULL,NULL,NULL,NULL);
2614+ iconv_close(cd);],
2615+ am_cv_func_iconv=yes)
2616+ if test "$am_cv_func_iconv" != yes; then
2617+ am_save_LIBS="$LIBS"
2618+ LIBS="$LIBS $LIBICONV"
2619+ AC_TRY_LINK([#include <stdlib.h>
2620+#include <iconv.h>],
2621+ [iconv_t cd = iconv_open("","");
2622+ iconv(cd,NULL,NULL,NULL,NULL);
2623+ iconv_close(cd);],
2624+ am_cv_lib_iconv=yes
2625+ am_cv_func_iconv=yes)
2626+ LIBS="$am_save_LIBS"
2627+ fi
2628+ ])
2629+ if test "$am_cv_func_iconv" = yes; then
2630+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
2631+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
2632+ am_save_LIBS="$LIBS"
2633+ if test $am_cv_lib_iconv = yes; then
2634+ LIBS="$LIBS $LIBICONV"
2635+ fi
2636+ AC_TRY_RUN([
2637+#include <iconv.h>
2638+#include <string.h>
2639+int main ()
2640+{
2641+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
2642+ returns. */
2643+ {
2644+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
2645+ if (cd_utf8_to_88591 != (iconv_t)(-1))
2646+ {
2647+ static const char input[] = "\342\202\254"; /* EURO SIGN */
2648+ char buf[10];
2649+ const char *inptr = input;
2650+ size_t inbytesleft = strlen (input);
2651+ char *outptr = buf;
2652+ size_t outbytesleft = sizeof (buf);
2653+ size_t res = iconv (cd_utf8_to_88591,
2654+ (char **) &inptr, &inbytesleft,
2655+ &outptr, &outbytesleft);
2656+ if (res == 0)
2657+ return 1;
2658+ }
2659+ }
2660+#if 0 /* This bug could be worked around by the caller. */
2661+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
2662+ {
2663+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
2664+ if (cd_88591_to_utf8 != (iconv_t)(-1))
2665+ {
2666+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
2667+ char buf[50];
2668+ const char *inptr = input;
2669+ size_t inbytesleft = strlen (input);
2670+ char *outptr = buf;
2671+ size_t outbytesleft = sizeof (buf);
2672+ size_t res = iconv (cd_88591_to_utf8,
2673+ (char **) &inptr, &inbytesleft,
2674+ &outptr, &outbytesleft);
2675+ if ((int)res > 0)
2676+ return 1;
2677+ }
2678+ }
2679+#endif
2680+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
2681+ provided. */
2682+ if (/* Try standardized names. */
2683+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
2684+ /* Try IRIX, OSF/1 names. */
2685+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
2686+ /* Try AIX names. */
2687+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
2688+ /* Try HP-UX names. */
2689+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
2690+ return 1;
2691+ return 0;
2692+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
2693+ [case "$host_os" in
2694+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
2695+ *) am_cv_func_iconv_works="guessing yes" ;;
2696+ esac])
2697+ LIBS="$am_save_LIBS"
2698+ ])
2699+ case "$am_cv_func_iconv_works" in
2700+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
2701+ *) am_func_iconv=yes ;;
2702+ esac
2703+ else
2704+ am_func_iconv=no am_cv_lib_iconv=no
2705+ fi
2706+ if test "$am_func_iconv" = yes; then
2707+ AC_DEFINE(HAVE_ICONV, 1,
2708+ [Define if you have the iconv() function and it works.])
2709+ fi
2710+ if test "$am_cv_lib_iconv" = yes; then
2711+ AC_MSG_CHECKING([how to link with libiconv])
2712+ AC_MSG_RESULT([$LIBICONV])
2713+ else
2714+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2715+ dnl either.
2716+ CPPFLAGS="$am_save_CPPFLAGS"
2717+ LIBICONV=
2718+ LTLIBICONV=
2719+ fi
2720+ AC_SUBST(LIBICONV)
2721+ AC_SUBST(LTLIBICONV)
2722+])
2723+
2724+AC_DEFUN([AM_ICONV],
2725+[
2726+ AM_ICONV_LINK
2727+ if test "$am_cv_func_iconv" = yes; then
2728+ AC_MSG_CHECKING([for iconv declaration])
2729+ AC_CACHE_VAL(am_cv_proto_iconv, [
2730+ AC_TRY_COMPILE([
2731+#include <stdlib.h>
2732+#include <iconv.h>
2733+extern
2734+#ifdef __cplusplus
2735+"C"
2736+#endif
2737+#if defined(__STDC__) || defined(__cplusplus)
2738+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2739+#else
2740+size_t iconv();
2741+#endif
2742+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2743+ 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);"])
2744+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2745+ AC_MSG_RESULT([$]{ac_t:-
2746+ }[$]am_cv_proto_iconv)
2747+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2748+ [Define as const if the declaration of iconv() needs const.])
2749+ fi
2750+])
2751
2752=== modified file 'm4/pandora_canonical.m4'
2753--- m4/pandora_canonical.m4 2010-01-13 23:36:10 +0000
2754+++ m4/pandora_canonical.m4 2010-06-13 16:37:23 +0000
2755@@ -4,7 +4,7 @@
2756 dnl with or without modifications, as long as this notice is preserved.
2757
2758 dnl Which version of the canonical setup we're using
2759-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.96])
2760+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.134])
2761
2762 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
2763 AC_ARG_ENABLE([fat-binaries],
2764@@ -29,27 +29,17 @@
2765 ifdef([m4_define],,[define([m4_define], defn([define]))])
2766 ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))])
2767 m4_define([PCT_ALL_ARGS],[$*])
2768- m4_define([PCT_USE_GNULIB],[no])
2769 m4_define([PCT_REQUIRE_CXX],[no])
2770- m4_define([PCT_IGNORE_SHARED_PTR],[no])
2771 m4_define([PCT_FORCE_GCC42],[no])
2772- m4_define([PCT_SRC_IN_SRC],[no])
2773+ m4_define([PCT_DONT_SUPPRESS_INCLUDE],[no])
2774 m4_define([PCT_VERSION_FROM_VC],[no])
2775 m4_define([PCT_USE_VISIBILITY],[yes])
2776 m4_foreach([pct_arg],[$*],[
2777 m4_case(pct_arg,
2778- [use-gnulib], [
2779- m4_undefine([PCT_USE_GNULIB])
2780- m4_define([PCT_USE_GNULIB],[yes])
2781- ],
2782 [require-cxx], [
2783 m4_undefine([PCT_REQUIRE_CXX])
2784 m4_define([PCT_REQUIRE_CXX],[yes])
2785 ],
2786- [ignore-shared-ptr], [
2787- m4_undefine([PCT_IGNORE_SHARED_PTR])
2788- m4_define([PCT_IGNORE_SHARED_PTR],[yes])
2789- ],
2790 [force-gcc42], [
2791 m4_undefine([PCT_FORCE_GCC42])
2792 m4_define([PCT_FORCE_GCC42],[yes])
2793@@ -58,9 +48,9 @@
2794 m4_undefine([PCT_USE_VISIBILITY])
2795 m4_define([PCT_USE_VISIBILITY],[no])
2796 ],
2797- [src-in-src], [
2798- m4_undefine([PCT_SRC_IN_SRC])
2799- m4_define([PCT_SRC_IN_SRC],[yes])
2800+ [dont-suppress-include], [
2801+ m4_undefine([PCT_DONT_SUPPRESS_INCLUDE])
2802+ m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes])
2803 ],
2804 [version-from-vc], [
2805 m4_undefine([PCT_VERSION_FROM_VC])
2806@@ -68,6 +58,14 @@
2807 ])
2808 ])
2809
2810+ AC_CONFIG_MACRO_DIR([m4])
2811+
2812+ m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[
2813+ AC_CONFIG_HEADERS([src/config.h])
2814+ ],[
2815+ AC_CONFIG_HEADERS([config.h])
2816+ ])
2817+
2818 # We need to prevent canonical target
2819 # from injecting -O2 into CFLAGS - but we won't modify anything if we have
2820 # set CFLAGS on the command line, since that should take ultimate precedence
2821@@ -78,17 +76,28 @@
2822
2823 AC_CANONICAL_TARGET
2824
2825- AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects foreign)
2826+ m4_if(PCT_DONT_SUPRESS_INCLUDE,yes,[
2827+ AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability subdir-objects foreign)
2828+ ],[
2829+ AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability nostdinc subdir-objects foreign)
2830+ ])
2831+
2832 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
2833
2834- m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])
2835+ m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
2836+ gl_EARLY
2837+ ])
2838
2839 AC_REQUIRE([AC_PROG_CC])
2840- AC_REQUIRE([PANDORA_MAC_GCC42])
2841+ m4_if(PCT_FORCE_GCC42, [yes], [
2842+ AC_REQUIRE([PANDORA_ENSURE_GCC_VERSION])
2843+ ])
2844 AC_REQUIRE([PANDORA_64BIT])
2845
2846 m4_if(PCT_VERSION_FROM_VC,yes,[
2847 PANDORA_VC_VERSION
2848+ ],[
2849+ PANDORA_TEST_VC_DIR
2850 ])
2851 PANDORA_VERSION
2852
2853@@ -99,9 +108,6 @@
2854 AM_PROG_CC_C_O
2855
2856
2857- m4_if(PCT_FORCE_GCC42, [yes], [
2858- AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION)
2859- ])
2860
2861 PANDORA_PLATFORM
2862
2863@@ -118,14 +124,7 @@
2864
2865 ])
2866
2867- PANDORA_SHARED_PTR
2868- m4_if(PCT_IGNORE_SHARED_PTR, [no], [
2869- AS_IF([test "$ac_cv_shared_ptr_namespace" = "missing"],[
2870- AC_MSG_WARN([a usable shared_ptr implementation was not found. Let someone know what your platform is.])
2871- ])
2872- ])
2873-
2874- m4_if(PCT_USE_GNULIB, [yes], [
2875+ m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
2876 gl_INIT
2877 AC_CONFIG_LIBOBJ_DIR([gnulib])
2878 ])
2879@@ -140,8 +139,10 @@
2880 AC_C_RESTRICT
2881
2882 AC_HEADER_TIME
2883+ AC_STRUCT_TM
2884 AC_TYPE_SIZE_T
2885 AC_SYS_LARGEFILE
2886+ PANDORA_CLOCK_GETTIME
2887
2888 # off_t is not a builtin type
2889 AC_CHECK_SIZEOF(off_t, 4)
2890@@ -175,11 +176,10 @@
2891 AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
2892 ])
2893
2894- dnl AC_FUNC_ALLOCA would test for stack direction if we didn't have a working
2895- dnl alloca - but we need to know it anyway for check_stack_overrun.
2896- PANDORA_STACK_DIRECTION
2897-
2898- AC_CHECK_FUNC(floorf, [], [AC_CHECK_LIB(m, floorf)])
2899+ AC_CHECK_LIBM
2900+ dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
2901+ AC_SUBST([LIBM])
2902+
2903 AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
2904 AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
2905
2906@@ -219,22 +219,28 @@
2907
2908 AC_CHECK_PROGS([DOXYGEN], [doxygen])
2909 AC_CHECK_PROGS([PERL], [perl])
2910+ AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
2911+
2912+ AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
2913+
2914+ PANDORA_WITH_GETTEXT
2915
2916 AS_IF([test "x${gl_LIBOBJS}" != "x"],[
2917 AS_IF([test "$GCC" = "yes"],[
2918- AM_CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${AM_CPPFLAGS}"
2919+ AM_CPPFLAGS="-isystem \${top_srcdir}/gnulib -isystem \${top_builddir}/gnulib ${AM_CPPFLAGS}"
2920 ],[
2921- AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}"
2922+ AM_CPPFLAGS="-I\${top_srcdir}/gnulib -I\${top_builddir}/gnulib ${AM_CPPFLAGS}"
2923 ])
2924 ])
2925- AS_IF([test "PCT_SRC_IN_SRC" = "yes"],[
2926+ m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[
2927 AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}"
2928+ ],[
2929+ AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}"
2930 ])
2931
2932 PANDORA_USE_PIPE
2933
2934
2935- AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}"
2936 AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
2937 AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
2938
2939
2940=== added file 'm4/pandora_clock_gettime.m4'
2941--- m4/pandora_clock_gettime.m4 1970-01-01 00:00:00 +0000
2942+++ m4/pandora_clock_gettime.m4 2010-06-13 16:37:23 +0000
2943@@ -0,0 +1,15 @@
2944+dnl Copyright (C) 2010 Monty Taylor
2945+dnl This file is free software; Monty Taylor
2946+dnl gives unlimited permission to copy and/or distribute it,
2947+dnl with or without modifications, as long as this notice is preserved.
2948+
2949+#--------------------------------------------------------------------
2950+# Check for clock_gettime
2951+#--------------------------------------------------------------------
2952+
2953+AC_DEFUN([PANDORA_CLOCK_GETTIME],[
2954+ AC_SEARCH_LIBS([clock_gettime],[rt])
2955+ AS_IF([test "x${ac_cv_search_clock_gettime}" != "xno"],[
2956+ AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have a working clock_gettime function])
2957+ ])
2958+])
2959
2960=== modified file 'm4/pandora_drizzle_build.m4'
2961--- m4/pandora_drizzle_build.m4 2010-01-02 04:59:12 +0000
2962+++ m4/pandora_drizzle_build.m4 2010-06-13 16:37:23 +0000
2963@@ -9,8 +9,7 @@
2964
2965 AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
2966
2967- dnl We need to turn on our CXXFLAGS to make sure it shows up correctly
2968- PANDORA_CXX_STL_HASH
2969+ PANDORA_HAVE_CXX_UNORDERED
2970
2971 PANDORA_CXX_CSTDINT
2972 PANDORA_CXX_CINTTYPES
2973@@ -70,6 +69,9 @@
2974 AC_CHECK_TYPES([uint, ulong])
2975
2976 PANDORA_CXX_DEMANGLE
2977+ PANDORA_REQUIRE_BOOST([1.38])
2978+ PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
2979+
2980
2981 AH_TOP([
2982 #ifndef __CONFIG_H__
2983
2984=== modified file 'm4/pandora_enable_dtrace.m4'
2985--- m4/pandora_enable_dtrace.m4 2009-09-16 18:36:35 +0000
2986+++ m4/pandora_enable_dtrace.m4 2010-06-13 16:37:23 +0000
2987@@ -8,32 +8,47 @@
2988 dnl ---------------------------------------------------------------------------
2989 AC_DEFUN([PANDORA_ENABLE_DTRACE],[
2990 AC_ARG_ENABLE([dtrace],
2991- [AS_HELP_STRING([--enable-dtrace],
2992- [Build with support for the DTRACE. @<:@default=off@:>@])],
2993- [ac_cv_enable_dtrace="yes"],
2994- [ac_cv_enable_dtrace="no"])
2995+ [AS_HELP_STRING([--disable-dtrace],
2996+ [Build with support for the DTRACE. @<:@default=on@:>@])],
2997+ [ac_cv_enable_dtrace="$enableval"],
2998+ [ac_cv_enable_dtrace="yes"])
2999
3000 AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
3001 AC_CHECK_PROGS([DTRACE], [dtrace])
3002 AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
3003- AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
3004- AC_MSG_CHECKING([if dtrace should instrument object files])
3005- dnl DTrace on MacOSX does not use -G option
3006- cat >conftest.d <<_ACEOF
3007-provider Example {
3008- probe increment(int);
3009-};
3010-_ACEOF
3011- $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero
3012- AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
3013+
3014+ AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
3015+ cat >conftest.d <<_ACEOF
3016+provider Example {
3017+ probe increment(int);
3018+};
3019+_ACEOF
3020+ $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero
3021+ AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes],
3022+ [ac_cv_dtrace_works=no])
3023+ rm -f conftest.h conftest.d
3024+ ])
3025+ AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[
3026+ AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
3027+ ])
3028+ AC_CACHE_CHECK([if dtrace should instrument object files],
3029+ [ac_cv_dtrace_needs_objects],[
3030+ dnl DTrace on MacOSX does not use -G option
3031+ cat >conftest.d <<_ACEOF
3032+provider Example {
3033+ probe increment(int);
3034+};
3035+_ACEOF
3036+ $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero
3037+ AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
3038 [ac_cv_dtrace_needs_objects=no])
3039- rm -f conftest.d.o conftest.d
3040- AC_MSG_RESULT($ac_cv_dtrace_needs_objects)
3041+ rm -f conftest.d.o conftest.d
3042+ ])
3043 AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX
3044 ac_cv_have_dtrace=yes
3045 ])])
3046
3047-AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_have_dtrace" = "xyes"])
3048+AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"])
3049 AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],
3050 [test "x$ac_cv_dtrace_needs_objects" = "xyes"])
3051
3052
3053=== modified file 'm4/pandora_ensure_gcc_version.m4'
3054--- m4/pandora_ensure_gcc_version.m4 2009-09-16 09:02:26 +0000
3055+++ m4/pandora_ensure_gcc_version.m4 2010-06-13 16:37:23 +0000
3056@@ -3,6 +3,20 @@
3057 dnl gives unlimited permission to copy and/or distribute it,
3058 dnl with or without modifications, as long as this notice is preserved.
3059
3060+AC_DEFUN([_PANDORA_TRY_GCC],[
3061+ pushdef([Name],[translit([$1],[./-], [___])])
3062+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
3063+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
3064+ AC_CHECK_PROGS([CC]NAME,[gcc$1])
3065+ AC_CHECK_PROGS([CXX]NAME,[g++$1])
3066+ AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CC_set}" = "x"],
3067+ [CC="${CC]NAME[}"])
3068+ AS_IF([test "x${CXX]NAME[}" != "x" -a "x${ac_cv_env_CCX_set}" = "x"],
3069+ [CXX="${CXX]NAME[}"])
3070+ AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CPP_set}" = "x"],
3071+ [CPP="${CC]NAME[} -E"])
3072+])
3073+
3074 dnl If the user is on a Mac and didn't ask for a specific compiler
3075 dnl You're gonna get 4.2.
3076 AC_DEFUN([PANDORA_MAC_GCC42],
3077@@ -10,30 +24,39 @@
3078 AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[
3079 host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'`
3080 AS_IF([test "$host_os_version" -lt 10],[
3081- AS_IF([test -f /usr/bin/gcc-4.2],
3082- [
3083- CPP="/usr/bin/gcc-4.2 -E"
3084- CC=/usr/bin/gcc-4.2
3085- CXX=/usr/bin/g++-4.2
3086- ])
3087+ _PANDORA_TRY_GCC([-4.2])
3088 ])
3089 ])
3090 ])
3091 ])
3092
3093+dnl If the user is on CentOS or RHEL and didn't ask for a specific compiler
3094+dnl You're gonna get 4.4 (forward compatible with 4.5)
3095+AC_DEFUN([PANDORA_RH_GCC44],
3096+ [AS_IF([test "$GCC" = "yes"],[
3097+ AS_IF([test "x${ac_cv_env_CC_set}" = "x"],[
3098+ _PANDORA_TRY_GCC([44])
3099+ _PANDORA_TRY_GCC([45])
3100+ ])
3101+ ])
3102+])
3103+
3104 dnl
3105 AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[
3106 AC_REQUIRE([PANDORA_MAC_GCC42])
3107- AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent],
3108- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3109-#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))
3110+ AC_REQUIRE([PANDORA_RH_GCC44])
3111+ AS_IF([test "$GCC" = "yes"],[
3112+ AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent],
3113+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3114+#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2))
3115 # error GCC is Too Old!
3116 #endif
3117- ]])],
3118- [ac_cv_gcc_recent=yes],
3119- [ac_cv_gcc_recent=no])])
3120- AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"],
3121- 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]))
3122- AS_IF([test "$ac_cv_gcc_recent" = "no"],
3123- AC_MSG_ERROR([Your version of GCC is too old. At least version 4.1 is required]))
3124+ ]])],
3125+ [ac_cv_gcc_recent=yes],
3126+ [ac_cv_gcc_recent=no])])
3127+ AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"],
3128+ 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]))
3129+ AS_IF([test "$ac_cv_gcc_recent" = "no"],
3130+ AC_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.]))
3131+ ])
3132 ])
3133
3134=== modified file 'm4/pandora_fdatasync.m4'
3135--- m4/pandora_fdatasync.m4 2009-12-02 02:57:53 +0000
3136+++ m4/pandora_fdatasync.m4 2010-06-13 16:37:23 +0000
3137@@ -11,7 +11,7 @@
3138 AC_DEFUN([PANDORA_WORKING_FDATASYNC],[
3139 AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[
3140 AC_LANG_PUSH(C++)
3141- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
3142+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3143 #include <unistd.h>
3144 ]],[[
3145 fdatasync(4);
3146@@ -22,4 +22,4 @@
3147 ])
3148 AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
3149 [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])])
3150-])
3151\ No newline at end of file
3152+])
3153
3154=== added file 'm4/pandora_have_boost.m4'
3155--- m4/pandora_have_boost.m4 1970-01-01 00:00:00 +0000
3156+++ m4/pandora_have_boost.m4 2010-06-13 16:37:23 +0000
3157@@ -0,0 +1,73 @@
3158+dnl Copyright (C) 2010 Monty Taylor
3159+dnl This file is free software; Monty Taylor
3160+dnl gives unlimited permission to copy and/or distribute it,
3161+dnl with or without modifications, as long as this notice is preserved.
3162+
3163+AC_DEFUN([_PANDORA_SEARCH_BOOST],[
3164+ AC_REQUIRE([AC_LIB_PREFIX])
3165+
3166+ dnl --------------------------------------------------------------------
3167+ dnl Check for boost
3168+ dnl --------------------------------------------------------------------
3169+
3170+ AC_ARG_ENABLE([boost],
3171+ [AS_HELP_STRING([--disable-boost],
3172+ [Build with boost support @<:@default=on@:>@])],
3173+ [ac_enable_boost="$enableval"],
3174+ [ac_enable_boost="yes"])
3175+
3176+ AS_IF([test "x$ac_enable_boost" = "xyes"],[
3177+ dnl link against libc because we're just looking for headers here
3178+ AC_LANG_PUSH(C++)
3179+ AC_LIB_HAVE_LINKFLAGS(c,,[
3180+ #include <boost/pool/pool.hpp>
3181+ ],[
3182+ boost::pool<> test_pool(1);
3183+ ])
3184+ AC_LANG_POP()
3185+ ],[
3186+ ac_cv_boost="no"
3187+ ])
3188+
3189+
3190+ AS_IF([test "x$1" != "x"],[
3191+ AC_CACHE_CHECK([if boost is recent enough],
3192+ [pandora_cv_recent_boost],[
3193+ pandora_need_boost_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d00", $[]1, $[]2 ;'`
3194+ AS_IF([test "x${pandora_need_boost_version}" = "x000000"],[
3195+ pandora_cv_recent_boost=yes
3196+ ],[
3197+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3198+#include <boost/version.hpp>
3199+
3200+#if BOOST_VERSION < ${pandora_need_boost_version}
3201+# error boost too old!
3202+#endif
3203+ ]],[[]])
3204+ ],[
3205+ pandora_cv_recent_boost=yes
3206+ ],[
3207+ pandora_cv_recent_boost=no
3208+ ])
3209+ ])
3210+ ])
3211+ AS_IF([test "x${pandora_cv_recent_boost}" = "xno"],[
3212+ ac_cv_boost=no
3213+ ])
3214+ ])
3215+
3216+
3217+ AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"])
3218+
3219+])
3220+
3221+AC_DEFUN([PANDORA_HAVE_BOOST],[
3222+ _PANDORA_SEARCH_BOOST($1)
3223+])
3224+
3225+AC_DEFUN([PANDORA_REQUIRE_BOOST],[
3226+ PANDORA_HAVE_BOOST($1)
3227+ AS_IF([test x$ac_cv_boost = xno],
3228+ AC_MSG_ERROR([boost is required for ${PACKAGE}]))
3229+])
3230+
3231
3232=== modified file 'm4/pandora_have_gcc_atomics.m4'
3233--- m4/pandora_have_gcc_atomics.m4 2009-12-02 02:57:53 +0000
3234+++ m4/pandora_have_gcc_atomics.m4 2010-06-13 16:37:23 +0000
3235@@ -13,7 +13,7 @@
3236 AC_CACHE_CHECK(
3237 [whether the compiler provides atomic builtins],
3238 [ac_cv_gcc_atomic_builtins],
3239- [AC_RUN_IFELSE(
3240+ [AC_LINK_IFELSE(
3241 [AC_LANG_PROGRAM([],[[
3242 int foo= -10; int bar= 10;
3243 if (!__sync_fetch_and_add(&foo, bar) || foo)
3244@@ -34,4 +34,4 @@
3245 [Define to 1 if compiler provides atomic builtins.])
3246 ])
3247
3248-])
3249\ No newline at end of file
3250+])
3251
3252=== added file 'm4/pandora_have_libboost_options.m4'
3253--- m4/pandora_have_libboost_options.m4 1970-01-01 00:00:00 +0000
3254+++ m4/pandora_have_libboost_options.m4 2010-06-13 16:37:23 +0000
3255@@ -0,0 +1,47 @@
3256+dnl Copyright (C) 2010 Monty Taylor
3257+dnl This file is free software; Monty Taylor
3258+dnl gives unlimited permission to copy and/or distribute it,
3259+dnl with or without modifications, as long as this notice is preserved.
3260+
3261+AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[
3262+ AC_REQUIRE([AC_LIB_PREFIX])
3263+
3264+ dnl --------------------------------------------------------------------
3265+ dnl Check for boost::program_options
3266+ dnl --------------------------------------------------------------------
3267+
3268+ AC_LANG_PUSH(C++)
3269+ AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[
3270+ #include <boost/program_options.hpp>
3271+ ],[
3272+ boost::program_options::options_description d;
3273+ d.add_options()("a","some option");
3274+ ])
3275+ AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[
3276+ AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
3277+ #include <boost/program_options.hpp>
3278+ ],[
3279+ boost::program_options::options_description d;
3280+ d.add_options()("a","some option");
3281+ ])
3282+ ])
3283+ AC_LANG_POP()
3284+
3285+ AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
3286+ [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"])
3287+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}"
3288+ AC_SUBST(BOOST_LIBS)
3289+])
3290+
3291+AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
3292+ PANDORA_HAVE_BOOST($1)
3293+ _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
3294+])
3295+
3296+AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
3297+ PANDORA_REQUIRE_BOOST($1)
3298+ _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
3299+ AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"],
3300+ AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))
3301+])
3302+
3303
3304=== added file 'm4/pandora_have_libcassandra.m4'
3305--- m4/pandora_have_libcassandra.m4 1970-01-01 00:00:00 +0000
3306+++ m4/pandora_have_libcassandra.m4 2010-06-13 16:37:23 +0000
3307@@ -0,0 +1,44 @@
3308+dnl Copyright (C) 2010 Padraig O'Sullivan
3309+dnl This file is free software;
3310+dnl gives unlimited permission to copy and/or distribute it,
3311+dnl with or without modifications, as long as this notice is preserved.
3312+
3313+AC_DEFUN([_PANDORA_SEARCH_LIBCASSANDRA],[
3314+ AC_REQUIRE([AC_LIB_PREFIX])
3315+
3316+ dnl --------------------------------------------------------------------
3317+ dnl Check for libcassandra
3318+ dnl --------------------------------------------------------------------
3319+
3320+ AC_ARG_ENABLE([libcassandra],
3321+ [AS_HELP_STRING([--disable-libcassandra],
3322+ [Build with libcassandra support @<:@default=on@:>@])],
3323+ [ac_enable_libcassandra="$enableval"],
3324+ [ac_enable_libcassandra="yes"])
3325+
3326+ AS_IF([test "x$ac_enable_libcassandra" = "xyes"],[
3327+ AC_LANG_PUSH([C++])
3328+ AC_LIB_HAVE_LINKFLAGS(cassandra,[thrift],[
3329+ #include <libcassandra/cassandra_factory.h>
3330+ ],[
3331+ libcassandra::CassandraFactory fact("localhost", 9306);
3332+ ])
3333+ AC_LANG_POP()
3334+ ],[
3335+ ac_cv_libcassandra="no"
3336+ ])
3337+
3338+ AM_CONDITIONAL(HAVE_LIBCASSANDRA, [test "x${ac_cv_libcassandra}" = "xyes"])
3339+
3340+])
3341+
3342+AC_DEFUN([PANDORA_HAVE_LIBCASSANDRA],[
3343+ AC_REQUIRE([_PANDORA_SEARCH_LIBCASSANDRA])
3344+])
3345+
3346+AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[
3347+ AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA])
3348+ AS_IF([test "x$ac_cv_libcassandra" = "xno"],[
3349+ AC_MSG_ERROR([libcassandra is required for ${PACKAGE}])
3350+ ])
3351+])
3352
3353=== modified file 'm4/pandora_have_libdrizzle.m4'
3354--- m4/pandora_have_libdrizzle.m4 2009-08-10 21:04:49 +0000
3355+++ m4/pandora_have_libdrizzle.m4 2010-06-13 16:37:23 +0000
3356@@ -36,20 +36,26 @@
3357
3358 AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[
3359 AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])
3360- AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],
3361- AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]))
3362+ AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[
3363+ AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])
3364+ ],[
3365+ dnl We need at least 0.8 on Solaris non-sparc
3366+ AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[
3367+ PANDORA_LIBDRIZZLE_RECENT
3368+ ])
3369+ ])
3370 ])
3371
3372-AC_DEFUN([PANDORA_LIBDRIZZLE_NOVCOL],[
3373- AC_CACHE_CHECK([if libdrizzle still has virtual columns],
3374- [pandora_cv_libdrizzle_vcol],
3375+AC_DEFUN([PANDORA_LIBDRIZZLE_RECENT],[
3376+ AC_CACHE_CHECK([if libdrizzle is recent enough],
3377+ [pandora_cv_libdrizzle_recent],
3378 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3379 #include <libdrizzle/drizzle.h>
3380-int foo= DRIZZLE_COLUMN_TYPE_DRIZZLE_VIRTUAL;
3381+drizzle_con_options_t foo= DRIZZLE_CON_EXPERIMENTAL;
3382 ]])],
3383- [pandora_cv_libdrizzle_vcol=yes],
3384- [pandora_cv_libdrizzle_vcol=no])])
3385- AS_IF([test "$pandora_cv_libdrizzle_vcol" = "yes"],[
3386- AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.4])
3387+ [pandora_cv_libdrizzle_recent=yes],
3388+ [pandora_cv_libdrizzle_recent=no])])
3389+ AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[
3390+ AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8])
3391 ])
3392 ])
3393
3394=== added file 'm4/pandora_have_libgtest.m4'
3395--- m4/pandora_have_libgtest.m4 1970-01-01 00:00:00 +0000
3396+++ m4/pandora_have_libgtest.m4 2010-06-13 16:37:23 +0000
3397@@ -0,0 +1,44 @@
3398+dnl Copyright (C) 2010 Monty Taylor
3399+dnl This file is free software; Monty Taylor
3400+dnl gives unlimited permission to copy and/or distribute it,
3401+dnl with or without modifications, as long as this notice is preserved.
3402+
3403+AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
3404+ AC_REQUIRE([AC_LIB_PREFIX])
3405+
3406+ dnl --------------------------------------------------------------------
3407+ dnl Check for libgtest
3408+ dnl --------------------------------------------------------------------
3409+
3410+ AC_ARG_ENABLE([libgtest],
3411+ [AS_HELP_STRING([--disable-libgtest],
3412+ [Build with libgtest support @<:@default=on@:>@])],
3413+ [ac_enable_libgtest="$enableval"],
3414+ [ac_enable_libgtest="yes"])
3415+
3416+ AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
3417+ AC_LANG_PUSH(C++)
3418+ AC_LIB_HAVE_LINKFLAGS(gtest,,[
3419+ #include <gtest/gtest.h>
3420+TEST(pandora_test_libgtest, PandoraTest)
3421+{
3422+ ASSERT_EQ(1, 1);
3423+}
3424+ ],[])
3425+ AC_LANG_POP()
3426+ ],[
3427+ ac_cv_libgtest="no"
3428+ ])
3429+
3430+ AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
3431+])
3432+
3433+AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
3434+ AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
3435+])
3436+
3437+AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[
3438+ AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
3439+ AS_IF([test "x${ac_cv_libgtest}" = "xno"],
3440+ AC_MSG_ERROR([libgtest is required for ${PACKAGE}]))
3441+])
3442
3443=== added file 'm4/pandora_have_libhashkit.m4'
3444--- m4/pandora_have_libhashkit.m4 1970-01-01 00:00:00 +0000
3445+++ m4/pandora_have_libhashkit.m4 2010-06-13 16:37:23 +0000
3446@@ -0,0 +1,42 @@
3447+dnl Copyright (C) 2010 NorthScale
3448+dnl This file is free software; NorthScale
3449+dnl gives unlimited permission to copy and/or distribute it,
3450+dnl with or without modifications, as long as this notice is preserved.
3451+
3452+AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[
3453+ AC_REQUIRE([AC_LIB_PREFIX])
3454+
3455+ dnl --------------------------------------------------------------------
3456+ dnl Check for libhashkit
3457+ dnl --------------------------------------------------------------------
3458+
3459+ AC_ARG_ENABLE([libhashkit],
3460+ [AS_HELP_STRING([--disable-libhashkit],
3461+ [Build with libhashkit support @<:@default=on@:>@])],
3462+ [ac_enable_libhashkit="$enableval"],
3463+ [ac_enable_libhashkit="yes"])
3464+
3465+ AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[
3466+ AC_LIB_HAVE_LINKFLAGS(hashkit,,[
3467+ #include <libhashkit/hashkit.h>
3468+ ],[
3469+ hashkit_st foo;
3470+ hashkit_st *kit = hashkit_create(&foo);
3471+ hashkit_free(kit);
3472+ ])
3473+ ],[
3474+ ac_cv_libhashkit="no"
3475+ ])
3476+
3477+ AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"])
3478+])
3479+
3480+AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[
3481+ AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT])
3482+])
3483+
3484+AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[
3485+ AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT])
3486+ AS_IF([test x$ac_cv_libhashkit = xno],
3487+ AC_MSG_ERROR([libhashkit is required for ${PACKAGE}]))
3488+])
3489
3490=== added file 'm4/pandora_have_libinnodb.m4'
3491--- m4/pandora_have_libinnodb.m4 1970-01-01 00:00:00 +0000
3492+++ m4/pandora_have_libinnodb.m4 2010-06-13 16:37:23 +0000
3493@@ -0,0 +1,64 @@
3494+dnl Copyright (C) 2009 Sun Microsystems
3495+dnl This file is free software; Sun Microsystems
3496+dnl gives unlimited permission to copy and/or distribute it,
3497+dnl with or without modifications, as long as this notice is preserved.
3498+
3499+AC_DEFUN([_PANDORA_SEARCH_LIBINNODB],[
3500+ AC_REQUIRE([AC_LIB_PREFIX])
3501+
3502+ dnl --------------------------------------------------------------------
3503+ dnl Check for libinnodb
3504+ dnl --------------------------------------------------------------------
3505+
3506+ AC_ARG_ENABLE([libinnodb],
3507+ [AS_HELP_STRING([--disable-libinnodb],
3508+ [Build with libinnodb support @<:@default=on@:>@])],
3509+ [ac_enable_libinnodb="$enableval"],
3510+ [ac_enable_libinnodb="yes"])
3511+
3512+ AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[
3513+ AC_LIB_HAVE_LINKFLAGS(innodb,,[
3514+ #include <embedded_innodb-1.0/innodb.h>
3515+ ],[
3516+ ib_u64_t
3517+ ib_api_version(void);
3518+ ])
3519+ ],[
3520+ ac_cv_libinnodb="no"
3521+ ])
3522+
3523+
3524+ AC_CACHE_CHECK([if libinnodb is recent enough],
3525+ [ac_cv_recent_innodb_h],[
3526+ save_LIBS=${LIBS}
3527+ LIBS="${LIBS} ${LTLIBINNODB}"
3528+ AC_LINK_IFELSE(
3529+ [AC_LANG_PROGRAM([[
3530+ #include <embedded_innodb-1.0/innodb.h>
3531+ ]],[[
3532+ /* Make sure we have the two-arg version */
3533+ ib_table_drop(NULL, "nothing");
3534+ ]])],[
3535+ ac_cv_recent_innodb_h=yes
3536+ ],[
3537+ ac_cv_recent_innodb_h=no
3538+ ])
3539+ LIBS="${save_LIBS}"
3540+ ])
3541+ AS_IF([test "x${ac_cv_recent_innodb_h}" = "xno"],[
3542+ AC_MSG_WARN([${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB])
3543+ ac_cv_libinnodb=no
3544+ ])
3545+
3546+ AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
3547+])
3548+
3549+AC_DEFUN([PANDORA_HAVE_LIBINNODB],[
3550+ AC_REQUIRE([_PANDORA_SEARCH_LIBINNODB])
3551+])
3552+
3553+AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[
3554+ AC_REQUIRE([PANDORA_HAVE_LIBINNODB])
3555+ AS_IF([test "x${ac_cv_libinnodb}" = "xno"],
3556+ AC_MSG_ERROR([libinnodb is required for ${PACKAGE}]))
3557+])
3558
3559=== added file 'm4/pandora_have_libldap.m4'
3560--- m4/pandora_have_libldap.m4 1970-01-01 00:00:00 +0000
3561+++ m4/pandora_have_libldap.m4 2010-06-13 16:37:23 +0000
3562@@ -0,0 +1,73 @@
3563+dnl Copyright (C) 2009 Sun Microsystems
3564+dnl This file is free software; Sun Microsystems
3565+dnl gives unlimited permission to copy and/or distribute it,
3566+dnl with or without modifications, as long as this notice is preserved.
3567+
3568+#--------------------------------------------------------------------
3569+# Check for libldap
3570+#--------------------------------------------------------------------
3571+
3572+
3573+AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[
3574+ AC_REQUIRE([AC_LIB_PREFIX])
3575+
3576+ AC_LIB_HAVE_LINKFLAGS(ldap,,
3577+ [#include <ldap.h>],
3578+ [
3579+ LDAP *ldap;
3580+ ldap_initialize(&ldap, "ldap://localhost/");
3581+ ])
3582+ AS_IF([test "x$ac_cv_libldap" = "xno"],
3583+ [
3584+ unset ac_cv_libldap
3585+ unset HAVE_LIBLDAP
3586+ unset LIBLDAP
3587+ unset LIBLDAP_PREFIX
3588+ unset LTLIBLDAP
3589+ AC_LIB_HAVE_LINKFLAGS(ldap,,
3590+ [#include <ldap/ldap.h>],
3591+ [
3592+ LDAP *ldap;
3593+ ldap_initialize(&ldap, "ldap://localhost/");
3594+ ])
3595+ AS_IF([test "x$ac_cv_libldap" = "xyes"], [
3596+ ac_cv_ldap_location="<ldap/ldap.h>"
3597+ ])
3598+ ],[
3599+ ac_cv_ldap_location="<ldap.h>"
3600+ ])
3601+
3602+ AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"])
3603+])
3604+
3605+AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[
3606+
3607+ AC_ARG_ENABLE([libldap],
3608+ [AS_HELP_STRING([--disable-libldap],
3609+ [Build with libldap support @<:@default=on@:>@])],
3610+ [ac_enable_libldap="$enableval"],
3611+ [ac_enable_libldap="yes"])
3612+
3613+ _PANDORA_SEARCH_LIBLDAP
3614+])
3615+
3616+
3617+AC_DEFUN([PANDORA_HAVE_LIBLDAP],[
3618+ AC_REQUIRE([_PANDORA_HAVE_LIBLDAP])
3619+])
3620+
3621+AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[
3622+ ac_enable_libldap="yes"
3623+ _PANDORA_SEARCH_LIBLDAP
3624+
3625+ AS_IF([test x$ac_cv_libldap = xno],[
3626+ AC_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.])
3627+ ],[
3628+ AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}],
3629+ [Location of ldap header])
3630+ ])
3631+])
3632+
3633+AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[
3634+ AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP])
3635+])
3636
3637=== modified file 'm4/pandora_have_libmemcached.m4'
3638--- m4/pandora_have_libmemcached.m4 2010-01-10 06:35:43 +0000
3639+++ m4/pandora_have_libmemcached.m4 2010-06-13 16:37:23 +0000
3640@@ -24,6 +24,11 @@
3641 memcached_dump_func *df;
3642 memcached_lib_version();
3643 ])
3644+ ],[
3645+ ac_cv_libmemcached="no"
3646+ ])
3647+
3648+ AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
3649 AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
3650 #include <libmemcached/protocol_handler.h>
3651 ],[
3652@@ -31,7 +36,7 @@
3653 protocol_handle= memcached_protocol_create_instance();
3654 ])
3655 ],[
3656- ac_cv_libmemcached="no"
3657+ ac_cv_libmemcachedprotocol="no"
3658 ])
3659
3660 AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
3661@@ -42,21 +47,60 @@
3662 ]])],
3663 [pandora_cv_libmemcached_server_fn=yes],
3664 [pandora_cv_libmemcached_server_fn=no])])
3665+
3666 AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
3667 AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
3668 ])
3669-
3670- AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
3671+])
3672+
3673+AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
3674+
3675+ AC_CACHE_CHECK([if libmemcached is recent enough],
3676+ [pandora_cv_recent_libmemcached],[
3677+ AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
3678+ pandora_cv_recent_libmemcached=no
3679+ ],[
3680+ AS_IF([test "x$1" != "x"],[
3681+ pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
3682+ AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
3683+ pandora_cv_recent_libmemcached=yes
3684+ ],[
3685+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3686+#include <libmemcached/configure.h>
3687+
3688+#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
3689+# error libmemcached too old!
3690+#endif
3691+ ]],[[]])
3692+ ],[
3693+ pandora_cv_recent_libmemcached=yes
3694+ ],[
3695+ pandora_cv_recent_libmemcached=no
3696+ ])
3697+ ])
3698+ ],[
3699+ pandora_cv_recent_libmemcached=yes
3700+ ])
3701+ ])
3702+ ])
3703+
3704+ AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
3705
3706 ])
3707
3708 AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
3709 AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
3710+ _PANDORA_RECENT_LIBMEMCACHED($1)
3711 ])
3712
3713 AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
3714- AC_REQUIRE([PANDORA_HAVE_LIBMEMCACHED])
3715- AS_IF([test x$ac_cv_libmemcached = xno],
3716+ PANDORA_HAVE_LIBMEMCACHED($1)
3717+ AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
3718 AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
3719 ])
3720
3721+AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
3722+ PANDORA_HAVE_LIBMEMCACHED($1)
3723+ AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
3724+ AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))
3725+])
3726
3727=== added file 'm4/pandora_have_libmysqlclient.m4'
3728--- m4/pandora_have_libmysqlclient.m4 1970-01-01 00:00:00 +0000
3729+++ m4/pandora_have_libmysqlclient.m4 2010-06-13 16:37:23 +0000
3730@@ -0,0 +1,146 @@
3731+dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
3732+dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3733+dnl
3734+dnl Copyright (C) 2010 Monty Taylor
3735+dnl This file is free software; Sun Microsystems
3736+dnl gives unlimited permission to copy and/or distribute it,
3737+dnl with or without modifications, as long as this notice is preserved.
3738+dnl
3739+
3740+AC_DEFUN([PANDORA_WITH_MYSQL],[
3741+ AC_ARG_WITH([mysql],
3742+ [AS_HELP_STRING([--with-mysql=PATH],
3743+ [path to mysql_config binary or mysql prefix dir])],
3744+ [with_mysql=$withval],
3745+ [with_mysql=":"])
3746+
3747+ dnl There are three possibilities:
3748+ dnl 1) nothing is given: we will search for mysql_config in PATH
3749+ dnl 2) the location of mysql_config is given: we'll use that to determine
3750+ dnl 3) a directory argument is given: that will be mysql_base
3751+
3752+
3753+ dnl option 1: nothing, we need to insert something into MYSQL_CONFIG
3754+ AS_IF([test "x$with_mysql" = "x:"],[
3755+ AC_CHECK_PROGS(MYSQL_CONFIG,[mysql_config])
3756+ ],[
3757+ MYSQL_CONFIG="${with_mysql}"
3758+ ])
3759+
3760+ AC_CACHE_CHECK([for MySQL Base Location],[pandora_cv_mysql_base],[
3761+
3762+ dnl option 2: something in MYSQL_CONFIG now, use that to get a base dir
3763+ AS_IF([test -f "${MYSQL_CONFIG}" -a -x "${MYSQL_CONFIG}"],[
3764+ pandora_cv_mysql_base=$(dirname $(MYSQL_CONFIG --include | sed 's/-I//'))
3765+ ],[
3766+ dnl option 1: a directory
3767+ AS_IF([test -d $with_mysql],[pandora_cv_mysql_base=$with_mysql],[
3768+ pandora_cv_mysql_base="not found"
3769+ ])
3770+ ])
3771+ ])
3772+])
3773+
3774+AC_DEFUN([_PANDORA_SEARCH_LIBMYSQLCLIENT],[
3775+ AC_REQUIRE([AC_LIB_PREFIX])
3776+
3777+ AC_ARG_ENABLE([libmysqlclient],
3778+ [AS_HELP_STRING([--disable-libmysqlclient],
3779+ [Build with libmysqlclient support @<:@default=on@:>@])],
3780+ [ac_enable_libmysqlclient="$enableval"],
3781+ [ac_enable_libmysqlclient="yes"])
3782+
3783+ AS_IF([test "x$ac_enable_libmysqlclient" = "xyes"],[
3784+ AC_LIB_HAVE_LINKFLAGS(mysqlclient_r,,[
3785+#include <mysql/mysql.h>
3786+ ],[
3787+MYSQL mysql;
3788+ ])],[
3789+ ac_cv_libmysqlclient_r="no"
3790+ ])
3791+
3792+ AM_CONDITIONAL(HAVE_LIBMYSQLCLIENT, [test "x${ac_cv_libmysqlclient_r}" = "xyes"])
3793+
3794+AC_DEFUN([PANDORA_HAVE_LIBMYSQLCLIENT],[
3795+ AC_REQUIRE([_PANDORA_SEARCH_LIBMYSQLCLIENT])
3796+])
3797+
3798+AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[
3799+ AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT])
3800+ AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"],
3801+ AC_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}]))
3802+])
3803+
3804+ AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[
3805+ IBASE="-I${with_mysql}"
3806+ MYSQL_CONFIG="${with_mysql}/scripts/mysql_config"
3807+ ADDIFLAGS="$IBASE/include "
3808+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include/ndbapi "
3809+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include/mgmapi "
3810+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include "
3811+ LDFLAGS="-L${with_mysql}/storage/ndb/src/.libs -L${with_mysql}/libmysql_r/.libs/ -L${with_mysql}/mysys/.libs -L${with_mysql}/mysys -L${with_mysql}/strings/.libs -L${with_mysql}/strings "
3812+ ],[
3813+ IBASE=`$MYSQL_CONFIG --include`
3814+ ADDIFLAGS=""
3815+ # add regular MySQL C flags
3816+ ADDCFLAGS=`$MYSQL_CONFIG --cflags`
3817+ # add NdbAPI specific C flags
3818+ LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r | sed 's/-lmysqlclient_r//'`
3819+ ])
3820+
3821+
3822+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb"
3823+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/ndbapi"
3824+ ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/mgmapi"
3825+ ADDIFLAGS="$ADDIFLAGS $IBASE/ndb"
3826+ ADDIFLAGS="$ADDIFLAGS $IBASE/ndb/ndbapi"
3827+ ADDIFLAGS="$ADDIFLAGS $IBASE/ndb/mgmapi"
3828+ ADDIFLAGS="$ADDIFLAGS $IBASE"
3829+
3830+ CFLAGS="$CFLAGS $ADDCFLAGS $ADDIFLAGS"
3831+ CXXFLAGS="$CXXFLAGS $ADDCFLAGS $ADDIFLAGS"
3832+ MYSQL_INCLUDES="$IBASE $ADDIFLAGS"
3833+
3834+
3835+ dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[AC_MSG_ERROR([Can't link against libmysqlclient_r])])
3836+ dnl First test to see if we can run with only ndbclient
3837+ AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else
3838+ LDFLAGS="$LDFLAGS -lmysys -ldbug"
3839+ AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,)
3840+ AC_CHECK_LIB([ndbclient],[ndb_init],,[
3841+ AC_MSG_ERROR([Can't link against libndbclient])])
3842+ AC_CHECK_LIB([mystrings],[decimal_bin_size],,[
3843+ AC_MSG_ERROR([Can't find decimal_bin_size])])])
3844+ AC_MSG_CHECKING(for NdbApi headers)
3845+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[])
3846+ AS_IF([test "$ndbapi_found" = "yes"],
3847+ [AC_MSG_RESULT(found)],
3848+ [AC_MSG_ERROR([Couldn't find NdbApi.hpp!])])
3849+ AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop)
3850+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[])
3851+ AS_IF([test "$have_cge63" = "yes"],
3852+ [AC_MSG_RESULT(found)
3853+ HAVE_CGE63="-DCGE63"
3854+ AC_SUBST(HAVE_CGE63)],
3855+ [AC_MSG_RESULT(missing)])
3856+
3857+ LDFLAGS="$LDFLAGS $LIBS"
3858+
3859+
3860+ MYSQL_MAJOR_VERSION=`$MYSQL_CONFIG --version | sed -e 's/\.//g' -e 's/-//g' -e 's/[A-Za-z]//g' | cut -c1-2`
3861+
3862+ case "$MYSQL_MAJOR_VERSION" in
3863+ 50) AC_DEFINE(MYSQL_50, [1], [mysql5.0])
3864+ ;;
3865+ 51) AC_DEFINE(MYSQL_51, [1], [mysql5.1])
3866+ ;;
3867+ *) echo "Unsupported version of MySQL Detected!"
3868+ ;;
3869+ esac
3870+
3871+ AC_SUBST(MYSQL_MAJOR_VERSION)
3872+ AC_SUBST(MYSQL_CONFIG)
3873+
3874+
3875+])
3876+
3877
3878=== added file 'm4/pandora_have_libndbclient.m4'
3879--- m4/pandora_have_libndbclient.m4 1970-01-01 00:00:00 +0000
3880+++ m4/pandora_have_libndbclient.m4 2010-06-13 16:37:23 +0000
3881@@ -0,0 +1,80 @@
3882+dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
3883+dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3884+dnl
3885+dnl Copyright (C) 2010 Monty Taylor
3886+dnl This file is free software; Sun Microsystems
3887+dnl gives unlimited permission to copy and/or distribute it,
3888+dnl with or without modifications, as long as this notice is preserved.
3889+dnl
3890+
3891+AC_DEFUN([_PANDORA_SEARCH_LIBNDBCLIENT],[
3892+
3893+ AC_REQUIRE([AC_LIB_PREFIX])
3894+ AC_REQUIRE([PANDORA_WITH_MYSQL])
3895+
3896+ AC_ARG_ENABLE([libndbclient],
3897+ [AS_HELP_STRING([--disable-libndbclient],
3898+ [Build with libndbclient support @<:@default=on@:>@])],
3899+ [ac_enable_libndbclient="$enableval"],
3900+ [ac_enable_libndbclient="yes"])
3901+
3902+ AC_ARG_WITH([libndbclient-prefix],
3903+ [AS_HELP_STRING([--with-libndbclient-prefix],
3904+ [search for libndbclient in DIR])],
3905+ [ac_with_libndbclient=${withval}],
3906+ [ac_with_libndbclient=${pandora_cv_mysql_base}])
3907+
3908+ save_LIBS="${LIBS}"
3909+ LIBS=""
3910+ save_CPPFLAGS="${CPPFLAGS}"
3911+ AS_IF([test "x${ac_with_libndbclient}" != "x"],[
3912+ LIBS="-L${ac_with_libndbclient}/lib/mysql -L${ac_with_libndbclient}/lib"
3913+ AS_IF([test "$GCC" = "yes"],[
3914+ ndb_include_prefix="-isystem "
3915+ ],[
3916+ ndb_include_prefix="-I"
3917+ ])
3918+ 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"
3919+ ])
3920+ LIBS="${LIBS} -lndbclient -lmysqlclient_r"
3921+
3922+ AC_CACHE_CHECK([if NdbApi works],[ac_cv_libndbclient],[
3923+ AC_LANG_PUSH(C++)
3924+ AC_LINK_IFELSE([
3925+ AC_LANG_PROGRAM([[
3926+#include <NdbApi.hpp>
3927+ ]],[[
3928+Ndb *ndb;
3929+ndb_init();
3930+ ]])
3931+ ],[
3932+ ac_cv_libndbclient=yes
3933+ ],[
3934+ ac_cv_libndbclient=no
3935+ ])
3936+ ])
3937+ AC_LANG_POP()
3938+
3939+ LIBNDBCLIENT="${LIBS}"
3940+ LTLIBNDBCLIENT="${LIBS}"
3941+ AC_SUBST([LIBNDBCLIENT])
3942+ AC_SUBST([LTLIBNDBCLIENT])
3943+
3944+ AS_IF([test "x${ac_cv_libndbclient}" = "xno"],[
3945+ CPPFLAGS="${save_CPPFLAGS}"
3946+ ])
3947+ LIBS="${save_LIBS}"
3948+
3949+ AM_CONDITIONAL(HAVE_LIBNDBCLIENT, [test "x${ac_cv_libndbclient}" = "xyes"])
3950+])
3951+
3952+AC_DEFUN([PANDORA_HAVE_LIBNDBCLIENT],[
3953+ AC_REQUIRE([_PANDORA_SEARCH_LIBNDBCLIENT])
3954+])
3955+
3956+AC_DEFUN([PANDORA_REQUIRE_LIBNDBCLIENT],[
3957+ AC_REQUIRE([PANDORA_HAVE_LIBNDBCLIENT])
3958+ AS_IF([test "x${ac_cv_libndbclient}" = "xno"],
3959+ AC_MSG_ERROR([libndbclient is required for ${PACKAGE}]))
3960+])
3961+
3962
3963=== added file 'm4/pandora_have_libpqxx.m4'
3964--- m4/pandora_have_libpqxx.m4 1970-01-01 00:00:00 +0000
3965+++ m4/pandora_have_libpqxx.m4 2010-06-13 16:37:23 +0000
3966@@ -0,0 +1,44 @@
3967+dnl Copyright (C) 2010 Padraig O'Sullivan
3968+dnl This file is free software;
3969+dnl gives unlimited permission to copy and/or distribute it,
3970+dnl with or without modifications, as long as this notice is preserved.
3971+
3972+AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[
3973+ AC_REQUIRE([AC_LIB_PREFIX])
3974+
3975+ dnl --------------------------------------------------------------------
3976+ dnl Check for libpqxx
3977+ dnl --------------------------------------------------------------------
3978+
3979+ AC_ARG_ENABLE([libpqxx],
3980+ [AS_HELP_STRING([--disable-libpqxx],
3981+ [Build with libpqxx support @<:@default=on@:>@])],
3982+ [ac_enable_libpqxx="$enableval"],
3983+ [ac_enable_libpqxx="yes"])
3984+
3985+ AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[
3986+ AC_LANG_PUSH([C++])
3987+ AC_LIB_HAVE_LINKFLAGS(pqxx,,[
3988+ #include <pqxx/pqxx>
3989+ ],[
3990+ pqxx::connection conn("dbname=test");
3991+ ])
3992+ AC_LANG_POP()
3993+ ],[
3994+ ac_cv_libpqxx="no"
3995+ ])
3996+
3997+ AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"])
3998+
3999+])
4000+
4001+AC_DEFUN([PANDORA_HAVE_LIBPQXX],[
4002+ AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX])
4003+])
4004+
4005+AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[
4006+ AC_REQUIRE([PANDORA_HAVE_LIBPQXX])
4007+ AS_IF([test "x$ac_cv_libpqxx" = "xno"],[
4008+ AC_MSG_ERROR([libpqxx is required for ${PACKAGE}])
4009+ ])
4010+])
4011
4012=== modified file 'm4/pandora_have_libtokyocabinet.m4'
4013--- m4/pandora_have_libtokyocabinet.m4 2009-12-02 02:57:53 +0000
4014+++ m4/pandora_have_libtokyocabinet.m4 2010-06-13 16:37:23 +0000
4015@@ -22,8 +22,10 @@
4016 AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[
4017 AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[
4018 #include <tcutil.h>
4019+#include <tcadb.h>
4020 ],[
4021 const char *test= tcversion;
4022+bool ret= tcadboptimize(NULL, "params");
4023 ])
4024 ],[
4025 ac_cv_libtokyocabinet="no"
4026@@ -31,11 +33,11 @@
4027
4028 AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[
4029
4030- PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet], [
4031+ PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet >= 1.4.15], [
4032 ac_cv_libtokyocabinet=yes
4033 LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
4034 LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
4035- ],[])
4036+ ],[test x = y])
4037 ])
4038
4039 AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"])
4040
4041=== added file 'm4/pandora_have_libvbucket.m4'
4042--- m4/pandora_have_libvbucket.m4 1970-01-01 00:00:00 +0000
4043+++ m4/pandora_have_libvbucket.m4 2010-06-13 16:37:23 +0000
4044@@ -0,0 +1,40 @@
4045+dnl Copyright (C) 2010 NorthScale
4046+dnl This file is free software; NorthScale
4047+dnl gives unlimited permission to copy and/or distribute it,
4048+dnl with or without modifications, as long as this notice is preserved.
4049+
4050+AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[
4051+ AC_REQUIRE([AC_LIB_PREFIX])
4052+
4053+ dnl --------------------------------------------------------------------
4054+ dnl Check for libvbucket
4055+ dnl --------------------------------------------------------------------
4056+
4057+ AC_ARG_ENABLE([libvbucket],
4058+ [AS_HELP_STRING([--disable-libvbucket],
4059+ [Build with libvbucket support @<:@default=on@:>@])],
4060+ [ac_enable_libvbucket="$enableval"],
4061+ [ac_enable_libvbucket="yes"])
4062+
4063+ AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[
4064+ AC_LIB_HAVE_LINKFLAGS(vbucket,,[
4065+ #include <libvbucket/vbucket.h>
4066+ ],[
4067+ VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL);
4068+ ])
4069+ ],[
4070+ ac_cv_libvbucket="no"
4071+ ])
4072+
4073+ AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"])
4074+])
4075+
4076+AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[
4077+ AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET])
4078+])
4079+
4080+AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[
4081+ AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET])
4082+ AS_IF([test x$ac_cv_libvbucket = xno],
4083+ AC_MSG_ERROR([libvbucket is required for ${PACKAGE}]))
4084+])
4085
4086=== added file 'm4/pandora_have_thrift.m4'
4087--- m4/pandora_have_thrift.m4 1970-01-01 00:00:00 +0000
4088+++ m4/pandora_have_thrift.m4 2010-06-13 16:37:23 +0000
4089@@ -0,0 +1,45 @@
4090+dnl Copyright (C) 2010 Padraig O'Sullivan
4091+dnl This file is free software; Padraig O'Sullivan
4092+dnl gives unlimited permission to copy and/or distribute it,
4093+dnl with or without modifications, as long as this notice is preserved.
4094+
4095+AC_DEFUN([_PANDORA_SEARCH_THRIFT],[
4096+ AC_REQUIRE([AC_LIB_PREFIX])
4097+
4098+ dnl --------------------------------------------------------------------
4099+ dnl Check for thrift
4100+ dnl --------------------------------------------------------------------
4101+
4102+ AC_ARG_ENABLE([thrift],
4103+ [AS_HELP_STRING([--disable-thrift],
4104+ [Build with thrift support @<:@default=on@:>@])],
4105+ [ac_enable_thrift="$enableval"],
4106+ [ac_enable_thrift="yes"])
4107+
4108+ AS_IF([test "x$ac_enable_thrift" = "xyes"],[
4109+ AC_LANG_PUSH(C++)
4110+ AC_LIB_HAVE_LINKFLAGS(thrift,,[
4111+ #include <thrift/Thrift.h>
4112+ ],[
4113+ apache::thrift::TOutput test_output;
4114+ ])
4115+ AC_LANG_POP()
4116+ ],[
4117+ ac_cv_thrift="no"
4118+ ])
4119+
4120+ AM_CONDITIONAL(HAVE_THRIFT, [test "x${ac_cv_thrift}" = "xyes"])
4121+
4122+])
4123+
4124+AC_DEFUN([PANDORA_HAVE_THRIFT],[
4125+ AC_REQUIRE([_PANDORA_SEARCH_THRIFT])
4126+])
4127+
4128+AC_DEFUN([PANDORA_REQUIRE_THRIFT],[
4129+ AC_REQUIRE([PANDORA_HAVE_THRIFT])
4130+ AS_IF([test x$ac_cv_thrift= xno],[
4131+ AC_MSG_ERROR([thrift required for ${PACKAGE}])
4132+ ])
4133+])
4134+
4135
4136=== modified file 'm4/pandora_platform.m4'
4137--- m4/pandora_platform.m4 2010-01-02 04:59:12 +0000
4138+++ m4/pandora_platform.m4 2010-06-13 16:37:23 +0000
4139@@ -34,6 +34,8 @@
4140 ;;
4141 esac
4142
4143+ PANDORA_OPTIMIZE_BITFIELD=1
4144+
4145 case "$target_os" in
4146 *linux*)
4147 TARGET_LINUX="true"
4148@@ -47,6 +49,7 @@
4149 ;;
4150 *solaris*)
4151 TARGET_SOLARIS="true"
4152+ PANDORA_OPTIMIZE_BITFIELD=0
4153 AC_SUBST(TARGET_SOLARIS)
4154 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
4155 ;;
4156@@ -60,6 +63,8 @@
4157 ;;
4158 esac
4159
4160+ AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
4161+
4162 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
4163 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
4164
4165
4166=== modified file 'm4/pandora_plugins.m4'
4167--- m4/pandora_plugins.m4 2009-12-02 02:57:53 +0000
4168+++ m4/pandora_plugins.m4 2010-06-13 16:37:23 +0000
4169@@ -24,14 +24,18 @@
4170
4171 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
4172 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
4173- AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL")
4174+ pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'`
4175+ AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL")
4176 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
4177+ AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list])
4178 AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
4179 m4_ifval(m4_normalize([$1]),[
4180 AC_CONFIG_FILES($*)
4181 ],[
4182- AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list],
4183+ AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],["$pandora_builtin_list"],
4184 [List of plugins to be built in])
4185+ AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_SYMBOLS_LIST],["$pandora_builtin_symbols_list"],
4186+ [List of builtin plugin symbols to be built in])
4187 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],
4188 [List of plugins that should be loaded on startup if no
4189 value is given for --plugin-load])
4190@@ -45,7 +49,7 @@
4191 AC_SUBST(pandora_plugin_defs)
4192
4193 AC_SUBST(PANDORA_PLUGIN_DEP_LIBS)
4194- AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
4195+ AC_SUBST(pkgplugindir,"\$(pkglibdir)")
4196 ])
4197
4198 AC_DEFUN([PANDORA_ADD_PLUGIN_DEP_LIB],[
4199
4200=== modified file 'm4/pandora_sasl.m4'
4201--- m4/pandora_sasl.m4 2010-04-05 16:41:24 +0000
4202+++ m4/pandora_sasl.m4 2010-06-13 16:37:23 +0000
4203@@ -13,7 +13,7 @@
4204 [AS_HELP_STRING([--disable-sasl],
4205 [Build with sasl support @<:@default=on@:>@])],
4206 [ac_enable_sasl="$enableval"],
4207- [ac_enable_sasl="no"])
4208+ [ac_enable_sasl="yes"])
4209
4210 AS_IF([test "x$ac_enable_sasl" = "xyes"],
4211 [
4212
4213=== modified file 'm4/pandora_stl_hash.m4'
4214--- m4/pandora_stl_hash.m4 2009-12-18 00:00:02 +0000
4215+++ m4/pandora_stl_hash.m4 2010-06-13 16:37:23 +0000
4216@@ -1,110 +1,89 @@
4217-# We check two things: where the include file is for hash_map, and
4218-# what namespace hash_map lives in within that include file. We
4219+# We check two things: where the include file is for unordered_map, and
4220+# what namespace unordered_map lives in within that include file. We
4221 # include AC_COMPILE_IFELSE for all the combinations we've seen in the
4222-# wild. We define one of HAVE_HASH_MAP or HAVE_EXT_HASH_MAP depending
4223-# on location, and HASH_NAMESPACE to be the namespace hash_map is
4224-# defined in.
4225-#
4226-# Ideally we'd use AC_CACHE_CHECK, but that only lets us store one value
4227-# at a time, and we need to store two (filename and namespace).
4228-# prints messages itself, so we have to do the message-printing ourselves
4229-# via AC_MSG_CHECKING + AC_MSG_RESULT. (TODO(csilvers): can we cache?)
4230-
4231-AC_DEFUN([PANDORA_CXX_STL_HASH],
4232- [AC_MSG_CHECKING(the location of hash_map)
4233- save_CXXFLAGS="${CXXFLAGS}"
4234- CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
4235- AC_LANG_PUSH(C++)
4236- ac_cv_cxx_hash_map=""
4237- for location in "" "ext/" "tr1/" ; do
4238- for namespace in __gnu_cxx "" std stdext; do
4239- for classprefix in unordered hash; do
4240- if test -z "$ac_cv_cxx_hash_map"; then
4241- AC_COMPILE_IFELSE(
4242- [AC_LANG_PROGRAM([[#include <${location}${classprefix}_map>]],
4243- [[${namespace}::${classprefix}_map<int, int> t]])],
4244- [ac_cv_cxx_hash_map="<${location}${classprefix}_map>";
4245- ac_cv_cxx_hash_set="<${location}${classprefix}_set>";
4246- ac_cv_cxx_hash_namespace="$namespace";
4247- ac_cv_cxx_hash_map_class="${classprefix}_map";
4248- ac_cv_cxx_hash_set_class="${classprefix}_set"])
4249-
4250- fi
4251- done
4252- done
4253- done
4254-
4255- if test -n "$ac_cv_cxx_hash_map"; then
4256- AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
4257- AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
4258- AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map,
4259- [the location of <hash_map>])
4260- AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set,
4261- [the location of <hash_set>])
4262- AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace,
4263- [the namespace of hash_map/hash_set])
4264- AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class,
4265- [the classname of hash_map])
4266- AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class,
4267- [the classname of hash_set])
4268- AC_MSG_RESULT([$ac_cv_cxx_hash_map])
4269- else
4270- AC_MSG_RESULT()
4271- AC_MSG_WARN([could not find an STL hash_map])
4272- fi
4273- AC_CACHE_CHECK(
4274- [whether hash_map has rehash method],
4275- [ac_cv_hash_map_has_rehash],
4276- [AC_COMPILE_IFELSE(
4277- [AC_LANG_PROGRAM([[
4278-#include HASH_MAP_H
4279-using namespace HASH_NAMESPACE;
4280- ]],[[
4281-HASH_MAP_CLASS<int, int> test_hash;
4282-test_hash.rehash(100);
4283- ]])],
4284- [ac_cv_hash_map_has_rehash=yes],
4285- [ac_cv_hash_map_has_rehash=no])])
4286- AS_IF([test $ac_cv_hash_map_has_rehash = yes],[
4287- AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method])
4288- ])
4289- AC_CACHE_CHECK(
4290- [whether hash_map has resize method],
4291- [ac_cv_hash_map_has_resize],
4292- [AC_COMPILE_IFELSE(
4293- [AC_LANG_PROGRAM([[
4294-#include HASH_MAP_H
4295-using namespace HASH_NAMESPACE;
4296- ]],[[
4297-HASH_MAP_CLASS<int, int> test_hash;
4298-test_hash.resize(100);
4299- ]])],
4300- [ac_cv_hash_map_has_resize=yes],
4301- [ac_cv_hash_map_has_resize=no])])
4302- AS_IF([test $ac_cv_hash_map_has_resize = yes],[
4303- AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method])
4304- ])
4305- AC_CACHE_CHECK(
4306- [whether to redefine hash<string>],
4307- [ac_cv_redefine_hash_string],
4308- [AC_COMPILE_IFELSE(
4309- [AC_LANG_PROGRAM([[
4310-#include HASH_SET_H
4311-#include <string>
4312-using namespace HASH_NAMESPACE;
4313-using namespace std;
4314- ]],[[
4315-string teststr("test");
4316-HASH_SET_CLASS<string> test_hash;
4317-HASH_SET_CLASS<string>::iterator iter= test_hash.find(teststr);
4318-if (iter != test_hash.end())
4319- return 1;
4320- ]])],
4321- [ac_cv_redefine_hash_string=no],
4322- [ac_cv_redefine_hash_string=yes])])
4323- AS_IF([test $ac_cv_redefine_hash_string = yes],[
4324- AC_DEFINE(REDEFINE_HASH_STRING, 1, [if hash<string> needs to be defined])
4325- ])
4326- CXXFLAGS="${save_CXXFLAGS}"
4327- AC_LANG_POP()
4328+# wild. We define HAVE_UNORDERED_MAP and HAVE_UNORDERED_SET if we have
4329+# them, UNORDERED_MAP_H and UNORDERED_SET_H to their location and
4330+# UNORDERED_NAMESPACE to be the namespace unordered_map is defined in.
4331+
4332+AC_DEFUN([PANDORA_CXX_STL_UNORDERED],[
4333+ save_CXXFLAGS="${CXXFLAGS}"
4334+ CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
4335+ AC_LANG_PUSH(C++)
4336+ AC_CACHE_CHECK([for STL unordered_map],
4337+ [pandora_cv_stl_unordered],[
4338+ AC_COMPILE_IFELSE(
4339+ [AC_LANG_PROGRAM([[#include <unordered_map>]],
4340+ [[std::unordered_map<int, int> t]])],
4341+ [pandora_cv_stl_unordered="yes"],
4342+ [pandora_cv_stl_unordered="no"])])
4343+
4344+ AS_IF([test "x${pandora_cv_stl_unordered}" != "xyes"],[
4345+ AC_CACHE_CHECK([for tr1 unordered_map],
4346+ [pandora_cv_tr1_unordered],[
4347+ AC_COMPILE_IFELSE(
4348+ [AC_LANG_PROGRAM([[
4349+/* We put in this define because of a YACC symbol clash in Drizzle.
4350+ Seriously... I cannot believe the GCC guys defined a piece of the internals
4351+ of this named IF - and I can't believe that YACC generates a token define
4352+ called IF. Really?
4353+*/
4354+#define IF 21;
4355+#include <tr1/unordered_map>
4356+ ]],[[
4357+std::tr1::unordered_map<int, int> t
4358+ ]])],
4359+ [pandora_cv_tr1_unordered="yes"],
4360+ [pandora_cv_tr1_unordered="no"])])
4361+ ])
4362+
4363+ AS_IF([test "x${pandora_cv_stl_unordered}" != "xyes" -a "x${pandora_cv_tr1_unordered}" != "xyes"],[
4364+ AC_CACHE_CHECK([for boost unordered_map],
4365+ [pandora_cv_boost_unordered],[
4366+ AC_COMPILE_IFELSE(
4367+ [AC_LANG_PROGRAM([[#include <boost/unordered_map.hpp>]],
4368+ [[boost::unordered_map<int, int> t]])],
4369+ [pandora_cv_boost_unordered="yes"],
4370+ [pandora_cv_boost_unordered="no"])])
4371+ ])
4372+
4373+ CXXFLAGS="${save_CXXFLAGS}"
4374+ AC_LANG_POP()
4375+
4376+ AS_IF([test "x${pandora_cv_stl_unordered}" = "xyes"],[
4377+ AC_DEFINE(HAVE_STD_UNORDERED_MAP, 1,
4378+ [if the compiler has std::unordered_map])
4379+ AC_DEFINE(HAVE_STD_UNORDERED_SET, 1,
4380+ [if the compiler has std::unordered_set])
4381+ pandora_has_unordered=yes
4382+ ])
4383+ AS_IF([test "x${pandora_cv_tr1_unordered}" = "xyes"],[
4384+ AC_DEFINE(HAVE_TR1_UNORDERED_MAP, 1,
4385+ [if the compiler has std::tr1::unordered_map])
4386+ AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1,
4387+ [if the compiler has std::tr1::unordered_set])
4388+ pandora_has_unordered=yes
4389+ ])
4390+ AS_IF([test "x${pandora_cv_boost_unordered}" = "xyes"],[
4391+ AC_DEFINE(HAVE_BOOST_UNORDERED_MAP, 1,
4392+ [if the compiler has boost::unordered_map])
4393+ AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1,
4394+ [if the compiler has boost::unordered_set])
4395+ pandora_has_unordered=yes
4396+ ])
4397+
4398+ AS_IF([test "x${pandora_has_unordered}" != "xyes"],[
4399+ AC_MSG_WARN([could not find an STL unordered_map])
4400+ ])
4401+])
4402+
4403+AC_DEFUN([PANDORA_HAVE_CXX_UNORDERED],[
4404+ AC_REQUIRE([PANDORA_CXX_STL_UNORDERED])
4405+])
4406+
4407+AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[
4408+ AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED])
4409+ AS_IF([test "x${pandora_has_unordered}" != "xyes"],[
4410+ AC_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}.
4411+ Implementations can be found in Recent versions of gcc and in boost])
4412+ ])
4413 ])
4414
4415=== modified file 'm4/pandora_use_pipe.m4'
4416--- m4/pandora_use_pipe.m4 2009-10-01 23:48:09 +0000
4417+++ m4/pandora_use_pipe.m4 2010-06-13 16:37:23 +0000
4418@@ -16,7 +16,7 @@
4419
4420 AS_IF([test "$GCC" = "yes"],[
4421 AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [
4422- AC_RUN_IFELSE([AC_LANG_SOURCE([[
4423+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
4424 #include <stdio.h>
4425
4426 int main(int argc, char** argv)
4427
4428=== modified file 'm4/pandora_vc_build.m4'
4429--- m4/pandora_vc_build.m4 2009-12-02 02:57:53 +0000
4430+++ m4/pandora_vc_build.m4 2010-06-13 16:37:23 +0000
4431@@ -3,57 +3,79 @@
4432 dnl gives unlimited permission to copy and/or distribute it,
4433 dnl with or without modifications, as long as this notice is preserved.
4434
4435+AC_DEFUN([PANDORA_TEST_VC_DIR],[
4436+ pandora_building_from_vc=no
4437+
4438+ if test -d ".bzr" ; then
4439+ pandora_building_from_bzr=yes
4440+ pandora_building_from_vc=yes
4441+ else
4442+ pandora_building_from_bzr=no
4443+ fi
4444+
4445+ if test -d ".svn" ; then
4446+ pandora_building_from_svn=yes
4447+ pandora_building_from_vc=yes
4448+ else
4449+ pandora_building_from_svn=no
4450+ fi
4451+
4452+ if test -d ".hg" ; then
4453+ pandora_building_from_hg=yes
4454+ pandora_building_from_vc=yes
4455+ else
4456+ pandora_building_from_hg=no
4457+ fi
4458+
4459+ if test -d ".git" ; then
4460+ pandora_building_from_git=yes
4461+ pandora_building_from_vc=yes
4462+ else
4463+ pandora_building_from_git=no
4464+ fi
4465+])
4466+
4467 AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
4468-
4469- ac_cv_building_from_vc=no
4470-
4471- AS_IF([test -d "${srcdir}/.bzr"],[
4472- ac_cv_building_from_bzr=yes
4473- ac_cv_building_from_vc=yes
4474- ],[
4475- ac_cv_building_from_bzr=no
4476- ])
4477-
4478- AS_IF([test -d "${srcdir}/.svn"],[
4479- ac_cv_building_from_svn=yes
4480- ac_cv_building_from_vc=yes
4481- ],[
4482- ac_cv_building_from_svn=no
4483- ])
4484-
4485- AS_IF([test -d "${srcdir}/.hg"],[
4486- ac_cv_building_from_hg=yes
4487- ac_cv_building_from_vc=yes
4488- ],[
4489- ac_cv_building_from_hg=no
4490- ])
4491-
4492- AS_IF([test -d "${srcdir}/.git"],[
4493- ac_cv_building_from_git=yes
4494- ac_cv_building_from_vc=yes
4495- ],[
4496- ac_cv_building_from_git=no
4497- ])
4498-
4499-
4500+ m4_syscmd(PANDORA_TEST_VC_DIR [
4501+
4502+ PANDORA_RELEASE_DATE=`date +%Y.%m`
4503+ PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
4504+
4505+ # Set some defaults
4506+ PANDORA_VC_REVNO="0"
4507+ PANDORA_VC_REVID="unknown"
4508+ PANDORA_VC_BRANCH="bzr-export"
4509+
4510+ if test "${pandora_building_from_bzr}" = "yes"; then
4511+ echo "# Grabbing changelog and version information from bzr"
4512+ PANDORA_BZR_REVNO=`bzr revno`
4513+ if test "x$PANDORA_BZR_REVNO" != "x${PANDORA_VC_REVNO}" ; then
4514+ PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
4515+ PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
4516+ PANDORA_VC_BRANCH=`bzr nick`
4517+ fi
4518+ fi
4519+
4520+ if ! test -d config ; then
4521+ mkdir -p config
4522+ fi
4523+
4524+ if test "${pandora_building_from_bzr}" = "yes" -o ! -f config/pandora_vc_revinfo ; then
4525+ cat > config/pandora_vc_revinfo.tmp <<EOF
4526+PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
4527+PANDORA_VC_REVID=${PANDORA_VC_REVID}
4528+PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
4529+PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
4530+PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
4531+EOF
4532+ if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then
4533+ mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo
4534+ fi
4535+ rm -f config/pandora_vc_revinfo.tmp
4536+ fi
4537+ ])
4538 ])
4539
4540-dnl Takes one argument which is the prefix to append
4541-AC_DEFUN([PANDORA_EXPORT_BZR_INFO],[
4542- m4_ifval(m4_normalize([$1]),[
4543- m4_define([PEBI_PREFIX],[])
4544- ],[
4545- m4_define([PEBI_PREFIX],m4_toupper(m4_normalize($1))[_])
4546- ])
4547-
4548- AC_DEFINE(PEBI_PREFIX[BZR_REVID], ["BZR_REVID"], [bzr revision ID])
4549- AC_DEFINE(PEBI_PREFIX[BZR_BRANCH], ["BZR_BRANCH"], [bzr branch name])
4550- AC_DEFINE(PEBI_PREFIX[RELEASE_DATE], ["RELEASE_DATE"], [Release date based on the date of the repo checkout])
4551- AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display])
4552- AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch])
4553- AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison])
4554-])
4555-
4556 AC_DEFUN([_PANDORA_READ_FROM_FILE],[
4557 $1=`grep $1 $2 | cut -f2 -d=`
4558 ])
4559@@ -61,50 +83,23 @@
4560 AC_DEFUN([PANDORA_VC_VERSION],[
4561 AC_REQUIRE([PANDORA_BUILDING_FROM_VC])
4562
4563- PANDORA_RELEASE_DATE=`date +%Y.%m`
4564- PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
4565-
4566- dnl Set some defaults
4567- PANDORA_VC_REVNO="0"
4568- PANDORA_VC_REVID="unknown"
4569- PANDORA_VC_BRANCH="bzr-export"
4570-
4571- AS_IF([test -f ${srcdir}/config/bzr_revinfo],[
4572- _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/bzr_revinfo)
4573- _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/bzr_revinfo)
4574+ PANDORA_TEST_VC_DIR
4575+
4576+ AS_IF([test -f ${srcdir}/config/pandora_vc_revinfo],[
4577+ _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/pandora_vc_revinfo)
4578+ _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)
4579 _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
4580- ${srcdir}/config/bzr_revinfo)
4581+ ${srcdir}/config/pandora_vc_revinfo)
4582 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
4583- ${srcdir}/config/bzr_revinfo)
4584+ ${srcdir}/config/pandora_vc_revinfo)
4585 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
4586- ${srcdir}/config/bzr_revinfo)
4587- _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_COMMENT],
4588- ${srcdir}/config/bzr_revinfo)
4589- ])
4590- AS_IF([test "${ac_cv_building_from_bzr}" = "yes"],[
4591-dnl echo "Grabbing changelog and version information from bzr"
4592-dnl bzr log --short > ChangeLog || touch ChangeLog
4593- PANDORA_BZR_REVNO=`bzr revno`
4594- AS_IF([test "x$PANDORA_BZR_REVNO" != "${PANDORA_VC_REVNO}"],[
4595- PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
4596- PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $[]2}' | head -1`
4597- PANDORA_VC_BRANCH=`bzr nick`
4598- AS_IF([test "x${PANDORA_VC_BRANCH}" != "${PACKAGE}"],[
4599- PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}"
4600- ],[
4601- PANDORA_RELEASE_COMMENT="trunk"
4602- ])
4603- ])
4604- ])
4605- AS_IF([! test -d config],[mkdir -p config])
4606- cat > "config/bzr_revinfo" <<EOF
4607-PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
4608-PANDORA_VC_REVID=${PANDORA_VC_REVID}
4609-PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
4610-PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
4611-PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
4612-PANDORA_RELEASE_COMMENT=${PANDORA_RELEASE_COMMENT}
4613-EOF
4614+ ${srcdir}/config/pandora_vc_revinfo)
4615+ ])
4616+ AS_IF([test "x${PANDORA_VC_BRANCH}" != x"${PACKAGE}"],[
4617+ PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}"
4618+ ],[
4619+ PANDORA_RELEASE_COMMENT="trunk"
4620+ ])
4621
4622 PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
4623 PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
4624@@ -121,3 +116,17 @@
4625 AC_SUBST(PANDORA_RELEASE_VERSION)
4626 AC_SUBST(PANDORA_RELEASE_ID)
4627 ])
4628+
4629+AC_DEFUN([PANDORA_VC_INFO_HEADER],[
4630+ AC_REQUIRE([PANDORA_VC_VERSION])
4631+ m4_define([PANDORA_VC_PREFIX],m4_toupper(m4_normalize(AC_PACKAGE_NAME))[_])
4632+
4633+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVNO], [$PANDORA_VC_REVNO], [Version control revision number])
4634+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVID], ["$PANDORA_VC_REVID"], [Version control revision ID])
4635+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_BRANCH], ["$PANDORA_VC_BRANCH"], [Version control branch name])
4636+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_DATE], ["$PANDORA_RELEASE_DATE"], [Release date of version control checkout])
4637+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_NODOTS_DATE], [$PANDORA_RELEASE_NODOTS_DATE], [Numeric formatted release date of checkout])
4638+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_COMMENT], ["$PANDORA_RELEASE_COMMENT"], [Set to trunk if the branch is the main $PACKAGE branch])
4639+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_VERSION], ["$PANDORA_RELEASE_VERSION"], [Release date and revision number of checkout])
4640+ AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_ID], [$PANDORA_RELEASE_ID], [Numeric formatted release date and revision number of checkout])
4641+])
4642
4643=== modified file 'm4/pandora_warnings.m4'
4644--- m4/pandora_warnings.m4 2010-01-22 19:04:16 +0000
4645+++ m4/pandora_warnings.m4 2010-06-13 16:37:23 +0000
4646@@ -30,7 +30,7 @@
4647 AC_REQUIRE([PANDORA_BUILDING_FROM_VC])
4648 m4_if(PW_WARN_ALWAYS_ON, [yes],
4649 [ac_cv_warnings_as_errors=yes],
4650- AS_IF([test "$ac_cv_building_from_vc" = "yes"],
4651+ AS_IF([test "$pandora_building_from_vc" = "yes"],
4652 [ac_cv_warnings_as_errors=yes],
4653 [ac_cv_warnings_as_errors=no]))
4654
4655@@ -145,7 +145,9 @@
4656 m4_if(PW_LESS_WARNINGS,[no],[
4657 BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"
4658 CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
4659- CXX_WARNINGS_FULL="-Wold-style-cast"
4660+ CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"
4661+ NO_OLD_STYLE_CAST="-Wno-old-style-cast"
4662+ NO_EFF_CXX="-Wno-effc++"
4663 ],[
4664 BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}"
4665 ])
4666@@ -291,7 +293,9 @@
4667 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
4668 NO_WERROR="-Wno-error"
4669 INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
4670-
4671+ AS_IF([test "$host_vendor" = "apple"],[
4672+ BOOSTSKIP_WARNINGS="-Wno-uninitialized"
4673+ ])
4674 ])
4675 ])
4676
4677@@ -332,6 +336,7 @@
4678 CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL} ${CFLAG_VISIBILITY}"
4679 CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL} ${CFLAG_VISIBILITY}"
4680 PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit"
4681+ BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem"
4682 NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
4683 NO_WERROR="-errwarn=%none"
4684
4685@@ -342,7 +347,10 @@
4686 AC_SUBST(NO_UNREACHED)
4687 AC_SUBST(NO_SHADOW)
4688 AC_SUBST(NO_STRICT_ALIASING)
4689+ AC_SUBST(NO_EFF_CXX)
4690+ AC_SUBST(NO_OLD_STYLE_CAST)
4691 AC_SUBST(PROTOSKIP_WARNINGS)
4692+ AC_SUBST(BOOSTSKIP_WARNINGS)
4693 AC_SUBST(INNOBASE_SKIP_WARNINGS)
4694 AC_SUBST(NO_WERROR)
4695 AC_SUBST([GCOV_LIBS])
4696
4697=== modified file 'm4/pandora_with_gettext.m4'
4698--- m4/pandora_with_gettext.m4 2009-12-02 02:57:53 +0000
4699+++ m4/pandora_with_gettext.m4 2010-06-13 16:37:23 +0000
4700@@ -11,10 +11,11 @@
4701
4702 AC_DEFUN([PANDORA_WITH_GETTEXT],[
4703
4704+
4705 m4_syscmd([if test -d po ; then
4706 echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp
4707- PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]`
4708- for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort`
4709+ PACKAGE=$(grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d])
4710+ for f in $(find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort)
4711 do
4712 if grep gettext.h "$f" | grep include >/dev/null 2>&1
4713 then
4714@@ -29,13 +30,15 @@
4715 fi
4716 fi])
4717
4718- AM_GNU_GETTEXT(external, need-formatstring-macros)
4719- AM_GNU_GETTEXT_VERSION([0.17])
4720- AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
4721- AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
4722- [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
4723- MSGMERGE="${GMSGMERGE}"
4724+ m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [
4725+ AM_GNU_GETTEXT(external, need-formatstring-macros)
4726+ AM_GNU_GETTEXT_VERSION([0.17])
4727+ AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
4728+ AM_PATH_PROG_WITH_TEST([GMSGMERGE], gmsgmerge,
4729+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
4730+ MSGMERGE="${GMSGMERGE}"
4731+ ])
4732+ AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
4733 ])
4734- AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
4735
4736 ])
4737
4738=== added file 'm4/po.m4'
4739--- m4/po.m4 1970-01-01 00:00:00 +0000
4740+++ m4/po.m4 2010-06-13 16:37:23 +0000
4741@@ -0,0 +1,449 @@
4742+# po.m4 serial 15 (gettext-0.17)
4743+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
4744+dnl This file is free software; the Free Software Foundation
4745+dnl gives unlimited permission to copy and/or distribute it,
4746+dnl with or without modifications, as long as this notice is preserved.
4747+dnl
4748+dnl This file can can be used in projects which are not available under
4749+dnl the GNU General Public License or the GNU Library General Public
4750+dnl License but which still want to provide support for the GNU gettext
4751+dnl functionality.
4752+dnl Please note that the actual code of the GNU gettext library is covered
4753+dnl by the GNU Library General Public License, and the rest of the GNU
4754+dnl gettext package package is covered by the GNU General Public License.
4755+dnl They are *not* in the public domain.
4756+
4757+dnl Authors:
4758+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
4759+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
4760+
4761+AC_PREREQ(2.50)
4762+
4763+dnl Checks for all prerequisites of the po subdirectory.
4764+AC_DEFUN([AM_PO_SUBDIRS],
4765+[
4766+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4767+ AC_REQUIRE([AC_PROG_INSTALL])dnl
4768+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
4769+ AC_REQUIRE([AM_NLS])dnl
4770+
4771+ dnl Release version of the gettext macros. This is used to ensure that
4772+ dnl the gettext macros and po/Makefile.in.in are in sync.
4773+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
4774+
4775+ dnl Perform the following tests also if --disable-nls has been given,
4776+ dnl because they are needed for "make dist" to work.
4777+
4778+ dnl Search for GNU msgfmt in the PATH.
4779+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
4780+ dnl The second test excludes FreeBSD msgfmt.
4781+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4782+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
4783+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4784+ :)
4785+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4786+
4787+ dnl Test whether it is GNU msgfmt >= 0.15.
4788+changequote(,)dnl
4789+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
4790+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
4791+ *) MSGFMT_015=$MSGFMT ;;
4792+ esac
4793+changequote([,])dnl
4794+ AC_SUBST([MSGFMT_015])
4795+changequote(,)dnl
4796+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
4797+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
4798+ *) GMSGFMT_015=$GMSGFMT ;;
4799+ esac
4800+changequote([,])dnl
4801+ AC_SUBST([GMSGFMT_015])
4802+
4803+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
4804+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
4805+ dnl The second test excludes FreeBSD xgettext.
4806+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4807+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
4808+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4809+ :)
4810+ dnl Remove leftover from FreeBSD xgettext call.
4811+ rm -f messages.po
4812+
4813+ dnl Test whether it is GNU xgettext >= 0.15.
4814+changequote(,)dnl
4815+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
4816+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
4817+ *) XGETTEXT_015=$XGETTEXT ;;
4818+ esac
4819+changequote([,])dnl
4820+ AC_SUBST([XGETTEXT_015])
4821+
4822+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
4823+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
4824+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
4825+
4826+ dnl Installation directories.
4827+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
4828+ dnl have to define it here, so that it can be used in po/Makefile.
4829+ test -n "$localedir" || localedir='${datadir}/locale'
4830+ AC_SUBST([localedir])
4831+
4832+ dnl Support for AM_XGETTEXT_OPTION.
4833+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
4834+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
4835+
4836+ AC_CONFIG_COMMANDS([po-directories], [[
4837+ for ac_file in $CONFIG_FILES; do
4838+ # Support "outfile[:infile[:infile...]]"
4839+ case "$ac_file" in
4840+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4841+ esac
4842+ # PO directories have a Makefile.in generated from Makefile.in.in.
4843+ case "$ac_file" in */Makefile.in)
4844+ # Adjust a relative srcdir.
4845+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
4846+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
4847+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
4848+ # In autoconf-2.13 it is called $ac_given_srcdir.
4849+ # In autoconf-2.50 it is called $srcdir.
4850+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
4851+ case "$ac_given_srcdir" in
4852+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
4853+ /*) top_srcdir="$ac_given_srcdir" ;;
4854+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
4855+ esac
4856+ # Treat a directory as a PO directory if and only if it has a
4857+ # POTFILES.in file. This allows packages to have multiple PO
4858+ # directories under different names or in different locations.
4859+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4860+ rm -f "$ac_dir/POTFILES"
4861+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4862+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4863+ POMAKEFILEDEPS="POTFILES.in"
4864+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
4865+ # on $ac_dir but don't depend on user-specified configuration
4866+ # parameters.
4867+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
4868+ # The LINGUAS file contains the set of available languages.
4869+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
4870+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
4871+ fi
4872+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
4873+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
4874+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
4875+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
4876+ else
4877+ # The set of available languages was given in configure.in.
4878+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
4879+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
4880+ fi
4881+ # Compute POFILES
4882+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
4883+ # Compute UPDATEPOFILES
4884+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
4885+ # Compute DUMMYPOFILES
4886+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
4887+ # Compute GMOFILES
4888+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
4889+ case "$ac_given_srcdir" in
4890+ .) srcdirpre= ;;
4891+ *) srcdirpre='$(srcdir)/' ;;
4892+ esac
4893+ POFILES=
4894+ UPDATEPOFILES=
4895+ DUMMYPOFILES=
4896+ GMOFILES=
4897+ for lang in $ALL_LINGUAS; do
4898+ POFILES="$POFILES $srcdirpre$lang.po"
4899+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
4900+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
4901+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
4902+ done
4903+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
4904+ # environment variable.
4905+ INST_LINGUAS=
4906+ if test -n "$ALL_LINGUAS"; then
4907+ for presentlang in $ALL_LINGUAS; do
4908+ useit=no
4909+ if test "%UNSET%" != "$LINGUAS"; then
4910+ desiredlanguages="$LINGUAS"
4911+ else
4912+ desiredlanguages="$ALL_LINGUAS"
4913+ fi
4914+ for desiredlang in $desiredlanguages; do
4915+ # Use the presentlang catalog if desiredlang is
4916+ # a. equal to presentlang, or
4917+ # b. a variant of presentlang (because in this case,
4918+ # presentlang can be used as a fallback for messages
4919+ # which are not translated in the desiredlang catalog).
4920+ case "$desiredlang" in
4921+ "$presentlang"*) useit=yes;;
4922+ esac
4923+ done
4924+ if test $useit = yes; then
4925+ INST_LINGUAS="$INST_LINGUAS $presentlang"
4926+ fi
4927+ done
4928+ fi
4929+ CATALOGS=
4930+ if test -n "$INST_LINGUAS"; then
4931+ for lang in $INST_LINGUAS; do
4932+ CATALOGS="$CATALOGS $lang.gmo"
4933+ done
4934+ fi
4935+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
4936+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
4937+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
4938+ if test -f "$f"; then
4939+ case "$f" in
4940+ *.orig | *.bak | *~) ;;
4941+ *) cat "$f" >> "$ac_dir/Makefile" ;;
4942+ esac
4943+ fi
4944+ done
4945+ fi
4946+ ;;
4947+ esac
4948+ done]],
4949+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
4950+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
4951+ # from automake < 1.5.
4952+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
4953+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
4954+ LINGUAS="${LINGUAS-%UNSET%}"
4955+ ])
4956+])
4957+
4958+dnl Postprocesses a Makefile in a directory containing PO files.
4959+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
4960+[
4961+ # When this code is run, in config.status, two variables have already been
4962+ # set:
4963+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
4964+ # - LINGUAS is the value of the environment variable LINGUAS at configure
4965+ # time.
4966+
4967+changequote(,)dnl
4968+ # Adjust a relative srcdir.
4969+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
4970+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
4971+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
4972+ # In autoconf-2.13 it is called $ac_given_srcdir.
4973+ # In autoconf-2.50 it is called $srcdir.
4974+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
4975+ case "$ac_given_srcdir" in
4976+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
4977+ /*) top_srcdir="$ac_given_srcdir" ;;
4978+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
4979+ esac
4980+
4981+ # Find a way to echo strings without interpreting backslash.
4982+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
4983+ gt_echo='echo'
4984+ else
4985+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
4986+ gt_echo='printf %s\n'
4987+ else
4988+ echo_func () {
4989+ cat <<EOT
4990+$*
4991+EOT
4992+ }
4993+ gt_echo='echo_func'
4994+ fi
4995+ fi
4996+
4997+ # A sed script that extracts the value of VARIABLE from a Makefile.
4998+ sed_x_variable='
4999+# Test if the hold space is empty.
5000+x
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: