Mercurial > mxe-octave
comparison src/vmime-0.9.1-svn-r533-20100215.patch @ 745:8ea29766f021
upgrade package vmime to 0.9.1-svn-r533
author | Mark Brand <mabrand@mabrand.nl> |
---|---|
date | Mon, 15 Feb 2010 11:05:16 +0100 |
parents | |
children | 1f5b2dfe8966 |
comparison
equal
deleted
inserted
replaced
744:b09aadb3810b | 745:8ea29766f021 |
---|---|
1 This file is part of mingw-cross-env. | |
2 diff -urN b/m4/lib-link.m4 c/m4/lib-link.m4 | |
3 --- b/m4/lib-link.m4 2008-01-05 18:49:17.000000000 +0100 | |
4 +++ c/m4/lib-link.m4 2010-02-15 10:38:53.572219098 +0100 | |
5 @@ -1,17 +1,19 @@ | |
6 -# lib-link.m4 serial 6 (gettext-0.14.3) | |
7 -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | |
8 +# lib-link.m4 serial 13 (gettext-0.17) | |
9 +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. | |
10 dnl This file is free software; the Free Software Foundation | |
11 dnl gives unlimited permission to copy and/or distribute it, | |
12 dnl with or without modifications, as long as this notice is preserved. | |
13 | |
14 dnl From Bruno Haible. | |
15 | |
16 -AC_PREREQ(2.50) | |
17 +AC_PREREQ(2.54) | |
18 | |
19 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | |
20 dnl the libraries corresponding to explicit and implicit dependencies. | |
21 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | |
22 dnl augments the CPPFLAGS variable. | |
23 +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | |
24 +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
25 AC_DEFUN([AC_LIB_LINKFLAGS], | |
26 [ | |
27 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
28 @@ -24,13 +26,16 @@ | |
29 ac_cv_lib[]Name[]_libs="$LIB[]NAME" | |
30 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | |
31 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | |
32 + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" | |
33 ]) | |
34 LIB[]NAME="$ac_cv_lib[]Name[]_libs" | |
35 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | |
36 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | |
37 + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" | |
38 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | |
39 AC_SUBST([LIB]NAME) | |
40 AC_SUBST([LTLIB]NAME) | |
41 + AC_SUBST([LIB]NAME[_PREFIX]) | |
42 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | |
43 dnl results of this search when this library appears as a dependency. | |
44 HAVE_LIB[]NAME=yes | |
45 @@ -46,6 +51,8 @@ | |
46 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | |
47 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | |
48 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | |
49 +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | |
50 +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
51 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |
52 [ | |
53 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
54 @@ -82,17 +89,23 @@ | |
55 CPPFLAGS="$ac_save_CPPFLAGS" | |
56 LIB[]NAME= | |
57 LTLIB[]NAME= | |
58 + LIB[]NAME[]_PREFIX= | |
59 fi | |
60 AC_SUBST([HAVE_LIB]NAME) | |
61 AC_SUBST([LIB]NAME) | |
62 AC_SUBST([LTLIB]NAME) | |
63 + AC_SUBST([LIB]NAME[_PREFIX]) | |
64 undefine([Name]) | |
65 undefine([NAME]) | |
66 ]) | |
67 | |
68 dnl Determine the platform dependent parameters needed to use rpath: | |
69 -dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, | |
70 -dnl hardcode_direct, hardcode_minus_L. | |
71 +dnl acl_libext, | |
72 +dnl acl_shlibext, | |
73 +dnl acl_hardcode_libdir_flag_spec, | |
74 +dnl acl_hardcode_libdir_separator, | |
75 +dnl acl_hardcode_direct, | |
76 +dnl acl_hardcode_minus_L. | |
77 AC_DEFUN([AC_LIB_RPATH], | |
78 [ | |
79 dnl Tell automake >= 1.10 to complain if config.rpath is missing. | |
80 @@ -109,12 +122,14 @@ | |
81 acl_cv_rpath=done | |
82 ]) | |
83 wl="$acl_cv_wl" | |
84 - libext="$acl_cv_libext" | |
85 - shlibext="$acl_cv_shlibext" | |
86 - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
87 - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
88 - hardcode_direct="$acl_cv_hardcode_direct" | |
89 - hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
90 + acl_libext="$acl_cv_libext" | |
91 + acl_shlibext="$acl_cv_shlibext" | |
92 + acl_libname_spec="$acl_cv_libname_spec" | |
93 + acl_library_names_spec="$acl_cv_library_names_spec" | |
94 + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
95 + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
96 + acl_hardcode_direct="$acl_cv_hardcode_direct" | |
97 + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
98 dnl Determine whether the user wants rpath handling at all. | |
99 AC_ARG_ENABLE(rpath, | |
100 [ --disable-rpath do not hardcode runtime library paths], | |
101 @@ -124,19 +139,24 @@ | |
102 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | |
103 dnl the libraries corresponding to explicit and implicit dependencies. | |
104 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | |
105 +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found | |
106 +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
107 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |
108 [ | |
109 + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
110 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | |
111 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | |
112 + dnl Autoconf >= 2.61 supports dots in --with options. | |
113 + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) | |
114 dnl By default, look in $includedir and $libdir. | |
115 use_additional=yes | |
116 AC_LIB_WITH_FINAL_PREFIX([ | |
117 eval additional_includedir=\"$includedir\" | |
118 eval additional_libdir=\"$libdir\" | |
119 ]) | |
120 - AC_LIB_ARG_WITH([lib$1-prefix], | |
121 -[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | |
122 - --without-lib$1-prefix don't search for lib$1 in includedir and libdir], | |
123 + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], | |
124 +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | |
125 + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], | |
126 [ | |
127 if test "X$withval" = "Xno"; then | |
128 use_additional=no | |
129 @@ -148,7 +168,7 @@ | |
130 ]) | |
131 else | |
132 additional_includedir="$withval/include" | |
133 - additional_libdir="$withval/lib" | |
134 + additional_libdir="$withval/$acl_libdirstem" | |
135 fi | |
136 fi | |
137 ]) | |
138 @@ -157,6 +177,7 @@ | |
139 LIB[]NAME= | |
140 LTLIB[]NAME= | |
141 INC[]NAME= | |
142 + LIB[]NAME[]_PREFIX= | |
143 rpathdirs= | |
144 ltrpathdirs= | |
145 names_already_handled= | |
146 @@ -196,22 +217,55 @@ | |
147 found_la= | |
148 found_so= | |
149 found_a= | |
150 + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | |
151 + if test -n "$acl_shlibext"; then | |
152 + shrext=".$acl_shlibext" # typically: shrext=.so | |
153 + else | |
154 + shrext= | |
155 + fi | |
156 if test $use_additional = yes; then | |
157 - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
158 - found_dir="$additional_libdir" | |
159 - found_so="$additional_libdir/lib$name.$shlibext" | |
160 - if test -f "$additional_libdir/lib$name.la"; then | |
161 - found_la="$additional_libdir/lib$name.la" | |
162 - fi | |
163 - else | |
164 - if test -f "$additional_libdir/lib$name.$libext"; then | |
165 - found_dir="$additional_libdir" | |
166 - found_a="$additional_libdir/lib$name.$libext" | |
167 - if test -f "$additional_libdir/lib$name.la"; then | |
168 - found_la="$additional_libdir/lib$name.la" | |
169 + dir="$additional_libdir" | |
170 + dnl The same code as in the loop below: | |
171 + dnl First look for a shared library. | |
172 + if test -n "$acl_shlibext"; then | |
173 + if test -f "$dir/$libname$shrext"; then | |
174 + found_dir="$dir" | |
175 + found_so="$dir/$libname$shrext" | |
176 + else | |
177 + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
178 + ver=`(cd "$dir" && \ | |
179 + for f in "$libname$shrext".*; do echo "$f"; done \ | |
180 + | sed -e "s,^$libname$shrext\\\\.,," \ | |
181 + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
182 + | sed 1q ) 2>/dev/null` | |
183 + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
184 + found_dir="$dir" | |
185 + found_so="$dir/$libname$shrext.$ver" | |
186 + fi | |
187 + else | |
188 + eval library_names=\"$acl_library_names_spec\" | |
189 + for f in $library_names; do | |
190 + if test -f "$dir/$f"; then | |
191 + found_dir="$dir" | |
192 + found_so="$dir/$f" | |
193 + break | |
194 + fi | |
195 + done | |
196 fi | |
197 fi | |
198 fi | |
199 + dnl Then look for a static library. | |
200 + if test "X$found_dir" = "X"; then | |
201 + if test -f "$dir/$libname.$acl_libext"; then | |
202 + found_dir="$dir" | |
203 + found_a="$dir/$libname.$acl_libext" | |
204 + fi | |
205 + fi | |
206 + if test "X$found_dir" != "X"; then | |
207 + if test -f "$dir/$libname.la"; then | |
208 + found_la="$dir/$libname.la" | |
209 + fi | |
210 + fi | |
211 fi | |
212 if test "X$found_dir" = "X"; then | |
213 for x in $LDFLAGS $LTLIB[]NAME; do | |
214 @@ -219,21 +273,46 @@ | |
215 case "$x" in | |
216 -L*) | |
217 dir=`echo "X$x" | sed -e 's/^X-L//'` | |
218 - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
219 - found_dir="$dir" | |
220 - found_so="$dir/lib$name.$shlibext" | |
221 - if test -f "$dir/lib$name.la"; then | |
222 - found_la="$dir/lib$name.la" | |
223 - fi | |
224 - else | |
225 - if test -f "$dir/lib$name.$libext"; then | |
226 + dnl First look for a shared library. | |
227 + if test -n "$acl_shlibext"; then | |
228 + if test -f "$dir/$libname$shrext"; then | |
229 found_dir="$dir" | |
230 - found_a="$dir/lib$name.$libext" | |
231 - if test -f "$dir/lib$name.la"; then | |
232 - found_la="$dir/lib$name.la" | |
233 + found_so="$dir/$libname$shrext" | |
234 + else | |
235 + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
236 + ver=`(cd "$dir" && \ | |
237 + for f in "$libname$shrext".*; do echo "$f"; done \ | |
238 + | sed -e "s,^$libname$shrext\\\\.,," \ | |
239 + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
240 + | sed 1q ) 2>/dev/null` | |
241 + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
242 + found_dir="$dir" | |
243 + found_so="$dir/$libname$shrext.$ver" | |
244 + fi | |
245 + else | |
246 + eval library_names=\"$acl_library_names_spec\" | |
247 + for f in $library_names; do | |
248 + if test -f "$dir/$f"; then | |
249 + found_dir="$dir" | |
250 + found_so="$dir/$f" | |
251 + break | |
252 + fi | |
253 + done | |
254 fi | |
255 fi | |
256 fi | |
257 + dnl Then look for a static library. | |
258 + if test "X$found_dir" = "X"; then | |
259 + if test -f "$dir/$libname.$acl_libext"; then | |
260 + found_dir="$dir" | |
261 + found_a="$dir/$libname.$acl_libext" | |
262 + fi | |
263 + fi | |
264 + if test "X$found_dir" != "X"; then | |
265 + if test -f "$dir/$libname.la"; then | |
266 + found_la="$dir/$libname.la" | |
267 + fi | |
268 + fi | |
269 ;; | |
270 esac | |
271 if test "X$found_dir" != "X"; then | |
272 @@ -248,7 +327,7 @@ | |
273 dnl Linking with a shared library. We attempt to hardcode its | |
274 dnl directory into the executable's runpath, unless it's the | |
275 dnl standard /usr/lib. | |
276 - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
277 + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then | |
278 dnl No hardcoding is needed. | |
279 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
280 else | |
281 @@ -267,12 +346,12 @@ | |
282 ltrpathdirs="$ltrpathdirs $found_dir" | |
283 fi | |
284 dnl The hardcoding into $LIBNAME is system dependent. | |
285 - if test "$hardcode_direct" = yes; then | |
286 + if test "$acl_hardcode_direct" = yes; then | |
287 dnl Using DIR/libNAME.so during linking hardcodes DIR into the | |
288 dnl resulting binary. | |
289 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
290 else | |
291 - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
292 + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
293 dnl Use an explicit option to hardcode DIR into the resulting | |
294 dnl binary. | |
295 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
296 @@ -303,13 +382,13 @@ | |
297 if test -z "$haveit"; then | |
298 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | |
299 fi | |
300 - if test "$hardcode_minus_L" != no; then | |
301 + if test "$acl_hardcode_minus_L" != no; then | |
302 dnl FIXME: Not sure whether we should use | |
303 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | |
304 dnl here. | |
305 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
306 else | |
307 - dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH | |
308 + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH | |
309 dnl here, because this doesn't fit in flags passed to the | |
310 dnl compiler. So give up. No hardcoding. This affects only | |
311 dnl very old systems. | |
312 @@ -334,8 +413,9 @@ | |
313 dnl Assume the include files are nearby. | |
314 additional_includedir= | |
315 case "$found_dir" in | |
316 - */lib | */lib/) | |
317 - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
318 + */$acl_libdirstem | */$acl_libdirstem/) | |
319 + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | |
320 + LIB[]NAME[]_PREFIX="$basedir" | |
321 additional_includedir="$basedir/include" | |
322 ;; | |
323 esac | |
324 @@ -396,9 +476,9 @@ | |
325 dnl 3. if it's already present in $LDFLAGS or the already | |
326 dnl constructed $LIBNAME, | |
327 dnl 4. if it doesn't exist as a directory. | |
328 - if test "X$additional_libdir" != "X/usr/lib"; then | |
329 + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | |
330 haveit= | |
331 - if test "X$additional_libdir" = "X/usr/local/lib"; then | |
332 + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | |
333 if test -n "$GCC"; then | |
334 case $host_os in | |
335 linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
336 @@ -497,18 +577,18 @@ | |
337 done | |
338 done | |
339 if test "X$rpathdirs" != "X"; then | |
340 - if test -n "$hardcode_libdir_separator"; then | |
341 + if test -n "$acl_hardcode_libdir_separator"; then | |
342 dnl Weird platform: only the last -rpath option counts, the user must | |
343 dnl pass all path elements in one option. We can arrange that for a | |
344 dnl single library, but not when more than one $LIBNAMEs are used. | |
345 alldirs= | |
346 for found_dir in $rpathdirs; do | |
347 - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
348 + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | |
349 done | |
350 - dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. | |
351 + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. | |
352 acl_save_libdir="$libdir" | |
353 libdir="$alldirs" | |
354 - eval flag=\"$hardcode_libdir_flag_spec\" | |
355 + eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
356 libdir="$acl_save_libdir" | |
357 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | |
358 else | |
359 @@ -516,7 +596,7 @@ | |
360 for found_dir in $rpathdirs; do | |
361 acl_save_libdir="$libdir" | |
362 libdir="$found_dir" | |
363 - eval flag=\"$hardcode_libdir_flag_spec\" | |
364 + eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
365 libdir="$acl_save_libdir" | |
366 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | |
367 done | |
368 @@ -551,3 +631,79 @@ | |
369 fi | |
370 done | |
371 ]) | |
372 + | |
373 +dnl For those cases where a variable contains several -L and -l options | |
374 +dnl referring to unknown libraries and directories, this macro determines the | |
375 +dnl necessary additional linker options for the runtime path. | |
376 +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) | |
377 +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. | |
378 +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, | |
379 +dnl otherwise linking without libtool is assumed. | |
380 +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |
381 +[ | |
382 + AC_REQUIRE([AC_LIB_RPATH]) | |
383 + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
384 + $1= | |
385 + if test "$enable_rpath" != no; then | |
386 + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
387 + dnl Use an explicit option to hardcode directories into the resulting | |
388 + dnl binary. | |
389 + rpathdirs= | |
390 + next= | |
391 + for opt in $2; do | |
392 + if test -n "$next"; then | |
393 + dir="$next" | |
394 + dnl No need to hardcode the standard /usr/lib. | |
395 + if test "X$dir" != "X/usr/$acl_libdirstem"; then | |
396 + rpathdirs="$rpathdirs $dir" | |
397 + fi | |
398 + next= | |
399 + else | |
400 + case $opt in | |
401 + -L) next=yes ;; | |
402 + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | |
403 + dnl No need to hardcode the standard /usr/lib. | |
404 + if test "X$dir" != "X/usr/$acl_libdirstem"; then | |
405 + rpathdirs="$rpathdirs $dir" | |
406 + fi | |
407 + next= ;; | |
408 + *) next= ;; | |
409 + esac | |
410 + fi | |
411 + done | |
412 + if test "X$rpathdirs" != "X"; then | |
413 + if test -n ""$3""; then | |
414 + dnl libtool is used for linking. Use -R options. | |
415 + for dir in $rpathdirs; do | |
416 + $1="${$1}${$1:+ }-R$dir" | |
417 + done | |
418 + else | |
419 + dnl The linker is used for linking directly. | |
420 + if test -n "$acl_hardcode_libdir_separator"; then | |
421 + dnl Weird platform: only the last -rpath option counts, the user | |
422 + dnl must pass all path elements in one option. | |
423 + alldirs= | |
424 + for dir in $rpathdirs; do | |
425 + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" | |
426 + done | |
427 + acl_save_libdir="$libdir" | |
428 + libdir="$alldirs" | |
429 + eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
430 + libdir="$acl_save_libdir" | |
431 + $1="$flag" | |
432 + else | |
433 + dnl The -rpath options are cumulative. | |
434 + for dir in $rpathdirs; do | |
435 + acl_save_libdir="$libdir" | |
436 + libdir="$dir" | |
437 + eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
438 + libdir="$acl_save_libdir" | |
439 + $1="${$1}${$1:+ }$flag" | |
440 + done | |
441 + fi | |
442 + fi | |
443 + fi | |
444 + fi | |
445 + fi | |
446 + AC_SUBST([$1]) | |
447 +]) | |
448 diff -urN b/m4/lib-prefix.m4 c/m4/lib-prefix.m4 | |
449 --- b/m4/lib-prefix.m4 2008-01-05 18:49:17.000000000 +0100 | |
450 +++ c/m4/lib-prefix.m4 2010-02-15 10:39:25.710466533 +0100 | |
451 @@ -1,4 +1,4 @@ | |
452 -# lib-prefix.m4 serial 4 (gettext-0.14.2) | |
453 +# lib-prefix.m4 serial 5 (gettext-0.15) | |
454 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | |
455 dnl This file is free software; the Free Software Foundation | |
456 dnl gives unlimited permission to copy and/or distribute it, | |
457 @@ -24,6 +24,7 @@ | |
458 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | |
459 AC_REQUIRE([AC_PROG_CC]) | |
460 AC_REQUIRE([AC_CANONICAL_HOST]) | |
461 + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
462 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
463 dnl By default, look in $includedir and $libdir. | |
464 use_additional=yes | |
465 @@ -45,7 +46,7 @@ | |
466 ]) | |
467 else | |
468 additional_includedir="$withval/include" | |
469 - additional_libdir="$withval/lib" | |
470 + additional_libdir="$withval/$acl_libdirstem" | |
471 fi | |
472 fi | |
473 ]) | |
474 @@ -87,7 +88,7 @@ | |
475 dnl 2. if it's already present in $LDFLAGS, | |
476 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | |
477 dnl 4. if it doesn't exist as a directory. | |
478 - if test "X$additional_libdir" != "X/usr/lib"; then | |
479 + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | |
480 haveit= | |
481 for x in $LDFLAGS; do | |
482 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
483 @@ -97,7 +98,7 @@ | |
484 fi | |
485 done | |
486 if test -z "$haveit"; then | |
487 - if test "X$additional_libdir" = "X/usr/local/lib"; then | |
488 + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | |
489 if test -n "$GCC"; then | |
490 case $host_os in | |
491 linux*) haveit=yes;; | |
492 @@ -151,3 +152,34 @@ | |
493 exec_prefix="$acl_save_exec_prefix" | |
494 prefix="$acl_save_prefix" | |
495 ]) | |
496 + | |
497 +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | |
498 +dnl the basename of the libdir, either "lib" or "lib64". | |
499 +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | |
500 +[ | |
501 + dnl There is no formal standard regarding lib and lib64. The current | |
502 + dnl practice is that on a system supporting 32-bit and 64-bit instruction | |
503 + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | |
504 + dnl libraries go under $prefix/lib. We determine the compiler's default | |
505 + dnl mode by looking at the compiler's library search path. If at least | |
506 + dnl of its elements ends in /lib64 or points to a directory whose absolute | |
507 + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | |
508 + dnl default, namely "lib". | |
509 + acl_libdirstem=lib | |
510 + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
511 + if test -n "$searchpath"; then | |
512 + acl_save_IFS="${IFS= }"; IFS=":" | |
513 + for searchdir in $searchpath; do | |
514 + if test -d "$searchdir"; then | |
515 + case "$searchdir" in | |
516 + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | |
517 + *) searchdir=`cd "$searchdir" && pwd` | |
518 + case "$searchdir" in | |
519 + */lib64 ) acl_libdirstem=lib64 ;; | |
520 + esac ;; | |
521 + esac | |
522 + fi | |
523 + done | |
524 + IFS="$acl_save_IFS" | |
525 + fi | |
526 +]) | |
527 diff -urN b/SConstruct c/SConstruct | |
528 --- b/SConstruct 2010-02-15 10:42:41.522349056 +0100 | |
529 +++ c/SConstruct 2010-02-15 10:38:27.636218961 +0100 | |
530 @@ -459,15 +459,15 @@ | |
531 | |
532 | |
533 # Command line options | |
534 -opts = Options('options.cache') | |
535 +opts = Variables('options.cache') | |
536 | |
537 -opts.AddOptions( | |
538 +opts.AddVariables( | |
539 ( | |
540 'prefix', | |
541 'Installation prefix directory', | |
542 '/usr' | |
543 ), | |
544 - EnumOption( | |
545 + EnumVariable( | |
546 'debug', | |
547 'Debug version (useful for developers only)', | |
548 'no', | |
549 @@ -475,7 +475,7 @@ | |
550 map = { }, | |
551 ignorecase = 1 | |
552 ), | |
553 - EnumOption( | |
554 + EnumVariable( | |
555 'with_messaging', | |
556 'Messaging support (connection to mail store/transport servers)', | |
557 'yes', | |
558 @@ -483,7 +483,7 @@ | |
559 map = { }, | |
560 ignorecase = 1 | |
561 ), | |
562 - EnumOption( | |
563 + EnumVariable( | |
564 'with_filesystem', | |
565 'Enable file-system support (this is needed for "maildir" messaging support)', | |
566 'yes', | |
567 @@ -509,7 +509,7 @@ | |
568 + 'Currently available platform handlers: posix.', | |
569 '"posix"' | |
570 ), | |
571 - EnumOption( | |
572 + EnumVariable( | |
573 'with_sasl', | |
574 'Enable SASL support (requires GNU SASL library)', | |
575 'yes', | |
576 @@ -517,7 +517,7 @@ | |
577 map = { }, | |
578 ignorecase = 1 | |
579 ), | |
580 - EnumOption( | |
581 + EnumVariable( | |
582 'with_tls', | |
583 'Enable TLS support (requires GNU TLS library)', | |
584 'yes', | |
585 @@ -530,7 +530,7 @@ | |
586 'Specifies the path to sendmail.', | |
587 defaultSendmailPath | |
588 ), | |
589 - EnumOption( | |
590 + EnumVariable( | |
591 'byte_order', | |
592 'Byte order (Big Endian or Little Endian)', | |
593 sys.byteorder, | |
594 @@ -538,7 +538,7 @@ | |
595 map = { }, | |
596 ignorecase = 1 | |
597 ), | |
598 - EnumOption( | |
599 + EnumVariable( | |
600 'pf_8bit_type', | |
601 'The C-language 8-bit type for your platform', | |
602 'char', | |
603 @@ -546,7 +546,7 @@ | |
604 map = { }, | |
605 ignorecase = 1 | |
606 ), | |
607 - EnumOption( | |
608 + EnumVariable( | |
609 'pf_16bit_type', | |
610 'The C-language 16-bit type for your platform', | |
611 'short', | |
612 @@ -554,7 +554,7 @@ | |
613 map = { }, | |
614 ignorecase = 1 | |
615 ), | |
616 - EnumOption( | |
617 + EnumVariable( | |
618 'pf_32bit_type', | |
619 'The C-language 32-bit type for your platform', | |
620 'int', | |
621 @@ -562,7 +562,7 @@ | |
622 map = { }, | |
623 ignorecase = 1 | |
624 ), | |
625 - EnumOption( | |
626 + EnumVariable( | |
627 'build_tests', | |
628 'Build unit tests (run with "scons run-tests")', | |
629 'no', | |
630 @@ -1364,7 +1364,7 @@ | |
631 $CXX -c $CFLAGS $CPPFLAGS mytest.$ac_ext >&5 | |
632 sh libtool --mode=link $CXX -o mytest mytest.o libtest.la >&5 2>/dev/null | |
633 | |
634 -if test -x mytest; then | |
635 +if test -x mytest -a "$cross_compiling" != yes; then | |
636 myresult=`./mytest` | |
637 if test "X$myresult" = "XPASS"; then | |
638 AC_MSG_RESULT(yes) |