1 This patch is required to stop vim's configure script from insisting on
2 compiling test programs which obviously do not work in a cross compiled
5 --- vim-5.8_original/src/configure 2001-05-11 04:59:18.000000000 +1000
6 +++ vim-5.8/src/configure 2006-03-24 01:04:55.000000000 +1100
9 test "$GCC" = yes && CFLAGS="$CFLAGS -Wall"
11 -if test "$cross_compiling" = yes; then
12 - { echo "configure: error: cannot compile a simple program, check CC and CFLAGS" 1>&2; exit 1; }
15 test "$GCC" = yes && CPP_MM=M;
17 if test -f ./toolcheck; then
18 @@ -3365,29 +3361,7 @@
20 echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
21 echo "configure:3368: checking quality of toupper" >&5
22 -if test "$cross_compiling" = yes; then
23 - { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
25 - cat > conftest.$ac_ext <<EOF
26 -#line 3373 "configure"
27 -#include "confdefs.h"
29 -main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
31 -if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
33 - cat >> confdefs.h <<\EOF
34 -#define BROKEN_TOUPPER 1
36 - echo "$ac_t""bad" 1>&6
38 - echo "configure: failed program was:" >&5
39 - cat conftest.$ac_ext >&5
41 - echo "$ac_t""good" 1>&6
45 +echo "$ac_t""good" 1>&6
48 echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
49 @@ -4340,34 +4314,10 @@
50 if test "x$olibs" != "x$LIBS"; then
51 echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
52 echo "configure:4343: checking whether we talk terminfo" >&5
53 - if test "$cross_compiling" = yes; then
54 - { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
56 - cat > conftest.$ac_ext <<EOF
57 -#line 4348 "configure"
58 -#include "confdefs.h"
60 -#ifdef HAVE_TERMCAP_H
61 -# include <termcap.h>
64 -{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
66 -if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
68 - echo "$ac_t""no -- we are in termcap land" 1>&6
70 - echo "configure: failed program was:" >&5
71 - cat conftest.$ac_ext >&5
73 - echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
74 +echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
83 echo "$ac_t""none found" 1>&6
85 @@ -4600,70 +4550,14 @@
87 echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
88 echo "configure:4603: checking for struct sigcontext" >&5
89 -cat > conftest.$ac_ext <<EOF
90 -#line 4605 "configure"
91 -#include "confdefs.h"
96 - struct sigcontext *scont;
97 - scont = (struct sigcontext *)0;
104 -if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
106 - echo "$ac_t""yes" 1>&6
107 - cat >> confdefs.h <<\EOF
108 +cat >> confdefs.h <<\EOF
109 #define HAVE_SIGCONTEXT 1
113 - echo "configure: failed program was:" >&5
114 - cat conftest.$ac_ext >&5
116 - echo "$ac_t""no" 1>&6
120 echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
121 echo "configure:4635: checking getcwd implementation" >&5
122 -if test "$cross_compiling" = yes; then
123 - { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
125 - cat > conftest.$ac_ext <<EOF
126 -#line 4640 "configure"
127 -#include "confdefs.h"
129 -char *dagger[] = { "IFS=pwd", 0 };
133 - extern char **environ;
135 - return getcwd(buffer, 500) ? 0 : 1;
138 -if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
140 - echo "$ac_t""it is usable" 1>&6
142 - echo "configure: failed program was:" >&5
143 - cat conftest.$ac_ext >&5
145 - echo "$ac_t""it stinks" 1>&6
146 - cat >> confdefs.h <<\EOF
147 -#define BAD_GETCWD 1
154 +echo "$ac_t""it is usable" 1>&6
156 for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpwnam getpwuid \
157 gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort \
158 @@ -4872,89 +4766,11 @@
160 echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
161 echo "configure:4875: checking whether memmove/bcopy/memcpy handle overlaps" >&5
165 - strcpy(buf, "abcdefghi");
166 - mch_memmove(buf, buf + 2, 3);
167 - if (strncmp(buf, "ababcf", 6))
169 - strcpy(buf, "abcdefghi");
170 - mch_memmove(buf + 2, buf, 3);
171 - if (strncmp(buf, "cdedef", 6))
173 - exit(0); /* libc version works properly. */
177 -if test "$cross_compiling" = yes; then
178 - { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
180 - cat > conftest.$ac_ext <<EOF
181 -#line 4895 "configure"
182 -#include "confdefs.h"
183 -#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
185 -if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
187 - cat >> confdefs.h <<\EOF
188 +cat >> confdefs.h <<\EOF
191 - echo "$ac_t""memmove does" 1>&6
193 - echo "configure: failed program was:" >&5
194 - cat conftest.$ac_ext >&5
196 - if test "$cross_compiling" = yes; then
197 - { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
199 - cat > conftest.$ac_ext <<EOF
200 -#line 4913 "configure"
201 -#include "confdefs.h"
202 -#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
204 -if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
206 - cat >> confdefs.h <<\EOF
209 - echo "$ac_t""bcopy does" 1>&6
211 - echo "configure: failed program was:" >&5
212 - cat conftest.$ac_ext >&5
214 - if test "$cross_compiling" = yes; then
215 - { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
217 - cat > conftest.$ac_ext <<EOF
218 -#line 4931 "configure"
219 -#include "confdefs.h"
220 -#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
222 -if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
224 - cat >> confdefs.h <<\EOF
227 - echo "$ac_t""memcpy does" 1>&6
229 - echo "configure: failed program was:" >&5
230 - cat conftest.$ac_ext >&5
232 - echo "$ac_t""no" 1>&6
247 if test "$enable_multibyte" = "yes"; then