summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-03-23 18:14:33 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-03-23 18:14:33 +0100
commit1c2cf0868bcf72847a3150416f5b48e94ba512d4 (patch)
tree72b73241dae28796996d92e0052670ccb475ef09
parenteaf0b80d6b592df7684b1e37c456d58c8c5c41f2 (diff)
downloadmeta-openembedded-1c2cf0868bcf72847a3150416f5b48e94ba512d4.tar.gz
gnutls: import from meta-shr
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--meta-oe/recipes-support/gnutls/gnutls-2.10.4/gettextize-with-gettext-0.18.patch1012
-rw-r--r--meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-openssl.patch129
-rw-r--r--meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-replace-siginterrupt.patch41
-rw-r--r--meta-oe/recipes-support/gnutls/gnutls.inc30
-rw-r--r--meta-oe/recipes-support/gnutls/gnutls_2.10.4.bb25
5 files changed, 1237 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gettextize-with-gettext-0.18.patch b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gettextize-with-gettext-0.18.patch
new file mode 100644
index 000000000..74ea0e6fe
--- /dev/null
+++ b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gettextize-with-gettext-0.18.patch
@@ -0,0 +1,1012 @@
1Index: gnutls-2.8.6/lib/configure.ac
2===================================================================
3--- gnutls-2.8.6.orig/lib/configure.ac 2009-11-02 04:08:07.000000000 -0800
4+++ gnutls-2.8.6/lib/configure.ac 2010-05-19 22:15:18.491309044 -0700
5@@ -38,7 +38,7 @@ AC_PROG_LIBTOOL
6 LIBGNUTLS_HOOKS
7
8 AM_GNU_GETTEXT([external])
9-AM_GNU_GETTEXT_VERSION([0.17])
10+AM_GNU_GETTEXT_VERSION([0.18])
11
12 AC_C_BIGENDIAN
13
14Index: gnutls-2.8.6/lib/m4/gettext.m4
15===================================================================
16--- gnutls-2.8.6.orig/lib/m4/gettext.m4 2010-03-15 03:28:11.000000000 -0700
17+++ gnutls-2.8.6/lib/m4/gettext.m4 2010-05-19 22:15:18.491309044 -0700
18@@ -1,5 +1,5 @@
19-# gettext.m4 serial 60 (gettext-0.17)
20-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
21+# gettext.m4 serial 63 (gettext-0.18)
22+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
23 dnl This file is free software; the Free Software Foundation
24 dnl gives unlimited permission to copy and/or distribute it,
25 dnl with or without modifications, as long as this notice is preserved.
26@@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
27
28 dnl Authors:
29 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
30-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
31+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
32
33 dnl Macro to add for using GNU gettext.
34
35@@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
36 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
37 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
38 ])])])])])
39+ ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
40+ [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
41 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
42 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
43 ])])])])
44@@ -123,11 +125,11 @@ AC_DEFUN([AM_GNU_GETTEXT],
45 gt_use_preinstalled_gnugettext=no
46 ifelse(gt_included_intl, yes, [
47 AC_MSG_CHECKING([whether included gettext is requested])
48- AC_ARG_WITH(included-gettext,
49+ AC_ARG_WITH([included-gettext],
50 [ --with-included-gettext use the GNU gettext library included here],
51 nls_cv_force_use_gnu_gettext=$withval,
52 nls_cv_force_use_gnu_gettext=no)
53- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
54+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
55
56 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
57 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
58@@ -267,7 +269,7 @@ return * gettext ("")$gt_expression_test
59
60 if test "$gt_use_preinstalled_gnugettext" = "yes" \
61 || test "$nls_cv_use_gnu_gettext" = "yes"; then
62- AC_DEFINE(ENABLE_NLS, 1,
63+ AC_DEFINE([ENABLE_NLS], [1],
64 [Define to 1 if translation of program messages to the user's native language
65 is requested.])
66 else
67@@ -301,9 +303,9 @@ return * gettext ("")$gt_expression_test
68 fi
69
70 dnl For backward compatibility. Some packages may be using this.
71- AC_DEFINE(HAVE_GETTEXT, 1,
72+ AC_DEFINE([HAVE_GETTEXT], [1],
73 [Define if the GNU gettext() function is already present or preinstalled.])
74- AC_DEFINE(HAVE_DCGETTEXT, 1,
75+ AC_DEFINE([HAVE_DCGETTEXT], [1],
76 [Define if the GNU dcgettext() function is already present or preinstalled.])
77 fi
78
79@@ -319,9 +321,9 @@ return * gettext ("")$gt_expression_test
80 fi
81
82 dnl Make all variables we use known to autoconf.
83- AC_SUBST(BUILD_INCLUDED_LIBINTL)
84- AC_SUBST(USE_INCLUDED_LIBINTL)
85- AC_SUBST(CATOBJEXT)
86+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
87+ AC_SUBST([USE_INCLUDED_LIBINTL])
88+ AC_SUBST([CATOBJEXT])
89
90 dnl For backward compatibility. Some configure.ins may be using this.
91 nls_cv_header_intl=
92@@ -329,36 +331,36 @@ return * gettext ("")$gt_expression_test
93
94 dnl For backward compatibility. Some Makefiles may be using this.
95 DATADIRNAME=share
96- AC_SUBST(DATADIRNAME)
97+ AC_SUBST([DATADIRNAME])
98
99 dnl For backward compatibility. Some Makefiles may be using this.
100 INSTOBJEXT=.mo
101- AC_SUBST(INSTOBJEXT)
102+ AC_SUBST([INSTOBJEXT])
103
104 dnl For backward compatibility. Some Makefiles may be using this.
105 GENCAT=gencat
106- AC_SUBST(GENCAT)
107+ AC_SUBST([GENCAT])
108
109 dnl For backward compatibility. Some Makefiles may be using this.
110 INTLOBJS=
111 if test "$USE_INCLUDED_LIBINTL" = yes; then
112 INTLOBJS="\$(GETTOBJS)"
113 fi
114- AC_SUBST(INTLOBJS)
115+ AC_SUBST([INTLOBJS])
116
117 dnl Enable libtool support if the surrounding package wishes it.
118 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
119- AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
120+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
121 ])
122
123 dnl For backward compatibility. Some Makefiles may be using this.
124 INTLLIBS="$LIBINTL"
125- AC_SUBST(INTLLIBS)
126+ AC_SUBST([INTLLIBS])
127
128 dnl Make all documented variables known to autoconf.
129- AC_SUBST(LIBINTL)
130- AC_SUBST(LTLIBINTL)
131- AC_SUBST(POSUB)
132+ AC_SUBST([LIBINTL])
133+ AC_SUBST([LTLIBINTL])
134+ AC_SUBST([POSUB])
135 ])
136
137
138Index: gnutls-2.8.6/lib/m4/iconv.m4
139===================================================================
140--- gnutls-2.8.6.orig/lib/m4/iconv.m4 2010-03-15 03:28:11.000000000 -0700
141+++ gnutls-2.8.6/lib/m4/iconv.m4 2010-05-19 22:15:18.491309044 -0700
142@@ -1,5 +1,5 @@
143-# iconv.m4 serial AM6 (gettext-0.17)
144-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
145+# iconv.m4 serial 9 (gettext-0.18)
146+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
147 dnl This file is free software; the Free Software Foundation
148 dnl gives unlimited permission to copy and/or distribute it,
149 dnl with or without modifications, as long as this notice is preserved.
150@@ -34,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
151 am_save_CPPFLAGS="$CPPFLAGS"
152 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
153
154- AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
155+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
156 am_cv_func_iconv="no, consider installing GNU libiconv"
157 am_cv_lib_iconv=no
158 AC_TRY_LINK([#include <stdlib.h>
159@@ -42,7 +42,7 @@ AC_DEFUN([AM_ICONV_LINK],
160 [iconv_t cd = iconv_open("","");
161 iconv(cd,NULL,NULL,NULL,NULL);
162 iconv_close(cd);],
163- am_cv_func_iconv=yes)
164+ [am_cv_func_iconv=yes])
165 if test "$am_cv_func_iconv" != yes; then
166 am_save_LIBS="$LIBS"
167 LIBS="$LIBS $LIBICONV"
168@@ -51,14 +51,14 @@ AC_DEFUN([AM_ICONV_LINK],
169 [iconv_t cd = iconv_open("","");
170 iconv(cd,NULL,NULL,NULL,NULL);
171 iconv_close(cd);],
172- am_cv_lib_iconv=yes
173- am_cv_func_iconv=yes)
174+ [am_cv_lib_iconv=yes]
175+ [am_cv_func_iconv=yes])
176 LIBS="$am_save_LIBS"
177 fi
178 ])
179 if test "$am_cv_func_iconv" = yes; then
180- AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
181- dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
182+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
183+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
184 am_save_LIBS="$LIBS"
185 if test $am_cv_lib_iconv = yes; then
186 LIBS="$LIBS $LIBICONV"
187@@ -87,6 +87,25 @@ int main ()
188 return 1;
189 }
190 }
191+ /* Test against Solaris 10 bug: Failures are not distinguishable from
192+ successful returns. */
193+ {
194+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
195+ if (cd_ascii_to_88591 != (iconv_t)(-1))
196+ {
197+ static const char input[] = "\263";
198+ char buf[10];
199+ const char *inptr = input;
200+ size_t inbytesleft = strlen (input);
201+ char *outptr = buf;
202+ size_t outbytesleft = sizeof (buf);
203+ size_t res = iconv (cd_ascii_to_88591,
204+ (char **) &inptr, &inbytesleft,
205+ &outptr, &outbytesleft);
206+ if (res == 0)
207+ return 1;
208+ }
209+ }
210 #if 0 /* This bug could be worked around by the caller. */
211 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
212 {
213@@ -134,7 +153,7 @@ int main ()
214 am_func_iconv=no am_cv_lib_iconv=no
215 fi
216 if test "$am_func_iconv" = yes; then
217- AC_DEFINE(HAVE_ICONV, 1,
218+ AC_DEFINE([HAVE_ICONV], [1],
219 [Define if you have the iconv() function and it works.])
220 fi
221 if test "$am_cv_lib_iconv" = yes; then
222@@ -147,8 +166,8 @@ int main ()
223 LIBICONV=
224 LTLIBICONV=
225 fi
226- AC_SUBST(LIBICONV)
227- AC_SUBST(LTLIBICONV)
228+ AC_SUBST([LIBICONV])
229+ AC_SUBST([LTLIBICONV])
230 ])
231
232 AC_DEFUN([AM_ICONV],
233@@ -156,7 +175,7 @@ AC_DEFUN([AM_ICONV],
234 AM_ICONV_LINK
235 if test "$am_cv_func_iconv" = yes; then
236 AC_MSG_CHECKING([for iconv declaration])
237- AC_CACHE_VAL(am_cv_proto_iconv, [
238+ AC_CACHE_VAL([am_cv_proto_iconv], [
239 AC_TRY_COMPILE([
240 #include <stdlib.h>
241 #include <iconv.h>
242@@ -169,12 +188,12 @@ size_t iconv (iconv_t cd, char * *inbuf,
243 #else
244 size_t iconv();
245 #endif
246-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
247+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
248 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
249 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
250- AC_MSG_RESULT([$]{ac_t:-
251- }[$]am_cv_proto_iconv)
252- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
253+ AC_MSG_RESULT([
254+ $am_cv_proto_iconv])
255+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
256 [Define as const if the declaration of iconv() needs const.])
257 fi
258 ])
259Index: gnutls-2.8.6/lib/m4/lib-ld.m4
260===================================================================
261--- gnutls-2.8.6.orig/lib/m4/lib-ld.m4 2010-03-15 03:28:11.000000000 -0700
262+++ gnutls-2.8.6/lib/m4/lib-ld.m4 2010-05-19 22:15:18.511309002 -0700
263@@ -1,5 +1,5 @@
264-# lib-ld.m4 serial 3 (gettext-0.13)
265-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
266+# lib-ld.m4 serial 4 (gettext-0.18)
267+dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
268 dnl This file is free software; the Free Software Foundation
269 dnl gives unlimited permission to copy and/or distribute it,
270 dnl with or without modifications, as long as this notice is preserved.
271@@ -10,7 +10,7 @@ dnl with libtool.m4.
272
273 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
274 AC_DEFUN([AC_LIB_PROG_LD_GNU],
275-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
276+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
277 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
278 case `$LD -v 2>&1 </dev/null` in
279 *GNU* | *'with BFD'*)
280@@ -23,7 +23,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
281
282 dnl From libtool-1.4. Sets the variable LD.
283 AC_DEFUN([AC_LIB_PROG_LD],
284-[AC_ARG_WITH(gnu-ld,
285+[AC_ARG_WITH([gnu-ld],
286 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
287 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
288 AC_REQUIRE([AC_PROG_CC])dnl
289@@ -59,7 +59,7 @@ if test "$GCC" = yes; then
290 # Canonicalize the path of ld
291 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
292 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
293- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
294+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
295 done
296 test -z "$LD" && LD="$ac_prog"
297 ;;
298@@ -77,7 +77,7 @@ elif test "$with_gnu_ld" = yes; then
299 else
300 AC_MSG_CHECKING([for non-GNU ld])
301 fi
302-AC_CACHE_VAL(acl_cv_path_LD,
303+AC_CACHE_VAL([acl_cv_path_LD],
304 [if test -z "$LD"; then
305 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
306 for ac_dir in $PATH; do
307@@ -89,9 +89,9 @@ AC_CACHE_VAL(acl_cv_path_LD,
308 # Break only if it was the GNU/non-GNU ld that we prefer.
309 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
310 *GNU* | *'with BFD'*)
311- test "$with_gnu_ld" != no && break ;;
312+ test "$with_gnu_ld" != no && break ;;
313 *)
314- test "$with_gnu_ld" != yes && break ;;
315+ test "$with_gnu_ld" != yes && break ;;
316 esac
317 fi
318 done
319@@ -101,9 +101,9 @@ else
320 fi])
321 LD="$acl_cv_path_LD"
322 if test -n "$LD"; then
323- AC_MSG_RESULT($LD)
324+ AC_MSG_RESULT([$LD])
325 else
326- AC_MSG_RESULT(no)
327+ AC_MSG_RESULT([no])
328 fi
329 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
330 AC_LIB_PROG_LD_GNU
331Index: gnutls-2.8.6/lib/m4/lib-link.m4
332===================================================================
333--- gnutls-2.8.6.orig/lib/m4/lib-link.m4 2010-03-15 03:28:11.000000000 -0700
334+++ gnutls-2.8.6/lib/m4/lib-link.m4 2010-05-19 22:15:18.521282615 -0700
335@@ -1,12 +1,12 @@
336-# lib-link.m4 serial 13 (gettext-0.17)
337-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
338+# lib-link.m4 serial 21 (gettext-0.18)
339+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
340 dnl This file is free software; the Free Software Foundation
341 dnl gives unlimited permission to copy and/or distribute it,
342 dnl with or without modifications, as long as this notice is preserved.
343
344 dnl From Bruno Haible.
345
346-AC_PREREQ(2.54)
347+AC_PREREQ([2.54])
348
349 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
350 dnl the libraries corresponding to explicit and implicit dependencies.
351@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
352 [
353 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
354 AC_REQUIRE([AC_LIB_RPATH])
355- define([Name],[translit([$1],[./-], [___])])
356- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
357- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
358+ pushdef([Name],[translit([$1],[./-], [___])])
359+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
360+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
361 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
362 AC_LIB_LINKFLAGS_BODY([$1], [$2])
363 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
364@@ -39,16 +39,17 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
365 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
366 dnl results of this search when this library appears as a dependency.
367 HAVE_LIB[]NAME=yes
368- undefine([Name])
369- undefine([NAME])
370+ popdef([NAME])
371+ popdef([Name])
372 ])
373
374-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
375+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
376 dnl searches for libname and the libraries corresponding to explicit and
377 dnl implicit dependencies, together with the specified include files and
378-dnl the ability to compile and link the specified testcode. If found, it
379-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
380-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
381+dnl the ability to compile and link the specified testcode. The missing-message
382+dnl defaults to 'no' and may contain additional hints for the user.
383+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
384+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
385 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
386 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
387 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
388@@ -57,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
389 [
390 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
391 AC_REQUIRE([AC_LIB_RPATH])
392- define([Name],[translit([$1],[./-], [___])])
393- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
394- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
395+ pushdef([Name],[translit([$1],[./-], [___])])
396+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
397+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
398
399 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
400 dnl accordingly.
401@@ -73,13 +74,25 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
402
403 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
404 ac_save_LIBS="$LIBS"
405- LIBS="$LIBS $LIB[]NAME"
406- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
407+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
408+ dnl because these -l options might require -L options that are present in
409+ dnl LIBS. -l options benefit only from the -L options listed before it.
410+ dnl Otherwise, add it to the front of LIBS, because it may be a static
411+ dnl library that depends on another static library that is present in LIBS.
412+ dnl Static libraries benefit only from the static libraries listed after
413+ dnl it.
414+ case " $LIB[]NAME" in
415+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
416+ *) LIBS="$LIB[]NAME $LIBS" ;;
417+ esac
418+ AC_TRY_LINK([$3], [$4],
419+ [ac_cv_lib[]Name=yes],
420+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
421 LIBS="$ac_save_LIBS"
422 ])
423 if test "$ac_cv_lib[]Name" = yes; then
424 HAVE_LIB[]NAME=yes
425- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
426+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
427 AC_MSG_CHECKING([how to link with lib[]$1])
428 AC_MSG_RESULT([$LIB[]NAME])
429 else
430@@ -95,8 +108,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
431 AC_SUBST([LIB]NAME)
432 AC_SUBST([LTLIB]NAME)
433 AC_SUBST([LIB]NAME[_PREFIX])
434- undefine([Name])
435- undefine([NAME])
436+ popdef([NAME])
437+ popdef([Name])
438 ])
439
440 dnl Determine the platform dependent parameters needed to use rpath:
441@@ -114,7 +127,7 @@ AC_DEFUN([AC_LIB_RPATH],
442 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
443 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
444 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
445- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
446+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
447 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
448 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
449 . ./conftest.sh
450@@ -131,11 +144,32 @@ AC_DEFUN([AC_LIB_RPATH],
451 acl_hardcode_direct="$acl_cv_hardcode_direct"
452 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
453 dnl Determine whether the user wants rpath handling at all.
454- AC_ARG_ENABLE(rpath,
455+ AC_ARG_ENABLE([rpath],
456 [ --disable-rpath do not hardcode runtime library paths],
457 :, enable_rpath=yes)
458 ])
459
460+dnl AC_LIB_FROMPACKAGE(name, package)
461+dnl declares that libname comes from the given package. The configure file
462+dnl will then not have a --with-libname-prefix option but a
463+dnl --with-package-prefix option. Several libraries can come from the same
464+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
465+dnl macro call that searches for libname.
466+AC_DEFUN([AC_LIB_FROMPACKAGE],
467+[
468+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
469+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
470+ define([acl_frompackage_]NAME, [$2])
471+ popdef([NAME])
472+ pushdef([PACK],[$2])
473+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
474+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
475+ define([acl_libsinpackage_]PACKUP,
476+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
477+ popdef([PACKUP])
478+ popdef([PACK])
479+])
480+
481 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
482 dnl the libraries corresponding to explicit and implicit dependencies.
483 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
484@@ -144,19 +178,23 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirs
485 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
486 [
487 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
488- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
489- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
490+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
491+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
492+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
493+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
494+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
495+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
496 dnl Autoconf >= 2.61 supports dots in --with options.
497- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
498+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
499 dnl By default, look in $includedir and $libdir.
500 use_additional=yes
501 AC_LIB_WITH_FINAL_PREFIX([
502 eval additional_includedir=\"$includedir\"
503 eval additional_libdir=\"$libdir\"
504 ])
505- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
506-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
507- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
508+ AC_ARG_WITH(P_A_C_K[-prefix],
509+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
510+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
511 [
512 if test "X$withval" = "Xno"; then
513 use_additional=no
514@@ -169,6 +207,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
515 else
516 additional_includedir="$withval/include"
517 additional_libdir="$withval/$acl_libdirstem"
518+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
519+ && ! test -d "$withval/$acl_libdirstem"; then
520+ additional_libdir="$withval/$acl_libdirstem2"
521+ fi
522 fi
523 fi
524 ])
525@@ -178,6 +220,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
526 LTLIB[]NAME=
527 INC[]NAME=
528 LIB[]NAME[]_PREFIX=
529+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
530+ dnl computed. So it has to be reset here.
531+ HAVE_LIB[]NAME=
532 rpathdirs=
533 ltrpathdirs=
534 names_already_handled=
535@@ -267,6 +312,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
536 fi
537 fi
538 fi
539+ dnl Just let the compiler find the library, the compiler and user are smarter then this script
540+ dnl when cross compiling and working with a relocated install.
541+ found_dir=""
542 if test "X$found_dir" = "X"; then
543 for x in $LDFLAGS $LTLIB[]NAME; do
544 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
545@@ -327,7 +375,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
546 dnl Linking with a shared library. We attempt to hardcode its
547 dnl directory into the executable's runpath, unless it's the
548 dnl standard /usr/lib.
549- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
550+ if test "$enable_rpath" = no \
551+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
552+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
553 dnl No hardcoding is needed.
554 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
555 else
556@@ -415,7 +465,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
557 case "$found_dir" in
558 */$acl_libdirstem | */$acl_libdirstem/)
559 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
560- LIB[]NAME[]_PREFIX="$basedir"
561+ if test "$name" = '$1'; then
562+ LIB[]NAME[]_PREFIX="$basedir"
563+ fi
564+ additional_includedir="$basedir/include"
565+ ;;
566+ */$acl_libdirstem2 | */$acl_libdirstem2/)
567+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
568+ if test "$name" = '$1'; then
569+ LIB[]NAME[]_PREFIX="$basedir"
570+ fi
571 additional_includedir="$basedir/include"
572 ;;
573 esac
574@@ -476,9 +535,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
575 dnl 3. if it's already present in $LDFLAGS or the already
576 dnl constructed $LIBNAME,
577 dnl 4. if it doesn't exist as a directory.
578- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
579+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
580+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
581 haveit=
582- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
583+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
584+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
585 if test -n "$GCC"; then
586 case $host_os in
587 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
588@@ -609,6 +670,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
589 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
590 done
591 fi
592+ popdef([P_A_C_K])
593+ popdef([PACKLIBS])
594+ popdef([PACKUP])
595+ popdef([PACK])
596+ popdef([NAME])
597 ])
598
599 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
600@@ -654,7 +720,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
601 if test -n "$next"; then
602 dir="$next"
603 dnl No need to hardcode the standard /usr/lib.
604- if test "X$dir" != "X/usr/$acl_libdirstem"; then
605+ if test "X$dir" != "X/usr/$acl_libdirstem" \
606+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
607 rpathdirs="$rpathdirs $dir"
608 fi
609 next=
610@@ -663,7 +730,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
611 -L) next=yes ;;
612 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
613 dnl No need to hardcode the standard /usr/lib.
614- if test "X$dir" != "X/usr/$acl_libdirstem"; then
615+ if test "X$dir" != "X/usr/$acl_libdirstem" \
616+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
617 rpathdirs="$rpathdirs $dir"
618 fi
619 next= ;;
620Index: gnutls-2.8.6/lib/m4/lib-prefix.m4
621===================================================================
622--- gnutls-2.8.6.orig/lib/m4/lib-prefix.m4 2010-03-15 03:28:11.000000000 -0700
623+++ gnutls-2.8.6/lib/m4/lib-prefix.m4 2010-05-19 22:15:18.521282615 -0700
624@@ -1,5 +1,5 @@
625-# lib-prefix.m4 serial 5 (gettext-0.15)
626-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
627+# lib-prefix.m4 serial 7 (gettext-0.18)
628+dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
629 dnl This file is free software; the Free Software Foundation
630 dnl gives unlimited permission to copy and/or distribute it,
631 dnl with or without modifications, as long as this notice is preserved.
632@@ -153,33 +153,72 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
633 prefix="$acl_save_prefix"
634 ])
635
636-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
637-dnl the basename of the libdir, either "lib" or "lib64".
638+dnl AC_LIB_PREPARE_MULTILIB creates
639+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
640+dnl "lib" or "lib64" or "lib/64",
641+dnl - a variable acl_libdirstem2, as a secondary possible value for
642+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
643+dnl "lib/amd64".
644 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
645 [
646- dnl There is no formal standard regarding lib and lib64. The current
647- dnl practice is that on a system supporting 32-bit and 64-bit instruction
648- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
649- dnl libraries go under $prefix/lib. We determine the compiler's default
650- dnl mode by looking at the compiler's library search path. If at least
651- dnl of its elements ends in /lib64 or points to a directory whose absolute
652- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
653- dnl default, namely "lib".
654+ dnl There is no formal standard regarding lib and lib64.
655+ dnl On glibc systems, the current practice is that on a system supporting
656+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
657+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
658+ dnl the compiler's default mode by looking at the compiler's library search
659+ dnl path. If at least one of its elements ends in /lib64 or points to a
660+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
661+ dnl Otherwise we use the default, namely "lib".
662+ dnl On Solaris systems, the current practice is that on a system supporting
663+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
664+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
665+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
666+ AC_REQUIRE([AC_CANONICAL_HOST])
667 acl_libdirstem=lib
668- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
669- if test -n "$searchpath"; then
670- acl_save_IFS="${IFS= }"; IFS=":"
671- for searchdir in $searchpath; do
672- if test -d "$searchdir"; then
673- case "$searchdir" in
674- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
675- *) searchdir=`cd "$searchdir" && pwd`
676- case "$searchdir" in
677- */lib64 ) acl_libdirstem=lib64 ;;
678- esac ;;
679+ acl_libdirstem2=
680+ case "$host_os" in
681+ solaris*)
682+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
683+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
684+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
685+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
686+ dnl symlink is missing, so we set acl_libdirstem2 too.
687+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
688+ [AC_EGREP_CPP([sixtyfour bits], [
689+#ifdef _LP64
690+sixtyfour bits
691+#endif
692+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
693+ ])
694+ if test $gl_cv_solaris_64bit = yes; then
695+ acl_libdirstem=lib/64
696+ case "$host_cpu" in
697+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
698+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
699 esac
700 fi
701- done
702- IFS="$acl_save_IFS"
703- fi
704+ ;;
705+ *)
706+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
707+ if test -n "$searchpath"; then
708+ acl_save_IFS="${IFS= }"; IFS=":"
709+ for searchdir in $searchpath; do
710+ if test -d "$searchdir"; then
711+ case "$searchdir" in
712+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
713+ */../ | */.. )
714+ # Better ignore directories of this form. They are misleading.
715+ ;;
716+ *) searchdir=`cd "$searchdir" && pwd`
717+ case "$searchdir" in
718+ */lib64 ) acl_libdirstem=lib64 ;;
719+ esac ;;
720+ esac
721+ fi
722+ done
723+ IFS="$acl_save_IFS"
724+ fi
725+ ;;
726+ esac
727+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
728 ])
729Index: gnutls-2.8.6/lib/m4/nls.m4
730===================================================================
731--- gnutls-2.8.6.orig/lib/m4/nls.m4 2010-03-15 03:28:11.000000000 -0700
732+++ gnutls-2.8.6/lib/m4/nls.m4 2010-05-19 22:15:18.521282615 -0700
733@@ -1,5 +1,6 @@
734-# nls.m4 serial 3 (gettext-0.15)
735-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
736+# nls.m4 serial 5 (gettext-0.18)
737+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
738+dnl Inc.
739 dnl This file is free software; the Free Software Foundation
740 dnl gives unlimited permission to copy and/or distribute it,
741 dnl with or without modifications, as long as this notice is preserved.
742@@ -17,15 +18,15 @@ dnl Authors:
743 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
744 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
745
746-AC_PREREQ(2.50)
747+AC_PREREQ([2.50])
748
749 AC_DEFUN([AM_NLS],
750 [
751 AC_MSG_CHECKING([whether NLS is requested])
752 dnl Default is enabled NLS
753- AC_ARG_ENABLE(nls,
754+ AC_ARG_ENABLE([nls],
755 [ --disable-nls do not use Native Language Support],
756 USE_NLS=$enableval, USE_NLS=yes)
757- AC_MSG_RESULT($USE_NLS)
758- AC_SUBST(USE_NLS)
759+ AC_MSG_RESULT([$USE_NLS])
760+ AC_SUBST([USE_NLS])
761 ])
762Index: gnutls-2.8.6/lib/m4/po.m4
763===================================================================
764--- gnutls-2.8.6.orig/lib/m4/po.m4 2010-03-15 03:28:11.000000000 -0700
765+++ gnutls-2.8.6/lib/m4/po.m4 2010-05-19 22:15:18.521282615 -0700
766@@ -1,5 +1,5 @@
767-# po.m4 serial 15 (gettext-0.17)
768-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
769+# po.m4 serial 17 (gettext-0.18)
770+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
771 dnl This file is free software; the Free Software Foundation
772 dnl gives unlimited permission to copy and/or distribute it,
773 dnl with or without modifications, as long as this notice is preserved.
774@@ -17,7 +17,7 @@ dnl Authors:
775 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
776 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
777
778-AC_PREREQ(2.50)
779+AC_PREREQ([2.50])
780
781 dnl Checks for all prerequisites of the po subdirectory.
782 AC_DEFUN([AM_PO_SUBDIRS],
783@@ -29,7 +29,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
784
785 dnl Release version of the gettext macros. This is used to ensure that
786 dnl the gettext macros and po/Makefile.in.in are in sync.
787- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
788+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
789
790 dnl Perform the following tests also if --disable-nls has been given,
791 dnl because they are needed for "make dist" to work.
792@@ -41,7 +41,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
793 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
794 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
795 :)
796- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
797+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
798
799 dnl Test whether it is GNU msgfmt >= 0.15.
800 changequote(,)dnl
801Index: gnutls-2.8.6/lib/m4/progtest.m4
802===================================================================
803--- gnutls-2.8.6.orig/lib/m4/progtest.m4 2010-03-15 03:28:11.000000000 -0700
804+++ gnutls-2.8.6/lib/m4/progtest.m4 2010-05-19 22:15:18.521282615 -0700
805@@ -1,5 +1,5 @@
806-# progtest.m4 serial 4 (gettext-0.14.2)
807-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
808+# progtest.m4 serial 6 (gettext-0.18)
809+dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
810 dnl This file is free software; the Free Software Foundation
811 dnl gives unlimited permission to copy and/or distribute it,
812 dnl with or without modifications, as long as this notice is preserved.
813@@ -16,7 +16,7 @@ dnl They are *not* in the public domain.
814 dnl Authors:
815 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
816
817-AC_PREREQ(2.50)
818+AC_PREREQ([2.50])
819
820 # Search path for a program which passes the given test.
821
822@@ -55,7 +55,7 @@ rm -f conf$$.file
823 # Extract the first word of "$2", so it can be a program name with args.
824 set dummy $2; ac_word=[$]2
825 AC_MSG_CHECKING([for $ac_word])
826-AC_CACHE_VAL(ac_cv_path_$1,
827+AC_CACHE_VAL([ac_cv_path_$1],
828 [case "[$]$1" in
829 [[\\/]]* | ?:[[\\/]]*)
830 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
831@@ -84,9 +84,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_pa
832 esac])dnl
833 $1="$ac_cv_path_$1"
834 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
835- AC_MSG_RESULT([$]$1)
836+ AC_MSG_RESULT([$][$1])
837 else
838- AC_MSG_RESULT(no)
839+ AC_MSG_RESULT([no])
840 fi
841-AC_SUBST($1)dnl
842+AC_SUBST([$1])dnl
843 ])
844Index: gnutls-2.8.6/lib/po/ChangeLog
845===================================================================
846--- /dev/null 1970-01-01 00:00:00.000000000 +0000
847+++ gnutls-2.8.6/lib/po/ChangeLog 2010-05-19 22:15:18.521282615 -0700
848@@ -0,0 +1,5 @@
849+2010-05-19 gettextize <bug-gnu-gettext@gnu.org>
850+
851+ * Makefile.in.in: Upgrade to gettext-0.18.
852+ * Rules-quot: Upgrade to gettext-0.18.
853+
854Index: gnutls-2.8.6/lib/po/Makefile.in.in
855===================================================================
856--- gnutls-2.8.6.orig/lib/po/Makefile.in.in 2010-03-15 03:28:11.000000000 -0700
857+++ gnutls-2.8.6/lib/po/Makefile.in.in 2010-05-19 22:15:18.531283048 -0700
858@@ -1,5 +1,5 @@
859 # Makefile for PO directory in any package using GNU gettext.
860-# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
861+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
862 #
863 # This file can be copied and used freely without restrictions. It can
864 # be used in projects which are not available under the GNU General Public
865@@ -8,8 +8,8 @@
866 # Please note that the actual code of GNU gettext is covered by the GNU
867 # General Public License and is *not* in the public domain.
868 #
869-# Origin: gettext-0.17
870-GETTEXT_MACRO_VERSION = 0.17
871+# Origin: gettext-0.18
872+GETTEXT_MACRO_VERSION = 0.18
873
874 PACKAGE = @PACKAGE@
875 VERSION = @VERSION@
876@@ -88,8 +88,8 @@ CATALOGS = @CATALOGS@
877 .po.gmo:
878 @lang=`echo $* | sed -e 's,.*/,,'`; \
879 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
880- echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
881- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
882+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
883+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
884
885 .sin.sed:
886 sed -e '/^#/d' $< > t-$@
887@@ -193,8 +193,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot
888 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
889 if test -f "$(srcdir)/$${lang}.po"; then \
890 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
891- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
892- cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
893+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
894+ cd $(srcdir) \
895+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
896+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
897+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
898+ *) \
899+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
900+ esac; \
901+ }; \
902 else \
903 $(MAKE) $${lang}.po-create; \
904 fi
905@@ -217,7 +224,6 @@ install-data: install-data-@USE_NLS@
906 fi
907 install-data-no: all
908 install-data-yes: all
909- $(mkdir_p) $(DESTDIR)$(datadir)
910 @catalogs='$(CATALOGS)'; \
911 for cat in $$catalogs; do \
912 cat=`basename $$cat`; \
913@@ -269,7 +275,6 @@ installdirs-data: installdirs-data-@USE_
914 fi
915 installdirs-data-no:
916 installdirs-data-yes:
917- $(mkdir_p) $(DESTDIR)$(datadir)
918 @catalogs='$(CATALOGS)'; \
919 for cat in $$catalogs; do \
920 cat=`basename $$cat`; \
921@@ -395,9 +400,15 @@ update-po: Makefile
922 tmpdir=`pwd`; \
923 echo "$$lang:"; \
924 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
925- echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
926+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
927 cd $(srcdir); \
928- if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
929+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
930+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
931+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
932+ *) \
933+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
934+ esac; \
935+ }; then \
936 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
937 rm -f $$tmpdir/$$lang.new.po; \
938 else \
939@@ -418,9 +429,13 @@ $(DUMMYPOFILES):
940 update-gmo: Makefile $(GMOFILES)
941 @:
942
943+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
944+# because execution permission bits may not work on the current file system.
945+# Use @SHELL@, which is the shell determined by autoconf for the use by its
946+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
947 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
948 cd $(top_builddir) \
949- && $(SHELL) ./config.status $(subdir)/$@.in po-directories
950+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
951
952 force:
953
954Index: gnutls-2.8.6/lib/po/Makevars.template
955===================================================================
956--- /dev/null 1970-01-01 00:00:00.000000000 +0000
957+++ gnutls-2.8.6/lib/po/Makevars.template 2010-05-19 22:15:18.531283048 -0700
958@@ -0,0 +1,41 @@
959+# Makefile variables for PO directory in any package using GNU gettext.
960+
961+# Usually the message domain is the same as the package name.
962+DOMAIN = $(PACKAGE)
963+
964+# These two variables depend on the location of this directory.
965+subdir = po
966+top_builddir = ..
967+
968+# These options get passed to xgettext.
969+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
970+
971+# This is the copyright holder that gets inserted into the header of the
972+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
973+# package. (Note that the msgstr strings, extracted from the package's
974+# sources, belong to the copyright holder of the package.) Translators are
975+# expected to transfer the copyright for their translations to this person
976+# or entity, or to disclaim their copyright. The empty string stands for
977+# the public domain; in this case the translators are expected to disclaim
978+# their copyright.
979+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
980+
981+# This is the email address or URL to which the translators shall report
982+# bugs in the untranslated strings:
983+# - Strings which are not entire sentences, see the maintainer guidelines
984+# in the GNU gettext documentation, section 'Preparing Strings'.
985+# - Strings which use unclear terms or require additional context to be
986+# understood.
987+# - Strings which make invalid assumptions about notation of date, time or
988+# money.
989+# - Pluralisation problems.
990+# - Incorrect English spelling.
991+# - Incorrect formatting.
992+# It can be your email address, or a mailing list address where translators
993+# can write to without being subscribed, or the URL of a web page through
994+# which the translators can contact you.
995+MSGID_BUGS_ADDRESS =
996+
997+# This is the list of locale categories, beyond LC_MESSAGES, for which the
998+# message catalogs shall be used. It is usually empty.
999+EXTRA_LOCALE_CATEGORIES =
1000Index: gnutls-2.8.6/lib/po/Rules-quot
1001===================================================================
1002--- gnutls-2.8.6.orig/lib/po/Rules-quot 2010-03-15 03:28:11.000000000 -0700
1003+++ gnutls-2.8.6/lib/po/Rules-quot 2010-05-19 22:15:18.531283048 -0700
1004@@ -20,7 +20,7 @@ en@boldquot.po-update: en@boldquot.po-up
1005 ll=`echo $$lang | sed -e 's/@.*//'`; \
1006 LC_ALL=C; export LC_ALL; \
1007 cd $(srcdir); \
1008- if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
1009+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
1010 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
1011 rm -f $$tmpdir/$$lang.new.po; \
1012 else \
diff --git a/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-openssl.patch b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-openssl.patch
new file mode 100644
index 000000000..033e4d148
--- /dev/null
+++ b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-openssl.patch
@@ -0,0 +1,129 @@
1---
2 libextra/gnutls_openssl.c | 58 +++++++++++++++++++++++++++++++++++++
3 libextra/includes/gnutls/openssl.h | 5 +++
4 2 files changed, 63 insertions(+)
5
6Index: gnutls-2.8.6/libextra/gnutls_openssl.c
7===================================================================
8--- gnutls-2.8.6.orig/libextra/gnutls_openssl.c 2009-11-06 00:39:42.000000000 -0800
9+++ gnutls-2.8.6/libextra/gnutls_openssl.c 2010-05-19 22:20:34.071283592 -0700
10@@ -258,12 +258,17 @@ SSL_new (SSL_CTX * ctx)
11 ssl->rfd = (gnutls_transport_ptr_t) - 1;
12 ssl->wfd = (gnutls_transport_ptr_t) - 1;
13
14+ ssl->ssl_peek_buffer = NULL;
15+ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0;
16+
17 return ssl;
18 }
19
20 void
21 SSL_free (SSL * ssl)
22 {
23+ if (ssl->ssl_peek_buffer)
24+ free(ssl->ssl_peek_buffer);
25 gnutls_certificate_free_credentials (ssl->gnutls_cred);
26 gnutls_deinit (ssl->gnutls_state);
27 free (ssl);
28@@ -287,6 +292,7 @@ int
29 SSL_set_fd (SSL * ssl, int fd)
30 {
31 gnutls_transport_set_ptr (ssl->gnutls_state, GNUTLS_INT_TO_POINTER (fd));
32+ ssl->rfd = ssl->wfd = fd;
33 return 1;
34 }
35
36@@ -312,6 +318,17 @@ SSL_set_wfd (SSL * ssl, int fd)
37 return 1;
38 }
39
40+int SSL_get_rfd(SSL *ssl)
41+{
42+ return ssl->rfd;
43+}
44+
45+int SSL_get_wfd(SSL *ssl)
46+{
47+ return ssl->wfd;
48+}
49+
50+
51 void
52 SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio)
53 {
54@@ -327,6 +344,8 @@ SSL_set_connect_state (SSL * ssl)
55 int
56 SSL_pending (SSL * ssl)
57 {
58+ if (ssl->ssl_peek_avail)
59+ return ssl->ssl_peek_avail;
60 return gnutls_record_check_pending (ssl->gnutls_state);
61 }
62
63@@ -482,11 +501,50 @@ SSL_shutdown (SSL * ssl)
64 return 1;
65 }
66
67+int SSL_peek(SSL *ssl, void *buf, int len)
68+{
69+ if (len > ssl->ssl_peek_buffer_size) {
70+ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len);
71+ ssl->ssl_peek_buffer_size = len;
72+ }
73+
74+ if (ssl->ssl_peek_avail == 0) {
75+
76+ int ret;
77+
78+ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len);
79+ ssl->last_error = ret;
80+
81+ if (ret > 0)
82+ ssl->ssl_peek_avail += ret;
83+ }
84+
85+ if (len > ssl->ssl_peek_avail)
86+ len = ssl->ssl_peek_avail;
87+
88+ memcpy (buf, ssl->ssl_peek_buffer, len);
89+
90+ return len;
91+}
92+
93 int
94 SSL_read (SSL * ssl, void *buf, int len)
95 {
96 int ret;
97
98+ if (ssl->ssl_peek_avail) {
99+ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail;
100+
101+ memcpy (buf, ssl->ssl_peek_buffer, n);
102+
103+ if (ssl->ssl_peek_avail > n)
104+ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n);
105+
106+ ssl->ssl_peek_avail -= n;
107+
108+ return n;
109+ }
110+
111 ret = gnutls_record_recv (ssl->gnutls_state, buf, len);
112 ssl->last_error = ret;
113
114Index: gnutls-2.8.6/libextra/includes/gnutls/openssl.h
115===================================================================
116--- gnutls-2.8.6.orig/libextra/includes/gnutls/openssl.h 2009-06-02 11:59:32.000000000 -0700
117+++ gnutls-2.8.6/libextra/includes/gnutls/openssl.h 2010-05-19 22:20:34.071283592 -0700
118@@ -164,6 +164,11 @@ extern "C"
119
120 gnutls_transport_ptr_t rfd;
121 gnutls_transport_ptr_t wfd;
122+
123+ char *ssl_peek_buffer;
124+ size_t ssl_peek_buffer_size;
125+ size_t ssl_peek_avail;
126+
127 };
128
129 #define rbio gnutls_state
diff --git a/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-replace-siginterrupt.patch b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-replace-siginterrupt.patch
new file mode 100644
index 000000000..a0fb64fab
--- /dev/null
+++ b/meta-oe/recipes-support/gnutls/gnutls-2.10.4/gnutls-replace-siginterrupt.patch
@@ -0,0 +1,41 @@
1---
2 src/tests.c | 12 ++++++++++--
3 1 file changed, 10 insertions(+), 2 deletions(-)
4
5Index: gnutls-2.8.6/src/tests.c
6===================================================================
7--- gnutls-2.8.6.orig/src/tests.c 2009-06-02 11:59:32.000000000 -0700
8+++ gnutls-2.8.6/src/tests.c 2010-05-19 22:20:51.703780601 -0700
9@@ -493,6 +493,7 @@ test_bye (gnutls_session_t session)
10 int old, secs = 6;
11
12 #ifndef _WIN32
13+ struct sigaction act;
14 signal (SIGALRM, got_alarm);
15 #endif
16
17@@ -513,7 +514,9 @@ test_bye (gnutls_session_t session)
18 return TEST_FAILED;
19
20 #ifndef _WIN32
21- old = siginterrupt (SIGALRM, 1);
22+ (void) sigaction(SIGALRM, NULL, &act);
23+ act.sa_flags &= ~SA_RESTART;
24+ old = sigaction(SIGALRM, &act, NULL);
25 alarm (secs);
26 #else
27 setsockopt ((int) gnutls_transport_get_ptr (session), SOL_SOCKET,
28@@ -527,7 +530,12 @@ test_bye (gnutls_session_t session)
29 while (ret > 0);
30
31 #ifndef _WIN32
32- siginterrupt (SIGALRM, old);
33+ (void) sigaction(SIGALRM, NULL, &act);
34+ if (old)
35+ act.sa_flags &= ~SA_RESTART;
36+ else
37+ act.sa_flags |= SA_RESTART;
38+ sigaction(SIGALRM, &act, NULL);
39 #else
40 if (WSAGetLastError () == WSAETIMEDOUT ||
41 WSAGetLastError () == WSAECONNABORTED)
diff --git a/meta-oe/recipes-support/gnutls/gnutls.inc b/meta-oe/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 000000000..6fb712f52
--- /dev/null
+++ b/meta-oe/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,30 @@
1DESCRIPTION = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3DEPENDS = "zlib libgcrypt lzo guile-native gtk-doc"
4LICENSE = "LGPL"
5LICENSE_${PN}-extra = "GPLv3"
6
7SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2;name=gnutls"
8
9inherit autotools binconfig pkgconfig gettext
10
11INC_PR = "r11"
12
13EXTRA_OECONF = "--with-included-opencdk --with-included-libtasn1 --disable-rpath"
14
15PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-bin ${PN}-xx"
16
17FILES_${PN} = "${libdir}/libgnutls.so.*"
18FILES_${PN}-bin = "${bindir}/gnutls-serv \
19 ${bindir}/gnutls-cli \
20 ${bindir}/srptool \
21 ${bindir}/psktool \
22 ${bindir}/certtool \
23 ${bindir}/gnutls-srpcrypt"
24
25FILES_${PN}-dev += "${bindir}/*-config ${bindir}/gnutls-cli-debug"
26FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
27FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
28FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
29
30BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-support/gnutls/gnutls_2.10.4.bb b/meta-oe/recipes-support/gnutls/gnutls_2.10.4.bb
new file mode 100644
index 000000000..9f406847a
--- /dev/null
+++ b/meta-oe/recipes-support/gnutls/gnutls_2.10.4.bb
@@ -0,0 +1,25 @@
1require gnutls.inc
2
3PR = "${INC_PR}.0"
4
5EXTRA_OECONF += " --without-libgcrypt-prefix "
6
7SRC_URI += "file://gettextize-with-gettext-0.18.patch \
8 file://gnutls-openssl.patch \
9 file://gnutls-replace-siginterrupt.patch \
10 "
11
12do_configure_prepend() {
13
14 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
15
16 for i in ${MACROS}; do
17 rm -f m4/$i
18 rm -f lib/m4/$i
19 rm -f libextra/m4/$i
20 done
21
22}
23
24SRC_URI[gnutls.md5sum] = "4e1517084018a8b1fdc96daabea40528"
25SRC_URI[gnutls.sha256sum] = "b8bfe36450fe671e99db5ff1e44e6b65fda8a79cacd9e77d550eff7da3745fc8"