Merge lp:~mordred/libdrizzle/update-build into lp:~drizzle-trunk/libdrizzle/classic
- update-build
- Merge into classic
Proposed by
Monty Taylor
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~mordred/libdrizzle/update-build |
Merge into: | lp:~drizzle-trunk/libdrizzle/classic |
Diff against target: |
2155 lines (+1720/-53) 38 files modified
.bzrignore (+0/-1) Makefile.am (+2/-2) config/autorun.sh (+0/-6) configure.ac (+0/-3) libdrizzle/libdrizzle.ver (+0/-1) m4/pandora_canonical.m4 (+88/-10) m4/pandora_cinttypes.m4 (+31/-0) m4/pandora_cstdint.m4 (+30/-0) m4/pandora_cxx_demangle.m4 (+24/-0) m4/pandora_drizzle_build.m4 (+77/-0) m4/pandora_fdatasync.m4 (+25/-0) m4/pandora_have_better_malloc.m4 (+5/-0) m4/pandora_have_gcc_atomics.m4 (+37/-0) m4/pandora_have_libavahi.m4 (+41/-0) m4/pandora_have_libbdb.m4 (+40/-0) m4/pandora_have_libdl.m4 (+51/-0) m4/pandora_have_libevent.m4 (+66/-0) m4/pandora_have_libgearman.m4 (+2/-2) m4/pandora_have_libmemcached.m4 (+0/-1) m4/pandora_have_libpcre.m4 (+73/-0) m4/pandora_have_libreadline.m4 (+242/-0) m4/pandora_have_libtokyocabinet.m4 (+52/-0) m4/pandora_have_libuuid.m4 (+55/-0) m4/pandora_have_libxml2.m4 (+52/-0) m4/pandora_have_libz.m4 (+51/-0) m4/pandora_header_assert.m4 (+2/-2) m4/pandora_libtool.m4 (+9/-0) m4/pandora_plugins.m4 (+17/-5) m4/pandora_pthread.m4 (+180/-0) m4/pandora_run_cpplint.m4 (+8/-0) m4/pandora_sasl.m4 (+133/-0) m4/pandora_stack_direction.m4 (+39/-0) m4/pandora_stl_hash.m4 (+107/-0) m4/pandora_vc_build.m4 (+69/-3) m4/pandora_version.m4 (+11/-0) m4/pandora_warnings.m4 (+43/-7) m4/pandora_with_gettext.m4 (+41/-0) m4/pandora_with_memcached.m4 (+17/-10) |
To merge this branch: | bzr merge lp:~mordred/libdrizzle/update-build |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Drizzle Developers | Pending | ||
Review via email: mp+15700@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2009-08-10 21:57:14 +0000 | |||
3 | +++ .bzrignore 2009-12-05 23:40:29 +0000 | |||
4 | @@ -41,4 +41,3 @@ | |||
5 | 41 | tests/drizzle_query_st | 41 | tests/drizzle_query_st |
6 | 42 | tests/drizzle_result_st | 42 | tests/drizzle_result_st |
7 | 43 | tests/drizzle_st | 43 | tests/drizzle_st |
8 | 44 | config/plugin.ac | ||
9 | 45 | 44 | ||
10 | === modified file 'Makefile.am' | |||
11 | --- Makefile.am 2009-10-05 06:58:37 +0000 | |||
12 | +++ Makefile.am 2009-12-05 23:40:29 +0000 | |||
13 | @@ -33,9 +33,9 @@ | |||
14 | 33 | -DBUILDING_LIBDRIZZLE | 33 | -DBUILDING_LIBDRIZZLE |
15 | 34 | 34 | ||
16 | 35 | libdrizzle_la_LDFLAGS= \ | 35 | libdrizzle_la_LDFLAGS= \ |
17 | 36 | $(AM_LDFLAGS) \ | ||
18 | 36 | -version-info \ | 37 | -version-info \ |
21 | 37 | $(LIBDRIZZLE_LIBRARY_VERSION) \ | 38 | $(LIBDRIZZLE_LIBRARY_VERSION) |
20 | 38 | $(LD_VERSION_SCRIPT) | ||
22 | 39 | 39 | ||
23 | 40 | libdrizzle_la_SOURCES= \ | 40 | libdrizzle_la_SOURCES= \ |
24 | 41 | libdrizzle/drizzle.c \ | 41 | libdrizzle/drizzle.c \ |
25 | 42 | 42 | ||
26 | === modified file 'config/autorun.sh' | |||
27 | --- config/autorun.sh 2009-10-07 01:12:30 +0000 | |||
28 | +++ config/autorun.sh 2009-12-05 23:40:29 +0000 | |||
29 | @@ -68,12 +68,6 @@ | |||
30 | 68 | . config/pre_hook.sh | 68 | . config/pre_hook.sh |
31 | 69 | fi | 69 | fi |
32 | 70 | 70 | ||
33 | 71 | # We need to some file here for the m4_sinclude, even if it's just empty | ||
34 | 72 | if test ! -f config/plugin.ac | ||
35 | 73 | then | ||
36 | 74 | touch config/plugin.ac | ||
37 | 75 | fi | ||
38 | 76 | |||
39 | 77 | # Try to detect the supported binaries if the user didn't | 71 | # Try to detect the supported binaries if the user didn't |
40 | 78 | # override that by pushing the environment variable | 72 | # override that by pushing the environment variable |
41 | 79 | if test x$LIBTOOLIZE = x; then | 73 | if test x$LIBTOOLIZE = x; then |
42 | 80 | 74 | ||
43 | === modified file 'configure.ac' | |||
44 | --- configure.ac 2009-11-05 22:47:42 +0000 | |||
45 | +++ configure.ac 2009-12-05 23:40:29 +0000 | |||
46 | @@ -39,10 +39,7 @@ | |||
47 | 39 | 39 | ||
48 | 40 | PANDORA_HAVE_LIBSQLITE3 | 40 | PANDORA_HAVE_LIBSQLITE3 |
49 | 41 | 41 | ||
50 | 42 | AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)]) | ||
51 | 43 | AC_CHECK_FUNC(inet_ntoa, [], [AC_CHECK_LIB(nsl, inet_ntoa)]) | 42 | AC_CHECK_FUNC(inet_ntoa, [], [AC_CHECK_LIB(nsl, inet_ntoa)]) |
52 | 44 | # This may get things to compile even if bind-8 is installed | ||
53 | 45 | AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)]) | ||
54 | 46 | 43 | ||
55 | 47 | AC_CHECK_FUNCS(memchr memmove memset socket strcasecmp strtoul) | 44 | AC_CHECK_FUNCS(memchr memmove memset socket strcasecmp strtoul) |
56 | 48 | 45 | ||
57 | 49 | 46 | ||
58 | === removed file 'libdrizzle/libdrizzle.ver' | |||
59 | --- libdrizzle/libdrizzle.ver 2009-02-02 18:00:27 +0000 | |||
60 | +++ libdrizzle/libdrizzle.ver 1970-01-01 00:00:00 +0000 | |||
61 | @@ -1,1 +0,0 @@ | |||
62 | 1 | libdrizzle_0 { global: *; }; | ||
63 | 2 | 0 | ||
64 | === modified file 'm4/pandora_canonical.m4' | |||
65 | --- m4/pandora_canonical.m4 2009-10-07 01:12:30 +0000 | |||
66 | +++ m4/pandora_canonical.m4 2009-12-05 23:40:29 +0000 | |||
67 | @@ -4,7 +4,7 @@ | |||
68 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
69 | 5 | 5 | ||
70 | 6 | dnl Which version of the canonical setup we're using | 6 | dnl Which version of the canonical setup we're using |
72 | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.62]) | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.82]) |
73 | 8 | 8 | ||
74 | 9 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ | 9 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
75 | 10 | dnl Force dependency tracking on for Sun Studio builds | 10 | dnl Force dependency tracking on for Sun Studio builds |
76 | @@ -24,6 +24,8 @@ | |||
77 | 24 | m4_define([PCT_IGNORE_SHARED_PTR],[no]) | 24 | m4_define([PCT_IGNORE_SHARED_PTR],[no]) |
78 | 25 | m4_define([PCT_FORCE_GCC42],[no]) | 25 | m4_define([PCT_FORCE_GCC42],[no]) |
79 | 26 | m4_define([PCT_SRC_IN_SRC],[no]) | 26 | m4_define([PCT_SRC_IN_SRC],[no]) |
80 | 27 | m4_define([PCT_VERSION_FROM_VC],[no]) | ||
81 | 28 | m4_define([PCT_USE_VISIBILITY],[yes]) | ||
82 | 27 | m4_foreach([pct_arg],[$*],[ | 29 | m4_foreach([pct_arg],[$*],[ |
83 | 28 | m4_case(pct_arg, | 30 | m4_case(pct_arg, |
84 | 29 | [use-gnulib], [ | 31 | [use-gnulib], [ |
85 | @@ -42,9 +44,17 @@ | |||
86 | 42 | m4_undefine([PCT_FORCE_GCC42]) | 44 | m4_undefine([PCT_FORCE_GCC42]) |
87 | 43 | m4_define([PCT_FORCE_GCC42],[yes]) | 45 | m4_define([PCT_FORCE_GCC42],[yes]) |
88 | 44 | ], | 46 | ], |
89 | 47 | [skip-visibility], [ | ||
90 | 48 | m4_undefine([PCT_USE_VISIBILITY]) | ||
91 | 49 | m4_define([PCT_USE_VISIBILITY],[no]) | ||
92 | 50 | ], | ||
93 | 45 | [src-in-src], [ | 51 | [src-in-src], [ |
94 | 46 | m4_undefine([PCT_SRC_IN_SRC]) | 52 | m4_undefine([PCT_SRC_IN_SRC]) |
95 | 47 | m4_define([PCT_SRC_IN_SRC],[yes]) | 53 | m4_define([PCT_SRC_IN_SRC],[yes]) |
96 | 54 | ], | ||
97 | 55 | [version-from-vc], [ | ||
98 | 56 | m4_undefine([PCT_VERSION_FROM_VC]) | ||
99 | 57 | m4_define([PCT_VERSION_FROM_VC],[yes]) | ||
100 | 48 | ]) | 58 | ]) |
101 | 49 | ]) | 59 | ]) |
102 | 50 | 60 | ||
103 | @@ -58,7 +68,7 @@ | |||
104 | 58 | 68 | ||
105 | 59 | AC_CANONICAL_TARGET | 69 | AC_CANONICAL_TARGET |
106 | 60 | 70 | ||
108 | 61 | AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects) | 71 | AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects foreign) |
109 | 62 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 72 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
110 | 63 | 73 | ||
111 | 64 | m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ]) | 74 | m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ]) |
112 | @@ -67,6 +77,11 @@ | |||
113 | 67 | AC_REQUIRE([PANDORA_MAC_GCC42]) | 77 | AC_REQUIRE([PANDORA_MAC_GCC42]) |
114 | 68 | AC_REQUIRE([PANDORA_64BIT]) | 78 | AC_REQUIRE([PANDORA_64BIT]) |
115 | 69 | 79 | ||
116 | 80 | m4_if(PCT_VERSION_FROM_VC,yes,[ | ||
117 | 81 | PANDORA_VC_VERSION | ||
118 | 82 | ]) | ||
119 | 83 | PANDORA_VERSION | ||
120 | 84 | |||
121 | 70 | dnl Once we can use a modern autoconf, we can use this | 85 | dnl Once we can use a modern autoconf, we can use this |
122 | 71 | dnl AC_PROG_CC_C99 | 86 | dnl AC_PROG_CC_C99 |
123 | 72 | AC_REQUIRE([AC_PROG_CXX]) | 87 | AC_REQUIRE([AC_PROG_CXX]) |
124 | @@ -90,6 +105,7 @@ | |||
125 | 90 | AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ | 105 | AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ |
126 | 91 | AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) | 106 | AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) |
127 | 92 | ]) | 107 | ]) |
128 | 108 | |||
129 | 93 | ]) | 109 | ]) |
130 | 94 | 110 | ||
131 | 95 | PANDORA_SHARED_PTR | 111 | PANDORA_SHARED_PTR |
132 | @@ -104,6 +120,9 @@ | |||
133 | 104 | AC_CONFIG_LIBOBJ_DIR([gnulib]) | 120 | AC_CONFIG_LIBOBJ_DIR([gnulib]) |
134 | 105 | ]) | 121 | ]) |
135 | 106 | 122 | ||
136 | 123 | PANDORA_CHECK_C_VERSION | ||
137 | 124 | PANDORA_CHECK_CXX_VERSION | ||
138 | 125 | |||
139 | 107 | AC_C_BIGENDIAN | 126 | AC_C_BIGENDIAN |
140 | 108 | AC_C_CONST | 127 | AC_C_CONST |
141 | 109 | AC_C_INLINE | 128 | AC_C_INLINE |
142 | @@ -114,17 +133,76 @@ | |||
143 | 114 | AC_TYPE_SIZE_T | 133 | AC_TYPE_SIZE_T |
144 | 115 | AC_SYS_LARGEFILE | 134 | AC_SYS_LARGEFILE |
145 | 116 | 135 | ||
149 | 117 | 136 | # off_t is not a builtin type | |
150 | 118 | PANDORA_CHECK_C_VERSION | 137 | AC_CHECK_SIZEOF(off_t, 4) |
151 | 119 | PANDORA_CHECK_CXX_VERSION | 138 | AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[ |
152 | 139 | AC_MSG_ERROR("${PACKAGE} needs an off_t type.") | ||
153 | 140 | ]) | ||
154 | 141 | |||
155 | 142 | AC_CHECK_SIZEOF(size_t) | ||
156 | 143 | AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[ | ||
157 | 144 | AC_MSG_ERROR("${PACKAGE} needs an size_t type.") | ||
158 | 145 | ]) | ||
159 | 146 | |||
160 | 147 | AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()]) | ||
161 | 148 | AC_CHECK_SIZEOF(long long) | ||
162 | 149 | AC_DEFINE_UNQUOTED([SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()]) | ||
163 | 150 | AC_CACHE_CHECK([if time_t is unsigned], [ac_cv_time_t_unsigned],[ | ||
164 | 151 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
165 | 152 | [[ | ||
166 | 153 | #include <time.h> | ||
167 | 154 | ]], | ||
168 | 155 | [[ | ||
169 | 156 | int array[(((time_t)-1) > 0) ? 1 : -1]; | ||
170 | 157 | ]]) | ||
171 | 158 | ],[ | ||
172 | 159 | ac_cv_time_t_unsigned=yes | ||
173 | 160 | ],[ | ||
174 | 161 | ac_cv_time_t_unsigned=no | ||
175 | 162 | ]) | ||
176 | 163 | ]) | ||
177 | 164 | AS_IF([test "$ac_cv_time_t_unsigned" = "yes"],[ | ||
178 | 165 | AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) | ||
179 | 166 | ]) | ||
180 | 167 | |||
181 | 168 | dnl AC_FUNC_ALLOCA would test for stack direction if we didn't have a working | ||
182 | 169 | dnl alloca - but we need to know it anyway for check_stack_overrun. | ||
183 | 170 | PANDORA_STACK_DIRECTION | ||
184 | 171 | |||
185 | 172 | save_LIBS="${LIBS}" | ||
186 | 173 | LIBS="" | ||
187 | 174 | AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity)) | ||
188 | 175 | LIBM="${LIBS}" | ||
189 | 176 | LIBS="${save_LIBS}" | ||
190 | 177 | AC_SUBST([LIBM]) | ||
191 | 178 | |||
192 | 179 | AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)]) | ||
193 | 180 | AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)]) | ||
194 | 181 | |||
195 | 182 | |||
196 | 120 | 183 | ||
197 | 121 | PANDORA_OPTIMIZE | 184 | PANDORA_OPTIMIZE |
198 | 122 | 185 | ||
204 | 123 | dnl We need to inject error into the cflags to test if visibility works or not | 186 | AC_LANG_PUSH(C++) |
205 | 124 | save_CFLAGS="${CFLAGS}" | 187 | # Test whether madvise() is declared in C++ code -- it is not on some |
206 | 125 | CFLAGS="${CFLAGS} -Werror" | 188 | # systems, such as Solaris |
207 | 126 | gl_VISIBILITY | 189 | AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[ |
208 | 127 | CFLAGS="${save_CFLAGS}" | 190 | #if HAVE_SYS_MMAN_H |
209 | 191 | #include <sys/types.h> | ||
210 | 192 | #include <sys/mman.h> | ||
211 | 193 | #endif | ||
212 | 194 | ]]) | ||
213 | 195 | AC_LANG_POP() | ||
214 | 196 | |||
215 | 197 | PANDORA_HAVE_GCC_ATOMICS | ||
216 | 198 | |||
217 | 199 | m4_if(PCT_USE_VISIBILITY,[yes],[ | ||
218 | 200 | dnl We need to inject error into the cflags to test if visibility works or not | ||
219 | 201 | save_CFLAGS="${CFLAGS}" | ||
220 | 202 | CFLAGS="${CFLAGS} -Werror" | ||
221 | 203 | gl_VISIBILITY | ||
222 | 204 | CFLAGS="${save_CFLAGS}" | ||
223 | 205 | ]) | ||
224 | 128 | 206 | ||
225 | 129 | PANDORA_HEADER_ASSERT | 207 | PANDORA_HEADER_ASSERT |
226 | 130 | 208 | ||
227 | 131 | 209 | ||
228 | === added file 'm4/pandora_cinttypes.m4' | |||
229 | --- m4/pandora_cinttypes.m4 1970-01-01 00:00:00 +0000 | |||
230 | +++ m4/pandora_cinttypes.m4 2009-12-05 23:40:29 +0000 | |||
231 | @@ -0,0 +1,31 @@ | |||
232 | 1 | # We check two things: where the include file is for cinttypes. We | ||
233 | 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the | ||
234 | 3 | # wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or | ||
235 | 4 | # HAVE_BOOST_CINTTYPES depending | ||
236 | 5 | # on location. | ||
237 | 6 | |||
238 | 7 | AC_DEFUN([PANDORA_CXX_CINTTYPES], | ||
239 | 8 | [AC_REQUIRE([PANDORA_CXX_CSTDINT]) | ||
240 | 9 | AC_MSG_CHECKING(the location of cinttypes) | ||
241 | 10 | AC_LANG_PUSH(C++) | ||
242 | 11 | ac_cv_cxx_cinttypes="" | ||
243 | 12 | for location in tr1/cinttypes boost/cinttypes cinttypes; do | ||
244 | 13 | if test -z "$ac_cv_cxx_cinttypes"; then | ||
245 | 14 | AC_TRY_COMPILE([#include $ac_cv_cxx_cstdint; | ||
246 | 15 | #include <$location>], | ||
247 | 16 | [uint32_t foo= UINT32_C(1)], | ||
248 | 17 | [ac_cv_cxx_cinttypes="<$location>";]) | ||
249 | 18 | fi | ||
250 | 19 | done | ||
251 | 20 | AC_LANG_POP() | ||
252 | 21 | if test -n "$ac_cv_cxx_cinttypes"; then | ||
253 | 22 | AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) | ||
254 | 23 | else | ||
255 | 24 | AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++]) | ||
256 | 25 | ac_cv_cxx_cinttypes="<inttypes.h>" | ||
257 | 26 | AC_MSG_RESULT() | ||
258 | 27 | AC_MSG_WARN([Could not find a cinttypes header.]) | ||
259 | 28 | fi | ||
260 | 29 | AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes, | ||
261 | 30 | [the location of <cinttypes>]) | ||
262 | 31 | ]) | ||
263 | 0 | 32 | ||
264 | === added file 'm4/pandora_cstdint.m4' | |||
265 | --- m4/pandora_cstdint.m4 1970-01-01 00:00:00 +0000 | |||
266 | +++ m4/pandora_cstdint.m4 2009-12-05 23:40:29 +0000 | |||
267 | @@ -0,0 +1,30 @@ | |||
268 | 1 | # We check two things: where the include file is for cstdint. We | ||
269 | 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the | ||
270 | 3 | # wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or | ||
271 | 4 | # HAVE_BOOST_CSTDINT depending | ||
272 | 5 | # on location. | ||
273 | 6 | |||
274 | 7 | AC_DEFUN([PANDORA_CXX_CSTDINT], | ||
275 | 8 | [AC_MSG_CHECKING(the location of cstdint) | ||
276 | 9 | AC_LANG_PUSH(C++) | ||
277 | 10 | ac_cv_cxx_cstdint="" | ||
278 | 11 | for location in tr1/cstdint boost/cstdint cstdint; do | ||
279 | 12 | if test -z "$ac_cv_cxx_cstdint"; then | ||
280 | 13 | AC_TRY_COMPILE([#include <$location>], | ||
281 | 14 | [uint32_t t], | ||
282 | 15 | [ac_cv_cxx_cstdint="<$location>";]) | ||
283 | 16 | fi | ||
284 | 17 | done | ||
285 | 18 | AC_LANG_POP() | ||
286 | 19 | if test -n "$ac_cv_cxx_cstdint"; then | ||
287 | 20 | AC_MSG_RESULT([$ac_cv_cxx_cstdint]) | ||
288 | 21 | else | ||
289 | 22 | AC_DEFINE([__STDC_CONSTANT_MACROS],[1],[Use STDC Constant Macros in C++]) | ||
290 | 23 | AC_DEFINE([__STDC_FORMAT_MACROS],[1],[Use STDC Format Macros in C++]) | ||
291 | 24 | ac_cv_cxx_cstdint="<stdint.h>" | ||
292 | 25 | AC_MSG_RESULT() | ||
293 | 26 | AC_MSG_WARN([Could not find a cstdint header.]) | ||
294 | 27 | fi | ||
295 | 28 | AC_DEFINE_UNQUOTED(CSTDINT_H,$ac_cv_cxx_cstdint, | ||
296 | 29 | [the location of <cstdint>]) | ||
297 | 30 | ]) | ||
298 | 0 | 31 | ||
299 | === added file 'm4/pandora_cxx_demangle.m4' | |||
300 | --- m4/pandora_cxx_demangle.m4 1970-01-01 00:00:00 +0000 | |||
301 | +++ m4/pandora_cxx_demangle.m4 2009-12-05 23:40:29 +0000 | |||
302 | @@ -0,0 +1,24 @@ | |||
303 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
304 | 2 | dnl This file is free software; Sun Microsystems | ||
305 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
306 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
307 | 5 | |||
308 | 6 | dnl Check for all of the headers and libs that Drizzle needs. We check all | ||
309 | 7 | dnl of these for plugins too, to ensure that all of the appropriate defines | ||
310 | 8 | dnl are set. | ||
311 | 9 | |||
312 | 10 | AC_DEFUN([PANDORA_CXX_DEMANGLE],[ | ||
313 | 11 | AC_LANG_PUSH([C++]) | ||
314 | 12 | AC_CHECK_HEADERS(cxxabi.h) | ||
315 | 13 | AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle, | ||
316 | 14 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[ | ||
317 | 15 | char *foo= 0; int bar= 0; | ||
318 | 16 | foo= abi::__cxa_demangle(foo, foo, 0, &bar); | ||
319 | 17 | ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])]) | ||
320 | 18 | AC_LANG_POP() | ||
321 | 19 | |||
322 | 20 | AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[ | ||
323 | 21 | AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1, | ||
324 | 22 | [Define to 1 if you have the `abi::__cxa_demangle' function.]) | ||
325 | 23 | ]) | ||
326 | 24 | ]) | ||
327 | 0 | 25 | ||
328 | === added file 'm4/pandora_drizzle_build.m4' | |||
329 | --- m4/pandora_drizzle_build.m4 1970-01-01 00:00:00 +0000 | |||
330 | +++ m4/pandora_drizzle_build.m4 2009-12-05 23:40:29 +0000 | |||
331 | @@ -0,0 +1,77 @@ | |||
332 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
333 | 2 | dnl This file is free software; Sun Microsystems | ||
334 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
335 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
336 | 5 | |||
337 | 6 | dnl Check for all of the headers and libs that Drizzle needs. We check all | ||
338 | 7 | dnl of these for plugins too, to ensure that all of the appropriate defines | ||
339 | 8 | dnl are set. | ||
340 | 9 | |||
341 | 10 | AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ | ||
342 | 11 | |||
343 | 12 | dnl We need to turn on our CXXFLAGS to make sure it shows up correctly | ||
344 | 13 | save_CXXFLAGS="${CXXFLAGS}" | ||
345 | 14 | CXXFLAGS="${CXXFLAGS} ${AM_CXXFLAGS}" | ||
346 | 15 | PANDORA_CXX_STL_HASH | ||
347 | 16 | CXXFLAGS="${save_CXXFLAGS}" | ||
348 | 17 | |||
349 | 18 | PANDORA_CXX_CSTDINT | ||
350 | 19 | PANDORA_CXX_CINTTYPES | ||
351 | 20 | |||
352 | 21 | AC_STRUCT_TM | ||
353 | 22 | |||
354 | 23 | AC_FUNC_ALLOCA | ||
355 | 24 | AC_FUNC_UTIME_NULL | ||
356 | 25 | AC_FUNC_VPRINTF | ||
357 | 26 | |||
358 | 27 | PANDORA_WORKING_FDATASYNC | ||
359 | 28 | |||
360 | 29 | AC_CHECK_FUNCS(\ | ||
361 | 30 | gethrtime \ | ||
362 | 31 | setupterm \ | ||
363 | 32 | backtrace \ | ||
364 | 33 | backtrace_symbols \ | ||
365 | 34 | backtrace_symbols_fd) | ||
366 | 35 | |||
367 | 36 | AC_HEADER_STAT | ||
368 | 37 | AC_HEADER_DIRENT | ||
369 | 38 | AC_HEADER_STDC | ||
370 | 39 | AC_HEADER_SYS_WAIT | ||
371 | 40 | AC_HEADER_STDBOOL | ||
372 | 41 | |||
373 | 42 | AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h) | ||
374 | 43 | AC_CHECK_HEADERS(select.h sys/select.h) | ||
375 | 44 | AC_CHECK_HEADERS(utime.h sys/utime.h ) | ||
376 | 45 | AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h) | ||
377 | 46 | AC_CHECK_HEADERS(sched.h) | ||
378 | 47 | AC_CHECK_HEADERS(sys/prctl.h) | ||
379 | 48 | AC_CHECK_HEADERS(execinfo.h) | ||
380 | 49 | AC_CHECK_HEADERS(locale.h) | ||
381 | 50 | AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h) | ||
382 | 51 | AC_CHECK_HEADERS(paths.h) | ||
383 | 52 | |||
384 | 53 | |||
385 | 54 | #-------------------------------------------------------------------- | ||
386 | 55 | # Check for system libraries. Adds the library to $LIBS | ||
387 | 56 | # and defines HAVE_LIBM etc | ||
388 | 57 | #-------------------------------------------------------------------- | ||
389 | 58 | |||
390 | 59 | # For the sched_yield() function on Solaris | ||
391 | 60 | AC_CHECK_FUNC(sched_yield, [], | ||
392 | 61 | [AC_CHECK_LIB(posix4, [sched_yield], | ||
393 | 62 | [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])]) | ||
394 | 63 | |||
395 | 64 | AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[ | ||
396 | 65 | AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)]) | ||
397 | 66 | ]) | ||
398 | 67 | |||
399 | 68 | AC_CHECK_HEADERS([curses.h term.h],[],[],[[ | ||
400 | 69 | #ifdef HAVE_CURSES_H | ||
401 | 70 | # include <curses.h> | ||
402 | 71 | #endif | ||
403 | 72 | ]]) | ||
404 | 73 | AC_CHECK_TYPES([uint, ulong]) | ||
405 | 74 | |||
406 | 75 | PANDORA_CXX_DEMANGLE | ||
407 | 76 | |||
408 | 77 | ]) | ||
409 | 0 | 78 | ||
410 | === added file 'm4/pandora_fdatasync.m4' | |||
411 | --- m4/pandora_fdatasync.m4 1970-01-01 00:00:00 +0000 | |||
412 | +++ m4/pandora_fdatasync.m4 2009-12-05 23:40:29 +0000 | |||
413 | @@ -0,0 +1,25 @@ | |||
414 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
415 | 2 | dnl This file is free software; Sun Microsystems | ||
416 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
417 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
418 | 5 | |||
419 | 6 | #-------------------------------------------------------------------- | ||
420 | 7 | # Check for a working fdatasync call | ||
421 | 8 | #-------------------------------------------------------------------- | ||
422 | 9 | |||
423 | 10 | |||
424 | 11 | AC_DEFUN([PANDORA_WORKING_FDATASYNC],[ | ||
425 | 12 | AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[ | ||
426 | 13 | AC_LANG_PUSH(C++) | ||
427 | 14 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | ||
428 | 15 | #include <unistd.h> | ||
429 | 16 | ]],[[ | ||
430 | 17 | fdatasync(4); | ||
431 | 18 | ]])], | ||
432 | 19 | [ac_cv_func_fdatasync=yes], | ||
433 | 20 | [ac_cv_func_fdatasync=no]) | ||
434 | 21 | AC_LANG_POP() | ||
435 | 22 | ]) | ||
436 | 23 | AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"], | ||
437 | 24 | [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])]) | ||
438 | 25 | ]) | ||
439 | 0 | \ No newline at end of file | 26 | \ No newline at end of file |
440 | 1 | 27 | ||
441 | === modified file 'm4/pandora_have_better_malloc.m4' | |||
442 | --- m4/pandora_have_better_malloc.m4 2009-08-07 21:05:59 +0000 | |||
443 | +++ m4/pandora_have_better_malloc.m4 2009-12-05 23:40:29 +0000 | |||
444 | @@ -60,3 +60,8 @@ | |||
445 | 60 | AC_SUBST([BETTER_MALLOC_LIBS]) | 60 | AC_SUBST([BETTER_MALLOC_LIBS]) |
446 | 61 | 61 | ||
447 | 62 | ]) | 62 | ]) |
448 | 63 | |||
449 | 64 | AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[ | ||
450 | 65 | AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC]) | ||
451 | 66 | LIBS="${LIBS} ${BETTER_MALLOC_LIBS}" | ||
452 | 67 | ]) | ||
453 | 63 | \ No newline at end of file | 68 | \ No newline at end of file |
454 | 64 | 69 | ||
455 | === added file 'm4/pandora_have_gcc_atomics.m4' | |||
456 | --- m4/pandora_have_gcc_atomics.m4 1970-01-01 00:00:00 +0000 | |||
457 | +++ m4/pandora_have_gcc_atomics.m4 2009-12-05 23:40:29 +0000 | |||
458 | @@ -0,0 +1,37 @@ | |||
459 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
460 | 2 | dnl This file is free software; Sun Microsystems | ||
461 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
462 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
463 | 5 | |||
464 | 6 | #-------------------------------------------------------------------- | ||
465 | 7 | # Check for GCC Atomic Support | ||
466 | 8 | #-------------------------------------------------------------------- | ||
467 | 9 | |||
468 | 10 | |||
469 | 11 | AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[ | ||
470 | 12 | |||
471 | 13 | AC_CACHE_CHECK( | ||
472 | 14 | [whether the compiler provides atomic builtins], | ||
473 | 15 | [ac_cv_gcc_atomic_builtins], | ||
474 | 16 | [AC_RUN_IFELSE( | ||
475 | 17 | [AC_LANG_PROGRAM([],[[ | ||
476 | 18 | int foo= -10; int bar= 10; | ||
477 | 19 | if (!__sync_fetch_and_add(&foo, bar) || foo) | ||
478 | 20 | return -1; | ||
479 | 21 | bar= __sync_lock_test_and_set(&foo, bar); | ||
480 | 22 | if (bar || foo != 10) | ||
481 | 23 | return -1; | ||
482 | 24 | bar= __sync_val_compare_and_swap(&bar, foo, 15); | ||
483 | 25 | if (bar) | ||
484 | 26 | return -1; | ||
485 | 27 | return 0; | ||
486 | 28 | ]])], | ||
487 | 29 | [ac_cv_gcc_atomic_builtins=yes], | ||
488 | 30 | [ac_cv_gcc_atomic_builtins=no])]) | ||
489 | 31 | |||
490 | 32 | AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[ | ||
491 | 33 | AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1, | ||
492 | 34 | [Define to 1 if compiler provides atomic builtins.]) | ||
493 | 35 | ]) | ||
494 | 36 | |||
495 | 37 | ]) | ||
496 | 0 | \ No newline at end of file | 38 | \ No newline at end of file |
497 | 1 | 39 | ||
498 | === added file 'm4/pandora_have_libavahi.m4' | |||
499 | --- m4/pandora_have_libavahi.m4 1970-01-01 00:00:00 +0000 | |||
500 | +++ m4/pandora_have_libavahi.m4 2009-12-05 23:40:29 +0000 | |||
501 | @@ -0,0 +1,41 @@ | |||
502 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
503 | 2 | dnl This file is free software; Sun Microsystems | ||
504 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
505 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
506 | 5 | |||
507 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[ | ||
508 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
509 | 8 | |||
510 | 9 | dnl -------------------------------------------------------------------- | ||
511 | 10 | dnl Check for libavahi | ||
512 | 11 | dnl -------------------------------------------------------------------- | ||
513 | 12 | |||
514 | 13 | AC_ARG_ENABLE([libavahi], | ||
515 | 14 | [AS_HELP_STRING([--disable-libavahi], | ||
516 | 15 | [Build with libavahi support @<:@default=on@:>@])], | ||
517 | 16 | [ac_enable_libavahi="$enableval"], | ||
518 | 17 | [ac_enable_libavahi="yes"]) | ||
519 | 18 | |||
520 | 19 | AS_IF([test "x$ac_enable_libavahi" = "xyes"],[ | ||
521 | 20 | AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[ | ||
522 | 21 | #include <avahi-client/client.h> | ||
523 | 22 | #include <avahi-common/simple-watch.h> | ||
524 | 23 | ],[ | ||
525 | 24 | AvahiSimplePoll *simple_poll= avahi_simple_poll_new(); | ||
526 | 25 | ]) | ||
527 | 26 | ],[ | ||
528 | 27 | ac_cv_libavahi="no" | ||
529 | 28 | ]) | ||
530 | 29 | |||
531 | 30 | AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"]) | ||
532 | 31 | ]) | ||
533 | 32 | |||
534 | 33 | AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[ | ||
535 | 34 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) | ||
536 | 35 | ]) | ||
537 | 36 | |||
538 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[ | ||
539 | 38 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) | ||
540 | 39 | AS_IF([test "x${ac_cv_libavahi}" = "xno"], | ||
541 | 40 | AC_MSG_ERROR([libavahi is required for ${PACKAGE}])) | ||
542 | 41 | ]) | ||
543 | 0 | 42 | ||
544 | === added file 'm4/pandora_have_libbdb.m4' | |||
545 | --- m4/pandora_have_libbdb.m4 1970-01-01 00:00:00 +0000 | |||
546 | +++ m4/pandora_have_libbdb.m4 2009-12-05 23:40:29 +0000 | |||
547 | @@ -0,0 +1,40 @@ | |||
548 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
549 | 2 | dnl This file is free software; Sun Microsystems | ||
550 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
551 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
552 | 5 | |||
553 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBBDB],[ | ||
554 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
555 | 8 | |||
556 | 9 | dnl -------------------------------------------------------------------- | ||
557 | 10 | dnl Check for bekerely db | ||
558 | 11 | dnl -------------------------------------------------------------------- | ||
559 | 12 | |||
560 | 13 | AC_ARG_ENABLE([libbdb], | ||
561 | 14 | [AS_HELP_STRING([--disable-libbdb], | ||
562 | 15 | [Build with libbdb support @<:@default=on@:>@])], | ||
563 | 16 | [ac_enable_libbdb="$enableval"], | ||
564 | 17 | [ac_enable_libbdb="yes"]) | ||
565 | 18 | |||
566 | 19 | AS_IF([test "x$ac_enable_libbdb" = "xyes"],[ | ||
567 | 20 | AC_LIB_HAVE_LINKFLAGS(db,,[ | ||
568 | 21 | #include <db.h> | ||
569 | 22 | ],[ | ||
570 | 23 | const char *test= DB_VERSION_STRING; | ||
571 | 24 | ]) | ||
572 | 25 | ],[ | ||
573 | 26 | ac_cv_libbdb="no" | ||
574 | 27 | ]) | ||
575 | 28 | |||
576 | 29 | AM_CONDITIONAL(HAVE_LIBBDB, [test "x${ac_cv_libbdb}" = "xyes"]) | ||
577 | 30 | ]) | ||
578 | 31 | |||
579 | 32 | AC_DEFUN([PANDORA_HAVE_LIBBDB],[ | ||
580 | 33 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) | ||
581 | 34 | ]) | ||
582 | 35 | |||
583 | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[ | ||
584 | 37 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) | ||
585 | 38 | AS_IF([test "x${ac_cv_libbdb}" = "xno"], | ||
586 | 39 | AC_MSG_ERROR([libbdb is required for ${PACKAGE}])) | ||
587 | 40 | ]) | ||
588 | 0 | 41 | ||
589 | === added file 'm4/pandora_have_libdl.m4' | |||
590 | --- m4/pandora_have_libdl.m4 1970-01-01 00:00:00 +0000 | |||
591 | +++ m4/pandora_have_libdl.m4 2009-12-05 23:40:29 +0000 | |||
592 | @@ -0,0 +1,51 @@ | |||
593 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
594 | 2 | dnl This file is free software; Sun Microsystems | ||
595 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
596 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
597 | 5 | |||
598 | 6 | #-------------------------------------------------------------------- | ||
599 | 7 | # Check for libdl | ||
600 | 8 | #-------------------------------------------------------------------- | ||
601 | 9 | |||
602 | 10 | |||
603 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBDL],[ | ||
604 | 12 | |||
605 | 13 | save_LIBS="$LIBS" | ||
606 | 14 | LIBS="" | ||
607 | 15 | AC_CHECK_LIB(dl,dlopen) | ||
608 | 16 | AC_CHECK_FUNCS(dlopen) | ||
609 | 17 | LIBDL_LIBS="$LIBS" | ||
610 | 18 | LIBS="$my_save_LIBS" | ||
611 | 19 | AC_SUBST(LIBDL_LIBS) | ||
612 | 20 | |||
613 | 21 | AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"]) | ||
614 | 22 | ]) | ||
615 | 23 | |||
616 | 24 | AC_DEFUN([_PANDORA_HAVE_LIBDL],[ | ||
617 | 25 | |||
618 | 26 | AC_ARG_ENABLE([libdl], | ||
619 | 27 | [AS_HELP_STRING([--disable-libdl], | ||
620 | 28 | [Build with libdl support @<:@default=on@:>@])], | ||
621 | 29 | [ac_enable_libdl="$enableval"], | ||
622 | 30 | [ac_enable_libdl="yes"]) | ||
623 | 31 | |||
624 | 32 | _PANDORA_SEARCH_LIBDL | ||
625 | 33 | ]) | ||
626 | 34 | |||
627 | 35 | |||
628 | 36 | AC_DEFUN([PANDORA_HAVE_LIBDL],[ | ||
629 | 37 | AC_REQUIRE([_PANDORA_HAVE_LIBDL]) | ||
630 | 38 | ]) | ||
631 | 39 | |||
632 | 40 | AC_DEFUN([_PANDORA_REQUIRE_LIBDL],[ | ||
633 | 41 | ac_enable_libdl="yes" | ||
634 | 42 | _PANDORA_SEARCH_LIBDL | ||
635 | 43 | |||
636 | 44 | AS_IF([test "$ac_cv_func_dlopen" != "yes"],[ | ||
637 | 45 | AC_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.]) | ||
638 | 46 | ]) | ||
639 | 47 | ]) | ||
640 | 48 | |||
641 | 49 | AC_DEFUN([PANDORA_REQUIRE_LIBDL],[ | ||
642 | 50 | AC_REQUIRE([_PANDORA_REQUIRE_LIBDL]) | ||
643 | 51 | ]) | ||
644 | 0 | 52 | ||
645 | === added file 'm4/pandora_have_libevent.m4' | |||
646 | --- m4/pandora_have_libevent.m4 1970-01-01 00:00:00 +0000 | |||
647 | +++ m4/pandora_have_libevent.m4 2009-12-05 23:40:29 +0000 | |||
648 | @@ -0,0 +1,66 @@ | |||
649 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
650 | 2 | dnl This file is free software; Sun Microsystems | ||
651 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
652 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
653 | 5 | |||
654 | 6 | #-------------------------------------------------------------------- | ||
655 | 7 | # Check for libevent | ||
656 | 8 | #-------------------------------------------------------------------- | ||
657 | 9 | |||
658 | 10 | |||
659 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[ | ||
660 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
661 | 13 | |||
662 | 14 | AC_LIB_HAVE_LINKFLAGS(event,, | ||
663 | 15 | [ | ||
664 | 16 | #include <sys/types.h> | ||
665 | 17 | #include <sys/time.h> | ||
666 | 18 | #include <stdlib.h> | ||
667 | 19 | #include <event.h> | ||
668 | 20 | ],[ | ||
669 | 21 | struct bufferevent bev; | ||
670 | 22 | bufferevent_settimeout(&bev, 1, 1); | ||
671 | 23 | event_init(); | ||
672 | 24 | event_loop(EVLOOP_ONCE); | ||
673 | 25 | ]) | ||
674 | 26 | |||
675 | 27 | AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"]) | ||
676 | 28 | |||
677 | 29 | AS_IF([test "x${ac_cv_libevent}" = "xyes"],[ | ||
678 | 30 | save_LIBS="${LIBS}" | ||
679 | 31 | LIBS="${LIBS} ${LTLIBEVENT}" | ||
680 | 32 | AC_CHECK_FUNCS(event_base_new) | ||
681 | 33 | AC_CHECK_FUNCS(event_base_free) | ||
682 | 34 | AC_CHECK_FUNCS(event_base_get_method) | ||
683 | 35 | LIBS="$save_LIBS" | ||
684 | 36 | ]) | ||
685 | 37 | ]) | ||
686 | 38 | |||
687 | 39 | AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[ | ||
688 | 40 | |||
689 | 41 | AC_ARG_ENABLE([libevent], | ||
690 | 42 | [AS_HELP_STRING([--disable-libevent], | ||
691 | 43 | [Build with libevent support @<:@default=on@:>@])], | ||
692 | 44 | [ac_enable_libevent="$enableval"], | ||
693 | 45 | [ac_enable_libevent="yes"]) | ||
694 | 46 | |||
695 | 47 | _PANDORA_SEARCH_LIBEVENT | ||
696 | 48 | ]) | ||
697 | 49 | |||
698 | 50 | |||
699 | 51 | AC_DEFUN([PANDORA_HAVE_LIBEVENT],[ | ||
700 | 52 | AC_REQUIRE([_PANDORA_HAVE_LIBEVENT]) | ||
701 | 53 | ]) | ||
702 | 54 | |||
703 | 55 | AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[ | ||
704 | 56 | ac_enable_libevent="yes" | ||
705 | 57 | _PANDORA_SEARCH_LIBEVENT | ||
706 | 58 | |||
707 | 59 | AS_IF([test x$ac_cv_libevent = xno],[ | ||
708 | 60 | AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.]) | ||
709 | 61 | ]) | ||
710 | 62 | ]) | ||
711 | 63 | |||
712 | 64 | AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[ | ||
713 | 65 | AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT]) | ||
714 | 66 | ]) | ||
715 | 0 | 67 | ||
716 | === modified file 'm4/pandora_have_libgearman.m4' | |||
717 | --- m4/pandora_have_libgearman.m4 2009-07-29 18:43:09 +0000 | |||
718 | +++ m4/pandora_have_libgearman.m4 2009-12-05 23:40:29 +0000 | |||
719 | @@ -21,7 +21,7 @@ | |||
720 | 21 | #include <libgearman/gearman.h> | 21 | #include <libgearman/gearman.h> |
721 | 22 | ],[ | 22 | ],[ |
722 | 23 | gearman_client_st gearman_client; | 23 | gearman_client_st gearman_client; |
724 | 24 | gearman_version(); | 24 | gearman_client_context(&gearman_client); |
725 | 25 | ]) | 25 | ]) |
726 | 26 | ],[ | 26 | ],[ |
727 | 27 | ac_cv_libgearman="no" | 27 | ac_cv_libgearman="no" |
728 | @@ -37,5 +37,5 @@ | |||
729 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ |
730 | 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) | 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) |
731 | 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], | 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], |
733 | 40 | AC_MSG_ERROR([libgearman is required for ${PACKAGE}])) | 40 | AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}])) |
734 | 41 | ]) | 41 | ]) |
735 | 42 | 42 | ||
736 | === modified file 'm4/pandora_have_libmemcached.m4' | |||
737 | --- m4/pandora_have_libmemcached.m4 2009-08-07 21:05:59 +0000 | |||
738 | +++ m4/pandora_have_libmemcached.m4 2009-12-05 23:40:29 +0000 | |||
739 | @@ -30,7 +30,6 @@ | |||
740 | 30 | 30 | ||
741 | 31 | AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) | 31 | AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) |
742 | 32 | 32 | ||
743 | 33 | AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ]) | ||
744 | 34 | ]) | 33 | ]) |
745 | 35 | 34 | ||
746 | 36 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ | 35 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ |
747 | 37 | 36 | ||
748 | === added file 'm4/pandora_have_libpcre.m4' | |||
749 | --- m4/pandora_have_libpcre.m4 1970-01-01 00:00:00 +0000 | |||
750 | +++ m4/pandora_have_libpcre.m4 2009-12-05 23:40:29 +0000 | |||
751 | @@ -0,0 +1,73 @@ | |||
752 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
753 | 2 | dnl This file is free software; Sun Microsystems | ||
754 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
755 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
756 | 5 | |||
757 | 6 | #-------------------------------------------------------------------- | ||
758 | 7 | # Check for libpcre | ||
759 | 8 | #-------------------------------------------------------------------- | ||
760 | 9 | |||
761 | 10 | |||
762 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[ | ||
763 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
764 | 13 | |||
765 | 14 | AC_LIB_HAVE_LINKFLAGS(pcre,, | ||
766 | 15 | [#include <pcre.h>], | ||
767 | 16 | [ | ||
768 | 17 | pcre *re= NULL; | ||
769 | 18 | pcre_version(); | ||
770 | 19 | ]) | ||
771 | 20 | AS_IF([test "x$ac_cv_libpcre" = "xno"], | ||
772 | 21 | [ | ||
773 | 22 | unset ac_cv_libpcre | ||
774 | 23 | unset HAVE_LIBPCRE | ||
775 | 24 | unset LIBPCRE | ||
776 | 25 | unset LIBPCRE_PREFIX | ||
777 | 26 | unset LTLIBPCRE | ||
778 | 27 | AC_LIB_HAVE_LINKFLAGS(pcre,, | ||
779 | 28 | [#include <pcre/pcre.h>], | ||
780 | 29 | [ | ||
781 | 30 | pcre *re= NULL; | ||
782 | 31 | pcre_version(); | ||
783 | 32 | ]) | ||
784 | 33 | AS_IF([test "x$ac_cv_libpcre" = "xyes"], [ | ||
785 | 34 | ac_cv_pcre_location="<pcre/pcre.h>" | ||
786 | 35 | ]) | ||
787 | 36 | ],[ | ||
788 | 37 | ac_cv_pcre_location="<pcre.h>" | ||
789 | 38 | ]) | ||
790 | 39 | |||
791 | 40 | AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"]) | ||
792 | 41 | ]) | ||
793 | 42 | |||
794 | 43 | AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[ | ||
795 | 44 | |||
796 | 45 | AC_ARG_ENABLE([libpcre], | ||
797 | 46 | [AS_HELP_STRING([--disable-libpcre], | ||
798 | 47 | [Build with libpcre support @<:@default=on@:>@])], | ||
799 | 48 | [ac_enable_libpcre="$enableval"], | ||
800 | 49 | [ac_enable_libpcre="yes"]) | ||
801 | 50 | |||
802 | 51 | _PANDORA_SEARCH_LIBPCRE | ||
803 | 52 | ]) | ||
804 | 53 | |||
805 | 54 | |||
806 | 55 | AC_DEFUN([PANDORA_HAVE_LIBPCRE],[ | ||
807 | 56 | AC_REQUIRE([_PANDORA_HAVE_LIBPCRE]) | ||
808 | 57 | ]) | ||
809 | 58 | |||
810 | 59 | AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[ | ||
811 | 60 | ac_enable_libpcre="yes" | ||
812 | 61 | _PANDORA_SEARCH_LIBPCRE | ||
813 | 62 | |||
814 | 63 | AS_IF([test x$ac_cv_libpcre = xno],[ | ||
815 | 64 | AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.]) | ||
816 | 65 | ],[ | ||
817 | 66 | AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}], | ||
818 | 67 | [Location of pcre header]) | ||
819 | 68 | ]) | ||
820 | 69 | ]) | ||
821 | 70 | |||
822 | 71 | AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[ | ||
823 | 72 | AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE]) | ||
824 | 73 | ]) | ||
825 | 0 | 74 | ||
826 | === added file 'm4/pandora_have_libreadline.m4' | |||
827 | --- m4/pandora_have_libreadline.m4 1970-01-01 00:00:00 +0000 | |||
828 | +++ m4/pandora_have_libreadline.m4 2009-12-05 23:40:29 +0000 | |||
829 | @@ -0,0 +1,242 @@ | |||
830 | 1 | # | ||
831 | 2 | # SYNOPSIS | ||
832 | 3 | # | ||
833 | 4 | # PANDORA_HAVE_LIBREADLINE | ||
834 | 5 | # | ||
835 | 6 | # DESCRIPTION | ||
836 | 7 | # | ||
837 | 8 | # Searches for a readline compatible library. If found, defines | ||
838 | 9 | # `HAVE_LIBREADLINE'. If the found library has the `add_history' | ||
839 | 10 | # function, sets also `HAVE_READLINE_HISTORY'. Also checks for the | ||
840 | 11 | # locations of the necessary include files and sets `HAVE_READLINE_H' | ||
841 | 12 | # or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or | ||
842 | 13 | # 'HAVE_HISTORY_H' if the corresponding include files exists. | ||
843 | 14 | # | ||
844 | 15 | # The libraries that may be readline compatible are `libedit', | ||
845 | 16 | # `libeditline' and `libreadline'. Sometimes we need to link a | ||
846 | 17 | # termcap library for readline to work, this macro tests these cases | ||
847 | 18 | # too by trying to link with `libtermcap', `libcurses' or | ||
848 | 19 | # `libncurses' before giving up. | ||
849 | 20 | # | ||
850 | 21 | # Here is an example of how to use the information provided by this | ||
851 | 22 | # macro to perform the necessary includes or declarations in a C | ||
852 | 23 | # file: | ||
853 | 24 | # | ||
854 | 25 | # #ifdef HAVE_LIBREADLINE | ||
855 | 26 | # # if defined(HAVE_READLINE_READLINE_H) | ||
856 | 27 | # # include <readline/readline.h> | ||
857 | 28 | # # elif defined(HAVE_READLINE_H) | ||
858 | 29 | # # include <readline.h> | ||
859 | 30 | # # else /* !defined(HAVE_READLINE_H) */ | ||
860 | 31 | # extern char *readline (); | ||
861 | 32 | # # endif /* !defined(HAVE_READLINE_H) */ | ||
862 | 33 | # char *cmdline = NULL; | ||
863 | 34 | # #else /* !defined(HAVE_READLINE_READLINE_H) */ | ||
864 | 35 | # /* no readline */ | ||
865 | 36 | # #endif /* HAVE_LIBREADLINE */ | ||
866 | 37 | # | ||
867 | 38 | # #ifdef HAVE_READLINE_HISTORY | ||
868 | 39 | # # if defined(HAVE_READLINE_HISTORY_H) | ||
869 | 40 | # # include <readline/history.h> | ||
870 | 41 | # # elif defined(HAVE_HISTORY_H) | ||
871 | 42 | # # include <history.h> | ||
872 | 43 | # # else /* !defined(HAVE_HISTORY_H) */ | ||
873 | 44 | # extern void add_history (); | ||
874 | 45 | # extern int write_history (); | ||
875 | 46 | # extern int read_history (); | ||
876 | 47 | # # endif /* defined(HAVE_READLINE_HISTORY_H) */ | ||
877 | 48 | # /* no history */ | ||
878 | 49 | # #endif /* HAVE_READLINE_HISTORY */ | ||
879 | 50 | # | ||
880 | 51 | # LAST MODIFICATION | ||
881 | 52 | # | ||
882 | 53 | # 2009-11-17 | ||
883 | 54 | # | ||
884 | 55 | # Based on VL_LIB_READLINE from Ville Laurikari | ||
885 | 56 | # | ||
886 | 57 | # COPYLEFT | ||
887 | 58 | # | ||
888 | 59 | # Copyright (c) 2009 Monty Taylor | ||
889 | 60 | # Copyright (c) 2002 Ville Laurikari <vl@iki.fi> | ||
890 | 61 | # | ||
891 | 62 | # Copying and distribution of this file, with or without | ||
892 | 63 | # modification, are permitted in any medium without royalty provided | ||
893 | 64 | # the copyright notice and this notice are preserved. | ||
894 | 65 | |||
895 | 66 | AC_DEFUN([PANDORA_CHECK_TIOCGWINSZ],[ | ||
896 | 67 | AC_CACHE_CHECK([for TIOCGWINSZ in sys/ioctl.h], | ||
897 | 68 | [pandora_cv_tiocgwinsz_in_ioctl],[ | ||
898 | 69 | AC_COMPILE_IFELSE([ | ||
899 | 70 | AC_LANG_PROGRAM([[ | ||
900 | 71 | #include <sys/types.h> | ||
901 | 72 | #include <sys/ioctl.h> | ||
902 | 73 | ]],[[ | ||
903 | 74 | int x= TIOCGWINSZ; | ||
904 | 75 | ]]) | ||
905 | 76 | ],[ | ||
906 | 77 | pandora_cv_tiocgwinsz_in_ioctl=yes | ||
907 | 78 | ],[ | ||
908 | 79 | pandora_cv_tiocgwinsz_in_ioctl=no | ||
909 | 80 | ]) | ||
910 | 81 | ]) | ||
911 | 82 | AS_IF([test "$pandora_cv_tiocgwinsz_in_ioctl" = "yes"],[ | ||
912 | 83 | AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1], | ||
913 | 84 | [READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.]) | ||
914 | 85 | ]) | ||
915 | 86 | ]) | ||
916 | 87 | |||
917 | 88 | AC_DEFUN([PANDORA_CHECK_RL_COMPENTRY], [ | ||
918 | 89 | AC_CACHE_CHECK([defined rl_compentry_func_t], [pandora_cv_rl_compentry],[ | ||
919 | 90 | AC_COMPILE_IFELSE([ | ||
920 | 91 | AC_LANG_PROGRAM([[ | ||
921 | 92 | #include "stdio.h" | ||
922 | 93 | #include "readline/readline.h" | ||
923 | 94 | ]],[[ | ||
924 | 95 | rl_compentry_func_t *func2= (rl_compentry_func_t*)0; | ||
925 | 96 | ]]) | ||
926 | 97 | ],[ | ||
927 | 98 | pandora_cv_rl_compentry=yes | ||
928 | 99 | ],[ | ||
929 | 100 | pandora_cv_rl_compentry=no | ||
930 | 101 | ]) | ||
931 | 102 | ]) | ||
932 | 103 | AS_IF([test "$pandora_cv_rl_compentry" = "yes"],[ | ||
933 | 104 | AC_DEFINE([HAVE_RL_COMPENTRY], [1], | ||
934 | 105 | [Does system provide rl_compentry_func_t]) | ||
935 | 106 | ]) | ||
936 | 107 | |||
937 | 108 | AC_LANG_PUSH(C++) | ||
938 | 109 | save_CXXFLAGS="${CXXFLAGS}" | ||
939 | 110 | CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" | ||
940 | 111 | AC_CACHE_CHECK([rl_compentry_func_t works], [pandora_cv_rl_compentry_works],[ | ||
941 | 112 | AC_COMPILE_IFELSE([ | ||
942 | 113 | AC_LANG_PROGRAM([[ | ||
943 | 114 | #include "stdio.h" | ||
944 | 115 | #include "readline/readline.h" | ||
945 | 116 | ]],[[ | ||
946 | 117 | rl_completion_entry_function= (rl_compentry_func_t*)NULL; | ||
947 | 118 | ]]) | ||
948 | 119 | ],[ | ||
949 | 120 | pandora_cv_rl_compentry_works=yes | ||
950 | 121 | ],[ | ||
951 | 122 | pandora_cv_rl_compentry_works=no | ||
952 | 123 | ]) | ||
953 | 124 | ]) | ||
954 | 125 | AS_IF([test "$pandora_cv_rl_compentry_works" = "yes"],[ | ||
955 | 126 | AC_DEFINE([HAVE_WORKING_RL_COMPENTRY], [1], | ||
956 | 127 | [Does system provide an rl_compentry_func_t that is usable]) | ||
957 | 128 | ]) | ||
958 | 129 | CXXFLAGS="${save_CXXFLAGS}" | ||
959 | 130 | AC_LANG_POP() | ||
960 | 131 | ]) | ||
961 | 132 | |||
962 | 133 | |||
963 | 134 | AC_DEFUN([PANDORA_CHECK_RL_COMPLETION_FUNC], [ | ||
964 | 135 | AC_CACHE_CHECK([defined rl_completion_func_t], [pandora_cv_rl_completion],[ | ||
965 | 136 | AC_COMPILE_IFELSE([ | ||
966 | 137 | AC_LANG_PROGRAM([[ | ||
967 | 138 | #include "stdio.h" | ||
968 | 139 | #include "readline/readline.h" | ||
969 | 140 | ]],[[ | ||
970 | 141 | rl_completion_func_t *func1= (rl_completion_func_t*)0; | ||
971 | 142 | ]]) | ||
972 | 143 | ],[ | ||
973 | 144 | pandora_cv_rl_completion=yes | ||
974 | 145 | ],[ | ||
975 | 146 | pandora_cv_rl_completion=no | ||
976 | 147 | ]) | ||
977 | 148 | ]) | ||
978 | 149 | AS_IF([test "$pandora_cv_rl_completion" = "yes"],[ | ||
979 | 150 | AC_DEFINE([HAVE_RL_COMPLETION], [1], | ||
980 | 151 | [Does system provide rl_completion_func_t]) | ||
981 | 152 | ]) | ||
982 | 153 | ]) | ||
983 | 154 | |||
984 | 155 | AC_DEFUN([_PANDORA_SEARCH_LIBREADLINE], [ | ||
985 | 156 | |||
986 | 157 | save_LIBS="${LIBS}" | ||
987 | 158 | LIBS="" | ||
988 | 159 | |||
989 | 160 | AC_CACHE_CHECK([for a readline compatible library], | ||
990 | 161 | ac_cv_libreadline, [ | ||
991 | 162 | ORIG_LIBS="$LIBS" | ||
992 | 163 | for readline_lib in readline edit editline; do | ||
993 | 164 | for termcap_lib in "" termcap curses ncurses; do | ||
994 | 165 | if test -z "$termcap_lib"; then | ||
995 | 166 | TRY_LIB="-l$readline_lib" | ||
996 | 167 | else | ||
997 | 168 | TRY_LIB="-l$readline_lib -l$termcap_lib" | ||
998 | 169 | fi | ||
999 | 170 | LIBS="$ORIG_LIBS $TRY_LIB" | ||
1000 | 171 | AC_TRY_LINK_FUNC(readline, ac_cv_libreadline="$TRY_LIB") | ||
1001 | 172 | if test -n "$ac_cv_libreadline"; then | ||
1002 | 173 | break | ||
1003 | 174 | fi | ||
1004 | 175 | done | ||
1005 | 176 | if test -n "$ac_cv_libreadline"; then | ||
1006 | 177 | break | ||
1007 | 178 | fi | ||
1008 | 179 | done | ||
1009 | 180 | if test -z "$ac_cv_libreadline"; then | ||
1010 | 181 | ac_cv_libreadline="no" | ||
1011 | 182 | LIBS="$ORIG_LIBS" | ||
1012 | 183 | fi | ||
1013 | 184 | ]) | ||
1014 | 185 | |||
1015 | 186 | if test "$ac_cv_libreadline" != "no"; then | ||
1016 | 187 | AC_DEFINE(HAVE_LIBREADLINE, 1, | ||
1017 | 188 | [Define if you have a readline compatible library]) | ||
1018 | 189 | AC_CHECK_HEADERS(readline.h readline/readline.h) | ||
1019 | 190 | AC_CACHE_CHECK([whether readline supports history], | ||
1020 | 191 | ac_cv_libreadline_history, [ | ||
1021 | 192 | ac_cv_libreadline_history="no" | ||
1022 | 193 | AC_TRY_LINK_FUNC(add_history, ac_cv_libreadline_history="yes") | ||
1023 | 194 | ]) | ||
1024 | 195 | if test "$ac_cv_libreadline_history" = "yes"; then | ||
1025 | 196 | AC_DEFINE(HAVE_READLINE_HISTORY, 1, | ||
1026 | 197 | [Define if your readline library has \`add_history']) | ||
1027 | 198 | AC_CHECK_HEADERS(history.h readline/history.h) | ||
1028 | 199 | fi | ||
1029 | 200 | fi | ||
1030 | 201 | PANDORA_CHECK_RL_COMPENTRY | ||
1031 | 202 | PANDORA_CHECK_RL_COMPLETION_FUNC | ||
1032 | 203 | PANDORA_CHECK_TIOCGWINSZ | ||
1033 | 204 | |||
1034 | 205 | |||
1035 | 206 | READLINE_LIBS="${LIBS}" | ||
1036 | 207 | LIBS="${save_LIBS}" | ||
1037 | 208 | AC_SUBST(READLINE_LIBS) | ||
1038 | 209 | |||
1039 | 210 | AM_CONDITIONAL(HAVE_LIBREADLINE, [test "x${ac_cv_libreadline}" = "xyes"]) | ||
1040 | 211 | ]) | ||
1041 | 212 | |||
1042 | 213 | AC_DEFUN([_PANDORA_HAVE_LIBREADLINE],[ | ||
1043 | 214 | |||
1044 | 215 | AC_ARG_ENABLE([libreadline], | ||
1045 | 216 | [AS_HELP_STRING([--disable-libreadline], | ||
1046 | 217 | [Build with libreadline support @<:@default=on@:>@])], | ||
1047 | 218 | [ac_enable_libreadline="$enableval"], | ||
1048 | 219 | [ac_enable_libreadline="yes"]) | ||
1049 | 220 | |||
1050 | 221 | _PANDORA_SEARCH_LIBREADLINE | ||
1051 | 222 | ]) | ||
1052 | 223 | |||
1053 | 224 | |||
1054 | 225 | AC_DEFUN([PANDORA_HAVE_LIBREADLINE],[ | ||
1055 | 226 | AC_REQUIRE([_PANDORA_HAVE_LIBREADLINE]) | ||
1056 | 227 | ]) | ||
1057 | 228 | |||
1058 | 229 | AC_DEFUN([_PANDORA_REQUIRE_LIBREADLINE],[ | ||
1059 | 230 | ac_enable_libreadline="yes" | ||
1060 | 231 | _PANDORA_SEARCH_LIBREADLINE | ||
1061 | 232 | |||
1062 | 233 | AS_IF([test "x$ac_cv_libreadline" = "xno"], | ||
1063 | 234 | AC_MSG_ERROR([libreadline is required for ${PACKAGE}. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.])) | ||
1064 | 235 | |||
1065 | 236 | ]) | ||
1066 | 237 | |||
1067 | 238 | AC_DEFUN([PANDORA_REQUIRE_LIBREADLINE],[ | ||
1068 | 239 | AC_REQUIRE([_PANDORA_REQUIRE_LIBREADLINE]) | ||
1069 | 240 | ]) | ||
1070 | 241 | |||
1071 | 242 | |||
1072 | 0 | 243 | ||
1073 | === added file 'm4/pandora_have_libtokyocabinet.m4' | |||
1074 | --- m4/pandora_have_libtokyocabinet.m4 1970-01-01 00:00:00 +0000 | |||
1075 | +++ m4/pandora_have_libtokyocabinet.m4 2009-12-05 23:40:29 +0000 | |||
1076 | @@ -0,0 +1,52 @@ | |||
1077 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1078 | 2 | dnl This file is free software; Sun Microsystems | ||
1079 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1080 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1081 | 5 | |||
1082 | 6 | dnl Provides support for finding libtokyocabinet. | ||
1083 | 7 | dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET | ||
1084 | 8 | |||
1085 | 9 | AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[ | ||
1086 | 10 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1087 | 11 | |||
1088 | 12 | dnl -------------------------------------------------------------------- | ||
1089 | 13 | dnl Check for libtokyocabinet | ||
1090 | 14 | dnl -------------------------------------------------------------------- | ||
1091 | 15 | |||
1092 | 16 | AC_ARG_ENABLE([libtokyocabinet], | ||
1093 | 17 | [AS_HELP_STRING([--disable-libtokyocabinet], | ||
1094 | 18 | [Build with libtokyocabinet support @<:@default=on@:>@])], | ||
1095 | 19 | [ac_enable_libtokyocabinet="$enableval"], | ||
1096 | 20 | [ac_enable_libtokyocabinet="yes"]) | ||
1097 | 21 | |||
1098 | 22 | AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[ | ||
1099 | 23 | AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[ | ||
1100 | 24 | #include <tcutil.h> | ||
1101 | 25 | ],[ | ||
1102 | 26 | const char *test= tcversion; | ||
1103 | 27 | ]) | ||
1104 | 28 | ],[ | ||
1105 | 29 | ac_cv_libtokyocabinet="no" | ||
1106 | 30 | ]) | ||
1107 | 31 | |||
1108 | 32 | AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[ | ||
1109 | 33 | |||
1110 | 34 | PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet], [ | ||
1111 | 35 | ac_cv_libtokyocabinet=yes | ||
1112 | 36 | LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} | ||
1113 | 37 | LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} | ||
1114 | 38 | ],[]) | ||
1115 | 39 | ]) | ||
1116 | 40 | |||
1117 | 41 | AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"]) | ||
1118 | 42 | ]) | ||
1119 | 43 | |||
1120 | 44 | AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[ | ||
1121 | 45 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) | ||
1122 | 46 | ]) | ||
1123 | 47 | |||
1124 | 48 | AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[ | ||
1125 | 49 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) | ||
1126 | 50 | AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"], | ||
1127 | 51 | AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.])) | ||
1128 | 52 | ]) | ||
1129 | 0 | 53 | ||
1130 | === added file 'm4/pandora_have_libuuid.m4' | |||
1131 | --- m4/pandora_have_libuuid.m4 1970-01-01 00:00:00 +0000 | |||
1132 | +++ m4/pandora_have_libuuid.m4 2009-12-05 23:40:29 +0000 | |||
1133 | @@ -0,0 +1,55 @@ | |||
1134 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1135 | 2 | dnl This file is free software; Sun Microsystems | ||
1136 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1137 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1138 | 5 | |||
1139 | 6 | #-------------------------------------------------------------------- | ||
1140 | 7 | # Check for libuuid | ||
1141 | 8 | #-------------------------------------------------------------------- | ||
1142 | 9 | |||
1143 | 10 | |||
1144 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[ | ||
1145 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1146 | 13 | |||
1147 | 14 | dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may | ||
1148 | 15 | dnl not be a lib is weird. | ||
1149 | 16 | AC_CHECK_HEADERS(uuid/uuid.h) | ||
1150 | 17 | AC_LIB_HAVE_LINKFLAGS(uuid,, | ||
1151 | 18 | [ | ||
1152 | 19 | #include <uuid/uuid.h> | ||
1153 | 20 | ], | ||
1154 | 21 | [ | ||
1155 | 22 | uuid_t uout; | ||
1156 | 23 | uuid_generate(uout); | ||
1157 | 24 | ]) | ||
1158 | 25 | |||
1159 | 26 | AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"]) | ||
1160 | 27 | ]) | ||
1161 | 28 | |||
1162 | 29 | AC_DEFUN([_PANDORA_HAVE_LIBUUID],[ | ||
1163 | 30 | |||
1164 | 31 | AC_ARG_ENABLE([libuuid], | ||
1165 | 32 | [AS_HELP_STRING([--disable-libuuid], | ||
1166 | 33 | [Build with libuuid support @<:@default=on@:>@])], | ||
1167 | 34 | [ac_enable_libuuid="$enableval"], | ||
1168 | 35 | [ac_enable_libuuid="yes"]) | ||
1169 | 36 | |||
1170 | 37 | _PANDORA_SEARCH_LIBUUID | ||
1171 | 38 | ]) | ||
1172 | 39 | |||
1173 | 40 | |||
1174 | 41 | AC_DEFUN([PANDORA_HAVE_LIBUUID],[ | ||
1175 | 42 | AC_REQUIRE([_PANDORA_HAVE_LIBUUID]) | ||
1176 | 43 | ]) | ||
1177 | 44 | |||
1178 | 45 | AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[ | ||
1179 | 46 | ac_enable_libuuid="yes" | ||
1180 | 47 | _PANDORA_SEARCH_LIBUUID | ||
1181 | 48 | AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[ | ||
1182 | 49 | AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.]) | ||
1183 | 50 | ]) | ||
1184 | 51 | ]) | ||
1185 | 52 | |||
1186 | 53 | AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[ | ||
1187 | 54 | AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID]) | ||
1188 | 55 | ]) | ||
1189 | 0 | 56 | ||
1190 | === added file 'm4/pandora_have_libxml2.m4' | |||
1191 | --- m4/pandora_have_libxml2.m4 1970-01-01 00:00:00 +0000 | |||
1192 | +++ m4/pandora_have_libxml2.m4 2009-12-05 23:40:29 +0000 | |||
1193 | @@ -0,0 +1,52 @@ | |||
1194 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1195 | 2 | dnl This file is free software; Sun Microsystems | ||
1196 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1197 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1198 | 5 | |||
1199 | 6 | dnl Provides support for finding libxml2. | ||
1200 | 7 | dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2 | ||
1201 | 8 | |||
1202 | 9 | AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[ | ||
1203 | 10 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1204 | 11 | |||
1205 | 12 | dnl -------------------------------------------------------------------- | ||
1206 | 13 | dnl Check for libxml2 | ||
1207 | 14 | dnl -------------------------------------------------------------------- | ||
1208 | 15 | |||
1209 | 16 | AC_ARG_ENABLE([libxml2], | ||
1210 | 17 | [AS_HELP_STRING([--disable-libxml2], | ||
1211 | 18 | [Build with libxml2 support @<:@default=on@:>@])], | ||
1212 | 19 | [ac_enable_libxml2="$enableval"], | ||
1213 | 20 | [ac_enable_libxml2="yes"]) | ||
1214 | 21 | |||
1215 | 22 | AS_IF([test "x$ac_enable_libxml2" = "xyes"],[ | ||
1216 | 23 | AC_LIB_HAVE_LINKFLAGS(xml2,,[ | ||
1217 | 24 | #include <libxml/xmlversion.h> | ||
1218 | 25 | ],[ | ||
1219 | 26 | const char *test= LIBXML_DOTTED_VERSION; | ||
1220 | 27 | ]) | ||
1221 | 28 | ],[ | ||
1222 | 29 | ac_cv_libxml2="no" | ||
1223 | 30 | ]) | ||
1224 | 31 | |||
1225 | 32 | AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[ | ||
1226 | 33 | |||
1227 | 34 | PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [ | ||
1228 | 35 | ac_cv_libxml2=yes | ||
1229 | 36 | LTLIBXML2=${LIBXML2_LIBS} | ||
1230 | 37 | LIBXML2=${LIBXML2_LIBS} | ||
1231 | 38 | ],[]) | ||
1232 | 39 | ]) | ||
1233 | 40 | |||
1234 | 41 | AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"]) | ||
1235 | 42 | ]) | ||
1236 | 43 | |||
1237 | 44 | AC_DEFUN([PANDORA_HAVE_LIBXML2],[ | ||
1238 | 45 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) | ||
1239 | 46 | ]) | ||
1240 | 47 | |||
1241 | 48 | AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[ | ||
1242 | 49 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) | ||
1243 | 50 | AS_IF([test "x${ac_cv_libxml2}" = "xno"], | ||
1244 | 51 | AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.])) | ||
1245 | 52 | ]) | ||
1246 | 0 | 53 | ||
1247 | === added file 'm4/pandora_have_libz.m4' | |||
1248 | --- m4/pandora_have_libz.m4 1970-01-01 00:00:00 +0000 | |||
1249 | +++ m4/pandora_have_libz.m4 2009-12-05 23:40:29 +0000 | |||
1250 | @@ -0,0 +1,51 @@ | |||
1251 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1252 | 2 | dnl This file is free software; Sun Microsystems | ||
1253 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1254 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1255 | 5 | |||
1256 | 6 | #-------------------------------------------------------------------- | ||
1257 | 7 | # Check for libz | ||
1258 | 8 | #-------------------------------------------------------------------- | ||
1259 | 9 | |||
1260 | 10 | |||
1261 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBZ],[ | ||
1262 | 12 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1263 | 13 | |||
1264 | 14 | AC_LIB_HAVE_LINKFLAGS(z,, | ||
1265 | 15 | [ | ||
1266 | 16 | #include <zlib.h> | ||
1267 | 17 | ],[ | ||
1268 | 18 | crc32(0, Z_NULL, 0); | ||
1269 | 19 | ]) | ||
1270 | 20 | |||
1271 | 21 | AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"]) | ||
1272 | 22 | ]) | ||
1273 | 23 | |||
1274 | 24 | AC_DEFUN([_PANDORA_HAVE_LIBZ],[ | ||
1275 | 25 | |||
1276 | 26 | AC_ARG_ENABLE([libz], | ||
1277 | 27 | [AS_HELP_STRING([--disable-libz], | ||
1278 | 28 | [Build with libz support @<:@default=on@:>@])], | ||
1279 | 29 | [ac_enable_libz="$enableval"], | ||
1280 | 30 | [ac_enable_libz="yes"]) | ||
1281 | 31 | |||
1282 | 32 | _PANDORA_SEARCH_LIBZ | ||
1283 | 33 | ]) | ||
1284 | 34 | |||
1285 | 35 | |||
1286 | 36 | AC_DEFUN([PANDORA_HAVE_LIBZ],[ | ||
1287 | 37 | AC_REQUIRE([_PANDORA_HAVE_LIBZ]) | ||
1288 | 38 | ]) | ||
1289 | 39 | |||
1290 | 40 | AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[ | ||
1291 | 41 | ac_enable_libz="yes" | ||
1292 | 42 | _PANDORA_SEARCH_LIBZ | ||
1293 | 43 | |||
1294 | 44 | AS_IF([test x$ac_cv_libz = xno],[ | ||
1295 | 45 | AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.]) | ||
1296 | 46 | ]) | ||
1297 | 47 | ]) | ||
1298 | 48 | |||
1299 | 49 | AC_DEFUN([PANDORA_REQUIRE_LIBZ],[ | ||
1300 | 50 | AC_REQUIRE([_PANDORA_REQUIRE_LIBZ]) | ||
1301 | 51 | ]) | ||
1302 | 0 | 52 | ||
1303 | === modified file 'm4/pandora_header_assert.m4' | |||
1304 | --- m4/pandora_header_assert.m4 2009-07-08 07:18:46 +0000 | |||
1305 | +++ m4/pandora_header_assert.m4 2009-12-05 23:40:29 +0000 | |||
1306 | @@ -8,6 +8,7 @@ | |||
1307 | 8 | dnl Check whether to enable assertions. | 8 | dnl Check whether to enable assertions. |
1308 | 9 | AC_DEFUN([PANDORA_HEADER_ASSERT], | 9 | AC_DEFUN([PANDORA_HEADER_ASSERT], |
1309 | 10 | [ | 10 | [ |
1310 | 11 | AC_CHECK_HEADERS(assert.h) | ||
1311 | 11 | AC_MSG_CHECKING([whether to enable assertions]) | 12 | AC_MSG_CHECKING([whether to enable assertions]) |
1312 | 12 | AC_ARG_ENABLE([assert], | 13 | AC_ARG_ENABLE([assert], |
1313 | 13 | [AS_HELP_STRING([--disable-assert], | 14 | [AS_HELP_STRING([--disable-assert], |
1314 | @@ -16,8 +17,7 @@ | |||
1315 | 16 | [ac_cv_assert="yes"]) | 17 | [ac_cv_assert="yes"]) |
1316 | 17 | AC_MSG_RESULT([$ac_cv_assert]) | 18 | AC_MSG_RESULT([$ac_cv_assert]) |
1317 | 18 | 19 | ||
1320 | 19 | AS_IF([test "$ac_cv_assert" = "yes"], | 20 | AS_IF([test "$ac_cv_assert" = "no"], |
1319 | 20 | [AC_CHECK_HEADERS(assert.h)], | ||
1321 | 21 | [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])]) | 21 | [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])]) |
1322 | 22 | ]) | 22 | ]) |
1323 | 23 | 23 | ||
1324 | 24 | 24 | ||
1325 | === modified file 'm4/pandora_libtool.m4' | |||
1326 | --- m4/pandora_libtool.m4 2009-07-08 07:18:46 +0000 | |||
1327 | +++ m4/pandora_libtool.m4 2009-12-05 23:40:29 +0000 | |||
1328 | @@ -5,6 +5,15 @@ | |||
1329 | 5 | 5 | ||
1330 | 6 | AC_DEFUN([PANDORA_LIBTOOL],[ | 6 | AC_DEFUN([PANDORA_LIBTOOL],[ |
1331 | 7 | AC_REQUIRE([AC_PROG_LIBTOOL]) | 7 | AC_REQUIRE([AC_PROG_LIBTOOL]) |
1332 | 8 | m4_ifndef([LT_PREREQ],[ | ||
1333 | 9 | pandora_have_old_libtool=yes | ||
1334 | 10 | ],[ | ||
1335 | 11 | pandora_have_old_libtool=no | ||
1336 | 12 | ]) | ||
1337 | 13 | AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ | ||
1338 | 14 | AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) | ||
1339 | 15 | ]) | ||
1340 | 16 | |||
1341 | 8 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read | 17 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read |
1342 | 9 | dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT | 18 | dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT |
1343 | 10 | dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it. | 19 | dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it. |
1344 | 11 | 20 | ||
1345 | === modified file 'm4/pandora_plugins.m4' | |||
1346 | --- m4/pandora_plugins.m4 2009-09-16 21:10:51 +0000 | |||
1347 | +++ m4/pandora_plugins.m4 2009-12-05 23:40:29 +0000 | |||
1348 | @@ -9,20 +9,32 @@ | |||
1349 | 9 | 9 | ||
1350 | 10 | AC_DEFUN([PANDORA_PLUGINS],[ | 10 | AC_DEFUN([PANDORA_PLUGINS],[ |
1351 | 11 | 11 | ||
1353 | 12 | m4_sinclude(config/plugin.ac) | 12 | dnl We do this to prime the files from a fresh checkout. Normally we want |
1354 | 13 | dnl these commands to be executed by make. Perhaps we should split them into | ||
1355 | 14 | dnl a few shell script snippets in config and make Make call them... we're | ||
1356 | 15 | dnl going to get there... | ||
1357 | 16 | dnl ANYWAY - syscmd gets called during aclocal - so before automake. It will | ||
1358 | 17 | dnl get called probably during autoconf too, so it's important to protect | ||
1359 | 18 | dnl with test -f ... if the files exist, we don't have the chicken/egg | ||
1360 | 19 | dnl problem and therefore don't need to do anything here | ||
1361 | 20 | m4_syscmd([python config/pandora-plugin > /dev/null]) | ||
1362 | 21 | m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4]) | ||
1363 | 22 | |||
1364 | 23 | m4_sinclude(config/pandora-plugin.ac) | ||
1365 | 24 | |||
1366 | 13 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list | 25 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list |
1367 | 14 | AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list], | ||
1368 | 15 | [List of plugins that should be loaded on startup if no | ||
1369 | 16 | value is given for --plugin-load]) | ||
1370 | 17 | |||
1371 | 18 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` | 26 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` |
1372 | 19 | AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL") | 27 | AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL") |
1373 | 20 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) | 28 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) |
1374 | 29 | AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list]) | ||
1375 | 21 | m4_ifval(m4_normalize([$1]),[ | 30 | m4_ifval(m4_normalize([$1]),[ |
1376 | 22 | AC_CONFIG_FILES($*) | 31 | AC_CONFIG_FILES($*) |
1377 | 23 | ],[ | 32 | ],[ |
1378 | 24 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list], | 33 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list], |
1379 | 25 | [List of plugins to be built in]) | 34 | [List of plugins to be built in]) |
1380 | 35 | AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"], | ||
1381 | 36 | [List of plugins that should be loaded on startup if no | ||
1382 | 37 | value is given for --plugin-load]) | ||
1383 | 26 | ]) | 38 | ]) |
1384 | 27 | 39 | ||
1385 | 28 | 40 | ||
1386 | 29 | 41 | ||
1387 | === modified file 'm4/pandora_pthread.m4' | |||
1388 | --- m4/pandora_pthread.m4 2009-10-07 01:12:30 +0000 | |||
1389 | +++ m4/pandora_pthread.m4 2009-12-05 23:40:29 +0000 | |||
1390 | @@ -53,6 +53,186 @@ | |||
1391 | 53 | [pthread_yield function with one argument]) | 53 | [pthread_yield function with one argument]) |
1392 | 54 | ]) | 54 | ]) |
1393 | 55 | 55 | ||
1394 | 56 | AC_CHECK_FUNCS(pthread_attr_getstacksize pthread_attr_setprio \ | ||
1395 | 57 | pthread_attr_setschedparam \ | ||
1396 | 58 | pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \ | ||
1397 | 59 | pthread_key_delete pthread_rwlock_rdlock pthread_setprio \ | ||
1398 | 60 | pthread_setprio_np pthread_setschedparam pthread_sigmask \ | ||
1399 | 61 | pthread_attr_create rwlock_init | ||
1400 | 62 | ) | ||
1401 | 63 | |||
1402 | 64 | |||
1403 | 65 | |||
1404 | 66 | # Check definition of pthread_getspecific | ||
1405 | 67 | AC_CACHE_CHECK([args to pthread_getspecific], [pandora_cv_getspecific_args], | ||
1406 | 68 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
1407 | 69 | #if !defined(_REENTRANT) | ||
1408 | 70 | #define _REENTRANT | ||
1409 | 71 | #endif | ||
1410 | 72 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1411 | 73 | #define _POSIX_PTHREAD_SEMANTICS | ||
1412 | 74 | #endif | ||
1413 | 75 | #include <pthread.h> | ||
1414 | 76 | ]], [[ | ||
1415 | 77 | void *pthread_getspecific(pthread_key_t key); | ||
1416 | 78 | pthread_getspecific((pthread_key_t) NULL); | ||
1417 | 79 | ]])], | ||
1418 | 80 | [pandora_cv_getspecific_args=POSIX], | ||
1419 | 81 | [pandora_cv_getspecific_args=other])]) | ||
1420 | 82 | if test "$pandora_cv_getspecific_args" = "other" | ||
1421 | 83 | then | ||
1422 | 84 | AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1], | ||
1423 | 85 | [For some non posix threads]) | ||
1424 | 86 | fi | ||
1425 | 87 | |||
1426 | 88 | # Check definition of pthread_mutex_init | ||
1427 | 89 | AC_CACHE_CHECK([args to pthread_mutex_init], [pandora_cv_mutex_init_args], | ||
1428 | 90 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
1429 | 91 | #ifndef _REENTRANT | ||
1430 | 92 | #define _REENTRANT | ||
1431 | 93 | #endif | ||
1432 | 94 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1433 | 95 | #define _POSIX_PTHREAD_SEMANTICS | ||
1434 | 96 | #endif | ||
1435 | 97 | #include <pthread.h> ]], [[ | ||
1436 | 98 | pthread_mutexattr_t attr; | ||
1437 | 99 | pthread_mutex_t mp; | ||
1438 | 100 | pthread_mutex_init(&mp,&attr); ]])], | ||
1439 | 101 | [pandora_cv_mutex_init_args=POSIX], | ||
1440 | 102 | [pandora_cv_mutex_init_args=other])]) | ||
1441 | 103 | if test "$pandora_cv_mutex_init_args" = "other" | ||
1442 | 104 | then | ||
1443 | 105 | AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1], | ||
1444 | 106 | [For some non posix threads]) | ||
1445 | 107 | fi | ||
1446 | 108 | #---END: | ||
1447 | 109 | |||
1448 | 110 | #---START: Used in for client configure | ||
1449 | 111 | # Check definition of readdir_r | ||
1450 | 112 | AC_CACHE_CHECK([args to readdir_r], [pandora_cv_readdir_r], | ||
1451 | 113 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
1452 | 114 | #ifndef _REENTRANT | ||
1453 | 115 | #define _REENTRANT | ||
1454 | 116 | #endif | ||
1455 | 117 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1456 | 118 | #define _POSIX_PTHREAD_SEMANTICS | ||
1457 | 119 | #endif | ||
1458 | 120 | #include <pthread.h> | ||
1459 | 121 | #include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); | ||
1460 | 122 | readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])], | ||
1461 | 123 | [pandora_cv_readdir_r=POSIX], | ||
1462 | 124 | [pandora_cv_readdir_r=other])]) | ||
1463 | 125 | if test "$pandora_cv_readdir_r" = "POSIX" | ||
1464 | 126 | then | ||
1465 | 127 | AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r]) | ||
1466 | 128 | fi | ||
1467 | 129 | |||
1468 | 130 | # Check definition of posix sigwait() | ||
1469 | 131 | AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait], | ||
1470 | 132 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
1471 | 133 | #ifndef _REENTRANT | ||
1472 | 134 | #define _REENTRANT | ||
1473 | 135 | #endif | ||
1474 | 136 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1475 | 137 | #define _POSIX_PTHREAD_SEMANTICS | ||
1476 | 138 | #endif | ||
1477 | 139 | #include <pthread.h> | ||
1478 | 140 | #include <signal.h> | ||
1479 | 141 | ]], [[ | ||
1480 | 142 | #ifndef _AIX | ||
1481 | 143 | sigset_t set; | ||
1482 | 144 | int sig; | ||
1483 | 145 | sigwait(&set,&sig); | ||
1484 | 146 | #endif | ||
1485 | 147 | ]])], | ||
1486 | 148 | [pandora_cv_sigwait=POSIX], | ||
1487 | 149 | [pandora_cv_sigwait=other])]) | ||
1488 | 150 | if test "$pandora_cv_sigwait" = "POSIX" | ||
1489 | 151 | then | ||
1490 | 152 | AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait]) | ||
1491 | 153 | fi | ||
1492 | 154 | |||
1493 | 155 | if test "$pandora_cv_sigwait" != "POSIX" | ||
1494 | 156 | then | ||
1495 | 157 | unset pandora_cv_sigwait | ||
1496 | 158 | # Check definition of posix sigwait() | ||
1497 | 159 | AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait], | ||
1498 | 160 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
1499 | 161 | #ifndef _REENTRANT | ||
1500 | 162 | #define _REENTRANT | ||
1501 | 163 | #endif | ||
1502 | 164 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1503 | 165 | #define _POSIX_PTHREAD_SEMANTICS | ||
1504 | 166 | #endif | ||
1505 | 167 | #include <pthread.h> | ||
1506 | 168 | #include <signal.h> | ||
1507 | 169 | ]], [[ | ||
1508 | 170 | sigset_t set; | ||
1509 | 171 | int sig; | ||
1510 | 172 | sigwait(&set); | ||
1511 | 173 | ]])], | ||
1512 | 174 | [pandora_cv_sigwait=NONPOSIX], | ||
1513 | 175 | [pandora_cv_sigwait=other])]) | ||
1514 | 176 | if test "$pandora_cv_sigwait" = "NONPOSIX" | ||
1515 | 177 | then | ||
1516 | 178 | AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument]) | ||
1517 | 179 | fi | ||
1518 | 180 | fi | ||
1519 | 181 | #---END: | ||
1520 | 182 | |||
1521 | 183 | # Check if pthread_attr_setscope() exists | ||
1522 | 184 | AC_CACHE_CHECK([for pthread_attr_setscope], [pandora_cv_pthread_attr_setscope], | ||
1523 | 185 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
1524 | 186 | #ifndef _REENTRANT | ||
1525 | 187 | #define _REENTRANT | ||
1526 | 188 | #endif | ||
1527 | 189 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
1528 | 190 | #define _POSIX_PTHREAD_SEMANTICS | ||
1529 | 191 | #endif | ||
1530 | 192 | #include <pthread.h> | ||
1531 | 193 | ]], [[ | ||
1532 | 194 | pthread_attr_t thr_attr; | ||
1533 | 195 | pthread_attr_setscope(&thr_attr,0); | ||
1534 | 196 | ]])], | ||
1535 | 197 | [pandora_cv_pthread_attr_setscope=yes], | ||
1536 | 198 | [pandora_cv_pthread_attr_setscope=no])]) | ||
1537 | 199 | if test "$pandora_cv_pthread_attr_setscope" = "yes" | ||
1538 | 200 | then | ||
1539 | 201 | AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope]) | ||
1540 | 202 | fi | ||
1541 | 203 | |||
1542 | 204 | |||
1543 | 205 | AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg, | ||
1544 | 206 | [AC_TRY_LINK([#define _GNU_SOURCE | ||
1545 | 207 | #include <pthread.h> | ||
1546 | 208 | #ifdef __cplusplus | ||
1547 | 209 | extern "C" | ||
1548 | 210 | #endif | ||
1549 | 211 | ], | ||
1550 | 212 | [ | ||
1551 | 213 | pthread_yield(); | ||
1552 | 214 | ], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)]) | ||
1553 | 215 | if test "$ac_cv_pthread_yield_zero_arg" = "yes" | ||
1554 | 216 | then | ||
1555 | 217 | AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1], | ||
1556 | 218 | [pthread_yield that doesn't take any arguments]) | ||
1557 | 219 | fi | ||
1558 | 220 | AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg, | ||
1559 | 221 | [AC_TRY_LINK([#define _GNU_SOURCE | ||
1560 | 222 | #include <pthread.h> | ||
1561 | 223 | #ifdef __cplusplus | ||
1562 | 224 | extern "C" | ||
1563 | 225 | #endif | ||
1564 | 226 | ], | ||
1565 | 227 | [ | ||
1566 | 228 | pthread_yield(0); | ||
1567 | 229 | ], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)]) | ||
1568 | 230 | if test "$ac_cv_pthread_yield_one_arg" = "yes" | ||
1569 | 231 | then | ||
1570 | 232 | AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1], | ||
1571 | 233 | [pthread_yield function with one argument]) | ||
1572 | 234 | fi | ||
1573 | 235 | |||
1574 | 56 | CFLAGS="${save_CFLAGS}" | 236 | CFLAGS="${save_CFLAGS}" |
1575 | 57 | CXXFLAGS="${save_CXXFLAGS}" | 237 | CXXFLAGS="${save_CXXFLAGS}" |
1576 | 58 | ]) | 238 | ]) |
1577 | 59 | 239 | ||
1578 | === added file 'm4/pandora_run_cpplint.m4' | |||
1579 | --- m4/pandora_run_cpplint.m4 1970-01-01 00:00:00 +0000 | |||
1580 | +++ m4/pandora_run_cpplint.m4 2009-12-05 23:40:29 +0000 | |||
1581 | @@ -0,0 +1,8 @@ | |||
1582 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1583 | 2 | dnl This file is free software; Sun Microsystems | ||
1584 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1585 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1586 | 5 | |||
1587 | 6 | AC_DEFUN([PANDORA_RUN_CPPLINT],[ | ||
1588 | 7 | m4_syscmd([python config/make-lint.py]) | ||
1589 | 8 | ]) | ||
1590 | 0 | 9 | ||
1591 | === added file 'm4/pandora_sasl.m4' | |||
1592 | --- m4/pandora_sasl.m4 1970-01-01 00:00:00 +0000 | |||
1593 | +++ m4/pandora_sasl.m4 2009-12-05 23:40:29 +0000 | |||
1594 | @@ -0,0 +1,133 @@ | |||
1595 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1596 | 2 | dnl This file is free software; Sun Microsystems | ||
1597 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1598 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1599 | 5 | |||
1600 | 6 | AC_DEFUN([_PANDORA_SEARCH_SASL],[ | ||
1601 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1602 | 8 | |||
1603 | 9 | dnl -------------------------------------------------------------------- | ||
1604 | 10 | dnl Check for sasl | ||
1605 | 11 | dnl -------------------------------------------------------------------- | ||
1606 | 12 | AC_ARG_ENABLE([sasl], | ||
1607 | 13 | [AS_HELP_STRING([--disable-sasl], | ||
1608 | 14 | [Build with sasl support @<:@default=on@:>@])], | ||
1609 | 15 | [ac_enable_sasl="$enableval"], | ||
1610 | 16 | [ac_enable_sasl="yes"]) | ||
1611 | 17 | |||
1612 | 18 | AS_IF([test "x$ac_enable_sasl" = "xyes"], | ||
1613 | 19 | [ | ||
1614 | 20 | AC_LIB_HAVE_LINKFLAGS(sasl,,[ | ||
1615 | 21 | #include <stdlib.h> | ||
1616 | 22 | #include <sasl/sasl.h> | ||
1617 | 23 | ],[ | ||
1618 | 24 | sasl_server_init(NULL, NULL); | ||
1619 | 25 | ]) | ||
1620 | 26 | |||
1621 | 27 | AS_IF([test "x${ac_cv_libsasl}" != "xyes" ], | ||
1622 | 28 | [ | ||
1623 | 29 | AC_LIB_HAVE_LINKFLAGS(sasl2,,[ | ||
1624 | 30 | #include <stdlib.h> | ||
1625 | 31 | #include <sasl/sasl.h> | ||
1626 | 32 | ],[ | ||
1627 | 33 | sasl_server_init(NULL, NULL); | ||
1628 | 34 | ]) | ||
1629 | 35 | HAVE_LIBSASL="$HAVE_LIBSASL2" | ||
1630 | 36 | LIBSASL="$LIBSASL2" | ||
1631 | 37 | LIBSASL_PREFIX="$LIBSASL2_PREFIX" | ||
1632 | 38 | LTLIBSASL="$LT_LIBSASL2" | ||
1633 | 39 | ]) | ||
1634 | 40 | ]) | ||
1635 | 41 | |||
1636 | 42 | AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"], | ||
1637 | 43 | [ac_cv_sasl=yes], | ||
1638 | 44 | [ac_cv_sasl=no]) | ||
1639 | 45 | |||
1640 | 46 | AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) | ||
1641 | 47 | AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) | ||
1642 | 48 | AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"]) | ||
1643 | 49 | ]) | ||
1644 | 50 | |||
1645 | 51 | AC_DEFUN([PANDORA_HAVE_SASL],[ | ||
1646 | 52 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) | ||
1647 | 53 | ]) | ||
1648 | 54 | |||
1649 | 55 | AC_DEFUN([PANDORA_REQUIRE_SASL],[ | ||
1650 | 56 | AC_REQUIRE([_PANDORA_SEARCH_SASL]) | ||
1651 | 57 | AS_IF([test "x${ac_cv_sasl}" = "xno"], | ||
1652 | 58 | AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}])) | ||
1653 | 59 | ]) | ||
1654 | 60 | |||
1655 | 61 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[ | ||
1656 | 62 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1657 | 63 | |||
1658 | 64 | dnl -------------------------------------------------------------------- | ||
1659 | 65 | dnl Check for libsasl | ||
1660 | 66 | dnl -------------------------------------------------------------------- | ||
1661 | 67 | |||
1662 | 68 | AC_ARG_ENABLE([libsasl], | ||
1663 | 69 | [AS_HELP_STRING([--disable-libsasl], | ||
1664 | 70 | [Build with libsasl support @<:@default=on@:>@])], | ||
1665 | 71 | [ac_enable_libsasl="$enableval"], | ||
1666 | 72 | [ac_enable_libsasl="yes"]) | ||
1667 | 73 | |||
1668 | 74 | AS_IF([test "x$ac_enable_libsasl" = "xyes"],[ | ||
1669 | 75 | AC_LIB_HAVE_LINKFLAGS(sasl,,[ | ||
1670 | 76 | #include <stdlib.h> | ||
1671 | 77 | #include <sasl/sasl.h> | ||
1672 | 78 | ],[ | ||
1673 | 79 | sasl_server_init(NULL, NULL); | ||
1674 | 80 | ]) | ||
1675 | 81 | ],[ | ||
1676 | 82 | ac_cv_libsasl="no" | ||
1677 | 83 | ]) | ||
1678 | 84 | |||
1679 | 85 | AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"]) | ||
1680 | 86 | ]) | ||
1681 | 87 | |||
1682 | 88 | AC_DEFUN([PANDORA_HAVE_LIBSASL],[ | ||
1683 | 89 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) | ||
1684 | 90 | ]) | ||
1685 | 91 | |||
1686 | 92 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[ | ||
1687 | 93 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL]) | ||
1688 | 94 | AS_IF([test "x${ac_cv_libsasl}" = "xno"], | ||
1689 | 95 | AC_MSG_ERROR([libsasl is required for ${PACKAGE}])) | ||
1690 | 96 | ]) | ||
1691 | 97 | |||
1692 | 98 | AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[ | ||
1693 | 99 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
1694 | 100 | |||
1695 | 101 | dnl -------------------------------------------------------------------- | ||
1696 | 102 | dnl Check for libsasl2 | ||
1697 | 103 | dnl -------------------------------------------------------------------- | ||
1698 | 104 | |||
1699 | 105 | AC_ARG_ENABLE([libsasl2], | ||
1700 | 106 | [AS_HELP_STRING([--disable-libsasl2], | ||
1701 | 107 | [Build with libsasl2 support @<:@default=on@:>@])], | ||
1702 | 108 | [ac_enable_libsasl2="$enableval"], | ||
1703 | 109 | [ac_enable_libsasl2="yes"]) | ||
1704 | 110 | |||
1705 | 111 | AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[ | ||
1706 | 112 | AC_LIB_HAVE_LINKFLAGS(sasl2,,[ | ||
1707 | 113 | #include <stdlib.h> | ||
1708 | 114 | #include <sasl2/sasl2.h> | ||
1709 | 115 | ],[ | ||
1710 | 116 | sasl2_server_init(NULL, NULL); | ||
1711 | 117 | ]) | ||
1712 | 118 | ],[ | ||
1713 | 119 | ac_cv_libsasl2="no" | ||
1714 | 120 | ]) | ||
1715 | 121 | |||
1716 | 122 | AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"]) | ||
1717 | 123 | ]) | ||
1718 | 124 | |||
1719 | 125 | AC_DEFUN([PANDORA_HAVE_LIBSASL2],[ | ||
1720 | 126 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) | ||
1721 | 127 | ]) | ||
1722 | 128 | |||
1723 | 129 | AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[ | ||
1724 | 130 | AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2]) | ||
1725 | 131 | AS_IF([test "x${ac_cv_libsasl2}" = "xno"], | ||
1726 | 132 | AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}])) | ||
1727 | 133 | ]) | ||
1728 | 0 | 134 | ||
1729 | === added file 'm4/pandora_stack_direction.m4' | |||
1730 | --- m4/pandora_stack_direction.m4 1970-01-01 00:00:00 +0000 | |||
1731 | +++ m4/pandora_stack_direction.m4 2009-12-05 23:40:29 +0000 | |||
1732 | @@ -0,0 +1,39 @@ | |||
1733 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1734 | 2 | dnl This file is free software; Sun Microsystems | ||
1735 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1736 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1737 | 5 | |||
1738 | 6 | #-------------------------------------------------------------------- | ||
1739 | 7 | # Check what direction the stack runs in | ||
1740 | 8 | #-------------------------------------------------------------------- | ||
1741 | 9 | |||
1742 | 10 | AC_DEFUN([PANDORA_STACK_DIRECTION],[ | ||
1743 | 11 | AC_REQUIRE([AC_FUNC_ALLOCA]) | ||
1744 | 12 | AC_CACHE_CHECK([stack direction], [ac_cv_c_stack_direction],[ | ||
1745 | 13 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | ||
1746 | 14 | #include <stdlib.h> | ||
1747 | 15 | int find_stack_direction () | ||
1748 | 16 | { | ||
1749 | 17 | static char *addr = 0; | ||
1750 | 18 | auto char dummy; | ||
1751 | 19 | if (addr == 0) | ||
1752 | 20 | { | ||
1753 | 21 | addr = &dummy; | ||
1754 | 22 | return find_stack_direction (); | ||
1755 | 23 | } | ||
1756 | 24 | else | ||
1757 | 25 | return (&dummy > addr) ? 1 : -1; | ||
1758 | 26 | } | ||
1759 | 27 | ]],[[ | ||
1760 | 28 | exit (find_stack_direction() < 0); | ||
1761 | 29 | ]])],[ | ||
1762 | 30 | ac_cv_c_stack_direction=1 | ||
1763 | 31 | ],[ | ||
1764 | 32 | ac_cv_c_stack_direction=-1 | ||
1765 | 33 | ]) | ||
1766 | 34 | ]) | ||
1767 | 35 | AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) | ||
1768 | 36 | ]) | ||
1769 | 37 | |||
1770 | 38 | |||
1771 | 39 | |||
1772 | 0 | 40 | ||
1773 | === added file 'm4/pandora_stl_hash.m4' | |||
1774 | --- m4/pandora_stl_hash.m4 1970-01-01 00:00:00 +0000 | |||
1775 | +++ m4/pandora_stl_hash.m4 2009-12-05 23:40:29 +0000 | |||
1776 | @@ -0,0 +1,107 @@ | |||
1777 | 1 | # We check two things: where the include file is for hash_map, and | ||
1778 | 2 | # what namespace hash_map lives in within that include file. We | ||
1779 | 3 | # include AC_COMPILE_IFELSE for all the combinations we've seen in the | ||
1780 | 4 | # wild. We define one of HAVE_HASH_MAP or HAVE_EXT_HASH_MAP depending | ||
1781 | 5 | # on location, and HASH_NAMESPACE to be the namespace hash_map is | ||
1782 | 6 | # defined in. | ||
1783 | 7 | # | ||
1784 | 8 | # Ideally we'd use AC_CACHE_CHECK, but that only lets us store one value | ||
1785 | 9 | # at a time, and we need to store two (filename and namespace). | ||
1786 | 10 | # prints messages itself, so we have to do the message-printing ourselves | ||
1787 | 11 | # via AC_MSG_CHECKING + AC_MSG_RESULT. (TODO(csilvers): can we cache?) | ||
1788 | 12 | |||
1789 | 13 | AC_DEFUN([PANDORA_CXX_STL_HASH], | ||
1790 | 14 | [AC_MSG_CHECKING(the location of hash_map) | ||
1791 | 15 | AC_LANG_PUSH(C++) | ||
1792 | 16 | ac_cv_cxx_hash_map="" | ||
1793 | 17 | for location in "" "ext/" "tr1/" ; do | ||
1794 | 18 | for namespace in __gnu_cxx "" std stdext; do | ||
1795 | 19 | for classprefix in unordered hash; do | ||
1796 | 20 | if test -z "$ac_cv_cxx_hash_map"; then | ||
1797 | 21 | AC_COMPILE_IFELSE( | ||
1798 | 22 | [AC_LANG_PROGRAM([[#include <${location}${classprefix}_map>]], | ||
1799 | 23 | [[${namespace}::${classprefix}_map<int, int> t]])], | ||
1800 | 24 | [ac_cv_cxx_hash_map="<${location}${classprefix}_map>"; | ||
1801 | 25 | ac_cv_cxx_hash_set="<${location}${classprefix}_set>"; | ||
1802 | 26 | ac_cv_cxx_hash_namespace="$namespace"; | ||
1803 | 27 | ac_cv_cxx_hash_map_class="${classprefix}_map"; | ||
1804 | 28 | ac_cv_cxx_hash_set_class="${classprefix}_set"]) | ||
1805 | 29 | |||
1806 | 30 | fi | ||
1807 | 31 | done | ||
1808 | 32 | done | ||
1809 | 33 | done | ||
1810 | 34 | |||
1811 | 35 | if test -n "$ac_cv_cxx_hash_map"; then | ||
1812 | 36 | AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map]) | ||
1813 | 37 | AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set]) | ||
1814 | 38 | AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map, | ||
1815 | 39 | [the location of <hash_map>]) | ||
1816 | 40 | AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set, | ||
1817 | 41 | [the location of <hash_set>]) | ||
1818 | 42 | AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace, | ||
1819 | 43 | [the namespace of hash_map/hash_set]) | ||
1820 | 44 | AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class, | ||
1821 | 45 | [the classname of hash_map]) | ||
1822 | 46 | AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, | ||
1823 | 47 | [the classname of hash_set]) | ||
1824 | 48 | AC_MSG_RESULT([$ac_cv_cxx_hash_map]) | ||
1825 | 49 | else | ||
1826 | 50 | AC_MSG_RESULT() | ||
1827 | 51 | AC_MSG_WARN([could not find an STL hash_map]) | ||
1828 | 52 | fi | ||
1829 | 53 | AC_CACHE_CHECK( | ||
1830 | 54 | [whether hash_map has rehash method], | ||
1831 | 55 | [ac_cv_hash_map_has_rehash], | ||
1832 | 56 | [AC_COMPILE_IFELSE( | ||
1833 | 57 | [AC_LANG_PROGRAM([[ | ||
1834 | 58 | #include HASH_MAP_H | ||
1835 | 59 | using namespace HASH_NAMESPACE; | ||
1836 | 60 | ]],[[ | ||
1837 | 61 | HASH_MAP_CLASS<int, int> test_hash; | ||
1838 | 62 | test_hash.rehash(100); | ||
1839 | 63 | ]])], | ||
1840 | 64 | [ac_cv_hash_map_has_rehash=yes], | ||
1841 | 65 | [ac_cv_hash_map_has_rehash=no])]) | ||
1842 | 66 | AS_IF([test $ac_cv_hash_map_has_rehash = yes],[ | ||
1843 | 67 | AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method]) | ||
1844 | 68 | ]) | ||
1845 | 69 | AC_CACHE_CHECK( | ||
1846 | 70 | [whether hash_map has resize method], | ||
1847 | 71 | [ac_cv_hash_map_has_resize], | ||
1848 | 72 | [AC_COMPILE_IFELSE( | ||
1849 | 73 | [AC_LANG_PROGRAM([[ | ||
1850 | 74 | #include HASH_MAP_H | ||
1851 | 75 | using namespace HASH_NAMESPACE; | ||
1852 | 76 | ]],[[ | ||
1853 | 77 | HASH_MAP_CLASS<int, int> test_hash; | ||
1854 | 78 | test_hash.resize(100); | ||
1855 | 79 | ]])], | ||
1856 | 80 | [ac_cv_hash_map_has_resize=yes], | ||
1857 | 81 | [ac_cv_hash_map_has_resize=no])]) | ||
1858 | 82 | AS_IF([test $ac_cv_hash_map_has_resize = yes],[ | ||
1859 | 83 | AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method]) | ||
1860 | 84 | ]) | ||
1861 | 85 | AC_CACHE_CHECK( | ||
1862 | 86 | [whether to redefine hash<string>], | ||
1863 | 87 | [ac_cv_redefine_hash_string], | ||
1864 | 88 | [AC_COMPILE_IFELSE( | ||
1865 | 89 | [AC_LANG_PROGRAM([[ | ||
1866 | 90 | #include HASH_SET_H | ||
1867 | 91 | #include <string> | ||
1868 | 92 | using namespace HASH_NAMESPACE; | ||
1869 | 93 | using namespace std; | ||
1870 | 94 | ]],[[ | ||
1871 | 95 | string teststr("test"); | ||
1872 | 96 | HASH_SET_CLASS<string> test_hash; | ||
1873 | 97 | HASH_SET_CLASS<string>::iterator iter= test_hash.find(teststr); | ||
1874 | 98 | if (iter != test_hash.end()) | ||
1875 | 99 | return 1; | ||
1876 | 100 | ]])], | ||
1877 | 101 | [ac_cv_redefine_hash_string=no], | ||
1878 | 102 | [ac_cv_redefine_hash_string=yes])]) | ||
1879 | 103 | AS_IF([test $ac_cv_redefine_hash_string = yes],[ | ||
1880 | 104 | AC_DEFINE(REDEFINE_HASH_STRING, 1, [if hash<string> needs to be defined]) | ||
1881 | 105 | ]) | ||
1882 | 106 | AC_LANG_POP() | ||
1883 | 107 | ]) | ||
1884 | 0 | 108 | ||
1885 | === modified file 'm4/pandora_vc_build.m4' | |||
1886 | --- m4/pandora_vc_build.m4 2009-09-16 21:10:51 +0000 | |||
1887 | +++ m4/pandora_vc_build.m4 2009-12-05 23:40:29 +0000 | |||
1888 | @@ -52,6 +52,72 @@ | |||
1889 | 52 | AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display]) | 52 | AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display]) |
1890 | 53 | AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch]) | 53 | AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch]) |
1891 | 54 | AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison]) | 54 | AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison]) |
1895 | 55 | 55 | ]) | |
1896 | 56 | ]) | 56 | |
1897 | 57 | 57 | AC_DEFUN([_PANDORA_READ_FROM_FILE],[ | |
1898 | 58 | $1=`grep $1 $2 | cut -f2 -d=` | ||
1899 | 59 | ]) | ||
1900 | 60 | |||
1901 | 61 | AC_DEFUN([PANDORA_VC_VERSION],[ | ||
1902 | 62 | AC_REQUIRE([PANDORA_BUILDING_FROM_VC]) | ||
1903 | 63 | |||
1904 | 64 | PANDORA_RELEASE_DATE=`date +%Y.%m` | ||
1905 | 65 | PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m` | ||
1906 | 66 | |||
1907 | 67 | dnl Set some defaults | ||
1908 | 68 | PANDORA_VC_REVNO="0" | ||
1909 | 69 | PANDORA_VC_REVID="unknown" | ||
1910 | 70 | PANDORA_VC_BRANCH="bzr-export" | ||
1911 | 71 | |||
1912 | 72 | AS_IF([test -f ${srcdir}/config/bzr_revinfo],[ | ||
1913 | 73 | _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/bzr_revinfo) | ||
1914 | 74 | _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/bzr_revinfo) | ||
1915 | 75 | _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH], | ||
1916 | 76 | ${srcdir}/config/bzr_revinfo) | ||
1917 | 77 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE], | ||
1918 | 78 | ${srcdir}/config/bzr_revinfo) | ||
1919 | 79 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE], | ||
1920 | 80 | ${srcdir}/config/bzr_revinfo) | ||
1921 | 81 | _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_COMMENT], | ||
1922 | 82 | ${srcdir}/config/bzr_revinfo) | ||
1923 | 83 | ]) | ||
1924 | 84 | AS_IF([test "${ac_cv_building_from_bzr}" = "yes"],[ | ||
1925 | 85 | dnl echo "Grabbing changelog and version information from bzr" | ||
1926 | 86 | dnl bzr log --short > ChangeLog || touch ChangeLog | ||
1927 | 87 | PANDORA_BZR_REVNO=`bzr revno` | ||
1928 | 88 | AS_IF([test "x$PANDORA_BZR_REVNO" != "${PANDORA_VC_REVNO}"],[ | ||
1929 | 89 | PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}" | ||
1930 | 90 | PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $[]2}' | head -1` | ||
1931 | 91 | PANDORA_VC_BRANCH=`bzr nick` | ||
1932 | 92 | AS_IF([test "x${PANDORA_VC_BRANCH}" != "${PACKAGE}"],[ | ||
1933 | 93 | PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}" | ||
1934 | 94 | ],[ | ||
1935 | 95 | PANDORA_RELEASE_COMMENT="trunk" | ||
1936 | 96 | ]) | ||
1937 | 97 | ]) | ||
1938 | 98 | ]) | ||
1939 | 99 | AS_IF([! test -d config],[mkdir -p config]) | ||
1940 | 100 | cat > "config/bzr_revinfo" <<EOF | ||
1941 | 101 | PANDORA_VC_REVNO=${PANDORA_VC_REVNO} | ||
1942 | 102 | PANDORA_VC_REVID=${PANDORA_VC_REVID} | ||
1943 | 103 | PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH} | ||
1944 | 104 | PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE} | ||
1945 | 105 | PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE} | ||
1946 | 106 | PANDORA_RELEASE_COMMENT=${PANDORA_RELEASE_COMMENT} | ||
1947 | 107 | EOF | ||
1948 | 108 | |||
1949 | 109 | PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}" | ||
1950 | 110 | PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}" | ||
1951 | 111 | |||
1952 | 112 | VERSION="${PANDORA_RELEASE_VERSION}" | ||
1953 | 113 | AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"], | ||
1954 | 114 | [The real version of the software]) | ||
1955 | 115 | AC_SUBST(PANDORA_VC_REVNO) | ||
1956 | 116 | AC_SUBST(PANDORA_VC_REVID) | ||
1957 | 117 | AC_SUBST(PANDORA_VC_BRANCH) | ||
1958 | 118 | AC_SUBST(PANDORA_RELEASE_DATE) | ||
1959 | 119 | AC_SUBST(PANDORA_RELEASE_NODOTS_DATE) | ||
1960 | 120 | AC_SUBST(PANDORA_RELEASE_COMMENT) | ||
1961 | 121 | AC_SUBST(PANDORA_RELEASE_VERSION) | ||
1962 | 122 | AC_SUBST(PANDORA_RELEASE_ID) | ||
1963 | 123 | ]) | ||
1964 | 58 | 124 | ||
1965 | === added file 'm4/pandora_version.m4' | |||
1966 | --- m4/pandora_version.m4 1970-01-01 00:00:00 +0000 | |||
1967 | +++ m4/pandora_version.m4 2009-12-05 23:40:29 +0000 | |||
1968 | @@ -0,0 +1,11 @@ | |||
1969 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
1970 | 2 | dnl This file is free software; Sun Microsystems | ||
1971 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
1972 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
1973 | 5 | |||
1974 | 6 | AC_DEFUN([PANDORA_VERSION],[ | ||
1975 | 7 | |||
1976 | 8 | PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \ | ||
1977 | 9 | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` | ||
1978 | 10 | AC_SUBST([PANDORA_HEX_VERSION]) | ||
1979 | 11 | ]) | ||
1980 | 0 | 12 | ||
1981 | === modified file 'm4/pandora_warnings.m4' | |||
1982 | --- m4/pandora_warnings.m4 2009-09-16 21:10:51 +0000 | |||
1983 | +++ m4/pandora_warnings.m4 2009-12-05 23:40:29 +0000 | |||
1984 | @@ -129,9 +129,9 @@ | |||
1985 | 129 | 129 | ||
1986 | 130 | AS_IF([test "$INTELCC" = "yes"],[ | 130 | AS_IF([test "$INTELCC" = "yes"],[ |
1987 | 131 | m4_if(PW_LESS_WARNINGS,[no],[ | 131 | m4_if(PW_LESS_WARNINGS,[no],[ |
1989 | 132 | BASE_WARNINGS="-w1 -Wall -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" | 132 | BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" |
1990 | 133 | ],[ | 133 | ],[ |
1992 | 134 | BASE_WARNINGS="-w1 -Wall -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" | 134 | BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" |
1993 | 135 | ]) | 135 | ]) |
1994 | 136 | CC_WARNINGS="${BASE_WARNINGS}" | 136 | CC_WARNINGS="${BASE_WARNINGS}" |
1995 | 137 | CXX_WARNINGS="${BASE_WARNINGS}" | 137 | CXX_WARNINGS="${BASE_WARNINGS}" |
1996 | @@ -147,7 +147,25 @@ | |||
1997 | 147 | AS_IF([test "${ac_cv_assert}" = "no"], | 147 | AS_IF([test "${ac_cv_assert}" = "no"], |
1998 | 148 | [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) | 148 | [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) |
1999 | 149 | 149 | ||
2001 | 150 | BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}" | 150 | AC_CACHE_CHECK([whether it is safe to use -Wextra], |
2002 | 151 | [ac_cv_safe_to_use_Wextra_], | ||
2003 | 152 | [save_CFLAGS="$CFLAGS" | ||
2004 | 153 | CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}" | ||
2005 | 154 | AC_COMPILE_IFELSE([ | ||
2006 | 155 | AC_LANG_PROGRAM( | ||
2007 | 156 | [[ | ||
2008 | 157 | #include <stdio.h> | ||
2009 | 158 | ]], [[]]) | ||
2010 | 159 | ], | ||
2011 | 160 | [ac_cv_safe_to_use_Wextra_=yes], | ||
2012 | 161 | [ac_cv_safe_to_use_Wextra_=no]) | ||
2013 | 162 | CFLAGS="$save_CFLAGS"]) | ||
2014 | 163 | |||
2015 | 164 | BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}" | ||
2016 | 165 | AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"], | ||
2017 | 166 | [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"], | ||
2018 | 167 | [BASE_WARNINGS="${BASE_WARNINGS} -W"]) | ||
2019 | 168 | |||
2020 | 151 | CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" | 169 | CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" |
2021 | 152 | CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" | 170 | CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" |
2022 | 153 | 171 | ||
2023 | @@ -240,13 +258,31 @@ | |||
2024 | 240 | [ac_cv_safe_to_use_Wattributes_=no]) | 258 | [ac_cv_safe_to_use_Wattributes_=no]) |
2025 | 241 | CXXFLAGS="${save_CXXFLAGS}" | 259 | CXXFLAGS="${save_CXXFLAGS}" |
2026 | 242 | AC_LANG_POP()]) | 260 | AC_LANG_POP()]) |
2030 | 243 | AS_IF([test "$ac_cv_safe_to_use_Wattributes_" = "yes"], | 261 | AC_CACHE_CHECK([whether it is safe to use -Wno-attributes], |
2031 | 244 | [], | 262 | [ac_cv_safe_to_use_Wno_attributes_], |
2032 | 245 | [CXX_WARNINGS="${CXX_WARNINGS} -Wno-attributes"]) | 263 | [save_CFLAGS="$CFLAGS" |
2033 | 264 | CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}" | ||
2034 | 265 | AC_COMPILE_IFELSE([ | ||
2035 | 266 | AC_LANG_PROGRAM( | ||
2036 | 267 | [[ | ||
2037 | 268 | #include <stdio.h> | ||
2038 | 269 | ]], [[]]) | ||
2039 | 270 | ], | ||
2040 | 271 | [ac_cv_safe_to_use_Wno_attributes_=yes], | ||
2041 | 272 | [ac_cv_safe_to_use_Wno_attributes_=no]) | ||
2042 | 273 | CFLAGS="$save_CFLAGS"]) | ||
2043 | 274 | |||
2044 | 275 | dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off | ||
2045 | 276 | dnl by using that. | ||
2046 | 277 | AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[ | ||
2047 | 278 | AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[ | ||
2048 | 279 | CC_WARNINGS="${CC_WARNINGS} -Wno-attributes" | ||
2049 | 280 | NO_ATTRIBUTES="-Wno-attributes"])]) | ||
2050 | 281 | |||
2051 | 246 | 282 | ||
2052 | 247 | NO_REDUNDANT_DECLS="-Wno-redundant-decls" | 283 | NO_REDUNDANT_DECLS="-Wno-redundant-decls" |
2053 | 248 | dnl TODO: Figure out a better way to deal with this: | 284 | dnl TODO: Figure out a better way to deal with this: |
2055 | 249 | PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces -Wno-attributes" | 285 | PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}" |
2056 | 250 | NO_WERROR="-Wno-error" | 286 | NO_WERROR="-Wno-error" |
2057 | 251 | INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align" | 287 | INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align" |
2058 | 252 | 288 | ||
2059 | 253 | 289 | ||
2060 | === added file 'm4/pandora_with_gettext.m4' | |||
2061 | --- m4/pandora_with_gettext.m4 1970-01-01 00:00:00 +0000 | |||
2062 | +++ m4/pandora_with_gettext.m4 2009-12-05 23:40:29 +0000 | |||
2063 | @@ -0,0 +1,41 @@ | |||
2064 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
2065 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
2066 | 3 | dnl | ||
2067 | 4 | dnl pandora-build: A pedantic build system | ||
2068 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
2069 | 6 | dnl This file is free software; Sun Microsystems | ||
2070 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
2071 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
2072 | 9 | dnl | ||
2073 | 10 | dnl From Monty Taylor | ||
2074 | 11 | |||
2075 | 12 | AC_DEFUN([PANDORA_WITH_GETTEXT],[ | ||
2076 | 13 | |||
2077 | 14 | m4_syscmd([if test -d po ; then | ||
2078 | 15 | echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp | ||
2079 | 16 | PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]` | ||
2080 | 17 | for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort` | ||
2081 | 18 | do | ||
2082 | 19 | if grep gettext.h "$f" | grep include >/dev/null 2>&1 | ||
2083 | 20 | then | ||
2084 | 21 | echo "$f" >> po/POTFILES.in.stamp | ||
2085 | 22 | fi | ||
2086 | 23 | done | ||
2087 | 24 | if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1 | ||
2088 | 25 | then | ||
2089 | 26 | rm po/POTFILES.in.stamp | ||
2090 | 27 | else | ||
2091 | 28 | mv po/POTFILES.in.stamp po/POTFILES.in | ||
2092 | 29 | fi | ||
2093 | 30 | fi]) | ||
2094 | 31 | |||
2095 | 32 | AM_GNU_GETTEXT(external, need-formatstring-macros) | ||
2096 | 33 | AM_GNU_GETTEXT_VERSION([0.17]) | ||
2097 | 34 | AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[ | ||
2098 | 35 | AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge, | ||
2099 | 36 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) | ||
2100 | 37 | MSGMERGE="${GMSGMERGE}" | ||
2101 | 38 | ]) | ||
2102 | 39 | AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"]) | ||
2103 | 40 | |||
2104 | 41 | ]) | ||
2105 | 0 | 42 | ||
2106 | === modified file 'm4/pandora_with_memcached.m4' | |||
2107 | --- m4/pandora_with_memcached.m4 2009-07-18 22:25:59 +0000 | |||
2108 | +++ m4/pandora_with_memcached.m4 2009-12-05 23:40:29 +0000 | |||
2109 | @@ -3,7 +3,7 @@ | |||
2110 | 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
2111 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
2112 | 5 | 5 | ||
2114 | 6 | AC_DEFUN([PANDORA_WITH_MEMCACHED],[ | 6 | AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[ |
2115 | 7 | 7 | ||
2116 | 8 | AC_ARG_WITH([memcached], | 8 | AC_ARG_WITH([memcached], |
2117 | 9 | [AS_HELP_STRING([--with-memcached], | 9 | [AS_HELP_STRING([--with-memcached], |
2118 | @@ -13,21 +13,28 @@ | |||
2119 | 13 | 13 | ||
2120 | 14 | # just ignore the user if --without-memcached is passed.. it is | 14 | # just ignore the user if --without-memcached is passed.. it is |
2121 | 15 | # only used by make test | 15 | # only used by make test |
2123 | 16 | AS_IF([test "x$withval" = "xno"],[ | 16 | AS_IF([test "x$ac_cv_with_memcached" = "xno"],[ |
2124 | 17 | ac_cv_with_memcached=memcached | 17 | ac_cv_with_memcached=memcached |
2125 | 18 | MEMCACHED_BINARY=memcached | 18 | MEMCACHED_BINARY=memcached |
2126 | 19 | ],[ | 19 | ],[ |
2130 | 20 | AS_IF([test -f "$withval"],[ | 20 | AS_IF([test -f "$ac_cv_with_memcached"],[ |
2131 | 21 | ac_cv_with_memcached=$withval | 21 | MEMCACHED_BINARY=$ac_cv_with_memcached |
2129 | 22 | MEMCACHED_BINARY=$withval | ||
2132 | 23 | ],[ | 22 | ],[ |
2133 | 24 | AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") | 23 | AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") |
2134 | 25 | AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ | ||
2135 | 26 | AC_MSG_ERROR(["could not find memcached binary"]) | ||
2136 | 27 | ]) | ||
2137 | 28 | ]) | 24 | ]) |
2138 | 29 | ]) | 25 | ]) |
2139 | 30 | AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", | 26 | AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", |
2140 | 31 | [Name of the memcached binary used in make test]) | 27 | [Name of the memcached binary used in make test]) |
2143 | 32 | 28 | ]) | |
2144 | 33 | ]) | 29 | |
2145 | 30 | AC_DEFUN([PANDORA_HAVE_MEMCACHED],[ | ||
2146 | 31 | AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED]) | ||
2147 | 32 | ]) | ||
2148 | 33 | |||
2149 | 34 | AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[ | ||
2150 | 35 | AC_REQUIRE([PANDORA_HAVE_MEMCACHED]) | ||
2151 | 36 | AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ | ||
2152 | 37 | AC_MSG_ERROR(["could not find memcached binary"]) | ||
2153 | 38 | ]) | ||
2154 | 39 | ]) | ||
2155 | 40 |
pandora build fixes.