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

Proposed by Monty Taylor
Status: Merged
Merged at revision: 902
Proposed branch: lp:~mordred/libmemcached/fix-systemtap
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 2913 lines (+1509/-269)
72 files modified
.bzrignore (+1/-0)
.quickly (+1/-1)
config/autorun.sh (+2/-2)
config/lcov.am (+42/-0)
config/pandora-plugin (+65/-13)
configure.ac (+1/-1)
libmemcached/include.am (+2/-1)
m4/iconv.m4 (+51/-17)
m4/pandora_64bit.m4 (+2/-2)
m4/pandora_bison.m4 (+33/-0)
m4/pandora_canonical.m4 (+177/-12)
m4/pandora_check_compiler_version.m4 (+2/-2)
m4/pandora_check_cxx_standard.m4 (+3/-3)
m4/pandora_compile_stdcxx_0x.m4 (+103/-0)
m4/pandora_cxx_demangle.m4 (+2/-2)
m4/pandora_drizzle_build.m4 (+11/-46)
m4/pandora_enable_dtrace.m4 (+5/-3)
m4/pandora_ensure_gcc_version.m4 (+2/-2)
m4/pandora_extensions.m4 (+2/-2)
m4/pandora_fdatasync.m4 (+2/-2)
m4/pandora_flex.m4 (+33/-0)
m4/pandora_have_better_malloc.m4 (+2/-4)
m4/pandora_have_boost.m4 (+26/-6)
m4/pandora_have_gcc_atomics.m4 (+2/-2)
m4/pandora_have_libavahi.m4 (+2/-2)
m4/pandora_have_libbdb.m4 (+2/-2)
m4/pandora_have_libboost_date_time.m4 (+46/-0)
m4/pandora_have_libboost_filesystem.m4 (+45/-0)
m4/pandora_have_libboost_iostreams.m4 (+49/-0)
m4/pandora_have_libboost_regex.m4 (+54/-0)
m4/pandora_have_libboost_thread.m4 (+54/-0)
m4/pandora_have_libcurl.m4 (+62/-0)
m4/pandora_have_libdl.m4 (+2/-2)
m4/pandora_have_libdrizzle.m4 (+2/-2)
m4/pandora_have_libevent.m4 (+2/-2)
m4/pandora_have_libgearman.m4 (+2/-2)
m4/pandora_have_libgtest.m4 (+3/-0)
m4/pandora_have_libhaildb.m4 (+43/-0)
m4/pandora_have_libldap.m4 (+2/-2)
m4/pandora_have_libmemcached.m4 (+2/-2)
m4/pandora_have_libpcre.m4 (+2/-2)
m4/pandora_have_libpq.m4 (+2/-2)
m4/pandora_have_libreadline.m4 (+2/-2)
m4/pandora_have_libsqlite3.m4 (+2/-2)
m4/pandora_have_libtokyocabinet.m4 (+2/-2)
m4/pandora_have_libuuid.m4 (+2/-2)
m4/pandora_have_libxml2.m4 (+2/-2)
m4/pandora_have_libz.m4 (+2/-2)
m4/pandora_have_protobuf.m4 (+3/-1)
m4/pandora_have_sasl.m4 (+2/-2)
m4/pandora_header_assert.m4 (+2/-2)
m4/pandora_header_stdcxx_98.m4 (+83/-0)
m4/pandora_intltool.m4 (+225/-0)
m4/pandora_libtool.m4 (+2/-2)
m4/pandora_optimize.m4 (+6/-10)
m4/pandora_platform.m4 (+29/-2)
m4/pandora_plugins.m4 (+7/-2)
m4/pandora_print_callstack.m4 (+2/-2)
m4/pandora_python3_devel.m4 (+6/-6)
m4/pandora_run_cpplint.m4 (+2/-2)
m4/pandora_sasl.m4 (+2/-2)
m4/pandora_shared_ptr.m4 (+2/-2)
m4/pandora_vc_build.m4 (+13/-3)
m4/pandora_version.m4 (+2/-2)
m4/pandora_visibility.m4 (+11/-3)
m4/pandora_warnings.m4 (+134/-52)
m4/pandora_with_memcached.m4 (+2/-2)
m4/po.m4 (+5/-5)
m4/progtest.m4 (+7/-7)
tests/mem_functions.c (+1/-1)
unittests/include.am (+1/-1)
unittests/strings.cc (+0/-3)
To merge this branch: bzr merge lp:~mordred/libmemcached/fix-systemtap
Reviewer Review Type Date Requested Status
Libmemcached-developers Pending
Review via email: mp+45743@code.launchpad.net

Description of the change

A stab at fixing the systemtap issue. It's a little ugly due to libtool issues. Sigh. Why doesn't libtool understand extensibility?

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2010-09-14 07:55:39 +0000
3+++ .bzrignore 2011-01-10 19:54:57 +0000
4@@ -185,3 +185,4 @@
5 tests/testplus
6 tests/testudp
7 unittests/unittests
8+config/top.h
9
10=== modified file '.quickly'
11--- .quickly 2010-06-13 16:24:20 +0000
12+++ .quickly 2011-01-10 19:54:57 +0000
13@@ -2,4 +2,4 @@
14 version = 0.4.2
15 template = pandora-build
16 project-type = library
17-pandora-version = 0.134
18+pandora-version = 0.171
19
20=== modified file 'config/autorun.sh'
21--- config/autorun.sh 2010-05-29 17:31:51 +0000
22+++ config/autorun.sh 2011-01-10 19:54:57 +0000
23@@ -1,7 +1,7 @@
24 #!/bin/sh
25 #
26-# Copyright (c) 2006 Jan Kneschke
27-# Copyright (c) 2009 Sun Microsystems
28+# Copyright (C) 2006 Jan Kneschke
29+# Copyright (C) 2009 Sun Microsystems, Inc.
30 # All rights reserved.
31 #
32 # Redistribution and use in source and binary forms, with or without
33
34=== added file 'config/lcov.am'
35--- config/lcov.am 1970-01-01 00:00:00 +0000
36+++ config/lcov.am 2011-01-10 19:54:57 +0000
37@@ -0,0 +1,42 @@
38+# Copyright (C) 2010 Hartmut Holzgraefe
39+#
40+# This program is free software; you can redistribute it and/or modify
41+# it under the terms of the GNU General Public License as published by
42+# the Free Software Foundation; version 2 of the License.
43+#
44+# This program is distributed in the hope that it will be useful,
45+# but WITHOUT ANY WARRANTY; without even the implied warranty of
46+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47+# GNU General Public License for more details.
48+#
49+# You should have received a copy of the GNU General Public License
50+# along with this program; if not, write to the Free Software
51+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
52+
53+LCOV = lcov
54+LCOV_GENHTML = genhtml
55+
56+lcov: lcov-html
57+
58+lcov-test: lcov-clean-data test
59+
60+drizzle_lcov.info: lcov-test
61+ @echo "Generating $@"
62+ $(LCOV) --directory . --capture --base-directory . --output-file $@
63+ $(LCOV) --remove $@ '/usr/include/*' --output-file $@
64+ $(LCOV) --remove $@ '/usr/local/include/*' --output-file $@
65+ @echo
66+
67+lcov-html: drizzle_lcov.info
68+ @echo "Generating lcov HTML"
69+ @$(LCOV_GENHTML) --legend --output-directory lcov_html/ --title "Drizzle Code Coverage" $<
70+
71+lcov-clean:
72+ rm -f drizzle_lcov.info
73+ rm -rf lcov_data/
74+ rm -rf lcov_html/
75+
76+lcov-clean-data:
77+ @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
78+
79+
80
81=== modified file 'config/pandora-plugin'
82--- config/pandora-plugin 2010-05-29 17:31:51 +0000
83+++ config/pandora-plugin 2011-01-10 19:54:57 +0000
84@@ -1,6 +1,6 @@
85 #!/usr/bin/python
86
87-# Copyright (C) 2009 Sun Microsystems
88+# Copyright (C) 2009 Sun Microsystems, Inc.
89 #
90 # This program is free software; you can redistribute it and/or modify
91 # it under the terms of the GNU General Public License as published by
92@@ -25,6 +25,7 @@
93
94 plugin_am_file=None
95 plugin_ac_file=None
96+plugin_doc_index=None
97
98 class ChangeProtectedFile(object):
99
100@@ -130,9 +131,16 @@
101 pkgplugindir=%(pkgplugindir)s
102 EXTRA_DIST = plugin.ini
103
104+noinst_HEADERS=
105+nobase_include_HEADERS=
106+check_PROGRAMS=
107+noinst_LTLIBRARIES=
108+bin_PROGRAMS=
109+
110+
111 """ % plugin)
112 if plugin['headers'] != "":
113- plugin_file.write("noinst_HEADERS = %(headers)s\n" % plugin)
114+ plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin)
115 if plugin['install_headers'] != "":
116 plugin_file.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
117 if plugin['testsuite']:
118@@ -191,8 +199,16 @@
119
120 write_plugin_ac(plugin, plugin_ac_file)
121 write_plugin_am(plugin, plugin_am_file)
122+ write_plugin_docs(plugin, plugin_doc_index)
123 plugin['writing_status'] = 'done'
124
125+def write_plugin_docs(plugin, doc_index):
126+ if plugin['docs'] is not None and os.path.isdir("docs/plugins"):
127+ if not os.path.exists(os.path.join("docs/plugins",plugin["name"])):
128+ os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"]))
129+ doc_index.write("""
130+ %(name)s/index""" % plugin)
131+
132 def write_plugin_ac(plugin, plugin_ac):
133 #
134 # Write plugin config instructions into plugin.ac file.
135@@ -229,8 +245,8 @@
136 ])
137 AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
138 dnl indented wierd to make the help output correct
139-AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(default_yesno)s@:>@])
140-AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable building %(title)s])
141+AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@])
142+AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable loading %(title)s by default.])
143 ],
144 [enable_%(name)s_plugin="$enableval"],
145 [enable_%(name)s_plugin=%(default_yesno)s])
146@@ -271,11 +287,13 @@
147 if plugin['static']:
148 plugin_ac.write("""
149 AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
150- pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
151- pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
152- pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
153+ pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}"
154+ pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}"
155 PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
156 ])
157+ pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
158+ pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
159+ pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
160 """ % plugin)
161
162 else:
163@@ -320,11 +338,14 @@
164 plugin['tests']= fix_file_paths(plugin, plugin['tests'])
165
166 # Make a yes/no version for autoconf help messages
167- if plugin['load_by_default'] or plugin['static']:
168+ if plugin['load_by_default']:
169 plugin['default_yesno']="yes"
170 else:
171 plugin['default_yesno']="no"
172
173+ if plugin.has_key('extra_dist'):
174+ plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
175+
176
177 plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
178 plugin['name_with_dashes']= plugin['name'].replace('_','-')
179@@ -348,18 +369,24 @@
180 return ""
181 return None
182
183+def find_docs(plugin_dir):
184+ if os.path.isfile(os.path.join(plugin_dir, "docs", "index.rst")):
185+ return os.path.join(plugin_dir, "docs")
186+
187 def read_plugin_ini(plugin_dir):
188+ sources_default=""
189 if plugin_dir == ".":
190 plugin_name="**OUT-OF-TREE**"
191+ module_name="**OUT-OF-TREE**"
192 else:
193- short_name=os.path.basename(plugin_dir)
194+ sources_default="%s.cc" % os.path.basename(plugin_dir)
195 plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:]
196 module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator'])
197 plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator'])
198
199
200 plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname'])
201- plugin_defaults= dict(sources="%s.cc" % short_name,
202+ plugin_defaults= dict(sources=sources_default,
203 headers="",
204 install_headers="",
205 cflags="",
206@@ -394,7 +421,6 @@
207 sys.exit(1)
208 if not plugin.has_key('version'):
209 plugin['version'] = config['default_plugin_version']
210-
211 if plugin.has_key('load_by_default'):
212 plugin['load_by_default']=parser.getboolean('plugin','load_by_default')
213 if plugin.has_key('disabled'):
214@@ -404,12 +430,19 @@
215 else:
216 plugin['enabled']="yes"
217 if plugin.has_key('static'):
218- plugin['static']= parser.getboolean('plugin','static')
219+ try:
220+ plugin['static']= parser.getboolean('plugin','static')
221+ except:
222+ if plugin['static'][:5] == os.sys.platform[:5]:
223+ plugin['static']= True
224+ else:
225+ plugin['static']= False
226 if plugin.has_key('install'):
227 plugin['install']= parser.getboolean('plugin','install')
228 if plugin.has_key('testsuite'):
229 if plugin['testsuite'] == 'disable':
230 plugin['testsuite']= False
231+ plugin['dist_testsuite']= find_testsuite(plugin_dir)
232 else:
233 plugin_testsuite= find_testsuite(plugin_dir)
234 plugin['testsuitedir']=plugin_testsuite
235@@ -417,6 +450,7 @@
236 plugin['testsuite']=True
237 else:
238 plugin['testsuite']=False
239+ plugin['docs']= find_docs(plugin_dir)
240
241 plugin['cflags']+= ' ' + config['extra_cflags']
242 plugin['cppflags']+= ' ' + config['extra_cppflags']
243@@ -471,6 +505,8 @@
244 %(rel_path)s/plugin.ini:
245
246 """ % plugin)
247+ if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":
248+ plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)
249 if plugin['headers'] != "":
250 plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
251 if plugin['install_headers'] != "":
252@@ -478,6 +514,10 @@
253 if plugin['testsuite']:
254 if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
255 plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
256+ if plugin.has_key('dist_testsuite') and plugin['dist_testsuite'] != "":
257+ plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin)
258+ if plugin['docs'] is not None:
259+ plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin)
260 if plugin['static']:
261 plugin_am.write("""
262 %(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
263@@ -593,7 +633,6 @@
264 accumulate_plugins,
265 plugin_list)
266
267-
268 if not os.path.exists("config/pandora-plugin.am") or "write" in actions:
269 plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am'))
270 plugin_am_file.write("""
271@@ -624,6 +663,17 @@
272 plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
273 plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
274
275+if os.path.exists("docs/plugins"):
276+ if not os.path.exists("docs/plugins/list.rst") or "write" in actions:
277+ plugin_doc_index = ChangeProtectedFile("docs/plugins/list.rst")
278+ plugin_doc_index.write("""
279+Plugin Documentation
280+====================
281+
282+.. toctree::
283+ :maxdepth: 2
284+""")
285+
286
287 if os.path.exists('plugin.ini'):
288 # Are we in a plugin dir which wants to have a self-sufficient build system?
289@@ -665,3 +715,5 @@
290 plugin_am_file.close()
291 if plugin_ac_file is not None:
292 plugin_ac_file.close()
293+if plugin_doc_index is not None:
294+ plugin_doc_index.close()
295
296=== modified file 'configure.ac'
297--- configure.ac 2010-09-23 05:00:27 +0000
298+++ configure.ac 2011-01-10 19:54:57 +0000
299@@ -11,7 +11,7 @@
300 AC_CONFIG_SRCDIR([libmemcached/memcached.c])
301 AC_CONFIG_AUX_DIR(config)
302
303-PANDORA_CANONICAL_TARGET
304+PANDORA_CANONICAL_TARGET(no-vc-changelog)
305
306 #shared library versioning
307 MEMCACHED_UTIL_LIBRARY_VERSION=1:0:0
308
309=== modified file 'libmemcached/include.am'
310--- libmemcached/include.am 2010-09-14 07:55:39 +0000
311+++ libmemcached/include.am 2011-01-10 19:54:57 +0000
312@@ -161,6 +161,7 @@
313 if DTRACE_NEEDS_OBJECTS
314 libmemcached_libmemcached_la_SOURCES += libmemcached/libmemcached_probes.d
315 libmemcached_libmemcached_la_DEPENDENCIES += libmemcached/libmemcached_probes.o
316+libmemcached_libmemcached_la_LIBADD += libmemcached/libmemcached_probes.o
317 CLEANFILES+= libmemcached/libmemcached_probes.o
318 endif
319
320@@ -172,5 +173,5 @@
321 libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS} config.h
322
323 .d.o:
324- $(DTRACE) $(DTRACEFLAGS) -o libmemcached/libmemcached_probes.o -G -s ${top_srcdir}/libmemcached/libmemcached_probes.d `grep '^pic_object' ${top_builddir}/libmemcached/*.lo | cut -f 2 -d\' | sed "s/^/${top_builddir}\/libmemcached\//"`
325+ $(DTRACE) $(DTRACEFLAGS) -o $@ -G -s $< `grep '^pic_object' ${top_builddir}/libmemcached/*.lo | cut -f 2 -d\' | sed "s/^/${top_builddir}\/libmemcached\//"`
326
327
328=== modified file 'm4/iconv.m4'
329--- m4/iconv.m4 2010-05-29 17:31:51 +0000
330+++ m4/iconv.m4 2011-01-10 19:54:57 +0000
331@@ -1,5 +1,5 @@
332-# iconv.m4 serial AM6 (gettext-0.17)
333-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
334+# iconv.m4 serial 11 (gettext-0.18.1)
335+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
336 dnl This file is free software; the Free Software Foundation
337 dnl gives unlimited permission to copy and/or distribute it,
338 dnl with or without modifications, as long as this notice is preserved.
339@@ -34,7 +34,7 @@
340 am_save_CPPFLAGS="$CPPFLAGS"
341 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
342
343- AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
344+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
345 am_cv_func_iconv="no, consider installing GNU libiconv"
346 am_cv_lib_iconv=no
347 AC_TRY_LINK([#include <stdlib.h>
348@@ -42,7 +42,7 @@
349 [iconv_t cd = iconv_open("","");
350 iconv(cd,NULL,NULL,NULL,NULL);
351 iconv_close(cd);],
352- am_cv_func_iconv=yes)
353+ [am_cv_func_iconv=yes])
354 if test "$am_cv_func_iconv" != yes; then
355 am_save_LIBS="$LIBS"
356 LIBS="$LIBS $LIBICONV"
357@@ -51,14 +51,14 @@
358 [iconv_t cd = iconv_open("","");
359 iconv(cd,NULL,NULL,NULL,NULL);
360 iconv_close(cd);],
361- am_cv_lib_iconv=yes
362- am_cv_func_iconv=yes)
363+ [am_cv_lib_iconv=yes]
364+ [am_cv_func_iconv=yes])
365 LIBS="$am_save_LIBS"
366 fi
367 ])
368 if test "$am_cv_func_iconv" = yes; then
369- AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
370- dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
371+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
372+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
373 am_save_LIBS="$LIBS"
374 if test $am_cv_lib_iconv = yes; then
375 LIBS="$LIBS $LIBICONV"
376@@ -87,6 +87,25 @@
377 return 1;
378 }
379 }
380+ /* Test against Solaris 10 bug: Failures are not distinguishable from
381+ successful returns. */
382+ {
383+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
384+ if (cd_ascii_to_88591 != (iconv_t)(-1))
385+ {
386+ static const char input[] = "\263";
387+ char buf[10];
388+ const char *inptr = input;
389+ size_t inbytesleft = strlen (input);
390+ char *outptr = buf;
391+ size_t outbytesleft = sizeof (buf);
392+ size_t res = iconv (cd_ascii_to_88591,
393+ (char **) &inptr, &inbytesleft,
394+ &outptr, &outbytesleft);
395+ if (res == 0)
396+ return 1;
397+ }
398+ }
399 #if 0 /* This bug could be worked around by the caller. */
400 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
401 {
402@@ -134,7 +153,7 @@
403 am_func_iconv=no am_cv_lib_iconv=no
404 fi
405 if test "$am_func_iconv" = yes; then
406- AC_DEFINE(HAVE_ICONV, 1,
407+ AC_DEFINE([HAVE_ICONV], [1],
408 [Define if you have the iconv() function and it works.])
409 fi
410 if test "$am_cv_lib_iconv" = yes; then
411@@ -147,16 +166,31 @@
412 LIBICONV=
413 LTLIBICONV=
414 fi
415- AC_SUBST(LIBICONV)
416- AC_SUBST(LTLIBICONV)
417+ AC_SUBST([LIBICONV])
418+ AC_SUBST([LTLIBICONV])
419 ])
420
421-AC_DEFUN([AM_ICONV],
422+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
423+dnl avoid warnings like
424+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
425+dnl This is tricky because of the way 'aclocal' is implemented:
426+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
427+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
428+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
429+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
430+dnl warnings.
431+m4_define([gl_iconv_AC_DEFUN],
432+ m4_version_prereq([2.64],
433+ [[AC_DEFUN_ONCE(
434+ [$1], [$2])]],
435+ [[AC_DEFUN(
436+ [$1], [$2])]]))
437+gl_iconv_AC_DEFUN([AM_ICONV],
438 [
439 AM_ICONV_LINK
440 if test "$am_cv_func_iconv" = yes; then
441 AC_MSG_CHECKING([for iconv declaration])
442- AC_CACHE_VAL(am_cv_proto_iconv, [
443+ AC_CACHE_VAL([am_cv_proto_iconv], [
444 AC_TRY_COMPILE([
445 #include <stdlib.h>
446 #include <iconv.h>
447@@ -169,12 +203,12 @@
448 #else
449 size_t iconv();
450 #endif
451-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
452+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
453 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);"])
454 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
455- AC_MSG_RESULT([$]{ac_t:-
456- }[$]am_cv_proto_iconv)
457- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
458+ AC_MSG_RESULT([
459+ $am_cv_proto_iconv])
460+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
461 [Define as const if the declaration of iconv() needs const.])
462 fi
463 ])
464
465=== modified file 'm4/pandora_64bit.m4'
466--- m4/pandora_64bit.m4 2009-09-16 18:36:35 +0000
467+++ m4/pandora_64bit.m4 2011-01-10 19:54:57 +0000
468@@ -1,5 +1,5 @@
469-dnl Copyright (C) 2009 Sun Microsystems
470-dnl This file is free software; Sun Microsystems
471+dnl Copyright (C) 2009 Sun Microsystems, Inc.
472+dnl This file is free software; Sun Microsystems, Inc.
473 dnl gives unlimited permission to copy and/or distribute it,
474 dnl with or without modifications, as long as this notice is preserved.
475
476
477=== added file 'm4/pandora_bison.m4'
478--- m4/pandora_bison.m4 1970-01-01 00:00:00 +0000
479+++ m4/pandora_bison.m4 2011-01-10 19:54:57 +0000
480@@ -0,0 +1,33 @@
481+dnl Copyright (C) 2010 Monty Taylor
482+dnl Copyright (C) 2010 Hartmut Holzgraefe
483+dnl This file is free software; Monty Taylor and Hartmut Holzgraefe
484+dnl give unlimited permission to copy and/or distribute it,
485+dnl with or without modifications, as long as this notice is preserved.
486+
487+AC_DEFUN([_PANDORA_SEARCH_BISON],[
488+
489+ dnl --------------------------------------------------------------------
490+ dnl Check for bison
491+ dnl --------------------------------------------------------------------
492+
493+ AC_CHECK_PROGS([YACC], ['bison -y'], [:])
494+ AS_IF([test "x$YACC" = "x:"],[
495+ pandora_have_bison=no
496+ YACC='if test -f "$@"; then echo "WARNING: no proper bison binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper bison binary found"; exit 1; fi;'
497+ ],[
498+ pandora_have_bison=yes
499+ ])
500+
501+ AM_CONDITIONAL(HAVE_BISON, [test "x${pandora_have_bison}" = "xyes"])
502+])
503+
504+AC_DEFUN([PANDORA_HAVE_BISON],[
505+ AC_REQUIRE([_PANDORA_SEARCH_BISON])
506+])
507+
508+AC_DEFUN([PANDORA_REQUIRE_BISON],[
509+ AC_REQUIRE([PANDORA_HAVE_BISON])
510+ AS_IF([test "x${pandora_have_bison}" = "xno" -a "$pandora_building_from_bzr" = "yes"],
511+ AC_MSG_ERROR(["bison is required for ${PACKAGE} to build from a bzr branch"])
512+ )
513+])
514
515=== modified file 'm4/pandora_canonical.m4'
516--- m4/pandora_canonical.m4 2010-06-13 16:24:20 +0000
517+++ m4/pandora_canonical.m4 2011-01-10 19:54:57 +0000
518@@ -1,10 +1,10 @@
519-dnl Copyright (C) 2009 Sun Microsystems
520-dnl This file is free software; Sun Microsystems
521+dnl Copyright (C) 2009 Sun Microsystems, Inc.
522+dnl This file is free software; Sun Microsystems, Inc.
523 dnl gives unlimited permission to copy and/or distribute it,
524 dnl with or without modifications, as long as this notice is preserved.
525
526 dnl Which version of the canonical setup we're using
527-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.134])
528+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171])
529
530 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
531 AC_ARG_ENABLE([fat-binaries],
532@@ -23,6 +23,12 @@
533 ])
534 ])
535
536+AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[
537+ AS_IF([test "x${prefix}" = "x"],[
538+ AC_MSG_ERROR([--prefix requires an argument])
539+ ])
540+])
541+
542 dnl The standard setup for how we build Pandora projects
543 AC_DEFUN([PANDORA_CANONICAL_TARGET],[
544 AC_REQUIRE([PANDORA_FORCE_DEPEND_TRACKING])
545@@ -32,6 +38,7 @@
546 m4_define([PCT_REQUIRE_CXX],[no])
547 m4_define([PCT_FORCE_GCC42],[no])
548 m4_define([PCT_DONT_SUPPRESS_INCLUDE],[no])
549+ m4_define([PCT_NO_VC_CHANGELOG],[no])
550 m4_define([PCT_VERSION_FROM_VC],[no])
551 m4_define([PCT_USE_VISIBILITY],[yes])
552 m4_foreach([pct_arg],[$*],[
553@@ -52,6 +59,10 @@
554 m4_undefine([PCT_DONT_SUPPRESS_INCLUDE])
555 m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes])
556 ],
557+ [no-vc-changelog], [
558+ m4_undefine([PCT_NO_VC_CHANGELOG])
559+ m4_define([PCT_NO_VC_CHANGELOG],[yes])
560+ ],
561 [version-from-vc], [
562 m4_undefine([PCT_VERSION_FROM_VC])
563 m4_define([PCT_VERSION_FROM_VC],[yes])
564@@ -66,6 +77,8 @@
565 AC_CONFIG_HEADERS([config.h])
566 ])
567
568+ PANDORA_BLOCK_BAD_OPTIONS
569+
570 # We need to prevent canonical target
571 # from injecting -O2 into CFLAGS - but we won't modify anything if we have
572 # set CFLAGS on the command line, since that should take ultimate precedence
573@@ -77,15 +90,17 @@
574 AC_CANONICAL_TARGET
575
576 m4_if(PCT_DONT_SUPRESS_INCLUDE,yes,[
577- AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability subdir-objects foreign)
578+ AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar)
579 ],[
580- AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability nostdinc subdir-objects foreign)
581+ AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability nostdinc subdir-objects foreign tar-ustar)
582 ])
583
584 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
585
586 m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
587 gl_EARLY
588+ ],[
589+ PANDORA_EXTENSIONS
590 ])
591
592 AC_REQUIRE([AC_PROG_CC])
593@@ -94,10 +109,27 @@
594 ])
595 AC_REQUIRE([PANDORA_64BIT])
596
597+ m4_if(PCT_NO_VC_CHANGELOG,yes,[
598+ vc_changelog=no
599+ ],[
600+ vc_changelog=yes
601+ ])
602 m4_if(PCT_VERSION_FROM_VC,yes,[
603 PANDORA_VC_VERSION
604 ],[
605 PANDORA_TEST_VC_DIR
606+
607+ changequote(<<, >>)dnl
608+ PANDORA_RELEASE_ID=`echo $VERSION | sed 's/[^0-9]//g'`
609+ changequote([, ])dnl
610+
611+ PANDORA_RELEASE_COMMENT=""
612+ AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["$VERSION"],
613+ [Version of the software])
614+
615+ AC_SUBST(PANDORA_RELEASE_COMMENT)
616+ AC_SUBST(PANDORA_RELEASE_VERSION)
617+ AC_SUBST(PANDORA_RELEASE_ID)
618 ])
619 PANDORA_VERSION
620
621@@ -121,8 +153,9 @@
622 AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
623 AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
624 ])
625-
626 ])
627+ PANDORA_CXX_CSTDINT
628+ PANDORA_CXX_CINTTYPES
629
630 m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
631 gl_INIT
632@@ -144,6 +177,8 @@
633 AC_SYS_LARGEFILE
634 PANDORA_CLOCK_GETTIME
635
636+ AC_CHECK_HEADERS(sys/socket.h)
637+
638 # off_t is not a builtin type
639 AC_CHECK_SIZEOF(off_t, 4)
640 AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[
641@@ -176,6 +211,25 @@
642 AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
643 ])
644
645+ AC_CACHE_CHECK([if system defines RUSAGE_THREAD], [ac_cv_rusage_thread],[
646+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
647+ [[
648+#include <sys/time.h>
649+#include <sys/resource.h>
650+ ]],[[
651+ int x= RUSAGE_THREAD;
652+ ]])
653+ ],[
654+ ac_cv_rusage_thread=yes
655+ ],[
656+ ac_cv_rusage_thread=no
657+ ])
658+ ])
659+ AS_IF([test "$ac_cv_rusage_thread" = "no"],[
660+ AC_DEFINE([RUSAGE_THREAD], [RUSAGE_SELF],
661+ [Define if system doesn't define])
662+ ])
663+
664 AC_CHECK_LIBM
665 dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
666 AC_SUBST([LIBM])
667@@ -201,11 +255,9 @@
668 PANDORA_HAVE_GCC_ATOMICS
669
670 m4_if(PCT_USE_VISIBILITY,[yes],[
671- dnl We need to inject error into the cflags to test if visibility works or not
672- save_CFLAGS="${CFLAGS}"
673- CFLAGS="${CFLAGS} -Werror"
674- PANDORA_VISIBILITY
675- CFLAGS="${save_CFLAGS}"
676+ PANDORA_ENABLE_VISIBILITY
677+ ],[
678+ PANDORA_CHECK_VISIBILITY
679 ])
680
681 PANDORA_HEADER_ASSERT
682@@ -220,10 +272,37 @@
683 AC_CHECK_PROGS([DOXYGEN], [doxygen])
684 AC_CHECK_PROGS([PERL], [perl])
685 AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
686+ AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
687+ AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
688+
689+ AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
690+ AS_IF([test "x${SPHINXBUILD}" != "x:"],[
691+ AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
692+
693+ ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
694+ AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
695+ [ac_cv_recent_sphinx=no])
696+ rm -rf conftest.d
697+ ])
698+ ])
699
700 AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
701+ AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
702+ AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
703
704- PANDORA_WITH_GETTEXT
705+ m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [
706+ AM_PO_SUBDIRS
707+ IT_PROG_INTLTOOL([0.35],[no-xml])
708+
709+ GETTEXT_PACKAGE=$PACKAGE
710+ AC_CHECK_LIB(intl, libintl_gettext)
711+ AC_SUBST([GETTEXT_PACKAGE])
712+ AS_IF([test "x${USE_NLS}" = "xyes" -a "x${pandora_have_intltool}" = "xyes"],
713+ [AC_DEFINE([ENABLE_NLS],[1],[Turn on language support])
714+ AC_CONFIG_FILES([po/Makefile.in])
715+ ])
716+ ])
717+ AM_CONDITIONAL(BUILD_PO,[test "x${USE_NLS}" = "xyes" -a "x${pandora_have_intltool}" = "xyes"])
718
719 AS_IF([test "x${gl_LIBOBJS}" != "x"],[
720 AS_IF([test "$GCC" = "yes"],[
721@@ -240,6 +319,92 @@
722
723 PANDORA_USE_PIPE
724
725+ AH_TOP([
726+#ifndef __CONFIG_H__
727+#define __CONFIG_H__
728+
729+/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
730+#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
731+#error "You should include config.h as your first include file"
732+#endif
733+
734+#include "config/top.h"
735+])
736+ mkdir -p config
737+ cat > config/top.h.stamp <<EOF_CONFIG_TOP
738+
739+#if defined(i386) && !defined(__i386__)
740+#define __i386__
741+#endif
742+
743+#if defined(_FILE_OFFSET_BITS)
744+# undef _FILE_OFFSET_BITS
745+#endif
746+EOF_CONFIG_TOP
747+
748+ diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
749+ rm -f config/top.h.stamp
750+
751+ AH_BOTTOM([
752+#if defined(__cplusplus)
753+# include CSTDINT_H
754+# include CINTTYPES_H
755+#else
756+# include <stdint.h>
757+# include <inttypes.h>
758+#endif
759+
760+#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
761+# define HAVE_ULONG 1
762+typedef unsigned long int ulong;
763+#endif
764+
765+/* To hide the platform differences between MS Windows and Unix, I am
766+ * going to use the Microsoft way and #define the Microsoft-specific
767+ * functions to the unix way. Microsoft use a separate subsystem for sockets,
768+ * but Unix normally just use a filedescriptor on the same functions. It is
769+ * a lot easier to map back to the unix way with macros than going the other
770+ * way without side effect ;-)
771+ */
772+#ifdef TARGET_OS_WINDOWS
773+#define random() rand()
774+#define srandom(a) srand(a)
775+#define get_socket_errno() WSAGetLastError()
776+#else
777+#define INVALID_SOCKET -1
778+#define SOCKET_ERROR -1
779+#define closesocket(a) close(a)
780+#define get_socket_errno() errno
781+#endif
782+
783+#if defined(__cplusplus)
784+# if defined(DEBUG)
785+# include <cassert>
786+# include <cstddef>
787+# endif
788+template<typename To, typename From>
789+inline To implicit_cast(From const &f) {
790+ return f;
791+}
792+template<typename To, typename From> // use like this: down_cast<T*>(foo);
793+inline To down_cast(From* f) { // so we only accept pointers
794+ // Ensures that To is a sub-type of From *. This test is here only
795+ // for compile-time type checking, and has no overhead in an
796+ // optimized build at run-time, as it will be optimized away
797+ // completely.
798+ if (false) {
799+ implicit_cast<From*, To>(0);
800+ }
801+
802+#if defined(DEBUG)
803+ assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
804+#endif
805+ return static_cast<To>(f);
806+}
807+#endif /* defined(__cplusplus) */
808+
809+#endif /* __CONFIG_H__ */
810+ ])
811
812 AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
813 AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
814
815=== modified file 'm4/pandora_check_compiler_version.m4'
816--- m4/pandora_check_compiler_version.m4 2009-07-08 07:37:38 +0000
817+++ m4/pandora_check_compiler_version.m4 2011-01-10 19:54:57 +0000
818@@ -1,5 +1,5 @@
819-dnl Copyright (C) 2009 Sun Microsystems
820-dnl This file is free software; Sun Microsystems
821+dnl Copyright (C) 2009 Sun Microsystems, Inc.
822+dnl This file is free software; Sun Microsystems, Inc.
823 dnl gives unlimited permission to copy and/or distribute it,
824 dnl with or without modifications, as long as this notice is preserved.
825
826
827=== modified file 'm4/pandora_check_cxx_standard.m4'
828--- m4/pandora_check_cxx_standard.m4 2009-12-18 00:00:02 +0000
829+++ m4/pandora_check_cxx_standard.m4 2011-01-10 19:54:57 +0000
830@@ -1,10 +1,10 @@
831-dnl Copyright (C) 2009 Sun Microsystems
832-dnl This file is free software; Sun Microsystems
833+dnl Copyright (C) 2009 Sun Microsystems, Inc.
834+dnl This file is free software; Sun Microsystems, Inc.
835 dnl gives unlimited permission to copy and/or distribute it,
836 dnl with or without modifications, as long as this notice is preserved.
837
838 AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
839- AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
840+ dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
841 AS_IF([test "$GCC" = "yes"],
842 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
843 [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
844
845=== added file 'm4/pandora_compile_stdcxx_0x.m4'
846--- m4/pandora_compile_stdcxx_0x.m4 1970-01-01 00:00:00 +0000
847+++ m4/pandora_compile_stdcxx_0x.m4 2011-01-10 19:54:57 +0000
848@@ -0,0 +1,103 @@
849+# ===========================================================================
850+# http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html
851+# ===========================================================================
852+#
853+# SYNOPSIS
854+#
855+# AC_CXX_COMPILE_STDCXX_0X
856+#
857+# DESCRIPTION
858+#
859+# Check for baseline language coverage in the compiler for the C++0x
860+# standard.
861+#
862+# LICENSE
863+#
864+# Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com>
865+#
866+# Copying and distribution of this file, with or without modification, are
867+# permitted in any medium without royalty provided the copyright notice
868+# and this notice are preserved.
869+
870+AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [
871+ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
872+ ac_cv_cxx_compile_cxx0x_native,
873+ [AC_LANG_SAVE
874+ AC_LANG_CPLUSPLUS
875+ AC_TRY_COMPILE([
876+ template <typename T>
877+ struct check
878+ {
879+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
880+ };
881+
882+ typedef check<check<bool>> right_angle_brackets;
883+
884+ int a;
885+ decltype(a) b;
886+
887+ typedef check<int> check_type;
888+ check_type c;
889+ check_type&& cr = c;],,
890+ ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
891+ AC_LANG_RESTORE
892+ ])
893+
894+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
895+ ac_cv_cxx_compile_cxx0x_cxx,
896+ [AC_LANG_SAVE
897+ AC_LANG_CPLUSPLUS
898+ ac_save_CXXFLAGS="$CXXFLAGS"
899+ CXXFLAGS="$CXXFLAGS -std=c++0x"
900+ AC_TRY_COMPILE([
901+ template <typename T>
902+ struct check
903+ {
904+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
905+ };
906+
907+ typedef check<check<bool>> right_angle_brackets;
908+
909+ int a;
910+ decltype(a) b;
911+
912+ typedef check<int> check_type;
913+ check_type c;
914+ check_type&& cr = c;],,
915+ ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
916+ CXXFLAGS="$ac_save_CXXFLAGS"
917+ AC_LANG_RESTORE
918+ ])
919+
920+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
921+ ac_cv_cxx_compile_cxx0x_gxx,
922+ [AC_LANG_SAVE
923+ AC_LANG_CPLUSPLUS
924+ ac_save_CXXFLAGS="$CXXFLAGS"
925+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
926+ AC_TRY_COMPILE([
927+ template <typename T>
928+ struct check
929+ {
930+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
931+ };
932+
933+ typedef check<check<bool>> right_angle_brackets;
934+
935+ int a;
936+ decltype(a) b;
937+
938+ typedef check<int> check_type;
939+ check_type c;
940+ check_type&& cr = c;],,
941+ ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
942+ CXXFLAGS="$ac_save_CXXFLAGS"
943+ AC_LANG_RESTORE
944+ ])
945+
946+ if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
947+ test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
948+ test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
949+ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
950+ fi
951+])
952
953=== modified file 'm4/pandora_cxx_demangle.m4'
954--- m4/pandora_cxx_demangle.m4 2009-12-18 00:00:02 +0000
955+++ m4/pandora_cxx_demangle.m4 2011-01-10 19:54:57 +0000
956@@ -1,5 +1,5 @@
957-dnl Copyright (C) 2009 Sun Microsystems
958-dnl This file is free software; Sun Microsystems
959+dnl Copyright (C) 2009 Sun Microsystems, Inc.
960+dnl This file is free software; Sun Microsystems, Inc.
961 dnl gives unlimited permission to copy and/or distribute it,
962 dnl with or without modifications, as long as this notice is preserved.
963
964
965=== modified file 'm4/pandora_drizzle_build.m4'
966--- m4/pandora_drizzle_build.m4 2010-05-29 17:31:51 +0000
967+++ m4/pandora_drizzle_build.m4 2011-01-10 19:54:57 +0000
968@@ -1,5 +1,5 @@
969-dnl Copyright (C) 2009 Sun Microsystems
970-dnl This file is free software; Sun Microsystems
971+dnl Copyright (C) 2009 Sun Microsystems, Inc.
972+dnl This file is free software; Sun Microsystems, Inc.
973 dnl gives unlimited permission to copy and/or distribute it,
974 dnl with or without modifications, as long as this notice is preserved.
975
976@@ -9,11 +9,6 @@
977
978 AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
979
980- PANDORA_HAVE_CXX_UNORDERED
981-
982- PANDORA_CXX_CSTDINT
983- PANDORA_CXX_CINTTYPES
984-
985 AC_STRUCT_TM
986
987 AC_FUNC_ALLOCA
988@@ -38,7 +33,7 @@
989 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
990 AC_CHECK_HEADERS(select.h sys/select.h)
991 AC_CHECK_HEADERS(utime.h sys/utime.h )
992- AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
993+ AC_CHECK_HEADERS(synch.h sys/mman.h)
994 AC_CHECK_HEADERS(sched.h)
995 AC_CHECK_HEADERS(sys/prctl.h)
996 AC_CHECK_HEADERS(execinfo.h)
997@@ -68,45 +63,15 @@
998 ]])
999 AC_CHECK_TYPES([uint, ulong])
1000
1001+ PANDORA_REQUIRE_BISON
1002+
1003 PANDORA_CXX_DEMANGLE
1004 PANDORA_REQUIRE_BOOST([1.38])
1005 PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
1006-
1007-
1008- AH_TOP([
1009-#ifndef __CONFIG_H__
1010-#define __CONFIG_H__
1011-
1012-#include "config/top.h"
1013-])
1014- mkdir -p config
1015- cat > config/top.h.stamp <<EOF_CONFIG_TOP
1016-
1017-#if defined(i386) && !defined(__i386__)
1018-#define __i386__
1019-#endif
1020-
1021-#if defined(_FILE_OFFSET_BITS)
1022-# undef _FILE_OFFSET_BITS
1023-#endif
1024-EOF_CONFIG_TOP
1025- diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
1026- rm -f config/top.h.stamp
1027-
1028-
1029- AH_BOTTOM([
1030-#if defined(__cplusplus)
1031-# include CSTDINT_H
1032-# include CINTTYPES_H
1033-#else
1034-# include <stdint.h>
1035-# include <inttypes.h>
1036-#endif
1037-
1038-#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
1039-typedef unsigned long int ulong;
1040-#endif
1041-
1042-#endif /* __CONFIG_H__ */
1043- ])
1044+ PANDORA_REQUIRE_BOOST_THREAD
1045+ PANDORA_REQUIRE_BOOST_REGEX
1046+ PANDORA_REQUIRE_BOOST_DATE_TIME
1047+ PANDORA_REQUIRE_BOOST_FILESYSTEM
1048+ PANDORA_REQUIRE_BOOST_IOSTREAMS
1049+
1050 ])
1051
1052=== modified file 'm4/pandora_enable_dtrace.m4'
1053--- m4/pandora_enable_dtrace.m4 2010-06-14 15:42:15 +0000
1054+++ m4/pandora_enable_dtrace.m4 2011-01-10 19:54:57 +0000
1055@@ -1,5 +1,5 @@
1056-dnl Copyright (C) 2009 Sun Microsystems
1057-dnl This file is free software; Sun Microsystems
1058+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1059+dnl This file is free software; Sun Microsystems, Inc.
1060 dnl gives unlimited permission to copy and/or distribute it,
1061 dnl with or without modifications, as long as this notice is preserved.
1062
1063@@ -15,7 +15,9 @@
1064
1065 AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
1066 AC_CHECK_PROGS([DTRACE], [dtrace])
1067- AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
1068+ AC_CHECK_HEADERS(sys/sdt.h)
1069+
1070+ AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[
1071
1072 AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
1073 cat >conftest.d <<_ACEOF
1074
1075=== modified file 'm4/pandora_ensure_gcc_version.m4'
1076--- m4/pandora_ensure_gcc_version.m4 2010-05-29 17:31:51 +0000
1077+++ m4/pandora_ensure_gcc_version.m4 2011-01-10 19:54:57 +0000
1078@@ -1,5 +1,5 @@
1079-dnl Copyright (C) 2009 Sun Microsystems
1080-dnl This file is free software; Sun Microsystems
1081+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1082+dnl This file is free software; Sun Microsystems, Inc.
1083 dnl gives unlimited permission to copy and/or distribute it,
1084 dnl with or without modifications, as long as this notice is preserved.
1085
1086
1087=== modified file 'm4/pandora_extensions.m4'
1088--- m4/pandora_extensions.m4 2009-09-16 09:02:26 +0000
1089+++ m4/pandora_extensions.m4 2011-01-10 19:54:57 +0000
1090@@ -1,5 +1,5 @@
1091-dnl Copyright (C) 2009 Sun Microsystems
1092-dnl This file is free software; Sun Microsystems
1093+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1094+dnl This file is free software; Sun Microsystems, Inc.
1095 dnl gives unlimited permission to copy and/or distribute it,
1096 dnl with or without modifications, as long as this notice is preserved.
1097
1098
1099=== modified file 'm4/pandora_fdatasync.m4'
1100--- m4/pandora_fdatasync.m4 2010-05-29 17:31:51 +0000
1101+++ m4/pandora_fdatasync.m4 2011-01-10 19:54:57 +0000
1102@@ -1,5 +1,5 @@
1103-dnl Copyright (C) 2009 Sun Microsystems
1104-dnl This file is free software; Sun Microsystems
1105+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1106+dnl This file is free software; Sun Microsystems, Inc.
1107 dnl gives unlimited permission to copy and/or distribute it,
1108 dnl with or without modifications, as long as this notice is preserved.
1109
1110
1111=== added file 'm4/pandora_flex.m4'
1112--- m4/pandora_flex.m4 1970-01-01 00:00:00 +0000
1113+++ m4/pandora_flex.m4 2011-01-10 19:54:57 +0000
1114@@ -0,0 +1,33 @@
1115+dnl Copyright (C) 2010 Monty Taylor
1116+dnl Copyright (C) 2010 Hartmut Holzgraefe
1117+dnl This file is free software; Monty Taylor and Hartmut Holzgraefe
1118+dnl give unlimited permission to copy and/or distribute it,
1119+dnl with or without modifications, as long as this notice is preserved.
1120+
1121+AC_DEFUN([_PANDORA_SEARCH_FLEX],[
1122+
1123+ dnl --------------------------------------------------------------------
1124+ dnl Check for flex
1125+ dnl --------------------------------------------------------------------
1126+
1127+ AC_CHECK_PROGS([LEX], ['flex'], [:])
1128+ AS_IF([test "x$LEX" = "x:"],[
1129+ pandora_have_flex=no
1130+ LEX='if test -f "$@"; then echo "WARNING: no proper flex binary found, ignoring changes to $<"; exit 0; else echo "ERROR: no proper flex binary found"; exit 1; fi;'
1131+ ],[
1132+ pandora_have_flex=yes
1133+ ])
1134+
1135+ AM_CONDITIONAL(HAVE_FLEX, [test "x${pandora_have_flex}" = "xyes"])
1136+])
1137+
1138+AC_DEFUN([PANDORA_HAVE_FLEX],[
1139+ AC_REQUIRE([_PANDORA_SEARCH_FLEX])
1140+])
1141+
1142+AC_DEFUN([PANDORA_REQUIRE_FLEX],[
1143+ AC_REQUIRE([PANDORA_HAVE_FLEX])
1144+ AS_IF([test "x${pandora_have_flex}" = "xno" -a "$pandora_building_from_bzr" = "yes"],
1145+ AC_MSG_ERROR(["flex is required for ${PACKAGE} to build from a bzr branch"])
1146+ )
1147+])
1148
1149=== modified file 'm4/pandora_have_better_malloc.m4'
1150--- m4/pandora_have_better_malloc.m4 2010-01-13 19:21:11 +0000
1151+++ m4/pandora_have_better_malloc.m4 2011-01-10 19:54:57 +0000
1152@@ -1,11 +1,9 @@
1153-dnl Copyright (C) 2009 Sun Microsystems
1154-dnl This file is free software; Sun Microsystems
1155+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1156+dnl This file is free software; Sun Microsystems, Inc.
1157 dnl gives unlimited permission to copy and/or distribute it,
1158 dnl with or without modifications, as long as this notice is preserved.
1159
1160 AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[
1161- AC_REQUIRE([AC_FUNC_MALLOC])
1162- AC_REQUIRE([AC_FUNC_REALLOC])
1163 AC_REQUIRE([AC_LIB_PREFIX])
1164
1165 AC_ARG_ENABLE([umem],
1166
1167=== modified file 'm4/pandora_have_boost.m4'
1168--- m4/pandora_have_boost.m4 2010-05-29 17:31:51 +0000
1169+++ m4/pandora_have_boost.m4 2011-01-10 19:54:57 +0000
1170@@ -19,11 +19,10 @@
1171 AS_IF([test "x$ac_enable_boost" = "xyes"],[
1172 dnl link against libc because we're just looking for headers here
1173 AC_LANG_PUSH(C++)
1174- AC_LIB_HAVE_LINKFLAGS(c,,[
1175- #include <boost/pool/pool.hpp>
1176- ],[
1177- boost::pool<> test_pool(1);
1178- ])
1179+ AC_LIB_HAVE_LINKFLAGS(c,,
1180+ [#include <boost/pool/pool.hpp>],
1181+ [boost::pool<> test_pool(1);],
1182+ [system])
1183 AC_LANG_POP()
1184 ],[
1185 ac_cv_boost="no"
1186@@ -55,7 +54,28 @@
1187 ac_cv_boost=no
1188 ])
1189 ])
1190-
1191+
1192+ AS_IF([test "x${ac_gcc_profile_mode}" = "xyes"],[
1193+ AC_CACHE_CHECK([if boost is recent enough for GCC Profile Mode],
1194+ [pandora_cv_boost_profile],[
1195+ pandora_need_boost_version=104300
1196+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1197+#include <boost/version.hpp>
1198+
1199+#if BOOST_VERSION < ${pandora_need_boost_version}
1200+# error boost too old!
1201+#endif
1202+ ]],[[]])
1203+ ],[
1204+ pandora_cv_boost_profile=yes
1205+ ],[
1206+ pandora_cv_boost_profile=no
1207+ ])
1208+ ])
1209+ AS_IF([test "x${pandora_cv_boost_profile}" = "xyes"],[
1210+ AC_DEFINE([BOOST_DETAIL_NO_CONTAINER_FWD],[1],[Disable forward decl of stl in boost])
1211+ ])
1212+ ])
1213
1214 AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"])
1215
1216
1217=== modified file 'm4/pandora_have_gcc_atomics.m4'
1218--- m4/pandora_have_gcc_atomics.m4 2010-05-29 17:31:51 +0000
1219+++ m4/pandora_have_gcc_atomics.m4 2011-01-10 19:54:57 +0000
1220@@ -1,5 +1,5 @@
1221-dnl Copyright (C) 2009 Sun Microsystems
1222-dnl This file is free software; Sun Microsystems
1223+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1224+dnl This file is free software; Sun Microsystems, Inc.
1225 dnl gives unlimited permission to copy and/or distribute it,
1226 dnl with or without modifications, as long as this notice is preserved.
1227
1228
1229=== modified file 'm4/pandora_have_libavahi.m4'
1230--- m4/pandora_have_libavahi.m4 2009-12-02 02:57:53 +0000
1231+++ m4/pandora_have_libavahi.m4 2011-01-10 19:54:57 +0000
1232@@ -1,5 +1,5 @@
1233-dnl Copyright (C) 2009 Sun Microsystems
1234-dnl This file is free software; Sun Microsystems
1235+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1236+dnl This file is free software; Sun Microsystems, Inc.
1237 dnl gives unlimited permission to copy and/or distribute it,
1238 dnl with or without modifications, as long as this notice is preserved.
1239
1240
1241=== modified file 'm4/pandora_have_libbdb.m4'
1242--- m4/pandora_have_libbdb.m4 2009-12-02 02:57:53 +0000
1243+++ m4/pandora_have_libbdb.m4 2011-01-10 19:54:57 +0000
1244@@ -1,5 +1,5 @@
1245-dnl Copyright (C) 2009 Sun Microsystems
1246-dnl This file is free software; Sun Microsystems
1247+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1248+dnl This file is free software; Sun Microsystems, Inc.
1249 dnl gives unlimited permission to copy and/or distribute it,
1250 dnl with or without modifications, as long as this notice is preserved.
1251
1252
1253=== added file 'm4/pandora_have_libboost_date_time.m4'
1254--- m4/pandora_have_libboost_date_time.m4 1970-01-01 00:00:00 +0000
1255+++ m4/pandora_have_libboost_date_time.m4 2011-01-10 19:54:57 +0000
1256@@ -0,0 +1,46 @@
1257+dnl Copyright (C) 2010 Monty Taylor
1258+dnl This file is free software; Monty Taylor
1259+dnl gives unlimited permission to copy and/or distribute it,
1260+dnl with or without modifications, as long as this notice is preserved.
1261+
1262+AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[
1263+ AC_REQUIRE([AC_LIB_PREFIX])
1264+ AC_REQUIRE([ACX_PTHREAD])
1265+
1266+ dnl --------------------------------------------------------------------
1267+ dnl Check for Boost.Date_Time
1268+ dnl --------------------------------------------------------------------
1269+
1270+ AC_LANG_PUSH(C++)
1271+ AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[
1272+ #include <boost/date_time.hpp>
1273+ ],[
1274+ boost::gregorian::date weekstart(2002,2,1);
1275+ ])
1276+ AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[
1277+ AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[
1278+ #include <boost/date_time.hpp>
1279+ ],[
1280+ boost::gregorian::date weekstart(2002,2,1);
1281+ ])
1282+ ])
1283+ AC_LANG_POP()
1284+
1285+ AM_CONDITIONAL(HAVE_BOOST_DATE_TIME,
1286+ [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"])
1287+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}"
1288+ AC_SUBST(BOOST_LIBS)
1289+])
1290+
1291+AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[
1292+ PANDORA_HAVE_BOOST($1)
1293+ _PANDORA_SEARCH_BOOST_DATE_TIME($1)
1294+])
1295+
1296+AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[
1297+ PANDORA_REQUIRE_BOOST($1)
1298+ _PANDORA_SEARCH_BOOST_DATE_TIME($1)
1299+ AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"],
1300+ AC_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}]))
1301+])
1302+
1303
1304=== added file 'm4/pandora_have_libboost_filesystem.m4'
1305--- m4/pandora_have_libboost_filesystem.m4 1970-01-01 00:00:00 +0000
1306+++ m4/pandora_have_libboost_filesystem.m4 2011-01-10 19:54:57 +0000
1307@@ -0,0 +1,45 @@
1308+dnl Copyright (C) 2010 Monty Taylor
1309+dnl This file is free software; Monty Taylor
1310+dnl gives unlimited permission to copy and/or distribute it,
1311+dnl with or without modifications, as long as this notice is preserved.
1312+
1313+AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[
1314+ AC_REQUIRE([AC_LIB_PREFIX])
1315+
1316+ dnl --------------------------------------------------------------------
1317+ dnl Check for Boost.Filesystem
1318+ dnl --------------------------------------------------------------------
1319+
1320+ AC_LANG_PUSH(C++)
1321+ AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,boost_system-mt,[
1322+ #include <boost/filesystem.hpp>
1323+ ],[
1324+ boost::filesystem::path my_path("some_dir/file.txt");
1325+ ])
1326+ AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[
1327+ AC_LIB_HAVE_LINKFLAGS(boost_filesystem,boost_system,[
1328+ #include <boost/filesystem.hpp>
1329+ ],[
1330+ boost::filesystem::path my_path("some_dir/file.txt");
1331+ ])
1332+ ])
1333+ AC_LANG_POP()
1334+
1335+ AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
1336+ [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
1337+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
1338+ AC_SUBST(BOOST_LIBS)
1339+])
1340+
1341+AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[
1342+ PANDORA_HAVE_BOOST($1)
1343+ _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
1344+])
1345+
1346+AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[
1347+ PANDORA_REQUIRE_BOOST($1)
1348+ _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
1349+ AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"],
1350+ AC_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}]))
1351+])
1352+
1353
1354=== added file 'm4/pandora_have_libboost_iostreams.m4'
1355--- m4/pandora_have_libboost_iostreams.m4 1970-01-01 00:00:00 +0000
1356+++ m4/pandora_have_libboost_iostreams.m4 2011-01-10 19:54:57 +0000
1357@@ -0,0 +1,49 @@
1358+dnl Copyright (C) 2010 Andrew Hutchings
1359+dnl This file is free software; Andrew Hutchings
1360+dnl gives unlimited permission to copy and/or distribute it,
1361+dnl with or without modifications, as long as this notice is preserved.
1362+
1363+AC_DEFUN([_PANDORA_SEARCH_BOOST_IOSTREAMS],[
1364+ AC_REQUIRE([AC_LIB_PREFIX])
1365+
1366+ dnl --------------------------------------------------------------------
1367+ dnl Check for Boost.Iostreams
1368+ dnl --------------------------------------------------------------------
1369+
1370+ AC_LANG_PUSH(C++)
1371+ AC_LIB_HAVE_LINKFLAGS(boost_iostreams-mt,,[
1372+ #include <boost/iostreams/stream.hpp>
1373+ #include <boost/iostreams/device/array.hpp>
1374+ ],[
1375+ const char* input= "hello world";
1376+ boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
1377+ ])
1378+ AS_IF([test "x${ac_cv_libboost_iostreams_mt}" = "xno"],[
1379+ AC_LIB_HAVE_LINKFLAGS(boost_iostreams,,[
1380+ #include <boost/iostreams/stream.hpp>
1381+ #include <boost/iostreams/device/array.hpp>
1382+ ],[
1383+ const char* input= "hello world";
1384+ boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
1385+ ])
1386+ ])
1387+ AC_LANG_POP()
1388+
1389+ AM_CONDITIONAL(HAVE_BOOST_IOSTREAMS,
1390+ [test "x${ac_cv_libboost_iostreams}" = "xyes" -o "x${ac_cv_libboost_iostreams_mt}" = "xyes"])
1391+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_IOSTREAMS_MT} ${LTLIBBOOST_IOSTREAMS}"
1392+ AC_SUBST(BOOST_LIBS)
1393+])
1394+
1395+AC_DEFUN([PANDORA_HAVE_BOOST_IOSTREAMS],[
1396+ PANDORA_HAVE_BOOST($1)
1397+ _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
1398+])
1399+
1400+AC_DEFUN([PANDORA_REQUIRE_BOOST_IOSTREAMS],[
1401+ PANDORA_REQUIRE_BOOST($1)
1402+ _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
1403+ AS_IF([test "x${ac_cv_libboost_iostreams}" = "xno" -a "x${ac_cv_libboost_iostreams_mt}" = "xno"],
1404+ AC_MSG_ERROR([Boost.Iostreams is required for ${PACKAGE}]))
1405+])
1406+
1407
1408=== added file 'm4/pandora_have_libboost_regex.m4'
1409--- m4/pandora_have_libboost_regex.m4 1970-01-01 00:00:00 +0000
1410+++ m4/pandora_have_libboost_regex.m4 2011-01-10 19:54:57 +0000
1411@@ -0,0 +1,54 @@
1412+dnl Copyright (C) 2010 Andrew Hutchings
1413+dnl This file is free software; Andrew Hutchings
1414+dnl gives unlimited permission to copy and/or distribute it,
1415+dnl with or without modifications, as long as this notice is preserved.
1416+
1417+AC_DEFUN([_PANDORA_SEARCH_BOOST_REGEX],[
1418+ AC_REQUIRE([AC_LIB_PREFIX])
1419+ AC_REQUIRE([ACX_PTHREAD])
1420+
1421+ dnl --------------------------------------------------------------------
1422+ dnl Check for boost::regex
1423+ dnl --------------------------------------------------------------------
1424+
1425+ save_CFLAGS="${CFLAGS}"
1426+ save_CXXFLAGS="${CXXFLAGS}"
1427+ CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
1428+ CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
1429+
1430+ AC_LANG_PUSH(C++)
1431+ AC_LIB_HAVE_LINKFLAGS(boost_regex-mt,,[
1432+ #include <boost/regex.hpp>
1433+ ],[
1434+ boost::regex test_regex("drizzle");
1435+ ])
1436+ AS_IF([test "x${ac_cv_libboost_regex_mt}" = "xno"],[
1437+ AC_LIB_HAVE_LINKFLAGS(boost_regex,,[
1438+ #include <boost/regex.hpp>
1439+ ],[
1440+ boost::regex test_regex("drizzle");
1441+ ])
1442+ ])
1443+ AC_LANG_POP()
1444+ CFLAGS="${save_CFLAGS}"
1445+ CXXFLAGS="${save_CXXFLAGS}"
1446+
1447+
1448+ AM_CONDITIONAL(HAVE_BOOST_REGEX,
1449+ [test "x${ac_cv_libboost_regex}" = "xyes" -o "x${ac_cv_libboost_regex_mt}" = "xyes"])
1450+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_REGEX_MT} ${LTLIBBOOST_REGEX}"
1451+ AC_SUBST(BOOST_LIBS)
1452+])
1453+
1454+AC_DEFUN([PANDORA_HAVE_BOOST_REGEX],[
1455+ PANDORA_HAVE_BOOST($1)
1456+ _PANDORA_SEARCH_BOOST_REGEX($1)
1457+])
1458+
1459+AC_DEFUN([PANDORA_REQUIRE_BOOST_REGEX],[
1460+ PANDORA_REQUIRE_BOOST($1)
1461+ _PANDORA_SEARCH_BOOST_REGEX($1)
1462+ AS_IF([test "x${ac_cv_libboost_regex}" = "xno" -a "x${ac_cv_libboost_regex_mt}" = "xno"],
1463+ AC_MSG_ERROR([boost::regex is required for ${PACKAGE}]))
1464+])
1465+
1466
1467=== added file 'm4/pandora_have_libboost_thread.m4'
1468--- m4/pandora_have_libboost_thread.m4 1970-01-01 00:00:00 +0000
1469+++ m4/pandora_have_libboost_thread.m4 2011-01-10 19:54:57 +0000
1470@@ -0,0 +1,54 @@
1471+dnl Copyright (C) 2010 Monty Taylor
1472+dnl This file is free software; Monty Taylor
1473+dnl gives unlimited permission to copy and/or distribute it,
1474+dnl with or without modifications, as long as this notice is preserved.
1475+
1476+AC_DEFUN([_PANDORA_SEARCH_BOOST_THREAD],[
1477+ AC_REQUIRE([AC_LIB_PREFIX])
1478+ AC_REQUIRE([ACX_PTHREAD])
1479+
1480+ dnl --------------------------------------------------------------------
1481+ dnl Check for boost::thread
1482+ dnl --------------------------------------------------------------------
1483+
1484+ save_CFLAGS="${CFLAGS}"
1485+ save_CXXFLAGS="${CXXFLAGS}"
1486+ CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
1487+ CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
1488+
1489+ AC_LANG_PUSH(C++)
1490+ AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[
1491+ #include <boost/thread.hpp>
1492+ ],[
1493+ boost::thread id;
1494+ ])
1495+ AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[
1496+ AC_LIB_HAVE_LINKFLAGS(boost_thread,,[
1497+ #include <boost/thread.hpp>
1498+ ],[
1499+ boost::thread id;
1500+ ])
1501+ ])
1502+ AC_LANG_POP()
1503+ CFLAGS="${save_CFLAGS}"
1504+ CXXFLAGS="${save_CXXFLAGS}"
1505+
1506+
1507+ AM_CONDITIONAL(HAVE_BOOST_THREAD,
1508+ [test "x${ac_cv_libboost_thread}" = "xyes" -o "x${ac_cv_libboost_thread_mt}" = "xyes"])
1509+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_THREAD_MT} ${LTLIBBOOST_THREAD}"
1510+ AC_SUBST(BOOST_LIBS)
1511+])
1512+
1513+AC_DEFUN([PANDORA_HAVE_BOOST_THREAD],[
1514+ PANDORA_HAVE_BOOST($1)
1515+ _PANDORA_SEARCH_BOOST_THREAD($1)
1516+])
1517+
1518+AC_DEFUN([PANDORA_REQUIRE_BOOST_THREAD],[
1519+ PANDORA_REQUIRE_BOOST($1)
1520+ _PANDORA_SEARCH_BOOST_THREAD($1)
1521+ AS_IF([test "x${ac_cv_libboost_thread}" = "xno" -a "x${ac_cv_libboost_thread_mt}" = "xno"],
1522+ AC_MSG_ERROR([boost::thread is required for ${PACKAGE}]))
1523+])
1524+
1525
1526=== added file 'm4/pandora_have_libcurl.m4'
1527--- m4/pandora_have_libcurl.m4 1970-01-01 00:00:00 +0000
1528+++ m4/pandora_have_libcurl.m4 2011-01-10 19:54:57 +0000
1529@@ -0,0 +1,62 @@
1530+dnl Copyright (C) 2010 Monty Taylor
1531+dnl This file is free software; Monty Taylor
1532+dnl gives unlimited permission to copy and/or distribute it,
1533+dnl with or without modifications, as long as this notice is preserved.
1534+
1535+AC_DEFUN([_PANDORA_SEARCH_LIBCURL],[
1536+ AC_REQUIRE([AC_LIB_PREFIX])
1537+
1538+ dnl --------------------------------------------------------------------
1539+ dnl Check for libcurl
1540+ dnl --------------------------------------------------------------------
1541+
1542+ AC_ARG_ENABLE([libcurl],
1543+ [AS_HELP_STRING([--disable-libcurl],
1544+ [Build with libcurl support @<:@default=on@:>@])],
1545+ [ac_enable_libcurl="$enableval"],
1546+ [ac_enable_libcurl="yes"])
1547+
1548+ AS_IF([test "x$ac_enable_libcurl" = "xyes"],[
1549+ AC_LIB_HAVE_LINKFLAGS(curl,,
1550+ [#include <curl/curl.h>],
1551+ [
1552+ CURL *handle;
1553+ handle=curl_easy_init();
1554+ ])
1555+ ],[
1556+ ac_cv_libcurl="no"
1557+ ])
1558+
1559+ AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
1560+ [pandora_cv_curl_have_username],[
1561+ AC_COMPILE_IFELSE([
1562+ AC_LANG_PROGRAM(
1563+ [[
1564+ CURL *handle;
1565+ handle=curl_easy_init();
1566+ rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
1567+ ]])],
1568+ [pandora_cv_curl_have_username=yes],
1569+ [pandora_cv_curl_have_username=no])
1570+ ])
1571+
1572+ AM_CONDITIONAL(HAVE_LIBCURL,[test "x${ac_cv_libcurl}" = "xyes"])
1573+ AS_IF([test "x$pandora_cv_curl_have_username" = "xyes"],
1574+ AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
1575+ [Does libcurl provide the CURLOPT_USERNAME constant]))
1576+
1577+])
1578+
1579+AC_DEFUN([PANDORA_HAVE_LIBCURL],[
1580+ AC_REQUIRE([_PANDORA_SEARCH_LIBCURL])
1581+ AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
1582+ AC_MSG_WARN([libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel.])
1583+ ])
1584+])
1585+
1586+AC_DEFUN([PANDORA_REQUIRE_LIBCURL],[
1587+ PANDORA_HAVE_LIBCURL($1)
1588+ AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
1589+ AC_MSG_ERROR([libcurl is required for ${PACKAGE}])
1590+ ])
1591+])
1592
1593=== modified file 'm4/pandora_have_libdl.m4'
1594--- m4/pandora_have_libdl.m4 2010-01-13 19:21:11 +0000
1595+++ m4/pandora_have_libdl.m4 2011-01-10 19:54:57 +0000
1596@@ -1,5 +1,5 @@
1597-dnl Copyright (C) 2009 Sun Microsystems
1598-dnl This file is free software; Sun Microsystems
1599+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1600+dnl This file is free software; Sun Microsystems, Inc.
1601 dnl gives unlimited permission to copy and/or distribute it,
1602 dnl with or without modifications, as long as this notice is preserved.
1603
1604
1605=== modified file 'm4/pandora_have_libdrizzle.m4'
1606--- m4/pandora_have_libdrizzle.m4 2010-05-29 17:31:51 +0000
1607+++ m4/pandora_have_libdrizzle.m4 2011-01-10 19:54:57 +0000
1608@@ -1,5 +1,5 @@
1609-dnl Copyright (C) 2009 Sun Microsystems
1610-dnl This file is free software; Sun Microsystems
1611+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1612+dnl This file is free software; Sun Microsystems, Inc.
1613 dnl gives unlimited permission to copy and/or distribute it,
1614 dnl with or without modifications, as long as this notice is preserved.
1615
1616
1617=== modified file 'm4/pandora_have_libevent.m4'
1618--- m4/pandora_have_libevent.m4 2009-12-02 20:48:39 +0000
1619+++ m4/pandora_have_libevent.m4 2011-01-10 19:54:57 +0000
1620@@ -1,5 +1,5 @@
1621-dnl Copyright (C) 2009 Sun Microsystems
1622-dnl This file is free software; Sun Microsystems
1623+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1624+dnl This file is free software; Sun Microsystems, Inc.
1625 dnl gives unlimited permission to copy and/or distribute it,
1626 dnl with or without modifications, as long as this notice is preserved.
1627
1628
1629=== modified file 'm4/pandora_have_libgearman.m4'
1630--- m4/pandora_have_libgearman.m4 2009-12-02 02:57:53 +0000
1631+++ m4/pandora_have_libgearman.m4 2011-01-10 19:54:57 +0000
1632@@ -1,5 +1,5 @@
1633-dnl Copyright (C) 2009 Sun Microsystems
1634-dnl This file is free software; Sun Microsystems
1635+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1636+dnl This file is free software; Sun Microsystems, Inc.
1637 dnl gives unlimited permission to copy and/or distribute it,
1638 dnl with or without modifications, as long as this notice is preserved.
1639
1640
1641=== modified file 'm4/pandora_have_libgtest.m4'
1642--- m4/pandora_have_libgtest.m4 2010-05-29 17:31:51 +0000
1643+++ m4/pandora_have_libgtest.m4 2011-01-10 19:54:57 +0000
1644@@ -18,6 +18,8 @@
1645
1646 AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
1647 AC_LANG_PUSH(C++)
1648+ save_CXXFLAGS="${CXXFLAGS}"
1649+ CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
1650 AC_LIB_HAVE_LINKFLAGS(gtest,,[
1651 #include <gtest/gtest.h>
1652 TEST(pandora_test_libgtest, PandoraTest)
1653@@ -25,6 +27,7 @@
1654 ASSERT_EQ(1, 1);
1655 }
1656 ],[])
1657+ CXXFLAGS="${save_CXXFLAGS}"
1658 AC_LANG_POP()
1659 ],[
1660 ac_cv_libgtest="no"
1661
1662=== added file 'm4/pandora_have_libhaildb.m4'
1663--- m4/pandora_have_libhaildb.m4 1970-01-01 00:00:00 +0000
1664+++ m4/pandora_have_libhaildb.m4 2011-01-10 19:54:57 +0000
1665@@ -0,0 +1,43 @@
1666+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1667+dnl This file is free software; Sun Microsystems, Inc.
1668+dnl gives unlimited permission to copy and/or distribute it,
1669+dnl with or without modifications, as long as this notice is preserved.
1670+
1671+AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[
1672+ AC_REQUIRE([AC_LIB_PREFIX])
1673+
1674+ dnl --------------------------------------------------------------------
1675+ dnl Check for libhaildb
1676+ dnl --------------------------------------------------------------------
1677+
1678+ AC_ARG_ENABLE([libhaildb],
1679+ [AS_HELP_STRING([--disable-libhaildb],
1680+ [Build with libhaildb support @<:@default=on@:>@])],
1681+ [ac_enable_libhaildb="$enableval"],
1682+ [ac_enable_libhaildb="yes"])
1683+
1684+
1685+ AS_IF([test "x$ac_enable_libhaildb" = "xyes"],[
1686+ AC_LIB_HAVE_LINKFLAGS(haildb,,[
1687+ #include <haildb.h>
1688+ ],[
1689+ ib_set_panic_handler(NULL);
1690+ ])
1691+ AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
1692+ AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
1693+ ])
1694+ ],[
1695+ ac_cv_libhaildb="no"
1696+ ])
1697+ AM_CONDITIONAL(HAVE_LIBHAILDB, [test "x${ac_cv_libhaildb}" = "xyes"])
1698+])
1699+
1700+AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[
1701+ AC_REQUIRE([_PANDORA_SEARCH_LIBHAILDB])
1702+])
1703+
1704+AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[
1705+ AC_REQUIRE([PANDORA_HAVE_LIBHAILDB])
1706+ AS_IF([test "x${ac_cv_libhaildb}" = "xno"],
1707+ AC_MSG_ERROR([libhaildb 2.2.0 or later is required for ${PACKAGE}]))
1708+])
1709
1710=== modified file 'm4/pandora_have_libldap.m4'
1711--- m4/pandora_have_libldap.m4 2010-05-29 17:31:51 +0000
1712+++ m4/pandora_have_libldap.m4 2011-01-10 19:54:57 +0000
1713@@ -1,5 +1,5 @@
1714-dnl Copyright (C) 2009 Sun Microsystems
1715-dnl This file is free software; Sun Microsystems
1716+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1717+dnl This file is free software; Sun Microsystems, Inc.
1718 dnl gives unlimited permission to copy and/or distribute it,
1719 dnl with or without modifications, as long as this notice is preserved.
1720
1721
1722=== modified file 'm4/pandora_have_libmemcached.m4'
1723--- m4/pandora_have_libmemcached.m4 2010-05-29 17:31:51 +0000
1724+++ m4/pandora_have_libmemcached.m4 2011-01-10 19:54:57 +0000
1725@@ -1,5 +1,5 @@
1726-dnl Copyright (C) 2009 Sun Microsystems
1727-dnl This file is free software; Sun Microsystems
1728+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1729+dnl This file is free software; Sun Microsystems, Inc.
1730 dnl gives unlimited permission to copy and/or distribute it,
1731 dnl with or without modifications, as long as this notice is preserved.
1732
1733
1734=== modified file 'm4/pandora_have_libpcre.m4'
1735--- m4/pandora_have_libpcre.m4 2009-12-02 02:57:53 +0000
1736+++ m4/pandora_have_libpcre.m4 2011-01-10 19:54:57 +0000
1737@@ -1,5 +1,5 @@
1738-dnl Copyright (C) 2009 Sun Microsystems
1739-dnl This file is free software; Sun Microsystems
1740+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1741+dnl This file is free software; Sun Microsystems, Inc.
1742 dnl gives unlimited permission to copy and/or distribute it,
1743 dnl with or without modifications, as long as this notice is preserved.
1744
1745
1746=== modified file 'm4/pandora_have_libpq.m4'
1747--- m4/pandora_have_libpq.m4 2009-08-10 21:04:49 +0000
1748+++ m4/pandora_have_libpq.m4 2011-01-10 19:54:57 +0000
1749@@ -1,5 +1,5 @@
1750-dnl Copyright (C) 2009 Sun Microsystems
1751-dnl This file is free software; Sun Microsystems
1752+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1753+dnl This file is free software; Sun Microsystems, Inc.
1754 dnl gives unlimited permission to copy and/or distribute it,
1755 dnl with or without modifications, as long as this notice is preserved.
1756
1757
1758=== modified file 'm4/pandora_have_libreadline.m4'
1759--- m4/pandora_have_libreadline.m4 2009-12-18 00:00:02 +0000
1760+++ m4/pandora_have_libreadline.m4 2011-01-10 19:54:57 +0000
1761@@ -56,8 +56,8 @@
1762 #
1763 # COPYLEFT
1764 #
1765-# Copyright (c) 2009 Monty Taylor
1766-# Copyright (c) 2002 Ville Laurikari <vl@iki.fi>
1767+# Copyright (C) 2009 Monty Taylor
1768+# Copyright (C) 2002 Ville Laurikari <vl@iki.fi>
1769 #
1770 # Copying and distribution of this file, with or without
1771 # modification, are permitted in any medium without royalty provided
1772
1773=== modified file 'm4/pandora_have_libsqlite3.m4'
1774--- m4/pandora_have_libsqlite3.m4 2009-08-10 21:04:49 +0000
1775+++ m4/pandora_have_libsqlite3.m4 2011-01-10 19:54:57 +0000
1776@@ -1,5 +1,5 @@
1777-dnl Copyright (C) 2009 Sun Microsystems
1778-dnl This file is free software; Sun Microsystems
1779+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1780+dnl This file is free software; Sun Microsystems, Inc.
1781 dnl gives unlimited permission to copy and/or distribute it,
1782 dnl with or without modifications, as long as this notice is preserved.
1783
1784
1785=== modified file 'm4/pandora_have_libtokyocabinet.m4'
1786--- m4/pandora_have_libtokyocabinet.m4 2010-05-29 17:31:51 +0000
1787+++ m4/pandora_have_libtokyocabinet.m4 2011-01-10 19:54:57 +0000
1788@@ -1,5 +1,5 @@
1789-dnl Copyright (C) 2009 Sun Microsystems
1790-dnl This file is free software; Sun Microsystems
1791+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1792+dnl This file is free software; Sun Microsystems, Inc.
1793 dnl gives unlimited permission to copy and/or distribute it,
1794 dnl with or without modifications, as long as this notice is preserved.
1795
1796
1797=== modified file 'm4/pandora_have_libuuid.m4'
1798--- m4/pandora_have_libuuid.m4 2009-12-02 02:57:53 +0000
1799+++ m4/pandora_have_libuuid.m4 2011-01-10 19:54:57 +0000
1800@@ -1,5 +1,5 @@
1801-dnl Copyright (C) 2009 Sun Microsystems
1802-dnl This file is free software; Sun Microsystems
1803+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1804+dnl This file is free software; Sun Microsystems, Inc.
1805 dnl gives unlimited permission to copy and/or distribute it,
1806 dnl with or without modifications, as long as this notice is preserved.
1807
1808
1809=== modified file 'm4/pandora_have_libxml2.m4'
1810--- m4/pandora_have_libxml2.m4 2009-12-02 02:57:53 +0000
1811+++ m4/pandora_have_libxml2.m4 2011-01-10 19:54:57 +0000
1812@@ -1,5 +1,5 @@
1813-dnl Copyright (C) 2009 Sun Microsystems
1814-dnl This file is free software; Sun Microsystems
1815+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1816+dnl This file is free software; Sun Microsystems, Inc.
1817 dnl gives unlimited permission to copy and/or distribute it,
1818 dnl with or without modifications, as long as this notice is preserved.
1819
1820
1821=== modified file 'm4/pandora_have_libz.m4'
1822--- m4/pandora_have_libz.m4 2009-12-02 02:57:53 +0000
1823+++ m4/pandora_have_libz.m4 2011-01-10 19:54:57 +0000
1824@@ -1,5 +1,5 @@
1825-dnl Copyright (C) 2009 Sun Microsystems
1826-dnl This file is free software; Sun Microsystems
1827+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1828+dnl This file is free software; Sun Microsystems, Inc.
1829 dnl gives unlimited permission to copy and/or distribute it,
1830 dnl with or without modifications, as long as this notice is preserved.
1831
1832
1833=== modified file 'm4/pandora_have_protobuf.m4'
1834--- m4/pandora_have_protobuf.m4 2009-10-01 23:48:09 +0000
1835+++ m4/pandora_have_protobuf.m4 2011-01-10 19:54:57 +0000
1836@@ -23,7 +23,9 @@
1837 [#include <google/protobuf/descriptor.h>],
1838 [google::protobuf::FileDescriptor* file;],
1839 [system])
1840- CXXFLAGS="${save_CXXFLAGS}"
1841+ CXXFLAGS="${PTHREAD_CFLAGS} ${save_CXXFLAGS}"
1842+ LIBPROTOBUF="${LIBPROTOBUF} ${PTHREAD_LIBS}"
1843+ LTLIBPROTOBUF="${LTLIBPROTOBUF} ${PTHREAD_LIBS}"
1844 AC_LANG_POP()
1845 ])
1846
1847
1848=== modified file 'm4/pandora_have_sasl.m4'
1849--- m4/pandora_have_sasl.m4 2010-03-03 10:50:13 +0000
1850+++ m4/pandora_have_sasl.m4 2011-01-10 19:54:57 +0000
1851@@ -1,5 +1,5 @@
1852-dnl Copyright (C) 2009 Sun Microsystems
1853-dnl This file is free software; Sun Microsystems
1854+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1855+dnl This file is free software; Sun Microsystems, Inc.
1856 dnl gives unlimited permission to copy and/or distribute it,
1857 dnl with or without modifications, as long as this notice is preserved.
1858
1859
1860=== modified file 'm4/pandora_header_assert.m4'
1861--- m4/pandora_header_assert.m4 2009-12-02 20:48:39 +0000
1862+++ m4/pandora_header_assert.m4 2011-01-10 19:54:57 +0000
1863@@ -1,5 +1,5 @@
1864-dnl Copyright (C) 2009 Sun Microsystems
1865-dnl This file is free software; Sun Microsystems
1866+dnl Copyright (C) 2009 Sun Microsystems, Inc.
1867+dnl This file is free software; Sun Microsystems, Inc.
1868 dnl gives unlimited permission to copy and/or distribute it,
1869 dnl with or without modifications, as long as this notice is preserved.
1870
1871
1872=== added file 'm4/pandora_header_stdcxx_98.m4'
1873--- m4/pandora_header_stdcxx_98.m4 1970-01-01 00:00:00 +0000
1874+++ m4/pandora_header_stdcxx_98.m4 2011-01-10 19:54:57 +0000
1875@@ -0,0 +1,83 @@
1876+# ===========================================================================
1877+# http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html
1878+# ===========================================================================
1879+#
1880+# SYNOPSIS
1881+#
1882+# AC_CXX_HEADER_STDCXX_98
1883+#
1884+# DESCRIPTION
1885+#
1886+# Check for complete library coverage of the C++1998/2003 standard.
1887+#
1888+# LICENSE
1889+#
1890+# Copyright (C) 2008 Benjamin Kosnik <bkoz@redhat.com>
1891+#
1892+# Copying and distribution of this file, with or without modification, are
1893+# permitted in any medium without royalty provided the copyright notice
1894+# and this notice are preserved.
1895+
1896+AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [
1897+ AC_CACHE_CHECK(for ISO C++ 98 include files,
1898+ ac_cv_cxx_stdcxx_98,
1899+ [AC_LANG_SAVE
1900+ AC_LANG_CPLUSPLUS
1901+ AC_TRY_COMPILE([
1902+ #include <cassert>
1903+ #include <cctype>
1904+ #include <cerrno>
1905+ #include <cfloat>
1906+ #include <ciso646>
1907+ #include <climits>
1908+ #include <clocale>
1909+ #include <cmath>
1910+ #include <csetjmp>
1911+ #include <csignal>
1912+ #include <cstdarg>
1913+ #include <cstddef>
1914+ #include <cstdio>
1915+ #include <cstdlib>
1916+ #include <cstring>
1917+ #include <ctime>
1918+
1919+ #include <algorithm>
1920+ #include <bitset>
1921+ #include <complex>
1922+ #include <deque>
1923+ #include <exception>
1924+ #include <fstream>
1925+ #include <functional>
1926+ #include <iomanip>
1927+ #include <ios>
1928+ #include <iosfwd>
1929+ #include <iostream>
1930+ #include <istream>
1931+ #include <iterator>
1932+ #include <limits>
1933+ #include <list>
1934+ #include <locale>
1935+ #include <map>
1936+ #include <memory>
1937+ #include <new>
1938+ #include <numeric>
1939+ #include <ostream>
1940+ #include <queue>
1941+ #include <set>
1942+ #include <sstream>
1943+ #include <stack>
1944+ #include <stdexcept>
1945+ #include <streambuf>
1946+ #include <string>
1947+ #include <typeinfo>
1948+ #include <utility>
1949+ #include <valarray>
1950+ #include <vector>
1951+ ],,
1952+ ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
1953+ AC_LANG_RESTORE
1954+ ])
1955+ if test "$ac_cv_cxx_stdcxx_98" = yes; then
1956+ AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
1957+ fi
1958+])
1959
1960=== added file 'm4/pandora_intltool.m4'
1961--- m4/pandora_intltool.m4 1970-01-01 00:00:00 +0000
1962+++ m4/pandora_intltool.m4 2011-01-10 19:54:57 +0000
1963@@ -0,0 +1,225 @@
1964+## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
1965+## Copyright (C) 2001 Eazel, Inc.
1966+## Author: Maciej Stachowiak <mjs@noisehavoc.org>
1967+## Kenneth Christiansen <kenneth@gnu.org>
1968+##
1969+## This program is free software; you can redistribute it and/or modify
1970+## it under the terms of the GNU General Public License as published by
1971+## the Free Software Foundation; either version 2 of the License, or
1972+## (at your option) any later version.
1973+##
1974+## This program is distributed in the hope that it will be useful, but
1975+## WITHOUT ANY WARRANTY; without even the implied warranty of
1976+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1977+## General Public License for more details.
1978+##
1979+## You should have received a copy of the GNU General Public License
1980+## along with this program; if not, write to the Free Software
1981+## Foundation, Inc., 51 Franklin Place - Suite 330, Boston, MA 02110-1301, USA.
1982+##
1983+## As a special exception to the GNU General Public License, if you
1984+## distribute this file as part of a program that contains a
1985+## configuration script generated by Autoconf, you may include it under
1986+## the same distribution terms that you use for the rest of that program.
1987+
1988+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1989+# serial 40 IT_PROG_INTLTOOL
1990+AC_DEFUN([IT_PROG_INTLTOOL], [
1991+AC_PREREQ([2.50])dnl
1992+AC_REQUIRE([AM_NLS])dnl
1993+
1994+case "$am__api_version" in
1995+ 1.[01234])
1996+ AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1997+ ;;
1998+ *)
1999+ ;;
2000+esac
2001+
2002+if test -n "$1"; then
2003+ AC_MSG_CHECKING([for intltool >= $1])
2004+
2005+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
2006+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
2007+ [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
2008+ ]
2009+ AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
2010+ AS_IF([test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"],[
2011+ pandora_have_intltool=yes
2012+ ],[
2013+ pandora_have_intltool=no
2014+ AC_MSG_WARN([Your intltool is too old. You need intltool $1 or later.])
2015+ ])
2016+fi
2017+AC_CHECK_HEADERS([libintl.h])
2018+AS_IF([test "x${ac_cv_header_libintl_h}" = "xfalse" -o "x${ac_cv_header_libintl_h}" = "xno"],[
2019+ pandora_have_intltool=no
2020+])
2021+
2022+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
2023+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
2024+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
2025+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
2026+ AC_MSG_WARN([The intltool scripts were not found. Please install intltool.])
2027+ AC_MSG_WARN([On Debian: apt-get install intltool. On Redhat: yum install intltool])
2028+fi
2029+
2030+ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2031+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2032+ INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2033+ INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2034+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
2035+ INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2036+ INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2037+ INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2038+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2039+ INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2040+ INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2041+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
2042+ INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2043+ INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2044+ INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2045+ INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2046+ INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2047+ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2048+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
2049+
2050+_IT_SUBST(INTLTOOL_DESKTOP_RULE)
2051+_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
2052+_IT_SUBST(INTLTOOL_KEYS_RULE)
2053+_IT_SUBST(INTLTOOL_PROP_RULE)
2054+_IT_SUBST(INTLTOOL_OAF_RULE)
2055+_IT_SUBST(INTLTOOL_PONG_RULE)
2056+_IT_SUBST(INTLTOOL_SERVER_RULE)
2057+_IT_SUBST(INTLTOOL_SHEET_RULE)
2058+_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
2059+_IT_SUBST(INTLTOOL_UI_RULE)
2060+_IT_SUBST(INTLTOOL_XAM_RULE)
2061+_IT_SUBST(INTLTOOL_KBD_RULE)
2062+_IT_SUBST(INTLTOOL_XML_RULE)
2063+_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
2064+_IT_SUBST(INTLTOOL_CAVES_RULE)
2065+_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
2066+_IT_SUBST(INTLTOOL_THEME_RULE)
2067+_IT_SUBST(INTLTOOL_SERVICE_RULE)
2068+_IT_SUBST(INTLTOOL_POLICY_RULE)
2069+
2070+# Check the gettext tools to make sure they are GNU
2071+AC_PATH_PROG(XGETTEXT, xgettext)
2072+AC_PATH_PROG(MSGMERGE, msgmerge)
2073+AC_PATH_PROG(MSGFMT, msgfmt)
2074+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2075+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
2076+ AC_MSG_WARN([GNU gettext tools not found; required for intltool])
2077+fi
2078+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
2079+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
2080+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
2081+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
2082+ AC_MSG_WARN([GNU gettext tools not found; required for intltool])
2083+fi
2084+
2085+AC_PATH_PROG(INTLTOOL_PERL, perl)
2086+if test -z "$INTLTOOL_PERL"; then
2087+ AC_MSG_WARN([perl not found])
2088+fi
2089+AC_MSG_CHECKING([for perl >= 5.8.1])
2090+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
2091+if test $? -ne 0; then
2092+ AC_MSG_WARN([perl 5.8.1 is required for intltool])
2093+else
2094+ IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
2095+ AC_MSG_RESULT([$IT_PERL_VERSION])
2096+fi
2097+if test "x$2" != "xno-xml"; then
2098+ AC_MSG_CHECKING([for XML::Parser])
2099+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
2100+ AC_MSG_RESULT([ok])
2101+ else
2102+ AC_MSG_WARN([XML::Parser perl module is required for intltool])
2103+ fi
2104+fi
2105+
2106+# Substitute ALL_LINGUAS so we can use it in po/Makefile
2107+AC_SUBST(ALL_LINGUAS)
2108+
2109+# Set DATADIRNAME correctly if it is not set yet
2110+# (copied from glib-gettext.m4)
2111+if test -z "$DATADIRNAME"; then
2112+ AC_LINK_IFELSE(
2113+ [AC_LANG_PROGRAM([[]],
2114+ [[extern int _nl_msg_cat_cntr;
2115+ return _nl_msg_cat_cntr]])],
2116+ [DATADIRNAME=share],
2117+ [case $host in
2118+ *-*-solaris*)
2119+ dnl On Solaris, if bind_textdomain_codeset is in libc,
2120+ dnl GNU format message catalog is always supported,
2121+ dnl since both are added to the libc all together.
2122+ dnl Hence, we'd like to go with DATADIRNAME=share
2123+ dnl in this case.
2124+ AC_CHECK_FUNC(bind_textdomain_codeset,
2125+ [DATADIRNAME=share], [DATADIRNAME=lib])
2126+ ;;
2127+ *)
2128+ [DATADIRNAME=lib]
2129+ ;;
2130+ esac])
2131+fi
2132+AC_SUBST(DATADIRNAME)
2133+
2134+IT_PO_SUBDIR([po])
2135+])
2136+
2137+
2138+# IT_PO_SUBDIR(DIRNAME)
2139+# ---------------------
2140+# All po subdirs have to be declared with this macro; the subdir "po" is
2141+# declared by IT_PROG_INTLTOOL.
2142+#
2143+AC_DEFUN([IT_PO_SUBDIR],
2144+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
2145+dnl
2146+dnl The following CONFIG_COMMANDS should be exetuted at the very end
2147+dnl of config.status.
2148+AC_CONFIG_COMMANDS_PRE([
2149+ AC_CONFIG_COMMANDS([$1/stamp-it], [
2150+ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
2151+ AC_MSG_WARN([$1/Makefile.in.in was not created by intltoolize.])
2152+ else
2153+ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
2154+ >"$1/stamp-it.tmp"
2155+ [sed '/^#/d
2156+ s/^[[].*] *//
2157+ /^[ ]*$/d
2158+ '"s|^| $ac_top_srcdir/|" \
2159+ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
2160+ ]
2161+ [sed '/^POTFILES =/,/[^\\]$/ {
2162+ /^POTFILES =/!d
2163+ r $1/POTFILES
2164+ }
2165+ ' "$1/Makefile.in" >"$1/Makefile"]
2166+ rm -f "$1/Makefile.tmp"
2167+ mv "$1/stamp-it.tmp" "$1/stamp-it"
2168+ fi
2169+ ])
2170+])dnl
2171+])
2172+
2173+# _IT_SUBST(VARIABLE)
2174+# -------------------
2175+# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
2176+#
2177+AC_DEFUN([_IT_SUBST],
2178+[
2179+AC_SUBST([$1])
2180+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
2181+]
2182+)
2183+
2184+# deprecated macros
2185+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
2186+# A hint is needed for aclocal from Automake <= 1.9.4:
2187+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
2188+
2189
2190=== modified file 'm4/pandora_libtool.m4'
2191--- m4/pandora_libtool.m4 2009-12-18 00:00:02 +0000
2192+++ m4/pandora_libtool.m4 2011-01-10 19:54:57 +0000
2193@@ -1,5 +1,5 @@
2194-dnl Copyright (C) 2009 Sun Microsystems
2195-dnl This file is free software; Sun Microsystems
2196+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2197+dnl This file is free software; Sun Microsystems, Inc.
2198 dnl gives unlimited permission to copy and/or distribute it,
2199 dnl with or without modifications, as long as this notice is preserved.
2200
2201
2202=== modified file 'm4/pandora_optimize.m4'
2203--- m4/pandora_optimize.m4 2010-01-02 04:59:12 +0000
2204+++ m4/pandora_optimize.m4 2011-01-10 19:54:57 +0000
2205@@ -1,5 +1,5 @@
2206-dnl Copyright (C) 2009 Sun Microsystems
2207-dnl This file is free software; Sun Microsystems
2208+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2209+dnl This file is free software; Sun Microsystems, Inc.
2210 dnl gives unlimited permission to copy and/or distribute it,
2211 dnl with or without modifications, as long as this notice is preserved.
2212
2213@@ -22,25 +22,21 @@
2214 dnl with using AC_CC_STD_C99 above
2215 CC="${CC} -std=gnu99"
2216
2217- AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}"
2218+ AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
2219
2220 DEBUG_CFLAGS="-O0"
2221 DEBUG_CXXFLAGS="-O0"
2222
2223- OPTIMIZE_CFLAGS="-O3"
2224- OPTIMIZE_CXXFLAGS="-O3"
2225+ OPTIMIZE_CFLAGS="-O2"
2226+ OPTIMIZE_CXXFLAGS="-O2"
2227 ])
2228 AS_IF([test "$INTELCC" = "yes"],[
2229- dnl Once we can use a modern autoconf, we can replace the std=gnu99 here
2230- dnl with using AC_CC_STD_C99 above
2231- CC="${CC} -std=c99"
2232-
2233 AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
2234
2235 DEBUG_CFLAGS="-O0"
2236 DEBUG_CXXFLAGS="-O0"
2237
2238- OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static"
2239+ OPTIMIZE_CFLAGS="-xHOST -O2 -no-prec-div -static"
2240 OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}"
2241
2242 ])
2243
2244=== modified file 'm4/pandora_platform.m4'
2245--- m4/pandora_platform.m4 2010-05-29 17:31:51 +0000
2246+++ m4/pandora_platform.m4 2011-01-10 19:54:57 +0000
2247@@ -23,7 +23,7 @@
2248
2249
2250 case "$host_os" in
2251- *solaris*|*freebsd*)
2252+ *solaris*)
2253 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
2254 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2255 ])
2256@@ -32,6 +32,15 @@
2257 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
2258 ])
2259 ;;
2260+ *freebsd*)
2261+ AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
2262+ CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include"
2263+ ])
2264+
2265+ AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
2266+ LDFLAGS="${LDFLAGS} -L/usr/local/lib"
2267+ ])
2268+ ;;
2269 esac
2270
2271 PANDORA_OPTIMIZE_BITFIELD=1
2272@@ -50,6 +59,7 @@
2273 *solaris*)
2274 TARGET_SOLARIS="true"
2275 PANDORA_OPTIMIZE_BITFIELD=0
2276+ AS_IF([test "x${USE_NLS}" = "xyes"],[LIBS="${LIBS} -lintl"])
2277 AC_SUBST(TARGET_SOLARIS)
2278 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
2279 ;;
2280@@ -59,9 +69,26 @@
2281 AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD])
2282 AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])
2283 ;;
2284- *)
2285+ *mingw32*)
2286+ TARGET_WINDOWS="true"
2287+ AC_SUBST(TARGET_WINDOWS)
2288+ AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows])
2289+ AC_DEFINE([WINVER], [WindowsXP], [Version of Windows])
2290+ AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work])
2291+ AC_DEFINE([EAI_SYSTEM], [11], [Another magical number])
2292+ AH_BOTTOM([
2293+#ifndef HAVE_SYS_SOCKET_H
2294+# define SHUT_RD SD_RECEIVE
2295+# define SHUT_WR SD_SEND
2296+# define SHUT_RDWR SD_BOTH
2297+#endif
2298+ ])
2299+
2300+ LIBS="$LIBS -lwsock32 -lws2_32"
2301+ AM_CFLAGS="${AM_CFLAGS} -I\${top_srcdir}/win32/mingw -I\${top_builddir}/win32/mingw -I\${top_srcdir}/win32 -I\${top_builddir}/win32"
2302 ;;
2303 esac
2304+ AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"])
2305
2306 AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
2307
2308
2309=== modified file 'm4/pandora_plugins.m4'
2310--- m4/pandora_plugins.m4 2010-05-29 17:31:51 +0000
2311+++ m4/pandora_plugins.m4 2011-01-10 19:54:57 +0000
2312@@ -1,5 +1,5 @@
2313-dnl Copyright (C) 2009 Sun Microsystems
2314-dnl This file is free software; Sun Microsystems
2315+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2316+dnl This file is free software; Sun Microsystems, Inc.
2317 dnl gives unlimited permission to copy and/or distribute it,
2318 dnl with or without modifications, as long as this notice is preserved.
2319 dnl--------------------------------------------------------------------
2320@@ -25,9 +25,14 @@
2321 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
2322 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
2323 pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'`
2324+ pandora_builtin_load_list=`echo $pandora_builtin_load_list | sed 's/, *$//'`
2325+ pandora_builtin_load_symbols_list=`echo $pandora_builtin_load_symbols_list | sed 's/, *$//'`
2326 AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL")
2327+ AS_IF([test "x$pandora_builtin_load_symbols_list" = "x"], pandora_builtin_load_symbols_list="NULL")
2328 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
2329 AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list])
2330+ AC_SUBST([PANDORA_BUILTIN_LOAD_LIST],[$pandora_builtin_load_list])
2331+ AC_SUBST([PANDORA_BUILTIN_LOAD_SYMBOLS_LIST],[$pandora_builtin_load_symbols_list])
2332 AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
2333 m4_ifval(m4_normalize([$1]),[
2334 AC_CONFIG_FILES($*)
2335
2336=== modified file 'm4/pandora_print_callstack.m4'
2337--- m4/pandora_print_callstack.m4 2009-12-05 13:11:26 +0000
2338+++ m4/pandora_print_callstack.m4 2011-01-10 19:54:57 +0000
2339@@ -1,5 +1,5 @@
2340-dnl Copyright (C) 2009 Sun Microsystems
2341-dnl This file is free software; Sun Microsystems
2342+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2343+dnl This file is free software; Sun Microsystems, Inc.
2344 dnl gives unlimited permission to copy and/or distribute it,
2345 dnl with or without modifications, as long as this notice is preserved.
2346
2347
2348=== modified file 'm4/pandora_python3_devel.m4'
2349--- m4/pandora_python3_devel.m4 2009-09-16 09:02:26 +0000
2350+++ m4/pandora_python3_devel.m4 2011-01-10 19:54:57 +0000
2351@@ -4,12 +4,12 @@
2352 dnl pandora-build: A pedantic build system
2353 dnl
2354 dnl Copyright (C) 2009 Sun Microsystems, Inc.
2355-dnl Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
2356-dnl Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2357-dnl Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
2358-dnl Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
2359-dnl Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org>
2360-dnl Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org>
2361+dnl Copyright (C) 2008 Sebastian Huber <sebastian-huber@web.de>
2362+dnl Copyright (C) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2363+dnl Copyright (C) 2008 Rafael Laboissiere <rafael@laboissiere.net>
2364+dnl Copyright (C) 2008 Andrew Collier <colliera@ukzn.ac.za>
2365+dnl Copyright (C) 2008 Matteo Settenvini <matteo@member.fsf.org>
2366+dnl Copyright (C) 2008 Horst Knorr <hk_classes@knoda.org>
2367 dnl
2368 dnl This program is free software: you can redistribute it and/or modify it
2369 dnl under the terms of the GNU General Public License as published by the
2370
2371=== modified file 'm4/pandora_run_cpplint.m4'
2372--- m4/pandora_run_cpplint.m4 2009-12-02 02:57:53 +0000
2373+++ m4/pandora_run_cpplint.m4 2011-01-10 19:54:57 +0000
2374@@ -1,5 +1,5 @@
2375-dnl Copyright (C) 2009 Sun Microsystems
2376-dnl This file is free software; Sun Microsystems
2377+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2378+dnl This file is free software; Sun Microsystems, Inc.
2379 dnl gives unlimited permission to copy and/or distribute it,
2380 dnl with or without modifications, as long as this notice is preserved.
2381
2382
2383=== modified file 'm4/pandora_sasl.m4'
2384--- m4/pandora_sasl.m4 2010-05-29 17:31:51 +0000
2385+++ m4/pandora_sasl.m4 2011-01-10 19:54:57 +0000
2386@@ -1,5 +1,5 @@
2387-dnl Copyright (C) 2009 Sun Microsystems
2388-dnl This file is free software; Sun Microsystems
2389+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2390+dnl This file is free software; Sun Microsystems, Inc.
2391 dnl gives unlimited permission to copy and/or distribute it,
2392 dnl with or without modifications, as long as this notice is preserved.
2393
2394
2395=== modified file 'm4/pandora_shared_ptr.m4'
2396--- m4/pandora_shared_ptr.m4 2009-12-18 00:00:02 +0000
2397+++ m4/pandora_shared_ptr.m4 2011-01-10 19:54:57 +0000
2398@@ -1,5 +1,5 @@
2399-dnl Copyright (C) 2009 Sun Microsystems
2400-dnl This file is free software; Sun Microsystems
2401+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2402+dnl This file is free software; Sun Microsystems, Inc.
2403 dnl gives unlimited permission to copy and/or distribute it,
2404 dnl with or without modifications, as long as this notice is preserved.
2405
2406
2407=== modified file 'm4/pandora_vc_build.m4'
2408--- m4/pandora_vc_build.m4 2010-05-29 17:31:51 +0000
2409+++ m4/pandora_vc_build.m4 2011-01-10 19:54:57 +0000
2410@@ -1,5 +1,5 @@
2411-dnl Copyright (C) 2009 Sun Microsystems
2412-dnl This file is free software; Sun Microsystems
2413+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2414+dnl This file is free software; Sun Microsystems, Inc.
2415 dnl gives unlimited permission to copy and/or distribute it,
2416 dnl with or without modifications, as long as this notice is preserved.
2417
2418@@ -36,7 +36,14 @@
2419 ])
2420
2421 AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
2422- m4_syscmd(PANDORA_TEST_VC_DIR [
2423+ m4_syscmd(PANDORA_TEST_VC_DIR
2424+ m4_if(PCT_NO_VC_CHANGELOG,yes,[
2425+ vc_changelog=no
2426+ ],[
2427+ vc_changelog=yes
2428+ ])
2429+
2430+ [
2431
2432 PANDORA_RELEASE_DATE=`date +%Y.%m`
2433 PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
2434@@ -53,6 +60,9 @@
2435 PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
2436 PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
2437 PANDORA_VC_BRANCH=`bzr nick`
2438+ if test "x${vc_changelog}" = "xyes"; then
2439+ bzr log --gnu > ChangeLog
2440+ fi
2441 fi
2442 fi
2443
2444
2445=== modified file 'm4/pandora_version.m4'
2446--- m4/pandora_version.m4 2009-12-02 22:04:02 +0000
2447+++ m4/pandora_version.m4 2011-01-10 19:54:57 +0000
2448@@ -1,5 +1,5 @@
2449-dnl Copyright (C) 2009 Sun Microsystems
2450-dnl This file is free software; Sun Microsystems
2451+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2452+dnl This file is free software; Sun Microsystems, Inc.
2453 dnl gives unlimited permission to copy and/or distribute it,
2454 dnl with or without modifications, as long as this notice is preserved.
2455
2456
2457=== modified file 'm4/pandora_visibility.m4'
2458--- m4/pandora_visibility.m4 2010-01-02 04:59:12 +0000
2459+++ m4/pandora_visibility.m4 2011-01-10 19:54:57 +0000
2460@@ -20,17 +20,16 @@
2461 dnl Set the variable CFLAG_VISIBILITY.
2462 dnl Defines and sets the variable HAVE_VISIBILITY.
2463
2464-AC_DEFUN([PANDORA_VISIBILITY],
2465+AC_DEFUN([PANDORA_CHECK_VISIBILITY],
2466 [
2467 AC_REQUIRE([AC_PROG_CC])
2468- AC_REQUIRE([PANDORA_PLATFORM])
2469 CFLAG_VISIBILITY=
2470 HAVE_VISIBILITY=0
2471 AS_IF([test -n "$GCC"],[
2472 AC_MSG_CHECKING([for simple visibility declarations])
2473 AC_CACHE_VAL([gl_cv_cc_visibility], [
2474 gl_save_CFLAGS="$CFLAGS"
2475- CFLAGS="$CFLAGS -fvisibility=hidden"
2476+ CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
2477 AC_TRY_COMPILE(
2478 [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
2479 extern __attribute__((__visibility__("default"))) int exportedvar;
2480@@ -43,15 +42,24 @@
2481 AC_MSG_RESULT([$gl_cv_cc_visibility])
2482 if test $gl_cv_cc_visibility = yes; then
2483 CFLAG_VISIBILITY="-fvisibility=hidden"
2484+ NO_VISIBILITY="-fvisibility=default"
2485 HAVE_VISIBILITY=1
2486 fi
2487 ])
2488 AS_IF([test "x$SUNCC" = "xyes"],[
2489 CFLAG_VISIBILITY="-xldscope=hidden"
2490+ NO_VISIBILITY="-xldscope=global"
2491 HAVE_VISIBILITY=1
2492 ])
2493 AC_SUBST([CFLAG_VISIBILITY])
2494+ AC_SUBST([NO_VISIBILITY])
2495 AC_SUBST([HAVE_VISIBILITY])
2496 AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
2497 [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
2498 ])
2499+
2500+AC_DEFUN([PANDORA_ENABLE_VISIBILITY],[
2501+ AC_REQUIRE([PANDORA_CHECK_VISIBILITY])
2502+ AM_CFLAGS="${AM_CFLAGS} ${CFLAG_VISIBILITY}"
2503+ AM_CXXFLAGS="${AM_CXXFLAGS} ${CFLAG_VISIBILITY}"
2504+])
2505
2506=== modified file 'm4/pandora_warnings.m4'
2507--- m4/pandora_warnings.m4 2010-06-29 22:04:05 +0000
2508+++ m4/pandora_warnings.m4 2011-01-10 19:54:57 +0000
2509@@ -1,5 +1,5 @@
2510-dnl Copyright (C) 2009 Sun Microsystems
2511-dnl This file is free software; Sun Microsystems
2512+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2513+dnl This file is free software; Sun Microsystems, Inc.
2514 dnl gives unlimited permission to copy and/or distribute it,
2515 dnl with or without modifications, as long as this notice is preserved.
2516
2517@@ -34,6 +34,12 @@
2518 [ac_cv_warnings_as_errors=yes],
2519 [ac_cv_warnings_as_errors=no]))
2520
2521+ AC_ARG_ENABLE([gcc-profile-mode],
2522+ [AS_HELP_STRING([--enable-gcc-profile-mode],
2523+ [Toggle gcc profile mode @<:@default=off@:>@])],
2524+ [ac_gcc_profile_mode="$enableval"],
2525+ [ac_gcc_profile_mode="no"])
2526+
2527 AC_ARG_ENABLE([profiling],
2528 [AS_HELP_STRING([--enable-profiling],
2529 [Toggle profiling @<:@default=off@:>@])],
2530@@ -87,69 +93,47 @@
2531 F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
2532 ])
2533
2534- AC_CACHE_CHECK([whether it is safe to use -Wconversion],
2535- [ac_cv_safe_to_use_wconversion_],
2536+ AC_CACHE_CHECK([whether it is safe to use -floop-parallelize-all],
2537+ [ac_cv_safe_to_use_floop_parallelize_all_],
2538 [save_CFLAGS="$CFLAGS"
2539- dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
2540- dnl conversion warnings to all the tarball folks
2541- CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
2542+ CFLAGS="-floop-parallelize-all ${AM_CFLAGS} ${CFLAGS}"
2543 AC_COMPILE_IFELSE(
2544- [AC_LANG_PROGRAM([[
2545-#include <stdbool.h>
2546-void foo(bool a)
2547-{
2548- (void)a;
2549-}
2550- ]],[[
2551-foo(0);
2552- ]])],
2553- [ac_cv_safe_to_use_wconversion_=yes],
2554- [ac_cv_safe_to_use_wconversion_=no])
2555+ [AC_LANG_PROGRAM([],[])],
2556+ [ac_cv_safe_to_use_floop_parallelize_all_=yes],
2557+ [ac_cv_safe_to_use_floop_parallelize_all_=no])
2558 CFLAGS="$save_CFLAGS"])
2559
2560- AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"],
2561- [W_CONVERSION="-Wconversion"
2562- AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons],
2563- [ac_cv_safe_to_use_Wconversion_],
2564- [save_CFLAGS="$CFLAGS"
2565- dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
2566- dnl conversion warnings to all the tarball folks
2567- CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
2568- AC_COMPILE_IFELSE(
2569- [AC_LANG_PROGRAM(
2570- [[
2571-#include <netinet/in.h>
2572- ]],[[
2573-uint16_t x= htons(80);
2574- ]])],
2575- [ac_cv_safe_to_use_Wconversion_=yes],
2576- [ac_cv_safe_to_use_Wconversion_=no])
2577- CFLAGS="$save_CFLAGS"])
2578-
2579- AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"],
2580- [NO_CONVERSION="-Wno-conversion"])
2581- ])
2582+ AS_IF([test "$ac_cv_safe_to_use_floop_parallelize_all_" = "yes"],
2583+ [
2584+ F_LOOP_PARALLELIZE_ALL="-floop-parallelize-all"
2585+ ])
2586
2587 NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing"
2588 NO_SHADOW="-Wno-shadow"
2589
2590 AS_IF([test "$INTELCC" = "yes"],[
2591 m4_if(PW_LESS_WARNINGS,[no],[
2592- BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual"
2593+ BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188"
2594 ],[
2595- BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981"
2596+ dnl 2203 is like old-style-cast
2597+ dnl 1684 is like strict-aliasing
2598+ dnl 188 is about using enums as bitfields
2599+ dnl 1683 is a warning about _EXPLICIT_ casting, which we want
2600+ BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188,981,2259,2203,1683,1684"
2601 ])
2602 CC_WARNINGS="${BASE_WARNINGS}"
2603 CXX_WARNINGS="${BASE_WARNINGS}"
2604+ PROTOSKIP_WARNINGS="-diag-disable 188,981,967,2259,1683,1684,2203"
2605+
2606 ],[
2607 m4_if(PW_LESS_WARNINGS,[no],[
2608- BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"
2609+ BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing"
2610 CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
2611- CXX_WARNINGS_FULL="-Wold-style-cast"
2612+ CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"
2613 NO_OLD_STYLE_CAST="-Wno-old-style-cast"
2614 NO_EFF_CXX="-Wno-effc++"
2615 ],[
2616- BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}"
2617+ BASE_WARNINGS_FULL="${NO_STRICT_ALIASING}"
2618 ])
2619
2620 AS_IF([test "${ac_cv_assert}" = "no"],
2621@@ -169,11 +153,87 @@
2622 [ac_cv_safe_to_use_Wextra_=no])
2623 CFLAGS="$save_CFLAGS"])
2624
2625- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
2626+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
2627 AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
2628 [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
2629 [BASE_WARNINGS="${BASE_WARNINGS} -W"])
2630
2631+ AC_CACHE_CHECK([whether it is safe to use -Wformat],
2632+ [ac_cv_safe_to_use_wformat_],
2633+ [save_CFLAGS="$CFLAGS"
2634+ dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
2635+ dnl conversion warnings to all the tarball folks
2636+ CFLAGS="-Wformat -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
2637+ AC_COMPILE_IFELSE(
2638+ [AC_LANG_PROGRAM([[
2639+#include <stdio.h>
2640+#include <stdint.h>
2641+#include <inttypes.h>
2642+void foo();
2643+void foo()
2644+{
2645+ uint64_t test_u= 0;
2646+ printf("This is a %" PRIu64 "test\n", test_u);
2647+}
2648+ ]],[[
2649+foo();
2650+ ]])],
2651+ [ac_cv_safe_to_use_wformat_=yes],
2652+ [ac_cv_safe_to_use_wformat_=no])
2653+ CFLAGS="$save_CFLAGS"])
2654+ AS_IF([test "$ac_cv_safe_to_use_wformat_" = "yes"],[
2655+ BASE_WARNINGS="${BASE_WARNINGS} -Wformat -Wno-format-nonliteral -Wno-format-security"
2656+ BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wformat=2 -Wno-format-nonliteral -Wno-format-security"
2657+ ],[
2658+ BASE_WARNINGS="${BASE_WARNINGS} -Wno-format"
2659+ BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wno-format"
2660+ ])
2661+
2662+
2663+
2664+ AC_CACHE_CHECK([whether it is safe to use -Wconversion],
2665+ [ac_cv_safe_to_use_wconversion_],
2666+ [save_CFLAGS="$CFLAGS"
2667+ dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
2668+ dnl conversion warnings to all the tarball folks
2669+ CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
2670+ AC_COMPILE_IFELSE(
2671+ [AC_LANG_PROGRAM([[
2672+#include <stdbool.h>
2673+void foo(bool a)
2674+{
2675+ (void)a;
2676+}
2677+ ]],[[
2678+foo(0);
2679+ ]])],
2680+ [ac_cv_safe_to_use_wconversion_=yes],
2681+ [ac_cv_safe_to_use_wconversion_=no])
2682+ CFLAGS="$save_CFLAGS"])
2683+
2684+ AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"],
2685+ [W_CONVERSION="-Wconversion"
2686+ AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons],
2687+ [ac_cv_safe_to_use_Wconversion_],
2688+ [save_CFLAGS="$CFLAGS"
2689+ dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
2690+ dnl conversion warnings to all the tarball folks
2691+ CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
2692+ AC_COMPILE_IFELSE(
2693+ [AC_LANG_PROGRAM(
2694+ [[
2695+#include <netinet/in.h>
2696+ ]],[[
2697+uint16_t x= htons(80);
2698+ ]])],
2699+ [ac_cv_safe_to_use_Wconversion_=yes],
2700+ [ac_cv_safe_to_use_Wconversion_=no])
2701+ CFLAGS="$save_CFLAGS"])
2702+
2703+ AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"],
2704+ [NO_CONVERSION="-Wno-conversion"])
2705+ ])
2706+
2707 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
2708 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
2709
2710@@ -196,6 +256,25 @@
2711 AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"],
2712 [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"])
2713
2714+ AC_CACHE_CHECK([whether it is safe to use -Wframe-larger-than],
2715+ [ac_cv_safe_to_use_Wframe_larger_than_],
2716+ [AC_LANG_PUSH(C++)
2717+ save_CXXFLAGS="$CXXFLAGS"
2718+ CXXFLAGS="-Werror -pedantic -Wframe-larger-than=32768 ${AM_CXXFLAGS}"
2719+ AC_COMPILE_IFELSE([
2720+ AC_LANG_PROGRAM(
2721+ [[
2722+#include <stdio.h>
2723+ ]], [[]])
2724+ ],
2725+ [ac_cv_safe_to_use_Wframe_larger_than_=yes],
2726+ [ac_cv_safe_to_use_Wframe_larger_than_=no])
2727+ CXXFLAGS="$save_CXXFLAGS"
2728+ AC_LANG_POP()
2729+ ])
2730+ AS_IF([test "$ac_cv_safe_to_use_Wframe_larger_than_" = "yes"],
2731+ [CXX_WARNINGS="${CXX_WARNINGS} -Wframe-larger-than=32768"])
2732+
2733 AC_CACHE_CHECK([whether it is safe to use -Wlogical-op],
2734 [ac_cv_safe_to_use_Wlogical_op_],
2735 [save_CFLAGS="$CFLAGS"
2736@@ -292,7 +371,7 @@
2737 dnl TODO: Figure out a better way to deal with this:
2738 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
2739 NO_WERROR="-Wno-error"
2740- INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
2741+ PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive"
2742 AS_IF([test "$host_vendor" = "apple"],[
2743 BOOSTSKIP_WARNINGS="-Wno-uninitialized"
2744 ])
2745@@ -326,17 +405,19 @@
2746
2747
2748 m4_if(PW_LESS_WARNINGS, [no],[
2749- CC_WARNINGS_FULL="-erroff=E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
2750+ CC_WARNINGS_FULL="-erroff=E_STATEMENT_NOT_REACHED,E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
2751 CXX_WARNINGS_FULL="-erroff=inllargeuse"
2752 ],[
2753- CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR"
2754+ CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR,E_STATEMENT_NOT_REACHED"
2755 CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint"
2756 ])
2757
2758- CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL} ${CFLAG_VISIBILITY}"
2759- CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL} ${CFLAG_VISIBILITY}"
2760+ CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}"
2761+ CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}"
2762 PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit"
2763 BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem"
2764+ PERMISSIVE_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem,notused,badargtype2w,wunreachable"
2765+ INNOBASE_SKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit,wunreachable"
2766 NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
2767 NO_WERROR="-errwarn=%none"
2768
2769@@ -350,8 +431,9 @@
2770 AC_SUBST(NO_EFF_CXX)
2771 AC_SUBST(NO_OLD_STYLE_CAST)
2772 AC_SUBST(PROTOSKIP_WARNINGS)
2773+ AC_SUBST(INNOBASE_SKIP_WARNINGS)
2774 AC_SUBST(BOOSTSKIP_WARNINGS)
2775- AC_SUBST(INNOBASE_SKIP_WARNINGS)
2776+ AC_SUBST(PERMISSIVE_WARNINGS)
2777 AC_SUBST(NO_WERROR)
2778 AC_SUBST([GCOV_LIBS])
2779
2780
2781=== modified file 'm4/pandora_with_memcached.m4'
2782--- m4/pandora_with_memcached.m4 2010-01-02 05:10:47 +0000
2783+++ m4/pandora_with_memcached.m4 2011-01-10 19:54:57 +0000
2784@@ -1,5 +1,5 @@
2785-dnl Copyright (C) 2009 Sun Microsystems
2786-dnl This file is free software; Sun Microsystems
2787+dnl Copyright (C) 2009 Sun Microsystems, Inc.
2788+dnl This file is free software; Sun Microsystems, Inc.
2789 dnl gives unlimited permission to copy and/or distribute it,
2790 dnl with or without modifications, as long as this notice is preserved.
2791
2792
2793=== modified file 'm4/po.m4'
2794--- m4/po.m4 2010-05-29 17:31:51 +0000
2795+++ m4/po.m4 2011-01-10 19:54:57 +0000
2796@@ -1,5 +1,5 @@
2797-# po.m4 serial 15 (gettext-0.17)
2798-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
2799+# po.m4 serial 17 (gettext-0.18)
2800+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
2801 dnl This file is free software; the Free Software Foundation
2802 dnl gives unlimited permission to copy and/or distribute it,
2803 dnl with or without modifications, as long as this notice is preserved.
2804@@ -17,7 +17,7 @@
2805 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2806 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2807
2808-AC_PREREQ(2.50)
2809+AC_PREREQ([2.50])
2810
2811 dnl Checks for all prerequisites of the po subdirectory.
2812 AC_DEFUN([AM_PO_SUBDIRS],
2813@@ -29,7 +29,7 @@
2814
2815 dnl Release version of the gettext macros. This is used to ensure that
2816 dnl the gettext macros and po/Makefile.in.in are in sync.
2817- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
2818+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
2819
2820 dnl Perform the following tests also if --disable-nls has been given,
2821 dnl because they are needed for "make dist" to work.
2822@@ -41,7 +41,7 @@
2823 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2824 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2825 :)
2826- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2827+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2828
2829 dnl Test whether it is GNU msgfmt >= 0.15.
2830 changequote(,)dnl
2831
2832=== modified file 'm4/progtest.m4'
2833--- m4/progtest.m4 2010-05-29 17:31:51 +0000
2834+++ m4/progtest.m4 2011-01-10 19:54:57 +0000
2835@@ -1,5 +1,5 @@
2836-# progtest.m4 serial 4 (gettext-0.14.2)
2837-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
2838+# progtest.m4 serial 6 (gettext-0.18)
2839+dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
2840 dnl This file is free software; the Free Software Foundation
2841 dnl gives unlimited permission to copy and/or distribute it,
2842 dnl with or without modifications, as long as this notice is preserved.
2843@@ -16,7 +16,7 @@
2844 dnl Authors:
2845 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2846
2847-AC_PREREQ(2.50)
2848+AC_PREREQ([2.50])
2849
2850 # Search path for a program which passes the given test.
2851
2852@@ -55,7 +55,7 @@
2853 # Extract the first word of "$2", so it can be a program name with args.
2854 set dummy $2; ac_word=[$]2
2855 AC_MSG_CHECKING([for $ac_word])
2856-AC_CACHE_VAL(ac_cv_path_$1,
2857+AC_CACHE_VAL([ac_cv_path_$1],
2858 [case "[$]$1" in
2859 [[\\/]]* | ?:[[\\/]]*)
2860 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2861@@ -84,9 +84,9 @@
2862 esac])dnl
2863 $1="$ac_cv_path_$1"
2864 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2865- AC_MSG_RESULT([$]$1)
2866+ AC_MSG_RESULT([$][$1])
2867 else
2868- AC_MSG_RESULT(no)
2869+ AC_MSG_RESULT([no])
2870 fi
2871-AC_SUBST($1)dnl
2872+AC_SUBST([$1])dnl
2873 ])
2874
2875=== modified file 'tests/mem_functions.c'
2876--- tests/mem_functions.c 2010-07-28 20:59:36 +0000
2877+++ tests/mem_functions.c 2011-01-10 19:54:57 +0000
2878@@ -5437,7 +5437,7 @@
2879 memcached_server_instance_st instance_one;
2880 memcached_server_instance_st instance_two;
2881
2882- if (memcached_server_count(memc) < 3 || pre_replication(memc) != MEMCACHED_SUCCESS)
2883+ if (memcached_server_count(memc) < 3 || pre_replication(memc) != TEST_SUCCESS)
2884 return TEST_SKIPPED;
2885
2886 memcached_return_t rc;
2887
2888=== modified file 'unittests/include.am'
2889--- unittests/include.am 2010-06-30 15:21:20 +0000
2890+++ unittests/include.am 2011-01-10 19:54:57 +0000
2891@@ -10,7 +10,7 @@
2892 unittests/main.cc \
2893 unittests/strings.cc
2894
2895-unittests_unittest_CXXFLAGS= ${AM_CXXFLAGS} ${NO_WERROR}
2896+unittests_unittests_CXXFLAGS= ${AM_CXXFLAGS} ${NO_WERROR} ${NO_EFF_CXX}
2897 unittests_unittests_LDADD= \
2898 tests/libserver.la \
2899 libmemcached/libmemcachedinternal.la \
2900
2901=== modified file 'unittests/strings.cc'
2902--- unittests/strings.cc 2010-06-30 08:08:52 +0000
2903+++ unittests/strings.cc 2011-01-10 19:54:57 +0000
2904@@ -8,9 +8,6 @@
2905
2906 #include "config.h"
2907
2908-#define __STDC_LIMIT_MACROS
2909-#include <stdint.h>
2910-
2911 #include <gtest/gtest.h>
2912
2913 #include <libmemcached/common.h>

Subscribers

People subscribed via source and target branches

to all changes: