Merge lp://staging/~posulliv/libmemcached/sol-build-fixes into lp://staging/~tangent-org/libmemcached/trunk
- sol-build-fixes
- Merge into trunk
Proposed by
Padraig O'Sullivan
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~posulliv/libmemcached/sol-build-fixes |
Merge into: | lp://staging/~tangent-org/libmemcached/trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~posulliv/libmemcached/sol-build-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Libmemcached-developers | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Padraig O'Sullivan (posulliv) wrote : | # |
- 565. By Padraig O'Sullivan
-
Updated the ChangeLog and the .pod document indicating the changes I made to
the memcached_get and memcached_get_by_ key API calls.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'libmemcached/common.h' |
2 | --- libmemcached/common.h 2009-07-08 13:38:34 +0000 |
3 | +++ libmemcached/common.h 2009-07-15 18:26:30 +0000 |
4 | @@ -136,7 +136,7 @@ |
5 | |
6 | LIBMEMCACHED_LOCAL |
7 | memcached_return memcached_key_test(const char **keys, size_t *key_length, |
8 | - unsigned int number_of_keys); |
9 | + size_t number_of_keys); |
10 | |
11 | |
12 | LIBMEMCACHED_LOCAL |
13 | |
14 | === modified file 'libmemcached/memcached.hh' |
15 | --- libmemcached/memcached.hh 2009-07-15 09:05:00 +0000 |
16 | +++ libmemcached/memcached.hh 2009-07-15 18:26:30 +0000 |
17 | @@ -109,7 +109,7 @@ |
18 | if (!real_keys.empty()) |
19 | { |
20 | memcached_return rc= memcached_mget(&memc, &real_keys[0], &key_len[0], |
21 | - static_cast<unsigned int>(real_keys.size())); |
22 | + real_keys.size()); |
23 | return (rc == MEMCACHED_SUCCESS); |
24 | } |
25 | |
26 | |
27 | === modified file 'libmemcached/memcached_get.c' |
28 | --- libmemcached/memcached_get.c 2009-07-08 13:38:34 +0000 |
29 | +++ libmemcached/memcached_get.c 2009-07-15 18:26:30 +0000 |
30 | @@ -103,7 +103,7 @@ |
31 | |
32 | memcached_return memcached_mget(memcached_st *ptr, |
33 | const char **keys, size_t *key_length, |
34 | - unsigned int number_of_keys) |
35 | + size_t number_of_keys) |
36 | { |
37 | return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys); |
38 | } |
39 | @@ -112,14 +112,14 @@ |
40 | unsigned int master_server_key, |
41 | bool is_master_key_set, |
42 | const char **keys, size_t *key_length, |
43 | - unsigned int number_of_keys); |
44 | + size_t number_of_keys); |
45 | |
46 | memcached_return memcached_mget_by_key(memcached_st *ptr, |
47 | const char *master_key, |
48 | size_t master_key_length, |
49 | const char **keys, |
50 | size_t *key_length, |
51 | - unsigned int number_of_keys) |
52 | + size_t number_of_keys) |
53 | { |
54 | unsigned int x; |
55 | memcached_return rc= MEMCACHED_NOTFOUND; |
56 | @@ -260,7 +260,7 @@ |
57 | unsigned int master_server_key, |
58 | bool is_master_key_set, |
59 | const char **keys, size_t *key_length, |
60 | - unsigned int number_of_keys) |
61 | + size_t number_of_keys) |
62 | { |
63 | memcached_return rc= MEMCACHED_NOTFOUND; |
64 | uint32_t x; |
65 | @@ -361,7 +361,7 @@ |
66 | static memcached_return replication_binary_mget(memcached_st *ptr, |
67 | uint32_t* hash, bool* dead_servers, |
68 | const char **keys, size_t *key_length, |
69 | - unsigned int number_of_keys) |
70 | + size_t number_of_keys) |
71 | { |
72 | memcached_return rc= MEMCACHED_NOTFOUND; |
73 | uint32_t x; |
74 | @@ -460,7 +460,7 @@ |
75 | unsigned int master_server_key, |
76 | bool is_master_key_set, |
77 | const char **keys, size_t *key_length, |
78 | - unsigned int number_of_keys) |
79 | + size_t number_of_keys) |
80 | { |
81 | memcached_return rc; |
82 | |
83 | |
84 | === modified file 'libmemcached/memcached_get.h' |
85 | --- libmemcached/memcached_get.h 2009-07-08 13:38:34 +0000 |
86 | +++ libmemcached/memcached_get.h 2009-07-15 18:26:30 +0000 |
87 | @@ -24,7 +24,7 @@ |
88 | LIBMEMCACHED_API |
89 | memcached_return memcached_mget(memcached_st *ptr, |
90 | const char **keys, size_t *key_length, |
91 | - unsigned int number_of_keys); |
92 | + size_t number_of_keys); |
93 | |
94 | LIBMEMCACHED_API |
95 | char *memcached_get_by_key(memcached_st *ptr, |
96 | @@ -40,7 +40,7 @@ |
97 | master_key_length, |
98 | const char **keys, |
99 | size_t *key_length, |
100 | - unsigned int number_of_keys); |
101 | + size_t number_of_keys); |
102 | |
103 | LIBMEMCACHED_API |
104 | char *memcached_fetch(memcached_st *ptr, |
105 | |
106 | === modified file 'libmemcached/memcached_key.c' |
107 | --- libmemcached/memcached_key.c 2009-07-08 13:38:34 +0000 |
108 | +++ libmemcached/memcached_key.c 2009-07-15 18:26:30 +0000 |
109 | @@ -1,7 +1,7 @@ |
110 | #include "common.h" |
111 | |
112 | memcached_return memcached_key_test(const char **keys, size_t *key_length, |
113 | - unsigned int number_of_keys) |
114 | + size_t number_of_keys) |
115 | { |
116 | uint32_t x; |
117 | memcached_return rc; |
118 | |
119 | === added file 'm4/lib-ld.m4' |
120 | --- m4/lib-ld.m4 1970-01-01 00:00:00 +0000 |
121 | +++ m4/lib-ld.m4 2009-07-16 02:58:56 +0000 |
122 | @@ -0,0 +1,110 @@ |
123 | +# lib-ld.m4 serial 3 (gettext-0.13) |
124 | +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
125 | +dnl This file is free software; the Free Software Foundation |
126 | +dnl gives unlimited permission to copy and/or distribute it, |
127 | +dnl with or without modifications, as long as this notice is preserved. |
128 | + |
129 | +dnl Subroutines of libtool.m4, |
130 | +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
131 | +dnl with libtool.m4. |
132 | + |
133 | +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
134 | +AC_DEFUN([AC_LIB_PROG_LD_GNU], |
135 | +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
136 | +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
137 | +case `$LD -v 2>&1 </dev/null` in |
138 | +*GNU* | *'with BFD'*) |
139 | + acl_cv_prog_gnu_ld=yes ;; |
140 | +*) |
141 | + acl_cv_prog_gnu_ld=no ;; |
142 | +esac]) |
143 | +with_gnu_ld=$acl_cv_prog_gnu_ld |
144 | +]) |
145 | + |
146 | +dnl From libtool-1.4. Sets the variable LD. |
147 | +AC_DEFUN([AC_LIB_PROG_LD], |
148 | +[AC_ARG_WITH(gnu-ld, |
149 | +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
150 | +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
151 | +AC_REQUIRE([AC_PROG_CC])dnl |
152 | +AC_REQUIRE([AC_CANONICAL_HOST])dnl |
153 | +# Prepare PATH_SEPARATOR. |
154 | +# The user is always right. |
155 | +if test "${PATH_SEPARATOR+set}" != set; then |
156 | + echo "#! /bin/sh" >conf$$.sh |
157 | + echo "exit 0" >>conf$$.sh |
158 | + chmod +x conf$$.sh |
159 | + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
160 | + PATH_SEPARATOR=';' |
161 | + else |
162 | + PATH_SEPARATOR=: |
163 | + fi |
164 | + rm -f conf$$.sh |
165 | +fi |
166 | +ac_prog=ld |
167 | +if test "$GCC" = yes; then |
168 | + # Check if gcc -print-prog-name=ld gives a path. |
169 | + AC_MSG_CHECKING([for ld used by GCC]) |
170 | + case $host in |
171 | + *-*-mingw*) |
172 | + # gcc leaves a trailing carriage return which upsets mingw |
173 | + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
174 | + *) |
175 | + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
176 | + esac |
177 | + case $ac_prog in |
178 | + # Accept absolute paths. |
179 | + [[\\/]* | [A-Za-z]:[\\/]*)] |
180 | + [re_direlt='/[^/][^/]*/\.\./'] |
181 | + # Canonicalize the path of ld |
182 | + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
183 | + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
184 | + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
185 | + done |
186 | + test -z "$LD" && LD="$ac_prog" |
187 | + ;; |
188 | + "") |
189 | + # If it fails, then pretend we aren't using GCC. |
190 | + ac_prog=ld |
191 | + ;; |
192 | + *) |
193 | + # If it is relative, then search for the first ld in PATH. |
194 | + with_gnu_ld=unknown |
195 | + ;; |
196 | + esac |
197 | +elif test "$with_gnu_ld" = yes; then |
198 | + AC_MSG_CHECKING([for GNU ld]) |
199 | +else |
200 | + AC_MSG_CHECKING([for non-GNU ld]) |
201 | +fi |
202 | +AC_CACHE_VAL(acl_cv_path_LD, |
203 | +[if test -z "$LD"; then |
204 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
205 | + for ac_dir in $PATH; do |
206 | + test -z "$ac_dir" && ac_dir=. |
207 | + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
208 | + acl_cv_path_LD="$ac_dir/$ac_prog" |
209 | + # Check to see if the program is GNU ld. I'd rather use --version, |
210 | + # but apparently some GNU ld's only accept -v. |
211 | + # Break only if it was the GNU/non-GNU ld that we prefer. |
212 | + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
213 | + *GNU* | *'with BFD'*) |
214 | + test "$with_gnu_ld" != no && break ;; |
215 | + *) |
216 | + test "$with_gnu_ld" != yes && break ;; |
217 | + esac |
218 | + fi |
219 | + done |
220 | + IFS="$ac_save_ifs" |
221 | +else |
222 | + acl_cv_path_LD="$LD" # Let the user override the test with a path. |
223 | +fi]) |
224 | +LD="$acl_cv_path_LD" |
225 | +if test -n "$LD"; then |
226 | + AC_MSG_RESULT($LD) |
227 | +else |
228 | + AC_MSG_RESULT(no) |
229 | +fi |
230 | +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
231 | +AC_LIB_PROG_LD_GNU |
232 | +]) |
233 | |
234 | === added file 'm4/lib-link.m4' |
235 | --- m4/lib-link.m4 1970-01-01 00:00:00 +0000 |
236 | +++ m4/lib-link.m4 2009-07-16 02:58:56 +0000 |
237 | @@ -0,0 +1,767 @@ |
238 | +# lib-link.m4 serial 18 (gettext-0.18) |
239 | +dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. |
240 | +dnl This file is free software; the Free Software Foundation |
241 | +dnl gives unlimited permission to copy and/or distribute it, |
242 | +dnl with or without modifications, as long as this notice is preserved. |
243 | + |
244 | +dnl From Bruno Haible. |
245 | + |
246 | +AC_PREREQ([2.54]) |
247 | + |
248 | +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
249 | +dnl the libraries corresponding to explicit and implicit dependencies. |
250 | +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
251 | +dnl augments the CPPFLAGS variable. |
252 | +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname |
253 | +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
254 | +AC_DEFUN([AC_LIB_LINKFLAGS], |
255 | +[ |
256 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
257 | + AC_REQUIRE([AC_LIB_RPATH]) |
258 | + pushdef([Name],[translit([$1],[./-], [___])]) |
259 | + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
260 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
261 | + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
262 | + AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
263 | + ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
264 | + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
265 | + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
266 | + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" |
267 | + ]) |
268 | + LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
269 | + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
270 | + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
271 | + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" |
272 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
273 | + AC_SUBST([LIB]NAME) |
274 | + AC_SUBST([LTLIB]NAME) |
275 | + AC_SUBST([LIB]NAME[_PREFIX]) |
276 | + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
277 | + dnl results of this search when this library appears as a dependency. |
278 | + HAVE_LIB[]NAME=yes |
279 | + popdef([NAME]) |
280 | + popdef([Name]) |
281 | +]) |
282 | + |
283 | +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [system]) |
284 | +dnl searches for libname and the libraries corresponding to explicit and |
285 | +dnl implicit dependencies, together with the specified include files and |
286 | +dnl the ability to compile and link the specified testcode. If found, it |
287 | +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
288 | +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
289 | +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
290 | +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
291 | +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname |
292 | +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
293 | +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
294 | +[ |
295 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
296 | + AC_REQUIRE([AC_LIB_RPATH]) |
297 | + pushdef([Name],[translit([$1],[./-], [___])]) |
298 | + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
299 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
300 | + |
301 | + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
302 | + dnl accordingly. |
303 | + AC_LIB_LINKFLAGS_BODY([$1], [$2], [$5]) |
304 | + |
305 | + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
306 | + dnl because if the user has installed lib[]Name and not disabled its use |
307 | + dnl via --without-lib[]Name-prefix, he wants to use it. |
308 | + ac_save_CPPFLAGS="$CPPFLAGS" |
309 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
310 | + |
311 | + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
312 | + ac_save_LIBS="$LIBS" |
313 | + LIBS="$LIBS $LIB[]NAME" |
314 | + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
315 | + LIBS="$ac_save_LIBS" |
316 | + ]) |
317 | + if test "$ac_cv_lib[]Name" = yes; then |
318 | + HAVE_LIB[]NAME=yes |
319 | + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
320 | + AC_MSG_CHECKING([how to link with lib[]$1]) |
321 | + AC_MSG_RESULT([$LIB[]NAME]) |
322 | + else |
323 | + HAVE_LIB[]NAME=no |
324 | + dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
325 | + dnl $INC[]NAME either. |
326 | + CPPFLAGS="$ac_save_CPPFLAGS" |
327 | + LIB[]NAME= |
328 | + LTLIB[]NAME= |
329 | + LIB[]NAME[]_PREFIX= |
330 | + fi |
331 | + AC_SUBST([HAVE_LIB]NAME) |
332 | + AC_SUBST([LIB]NAME) |
333 | + AC_SUBST([LTLIB]NAME) |
334 | + AC_SUBST([LIB]NAME[_PREFIX]) |
335 | + popdef([NAME]) |
336 | + popdef([Name]) |
337 | +]) |
338 | + |
339 | +dnl Determine the platform dependent parameters needed to use rpath: |
340 | +dnl acl_libext, |
341 | +dnl acl_shlibext, |
342 | +dnl acl_hardcode_libdir_flag_spec, |
343 | +dnl acl_hardcode_libdir_separator, |
344 | +dnl acl_hardcode_direct, |
345 | +dnl acl_hardcode_minus_L. |
346 | +AC_DEFUN([AC_LIB_RPATH], |
347 | +[ |
348 | + dnl Tell automake >= 1.10 to complain if config.rpath is missing. |
349 | + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) |
350 | + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
351 | + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
352 | + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
353 | + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
354 | + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ |
355 | + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
356 | + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
357 | + . ./conftest.sh |
358 | + rm -f ./conftest.sh |
359 | + acl_cv_rpath=done |
360 | + ]) |
361 | + wl="$acl_cv_wl" |
362 | + acl_libext="$acl_cv_libext" |
363 | + acl_shlibext="$acl_cv_shlibext" |
364 | + acl_libname_spec="$acl_cv_libname_spec" |
365 | + acl_library_names_spec="$acl_cv_library_names_spec" |
366 | + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
367 | + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
368 | + acl_hardcode_direct="$acl_cv_hardcode_direct" |
369 | + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" |
370 | + dnl Determine whether the user wants rpath handling at all. |
371 | + AC_ARG_ENABLE([rpath], |
372 | + [ --disable-rpath do not hardcode runtime library paths], |
373 | + :, enable_rpath=yes) |
374 | +]) |
375 | + |
376 | +dnl AC_LIB_FROMPACKAGE(name, package) |
377 | +dnl declares that libname comes from the given package. The configure file |
378 | +dnl will then not have a --with-libname-prefix option but a |
379 | +dnl --with-package-prefix option. Several libraries can come from the same |
380 | +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar |
381 | +dnl macro call that searches for libname. |
382 | +AC_DEFUN([AC_LIB_FROMPACKAGE], |
383 | +[ |
384 | + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
385 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
386 | + define([acl_frompackage_]NAME, [$2]) |
387 | + popdef([NAME]) |
388 | + pushdef([PACK],[$2]) |
389 | + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], |
390 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
391 | + define([acl_libsinpackage_]PACKUP, |
392 | + m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) |
393 | + popdef([PACKUP]) |
394 | + popdef([PACK]) |
395 | +]) |
396 | + |
397 | +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies, system]) searches for |
398 | +dnl libname and the libraries corresponding to explicit and implicit |
399 | +dnl dependencies. |
400 | +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
401 | +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found |
402 | +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
403 | +dnl If system==system, -isystem is used instead of -I |
404 | +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
405 | +[ |
406 | + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
407 | + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
408 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
409 | + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) |
410 | + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], |
411 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
412 | + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) |
413 | + dnl Autoconf >= 2.61 supports dots in --with options. |
414 | + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) |
415 | + dnl By default, look in $includedir and $libdir. |
416 | + use_additional=yes |
417 | + if test "x$GCC" = "xyes" -a "x$3" = "xsystem" |
418 | + then |
419 | + i_system="-isystem " |
420 | + else |
421 | + i_system="-I" |
422 | + fi |
423 | + |
424 | + AC_LIB_WITH_FINAL_PREFIX([ |
425 | + eval additional_includedir=\"$includedir\" |
426 | + eval additional_libdir=\"$libdir\" |
427 | + ]) |
428 | + AC_ARG_WITH(P_A_C_K[-prefix], |
429 | +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib |
430 | + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], |
431 | +[ |
432 | + if test "X$withval" = "Xno"; then |
433 | + use_additional=no |
434 | + else |
435 | + if test "X$withval" = "X"; then |
436 | + AC_LIB_WITH_FINAL_PREFIX([ |
437 | + eval additional_includedir=\"$includedir\" |
438 | + eval additional_libdir=\"$libdir\" |
439 | + ]) |
440 | + else |
441 | + additional_includedir="$withval/include" |
442 | + additional_libdir="$withval/$acl_libdirstem" |
443 | + if test "$acl_libdirstem2" != "$acl_libdirstem" \ |
444 | + && ! test -d "$withval/$acl_libdirstem"; then |
445 | + additional_libdir="$withval/$acl_libdirstem2" |
446 | + fi |
447 | + fi |
448 | + fi |
449 | +]) |
450 | + dnl Search the library and its dependencies in $additional_libdir and |
451 | + dnl $LDFLAGS. Using breadth-first-seach. |
452 | + LIB[]NAME= |
453 | + LTLIB[]NAME= |
454 | + INC[]NAME= |
455 | + LIB[]NAME[]_PREFIX= |
456 | + rpathdirs= |
457 | + ltrpathdirs= |
458 | + names_already_handled= |
459 | + names_next_round='$1 $2' |
460 | + while test -n "$names_next_round"; do |
461 | + names_this_round="$names_next_round" |
462 | + names_next_round= |
463 | + for name in $names_this_round; do |
464 | + already_handled= |
465 | + for n in $names_already_handled; do |
466 | + if test "$n" = "$name"; then |
467 | + already_handled=yes |
468 | + break |
469 | + fi |
470 | + done |
471 | + if test -z "$already_handled"; then |
472 | + names_already_handled="$names_already_handled $name" |
473 | + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
474 | + dnl or AC_LIB_HAVE_LINKFLAGS call. |
475 | + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
476 | + eval value=\"\$HAVE_LIB$uppername\" |
477 | + if test -n "$value"; then |
478 | + if test "$value" = yes; then |
479 | + eval value=\"\$LIB$uppername\" |
480 | + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
481 | + eval value=\"\$LTLIB$uppername\" |
482 | + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
483 | + else |
484 | + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
485 | + dnl that this library doesn't exist. So just drop it. |
486 | + : |
487 | + fi |
488 | + else |
489 | + dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
490 | + dnl and the already constructed $LIBNAME/$LTLIBNAME. |
491 | + found_dir= |
492 | + found_la= |
493 | + found_so= |
494 | + found_a= |
495 | + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name |
496 | + if test -n "$acl_shlibext"; then |
497 | + shrext=".$acl_shlibext" # typically: shrext=.so |
498 | + else |
499 | + shrext= |
500 | + fi |
501 | + if test $use_additional = yes; then |
502 | + dir="$additional_libdir" |
503 | + dnl The same code as in the loop below: |
504 | + dnl First look for a shared library. |
505 | + if test -n "$acl_shlibext"; then |
506 | + if test -f "$dir/$libname$shrext"; then |
507 | + found_dir="$dir" |
508 | + found_so="$dir/$libname$shrext" |
509 | + else |
510 | + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
511 | + ver=`(cd "$dir" && \ |
512 | + for f in "$libname$shrext".*; do echo "$f"; done \ |
513 | + | sed -e "s,^$libname$shrext\\\\.,," \ |
514 | + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
515 | + | sed 1q ) 2>/dev/null` |
516 | + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then |
517 | + found_dir="$dir" |
518 | + found_so="$dir/$libname$shrext.$ver" |
519 | + fi |
520 | + else |
521 | + eval library_names=\"$acl_library_names_spec\" |
522 | + for f in $library_names; do |
523 | + if test -f "$dir/$f"; then |
524 | + found_dir="$dir" |
525 | + found_so="$dir/$f" |
526 | + break |
527 | + fi |
528 | + done |
529 | + fi |
530 | + fi |
531 | + fi |
532 | + dnl Then look for a static library. |
533 | + if test "X$found_dir" = "X"; then |
534 | + if test -f "$dir/$libname.$acl_libext"; then |
535 | + found_dir="$dir" |
536 | + found_a="$dir/$libname.$acl_libext" |
537 | + fi |
538 | + fi |
539 | + if test "X$found_dir" != "X"; then |
540 | + if test -f "$dir/$libname.la"; then |
541 | + found_la="$dir/$libname.la" |
542 | + fi |
543 | + fi |
544 | + fi |
545 | + if test "X$found_dir" = "X"; then |
546 | + for x in $LDFLAGS $LTLIB[]NAME; do |
547 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
548 | + case "$x" in |
549 | + -L*) |
550 | + dir=`echo "X$x" | sed -e 's/^X-L//'` |
551 | + dnl First look for a shared library. |
552 | + if test -n "$acl_shlibext"; then |
553 | + if test -f "$dir/$libname$shrext"; then |
554 | + found_dir="$dir" |
555 | + found_so="$dir/$libname$shrext" |
556 | + else |
557 | + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
558 | + ver=`(cd "$dir" && \ |
559 | + for f in "$libname$shrext".*; do echo "$f"; done \ |
560 | + | sed -e "s,^$libname$shrext\\\\.,," \ |
561 | + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
562 | + | sed 1q ) 2>/dev/null` |
563 | + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then |
564 | + found_dir="$dir" |
565 | + found_so="$dir/$libname$shrext.$ver" |
566 | + fi |
567 | + else |
568 | + eval library_names=\"$acl_library_names_spec\" |
569 | + for f in $library_names; do |
570 | + if test -f "$dir/$f"; then |
571 | + found_dir="$dir" |
572 | + found_so="$dir/$f" |
573 | + break |
574 | + fi |
575 | + done |
576 | + fi |
577 | + fi |
578 | + fi |
579 | + dnl Then look for a static library. |
580 | + if test "X$found_dir" = "X"; then |
581 | + if test -f "$dir/$libname.$acl_libext"; then |
582 | + found_dir="$dir" |
583 | + found_a="$dir/$libname.$acl_libext" |
584 | + fi |
585 | + fi |
586 | + if test "X$found_dir" != "X"; then |
587 | + if test -f "$dir/$libname.la"; then |
588 | + found_la="$dir/$libname.la" |
589 | + fi |
590 | + fi |
591 | + ;; |
592 | + esac |
593 | + if test "X$found_dir" != "X"; then |
594 | + break |
595 | + fi |
596 | + done |
597 | + fi |
598 | + if test "X$found_dir" != "X"; then |
599 | + dnl Found the library. |
600 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
601 | + if test "X$found_so" != "X"; then |
602 | + dnl Linking with a shared library. We attempt to hardcode its |
603 | + dnl directory into the executable's runpath, unless it's the |
604 | + dnl standard /usr/lib. |
605 | + if test "$enable_rpath" = no \ |
606 | + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ |
607 | + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then |
608 | + dnl No hardcoding is needed. |
609 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
610 | + else |
611 | + dnl Use an explicit option to hardcode DIR into the resulting |
612 | + dnl binary. |
613 | + dnl Potentially add DIR to ltrpathdirs. |
614 | + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
615 | + haveit= |
616 | + for x in $ltrpathdirs; do |
617 | + if test "X$x" = "X$found_dir"; then |
618 | + haveit=yes |
619 | + break |
620 | + fi |
621 | + done |
622 | + if test -z "$haveit"; then |
623 | + ltrpathdirs="$ltrpathdirs $found_dir" |
624 | + fi |
625 | + dnl The hardcoding into $LIBNAME is system dependent. |
626 | + if test "$acl_hardcode_direct" = yes; then |
627 | + dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
628 | + dnl resulting binary. |
629 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
630 | + else |
631 | + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
632 | + dnl Use an explicit option to hardcode DIR into the resulting |
633 | + dnl binary. |
634 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
635 | + dnl Potentially add DIR to rpathdirs. |
636 | + dnl The rpathdirs will be appended to $LIBNAME at the end. |
637 | + haveit= |
638 | + for x in $rpathdirs; do |
639 | + if test "X$x" = "X$found_dir"; then |
640 | + haveit=yes |
641 | + break |
642 | + fi |
643 | + done |
644 | + if test -z "$haveit"; then |
645 | + rpathdirs="$rpathdirs $found_dir" |
646 | + fi |
647 | + else |
648 | + dnl Rely on "-L$found_dir". |
649 | + dnl But don't add it if it's already contained in the LDFLAGS |
650 | + dnl or the already constructed $LIBNAME |
651 | + haveit= |
652 | + for x in $LDFLAGS $LIB[]NAME; do |
653 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
654 | + if test "X$x" = "X-L$found_dir"; then |
655 | + haveit=yes |
656 | + break |
657 | + fi |
658 | + done |
659 | + if test -z "$haveit"; then |
660 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
661 | + fi |
662 | + if test "$acl_hardcode_minus_L" != no; then |
663 | + dnl FIXME: Not sure whether we should use |
664 | + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
665 | + dnl here. |
666 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
667 | + else |
668 | + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH |
669 | + dnl here, because this doesn't fit in flags passed to the |
670 | + dnl compiler. So give up. No hardcoding. This affects only |
671 | + dnl very old systems. |
672 | + dnl FIXME: Not sure whether we should use |
673 | + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
674 | + dnl here. |
675 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
676 | + fi |
677 | + fi |
678 | + fi |
679 | + fi |
680 | + else |
681 | + if test "X$found_a" != "X"; then |
682 | + dnl Linking with a static library. |
683 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
684 | + else |
685 | + dnl We shouldn't come here, but anyway it's good to have a |
686 | + dnl fallback. |
687 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
688 | + fi |
689 | + fi |
690 | + dnl Assume the include files are nearby. |
691 | + additional_includedir= |
692 | + case "$found_dir" in |
693 | + */$acl_libdirstem | */$acl_libdirstem/) |
694 | + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
695 | + if test "$name" = '$1'; then |
696 | + LIB[]NAME[]_PREFIX="$basedir" |
697 | + fi |
698 | + additional_includedir="$basedir/include" |
699 | + ;; |
700 | + */$acl_libdirstem2 | */$acl_libdirstem2/) |
701 | + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` |
702 | + if test "$name" = '$1'; then |
703 | + LIB[]NAME[]_PREFIX="$basedir" |
704 | + fi |
705 | + additional_includedir="$basedir/include" |
706 | + ;; |
707 | + esac |
708 | + if test "X$additional_includedir" != "X"; then |
709 | + dnl Potentially add $additional_includedir to $INCNAME. |
710 | + dnl But don't add it |
711 | + dnl 1. if it's the standard /usr/include, |
712 | + dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
713 | + dnl 3. if it's already present in $CPPFLAGS or the already |
714 | + dnl constructed $INCNAME, |
715 | + dnl 4. if it doesn't exist as a directory. |
716 | + if test "X$additional_includedir" != "X/usr/include"; then |
717 | + haveit= |
718 | + if test "X$additional_includedir" = "X/usr/local/include"; then |
719 | + if test -n "$GCC"; then |
720 | + case $host_os in |
721 | + linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
722 | + esac |
723 | + fi |
724 | + fi |
725 | + if test -z "$haveit"; then |
726 | + for x in $CPPFLAGS $INC[]NAME; do |
727 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
728 | + if test "X$x" = "X${i_system}$additional_includedir"; then |
729 | + haveit=yes |
730 | + break |
731 | + fi |
732 | + done |
733 | + if test -z "$haveit"; then |
734 | + if test -d "$additional_includedir"; then |
735 | + dnl Really add $additional_includedir to $INCNAME. |
736 | + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }${i_system}$additional_includedir" |
737 | + fi |
738 | + fi |
739 | + fi |
740 | + fi |
741 | + fi |
742 | + dnl Look for dependencies. |
743 | + if test -n "$found_la"; then |
744 | + dnl Read the .la file. It defines the variables |
745 | + dnl dlname, library_names, old_library, dependency_libs, current, |
746 | + dnl age, revision, installed, dlopen, dlpreopen, libdir. |
747 | + save_libdir="$libdir" |
748 | + case "$found_la" in |
749 | + */* | *\\*) . "$found_la" ;; |
750 | + *) . "./$found_la" ;; |
751 | + esac |
752 | + libdir="$save_libdir" |
753 | + dnl We use only dependency_libs. |
754 | + for dep in $dependency_libs; do |
755 | + case "$dep" in |
756 | + -L*) |
757 | + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
758 | + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
759 | + dnl But don't add it |
760 | + dnl 1. if it's the standard /usr/lib, |
761 | + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
762 | + dnl 3. if it's already present in $LDFLAGS or the already |
763 | + dnl constructed $LIBNAME, |
764 | + dnl 4. if it doesn't exist as a directory. |
765 | + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ |
766 | + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then |
767 | + haveit= |
768 | + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ |
769 | + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then |
770 | + if test -n "$GCC"; then |
771 | + case $host_os in |
772 | + linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
773 | + esac |
774 | + fi |
775 | + fi |
776 | + if test -z "$haveit"; then |
777 | + haveit= |
778 | + for x in $LDFLAGS $LIB[]NAME; do |
779 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
780 | + if test "X$x" = "X-L$additional_libdir"; then |
781 | + haveit=yes |
782 | + break |
783 | + fi |
784 | + done |
785 | + if test -z "$haveit"; then |
786 | + if test -d "$additional_libdir"; then |
787 | + dnl Really add $additional_libdir to $LIBNAME. |
788 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
789 | + fi |
790 | + fi |
791 | + haveit= |
792 | + for x in $LDFLAGS $LTLIB[]NAME; do |
793 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
794 | + if test "X$x" = "X-L$additional_libdir"; then |
795 | + haveit=yes |
796 | + break |
797 | + fi |
798 | + done |
799 | + if test -z "$haveit"; then |
800 | + if test -d "$additional_libdir"; then |
801 | + dnl Really add $additional_libdir to $LTLIBNAME. |
802 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
803 | + fi |
804 | + fi |
805 | + fi |
806 | + fi |
807 | + ;; |
808 | + -R*) |
809 | + dir=`echo "X$dep" | sed -e 's/^X-R//'` |
810 | + if test "$enable_rpath" != no; then |
811 | + dnl Potentially add DIR to rpathdirs. |
812 | + dnl The rpathdirs will be appended to $LIBNAME at the end. |
813 | + haveit= |
814 | + for x in $rpathdirs; do |
815 | + if test "X$x" = "X$dir"; then |
816 | + haveit=yes |
817 | + break |
818 | + fi |
819 | + done |
820 | + if test -z "$haveit"; then |
821 | + rpathdirs="$rpathdirs $dir" |
822 | + fi |
823 | + dnl Potentially add DIR to ltrpathdirs. |
824 | + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
825 | + haveit= |
826 | + for x in $ltrpathdirs; do |
827 | + if test "X$x" = "X$dir"; then |
828 | + haveit=yes |
829 | + break |
830 | + fi |
831 | + done |
832 | + if test -z "$haveit"; then |
833 | + ltrpathdirs="$ltrpathdirs $dir" |
834 | + fi |
835 | + fi |
836 | + ;; |
837 | + -l*) |
838 | + dnl Handle this in the next round. |
839 | + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
840 | + ;; |
841 | + *.la) |
842 | + dnl Handle this in the next round. Throw away the .la's |
843 | + dnl directory; it is already contained in a preceding -L |
844 | + dnl option. |
845 | + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
846 | + ;; |
847 | + *) |
848 | + dnl Most likely an immediate library name. |
849 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
850 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
851 | + ;; |
852 | + esac |
853 | + done |
854 | + fi |
855 | + else |
856 | + dnl Didn't find the library; assume it is in the system directories |
857 | + dnl known to the linker and runtime loader. (All the system |
858 | + dnl directories known to the linker should also be known to the |
859 | + dnl runtime loader, otherwise the system is severely misconfigured.) |
860 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
861 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
862 | + fi |
863 | + fi |
864 | + fi |
865 | + done |
866 | + done |
867 | + if test "X$rpathdirs" != "X"; then |
868 | + if test -n "$acl_hardcode_libdir_separator"; then |
869 | + dnl Weird platform: only the last -rpath option counts, the user must |
870 | + dnl pass all path elements in one option. We can arrange that for a |
871 | + dnl single library, but not when more than one $LIBNAMEs are used. |
872 | + alldirs= |
873 | + for found_dir in $rpathdirs; do |
874 | + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" |
875 | + done |
876 | + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. |
877 | + acl_save_libdir="$libdir" |
878 | + libdir="$alldirs" |
879 | + eval flag=\"$acl_hardcode_libdir_flag_spec\" |
880 | + libdir="$acl_save_libdir" |
881 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
882 | + else |
883 | + dnl The -rpath options are cumulative. |
884 | + for found_dir in $rpathdirs; do |
885 | + acl_save_libdir="$libdir" |
886 | + libdir="$found_dir" |
887 | + eval flag=\"$acl_hardcode_libdir_flag_spec\" |
888 | + libdir="$acl_save_libdir" |
889 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
890 | + done |
891 | + fi |
892 | + fi |
893 | + if test "X$ltrpathdirs" != "X"; then |
894 | + dnl When using libtool, the option that works for both libraries and |
895 | + dnl executables is -R. The -R options are cumulative. |
896 | + for found_dir in $ltrpathdirs; do |
897 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
898 | + done |
899 | + fi |
900 | + popdef([P_A_C_K]) |
901 | + popdef([PACKLIBS]) |
902 | + popdef([PACKUP]) |
903 | + popdef([PACK]) |
904 | + popdef([NAME]) |
905 | +]) |
906 | + |
907 | +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
908 | +dnl unless already present in VAR. |
909 | +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
910 | +dnl contains two or three consecutive elements that belong together. |
911 | +AC_DEFUN([AC_LIB_APPENDTOVAR], |
912 | +[ |
913 | + for element in [$2]; do |
914 | + haveit= |
915 | + for x in $[$1]; do |
916 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
917 | + if test "X$x" = "X$element"; then |
918 | + haveit=yes |
919 | + break |
920 | + fi |
921 | + done |
922 | + if test -z "$haveit"; then |
923 | + [$1]="${[$1]}${[$1]:+ }$element" |
924 | + fi |
925 | + done |
926 | +]) |
927 | + |
928 | +dnl For those cases where a variable contains several -L and -l options |
929 | +dnl referring to unknown libraries and directories, this macro determines the |
930 | +dnl necessary additional linker options for the runtime path. |
931 | +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) |
932 | +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. |
933 | +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, |
934 | +dnl otherwise linking without libtool is assumed. |
935 | +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], |
936 | +[ |
937 | + AC_REQUIRE([AC_LIB_RPATH]) |
938 | + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
939 | + $1= |
940 | + if test "$enable_rpath" != no; then |
941 | + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
942 | + dnl Use an explicit option to hardcode directories into the resulting |
943 | + dnl binary. |
944 | + rpathdirs= |
945 | + next= |
946 | + for opt in $2; do |
947 | + if test -n "$next"; then |
948 | + dir="$next" |
949 | + dnl No need to hardcode the standard /usr/lib. |
950 | + if test "X$dir" != "X/usr/$acl_libdirstem" \ |
951 | + && test "X$dir" != "X/usr/$acl_libdirstem2"; then |
952 | + rpathdirs="$rpathdirs $dir" |
953 | + fi |
954 | + next= |
955 | + else |
956 | + case $opt in |
957 | + -L) next=yes ;; |
958 | + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
959 | + dnl No need to hardcode the standard /usr/lib. |
960 | + if test "X$dir" != "X/usr/$acl_libdirstem" \ |
961 | + && test "X$dir" != "X/usr/$acl_libdirstem2"; then |
962 | + rpathdirs="$rpathdirs $dir" |
963 | + fi |
964 | + next= ;; |
965 | + *) next= ;; |
966 | + esac |
967 | + fi |
968 | + done |
969 | + if test "X$rpathdirs" != "X"; then |
970 | + if test -n ""$3""; then |
971 | + dnl libtool is used for linking. Use -R options. |
972 | + for dir in $rpathdirs; do |
973 | + $1="${$1}${$1:+ }-R$dir" |
974 | + done |
975 | + else |
976 | + dnl The linker is used for linking directly. |
977 | + if test -n "$acl_hardcode_libdir_separator"; then |
978 | + dnl Weird platform: only the last -rpath option counts, the user |
979 | + dnl must pass all path elements in one option. |
980 | + alldirs= |
981 | + for dir in $rpathdirs; do |
982 | + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" |
983 | + done |
984 | + acl_save_libdir="$libdir" |
985 | + libdir="$alldirs" |
986 | + eval flag=\"$acl_hardcode_libdir_flag_spec\" |
987 | + libdir="$acl_save_libdir" |
988 | + $1="$flag" |
989 | + else |
990 | + dnl The -rpath options are cumulative. |
991 | + for dir in $rpathdirs; do |
992 | + acl_save_libdir="$libdir" |
993 | + libdir="$dir" |
994 | + eval flag=\"$acl_hardcode_libdir_flag_spec\" |
995 | + libdir="$acl_save_libdir" |
996 | + $1="${$1}${$1:+ }$flag" |
997 | + done |
998 | + fi |
999 | + fi |
1000 | + fi |
1001 | + fi |
1002 | + fi |
1003 | + AC_SUBST([$1]) |
1004 | +]) |
1005 | |
1006 | === added file 'm4/lib-prefix.m4' |
1007 | --- m4/lib-prefix.m4 1970-01-01 00:00:00 +0000 |
1008 | +++ m4/lib-prefix.m4 2009-07-16 02:58:56 +0000 |
1009 | @@ -0,0 +1,226 @@ |
1010 | +# lib-prefix.m4 serial 6 (gettext-0.18) |
1011 | +dnl Copyright (C) 2001-2005, 2008 Free Software Foundation, Inc. |
1012 | +dnl This file is free software; the Free Software Foundation |
1013 | +dnl gives unlimited permission to copy and/or distribute it, |
1014 | +dnl with or without modifications, as long as this notice is preserved. |
1015 | + |
1016 | +dnl From Bruno Haible. |
1017 | + |
1018 | +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
1019 | +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
1020 | +dnl require excessive bracketing. |
1021 | +ifdef([AC_HELP_STRING], |
1022 | +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
1023 | +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
1024 | + |
1025 | +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
1026 | +dnl to access previously installed libraries. The basic assumption is that |
1027 | +dnl a user will want packages to use other packages he previously installed |
1028 | +dnl with the same --prefix option. |
1029 | +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
1030 | +dnl libraries, but is otherwise very convenient. |
1031 | +AC_DEFUN([AC_LIB_PREFIX], |
1032 | +[ |
1033 | + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
1034 | + AC_REQUIRE([AC_PROG_CC]) |
1035 | + AC_REQUIRE([AC_CANONICAL_HOST]) |
1036 | + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
1037 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
1038 | + dnl By default, look in $includedir and $libdir. |
1039 | + use_additional=yes |
1040 | + AC_LIB_WITH_FINAL_PREFIX([ |
1041 | + eval additional_includedir=\"$includedir\" |
1042 | + eval additional_libdir=\"$libdir\" |
1043 | + ]) |
1044 | + AC_LIB_ARG_WITH([lib-prefix], |
1045 | +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
1046 | + --without-lib-prefix don't search for libraries in includedir and libdir], |
1047 | +[ |
1048 | + if test "X$withval" = "Xno"; then |
1049 | + use_additional=no |
1050 | + else |
1051 | + if test "X$withval" = "X"; then |
1052 | + AC_LIB_WITH_FINAL_PREFIX([ |
1053 | + eval additional_includedir=\"$includedir\" |
1054 | + eval additional_libdir=\"$libdir\" |
1055 | + ]) |
1056 | + else |
1057 | + additional_includedir="$withval/include" |
1058 | + additional_libdir="$withval/$acl_libdirstem" |
1059 | + fi |
1060 | + fi |
1061 | +]) |
1062 | + if test $use_additional = yes; then |
1063 | + dnl Potentially add $additional_includedir to $CPPFLAGS. |
1064 | + dnl But don't add it |
1065 | + dnl 1. if it's the standard /usr/include, |
1066 | + dnl 2. if it's already present in $CPPFLAGS, |
1067 | + dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
1068 | + dnl 4. if it doesn't exist as a directory. |
1069 | + if test "X$additional_includedir" != "X/usr/include"; then |
1070 | + haveit= |
1071 | + for x in $CPPFLAGS; do |
1072 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1073 | + if test "X$x" = "X-I$additional_includedir"; then |
1074 | + haveit=yes |
1075 | + break |
1076 | + fi |
1077 | + done |
1078 | + if test -z "$haveit"; then |
1079 | + if test "X$additional_includedir" = "X/usr/local/include"; then |
1080 | + if test -n "$GCC"; then |
1081 | + case $host_os in |
1082 | + linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
1083 | + esac |
1084 | + fi |
1085 | + fi |
1086 | + if test -z "$haveit"; then |
1087 | + if test -d "$additional_includedir"; then |
1088 | + dnl Really add $additional_includedir to $CPPFLAGS. |
1089 | + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
1090 | + fi |
1091 | + fi |
1092 | + fi |
1093 | + fi |
1094 | + dnl Potentially add $additional_libdir to $LDFLAGS. |
1095 | + dnl But don't add it |
1096 | + dnl 1. if it's the standard /usr/lib, |
1097 | + dnl 2. if it's already present in $LDFLAGS, |
1098 | + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
1099 | + dnl 4. if it doesn't exist as a directory. |
1100 | + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
1101 | + haveit= |
1102 | + for x in $LDFLAGS; do |
1103 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1104 | + if test "X$x" = "X-L$additional_libdir"; then |
1105 | + haveit=yes |
1106 | + break |
1107 | + fi |
1108 | + done |
1109 | + if test -z "$haveit"; then |
1110 | + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
1111 | + if test -n "$GCC"; then |
1112 | + case $host_os in |
1113 | + linux*) haveit=yes;; |
1114 | + esac |
1115 | + fi |
1116 | + fi |
1117 | + if test -z "$haveit"; then |
1118 | + if test -d "$additional_libdir"; then |
1119 | + dnl Really add $additional_libdir to $LDFLAGS. |
1120 | + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
1121 | + fi |
1122 | + fi |
1123 | + fi |
1124 | + fi |
1125 | + fi |
1126 | +]) |
1127 | + |
1128 | +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
1129 | +dnl acl_final_exec_prefix, containing the values to which $prefix and |
1130 | +dnl $exec_prefix will expand at the end of the configure script. |
1131 | +AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
1132 | +[ |
1133 | + dnl Unfortunately, prefix and exec_prefix get only finally determined |
1134 | + dnl at the end of configure. |
1135 | + if test "X$prefix" = "XNONE"; then |
1136 | + acl_final_prefix="$ac_default_prefix" |
1137 | + else |
1138 | + acl_final_prefix="$prefix" |
1139 | + fi |
1140 | + if test "X$exec_prefix" = "XNONE"; then |
1141 | + acl_final_exec_prefix='${prefix}' |
1142 | + else |
1143 | + acl_final_exec_prefix="$exec_prefix" |
1144 | + fi |
1145 | + acl_save_prefix="$prefix" |
1146 | + prefix="$acl_final_prefix" |
1147 | + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
1148 | + prefix="$acl_save_prefix" |
1149 | +]) |
1150 | + |
1151 | +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
1152 | +dnl variables prefix and exec_prefix bound to the values they will have |
1153 | +dnl at the end of the configure script. |
1154 | +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
1155 | +[ |
1156 | + acl_save_prefix="$prefix" |
1157 | + prefix="$acl_final_prefix" |
1158 | + acl_save_exec_prefix="$exec_prefix" |
1159 | + exec_prefix="$acl_final_exec_prefix" |
1160 | + $1 |
1161 | + exec_prefix="$acl_save_exec_prefix" |
1162 | + prefix="$acl_save_prefix" |
1163 | +]) |
1164 | + |
1165 | +dnl AC_LIB_PREPARE_MULTILIB creates |
1166 | +dnl - a variable acl_libdirstem, containing the basename of the libdir, either |
1167 | +dnl "lib" or "lib64" or "lib/64", |
1168 | +dnl - a variable acl_libdirstem2, as a secondary possible value for |
1169 | +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or |
1170 | +dnl "lib/amd64". |
1171 | +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
1172 | +[ |
1173 | + dnl There is no formal standard regarding lib and lib64. |
1174 | + dnl On glibc systems, the current practice is that on a system supporting |
1175 | + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
1176 | + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine |
1177 | + dnl the compiler's default mode by looking at the compiler's library search |
1178 | + dnl path. If at least one of its elements ends in /lib64 or points to a |
1179 | + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. |
1180 | + dnl Otherwise we use the default, namely "lib". |
1181 | + dnl On Solaris systems, the current practice is that on a system supporting |
1182 | + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
1183 | + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
1184 | + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
1185 | + AC_REQUIRE([AC_CANONICAL_HOST]) |
1186 | + acl_libdirstem=lib |
1187 | + acl_libdirstem2= |
1188 | + case "$host_os" in |
1189 | + solaris*) |
1190 | + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
1191 | + dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
1192 | + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
1193 | + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
1194 | + dnl symlink is missing, so we set acl_libdirstem2 too. |
1195 | + AC_MSG_CHECKING([if buildling 64-bit app]) |
1196 | + AC_RUN_IFELSE([ |
1197 | + AC_LANG_PROGRAM([ |
1198 | + ], [ |
1199 | + return sizeof(void*) == 8 ? 0 : 1; |
1200 | + ]) |
1201 | + ], [ |
1202 | + gl_cv_solaris_64bit=yes |
1203 | + ], [ |
1204 | + gl_cv_solaris_64bit=no |
1205 | + ]) |
1206 | + AC_MSG_RESULT([$gl_cv_solaris_64bit]) |
1207 | + if test $gl_cv_solaris_64bit = yes; then |
1208 | + acl_libdirstem=lib/64 |
1209 | + case "$host_cpu" in |
1210 | + sparc*) acl_libdirstem2=lib/sparcv9 ;; |
1211 | + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; |
1212 | + esac |
1213 | + fi |
1214 | + ;; |
1215 | + *) |
1216 | + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
1217 | + if test -n "$searchpath"; then |
1218 | + acl_save_IFS="${IFS= }"; IFS=":" |
1219 | + for searchdir in $searchpath; do |
1220 | + if test -d "$searchdir"; then |
1221 | + case "$searchdir" in |
1222 | + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
1223 | + *) searchdir=`cd "$searchdir" && pwd` |
1224 | + case "$searchdir" in |
1225 | + */lib64 ) acl_libdirstem=lib64 ;; |
1226 | + esac ;; |
1227 | + esac |
1228 | + fi |
1229 | + done |
1230 | + IFS="$acl_save_IFS" |
1231 | + fi |
1232 | + ;; |
1233 | + esac |
1234 | + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" |
1235 | +]) |
1236 | |
1237 | === modified file 'm4/pandora_canonical.m4' |
1238 | --- m4/pandora_canonical.m4 2009-07-14 19:18:55 +0000 |
1239 | +++ m4/pandora_canonical.m4 2009-07-16 02:28:54 +0000 |
1240 | @@ -4,7 +4,7 @@ |
1241 | dnl with or without modifications, as long as this notice is preserved. |
1242 | |
1243 | dnl Which version of the canonical setup we're using |
1244 | -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.13]) |
1245 | +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.20]) |
1246 | |
1247 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
1248 | dnl Force dependency tracking on for Sun Studio builds |
1249 | @@ -70,7 +70,10 @@ |
1250 | m4_if(PCT_FORCE_GCC42, [yes], [ |
1251 | AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION) |
1252 | ]) |
1253 | - |
1254 | + |
1255 | + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
1256 | + AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) |
1257 | + AS_IF([test "x$INTELCC" = "xyes"], [enable_rpath=no]) |
1258 | |
1259 | PANDORA_LIBTOOL |
1260 | |
1261 | @@ -97,15 +100,10 @@ |
1262 | AC_C_CONST |
1263 | AC_C_INLINE |
1264 | AC_C_VOLATILE |
1265 | + AC_C_RESTRICT |
1266 | |
1267 | AC_HEADER_TIME |
1268 | AC_TYPE_SIZE_T |
1269 | - AC_FUNC_MALLOC |
1270 | - AC_FUNC_REALLOC |
1271 | - |
1272 | - |
1273 | - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
1274 | - |
1275 | AC_SYS_LARGEFILE |
1276 | |
1277 | |
1278 | @@ -127,6 +125,9 @@ |
1279 | |
1280 | PANDORA_ENABLE_DTRACE |
1281 | |
1282 | + AC_LIB_PREFIX |
1283 | + PANDORA_HAVE_BETTER_MALLOC |
1284 | + |
1285 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
1286 | AC_CHECK_PROGS([PERL], [perl]) |
1287 | |
1288 | |
1289 | === added file 'm4/pandora_have_better_malloc.m4' |
1290 | --- m4/pandora_have_better_malloc.m4 1970-01-01 00:00:00 +0000 |
1291 | +++ m4/pandora_have_better_malloc.m4 2009-07-16 02:58:56 +0000 |
1292 | @@ -0,0 +1,54 @@ |
1293 | +dnl Copyright (C) 2009 Sun Microsystems |
1294 | +dnl This file is free software; Sun Microsystems |
1295 | +dnl gives unlimited permission to copy and/or distribute it, |
1296 | +dnl with or without modifications, as long as this notice is preserved. |
1297 | + |
1298 | +AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ |
1299 | + AC_REQUIRE([AC_FUNC_MALLOC]) |
1300 | + AC_REQUIRE([AC_FUNC_REALLOC]) |
1301 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1302 | + |
1303 | + AC_ARG_ENABLE([umem], |
1304 | + [AS_HELP_STRING([--enable-umem], |
1305 | + [Enable linking with libumem @<:@default=off@:>@])], |
1306 | + [ac_enable_umem="$enableval"], |
1307 | + [ac_enable_umem="no"]) |
1308 | + |
1309 | + AC_ARG_ENABLE([tcmalloc], |
1310 | + [AS_HELP_STRING([--enable-tcmalloc], |
1311 | + [Enable linking with tcmalloc @<:@default=off@:>@])], |
1312 | + [ac_enable_tcmalloc="$enableval"], |
1313 | + [ac_enable_tcmalloc="no"]) |
1314 | + |
1315 | + AC_ARG_ENABLE([mtmalloc], |
1316 | + [AS_HELP_STRING([--disable-mtmalloc], |
1317 | + [Enable linking with mtmalloc @<:@default=on@:>@])], |
1318 | + [ac_enable_mtmalloc="$enableval"], |
1319 | + [ac_enable_mtmalloc="yes"]) |
1320 | + |
1321 | + save_LIBS="${LIBS}" |
1322 | + LIBS= |
1323 | + AS_IF([test "x$ac_enable_umem" = "xyes"],[ |
1324 | + AC_CHECK_LIB(umem,malloc,[],[]) |
1325 | + ],[ |
1326 | + case "$target_os" in |
1327 | + *linux*) |
1328 | + AS_IF([test "x$ac_enable_tcmalloc" != "xno"],[ |
1329 | + AC_CHECK_LIB(tcmalloc-minimal,malloc,[],[]) |
1330 | + AS_IF([test "x$ac_cv_lib_tcmalloc_minimal_malloc" != "xyes"],[ |
1331 | + AC_CHECK_LIB(tcmalloc,malloc,[],[]) |
1332 | + ]) |
1333 | + ]) |
1334 | + ;; |
1335 | + *solaris*) |
1336 | + AS_IF([test "x$ac_enable_mtmalloc" != "xno"],[ |
1337 | + AC_CHECK_LIB(mtmalloc,malloc,[],[]) |
1338 | + ]) |
1339 | + ;; |
1340 | + esac |
1341 | + ]) |
1342 | + BETTER_MALLOC_LIBS="${LIBS}" |
1343 | + LIBS="${save_LIBS}" |
1344 | + AC_SUBST([BETTER_MALLOC_LIBS]) |
1345 | + |
1346 | +]) |
1347 | |
1348 | === added file 'm4/pandora_have_libdrizzle.m4' |
1349 | --- m4/pandora_have_libdrizzle.m4 1970-01-01 00:00:00 +0000 |
1350 | +++ m4/pandora_have_libdrizzle.m4 2009-07-16 02:58:56 +0000 |
1351 | @@ -0,0 +1,46 @@ |
1352 | +dnl Copyright (C) 2009 Sun Microsystems |
1353 | +dnl This file is free software; Sun Microsystems |
1354 | +dnl gives unlimited permission to copy and/or distribute it, |
1355 | +dnl with or without modifications, as long as this notice is preserved. |
1356 | + |
1357 | +AC_DEFUN([_PANDORA_SEARCH_LIBDRIZZLE],[ |
1358 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1359 | + |
1360 | + dnl -------------------------------------------------------------------- |
1361 | + dnl Check for libdrizzle |
1362 | + dnl -------------------------------------------------------------------- |
1363 | + |
1364 | + AC_LIB_HAVE_LINKFLAGS(drizzle,,[ |
1365 | + #include <libdrizzle/drizzle_client.h> |
1366 | + ],[ |
1367 | + drizzle_st drizzle; |
1368 | + drizzle_version(); |
1369 | + ]) |
1370 | + |
1371 | + AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) |
1372 | + |
1373 | +]) |
1374 | + |
1375 | +AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ |
1376 | + AC_REQUIRE([_PANDORA_SEARCH_LIBDRIZZLE]) |
1377 | +]) |
1378 | + |
1379 | +AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ |
1380 | + AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) |
1381 | + AS_IF([test x$ac_cv_libdrizzle = xno], |
1382 | + AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])) |
1383 | +]) |
1384 | + |
1385 | +AC_DEFUN([PANDORA_LIBDRIZZLE_NOVCOL],[ |
1386 | + AC_CACHE_CHECK([if libdrizzle still has virtual columns], |
1387 | + [pandora_cv_libdrizzle_vcol], |
1388 | + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1389 | +#include <libdrizzle/drizzle.h> |
1390 | +int foo= DRIZZLE_COLUMN_TYPE_DRIZZLE_VIRTUAL; |
1391 | + ]])], |
1392 | + [pandora_cv_libdrizzle_vcol=yes], |
1393 | + [pandora_cv_libdrizzle_vcol=no])]) |
1394 | + AS_IF([test "$pandora_cv_libdrizzle_vcol" = "yes"],[ |
1395 | + AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.4]) |
1396 | + ]) |
1397 | +]) |
1398 | |
1399 | === added file 'm4/pandora_have_libgearman.m4' |
1400 | --- m4/pandora_have_libgearman.m4 1970-01-01 00:00:00 +0000 |
1401 | +++ m4/pandora_have_libgearman.m4 2009-07-16 02:58:56 +0000 |
1402 | @@ -0,0 +1,31 @@ |
1403 | +dnl Copyright (C) 2009 Sun Microsystems |
1404 | +dnl This file is free software; Sun Microsystems |
1405 | +dnl gives unlimited permission to copy and/or distribute it, |
1406 | +dnl with or without modifications, as long as this notice is preserved. |
1407 | + |
1408 | +AC_DEFUN([_PANDORA_SEARCH_LIBGEARMAN],[ |
1409 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1410 | + |
1411 | + dnl -------------------------------------------------------------------- |
1412 | + dnl Check for libgearman |
1413 | + dnl -------------------------------------------------------------------- |
1414 | + |
1415 | + AC_LIB_HAVE_LINKFLAGS(gearman,, |
1416 | + [#include <libgearman/gearman.h>],[ |
1417 | + gearman_client_st gearman_client; |
1418 | + gearman_version(); |
1419 | + ]) |
1420 | + |
1421 | + AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"]) |
1422 | + |
1423 | +]) |
1424 | + |
1425 | +AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[ |
1426 | + AC_REQUIRE([_PANDORA_SEARCH_LIBGEARMAN]) |
1427 | +]) |
1428 | + |
1429 | +AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ |
1430 | + AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) |
1431 | + AS_IF([test x$ac_cv_libgearman = xno], |
1432 | + AC_MSG_ERROR([libgearman is required for ${PACKAGE}])) |
1433 | +]) |
1434 | |
1435 | === added file 'm4/pandora_have_libmemcached.m4' |
1436 | --- m4/pandora_have_libmemcached.m4 1970-01-01 00:00:00 +0000 |
1437 | +++ m4/pandora_have_libmemcached.m4 2009-07-16 02:58:56 +0000 |
1438 | @@ -0,0 +1,35 @@ |
1439 | +dnl Copyright (C) 2009 Sun Microsystems |
1440 | +dnl This file is free software; Sun Microsystems |
1441 | +dnl gives unlimited permission to copy and/or distribute it, |
1442 | +dnl with or without modifications, as long as this notice is preserved. |
1443 | + |
1444 | +AC_DEFUN([_PANDORA_SEARCH_LIBMEMCACHED],[ |
1445 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1446 | + |
1447 | + dnl -------------------------------------------------------------------- |
1448 | + dnl Check for libmemcached |
1449 | + dnl -------------------------------------------------------------------- |
1450 | + |
1451 | + AC_LIB_HAVE_LINKFLAGS(memcached,,[ |
1452 | + #include <libmemcached/memcached.h> |
1453 | + ], [ |
1454 | + memcached_st memc; |
1455 | + memcached_dump_func *df; |
1456 | + memcached_version(); |
1457 | + ]) |
1458 | + |
1459 | + AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) |
1460 | + |
1461 | + AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ]) |
1462 | + |
1463 | +]) |
1464 | + |
1465 | +AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ |
1466 | + AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED]) |
1467 | +]) |
1468 | + |
1469 | +AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[ |
1470 | + AC_REQUIRE([PANDORA_HAVE_LIBMEMCACHED]) |
1471 | + AS_IF([test x$ac_cv_libmemcached = xno], |
1472 | + AC_MSG_ERROR([libmemcached is required for ${PACKAGE}])) |
1473 | +]) |
1474 | |
1475 | === added file 'm4/pandora_have_sqlite.m4' |
1476 | --- m4/pandora_have_sqlite.m4 1970-01-01 00:00:00 +0000 |
1477 | +++ m4/pandora_have_sqlite.m4 2009-07-16 02:58:56 +0000 |
1478 | @@ -0,0 +1,24 @@ |
1479 | +dnl Copyright (C) 2009 Sun Microsystems |
1480 | +dnl This file is free software; Sun Microsystems |
1481 | +dnl gives unlimited permission to copy and/or distribute it, |
1482 | +dnl with or without modifications, as long as this notice is preserved. |
1483 | + |
1484 | + |
1485 | +AC_DEFUN([_PANDORA_SEARCH_SQLITE],[ |
1486 | + AC_REQUIRE([AC_LIB_PREFIX]) |
1487 | + |
1488 | + AC_LIB_HAVE_LINKFLAGS(sqlite3,,[ |
1489 | + #include <stdio.h> |
1490 | + #include <sqlite3.h> |
1491 | + ],[ |
1492 | + sqlite3 *db; |
1493 | + sqlite3_open(NULL, &db); |
1494 | + ]) |
1495 | + |
1496 | + AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"]) |
1497 | + |
1498 | +]) |
1499 | + |
1500 | +AC_DEFUN([PANDORA_HAVE_SQLITE],[ |
1501 | + AC_REQUIRE([_PANDORA_SEARCH_SQLITE]) |
1502 | +]) |
1503 | |
1504 | === modified file 'm4/pandora_optimize.m4' |
1505 | --- m4/pandora_optimize.m4 2009-07-14 19:18:55 +0000 |
1506 | +++ m4/pandora_optimize.m4 2009-07-16 02:28:54 +0000 |
1507 | @@ -6,7 +6,7 @@ |
1508 | AC_DEFUN([PANDORA_OPTIMIZE],[ |
1509 | dnl Build optimized or debug version ? |
1510 | dnl First check for gcc and g++ |
1511 | - AS_IF([test "$GCC" = "yes"],[ |
1512 | + AS_IF([test "$GCC" = "yes" -a "$INTELCC" = "no"],[ |
1513 | |
1514 | dnl The following is required for portable results of floating point |
1515 | dnl calculations on PowerPC. The same must also be done for IA-64, but |
1516 | @@ -30,6 +30,20 @@ |
1517 | OPTIMIZE_CFLAGS="-O3" |
1518 | OPTIMIZE_CXXFLAGS="-O3" |
1519 | ]) |
1520 | + AS_IF([test "$INTELCC" = "yes"],[ |
1521 | + dnl Once we can use a modern autoconf, we can replace the std=gnu99 here |
1522 | + dnl with using AC_CC_STD_C99 above |
1523 | + CC="${CC} -std=c99" |
1524 | + |
1525 | + AM_CPPFLAGS="-g ${AM_CPPFLAGS}" |
1526 | + |
1527 | + DEBUG_CFLAGS="-O0" |
1528 | + DEBUG_CXXFLAGS="-O0" |
1529 | + |
1530 | + OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static" |
1531 | + OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}" |
1532 | + |
1533 | + ]) |
1534 | AS_IF([test "$SUNCC" = "yes"],[ |
1535 | dnl Once we can use a modern autoconf, we can replace the -xc99=all here |
1536 | dnl with using AC_CC_STD_C99 above |
1537 | |
1538 | === modified file 'm4/pandora_warnings.m4' |
1539 | --- m4/pandora_warnings.m4 2009-07-14 19:18:55 +0000 |
1540 | +++ m4/pandora_warnings.m4 2009-07-16 02:28:54 +0000 |
1541 | @@ -127,78 +127,88 @@ |
1542 | NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing" |
1543 | NO_SHADOW="-Wno-shadow" |
1544 | |
1545 | - m4_if(PW_LESS_WARNINGS,[no],[ |
1546 | - BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing" |
1547 | - CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings" |
1548 | - CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast" |
1549 | + AS_IF([test "$INTELCC" = "yes"],[ |
1550 | + m4_if(PW_LESS_WARNINGS,[no],[ |
1551 | + BASE_WARNINGS="-w1 -Wall -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" |
1552 | + ],[ |
1553 | + BASE_WARNINGS="-w1 -Wall -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" |
1554 | + ]) |
1555 | + CC_WARNINGS="${BASE_WARNINGS}" |
1556 | + CXX_WARNINGS="${BASE_WARNINGS}" |
1557 | ],[ |
1558 | - BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}" |
1559 | - ]) |
1560 | - |
1561 | - AS_IF([test "${ac_cv_assert}" = "no"], |
1562 | - [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) |
1563 | - |
1564 | - BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}" |
1565 | - CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" |
1566 | - CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" |
1567 | - |
1568 | - AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++], |
1569 | - [ac_cv_safe_to_use_Wmissing_declarations_], |
1570 | - [AC_LANG_PUSH(C++) |
1571 | - save_CXXFLAGS="$CXXFLAGS" |
1572 | - CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}" |
1573 | - AC_COMPILE_IFELSE([ |
1574 | - AC_LANG_PROGRAM( |
1575 | - [[ |
1576 | -#include <stdio.h> |
1577 | - ]], [[]]) |
1578 | - ], |
1579 | - [ac_cv_safe_to_use_Wmissing_declarations_=yes], |
1580 | - [ac_cv_safe_to_use_Wmissing_declarations_=no]) |
1581 | - CXXFLAGS="$save_CXXFLAGS" |
1582 | - AC_LANG_POP() |
1583 | - ]) |
1584 | - AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"], |
1585 | - [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"]) |
1586 | - |
1587 | - AC_CACHE_CHECK([whether it is safe to use -Wlogical-op], |
1588 | - [ac_cv_safe_to_use_Wlogical_op_], |
1589 | - [save_CFLAGS="$CFLAGS" |
1590 | - CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}" |
1591 | - AC_COMPILE_IFELSE([ |
1592 | - AC_LANG_PROGRAM( |
1593 | - [[ |
1594 | -#include <stdio.h> |
1595 | - ]], [[]]) |
1596 | - ], |
1597 | - [ac_cv_safe_to_use_Wlogical_op_=yes], |
1598 | - [ac_cv_safe_to_use_Wlogical_op_=no]) |
1599 | - CFLAGS="$save_CFLAGS"]) |
1600 | - AS_IF([test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"], |
1601 | - [CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"]) |
1602 | - |
1603 | - AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++], |
1604 | - [ac_cv_safe_to_use_Wredundant_decls_], |
1605 | - [AC_LANG_PUSH(C++) |
1606 | - save_CXXFLAGS="${CXXFLAGS}" |
1607 | - CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}" |
1608 | - AC_COMPILE_IFELSE( |
1609 | - [AC_LANG_PROGRAM([ |
1610 | + m4_if(PW_LESS_WARNINGS,[no],[ |
1611 | + BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing" |
1612 | + CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings" |
1613 | + CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast" |
1614 | + ],[ |
1615 | + BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}" |
1616 | + ]) |
1617 | + |
1618 | + AS_IF([test "${ac_cv_assert}" = "no"], |
1619 | + [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) |
1620 | + |
1621 | + BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}" |
1622 | + CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" |
1623 | + CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" |
1624 | + |
1625 | + AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++], |
1626 | + [ac_cv_safe_to_use_Wmissing_declarations_], |
1627 | + [AC_LANG_PUSH(C++) |
1628 | + save_CXXFLAGS="$CXXFLAGS" |
1629 | + CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}" |
1630 | + AC_COMPILE_IFELSE([ |
1631 | + AC_LANG_PROGRAM( |
1632 | + [[ |
1633 | +#include <stdio.h> |
1634 | + ]], [[]]) |
1635 | + ], |
1636 | + [ac_cv_safe_to_use_Wmissing_declarations_=yes], |
1637 | + [ac_cv_safe_to_use_Wmissing_declarations_=no]) |
1638 | + CXXFLAGS="$save_CXXFLAGS" |
1639 | + AC_LANG_POP() |
1640 | + ]) |
1641 | + AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"], |
1642 | + [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"]) |
1643 | + |
1644 | + AC_CACHE_CHECK([whether it is safe to use -Wlogical-op], |
1645 | + [ac_cv_safe_to_use_Wlogical_op_], |
1646 | + [save_CFLAGS="$CFLAGS" |
1647 | + CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}" |
1648 | + AC_COMPILE_IFELSE([ |
1649 | + AC_LANG_PROGRAM( |
1650 | + [[ |
1651 | +#include <stdio.h> |
1652 | + ]], [[]]) |
1653 | + ], |
1654 | + [ac_cv_safe_to_use_Wlogical_op_=yes], |
1655 | + [ac_cv_safe_to_use_Wlogical_op_=no]) |
1656 | + CFLAGS="$save_CFLAGS"]) |
1657 | + AS_IF([test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"], |
1658 | + [CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"]) |
1659 | + |
1660 | + AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++], |
1661 | + [ac_cv_safe_to_use_Wredundant_decls_], |
1662 | + [AC_LANG_PUSH(C++) |
1663 | + save_CXXFLAGS="${CXXFLAGS}" |
1664 | + CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}" |
1665 | + AC_COMPILE_IFELSE( |
1666 | + [AC_LANG_PROGRAM([ |
1667 | template <typename E> struct C { void foo(); }; |
1668 | template <typename E> void C<E>::foo() { } |
1669 | template <> void C<int>::foo(); |
1670 | - AC_INCLUDES_DEFAULT])], |
1671 | - [ac_cv_safe_to_use_Wredundant_decls_=yes], |
1672 | - [ac_cv_safe_to_use_Wredundant_decls_=no]) |
1673 | - CXXFLAGS="${save_CXXFLAGS}" |
1674 | - AC_LANG_POP()]) |
1675 | - AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], |
1676 | - [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], |
1677 | - [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) |
1678 | - |
1679 | - NO_REDUNDANT_DECLS="-Wno-redundant-decls" |
1680 | - PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow" |
1681 | - |
1682 | + AC_INCLUDES_DEFAULT])], |
1683 | + [ac_cv_safe_to_use_Wredundant_decls_=yes], |
1684 | + [ac_cv_safe_to_use_Wredundant_decls_=no]) |
1685 | + CXXFLAGS="${save_CXXFLAGS}" |
1686 | + AC_LANG_POP()]) |
1687 | + AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], |
1688 | + [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], |
1689 | + [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) |
1690 | + |
1691 | + NO_REDUNDANT_DECLS="-Wno-redundant-decls" |
1692 | + PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow" |
1693 | + |
1694 | + ]) |
1695 | ]) |
1696 | |
1697 | AS_IF([test "$SUNCC" = "yes"],[ |
1698 | @@ -229,6 +239,7 @@ |
1699 | |
1700 | m4_if(PW_LESS_WARNINGS, [no],[ |
1701 | CC_WARNINGS_FULL="-erroff=E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}" |
1702 | + CXX_WARNINGS_FULL="-erroff=inllargeuse" |
1703 | ],[ |
1704 | CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR" |
1705 | CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint" |
1706 | |
1707 | === added file 'm4/pandora_with_memcached.m4' |
1708 | --- m4/pandora_with_memcached.m4 1970-01-01 00:00:00 +0000 |
1709 | +++ m4/pandora_with_memcached.m4 2009-07-16 02:58:56 +0000 |
1710 | @@ -0,0 +1,33 @@ |
1711 | +dnl Copyright (C) 2009 Sun Microsystems |
1712 | +dnl This file is free software; Sun Microsystems |
1713 | +dnl gives unlimited permission to copy and/or distribute it, |
1714 | +dnl with or without modifications, as long as this notice is preserved. |
1715 | + |
1716 | +AC_DEFUN([PANDORA_WITH_MEMCACHED],[ |
1717 | + |
1718 | + AC_ARG_WITH([memcached], |
1719 | + [AS_HELP_STRING([--with-memcached], |
1720 | + [Memcached binary to use for make test])], |
1721 | + [ac_cv_with_memcached="$withval"], |
1722 | + [ac_cv_with_memcached=memcached]) |
1723 | + |
1724 | + # just ignore the user if --without-memcached is passed.. it is |
1725 | + # only used by make test |
1726 | + AS_IF([test "x$withval" = "xno"],[ |
1727 | + ac_cv_with_memcached=memcached |
1728 | + MEMCACHED_BINARY=memcached |
1729 | + ],[ |
1730 | + AS_IF([test -f "$withval"],[ |
1731 | + ac_cv_with_memcached=$withval |
1732 | + MEMCACHED_BINARY=$withval |
1733 | + ],[ |
1734 | + AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") |
1735 | + AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ |
1736 | + AC_MSG_ERROR(["could not find memcached binary"]) |
1737 | + ]) |
1738 | + ]) |
1739 | + ]) |
1740 | + AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", |
1741 | + [Name of the memcached binary used in make test]) |
1742 | + |
1743 | +]) |
1744 | |
1745 | === modified file 'tests/plus.cpp' |
1746 | --- tests/plus.cpp 2009-07-11 19:10:39 +0000 |
1747 | +++ tests/plus.cpp 2009-07-15 18:45:15 +0000 |
1748 | @@ -21,11 +21,19 @@ |
1749 | using namespace std; |
1750 | |
1751 | extern "C" { |
1752 | + test_return basic_test(memcached_st *memc); |
1753 | + test_return increment_test(memcached_st *memc); |
1754 | + test_return basic_master_key_test(memcached_st *memc); |
1755 | + test_return mget_result_function(memcached_st *memc); |
1756 | + test_return mget_test(memcached_st *memc); |
1757 | + memcached_return callback_counter(memcached_st *, |
1758 | + memcached_result_st *, |
1759 | + void *context); |
1760 | void *world_create(void); |
1761 | void world_destroy(void *p); |
1762 | } |
1763 | |
1764 | -static test_return basic_test(memcached_st *memc) |
1765 | +test_return basic_test(memcached_st *memc) |
1766 | { |
1767 | Memcached foo(memc); |
1768 | const string value_set("This is some data"); |
1769 | @@ -40,7 +48,7 @@ |
1770 | return TEST_SUCCESS; |
1771 | } |
1772 | |
1773 | -static test_return increment_test(memcached_st *memc) |
1774 | +test_return increment_test(memcached_st *memc) |
1775 | { |
1776 | Memcached mcach(memc); |
1777 | bool rc; |
1778 | @@ -73,7 +81,7 @@ |
1779 | return TEST_SUCCESS; |
1780 | } |
1781 | |
1782 | -static test_return basic_master_key_test(memcached_st *memc) |
1783 | +test_return basic_master_key_test(memcached_st *memc) |
1784 | { |
1785 | Memcached foo(memc); |
1786 | const string value_set("Data for server A"); |
1787 | @@ -95,9 +103,9 @@ |
1788 | } |
1789 | |
1790 | /* Count the results */ |
1791 | -static memcached_return callback_counter(memcached_st *ptr __attribute__((unused)), |
1792 | - memcached_result_st *result __attribute__((unused)), |
1793 | - void *context) |
1794 | +memcached_return callback_counter(memcached_st *, |
1795 | + memcached_result_st *, |
1796 | + void *context) |
1797 | { |
1798 | unsigned int *counter= static_cast<unsigned int *>(context); |
1799 | |
1800 | @@ -106,7 +114,7 @@ |
1801 | return MEMCACHED_SUCCESS; |
1802 | } |
1803 | |
1804 | -static test_return mget_result_function(memcached_st *memc) |
1805 | +test_return mget_result_function(memcached_st *memc) |
1806 | { |
1807 | Memcached mc(memc); |
1808 | bool rc; |
1809 | @@ -138,7 +146,7 @@ |
1810 | return TEST_SUCCESS; |
1811 | } |
1812 | |
1813 | -static test_return mget_test(memcached_st *memc) |
1814 | +test_return mget_test(memcached_st *memc) |
1815 | { |
1816 | Memcached mc(memc); |
1817 | bool rc; |
Contains some small fixes for solaris builds.
-Padraig