summaryrefslogtreecommitdiff
path: root/packages/less/less-382/configure.patch
blob: 2f054ba639e207adabd9d4b583b96a8f97288af1 (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

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- less-381/./configure.ac~configure
+++ less-381/./configure.ac
@@ -9,7 +9,7 @@
 # contact the author, see the README file.
 
 # Autoconf initialization.
-AC_INIT(less, 1)
+AC_INIT([less],[1])
 AC_CONFIG_SRCDIR([forwback.c])
 AC_CONFIG_HEADER([defines.h])
 
@@ -56,8 +56,7 @@
     TERMLIBS="-lxcurses"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -69,8 +68,7 @@
     TERMLIBS="-lncurses"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -82,8 +80,7 @@
     TERMLIBS="-lcurses"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -96,8 +93,7 @@
     TERMLIBS="-lcurses -ltermcap"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -111,8 +107,7 @@
     TERMLIBS="-ltermcap"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -124,8 +119,7 @@
     TERMLIBS="-lcurses -ltermlib"
     SAVE_LIBS=$LIBS
     LIBS="$LIBS $TERMLIBS"
-    AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
-      [termok=yes], [termok=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
     LIBS=$SAVE_LIBS
     if test $termok = no; then TERMLIBS=""; fi
   fi
@@ -200,14 +194,11 @@
 # Checks for identifiers.
 AC_TYPE_OFF_T
 AC_MSG_CHECKING(for void)
-AC_TRY_COMPILE(, [void *foo = 0;], 
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void *foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)],[AC_MSG_RESULT(no)])
 AC_MSG_CHECKING(for const)
-AC_TRY_COMPILE(, [const int foo = 0;], 
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const int foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)],[AC_MSG_RESULT(no)])
 AC_MSG_CHECKING(for time_t)
-AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[time_t t = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)],[AC_MSG_RESULT(no)])
 
 # Checks for library functions.
 AC_TYPE_SIGNAL
@@ -217,14 +208,13 @@
 AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
 
 AC_MSG_CHECKING(for fileno)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if HAVE_STDIO_H
 #include <stdio.h>
-#endif], [static int x; x = fileno(stdin);],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)], [AC_MSG_RESULT(no)])
+#endif]], [[static int x; x = fileno(stdin);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)],[AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING(for strerror)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
@@ -233,68 +223,56 @@
 #endif
 #if HAVE_ERRNO_H
 #include <errno.h>
-#endif], [static char *x; x = strerror(0);],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)])
+#endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING(for sys_errlist)
-AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], 
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *sys_errlist[]; static char **x; x = sys_errlist;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)],[AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING(for sigset_t)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <signal.h>
-], [sigset_t s; s = 0;],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)], [AC_MSG_RESULT(no)])
+]], [[sigset_t s; s = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)],[AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING(for sigemptyset)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <signal.h>
-], [sigset_t s; sigemptyset(&s);],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)], [AC_MSG_RESULT(no)])
+]], [[sigset_t s; sigemptyset(&s);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)],[AC_MSG_RESULT(no)])
 
 have_errno=no
 AC_MSG_CHECKING(for errno)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if HAVE_ERRNO_H
 #include <errno.h>
-#endif], [static int x; x = errno;], 
-  [AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes])
+#endif]], [[static int x; x = errno;]])],[AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes],[])
 if test $have_errno = no; then
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if HAVE_ERRNO_H
 #include <errno.h>
-#endif], [extern int errno; static int x; x = errno;], 
-  [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],
-  [AC_MSG_RESULT(no)])
+#endif]], [[extern int errno; static int x; x = errno;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],[AC_MSG_RESULT(no)])
 fi
 
 AC_MSG_CHECKING(for locale)
-AC_TRY_LINK([#include <locale.h>
-#include <ctype.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <locale.h>
+#include <ctype.h>]], [[setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)],[AC_MSG_RESULT(no)])
 AC_MSG_CHECKING(for ctype functions)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if HAVE_CTYPE_H
 #include <ctype.h>
-#endif], [static int x; x = isupper(x); x = tolower(x); x = toupper(x);],
-  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)], [AC_MSG_RESULT(no)])
+#endif]], [[static int x; x = isupper(x); x = tolower(x); x = toupper(x);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)],[AC_MSG_RESULT(no)])
 
 # Checks for external variable ospeed in the termcap library.
 have_ospeed=no
 AC_MSG_CHECKING(termcap for ospeed)
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #if HAVE_TERMIOS_H
 #include <termios.h>
 #endif
 #if HAVE_TERMCAP_H
 #include <termcap.h>
-#endif], [ospeed = 0;],
-[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
+#endif]], [[ospeed = 0;]])],[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes],[])
 if test $have_ospeed = no; then
-AC_TRY_LINK(, [extern short ospeed; ospeed = 0;], 
-  [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
-  [AC_MSG_RESULT(no)])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern short ospeed; ospeed = 0;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],[AC_MSG_RESULT(no)])
 fi
 
 # Checks for regular expression functions.
@@ -311,7 +289,7 @@
 if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
 # Some versions of Solaris have a regcomp() function, but it doesn't work!
 # So we run a test program.  If we're cross-compiling, do it the old way.
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #include <regex.h>
 main() { regex_t r; regmatch_t rm; char *text = "xabcy";
@@ -322,19 +300,16 @@
 #else
 if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
 #endif
-exit(0); }],
-  have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
+exit(0); }]])],[have_posix_regex=yes],[have_posix_regex=no],[have_posix_regex=unknown])
 if test $have_posix_regex = yes; then
   AC_MSG_RESULT(using POSIX regcomp)
   AC_DEFINE(HAVE_POSIX_REGCOMP)
   have_regex=yes
 elif test $have_posix_regex = unknown; then
-  AC_TRY_LINK([
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
-#include <regex.h>],
-  [regex_t *r; regfree(r);],
-  AC_MSG_RESULT(using POSIX regcomp)
-  AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
+#include <regex.h>]], [[regex_t *r; regfree(r);]])],[AC_MSG_RESULT(using POSIX regcomp)
+  AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes],[])
 else
   AC_MSG_RESULT(no)
 fi
@@ -357,9 +332,8 @@
 
 if test $have_regex = no; then
 if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
-AC_TRY_LINK([
-#include "regexp.h"], [regcomp("");],
-AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include "regexp.h"]], [[regcomp("");]])],[AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes],[])
 fi
 fi