summaryrefslogtreecommitdiff
path: root/openwrt/package/vim/patches/vim_configure.patch
blob: c8ae5c8f284795b8fb6b8e4c3297225164e81e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
This patch is required to stop vim's configure script from insisting on
compiling test programs which obviously do not work in a cross compiled
environment.  

--- vim-5.8_original/src/configure	2001-05-11 04:59:18.000000000 +1000
+++ vim-5.8/src/configure	2006-03-24 01:04:55.000000000 +1100
@@ -995,10 +995,6 @@
 
 test "$GCC" = yes && CFLAGS="$CFLAGS -Wall"
 
-if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot compile a simple program, check CC and CFLAGS" 1>&2; exit 1; }
-fi
-
 test "$GCC" = yes && CPP_MM=M; 
 
 if test -f ./toolcheck; then
@@ -3365,29 +3361,7 @@
 
 echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
 echo "configure:3368: checking quality of toupper" >&5
-if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3373 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
-EOF
-if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define BROKEN_TOUPPER 1
-EOF
- echo "$ac_t""bad" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""good" 1>&6
-fi
-rm -fr conftest*
-fi
+echo "$ac_t""good" 1>&6
 
 
 echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
@@ -4340,34 +4314,10 @@
 if test "x$olibs" != "x$LIBS"; then
   echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
 echo "configure:4343: checking whether we talk terminfo" >&5
-  if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4348 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_TERMCAP_H
-# include <termcap.h>
-#endif
-main()
-{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
-EOF
-if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  echo "$ac_t""no -- we are in termcap land" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
+echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
 #define TERMINFO 1
 EOF
 
-fi
-rm -fr conftest*
-fi
-
 else
   echo "$ac_t""none found" 1>&6
 fi
@@ -4600,70 +4550,14 @@
 
 echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
 echo "configure:4603: checking for struct sigcontext" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4605 "configure"
-#include "confdefs.h"
 
-#include <signal.h>
-test_sig()
-{
-    struct sigcontext *scont;
-    scont = (struct sigcontext *)0;
-    return 1;
-} 
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		cat >> confdefs.h <<\EOF
+cat >> confdefs.h <<\EOF
 #define HAVE_SIGCONTEXT 1
 EOF
 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-
 echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
 echo "configure:4635: checking getcwd implementation" >&5
-if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4640 "configure"
-#include "confdefs.h"
-
-char *dagger[] = { "IFS=pwd", 0 };
-main()
-{
-  char buffer[500];
-  extern char **environ;
-  environ = dagger;
-  return getcwd(buffer, 500) ? 0 : 1;
-}
-EOF
-if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  echo "$ac_t""it is usable" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""it stinks" 1>&6
-		cat >> confdefs.h <<\EOF
-#define BAD_GETCWD 1
-EOF
-
-fi
-rm -fr conftest*
-fi
-
+echo "$ac_t""it is usable" 1>&6
 
 for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpwnam getpwuid \
 	gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort \
@@ -4872,89 +4766,11 @@
 
 echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
 echo "configure:4875: checking whether memmove/bcopy/memcpy handle overlaps" >&5
-bcopy_test_prog='
-main() {
-  char buf[10];
-  strcpy(buf, "abcdefghi");
-  mch_memmove(buf, buf + 2, 3);
-  if (strncmp(buf, "ababcf", 6))
-    exit(1);
-  strcpy(buf, "abcdefghi");
-  mch_memmove(buf + 2, buf, 3);
-  if (strncmp(buf, "cdedef", 6))
-    exit(1);
-  exit(0); /* libc version works properly.  */
-}'
-
-
-if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4895 "configure"
-#include "confdefs.h"
-#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
-EOF
-if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
+cat >> confdefs.h <<\EOF
 #define USEMEMMOVE 1
-EOF
- echo "$ac_t""memmove does" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4913 "configure"
-#include "confdefs.h"
-#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
-EOF
-if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
 #define USEBCOPY 1
-EOF
- echo "$ac_t""bcopy does" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  if test "$cross_compiling" = yes; then
-  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4931 "configure"
-#include "confdefs.h"
-#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
-EOF
-if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
 #define USEMEMCPY 1
 EOF
- echo "$ac_t""memcpy does" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -fr conftest*
-fi
-
-
 
 if test "$enable_multibyte" = "yes"; then
   cflags_save=$CFLAGS