152f22b6bf8f6545e19ceb74a87928c8e2a5e2ed
[crux-ports.git] / ruby / ruby-valgrind.diff
1 diff -aur ruby-1.8.4.orig/Makefile.in ruby-1.8.4/Makefile.in
2 --- ruby-1.8.4.orig/Makefile.in 2005-11-11 00:22:03.000000000 +0100
3 +++ ruby-1.8.4/Makefile.in      2005-12-22 13:14:25.402304500 +0100
4 @@ -32,7 +32,7 @@
5  
6  empty =
7  OUTFLAG = @OUTFLAG@$(empty)
8 -CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@
9 +CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@ @VALGRIND_CFLAGS@
10  CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
11  LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
12  EXTLDFLAGS = 
13 diff -aur ruby-1.8.4.orig/configure ruby-1.8.4/configure
14 --- ruby-1.8.4.orig/configure   2005-12-22 08:29:52.000000000 +0100
15 +++ ruby-1.8.4/configure        2005-12-22 13:20:56.010716000 +0100
16 @@ -308,7 +308,7 @@
17  # include <unistd.h>
18  #endif"
19  
20 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAJOR MINOR TEENY build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CPP EGREP GNU_LD CPPOUTFILE OUTFLAG YACC RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP OBJDUMP ac_ct_OBJDUMP LN_S SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RM CP MAKEDIRS LIBOBJS ALLOCA DLDFLAGS ARCH_FLAG STATIC CCDLFLAGS LDSHARED DLEXT DLEXT2 LIBEXT LINK_SO LIBPATHFLAG RPATHFLAG LIBPATHENV TRY_LINK STRIP EXTSTATIC setup MINIRUBY PREP RUNRUBY EXTOUT ARCHFILE RDOCTARGET XCFLAGS XLDFLAGS LIBRUBY_LDSHARED LIBRUBY_DLDFLAGS RUBY_INSTALL_NAME rubyw_install_name RUBYW_INSTALL_NAME RUBY_SO_NAME LIBRUBY_A LIBRUBY_SO LIBRUBY_ALIASES LIBRUBY LIBRUBYARG LIBRUBYARG_STATIC LIBRUBYARG_SHARED SOLIBS DLDLIBS ENABLE_SHARED MAINLIBS COMMON_LIBS COMMON_MACROS COMMON_HEADERS EXPORT_PREFIX MINIOBJS MAKEFILES arch sitearch sitedir configure_args NROFF MANTYPE LTLIBOBJS'
21 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAJOR MINOR TEENY build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CPP EGREP GNU_LD CPPOUTFILE OUTFLAG YACC RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP OBJDUMP ac_ct_OBJDUMP LN_S SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RM CP MAKEDIRS LIBOBJS ALLOCA PKG_CONFIG ac_pt_PKG_CONFIG VALGRIND_CFLAGS VALGRIND_LIBS DLDFLAGS ARCH_FLAG STATIC CCDLFLAGS LDSHARED DLEXT DLEXT2 LIBEXT LINK_SO LIBPATHFLAG RPATHFLAG LIBPATHENV TRY_LINK STRIP EXTSTATIC setup MINIRUBY PREP RUNRUBY EXTOUT ARCHFILE RDOCTARGET XCFLAGS XLDFLAGS LIBRUBY_LDSHARED LIBRUBY_DLDFLAGS RUBY_INSTALL_NAME rubyw_install_name RUBYW_INSTALL_NAME RUBY_SO_NAME LIBRUBY_A LIBRUBY_SO LIBRUBY_ALIASES LIBRUBY LIBRUBYARG LIBRUBYARG_STATIC LIBRUBYARG_SHARED SOLIBS DLDLIBS ENABLE_SHARED MAINLIBS COMMON_LIBS COMMON_MACROS COMMON_HEADERS EXPORT_PREFIX MINIOBJS MAKEFILES arch sitearch sitedir configure_args NROFF MANTYPE LTLIBOBJS'
22  ac_subst_files=''
23  
24  # Initialize some variables set by options.
25 @@ -769,6 +769,18 @@
26  ac_env_CPP_value=$CPP
27  ac_cv_env_CPP_set=${CPP+set}
28  ac_cv_env_CPP_value=$CPP
29 +ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
30 +ac_env_PKG_CONFIG_value=$PKG_CONFIG
31 +ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
32 +ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
33 +ac_env_VALGRIND_CFLAGS_set=${VALGRIND_CFLAGS+set}
34 +ac_env_VALGRIND_CFLAGS_value=$VALGRIND_CFLAGS
35 +ac_cv_env_VALGRIND_CFLAGS_set=${VALGRIND_CFLAGS+set}
36 +ac_cv_env_VALGRIND_CFLAGS_value=$VALGRIND_CFLAGS
37 +ac_env_VALGRIND_LIBS_set=${VALGRIND_LIBS+set}
38 +ac_env_VALGRIND_LIBS_value=$VALGRIND_LIBS
39 +ac_cv_env_VALGRIND_LIBS_set=${VALGRIND_LIBS+set}
40 +ac_cv_env_VALGRIND_LIBS_value=$VALGRIND_LIBS
41  
42  #
43  # Report the --help message.
44 @@ -863,6 +875,7 @@
45    --disable-largefile     omit support for large files
46    --enable-pthread        use pthread library.
47    --enable-setreuid       use setreuid()/setregid() according to need even if obsolete.
48 +  --enable-valgrind       use valgrind support.
49    --disable-rpath         embed run path into extension libraries.
50    --enable-shared         build a shared library for Ruby.
51    --enable-install-doc    build and install rdoc indexes during install
52 @@ -887,6 +900,11 @@
53    CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
54                headers in a nonstandard directory <include dir>
55    CPP         C preprocessor
56 +  PKG_CONFIG  path to pkg-config utility
57 +  VALGRIND_CFLAGS
58 +              C compiler flags for VALGRIND, overriding pkg-config
59 +  VALGRIND_LIBS
60 +              linker flags for VALGRIND, overriding pkg-config
61  
62  Use these variables to override the choices made by `configure' or to help
63  it to find libraries and programs with nonstandard names/locations.
64 @@ -979,7 +997,7 @@
65      else
66        echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
67      fi
68 -    cd "$ac_popdir"
69 +    cd $ac_popdir
70    done
71  fi
72  
73 @@ -2210,7 +2228,8 @@
74    cat conftest.err >&5
75    echo "$as_me:$LINENO: \$? = $ac_status" >&5
76    (exit $ac_status); } &&
77 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
78 +        { ac_try='test -z "$ac_c_werror_flag"
79 +                        || test ! -s conftest.err'
80    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
81    (eval $ac_try) 2>&5
82    ac_status=$?
83 @@ -2268,7 +2287,8 @@
84    cat conftest.err >&5
85    echo "$as_me:$LINENO: \$? = $ac_status" >&5
86    (exit $ac_status); } &&
87 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
88 +        { ac_try='test -z "$ac_c_werror_flag"
89 +                        || test ! -s conftest.err'
90    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
91    (eval $ac_try) 2>&5
92    ac_status=$?
93 @@ -2384,7 +2404,8 @@
94    cat conftest.err >&5
95    echo "$as_me:$LINENO: \$? = $ac_status" >&5
96    (exit $ac_status); } &&
97 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
98 +        { ac_try='test -z "$ac_c_werror_flag"
99 +                        || test ! -s conftest.err'
100    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
101    (eval $ac_try) 2>&5
102    ac_status=$?
103 @@ -2438,7 +2459,8 @@
104    cat conftest.err >&5
105    echo "$as_me:$LINENO: \$? = $ac_status" >&5
106    (exit $ac_status); } &&
107 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
108 +        { ac_try='test -z "$ac_c_werror_flag"
109 +                        || test ! -s conftest.err'
110    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
111    (eval $ac_try) 2>&5
112    ac_status=$?
113 @@ -2483,7 +2505,8 @@
114    cat conftest.err >&5
115    echo "$as_me:$LINENO: \$? = $ac_status" >&5
116    (exit $ac_status); } &&
117 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
118 +        { ac_try='test -z "$ac_c_werror_flag"
119 +                        || test ! -s conftest.err'
120    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
121    (eval $ac_try) 2>&5
122    ac_status=$?
123 @@ -2527,7 +2550,8 @@
124    cat conftest.err >&5
125    echo "$as_me:$LINENO: \$? = $ac_status" >&5
126    (exit $ac_status); } &&
127 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
128 +        { ac_try='test -z "$ac_c_werror_flag"
129 +                        || test ! -s conftest.err'
130    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
131    (eval $ac_try) 2>&5
132    ac_status=$?
133 @@ -3598,7 +3622,8 @@
134    cat conftest.err >&5
135    echo "$as_me:$LINENO: \$? = $ac_status" >&5
136    (exit $ac_status); } &&
137 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
138 +        { ac_try='test -z "$ac_c_werror_flag"
139 +                        || test ! -s conftest.err'
140    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
141    (eval $ac_try) 2>&5
142    ac_status=$?
143 @@ -3906,7 +3931,8 @@
144    cat conftest.err >&5
145    echo "$as_me:$LINENO: \$? = $ac_status" >&5
146    (exit $ac_status); } &&
147 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
148 +        { ac_try='test -z "$ac_c_werror_flag"
149 +                        || test ! -s conftest.err'
150    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
151    (eval $ac_try) 2>&5
152    ac_status=$?
153 @@ -4076,7 +4102,8 @@
154    cat conftest.err >&5
155    echo "$as_me:$LINENO: \$? = $ac_status" >&5
156    (exit $ac_status); } &&
157 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
158 +        { ac_try='test -z "$ac_c_werror_flag"
159 +                        || test ! -s conftest.err'
160    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
161    (eval $ac_try) 2>&5
162    ac_status=$?
163 @@ -4139,7 +4166,8 @@
164    cat conftest.err >&5
165    echo "$as_me:$LINENO: \$? = $ac_status" >&5
166    (exit $ac_status); } &&
167 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
168 +        { ac_try='test -z "$ac_c_werror_flag"
169 +                        || test ! -s conftest.err'
170    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
171    (eval $ac_try) 2>&5
172    ac_status=$?
173 @@ -4333,7 +4361,8 @@
174    cat conftest.err >&5
175    echo "$as_me:$LINENO: \$? = $ac_status" >&5
176    (exit $ac_status); } &&
177 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
178 +        { ac_try='test -z "$ac_c_werror_flag"
179 +                        || test ! -s conftest.err'
180    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
181    (eval $ac_try) 2>&5
182    ac_status=$?
183 @@ -4362,7 +4391,8 @@
184    cat conftest.err >&5
185    echo "$as_me:$LINENO: \$? = $ac_status" >&5
186    (exit $ac_status); } &&
187 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
188 +        { ac_try='test -z "$ac_c_werror_flag"
189 +                        || test ! -s conftest.err'
190    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
191    (eval $ac_try) 2>&5
192    ac_status=$?
193 @@ -4432,7 +4462,8 @@
194    cat conftest.err >&5
195    echo "$as_me:$LINENO: \$? = $ac_status" >&5
196    (exit $ac_status); } &&
197 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
198 +        { ac_try='test -z "$ac_c_werror_flag"
199 +                        || test ! -s conftest.err'
200    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
201    (eval $ac_try) 2>&5
202    ac_status=$?
203 @@ -4484,7 +4515,8 @@
204    cat conftest.err >&5
205    echo "$as_me:$LINENO: \$? = $ac_status" >&5
206    (exit $ac_status); } &&
207 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
208 +        { ac_try='test -z "$ac_c_werror_flag"
209 +                        || test ! -s conftest.err'
210    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
211    (eval $ac_try) 2>&5
212    ac_status=$?
213 @@ -4555,7 +4587,8 @@
214    cat conftest.err >&5
215    echo "$as_me:$LINENO: \$? = $ac_status" >&5
216    (exit $ac_status); } &&
217 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
218 +        { ac_try='test -z "$ac_c_werror_flag"
219 +                        || test ! -s conftest.err'
220    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
221    (eval $ac_try) 2>&5
222    ac_status=$?
223 @@ -4607,7 +4640,8 @@
224    cat conftest.err >&5
225    echo "$as_me:$LINENO: \$? = $ac_status" >&5
226    (exit $ac_status); } &&
227 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
228 +        { ac_try='test -z "$ac_c_werror_flag"
229 +                        || test ! -s conftest.err'
230    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
231    (eval $ac_try) 2>&5
232    ac_status=$?
233 @@ -4674,7 +4708,8 @@
234    cat conftest.err >&5
235    echo "$as_me:$LINENO: \$? = $ac_status" >&5
236    (exit $ac_status); } &&
237 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
238 +        { ac_try='test -z "$ac_c_werror_flag"
239 +                        || test ! -s conftest.err'
240    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
241    (eval $ac_try) 2>&5
242    ac_status=$?
243 @@ -4737,7 +4772,8 @@
244    cat conftest.err >&5
245    echo "$as_me:$LINENO: \$? = $ac_status" >&5
246    (exit $ac_status); } &&
247 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
248 +        { ac_try='test -z "$ac_c_werror_flag"
249 +                        || test ! -s conftest.err'
250    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
251    (eval $ac_try) 2>&5
252    ac_status=$?
253 @@ -4802,7 +4838,8 @@
254    cat conftest.err >&5
255    echo "$as_me:$LINENO: \$? = $ac_status" >&5
256    (exit $ac_status); } &&
257 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
258 +        { ac_try='test -z "$ac_c_werror_flag"
259 +                        || test ! -s conftest.err'
260    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
261    (eval $ac_try) 2>&5
262    ac_status=$?
263 @@ -4864,7 +4901,8 @@
264    cat conftest.err >&5
265    echo "$as_me:$LINENO: \$? = $ac_status" >&5
266    (exit $ac_status); } &&
267 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
268 +        { ac_try='test -z "$ac_c_werror_flag"
269 +                        || test ! -s conftest.err'
270    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
271    (eval $ac_try) 2>&5
272    ac_status=$?
273 @@ -4904,7 +4942,8 @@
274    cat conftest.err >&5
275    echo "$as_me:$LINENO: \$? = $ac_status" >&5
276    (exit $ac_status); } &&
277 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
278 +        { ac_try='test -z "$ac_c_werror_flag"
279 +                        || test ! -s conftest.err'
280    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
281    (eval $ac_try) 2>&5
282    ac_status=$?
283 @@ -4960,7 +4999,8 @@
284    cat conftest.err >&5
285    echo "$as_me:$LINENO: \$? = $ac_status" >&5
286    (exit $ac_status); } &&
287 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
288 +        { ac_try='test -z "$ac_c_werror_flag"
289 +                        || test ! -s conftest.err'
290    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
291    (eval $ac_try) 2>&5
292    ac_status=$?
293 @@ -5000,7 +5040,8 @@
294    cat conftest.err >&5
295    echo "$as_me:$LINENO: \$? = $ac_status" >&5
296    (exit $ac_status); } &&
297 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
298 +        { ac_try='test -z "$ac_c_werror_flag"
299 +                        || test ! -s conftest.err'
300    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
301    (eval $ac_try) 2>&5
302    ac_status=$?
303 @@ -5064,7 +5105,8 @@
304    cat conftest.err >&5
305    echo "$as_me:$LINENO: \$? = $ac_status" >&5
306    (exit $ac_status); } &&
307 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
308 +        { ac_try='test -z "$ac_c_werror_flag"
309 +                        || test ! -s conftest.err'
310    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
311    (eval $ac_try) 2>&5
312    ac_status=$?
313 @@ -5095,8 +5137,10 @@
314  esac
315  else
316    if test "$cross_compiling" = yes; then
317 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
318 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
319 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
320 +See \`config.log' for more details." >&5
321 +echo "$as_me: error: cannot run test program while cross compiling
322 +See \`config.log' for more details." >&2;}
323     { (exit 1); exit 1; }; }
324  else
325    cat >conftest.$ac_ext <<_ACEOF
326 @@ -5208,7 +5252,8 @@
327    cat conftest.err >&5
328    echo "$as_me:$LINENO: \$? = $ac_status" >&5
329    (exit $ac_status); } &&
330 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
331 +        { ac_try='test -z "$ac_c_werror_flag"
332 +                        || test ! -s conftest.err'
333    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
334    (eval $ac_try) 2>&5
335    ac_status=$?
336 @@ -5270,7 +5315,8 @@
337    cat conftest.err >&5
338    echo "$as_me:$LINENO: \$? = $ac_status" >&5
339    (exit $ac_status); } &&
340 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
341 +        { ac_try='test -z "$ac_c_werror_flag"
342 +                        || test ! -s conftest.err'
343    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
344    (eval $ac_try) 2>&5
345    ac_status=$?
346 @@ -5310,7 +5356,8 @@
347    cat conftest.err >&5
348    echo "$as_me:$LINENO: \$? = $ac_status" >&5
349    (exit $ac_status); } &&
350 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
351 +        { ac_try='test -z "$ac_c_werror_flag"
352 +                        || test ! -s conftest.err'
353    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
354    (eval $ac_try) 2>&5
355    ac_status=$?
356 @@ -5366,7 +5413,8 @@
357    cat conftest.err >&5
358    echo "$as_me:$LINENO: \$? = $ac_status" >&5
359    (exit $ac_status); } &&
360 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
361 +        { ac_try='test -z "$ac_c_werror_flag"
362 +                        || test ! -s conftest.err'
363    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
364    (eval $ac_try) 2>&5
365    ac_status=$?
366 @@ -5406,7 +5454,8 @@
367    cat conftest.err >&5
368    echo "$as_me:$LINENO: \$? = $ac_status" >&5
369    (exit $ac_status); } &&
370 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
371 +        { ac_try='test -z "$ac_c_werror_flag"
372 +                        || test ! -s conftest.err'
373    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
374    (eval $ac_try) 2>&5
375    ac_status=$?
376 @@ -5470,7 +5519,8 @@
377    cat conftest.err >&5
378    echo "$as_me:$LINENO: \$? = $ac_status" >&5
379    (exit $ac_status); } &&
380 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
381 +        { ac_try='test -z "$ac_c_werror_flag"
382 +                        || test ! -s conftest.err'
383    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
384    (eval $ac_try) 2>&5
385    ac_status=$?
386 @@ -5501,8 +5551,10 @@
387  esac
388  else
389    if test "$cross_compiling" = yes; then
390 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
391 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
392 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
393 +See \`config.log' for more details." >&5
394 +echo "$as_me: error: cannot run test program while cross compiling
395 +See \`config.log' for more details." >&2;}
396     { (exit 1); exit 1; }; }
397  else
398    cat >conftest.$ac_ext <<_ACEOF
399 @@ -5614,7 +5666,8 @@
400    cat conftest.err >&5
401    echo "$as_me:$LINENO: \$? = $ac_status" >&5
402    (exit $ac_status); } &&
403 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
404 +        { ac_try='test -z "$ac_c_werror_flag"
405 +                        || test ! -s conftest.err'
406    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
407    (eval $ac_try) 2>&5
408    ac_status=$?
409 @@ -5676,7 +5729,8 @@
410    cat conftest.err >&5
411    echo "$as_me:$LINENO: \$? = $ac_status" >&5
412    (exit $ac_status); } &&
413 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
414 +        { ac_try='test -z "$ac_c_werror_flag"
415 +                        || test ! -s conftest.err'
416    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
417    (eval $ac_try) 2>&5
418    ac_status=$?
419 @@ -5716,7 +5770,8 @@
420    cat conftest.err >&5
421    echo "$as_me:$LINENO: \$? = $ac_status" >&5
422    (exit $ac_status); } &&
423 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
424 +        { ac_try='test -z "$ac_c_werror_flag"
425 +                        || test ! -s conftest.err'
426    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
427    (eval $ac_try) 2>&5
428    ac_status=$?
429 @@ -5772,7 +5827,8 @@
430    cat conftest.err >&5
431    echo "$as_me:$LINENO: \$? = $ac_status" >&5
432    (exit $ac_status); } &&
433 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
434 +        { ac_try='test -z "$ac_c_werror_flag"
435 +                        || test ! -s conftest.err'
436    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
437    (eval $ac_try) 2>&5
438    ac_status=$?
439 @@ -5812,7 +5868,8 @@
440    cat conftest.err >&5
441    echo "$as_me:$LINENO: \$? = $ac_status" >&5
442    (exit $ac_status); } &&
443 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
444 +        { ac_try='test -z "$ac_c_werror_flag"
445 +                        || test ! -s conftest.err'
446    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
447    (eval $ac_try) 2>&5
448    ac_status=$?
449 @@ -5876,7 +5933,8 @@
450    cat conftest.err >&5
451    echo "$as_me:$LINENO: \$? = $ac_status" >&5
452    (exit $ac_status); } &&
453 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
454 +        { ac_try='test -z "$ac_c_werror_flag"
455 +                        || test ! -s conftest.err'
456    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
457    (eval $ac_try) 2>&5
458    ac_status=$?
459 @@ -5907,8 +5965,10 @@
460  esac
461  else
462    if test "$cross_compiling" = yes; then
463 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
464 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
465 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
466 +See \`config.log' for more details." >&5
467 +echo "$as_me: error: cannot run test program while cross compiling
468 +See \`config.log' for more details." >&2;}
469     { (exit 1); exit 1; }; }
470  else
471    cat >conftest.$ac_ext <<_ACEOF
472 @@ -6020,7 +6080,8 @@
473    cat conftest.err >&5
474    echo "$as_me:$LINENO: \$? = $ac_status" >&5
475    (exit $ac_status); } &&
476 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
477 +        { ac_try='test -z "$ac_c_werror_flag"
478 +                        || test ! -s conftest.err'
479    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
480    (eval $ac_try) 2>&5
481    ac_status=$?
482 @@ -6082,7 +6143,8 @@
483    cat conftest.err >&5
484    echo "$as_me:$LINENO: \$? = $ac_status" >&5
485    (exit $ac_status); } &&
486 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
487 +        { ac_try='test -z "$ac_c_werror_flag"
488 +                        || test ! -s conftest.err'
489    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
490    (eval $ac_try) 2>&5
491    ac_status=$?
492 @@ -6122,7 +6184,8 @@
493    cat conftest.err >&5
494    echo "$as_me:$LINENO: \$? = $ac_status" >&5
495    (exit $ac_status); } &&
496 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
497 +        { ac_try='test -z "$ac_c_werror_flag"
498 +                        || test ! -s conftest.err'
499    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
500    (eval $ac_try) 2>&5
501    ac_status=$?
502 @@ -6178,7 +6241,8 @@
503    cat conftest.err >&5
504    echo "$as_me:$LINENO: \$? = $ac_status" >&5
505    (exit $ac_status); } &&
506 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
507 +        { ac_try='test -z "$ac_c_werror_flag"
508 +                        || test ! -s conftest.err'
509    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
510    (eval $ac_try) 2>&5
511    ac_status=$?
512 @@ -6218,7 +6282,8 @@
513    cat conftest.err >&5
514    echo "$as_me:$LINENO: \$? = $ac_status" >&5
515    (exit $ac_status); } &&
516 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
517 +        { ac_try='test -z "$ac_c_werror_flag"
518 +                        || test ! -s conftest.err'
519    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
520    (eval $ac_try) 2>&5
521    ac_status=$?
522 @@ -6282,7 +6347,8 @@
523    cat conftest.err >&5
524    echo "$as_me:$LINENO: \$? = $ac_status" >&5
525    (exit $ac_status); } &&
526 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
527 +        { ac_try='test -z "$ac_c_werror_flag"
528 +                        || test ! -s conftest.err'
529    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
530    (eval $ac_try) 2>&5
531    ac_status=$?
532 @@ -6313,8 +6379,10 @@
533  esac
534  else
535    if test "$cross_compiling" = yes; then
536 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
537 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
538 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
539 +See \`config.log' for more details." >&5
540 +echo "$as_me: error: cannot run test program while cross compiling
541 +See \`config.log' for more details." >&2;}
542     { (exit 1); exit 1; }; }
543  else
544    cat >conftest.$ac_ext <<_ACEOF
545 @@ -6426,7 +6494,8 @@
546    cat conftest.err >&5
547    echo "$as_me:$LINENO: \$? = $ac_status" >&5
548    (exit $ac_status); } &&
549 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
550 +        { ac_try='test -z "$ac_c_werror_flag"
551 +                        || test ! -s conftest.err'
552    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
553    (eval $ac_try) 2>&5
554    ac_status=$?
555 @@ -6488,7 +6557,8 @@
556    cat conftest.err >&5
557    echo "$as_me:$LINENO: \$? = $ac_status" >&5
558    (exit $ac_status); } &&
559 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
560 +        { ac_try='test -z "$ac_c_werror_flag"
561 +                        || test ! -s conftest.err'
562    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
563    (eval $ac_try) 2>&5
564    ac_status=$?
565 @@ -6528,7 +6598,8 @@
566    cat conftest.err >&5
567    echo "$as_me:$LINENO: \$? = $ac_status" >&5
568    (exit $ac_status); } &&
569 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
570 +        { ac_try='test -z "$ac_c_werror_flag"
571 +                        || test ! -s conftest.err'
572    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
573    (eval $ac_try) 2>&5
574    ac_status=$?
575 @@ -6584,7 +6655,8 @@
576    cat conftest.err >&5
577    echo "$as_me:$LINENO: \$? = $ac_status" >&5
578    (exit $ac_status); } &&
579 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
580 +        { ac_try='test -z "$ac_c_werror_flag"
581 +                        || test ! -s conftest.err'
582    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
583    (eval $ac_try) 2>&5
584    ac_status=$?
585 @@ -6624,7 +6696,8 @@
586    cat conftest.err >&5
587    echo "$as_me:$LINENO: \$? = $ac_status" >&5
588    (exit $ac_status); } &&
589 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
590 +        { ac_try='test -z "$ac_c_werror_flag"
591 +                        || test ! -s conftest.err'
592    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
593    (eval $ac_try) 2>&5
594    ac_status=$?
595 @@ -6688,7 +6761,8 @@
596    cat conftest.err >&5
597    echo "$as_me:$LINENO: \$? = $ac_status" >&5
598    (exit $ac_status); } &&
599 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
600 +        { ac_try='test -z "$ac_c_werror_flag"
601 +                        || test ! -s conftest.err'
602    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
603    (eval $ac_try) 2>&5
604    ac_status=$?
605 @@ -6719,8 +6793,10 @@
606  esac
607  else
608    if test "$cross_compiling" = yes; then
609 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
610 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
611 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
612 +See \`config.log' for more details." >&5
613 +echo "$as_me: error: cannot run test program while cross compiling
614 +See \`config.log' for more details." >&2;}
615     { (exit 1); exit 1; }; }
616  else
617    cat >conftest.$ac_ext <<_ACEOF
618 @@ -6832,7 +6908,8 @@
619    cat conftest.err >&5
620    echo "$as_me:$LINENO: \$? = $ac_status" >&5
621    (exit $ac_status); } &&
622 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
623 +        { ac_try='test -z "$ac_c_werror_flag"
624 +                        || test ! -s conftest.err'
625    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
626    (eval $ac_try) 2>&5
627    ac_status=$?
628 @@ -6894,7 +6971,8 @@
629    cat conftest.err >&5
630    echo "$as_me:$LINENO: \$? = $ac_status" >&5
631    (exit $ac_status); } &&
632 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
633 +        { ac_try='test -z "$ac_c_werror_flag"
634 +                        || test ! -s conftest.err'
635    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
636    (eval $ac_try) 2>&5
637    ac_status=$?
638 @@ -6934,7 +7012,8 @@
639    cat conftest.err >&5
640    echo "$as_me:$LINENO: \$? = $ac_status" >&5
641    (exit $ac_status); } &&
642 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
643 +        { ac_try='test -z "$ac_c_werror_flag"
644 +                        || test ! -s conftest.err'
645    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
646    (eval $ac_try) 2>&5
647    ac_status=$?
648 @@ -6990,7 +7069,8 @@
649    cat conftest.err >&5
650    echo "$as_me:$LINENO: \$? = $ac_status" >&5
651    (exit $ac_status); } &&
652 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
653 +        { ac_try='test -z "$ac_c_werror_flag"
654 +                        || test ! -s conftest.err'
655    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
656    (eval $ac_try) 2>&5
657    ac_status=$?
658 @@ -7030,7 +7110,8 @@
659    cat conftest.err >&5
660    echo "$as_me:$LINENO: \$? = $ac_status" >&5
661    (exit $ac_status); } &&
662 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
663 +        { ac_try='test -z "$ac_c_werror_flag"
664 +                        || test ! -s conftest.err'
665    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
666    (eval $ac_try) 2>&5
667    ac_status=$?
668 @@ -7094,7 +7175,8 @@
669    cat conftest.err >&5
670    echo "$as_me:$LINENO: \$? = $ac_status" >&5
671    (exit $ac_status); } &&
672 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
673 +        { ac_try='test -z "$ac_c_werror_flag"
674 +                        || test ! -s conftest.err'
675    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
676    (eval $ac_try) 2>&5
677    ac_status=$?
678 @@ -7125,8 +7207,10 @@
679  esac
680  else
681    if test "$cross_compiling" = yes; then
682 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
683 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
684 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
685 +See \`config.log' for more details." >&5
686 +echo "$as_me: error: cannot run test program while cross compiling
687 +See \`config.log' for more details." >&2;}
688     { (exit 1); exit 1; }; }
689  else
690    cat >conftest.$ac_ext <<_ACEOF
691 @@ -7238,7 +7322,8 @@
692    cat conftest.err >&5
693    echo "$as_me:$LINENO: \$? = $ac_status" >&5
694    (exit $ac_status); } &&
695 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
696 +        { ac_try='test -z "$ac_c_werror_flag"
697 +                        || test ! -s conftest.err'
698    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
699    (eval $ac_try) 2>&5
700    ac_status=$?
701 @@ -7300,7 +7385,8 @@
702    cat conftest.err >&5
703    echo "$as_me:$LINENO: \$? = $ac_status" >&5
704    (exit $ac_status); } &&
705 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
706 +        { ac_try='test -z "$ac_c_werror_flag"
707 +                        || test ! -s conftest.err'
708    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
709    (eval $ac_try) 2>&5
710    ac_status=$?
711 @@ -7340,7 +7426,8 @@
712    cat conftest.err >&5
713    echo "$as_me:$LINENO: \$? = $ac_status" >&5
714    (exit $ac_status); } &&
715 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
716 +        { ac_try='test -z "$ac_c_werror_flag"
717 +                        || test ! -s conftest.err'
718    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
719    (eval $ac_try) 2>&5
720    ac_status=$?
721 @@ -7396,7 +7483,8 @@
722    cat conftest.err >&5
723    echo "$as_me:$LINENO: \$? = $ac_status" >&5
724    (exit $ac_status); } &&
725 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
726 +        { ac_try='test -z "$ac_c_werror_flag"
727 +                        || test ! -s conftest.err'
728    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
729    (eval $ac_try) 2>&5
730    ac_status=$?
731 @@ -7436,7 +7524,8 @@
732    cat conftest.err >&5
733    echo "$as_me:$LINENO: \$? = $ac_status" >&5
734    (exit $ac_status); } &&
735 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
736 +        { ac_try='test -z "$ac_c_werror_flag"
737 +                        || test ! -s conftest.err'
738    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
739    (eval $ac_try) 2>&5
740    ac_status=$?
741 @@ -7500,7 +7589,8 @@
742    cat conftest.err >&5
743    echo "$as_me:$LINENO: \$? = $ac_status" >&5
744    (exit $ac_status); } &&
745 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
746 +        { ac_try='test -z "$ac_c_werror_flag"
747 +                        || test ! -s conftest.err'
748    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
749    (eval $ac_try) 2>&5
750    ac_status=$?
751 @@ -7531,8 +7621,10 @@
752  esac
753  else
754    if test "$cross_compiling" = yes; then
755 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
756 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
757 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
758 +See \`config.log' for more details." >&5
759 +echo "$as_me: error: cannot run test program while cross compiling
760 +See \`config.log' for more details." >&2;}
761     { (exit 1); exit 1; }; }
762  else
763    cat >conftest.$ac_ext <<_ACEOF
764 @@ -7644,7 +7736,8 @@
765    cat conftest.err >&5
766    echo "$as_me:$LINENO: \$? = $ac_status" >&5
767    (exit $ac_status); } &&
768 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
769 +        { ac_try='test -z "$ac_c_werror_flag"
770 +                        || test ! -s conftest.err'
771    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
772    (eval $ac_try) 2>&5
773    ac_status=$?
774 @@ -7706,7 +7799,8 @@
775    cat conftest.err >&5
776    echo "$as_me:$LINENO: \$? = $ac_status" >&5
777    (exit $ac_status); } &&
778 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
779 +        { ac_try='test -z "$ac_c_werror_flag"
780 +                        || test ! -s conftest.err'
781    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
782    (eval $ac_try) 2>&5
783    ac_status=$?
784 @@ -7746,7 +7840,8 @@
785    cat conftest.err >&5
786    echo "$as_me:$LINENO: \$? = $ac_status" >&5
787    (exit $ac_status); } &&
788 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
789 +        { ac_try='test -z "$ac_c_werror_flag"
790 +                        || test ! -s conftest.err'
791    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
792    (eval $ac_try) 2>&5
793    ac_status=$?
794 @@ -7802,7 +7897,8 @@
795    cat conftest.err >&5
796    echo "$as_me:$LINENO: \$? = $ac_status" >&5
797    (exit $ac_status); } &&
798 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
799 +        { ac_try='test -z "$ac_c_werror_flag"
800 +                        || test ! -s conftest.err'
801    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
802    (eval $ac_try) 2>&5
803    ac_status=$?
804 @@ -7842,7 +7938,8 @@
805    cat conftest.err >&5
806    echo "$as_me:$LINENO: \$? = $ac_status" >&5
807    (exit $ac_status); } &&
808 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
809 +        { ac_try='test -z "$ac_c_werror_flag"
810 +                        || test ! -s conftest.err'
811    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
812    (eval $ac_try) 2>&5
813    ac_status=$?
814 @@ -7906,7 +8003,8 @@
815    cat conftest.err >&5
816    echo "$as_me:$LINENO: \$? = $ac_status" >&5
817    (exit $ac_status); } &&
818 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
819 +        { ac_try='test -z "$ac_c_werror_flag"
820 +                        || test ! -s conftest.err'
821    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
822    (eval $ac_try) 2>&5
823    ac_status=$?
824 @@ -7937,8 +8035,10 @@
825  esac
826  else
827    if test "$cross_compiling" = yes; then
828 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
829 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
830 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
831 +See \`config.log' for more details." >&5
832 +echo "$as_me: error: cannot run test program while cross compiling
833 +See \`config.log' for more details." >&2;}
834     { (exit 1); exit 1; }; }
835  else
836    cat >conftest.$ac_ext <<_ACEOF
837 @@ -8050,7 +8150,8 @@
838    cat conftest.err >&5
839    echo "$as_me:$LINENO: \$? = $ac_status" >&5
840    (exit $ac_status); } &&
841 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
842 +        { ac_try='test -z "$ac_c_werror_flag"
843 +                        || test ! -s conftest.err'
844    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
845    (eval $ac_try) 2>&5
846    ac_status=$?
847 @@ -8112,7 +8213,8 @@
848    cat conftest.err >&5
849    echo "$as_me:$LINENO: \$? = $ac_status" >&5
850    (exit $ac_status); } &&
851 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
852 +        { ac_try='test -z "$ac_c_werror_flag"
853 +                        || test ! -s conftest.err'
854    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
855    (eval $ac_try) 2>&5
856    ac_status=$?
857 @@ -8152,7 +8254,8 @@
858    cat conftest.err >&5
859    echo "$as_me:$LINENO: \$? = $ac_status" >&5
860    (exit $ac_status); } &&
861 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
862 +        { ac_try='test -z "$ac_c_werror_flag"
863 +                        || test ! -s conftest.err'
864    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
865    (eval $ac_try) 2>&5
866    ac_status=$?
867 @@ -8208,7 +8311,8 @@
868    cat conftest.err >&5
869    echo "$as_me:$LINENO: \$? = $ac_status" >&5
870    (exit $ac_status); } &&
871 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
872 +        { ac_try='test -z "$ac_c_werror_flag"
873 +                        || test ! -s conftest.err'
874    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
875    (eval $ac_try) 2>&5
876    ac_status=$?
877 @@ -8248,7 +8352,8 @@
878    cat conftest.err >&5
879    echo "$as_me:$LINENO: \$? = $ac_status" >&5
880    (exit $ac_status); } &&
881 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
882 +        { ac_try='test -z "$ac_c_werror_flag"
883 +                        || test ! -s conftest.err'
884    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
885    (eval $ac_try) 2>&5
886    ac_status=$?
887 @@ -8312,7 +8417,8 @@
888    cat conftest.err >&5
889    echo "$as_me:$LINENO: \$? = $ac_status" >&5
890    (exit $ac_status); } &&
891 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
892 +        { ac_try='test -z "$ac_c_werror_flag"
893 +                        || test ! -s conftest.err'
894    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
895    (eval $ac_try) 2>&5
896    ac_status=$?
897 @@ -8343,8 +8449,10 @@
898  esac
899  else
900    if test "$cross_compiling" = yes; then
901 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
902 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
903 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
904 +See \`config.log' for more details." >&5
905 +echo "$as_me: error: cannot run test program while cross compiling
906 +See \`config.log' for more details." >&2;}
907     { (exit 1); exit 1; }; }
908  else
909    cat >conftest.$ac_ext <<_ACEOF
910 @@ -8456,7 +8564,8 @@
911    cat conftest.err >&5
912    echo "$as_me:$LINENO: \$? = $ac_status" >&5
913    (exit $ac_status); } &&
914 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
915 +        { ac_try='test -z "$ac_c_werror_flag"
916 +                        || test ! -s conftest.err'
917    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
918    (eval $ac_try) 2>&5
919    ac_status=$?
920 @@ -8518,7 +8627,8 @@
921    cat conftest.err >&5
922    echo "$as_me:$LINENO: \$? = $ac_status" >&5
923    (exit $ac_status); } &&
924 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
925 +        { ac_try='test -z "$ac_c_werror_flag"
926 +                        || test ! -s conftest.err'
927    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
928    (eval $ac_try) 2>&5
929    ac_status=$?
930 @@ -8558,7 +8668,8 @@
931    cat conftest.err >&5
932    echo "$as_me:$LINENO: \$? = $ac_status" >&5
933    (exit $ac_status); } &&
934 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
935 +        { ac_try='test -z "$ac_c_werror_flag"
936 +                        || test ! -s conftest.err'
937    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
938    (eval $ac_try) 2>&5
939    ac_status=$?
940 @@ -8614,7 +8725,8 @@
941    cat conftest.err >&5
942    echo "$as_me:$LINENO: \$? = $ac_status" >&5
943    (exit $ac_status); } &&
944 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
945 +        { ac_try='test -z "$ac_c_werror_flag"
946 +                        || test ! -s conftest.err'
947    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
948    (eval $ac_try) 2>&5
949    ac_status=$?
950 @@ -8654,7 +8766,8 @@
951    cat conftest.err >&5
952    echo "$as_me:$LINENO: \$? = $ac_status" >&5
953    (exit $ac_status); } &&
954 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
955 +        { ac_try='test -z "$ac_c_werror_flag"
956 +                        || test ! -s conftest.err'
957    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
958    (eval $ac_try) 2>&5
959    ac_status=$?
960 @@ -8718,7 +8831,8 @@
961    cat conftest.err >&5
962    echo "$as_me:$LINENO: \$? = $ac_status" >&5
963    (exit $ac_status); } &&
964 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
965 +        { ac_try='test -z "$ac_c_werror_flag"
966 +                        || test ! -s conftest.err'
967    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
968    (eval $ac_try) 2>&5
969    ac_status=$?
970 @@ -8749,8 +8863,10 @@
971  esac
972  else
973    if test "$cross_compiling" = yes; then
974 -  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
975 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
976 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
977 +See \`config.log' for more details." >&5
978 +echo "$as_me: error: cannot run test program while cross compiling
979 +See \`config.log' for more details." >&2;}
980     { (exit 1); exit 1; }; }
981  else
982    cat >conftest.$ac_ext <<_ACEOF
983 @@ -8865,7 +8981,8 @@
984    cat conftest.err >&5
985    echo "$as_me:$LINENO: \$? = $ac_status" >&5
986    (exit $ac_status); } &&
987 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
988 +        { ac_try='test -z "$ac_c_werror_flag"
989 +                        || test ! -s conftest.err'
990    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
991    (eval $ac_try) 2>&5
992    ac_status=$?
993 @@ -8929,7 +9046,8 @@
994    cat conftest.err >&5
995    echo "$as_me:$LINENO: \$? = $ac_status" >&5
996    (exit $ac_status); } &&
997 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
998 +        { ac_try='test -z "$ac_c_werror_flag"
999 +                        || test ! -s conftest.err'
1000    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1001    (eval $ac_try) 2>&5
1002    ac_status=$?
1003 @@ -8988,7 +9106,8 @@
1004    cat conftest.err >&5
1005    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1006    (exit $ac_status); } &&
1007 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1008 +        { ac_try='test -z "$ac_c_werror_flag"
1009 +                        || test ! -s conftest.err'
1010    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1011    (eval $ac_try) 2>&5
1012    ac_status=$?
1013 @@ -9062,7 +9181,8 @@
1014    cat conftest.err >&5
1015    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1016    (exit $ac_status); } &&
1017 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1018 +        { ac_try='test -z "$ac_c_werror_flag"
1019 +                        || test ! -s conftest.err'
1020    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1021    (eval $ac_try) 2>&5
1022    ac_status=$?
1023 @@ -9124,7 +9244,8 @@
1024    cat conftest.err >&5
1025    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1026    (exit $ac_status); } &&
1027 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1028 +        { ac_try='test -z "$ac_c_werror_flag"
1029 +                        || test ! -s conftest.err'
1030    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1031    (eval $ac_try) 2>&5
1032    ac_status=$?
1033 @@ -9183,7 +9304,8 @@
1034    cat conftest.err >&5
1035    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1036    (exit $ac_status); } &&
1037 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1038 +        { ac_try='test -z "$ac_c_werror_flag"
1039 +                        || test ! -s conftest.err'
1040    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1041    (eval $ac_try) 2>&5
1042    ac_status=$?
1043 @@ -9247,7 +9369,8 @@
1044    cat conftest.err >&5
1045    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1046    (exit $ac_status); } &&
1047 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1048 +        { ac_try='test -z "$ac_c_werror_flag"
1049 +                        || test ! -s conftest.err'
1050    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1051    (eval $ac_try) 2>&5
1052    ac_status=$?
1053 @@ -9445,7 +9568,8 @@
1054    cat conftest.err >&5
1055    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1056    (exit $ac_status); } &&
1057 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1058 +        { ac_try='test -z "$ac_c_werror_flag"
1059 +                        || test ! -s conftest.err'
1060    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1061    (eval $ac_try) 2>&5
1062    ac_status=$?
1063 @@ -9580,7 +9704,8 @@
1064    cat conftest.err >&5
1065    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1066    (exit $ac_status); } &&
1067 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1068 +        { ac_try='test -z "$ac_c_werror_flag"
1069 +                        || test ! -s conftest.err'
1070    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1071    (eval $ac_try) 2>&5
1072    ac_status=$?
1073 @@ -9653,7 +9778,8 @@
1074    cat conftest.err >&5
1075    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1076    (exit $ac_status); } &&
1077 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1078 +        { ac_try='test -z "$ac_c_werror_flag"
1079 +                        || test ! -s conftest.err'
1080    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1081    (eval $ac_try) 2>&5
1082    ac_status=$?
1083 @@ -9726,7 +9852,8 @@
1084    cat conftest.err >&5
1085    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1086    (exit $ac_status); } &&
1087 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1088 +        { ac_try='test -z "$ac_c_werror_flag"
1089 +                        || test ! -s conftest.err'
1090    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1091    (eval $ac_try) 2>&5
1092    ac_status=$?
1093 @@ -9808,7 +9935,8 @@
1094    cat conftest.err >&5
1095    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1096    (exit $ac_status); } &&
1097 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1098 +        { ac_try='test -z "$ac_c_werror_flag"
1099 +                        || test ! -s conftest.err'
1100    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1101    (eval $ac_try) 2>&5
1102    ac_status=$?
1103 @@ -9880,7 +10008,8 @@
1104    cat conftest.err >&5
1105    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1106    (exit $ac_status); } &&
1107 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1108 +        { ac_try='test -z "$ac_c_werror_flag"
1109 +                        || test ! -s conftest.err'
1110    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1111    (eval $ac_try) 2>&5
1112    ac_status=$?
1113 @@ -9934,7 +10063,8 @@
1114    cat conftest.err >&5
1115    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1116    (exit $ac_status); } &&
1117 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1118 +        { ac_try='test -z "$ac_c_werror_flag"
1119 +                        || test ! -s conftest.err'
1120    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1121    (eval $ac_try) 2>&5
1122    ac_status=$?
1123 @@ -10005,7 +10135,8 @@
1124    cat conftest.err >&5
1125    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1126    (exit $ac_status); } &&
1127 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1128 +        { ac_try='test -z "$ac_c_werror_flag"
1129 +                        || test ! -s conftest.err'
1130    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1131    (eval $ac_try) 2>&5
1132    ac_status=$?
1133 @@ -10059,7 +10190,8 @@
1134    cat conftest.err >&5
1135    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1136    (exit $ac_status); } &&
1137 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1138 +        { ac_try='test -z "$ac_c_werror_flag"
1139 +                        || test ! -s conftest.err'
1140    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1141    (eval $ac_try) 2>&5
1142    ac_status=$?
1143 @@ -10126,7 +10258,8 @@
1144    cat conftest.err >&5
1145    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1146    (exit $ac_status); } &&
1147 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1148 +        { ac_try='test -z "$ac_c_werror_flag"
1149 +                        || test ! -s conftest.err'
1150    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1151    (eval $ac_try) 2>&5
1152    ac_status=$?
1153 @@ -10297,7 +10430,8 @@
1154    cat conftest.err >&5
1155    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1156    (exit $ac_status); } &&
1157 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1158 +        { ac_try='test -z "$ac_c_werror_flag"
1159 +                        || test ! -s conftest.err'
1160    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1161    (eval $ac_try) 2>&5
1162    ac_status=$?
1163 @@ -10394,7 +10528,8 @@
1164    cat conftest.err >&5
1165    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1166    (exit $ac_status); } &&
1167 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1168 +        { ac_try='test -z "$ac_c_werror_flag"
1169 +                        || test ! -s conftest.err'
1170    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1171    (eval $ac_try) 2>&5
1172    ac_status=$?
1173 @@ -10542,7 +10677,8 @@
1174    cat conftest.err >&5
1175    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1176    (exit $ac_status); } &&
1177 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1178 +        { ac_try='test -z "$ac_c_werror_flag"
1179 +                        || test ! -s conftest.err'
1180    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1181    (eval $ac_try) 2>&5
1182    ac_status=$?
1183 @@ -10607,7 +10743,8 @@
1184    cat conftest.err >&5
1185    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1186    (exit $ac_status); } &&
1187 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1188 +        { ac_try='test -z "$ac_c_werror_flag"
1189 +                        || test ! -s conftest.err'
1190    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1191    (eval $ac_try) 2>&5
1192    ac_status=$?
1193 @@ -10650,7 +10787,8 @@
1194    cat conftest.err >&5
1195    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1196    (exit $ac_status); } &&
1197 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1198 +        { ac_try='test -z "$ac_c_werror_flag"
1199 +                        || test ! -s conftest.err'
1200    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1201    (eval $ac_try) 2>&5
1202    ac_status=$?
1203 @@ -10720,7 +10858,8 @@
1204    cat conftest.err >&5
1205    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1206    (exit $ac_status); } &&
1207 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1208 +        { ac_try='test -z "$ac_c_werror_flag"
1209 +                        || test ! -s conftest.err'
1210    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1211    (eval $ac_try) 2>&5
1212    ac_status=$?
1213 @@ -10763,7 +10902,8 @@
1214    cat conftest.err >&5
1215    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1216    (exit $ac_status); } &&
1217 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1218 +        { ac_try='test -z "$ac_c_werror_flag"
1219 +                        || test ! -s conftest.err'
1220    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1221    (eval $ac_try) 2>&5
1222    ac_status=$?
1223 @@ -10843,7 +10983,8 @@
1224    cat conftest.err >&5
1225    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1226    (exit $ac_status); } &&
1227 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1228 +        { ac_try='test -z "$ac_c_werror_flag"
1229 +                        || test ! -s conftest.err'
1230    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1231    (eval $ac_try) 2>&5
1232    ac_status=$?
1233 @@ -10886,7 +11027,8 @@
1234    cat conftest.err >&5
1235    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1236    (exit $ac_status); } &&
1237 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1238 +        { ac_try='test -z "$ac_c_werror_flag"
1239 +                        || test ! -s conftest.err'
1240    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1241    (eval $ac_try) 2>&5
1242    ac_status=$?
1243 @@ -11090,7 +11232,8 @@
1244    cat conftest.err >&5
1245    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1246    (exit $ac_status); } &&
1247 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1248 +        { ac_try='test -z "$ac_c_werror_flag"
1249 +                        || test ! -s conftest.err'
1250    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1251    (eval $ac_try) 2>&5
1252    ac_status=$?
1253 @@ -11150,7 +11293,8 @@
1254    cat conftest.err >&5
1255    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1256    (exit $ac_status); } &&
1257 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1258 +        { ac_try='test -z "$ac_c_werror_flag"
1259 +                        || test ! -s conftest.err'
1260    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1261    (eval $ac_try) 2>&5
1262    ac_status=$?
1263 @@ -11231,7 +11375,8 @@
1264    cat conftest.err >&5
1265    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1266    (exit $ac_status); } &&
1267 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1268 +        { ac_try='test -z "$ac_c_werror_flag"
1269 +                        || test ! -s conftest.err'
1270    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1271    (eval $ac_try) 2>&5
1272    ac_status=$?
1273 @@ -11372,7 +11517,8 @@
1274    cat conftest.err >&5
1275    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1276    (exit $ac_status); } &&
1277 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1278 +        { ac_try='test -z "$ac_c_werror_flag"
1279 +                        || test ! -s conftest.err'
1280    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1281    (eval $ac_try) 2>&5
1282    ac_status=$?
1283 @@ -11587,7 +11733,8 @@
1284    cat conftest.err >&5
1285    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1286    (exit $ac_status); } &&
1287 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1288 +        { ac_try='test -z "$ac_c_werror_flag"
1289 +                        || test ! -s conftest.err'
1290    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1291    (eval $ac_try) 2>&5
1292    ac_status=$?
1293 @@ -11631,7 +11778,8 @@
1294    cat conftest.err >&5
1295    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1296    (exit $ac_status); } &&
1297 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1298 +        { ac_try='test -z "$ac_c_werror_flag"
1299 +                        || test ! -s conftest.err'
1300    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1301    (eval $ac_try) 2>&5
1302    ac_status=$?
1303 @@ -11696,7 +11844,8 @@
1304    cat conftest.err >&5
1305    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1306    (exit $ac_status); } &&
1307 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1308 +        { ac_try='test -z "$ac_c_werror_flag"
1309 +                        || test ! -s conftest.err'
1310    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1311    (eval $ac_try) 2>&5
1312    ac_status=$?
1313 @@ -11797,7 +11946,8 @@
1314    cat conftest.err >&5
1315    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1316    (exit $ac_status); } &&
1317 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1318 +        { ac_try='test -z "$ac_c_werror_flag"
1319 +                        || test ! -s conftest.err'
1320    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1321    (eval $ac_try) 2>&5
1322    ac_status=$?
1323 @@ -11917,7 +12067,8 @@
1324    cat conftest.err >&5
1325    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1326    (exit $ac_status); } &&
1327 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1328 +        { ac_try='test -z "$ac_c_werror_flag"
1329 +                        || test ! -s conftest.err'
1330    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1331    (eval $ac_try) 2>&5
1332    ac_status=$?
1333 @@ -12090,7 +12241,8 @@
1334    cat conftest.err >&5
1335    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1336    (exit $ac_status); } &&
1337 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1338 +        { ac_try='test -z "$ac_c_werror_flag"
1339 +                        || test ! -s conftest.err'
1340    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1341    (eval $ac_try) 2>&5
1342    ac_status=$?
1343 @@ -12168,7 +12320,8 @@
1344    cat conftest.err >&5
1345    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1346    (exit $ac_status); } &&
1347 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1348 +        { ac_try='test -z "$ac_c_werror_flag"
1349 +                        || test ! -s conftest.err'
1350    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1351    (eval $ac_try) 2>&5
1352    ac_status=$?
1353 @@ -12233,7 +12386,8 @@
1354    cat conftest.err >&5
1355    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1356    (exit $ac_status); } &&
1357 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1358 +        { ac_try='test -z "$ac_c_werror_flag"
1359 +                        || test ! -s conftest.err'
1360    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1361    (eval $ac_try) 2>&5
1362    ac_status=$?
1363 @@ -12279,7 +12433,8 @@
1364    cat conftest.err >&5
1365    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1366    (exit $ac_status); } &&
1367 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1368 +        { ac_try='test -z "$ac_c_werror_flag"
1369 +                        || test ! -s conftest.err'
1370    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1371    (eval $ac_try) 2>&5
1372    ac_status=$?
1373 @@ -12353,7 +12508,8 @@
1374    cat conftest.err >&5
1375    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1376    (exit $ac_status); } &&
1377 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1378 +        { ac_try='test -z "$ac_c_werror_flag"
1379 +                        || test ! -s conftest.err'
1380    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1381    (eval $ac_try) 2>&5
1382    ac_status=$?
1383 @@ -12415,7 +12571,8 @@
1384    cat conftest.err >&5
1385    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1386    (exit $ac_status); } &&
1387 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1388 +        { ac_try='test -z "$ac_c_werror_flag"
1389 +                        || test ! -s conftest.err'
1390    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1391    (eval $ac_try) 2>&5
1392    ac_status=$?
1393 @@ -12474,7 +12631,8 @@
1394    cat conftest.err >&5
1395    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1396    (exit $ac_status); } &&
1397 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1398 +        { ac_try='test -z "$ac_c_werror_flag"
1399 +                        || test ! -s conftest.err'
1400    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1401    (eval $ac_try) 2>&5
1402    ac_status=$?
1403 @@ -12684,7 +12842,8 @@
1404    cat conftest.err >&5
1405    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1406    (exit $ac_status); } &&
1407 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1408 +        { ac_try='test -z "$ac_c_werror_flag"
1409 +                        || test ! -s conftest.err'
1410    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1411    (eval $ac_try) 2>&5
1412    ac_status=$?
1413 @@ -12816,7 +12975,8 @@
1414    cat conftest.err >&5
1415    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1416    (exit $ac_status); } &&
1417 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1418 +        { ac_try='test -z "$ac_c_werror_flag"
1419 +                        || test ! -s conftest.err'
1420    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1421    (eval $ac_try) 2>&5
1422    ac_status=$?
1423 @@ -12858,7 +13018,8 @@
1424    cat conftest.err >&5
1425    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1426    (exit $ac_status); } &&
1427 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1428 +        { ac_try='test -z "$ac_c_werror_flag"
1429 +                        || test ! -s conftest.err'
1430    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1431    (eval $ac_try) 2>&5
1432    ac_status=$?
1433 @@ -12915,7 +13076,8 @@
1434    cat conftest.err >&5
1435    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1436    (exit $ac_status); } &&
1437 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1438 +        { ac_try='test -z "$ac_c_werror_flag"
1439 +                        || test ! -s conftest.err'
1440    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1441    (eval $ac_try) 2>&5
1442    ac_status=$?
1443 @@ -13083,7 +13245,8 @@
1444    cat conftest.err >&5
1445    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1446    (exit $ac_status); } &&
1447 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1448 +        { ac_try='test -z "$ac_c_werror_flag"
1449 +                        || test ! -s conftest.err'
1450    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1451    (eval $ac_try) 2>&5
1452    ac_status=$?
1453 @@ -13146,7 +13309,8 @@
1454    cat conftest.err >&5
1455    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1456    (exit $ac_status); } &&
1457 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1458 +        { ac_try='test -z "$ac_c_werror_flag"
1459 +                        || test ! -s conftest.err'
1460    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1461    (eval $ac_try) 2>&5
1462    ac_status=$?
1463 @@ -13205,7 +13369,8 @@
1464    cat conftest.err >&5
1465    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1466    (exit $ac_status); } &&
1467 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1468 +        { ac_try='test -z "$ac_c_werror_flag"
1469 +                        || test ! -s conftest.err'
1470    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1471    (eval $ac_try) 2>&5
1472    ac_status=$?
1473 @@ -13277,7 +13442,8 @@
1474    cat conftest.err >&5
1475    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1476    (exit $ac_status); } &&
1477 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1478 +        { ac_try='test -z "$ac_c_werror_flag"
1479 +                        || test ! -s conftest.err'
1480    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1481    (eval $ac_try) 2>&5
1482    ac_status=$?
1483 @@ -13401,7 +13567,8 @@
1484    cat conftest.err >&5
1485    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1486    (exit $ac_status); } &&
1487 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1488 +        { ac_try='test -z "$ac_c_werror_flag"
1489 +                        || test ! -s conftest.err'
1490    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1491    (eval $ac_try) 2>&5
1492    ac_status=$?
1493 @@ -13467,7 +13634,8 @@
1494    cat conftest.err >&5
1495    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1496    (exit $ac_status); } &&
1497 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1498 +        { ac_try='test -z "$ac_c_werror_flag"
1499 +                        || test ! -s conftest.err'
1500    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1501    (eval $ac_try) 2>&5
1502    ac_status=$?
1503 @@ -13533,7 +13701,8 @@
1504    cat conftest.err >&5
1505    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1506    (exit $ac_status); } &&
1507 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1508 +        { ac_try='test -z "$ac_c_werror_flag"
1509 +                        || test ! -s conftest.err'
1510    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1511    (eval $ac_try) 2>&5
1512    ac_status=$?
1513 @@ -13704,7 +13873,8 @@
1514    cat conftest.err >&5
1515    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1516    (exit $ac_status); } &&
1517 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1518 +        { ac_try='test -z "$ac_c_werror_flag"
1519 +                        || test ! -s conftest.err'
1520    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1521    (eval $ac_try) 2>&5
1522    ac_status=$?
1523 @@ -13843,7 +14013,8 @@
1524    cat conftest.err >&5
1525    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1526    (exit $ac_status); } &&
1527 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1528 +        { ac_try='test -z "$ac_c_werror_flag"
1529 +                        || test ! -s conftest.err'
1530    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1531    (eval $ac_try) 2>&5
1532    ac_status=$?
1533 @@ -13972,7 +14143,8 @@
1534    cat conftest.err >&5
1535    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1536    (exit $ac_status); } &&
1537 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1538 +        { ac_try='test -z "$ac_c_werror_flag"
1539 +                        || test ! -s conftest.err'
1540    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1541    (eval $ac_try) 2>&5
1542    ac_status=$?
1543 @@ -14044,7 +14216,8 @@
1544    cat conftest.err >&5
1545    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1546    (exit $ac_status); } &&
1547 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1548 +        { ac_try='test -z "$ac_c_werror_flag"
1549 +                        || test ! -s conftest.err'
1550    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1551    (eval $ac_try) 2>&5
1552    ac_status=$?
1553 @@ -14158,7 +14331,8 @@
1554    cat conftest.err >&5
1555    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1556    (exit $ac_status); } &&
1557 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1558 +        { ac_try='test -z "$ac_c_werror_flag"
1559 +                        || test ! -s conftest.err'
1560    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1561    (eval $ac_try) 2>&5
1562    ac_status=$?
1563 @@ -14193,6 +14367,202 @@
1564      fi
1565  fi
1566  
1567 +# Check whether --enable-valgrind or --disable-valgrind was given.
1568 +if test "${enable_valgrind+set}" = set; then
1569 +  enableval="$enable_valgrind"
1570 +  want_valgrind=$enableval
1571 +else
1572 +  want_valgrind=auto
1573 +fi;
1574 +
1575 +if test x"$want_valgrind" != xno; then
1576 +
1577 +
1578 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1579 +       if test -n "$ac_tool_prefix"; then
1580 +  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
1581 +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
1582 +echo "$as_me:$LINENO: checking for $ac_word" >&5
1583 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1584 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
1585 +  echo $ECHO_N "(cached) $ECHO_C" >&6
1586 +else
1587 +  case $PKG_CONFIG in
1588 +  [\\/]* | ?:[\\/]*)
1589 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
1590 +  ;;
1591 +  *)
1592 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1593 +for as_dir in $PATH
1594 +do
1595 +  IFS=$as_save_IFS
1596 +  test -z "$as_dir" && as_dir=.
1597 +  for ac_exec_ext in '' $ac_executable_extensions; do
1598 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1599 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
1600 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1601 +    break 2
1602 +  fi
1603 +done
1604 +done
1605 +
1606 +  ;;
1607 +esac
1608 +fi
1609 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
1610 +
1611 +if test -n "$PKG_CONFIG"; then
1612 +  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
1613 +echo "${ECHO_T}$PKG_CONFIG" >&6
1614 +else
1615 +  echo "$as_me:$LINENO: result: no" >&5
1616 +echo "${ECHO_T}no" >&6
1617 +fi
1618 +
1619 +fi
1620 +if test -z "$ac_cv_path_PKG_CONFIG"; then
1621 +  ac_pt_PKG_CONFIG=$PKG_CONFIG
1622 +  # Extract the first word of "pkg-config", so it can be a program name with args.
1623 +set dummy pkg-config; ac_word=$2
1624 +echo "$as_me:$LINENO: checking for $ac_word" >&5
1625 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1626 +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
1627 +  echo $ECHO_N "(cached) $ECHO_C" >&6
1628 +else
1629 +  case $ac_pt_PKG_CONFIG in
1630 +  [\\/]* | ?:[\\/]*)
1631 +  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
1632 +  ;;
1633 +  *)
1634 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635 +for as_dir in $PATH
1636 +do
1637 +  IFS=$as_save_IFS
1638 +  test -z "$as_dir" && as_dir=.
1639 +  for ac_exec_ext in '' $ac_executable_extensions; do
1640 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1641 +    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
1642 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1643 +    break 2
1644 +  fi
1645 +done
1646 +done
1647 +
1648 +  ;;
1649 +esac
1650 +fi
1651 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
1652 +
1653 +if test -n "$ac_pt_PKG_CONFIG"; then
1654 +  echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
1655 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
1656 +else
1657 +  echo "$as_me:$LINENO: result: no" >&5
1658 +echo "${ECHO_T}no" >&6
1659 +fi
1660 +
1661 +  PKG_CONFIG=$ac_pt_PKG_CONFIG
1662 +else
1663 +  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
1664 +fi
1665 +
1666 +fi
1667 +if test -n "$PKG_CONFIG"; then
1668 +       _pkg_min_version=0.9.0
1669 +       echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
1670 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
1671 +       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1672 +               echo "$as_me:$LINENO: result: yes" >&5
1673 +echo "${ECHO_T}yes" >&6
1674 +       else
1675 +               echo "$as_me:$LINENO: result: no" >&5
1676 +echo "${ECHO_T}no" >&6
1677 +               PKG_CONFIG=""
1678 +       fi
1679 +
1680 +fi
1681 +
1682 +pkg_failed=no
1683 +echo "$as_me:$LINENO: checking for VALGRIND" >&5
1684 +echo $ECHO_N "checking for VALGRIND... $ECHO_C" >&6
1685 +
1686 +if test -n "$PKG_CONFIG"; then
1687 +    if test -n "$VALGRIND_CFLAGS"; then
1688 +        pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS"
1689 +    else
1690 +        if test -n "$PKG_CONFIG" && \
1691 +    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"valgrind\"") >&5
1692 +  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
1693 +  ac_status=$?
1694 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1695 +  (exit $ac_status); }; then
1696 +  pkg_cv_VALGRIND_CFLAGS=`$PKG_CONFIG --cflags "valgrind" 2>/dev/null`
1697 +else
1698 +  pkg_failed=yes
1699 +fi
1700 +    fi
1701 +else
1702 +       pkg_failed=untried
1703 +fi
1704 +if test -n "$PKG_CONFIG"; then
1705 +    if test -n "$VALGRIND_LIBS"; then
1706 +        pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS"
1707 +    else
1708 +        if test -n "$PKG_CONFIG" && \
1709 +    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"valgrind\"") >&5
1710 +  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
1711 +  ac_status=$?
1712 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1713 +  (exit $ac_status); }; then
1714 +  pkg_cv_VALGRIND_LIBS=`$PKG_CONFIG --libs "valgrind" 2>/dev/null`
1715 +else
1716 +  pkg_failed=yes
1717 +fi
1718 +    fi
1719 +else
1720 +       pkg_failed=untried
1721 +fi
1722 +
1723 +
1724 +
1725 +if test $pkg_failed = yes; then
1726 +
1727 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1728 +        _pkg_short_errors_supported=yes
1729 +else
1730 +        _pkg_short_errors_supported=no
1731 +fi
1732 +        if test $_pkg_short_errors_supported = yes; then
1733 +               VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind"`
1734 +        else
1735 +               VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind"`
1736 +        fi
1737 +       # Put the nasty error message in config.log where it belongs
1738 +       echo "$VALGRIND_PKG_ERRORS" >&5
1739 +
1740 +       have_valgrind=no
1741 +elif test $pkg_failed = untried; then
1742 +       have_valgrind=no
1743 +else
1744 +       VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS
1745 +       VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS
1746 +        echo "$as_me:$LINENO: result: yes" >&5
1747 +echo "${ECHO_T}yes" >&6
1748 +       have_valgrind=yes
1749 +fi
1750 +
1751 +       if test x"$have_valgrind" = xyes; then
1752 +               cat >>confdefs.h <<\_ACEOF
1753 +#define HAVE_VALGRIND 1
1754 +_ACEOF
1755 +
1756 +       elif test x"$want_valgrind" = xyes -a x"$have_valgrind" = xno; then
1757 +               { { echo "$as_me:$LINENO: error: valgrind support requested but valgrind not found" >&5
1758 +echo "$as_me: error: valgrind support requested but valgrind not found" >&2;}
1759 +   { (exit 1); exit 1; }; }
1760 +       fi
1761 +fi
1762 +
1763  DEFAULT_KCODE="KCODE_NONE"
1764  
1765  
1766 @@ -14503,7 +14873,8 @@
1767    cat conftest.err >&5
1768    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1769    (exit $ac_status); } &&
1770 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1771 +        { ac_try='test -z "$ac_c_werror_flag"
1772 +                        || test ! -s conftest.err'
1773    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1774    (eval $ac_try) 2>&5
1775    ac_status=$?
1776 @@ -14670,7 +15041,8 @@
1777    cat conftest.err >&5
1778    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1779    (exit $ac_status); } &&
1780 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1781 +        { ac_try='test -z "$ac_c_werror_flag"
1782 +                        || test ! -s conftest.err'
1783    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1784    (eval $ac_try) 2>&5
1785    ac_status=$?
1786 @@ -14743,7 +15115,8 @@
1787    cat conftest.err >&5
1788    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1789    (exit $ac_status); } &&
1790 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1791 +        { ac_try='test -z "$ac_c_werror_flag"
1792 +                        || test ! -s conftest.err'
1793    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1794    (eval $ac_try) 2>&5
1795    ac_status=$?
1796 @@ -14847,7 +15220,8 @@
1797    cat conftest.err >&5
1798    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1799    (exit $ac_status); } &&
1800 -        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
1801 +        { ac_try='test -z "$ac_c_werror_flag"
1802 +                        || test ! -s conftest.err'
1803    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1804    (eval $ac_try) 2>&5
1805    ac_status=$?
1806 @@ -16209,6 +16583,10 @@
1807  s,@MAKEDIRS@,$MAKEDIRS,;t t
1808  s,@LIBOBJS@,$LIBOBJS,;t t
1809  s,@ALLOCA@,$ALLOCA,;t t
1810 +s,@PKG_CONFIG@,$PKG_CONFIG,;t t
1811 +s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
1812 +s,@VALGRIND_CFLAGS@,$VALGRIND_CFLAGS,;t t
1813 +s,@VALGRIND_LIBS@,$VALGRIND_LIBS,;t t
1814  s,@DLDFLAGS@,$DLDFLAGS,;t t
1815  s,@ARCH_FLAG@,$ARCH_FLAG,;t t
1816  s,@STATIC@,$STATIC,;t t
1817 @@ -16429,6 +16807,11 @@
1818    *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
1819    esac
1820  
1821 +  if test x"$ac_file" != x-; then
1822 +    { echo "$as_me:$LINENO: creating $ac_file" >&5
1823 +echo "$as_me: creating $ac_file" >&6;}
1824 +    rm -f "$ac_file"
1825 +  fi
1826    # Let's still pretend it is `configure' which instantiates (i.e., don't
1827    # use $as_me), people would be surprised to read:
1828    #    /* config.h.  Generated by config.status.  */
1829 @@ -16467,12 +16850,6 @@
1830          fi;;
1831        esac
1832      done` || { (exit 1); exit 1; }
1833 -
1834 -  if test x"$ac_file" != x-; then
1835 -    { echo "$as_me:$LINENO: creating $ac_file" >&5
1836 -echo "$as_me: creating $ac_file" >&6;}
1837 -    rm -f "$ac_file"
1838 -  fi
1839  _ACEOF
1840  cat >>$CONFIG_STATUS <<_ACEOF
1841    sed "$ac_vpsub
1842 diff -aur ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in
1843 --- ruby-1.8.4.orig/configure.in        2005-11-24 13:07:18.000000000 +0100
1844 +++ ruby-1.8.4/configure.in     2005-12-22 13:14:05.697073000 +0100
1845 @@ -769,6 +769,20 @@
1846      fi
1847  fi
1848  
1849 +AC_ARG_ENABLE(valgrind,
1850 +       [  --enable-valgrind       use valgrind support.],
1851 +       [want_valgrind=$enableval], [want_valgrind=auto])
1852 +
1853 +if test x"$want_valgrind" != xno; then
1854 +       PKG_CHECK_MODULES(VALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
1855 +
1856 +       if test x"$have_valgrind" = xyes; then
1857 +               AC_DEFINE(HAVE_VALGRIND)
1858 +       elif test x"$want_valgrind" = xyes -a x"$have_valgrind" = xno; then
1859 +               AC_MSG_ERROR(valgrind support requested but valgrind not found)
1860 +       fi
1861 +fi
1862 +
1863  dnl default value for $KANJI
1864  DEFAULT_KCODE="KCODE_NONE"
1865  
1866 diff -aur ruby-1.8.4.orig/gc.c ruby-1.8.4/gc.c
1867 --- ruby-1.8.4.orig/gc.c        2005-12-16 05:58:51.000000000 +0100
1868 +++ ruby-1.8.4/gc.c     2005-12-22 13:14:05.697073000 +0100
1869 @@ -30,6 +30,12 @@
1870  #include <sys/resource.h>
1871  #endif
1872  
1873 +#ifdef HAVE_VALGRIND
1874 +#include <memcheck.h>
1875 +#else
1876 +#define VALGRIND_MAKE_READABLE(p, n) /* empty */
1877 +#endif
1878 +
1879  #ifdef __ia64__
1880  #include <ucontext.h>
1881  #if defined(__FreeBSD__)
1882 @@ -620,6 +626,9 @@
1883      register long n;
1884  {
1885      VALUE v;
1886 +
1887 +    VALGRIND_MAKE_READABLE(x, sizeof(*x) * n);
1888 +
1889      while (n--) {
1890          v = *x;
1891         if (is_pointer_to_heap((void *)v)) {
1892 @@ -710,7 +719,10 @@
1893  {
1894      register RVALUE *obj;
1895  
1896 +    VALGRIND_MAKE_READABLE(&ptr, sizeof(ptr));
1897      obj = RANY(ptr);
1898 +    VALGRIND_MAKE_READABLE(obj, sizeof(*obj));
1899 +
1900      if (rb_special_const_p(ptr)) return; /* special const not marked */
1901      if (obj->as.basic.flags == 0) return;       /* free cell */
1902      if (obj->as.basic.flags & FL_MARK) return;  /* already marked */