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