076c9d2f7f65cd7598839ab4bba6c5122662e5de
[openwrt/svn-archive/archive.git] / utils / vim / patches / 001-cross_compile.patch
1 Index: vim71/src/auto/configure
2 ===================================================================
3 --- vim71.orig/src/auto/configure 2007-07-01 15:45:56.000000000 +0200
4 +++ vim71/src/auto/configure 2007-07-01 15:45:56.000000000 +0200
5 @@ -2796,14 +2796,6 @@
6 fi
7 fi
8
9 -if test "$cross_compiling" = yes; then
10 - { { echo "$as_me:$LINENO: error: cannot compile a simple program, check CC and CFLAGS
11 - (cross compiling doesn't work)" >&5
12 -echo "$as_me: error: cannot compile a simple program, check CC and CFLAGS
13 - (cross compiling doesn't work)" >&2;}
14 - { (exit 1); exit 1; }; }
15 -fi
16 -
17 test "$GCC" = yes && CPP_MM=M;
18
19 if test -f ./toolcheck; then
20 @@ -3410,27 +3402,6 @@
21
22
23
24 -have_local_include=''
25 -have_local_lib=''
26 -if test "$GCC" = yes; then
27 - echo 'void f(){}' > conftest.c
28 - have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
29 - have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
30 - rm -f conftest.c conftest.o
31 -fi
32 -if test -z "$have_local_lib" -a -d /usr/local/lib; then
33 - tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
34 - if test "$tt" = "$LDFLAGS"; then
35 - LDFLAGS="$LDFLAGS -L/usr/local/lib"
36 - fi
37 -fi
38 -if test -z "$have_local_include" -a -d /usr/local/include; then
39 - tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
40 - if test "$tt" = "$CPPFLAGS"; then
41 - CPPFLAGS="$CPPFLAGS -I/usr/local/include"
42 - fi
43 -fi
44 -
45 echo "$as_me:$LINENO: checking --with-vim-name argument" >&5
46 echo $ECHO_N "checking --with-vim-name argument... $ECHO_C" >&6
47
48 @@ -9287,9 +9258,8 @@
49 echo "$as_me:$LINENO: checking quality of toupper" >&5
50 echo $ECHO_N "checking quality of toupper... $ECHO_C" >&6
51 if test "$cross_compiling" = yes; then
52 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
53 -echo "$as_me: error: failed to compile test program" >&2;}
54 - { (exit 1); exit 1; }; }
55 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
56 +echo "$as_me: WARNING: failed to compile test program" >&2;}
57 else
58 cat >conftest.$ac_ext <<_ACEOF
59 /* confdefs.h. */
60 @@ -11762,9 +11732,12 @@
61 echo "$as_me:$LINENO: checking whether we talk terminfo" >&5
62 echo $ECHO_N "checking whether we talk terminfo... $ECHO_C" >&6
63 if test "$cross_compiling" = yes; then
64 - { { echo "$as_me:$LINENO: error: failed to compile test program." >&5
65 -echo "$as_me: error: failed to compile test program." >&2;}
66 - { (exit 1); exit 1; }; }
67 + { echo "$as_me:$LINENO: WARNING: failed to compile test program." >&5
68 +echo "$as_me: WARNING: failed to compile test program." >&2;}
69 + cat >>confdefs.h <<\_ACEOF
70 +#define TERMINFO 1
71 +_ACEOF
72 +
73 else
74 cat >conftest.$ac_ext <<_ACEOF
75 /* confdefs.h. */
76 @@ -12327,9 +12300,8 @@
77 echo $ECHO_N "checking default tty permissions/group... $ECHO_C" >&6
78 rm -f conftest_grp
79 if test "$cross_compiling" = yes; then
80 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
81 -echo "$as_me: error: failed to compile test program" >&2;}
82 - { (exit 1); exit 1; }; }
83 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
84 +echo "$as_me: WARNING: failed to compile test program" >&2;}
85 else
86 cat >conftest.$ac_ext <<_ACEOF
87 /* confdefs.h. */
88 @@ -12556,9 +12528,8 @@
89 echo "$as_me:$LINENO: checking getcwd implementation" >&5
90 echo $ECHO_N "checking getcwd implementation... $ECHO_C" >&6
91 if test "$cross_compiling" = yes; then
92 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
93 -echo "$as_me: error: failed to compile test program" >&2;}
94 - { (exit 1); exit 1; }; }
95 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
96 +echo "$as_me: WARNING: failed to compile test program" >&2;}
97 else
98 cat >conftest.$ac_ext <<_ACEOF
99 /* confdefs.h. */
100 @@ -12819,10 +12790,12 @@
101
102 echo "$as_me:$LINENO: checking whether stat() ignores a trailing slash" >&5
103 echo $ECHO_N "checking whether stat() ignores a trailing slash... $ECHO_C" >&6
104 -if test "$cross_compiling" = yes; then
105 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
106 -echo "$as_me: error: failed to compile test program" >&2;}
107 - { (exit 1); exit 1; }; }
108 +if test "${ac_cv_func_stat_ignores_trailing_slash+set}" = set; then
109 + echo $ECHO_N "(cached) $ECHO_C" >&6
110 +else
111 + if test "$cross_compiling" = yes; then
112 + ac_cv_func_stat_ignores_trailing_slash=no
113 +
114 else
115 cat >conftest.$ac_ext <<_ACEOF
116 /* confdefs.h. */
117 @@ -12845,22 +12818,27 @@
118 ac_status=$?
119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
120 (exit $ac_status); }; }; then
121 - echo "$as_me:$LINENO: result: yes" >&5
122 -echo "${ECHO_T}yes" >&6; cat >>confdefs.h <<\_ACEOF
123 -#define STAT_IGNORES_SLASH 1
124 -_ACEOF
125 -
126 + ac_cv_func_stat_ignores_trailing_slash=yes
127 else
128 echo "$as_me: program exited with status $ac_status" >&5
129 echo "$as_me: failed program was:" >&5
130 sed 's/^/| /' conftest.$ac_ext >&5
131
132 ( exit $ac_status )
133 -echo "$as_me:$LINENO: result: no" >&5
134 -echo "${ECHO_T}no" >&6
135 +ac_cv_func_stat_ignores_trailing_slash=no
136 fi
137 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
138 fi
139 +fi
140 +echo "$as_me:$LINENO: result: $ac_cv_func_stat_ignores_trailing_slash" >&5
141 +echo "${ECHO_T}$ac_cv_func_stat_ignores_trailing_slash" >&6
142 +
143 +if X"$ac_cv_func_stat_ignores_trailing_slash" = Xyes; then
144 + cat >>confdefs.h <<\_ACEOF
145 +#define STAT_IGNORES_SLASH 1
146 +_ACEOF
147 +
148 +fi
149
150 echo "$as_me:$LINENO: checking for iconv_open()" >&5
151 echo $ECHO_N "checking for iconv_open()... $ECHO_C" >&6
152 @@ -13813,15 +13791,341 @@
153 fi
154 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
155
156 +echo "$as_me:$LINENO: checking for int" >&5
157 +echo $ECHO_N "checking for int... $ECHO_C" >&6
158 +if test "${ac_cv_type_int+set}" = set; then
159 + echo $ECHO_N "(cached) $ECHO_C" >&6
160 +else
161 + cat >conftest.$ac_ext <<_ACEOF
162 +/* confdefs.h. */
163 +_ACEOF
164 +cat confdefs.h >>conftest.$ac_ext
165 +cat >>conftest.$ac_ext <<_ACEOF
166 +/* end confdefs.h. */
167 +$ac_includes_default
168 +int
169 +main ()
170 +{
171 +if ((int *) 0)
172 + return 0;
173 +if (sizeof (int))
174 + return 0;
175 + ;
176 + return 0;
177 +}
178 +_ACEOF
179 +rm -f conftest.$ac_objext
180 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
181 + (eval $ac_compile) 2>conftest.er1
182 + ac_status=$?
183 + grep -v '^ *+' conftest.er1 >conftest.err
184 + rm -f conftest.er1
185 + cat conftest.err >&5
186 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
187 + (exit $ac_status); } &&
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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
194 + (exit $ac_status); }; } &&
195 + { ac_try='test -s conftest.$ac_objext'
196 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
197 + (eval $ac_try) 2>&5
198 + ac_status=$?
199 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
200 + (exit $ac_status); }; }; then
201 + ac_cv_type_int=yes
202 +else
203 + echo "$as_me: failed program was:" >&5
204 +sed 's/^/| /' conftest.$ac_ext >&5
205 +
206 +ac_cv_type_int=no
207 +fi
208 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
209 +fi
210 +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
211 +echo "${ECHO_T}$ac_cv_type_int" >&6
212
213 echo "$as_me:$LINENO: checking size of int" >&5
214 echo $ECHO_N "checking size of int... $ECHO_C" >&6
215 if test "${ac_cv_sizeof_int+set}" = set; then
216 echo $ECHO_N "(cached) $ECHO_C" >&6
217 else
218 + if test "$ac_cv_type_int" = yes; then
219 + # The cast to unsigned long works around a bug in the HP C Compiler
220 + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
221 + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
222 + # This bug is HP SR number 8606223364.
223 if test "$cross_compiling" = yes; then
224 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
225 -echo "$as_me: error: failed to compile test program" >&2;}
226 + # Depending upon the size, compute the lo and hi bounds.
227 +cat >conftest.$ac_ext <<_ACEOF
228 +/* confdefs.h. */
229 +_ACEOF
230 +cat confdefs.h >>conftest.$ac_ext
231 +cat >>conftest.$ac_ext <<_ACEOF
232 +/* end confdefs.h. */
233 +$ac_includes_default
234 +int
235 +main ()
236 +{
237 +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
238 +test_array [0] = 0
239 +
240 + ;
241 + return 0;
242 +}
243 +_ACEOF
244 +rm -f conftest.$ac_objext
245 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
246 + (eval $ac_compile) 2>conftest.er1
247 + ac_status=$?
248 + grep -v '^ *+' conftest.er1 >conftest.err
249 + rm -f conftest.er1
250 + cat conftest.err >&5
251 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
252 + (exit $ac_status); } &&
253 + { ac_try='test -z "$ac_c_werror_flag"
254 + || test ! -s conftest.err'
255 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
256 + (eval $ac_try) 2>&5
257 + ac_status=$?
258 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
259 + (exit $ac_status); }; } &&
260 + { ac_try='test -s conftest.$ac_objext'
261 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
262 + (eval $ac_try) 2>&5
263 + ac_status=$?
264 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
265 + (exit $ac_status); }; }; then
266 + ac_lo=0 ac_mid=0
267 + while :; do
268 + cat >conftest.$ac_ext <<_ACEOF
269 +/* confdefs.h. */
270 +_ACEOF
271 +cat confdefs.h >>conftest.$ac_ext
272 +cat >>conftest.$ac_ext <<_ACEOF
273 +/* end confdefs.h. */
274 +$ac_includes_default
275 +int
276 +main ()
277 +{
278 +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
279 +test_array [0] = 0
280 +
281 + ;
282 + return 0;
283 +}
284 +_ACEOF
285 +rm -f conftest.$ac_objext
286 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
287 + (eval $ac_compile) 2>conftest.er1
288 + ac_status=$?
289 + grep -v '^ *+' conftest.er1 >conftest.err
290 + rm -f conftest.er1
291 + cat conftest.err >&5
292 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
293 + (exit $ac_status); } &&
294 + { ac_try='test -z "$ac_c_werror_flag"
295 + || test ! -s conftest.err'
296 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
297 + (eval $ac_try) 2>&5
298 + ac_status=$?
299 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
300 + (exit $ac_status); }; } &&
301 + { ac_try='test -s conftest.$ac_objext'
302 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
303 + (eval $ac_try) 2>&5
304 + ac_status=$?
305 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
306 + (exit $ac_status); }; }; then
307 + ac_hi=$ac_mid; break
308 +else
309 + echo "$as_me: failed program was:" >&5
310 +sed 's/^/| /' conftest.$ac_ext >&5
311 +
312 +ac_lo=`expr $ac_mid + 1`
313 + if test $ac_lo -le $ac_mid; then
314 + ac_lo= ac_hi=
315 + break
316 + fi
317 + ac_mid=`expr 2 '*' $ac_mid + 1`
318 +fi
319 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
320 + done
321 +else
322 + echo "$as_me: failed program was:" >&5
323 +sed 's/^/| /' conftest.$ac_ext >&5
324 +
325 +cat >conftest.$ac_ext <<_ACEOF
326 +/* confdefs.h. */
327 +_ACEOF
328 +cat confdefs.h >>conftest.$ac_ext
329 +cat >>conftest.$ac_ext <<_ACEOF
330 +/* end confdefs.h. */
331 +$ac_includes_default
332 +int
333 +main ()
334 +{
335 +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
336 +test_array [0] = 0
337 +
338 + ;
339 + return 0;
340 +}
341 +_ACEOF
342 +rm -f conftest.$ac_objext
343 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
344 + (eval $ac_compile) 2>conftest.er1
345 + ac_status=$?
346 + grep -v '^ *+' conftest.er1 >conftest.err
347 + rm -f conftest.er1
348 + cat conftest.err >&5
349 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
350 + (exit $ac_status); } &&
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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
357 + (exit $ac_status); }; } &&
358 + { ac_try='test -s conftest.$ac_objext'
359 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
360 + (eval $ac_try) 2>&5
361 + ac_status=$?
362 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
363 + (exit $ac_status); }; }; then
364 + ac_hi=-1 ac_mid=-1
365 + while :; do
366 + cat >conftest.$ac_ext <<_ACEOF
367 +/* confdefs.h. */
368 +_ACEOF
369 +cat confdefs.h >>conftest.$ac_ext
370 +cat >>conftest.$ac_ext <<_ACEOF
371 +/* end confdefs.h. */
372 +$ac_includes_default
373 +int
374 +main ()
375 +{
376 +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
377 +test_array [0] = 0
378 +
379 + ;
380 + return 0;
381 +}
382 +_ACEOF
383 +rm -f conftest.$ac_objext
384 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
385 + (eval $ac_compile) 2>conftest.er1
386 + ac_status=$?
387 + grep -v '^ *+' conftest.er1 >conftest.err
388 + rm -f conftest.er1
389 + cat conftest.err >&5
390 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
391 + (exit $ac_status); } &&
392 + { ac_try='test -z "$ac_c_werror_flag"
393 + || test ! -s conftest.err'
394 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
395 + (eval $ac_try) 2>&5
396 + ac_status=$?
397 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
398 + (exit $ac_status); }; } &&
399 + { ac_try='test -s conftest.$ac_objext'
400 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
401 + (eval $ac_try) 2>&5
402 + ac_status=$?
403 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
404 + (exit $ac_status); }; }; then
405 + ac_lo=$ac_mid; break
406 +else
407 + echo "$as_me: failed program was:" >&5
408 +sed 's/^/| /' conftest.$ac_ext >&5
409 +
410 +ac_hi=`expr '(' $ac_mid ')' - 1`
411 + if test $ac_mid -le $ac_hi; then
412 + ac_lo= ac_hi=
413 + break
414 + fi
415 + ac_mid=`expr 2 '*' $ac_mid`
416 +fi
417 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
418 + done
419 +else
420 + echo "$as_me: failed program was:" >&5
421 +sed 's/^/| /' conftest.$ac_ext >&5
422 +
423 +ac_lo= ac_hi=
424 +fi
425 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
426 +fi
427 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
428 +# Binary search between lo and hi bounds.
429 +while test "x$ac_lo" != "x$ac_hi"; do
430 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
431 + cat >conftest.$ac_ext <<_ACEOF
432 +/* confdefs.h. */
433 +_ACEOF
434 +cat confdefs.h >>conftest.$ac_ext
435 +cat >>conftest.$ac_ext <<_ACEOF
436 +/* end confdefs.h. */
437 +$ac_includes_default
438 +int
439 +main ()
440 +{
441 +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
442 +test_array [0] = 0
443 +
444 + ;
445 + return 0;
446 +}
447 +_ACEOF
448 +rm -f conftest.$ac_objext
449 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
450 + (eval $ac_compile) 2>conftest.er1
451 + ac_status=$?
452 + grep -v '^ *+' conftest.er1 >conftest.err
453 + rm -f conftest.er1
454 + cat conftest.err >&5
455 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
456 + (exit $ac_status); } &&
457 + { ac_try='test -z "$ac_c_werror_flag"
458 + || test ! -s conftest.err'
459 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
460 + (eval $ac_try) 2>&5
461 + ac_status=$?
462 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
463 + (exit $ac_status); }; } &&
464 + { ac_try='test -s conftest.$ac_objext'
465 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
466 + (eval $ac_try) 2>&5
467 + ac_status=$?
468 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
469 + (exit $ac_status); }; }; then
470 + ac_hi=$ac_mid
471 +else
472 + echo "$as_me: failed program was:" >&5
473 +sed 's/^/| /' conftest.$ac_ext >&5
474 +
475 +ac_lo=`expr '(' $ac_mid ')' + 1`
476 +fi
477 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
478 +done
479 +case $ac_lo in
480 +?*) ac_cv_sizeof_int=$ac_lo;;
481 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
482 +See \`config.log' for more details." >&5
483 +echo "$as_me: error: cannot compute sizeof (int), 77
484 +See \`config.log' for more details." >&2;}
485 + { (exit 1); exit 1; }; } ;;
486 +esac
487 +else
488 + if test "$cross_compiling" = yes; then
489 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
490 +See \`config.log' for more details." >&5
491 +echo "$as_me: error: cannot run test program while cross compiling
492 +See \`config.log' for more details." >&2;}
493 { (exit 1); exit 1; }; }
494 else
495 cat >conftest.$ac_ext <<_ACEOF
496 @@ -13830,14 +14134,37 @@
497 cat confdefs.h >>conftest.$ac_ext
498 cat >>conftest.$ac_ext <<_ACEOF
499 /* end confdefs.h. */
500 +$ac_includes_default
501 +long longval () { return (long) (sizeof (int)); }
502 +unsigned long ulongval () { return (long) (sizeof (int)); }
503 #include <stdio.h>
504 - main()
505 - {
506 - FILE *f=fopen("conftestval", "w");
507 - if (!f) exit(1);
508 - fprintf(f, "%d\n", (int)sizeof(int));
509 - exit(0);
510 - }
511 +#include <stdlib.h>
512 +int
513 +main ()
514 +{
515 +
516 + FILE *f = fopen ("conftest.val", "w");
517 + if (! f)
518 + exit (1);
519 + if (((long) (sizeof (int))) < 0)
520 + {
521 + long i = longval ();
522 + if (i != ((long) (sizeof (int))))
523 + exit (1);
524 + fprintf (f, "%ld\n", i);
525 + }
526 + else
527 + {
528 + unsigned long i = ulongval ();
529 + if (i != ((long) (sizeof (int))))
530 + exit (1);
531 + fprintf (f, "%lu\n", i);
532 + }
533 + exit (ferror (f) || fclose (f) != 0);
534 +
535 + ;
536 + return 0;
537 +}
538 _ACEOF
539 rm -f conftest$ac_exeext
540 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
541 @@ -13850,19 +14177,27 @@
542 ac_status=$?
543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
544 (exit $ac_status); }; }; then
545 - ac_cv_sizeof_int=`cat conftestval`
546 + ac_cv_sizeof_int=`cat conftest.val`
547 else
548 echo "$as_me: program exited with status $ac_status" >&5
549 echo "$as_me: failed program was:" >&5
550 sed 's/^/| /' conftest.$ac_ext >&5
551
552 ( exit $ac_status )
553 -ac_cv_sizeof_int=0
554 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
555 +See \`config.log' for more details." >&5
556 +echo "$as_me: error: cannot compute sizeof (int), 77
557 +See \`config.log' for more details." >&2;}
558 + { (exit 1); exit 1; }; }
559 fi
560 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
561 fi
562 fi
563 -
564 +rm -f conftest.val
565 +else
566 + ac_cv_sizeof_int=0
567 +fi
568 +fi
569 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
570 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
571 cat >>confdefs.h <<_ACEOF
572 @@ -13870,6 +14205,7 @@
573 _ACEOF
574
575
576 +
577 echo "$as_me:$LINENO: checking whether memmove/bcopy/memcpy handle overlaps" >&5
578 echo $ECHO_N "checking whether memmove/bcopy/memcpy handle overlaps... $ECHO_C" >&6
579 bcopy_test_prog='
580 @@ -13888,9 +14224,8 @@
581
582
583 if test "$cross_compiling" = yes; then
584 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
585 -echo "$as_me: error: failed to compile test program" >&2;}
586 - { (exit 1); exit 1; }; }
587 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
588 +echo "$as_me: WARNING: failed to compile test program" >&2;}
589 else
590 cat >conftest.$ac_ext <<_ACEOF
591 /* confdefs.h. */
592 @@ -13923,9 +14258,8 @@
593
594 ( exit $ac_status )
595 if test "$cross_compiling" = yes; then
596 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
597 -echo "$as_me: error: failed to compile test program" >&2;}
598 - { (exit 1); exit 1; }; }
599 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
600 +echo "$as_me: WARNING: failed to compile test program" >&2;}
601 else
602 cat >conftest.$ac_ext <<_ACEOF
603 /* confdefs.h. */
604 @@ -13958,9 +14292,8 @@
605
606 ( exit $ac_status )
607 if test "$cross_compiling" = yes; then
608 - { { echo "$as_me:$LINENO: error: failed to compile test program" >&5
609 -echo "$as_me: error: failed to compile test program" >&2;}
610 - { (exit 1); exit 1; }; }
611 + { echo "$as_me:$LINENO: WARNING: failed to compile test program" >&5
612 +echo "$as_me: WARNING: failed to compile test program" >&2;}
613 else
614 cat >conftest.$ac_ext <<_ACEOF
615 /* confdefs.h. */
616 Index: vim71/src/configure.in
617 ===================================================================
618 --- vim71.orig/src/configure.in 2007-07-01 15:45:56.000000000 +0200
619 +++ vim71/src/configure.in 2007-07-01 15:45:56.000000000 +0200
620 @@ -47,13 +47,6 @@
621 fi
622 fi
623
624 -dnl If configure thinks we are cross compiling, there is probably something
625 -dnl wrong with the CC or CFLAGS settings, give an understandable error message
626 -if test "$cross_compiling" = yes; then
627 - AC_MSG_ERROR([cannot compile a simple program, check CC and CFLAGS
628 - (cross compiling doesn't work)])
629 -fi
630 -
631 dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies.
632 dnl But gcc 3.1 changed the meaning! See near the end.
633 test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM)
634 @@ -183,31 +176,6 @@
635 AC_SUBST(OS_EXTRA_SRC)
636 AC_SUBST(OS_EXTRA_OBJ)
637
638 -dnl Add /usr/local/lib to $LDFLAGS and /usr/local/include to CFLAGS.
639 -dnl Only when the directory exists and it wasn't there yet.
640 -dnl For gcc don't do this when it is already in the default search path.
641 -have_local_include=''
642 -have_local_lib=''
643 -if test "$GCC" = yes; then
644 - echo 'void f(){}' > conftest.c
645 - dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler)
646 - have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
647 - have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
648 - rm -f conftest.c conftest.o
649 -fi
650 -if test -z "$have_local_lib" -a -d /usr/local/lib; then
651 - tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
652 - if test "$tt" = "$LDFLAGS"; then
653 - LDFLAGS="$LDFLAGS -L/usr/local/lib"
654 - fi
655 -fi
656 -if test -z "$have_local_include" -a -d /usr/local/include; then
657 - tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
658 - if test "$tt" = "$CPPFLAGS"; then
659 - CPPFLAGS="$CPPFLAGS -I/usr/local/include"
660 - fi
661 -fi
662 -
663 AC_MSG_CHECKING(--with-vim-name argument)
664 AC_ARG_WITH(vim-name, [ --with-vim-name=NAME what to call the Vim executable],
665 VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME),
666 @@ -1990,7 +1958,7 @@
667 AC_TRY_RUN([#include <ctype.h>
668 main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }],
669 AC_DEFINE(BROKEN_TOUPPER) AC_MSG_RESULT(bad),
670 - AC_MSG_RESULT(good), AC_MSG_ERROR(failed to compile test program))
671 + AC_MSG_RESULT(good), AC_MSG_WARN(failed to compile test program))
672
673 AC_MSG_CHECKING(whether __DATE__ and __TIME__ work)
674 AC_TRY_COMPILE(, [printf("(" __DATE__ " " __TIME__ ")");],
675 @@ -2211,7 +2179,8 @@
676 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }],
677 AC_MSG_RESULT([no -- we are in termcap land]),
678 AC_MSG_RESULT([yes -- terminfo spoken here]); AC_DEFINE(TERMINFO),
679 - AC_MSG_ERROR(failed to compile test program.))
680 + AC_MSG_WARN(failed to compile test program.)
681 + AC_DEFINE(TERMINFO))
682
683 if test "x$olibs" != "x$LIBS"; then
684 AC_MSG_CHECKING(what tgetent() returns for an unknown terminal)
685 @@ -2374,7 +2343,7 @@
686 fi
687 ],
688 AC_MSG_RESULT([can't determine - assume ptys are world accessable]),
689 - AC_MSG_ERROR(failed to compile test program))
690 + AC_MSG_WARN(failed to compile test program))
691 rm -f conftest_grp
692
693 dnl Checks for library functions. ===================================
694 @@ -2417,7 +2386,7 @@
695 AC_MSG_RESULT(it is usable),
696 AC_MSG_RESULT(it stinks)
697 AC_DEFINE(BAD_GETCWD),
698 - AC_MSG_ERROR(failed to compile test program))
699 + AC_MSG_WARN(failed to compile test program))
700
701 dnl Check for functions in one big call, to reduce the size of configure
702 AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
703 @@ -2441,13 +2410,20 @@
704 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE),
705 AC_MSG_RESULT(no))
706
707 -AC_MSG_CHECKING(whether stat() ignores a trailing slash)
708 +AC_CACHE_CHECK([whether stat() ignores a trailing slash],
709 + [ac_cv_func_stat_ignores_trailing_slash],
710 AC_TRY_RUN(
711 [#include <sys/types.h>
712 #include <sys/stat.h>
713 main() {struct stat st; exit(stat("configure/", &st) != 0); }],
714 - AC_MSG_RESULT(yes); AC_DEFINE(STAT_IGNORES_SLASH),
715 - AC_MSG_RESULT(no), AC_MSG_ERROR(failed to compile test program))
716 + ac_cv_func_stat_ignores_trailing_slash=yes,
717 + ac_cv_func_stat_ignores_trailing_slash=no,
718 + ac_cv_func_stat_ignores_trailing_slash=no
719 +))
720 +
721 +if X"$ac_cv_func_stat_ignores_trailing_slash" = Xyes; then
722 + AC_DEFINE(STAT_IGNORES_SLASH)
723 +fi
724
725 dnl Link with iconv for charset translation, if not found without library.
726 dnl check for iconv() requires including iconv.h
727 @@ -2622,24 +2598,7 @@
728 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF),
729 AC_MSG_RESULT(not usable))
730
731 -dnl Our own version of AC_CHECK_SIZEOF(int); fixes a bug when sizeof() can't
732 -dnl be printed with "%d", and avoids a warning for cross-compiling.
733 -
734 -AC_MSG_CHECKING(size of int)
735 -AC_CACHE_VAL(ac_cv_sizeof_int,
736 - [AC_TRY_RUN([#include <stdio.h>
737 - main()
738 - {
739 - FILE *f=fopen("conftestval", "w");
740 - if (!f) exit(1);
741 - fprintf(f, "%d\n", (int)sizeof(int));
742 - exit(0);
743 - }],
744 - ac_cv_sizeof_int=`cat conftestval`,
745 - ac_cv_sizeof_int=0,
746 - AC_MSG_ERROR(failed to compile test program))])
747 -AC_MSG_RESULT($ac_cv_sizeof_int)
748 -AC_DEFINE_UNQUOTED(SIZEOF_INT, $ac_cv_sizeof_int)
749 +AC_CHECK_SIZEOF(int)
750
751 AC_MSG_CHECKING(whether memmove/bcopy/memcpy handle overlaps)
752 [bcopy_test_prog='
753 @@ -2665,9 +2624,9 @@
754 AC_DEFINE(USEBCOPY) AC_MSG_RESULT(bcopy does),
755 AC_TRY_RUN([#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog],
756 AC_DEFINE(USEMEMCPY) AC_MSG_RESULT(memcpy does), AC_MSG_RESULT(no),
757 - AC_MSG_ERROR(failed to compile test program)),
758 - AC_MSG_ERROR(failed to compile test program)),
759 - AC_MSG_ERROR(failed to compile test program))
760 + AC_MSG_WARN(failed to compile test program)),
761 + AC_MSG_WARN(failed to compile test program)),
762 + AC_MSG_WARN(failed to compile test program))
763
764 dnl Check for multibyte locale functions
765 dnl Find out if _Xsetlocale() is supported by libX11.