summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/python/python-2.4.3/autohell.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-extras/packages/python/python-2.4.3/autohell.patch')
-rw-r--r--meta-extras/packages/python/python-2.4.3/autohell.patch1209
1 files changed, 1209 insertions, 0 deletions
diff --git a/meta-extras/packages/python/python-2.4.3/autohell.patch b/meta-extras/packages/python/python-2.4.3/autohell.patch
new file mode 100644
index 0000000000..b0eebb9ce8
--- /dev/null
+++ b/meta-extras/packages/python/python-2.4.3/autohell.patch
@@ -0,0 +1,1209 @@
1--- Python-2.3.3/acinclude.m4 1969-12-31 19:00:00.000000000 -0500
2+++ Python-2.3.3/acinclude.m4 2004-02-17 12:22:29.000000000 -0500
3@@ -0,0 +1,10 @@
4+dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore
5+dnl If this macro is not defined by Autoconf, define it here.
6+
7+m4_ifdef([AC_PROG_CXX_WORKS],
8+ [],
9+ [m4_define([AC_PROG_CXX_WORKS],
10+ [AC_LANG_PUSH(C++)dnl
11+ _AC_COMPILER_EXEEXT
12+ AC_LANG_POP()]
13+ )])
14--- Python-2.3.3/configure.in 2003-11-18 14:59:39.000000000 -0500
15+++ Python-2.3.3/configure.in 2004-02-17 12:22:27.000000000 -0500
16@@ -4,8 +4,8 @@
17 m4_define(PYTHON_VERSION, 2.3)
18
19 AC_REVISION($Revision: 1.427.4.10 $)
20-AC_PREREQ(2.53)
21-AC_INIT(python, PYTHON_VERSION)
22+AC_PREREQ(2.59)
23+AC_INIT([python],[PYTHON_VERSION])
24 AC_CONFIG_SRCDIR([Include/object.h])
25 AC_CONFIG_HEADER(pyconfig.h)
26
27@@ -58,7 +58,7 @@
28
29 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
30 AC_ARG_ENABLE(framework,
31- AC_HELP_STRING(--enable-framework@<:@=INSTALLDIR@:>@, Build (MacOSX|Darwin) framework),
32+ AS_HELP_STRING(--enable-framework@<:@=INSTALLDIR@:>@,Build (MacOSX|Darwin) framework),
33 [
34 case $enableval in
35 yes)
36@@ -92,8 +92,7 @@
37 AC_SUBST(PYTHONFRAMEWORKINSTALLDIR)
38
39 ##AC_ARG_WITH(dyld,
40-## AC_HELP_STRING(--with-dyld,
41-## Use (OpenStep|Rhapsody) dynamic linker))
42+## AS_HELP_STRING(--with-dyld,## Use (OpenStep|Rhapsody) dynamic linker))
43 ##
44 # Set name for machine-dependent library files
45 AC_SUBST(MACHDEP)
46@@ -227,7 +226,7 @@
47 # on that fiddles with OPT and BASECFLAGS?
48 AC_MSG_CHECKING(for --without-gcc)
49 AC_ARG_WITH(gcc,
50- AC_HELP_STRING(--without-gcc,never use gcc),
51+ AS_HELP_STRING(--without-gcc,never use gcc),
52 [
53 case $withval in
54 no) CC=cc
55@@ -273,7 +272,7 @@
56 MAINOBJ=python.o
57 AC_MSG_CHECKING(for --with-cxx=<compiler>)
58 AC_ARG_WITH(cxx,
59- AC_HELP_STRING(--with-cxx=<compiler>, enable C++ support),
60+ AS_HELP_STRING(--with-cxx=<compiler>,enable C++ support),
61 [
62 check_cxx=no
63 case $withval in
64@@ -298,15 +297,6 @@
65 dnl --without-cxx was given.
66 dnl Finally, it does not test whether CXX is g++.
67
68-dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore
69-ifdef([AC_PROG_CXX_WORKS],[],
70- [AC_DEFUN([AC_PROG_CXX_WORKS],
71- [AC_LANG_PUSH(C++)dnl
72- _AC_COMPILER_EXEEXT
73- AC_LANG_POP()
74- ]
75-)])
76-
77 if test "$check_cxx" = "yes"
78 then
79 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
80@@ -348,7 +338,7 @@
81 AC_EXEEXT
82 AC_MSG_CHECKING(for --with-suffix)
83 AC_ARG_WITH(suffix,
84- AC_HELP_STRING(--with-suffix=.exe, set executable suffix),
85+ AS_HELP_STRING(--with-suffix=.exe,set executable suffix),
86 [
87 case $withval in
88 no) EXEEXT=;;
89@@ -474,7 +464,7 @@
90
91 AC_MSG_CHECKING(for --enable-shared)
92 AC_ARG_ENABLE(shared,
93- AC_HELP_STRING(--enable-shared, disable/enable building shared python library))
94+ AS_HELP_STRING(--enable-shared,disable/enable building shared python library))
95
96 if test -z "$enable_shared"
97 then
98@@ -583,7 +573,7 @@
99 # Check for --with-pydebug
100 AC_MSG_CHECKING(for --with-pydebug)
101 AC_ARG_WITH(pydebug,
102- AC_HELP_STRING(--with-pydebug, build with Py_DEBUG defined),
103+ AS_HELP_STRING(--with-pydebug,build with Py_DEBUG defined),
104 [
105 if test "$withval" != no
106 then
107@@ -660,10 +650,7 @@
108 AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
109 ac_save_cc="$CC"
110 CC="$CC -fno-strict-aliasing"
111- AC_TRY_RUN([int main() { return 0; }],
112- ac_cv_no_strict_aliasing_ok=yes,
113- ac_cv_no_strict_aliasing_ok=no,
114- ac_cv_no_strict_aliasing_ok=no)
115+ AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_no_strict_aliasing_ok=yes],[ac_cv_no_strict_aliasing_ok=no],[ac_cv_no_strict_aliasing_ok=no])
116 CC="$ac_save_cc"
117 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
118 if test $ac_cv_no_strict_aliasing_ok = yes
119@@ -711,10 +698,7 @@
120 AC_CACHE_VAL(ac_cv_opt_olimit_ok,
121 [ac_save_cc="$CC"
122 CC="$CC -OPT:Olimit=0"
123-AC_TRY_RUN([int main() { return 0; }],
124- ac_cv_opt_olimit_ok=yes,
125- ac_cv_opt_olimit_ok=no,
126- ac_cv_opt_olimit_ok=no)
127+AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_opt_olimit_ok=yes],[ac_cv_opt_olimit_ok=no],[ac_cv_opt_olimit_ok=no])
128 CC="$ac_save_cc"])
129 AC_MSG_RESULT($ac_cv_opt_olimit_ok)
130 if test $ac_cv_opt_olimit_ok = yes; then
131@@ -733,10 +717,7 @@
132 AC_CACHE_VAL(ac_cv_olimit_ok,
133 [ac_save_cc="$CC"
134 CC="$CC -Olimit 1500"
135- AC_TRY_RUN([int main() { return 0; }],
136- ac_cv_olimit_ok=yes,
137- ac_cv_olimit_ok=no,
138- ac_cv_olimit_ok=no)
139+ AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_olimit_ok=yes],[ac_cv_olimit_ok=no],[ac_cv_olimit_ok=no])
140 CC="$ac_save_cc"])
141 AC_MSG_RESULT($ac_cv_olimit_ok)
142 if test $ac_cv_olimit_ok = yes; then
143@@ -751,7 +732,7 @@
144 # options before we can check whether -Kpthread improves anything.
145 AC_MSG_CHECKING(whether pthreads are available without options)
146 AC_CACHE_VAL(ac_cv_pthread_is_default,
147-[AC_TRY_RUN([
148+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
149 #include <pthread.h>
150
151 void* routine(void* p){return NULL;}
152@@ -763,14 +744,11 @@
153 (void)pthread_detach(p);
154 return 0;
155 }
156-],
157-[
158+]])],[
159 ac_cv_pthread_is_default=yes
160 ac_cv_kthread=no
161 ac_cv_pthread=no
162-],
163- ac_cv_pthread_is_default=no,
164- ac_cv_pthread_is_default=no)
165+],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
166 ])
167 AC_MSG_RESULT($ac_cv_pthread_is_default)
168
169@@ -788,7 +766,7 @@
170 AC_CACHE_VAL(ac_cv_kpthread,
171 [ac_save_cc="$CC"
172 CC="$CC -Kpthread"
173-AC_TRY_RUN([
174+AC_RUN_IFELSE([AC_LANG_SOURCE([[
175 #include <pthread.h>
176
177 void* routine(void* p){return NULL;}
178@@ -800,10 +778,7 @@
179 (void)pthread_detach(p);
180 return 0;
181 }
182-],
183- ac_cv_kpthread=yes,
184- ac_cv_kpthread=no,
185- ac_cv_kpthread=no)
186+]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
187 CC="$ac_save_cc"])
188 AC_MSG_RESULT($ac_cv_kpthread)
189 fi
190@@ -819,7 +794,7 @@
191 AC_CACHE_VAL(ac_cv_kthread,
192 [ac_save_cc="$CC"
193 CC="$CC -Kthread"
194-AC_TRY_RUN([
195+AC_RUN_IFELSE([AC_LANG_SOURCE([[
196 #include <pthread.h>
197
198 void* routine(void* p){return NULL;}
199@@ -831,10 +806,7 @@
200 (void)pthread_detach(p);
201 return 0;
202 }
203-],
204- ac_cv_kthread=yes,
205- ac_cv_kthread=no,
206- ac_cv_kthread=no)
207+]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
208 CC="$ac_save_cc"])
209 AC_MSG_RESULT($ac_cv_kthread)
210 fi
211@@ -850,7 +822,7 @@
212 AC_CACHE_VAL(ac_cv_thread,
213 [ac_save_cc="$CC"
214 CC="$CC -pthread"
215-AC_TRY_RUN([
216+AC_RUN_IFELSE([AC_LANG_SOURCE([[
217 #include <pthread.h>
218
219 void* routine(void* p){return NULL;}
220@@ -862,10 +834,7 @@
221 (void)pthread_detach(p);
222 return 0;
223 }
224-],
225- ac_cv_pthread=yes,
226- ac_cv_pthread=no,
227- ac_cv_pthread=no)
228+]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
229 CC="$ac_save_cc"])
230 AC_MSG_RESULT($ac_cv_pthread)
231 fi
232@@ -911,11 +880,11 @@
233
234 dnl # check for ANSI or K&R ("traditional") preprocessor
235 dnl AC_MSG_CHECKING(for C preprocessor type)
236-dnl AC_TRY_COMPILE([
237+dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
238 dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
239 dnl int foo;
240 dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
241-dnl ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional)
242+dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional])
243 dnl AC_MSG_RESULT($cpp_type)
244
245 # checks for header files
246@@ -941,19 +910,13 @@
247
248 # Check whether using makedev requires defining _OSF_SOURCE
249 AC_MSG_CHECKING(for makedev)
250-AC_TRY_LINK([#include <sys/types.h> ],
251- [ makedev(0, 0) ],
252- ac_cv_has_makedev=yes,
253- ac_cv_has_makedev=no)
254+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> ]], [[ makedev(0, 0) ]])],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
255 if test "$ac_cv_has_makedev" = "no"; then
256 # we didn't link, try if _OSF_SOURCE will allow us to link
257- AC_TRY_LINK([
258+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
259 #define _OSF_SOURCE 1
260 #include <sys/types.h>
261- ],
262- [ makedev(0, 0) ],
263- ac_cv_has_makedev=yes,
264- ac_cv_has_makedev=no)
265+ ]], [[ makedev(0, 0) ]])],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
266 if test "$ac_cv_has_makedev" = "yes"; then
267 AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
268 fi
269@@ -972,11 +935,11 @@
270
271 use_lfs=yes
272 AC_MSG_CHECKING(Solaris LFS bug)
273-AC_TRY_COMPILE([
274+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
275 #define _LARGEFILE_SOURCE 1
276 #define _FILE_OFFSET_BITS 64
277 #include <sys/resource.h>
278-],struct rlimit foo;,sol_lfs_bug=no,sol_lfs_bug=yes)
279+]], [[struct rlimit foo;]])],[sol_lfs_bug=no],[sol_lfs_bug=yes])
280 AC_MSG_RESULT($sol_lfs_bug)
281 if test "$sol_lfs_bug" = "yes"; then
282 use_lfs=no
283@@ -1018,10 +981,10 @@
284
285 AC_MSG_CHECKING(for long long support)
286 have_long_long=no
287-AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
288+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
289 AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
290 have_long_long=yes
291-])
292+],[])
293 AC_MSG_RESULT($have_long_long)
294 if test "$have_long_long" = yes ; then
295 AC_CHECK_SIZEOF(long long, 8)
296@@ -1029,10 +992,10 @@
297
298 AC_MSG_CHECKING(for uintptr_t support)
299 have_uintptr_t=no
300-AC_TRY_COMPILE([], [uintptr_t x; x = (uintptr_t)0;], [
301+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[uintptr_t x; x = (uintptr_t)0;]])],[
302 AC_DEFINE(HAVE_UINTPTR_T, 1, [Define this if you have the type uintptr_t.])
303 have_uintptr_t=yes
304-])
305+],[])
306 AC_MSG_RESULT($have_uintptr_t)
307 if test "$have_uintptr_t" = yes ; then
308 AC_CHECK_SIZEOF(uintptr_t, 4)
309@@ -1041,7 +1004,7 @@
310 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
311 AC_MSG_CHECKING(size of off_t)
312 AC_CACHE_VAL(ac_cv_sizeof_off_t,
313-[AC_TRY_RUN([#include <stdio.h>
314+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
315 #include <sys/types.h>
316 main()
317 {
318@@ -1049,10 +1012,7 @@
319 if (!f) exit(1);
320 fprintf(f, "%d\n", sizeof(off_t));
321 exit(0);
322-}],
323-ac_cv_sizeof_off_t=`cat conftestval`,
324-ac_cv_sizeof_off_t=0,
325-ac_cv_sizeof_off_t=4)
326+}]])],[ac_cv_sizeof_off_t=`cat conftestval`],[ac_cv_sizeof_off_t=0],[ac_cv_sizeof_off_t=4])
327 ])
328 AC_MSG_RESULT($ac_cv_sizeof_off_t)
329 AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
330@@ -1075,7 +1035,7 @@
331 # AC_CHECK_SIZEOF() doesn't include <time.h>.
332 AC_MSG_CHECKING(size of time_t)
333 AC_CACHE_VAL(ac_cv_sizeof_time_t,
334-[AC_TRY_RUN([#include <stdio.h>
335+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
336 #include <time.h>
337 main()
338 {
339@@ -1083,10 +1043,7 @@
340 if (!f) exit(1);
341 fprintf(f, "%d\n", sizeof(time_t));
342 exit(0);
343-}],
344-ac_cv_sizeof_time_t=`cat conftestval`,
345-ac_cv_sizeof_time_t=0,
346-ac_cv_sizeof_time_t=4)
347+}]])],[ac_cv_sizeof_time_t=`cat conftestval`],[ac_cv_sizeof_time_t=0],[ac_cv_sizeof_time_t=4])
348 ])
349 AC_MSG_RESULT($ac_cv_sizeof_time_t)
350 AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t,
351@@ -1104,13 +1061,13 @@
352 fi
353 AC_MSG_CHECKING(for pthread_t)
354 have_pthread_t=no
355-AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
356+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t x; x = *(pthread_t*)0;]])],[have_pthread_t=yes],[])
357 AC_MSG_RESULT($have_pthread_t)
358 if test "$have_pthread_t" = yes ; then
359 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
360 AC_MSG_CHECKING(size of pthread_t)
361 AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
362- [AC_TRY_RUN([#include <stdio.h>
363+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
364 #include <pthread.h>
365 main()
366 {
367@@ -1118,10 +1075,7 @@
368 if (!f) exit(1);
369 fprintf(f, "%d\n", sizeof(pthread_t));
370 exit(0);
371- }],
372- ac_cv_sizeof_pthread_t=`cat conftestval`,
373- ac_cv_sizeof_pthread_t=0,
374- ac_cv_sizeof_pthread_t=4)
375+ }]])],[ac_cv_sizeof_pthread_t=`cat conftestval`],[ac_cv_sizeof_pthread_t=0],[ac_cv_sizeof_pthread_t=4])
376 ])
377 AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
378 AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
379@@ -1131,7 +1085,7 @@
380
381 AC_MSG_CHECKING(for --enable-toolbox-glue)
382 AC_ARG_ENABLE(toolbox-glue,
383- AC_HELP_STRING(--enable-toolbox-glue, disable/enable MacOSX glue code for extensions))
384+ AS_HELP_STRING(--enable-toolbox-glue,disable/enable MacOSX glue code for extensions))
385
386 if test -z "$enable_toolbox_glue"
387 then
388@@ -1436,13 +1390,10 @@
389 # checks for system dependent C++ extensions support
390 case "$ac_sys_system" in
391 AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
392- AC_TRY_LINK([#include "/usr/lpp/xlC/include/load.h"],
393- [loadAndInit("", 0, "")],
394- [AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
395+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "/usr/lpp/xlC/include/load.h"]], [[loadAndInit("", 0, "")]])],[AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
396 [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
397 and you want support for AIX C++ shared extension modules.])
398- AC_MSG_RESULT(yes)],
399- [AC_MSG_RESULT(no)]);;
400+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]);;
401 *) ;;
402 esac
403
404@@ -1464,7 +1415,7 @@
405
406 AC_MSG_CHECKING(for --with-libs)
407 AC_ARG_WITH(libs,
408- AC_HELP_STRING(--with-libs='lib1 ...', link against additional libs),
409+ AS_HELP_STRING(--with-libs='lib1 ...',link against additional libs),
410 [
411 AC_MSG_RESULT($withval)
412 LIBS="$withval $LIBS"
413@@ -1476,7 +1427,7 @@
414 AC_SUBST(SIGNAL_OBJS)
415 AC_MSG_CHECKING(for --with-signal-module)
416 AC_ARG_WITH(signal-module,
417- AC_HELP_STRING(--with-signal-module, disable/enable signal module))
418+ AS_HELP_STRING(--with-signal-module,disable/enable signal module))
419
420 if test -z "$with_signal_module"
421 then with_signal_module="yes"
422@@ -1498,7 +1449,7 @@
423 AC_MSG_CHECKING(for --with-dec-threads)
424 AC_SUBST(LDLAST)
425 AC_ARG_WITH(dec-threads,
426- AC_HELP_STRING(--with-dec-threads, use DEC Alpha/OSF1 thread-safe libraries),
427+ AS_HELP_STRING(--with-dec-threads,use DEC Alpha/OSF1 thread-safe libraries),
428 [
429 AC_MSG_RESULT($withval)
430 LDLAST=-threads
431@@ -1518,12 +1469,12 @@
432 AC_MSG_CHECKING(for --with-threads)
433 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
434 AC_ARG_WITH(threads,
435- AC_HELP_STRING(--with(out)-threads@<:@=DIRECTORY@:>@, disable/enable thread support))
436+ AS_HELP_STRING(--with(out)-threads@<:@=DIRECTORY@:>@,disable/enable thread support))
437
438 # --with-thread is deprecated, but check for it anyway
439 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
440 AC_ARG_WITH(thread,
441- AC_HELP_STRING(--with(out)-thread@<:@=DIRECTORY@:>@, deprecated; use --with(out)-threads),
442+ AS_HELP_STRING(--with(out)-thread@<:@=DIRECTORY@:>@,deprecated; use --with(out)-threads),
443 [with_threads=$with_thread])
444
445 if test -z "$with_threads"
446@@ -1603,7 +1554,7 @@
447 THREADOBJ="Python/thread.o"],[
448 AC_MSG_CHECKING(for --with-pth)
449 AC_ARG_WITH([pth],
450- AC_HELP_STRING(--with-pth, use GNU pth threading libraries),
451+ AS_HELP_STRING(--with-pth,use GNU pth threading libraries),
452 [AC_MSG_RESULT($withval)
453 AC_DEFINE([WITH_THREAD])
454 AC_DEFINE([HAVE_PTH], 1,
455@@ -1618,10 +1569,10 @@
456 _libs=$LIBS
457 LIBS="$LIBS -lpthread"
458 AC_MSG_CHECKING([for pthread_create in -lpthread])
459- AC_TRY_LINK([#include <pthread.h>
460+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>
461
462-void * start_routine (void *arg) { exit (0); }], [
463-pthread_create (NULL, NULL, start_routine, NULL)], [
464+void * start_routine (void *arg) { exit (0); }]], [[
465+pthread_create (NULL, NULL, start_routine, NULL)]])],[
466 AC_MSG_RESULT(yes)
467 AC_DEFINE(WITH_THREAD)
468 posix_threads=yes
469@@ -1705,7 +1656,7 @@
470
471 AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
472 AC_CACHE_VAL(ac_cv_pthread_system_supported,
473- [AC_TRY_RUN([#include <pthread.h>
474+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h>
475 void *foo(void *parm) {
476 return NULL;
477 }
478@@ -1716,10 +1667,7 @@
479 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
480 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
481 exit(0);
482- }],
483- ac_cv_pthread_system_supported=yes,
484- ac_cv_pthread_system_supported=no,
485- ac_cv_pthread_system_supported=no)
486+ }]])],[ac_cv_pthread_system_supported=yes],[ac_cv_pthread_system_supported=no],[ac_cv_pthread_system_supported=no])
487 ])
488 AC_MSG_RESULT($ac_cv_pthread_system_supported)
489 if test "$ac_cv_pthread_system_supported" = "yes"; then
490@@ -1754,7 +1702,7 @@
491
492 [
493 dnl the check does not work on cross compilation case...
494- AC_TRY_RUN([ /* AF_INET6 available check */
495+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */
496 #include <sys/types.h>
497 #include <sys/socket.h>
498 main()
499@@ -1764,25 +1712,19 @@
500 else
501 exit(0);
502 }
503-],
504- AC_MSG_RESULT(yes)
505- ipv6=yes,
506- AC_MSG_RESULT(no)
507- ipv6=no,
508- AC_MSG_RESULT(no)
509+]])],[AC_MSG_RESULT(yes)
510+ ipv6=yes],[AC_MSG_RESULT(no)
511+ ipv6=no],[AC_MSG_RESULT(no)
512 ipv6=no
513-)
514+])
515
516 if test "$ipv6" = "yes"; then
517 AC_MSG_CHECKING(if RFC2553 API is available)
518- AC_TRY_COMPILE([#include <sys/types.h>
519-#include <netinet/in.h>],
520- [struct sockaddr_in6 x;
521-x.sin6_scope_id;],
522- AC_MSG_RESULT(yes)
523- ipv6=yes,
524- AC_MSG_RESULT(no, IPv6 disabled)
525- ipv6=no)
526+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
527+#include <netinet/in.h>]], [[struct sockaddr_in6 x;
528+x.sin6_scope_id;]])],[AC_MSG_RESULT(yes)
529+ ipv6=yes],[AC_MSG_RESULT(no, IPv6 disabled)
530+ ipv6=no])
531 fi
532
533 if test "$ipv6" = "yes"; then
534@@ -1905,7 +1847,7 @@
535 # Check for universal newline support
536 AC_MSG_CHECKING(for --with-universal-newlines)
537 AC_ARG_WITH(universal-newlines,
538- AC_HELP_STRING(--with(out)-universal-newlines, disable/enable foreign newlines))
539+ AS_HELP_STRING(--with(out)-universal-newlines,disable/enable foreign newlines))
540
541 if test -z "$with_universal_newlines"
542 then with_universal_newlines="yes"
543@@ -1923,7 +1865,7 @@
544 # Check for --with-doc-strings
545 AC_MSG_CHECKING(for --with-doc-strings)
546 AC_ARG_WITH(doc-strings,
547- AC_HELP_STRING(--with(out)-doc-strings, disable/enable documentation strings))
548+ AS_HELP_STRING(--with(out)-doc-strings,disable/enable documentation strings))
549
550 if test -z "$with_doc_strings"
551 then with_doc_strings="yes"
552@@ -1938,7 +1880,7 @@
553 # Check for Python-specific malloc support
554 AC_MSG_CHECKING(for --with-pymalloc)
555 AC_ARG_WITH(pymalloc,
556- AC_HELP_STRING(--with(out)-pymalloc, disable/enable specialized mallocs))
557+ AS_HELP_STRING(--with(out)-pymalloc,disable/enable specialized mallocs))
558
559 if test -z "$with_pymalloc"
560 then with_pymalloc="yes"
561@@ -1953,7 +1895,7 @@
562 # Check for --with-wctype-functions
563 AC_MSG_CHECKING(for --with-wctype-functions)
564 AC_ARG_WITH(wctype-functions,
565- AC_HELP_STRING(--with-wctype-functions, use wctype.h functions),
566+ AS_HELP_STRING(--with-wctype-functions,use wctype.h functions),
567 [
568 if test "$withval" != no
569 then
570@@ -1971,7 +1913,7 @@
571
572 AC_MSG_CHECKING(for --with-sgi-dl)
573 AC_ARG_WITH(sgi-dl,
574- AC_HELP_STRING(--with-sgi-dl=DIRECTORY, IRIX 4 dynamic linking),
575+ AS_HELP_STRING(--with-sgi-dl=DIRECTORY,IRIX 4 dynamic linking),
576 [
577 AC_MSG_RESULT($withval)
578 echo --with-sgi-dl is unsupported, see README
579@@ -1993,7 +1935,7 @@
580
581 AC_MSG_CHECKING(for --with-dl-dld)
582 AC_ARG_WITH(dl-dld,
583- AC_HELP_STRING(--with-dl-dld=DL_DIR, GNU dynamic linking),
584+ AS_HELP_STRING(--with-dl-dld=DL_DIR,GNU dynamic linking),
585 [
586 AC_MSG_RESULT($withval)
587 echo --with-dl-dld is unsupported, see README
588@@ -2085,41 +2027,29 @@
589 # For some functions, having a definition is not sufficient, since
590 # we want to take their address.
591 AC_MSG_CHECKING(for chroot)
592-AC_TRY_COMPILE([#include <unistd.h>], void *x=chroot,
593- AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
594- AC_MSG_RESULT(yes),
595- AC_MSG_RESULT(no)
596-)
597+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])],[AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
598+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
599+])
600 AC_MSG_CHECKING(for link)
601-AC_TRY_COMPILE([#include <unistd.h>], void *x=link,
602- AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
603- AC_MSG_RESULT(yes),
604- AC_MSG_RESULT(no)
605-)
606+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=link]])],[AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
607+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
608+])
609 AC_MSG_CHECKING(for symlink)
610-AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
611- AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
612- AC_MSG_RESULT(yes),
613- AC_MSG_RESULT(no)
614-)
615+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=symlink]])],[AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
616+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
617+])
618 AC_MSG_CHECKING(for fchdir)
619-AC_TRY_COMPILE([#include <unistd.h>], void *x=fchdir,
620- AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
621- AC_MSG_RESULT(yes),
622- AC_MSG_RESULT(no)
623-)
624+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fchdir]])],[AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
625+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
626+])
627 AC_MSG_CHECKING(for fsync)
628-AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync,
629- AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
630- AC_MSG_RESULT(yes),
631- AC_MSG_RESULT(no)
632-)
633+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fsync]])],[AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
634+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
635+])
636 AC_MSG_CHECKING(for fdatasync)
637-AC_TRY_COMPILE([#include <unistd.h>], void *x=fdatasync,
638- AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
639- AC_MSG_RESULT(yes),
640- AC_MSG_RESULT(no)
641-)
642+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fdatasync]])],[AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
643+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
644+])
645
646 # On some systems (eg. FreeBSD 5), we would find a definition of the
647 # functions ctermid_r, setgroups in the library, but no prototype
648@@ -2128,34 +2058,28 @@
649 # because of the missing prototypes.
650
651 AC_MSG_CHECKING(for ctermid_r)
652-AC_TRY_COMPILE([
653+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
654 #include "confdefs.h"
655 #include <stdio.h>
656-], void* p = ctermid_r,
657- AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
658- AC_MSG_RESULT(yes),
659- AC_MSG_RESULT(no)
660-)
661+]], [[void* p = ctermid_r]])],[AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
662+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
663+])
664
665 AC_MSG_CHECKING(for flock)
666-AC_TRY_COMPILE([
667+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
668 #include "confdefs.h"
669 #include <sys/file.h>
670-], void* p = flock,
671- AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
672- AC_MSG_RESULT(yes),
673- AC_MSG_RESULT(no)
674-)
675+]], [[void* p = flock]])],[AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
676+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
677+])
678
679 AC_MSG_CHECKING(for getpagesize)
680-AC_TRY_COMPILE([
681+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
682 #include "confdefs.h"
683 #include <unistd.h>
684-], void* p = getpagesize,
685- AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
686- AC_MSG_RESULT(yes),
687- AC_MSG_RESULT(no)
688-)
689+]], [[void* p = getpagesize]])],[AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
690+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
691+])
692
693 dnl check for true
694 AC_CHECK_PROGS(TRUE, true, /bin/true)
695@@ -2167,54 +2091,45 @@
696 )
697
698 AC_MSG_CHECKING(for hstrerror)
699-AC_TRY_LINK([
700+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
701 #include "confdefs.h"
702 #include <netdb.h>
703-], void* p = hstrerror; hstrerror(0),
704- AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
705- AC_MSG_RESULT(yes),
706- AC_MSG_RESULT(no)
707-)
708+]], [[void* p = hstrerror; hstrerror(0)]])],[AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
709+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
710+])
711
712 AC_MSG_CHECKING(for inet_aton)
713-AC_TRY_LINK([
714+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
715 #include "confdefs.h"
716 #include <sys/socket.h>
717 #include <netinet/in.h>
718 #include <arpa/inet.h>
719-], void* p = inet_aton;inet_aton(0,0),
720- AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
721- AC_MSG_RESULT(yes),
722- AC_MSG_RESULT(no)
723-)
724+]], [[void* p = inet_aton;inet_aton(0,0)]])],[AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
725+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
726+])
727
728 AC_MSG_CHECKING(for inet_pton)
729-AC_TRY_COMPILE([
730+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
731 #include "confdefs.h"
732 #include <sys/types.h>
733 #include <sys/socket.h>
734 #include <netinet/in.h>
735 #include <arpa/inet.h>
736-], void* p = inet_pton,
737- AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
738- AC_MSG_RESULT(yes),
739- AC_MSG_RESULT(no)
740-)
741+]], [[void* p = inet_pton]])],[AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
742+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
743+])
744
745 # On some systems, setgroups is in unistd.h, on others, in grp.h
746 AC_MSG_CHECKING(for setgroups)
747-AC_TRY_COMPILE([
748+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
749 #include "confdefs.h"
750 #include <unistd.h>
751 #ifdef HAVE_GRP_H
752 #include <grp.h>
753 #endif
754-],
755-void* p = setgroups,
756- AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
757- AC_MSG_RESULT(yes),
758- AC_MSG_RESULT(no)
759-)
760+]], [[void* p = setgroups]])],[AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
761+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
762+])
763
764 # check for openpty and forkpty
765
766@@ -2226,30 +2141,24 @@
767
768 AC_REPLACE_FUNCS(dup2 getcwd strdup strerror memmove)
769 AC_CHECK_FUNCS(getpgrp,
770- AC_TRY_COMPILE([#include <unistd.h>],
771- [getpgrp(0);],
772- AC_DEFINE(GETPGRP_HAVE_ARG, 1,
773- [Define if getpgrp() must be called as getpgrp(0).])
774- )
775+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[getpgrp(0);]])],[AC_DEFINE(GETPGRP_HAVE_ARG, 1,
776+ Define if getpgrp() must be called as getpgrp(0).)
777+ ],[])
778 )
779 AC_CHECK_FUNCS(setpgrp,
780- AC_TRY_COMPILE([#include <unistd.h>],
781- [setpgrp(0,0);],
782- AC_DEFINE(SETPGRP_HAVE_ARG, 1,
783- [Define if setpgrp() must be called as setpgrp(0, 0).])
784- )
785+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[setpgrp(0,0);]])],[AC_DEFINE(SETPGRP_HAVE_ARG, 1,
786+ Define if setpgrp() must be called as setpgrp(0, 0).)
787+ ],[])
788 )
789 AC_CHECK_FUNCS(gettimeofday,
790- AC_TRY_COMPILE([#include <sys/time.h>],
791- [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,
792- AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
793- [Define if gettimeofday() does not have second (timezone) argument
794- This is the case on Motorola V4 (R40V4.2)])
795- )
796+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[gettimeofday((struct timeval*)0,(struct timezone*)0);]])],[],[AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
797+ Define if gettimeofday() does not have second (timezone) argument
798+ This is the case on Motorola V4 (R40V4.2))
799+ ])
800 )
801
802 AC_MSG_CHECKING(for major, minor, and makedev)
803-AC_TRY_LINK([
804+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
805 #if defined(MAJOR_IN_MKDEV)
806 #include <sys/mkdev.h>
807 #elif defined(MAJOR_IN_SYSMACROS)
808@@ -2257,9 +2166,9 @@
809 #else
810 #include <sys/types.h>
811 #endif
812-],[
813+]], [[
814 makedev(major(0),minor(0));
815-],[
816+]])],[
817 AC_DEFINE(HAVE_DEVICE_MACROS, 1,
818 [Define to 1 if you have the device macros.])
819 AC_MSG_RESULT(yes)
820@@ -2270,14 +2179,14 @@
821 # On OSF/1 V5.1, getaddrinfo is available, but a define
822 # for [no]getaddrinfo in netdb.h.
823 AC_MSG_CHECKING(for getaddrinfo)
824-AC_TRY_LINK([
825+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
826 #include <sys/types.h>
827 #include <sys/socket.h>
828 #include <netdb.h>
829 #include <stdio.h>
830-],[
831+]], [[
832 getaddrinfo(NULL, NULL, NULL, NULL);
833-], [
834+]])],[
835 AC_MSG_RESULT(yes)
836 AC_MSG_CHECKING(getaddrinfo bug)
837 AC_TRY_RUN([
838@@ -2371,7 +2280,7 @@
839 AC_MSG_RESULT(buggy)
840 buggygetaddrinfo=yes,
841 AC_MSG_RESULT(buggy)
842-buggygetaddrinfo=yes)], [
843+buggygetaddrinfo=yes)],[
844 AC_MSG_RESULT(no)
845 buggygetaddrinfo=yes
846 ])
847@@ -2397,9 +2306,7 @@
848
849 AC_MSG_CHECKING(for time.h that defines altzone)
850 AC_CACHE_VAL(ac_cv_header_time_altzone,
851-[AC_TRY_COMPILE([#include <time.h>], [return altzone;],
852- ac_cv_header_time_altzone=yes,
853- ac_cv_header_time_altzone=no)])
854+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[return altzone;]])],[ac_cv_header_time_altzone=yes],[ac_cv_header_time_altzone=no])])
855 AC_MSG_RESULT($ac_cv_header_time_altzone)
856 if test $ac_cv_header_time_altzone = yes; then
857 AC_DEFINE(HAVE_ALTZONE, 1, [Define this if your time.h defines altzone.])
858@@ -2407,25 +2314,22 @@
859
860 was_it_defined=no
861 AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
862-AC_TRY_COMPILE([
863+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
864 #include <sys/types.h>
865 #include <sys/select.h>
866 #include <sys/time.h>
867-], [;], [
868+]], [[;]])],[
869 AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1,
870 [Define if you can safely include both <sys/select.h> and <sys/time.h>
871 (which you can't on SCO ODT 3.0).])
872 was_it_defined=yes
873-])
874+],[])
875 AC_MSG_RESULT($was_it_defined)
876
877 AC_MSG_CHECKING(for addrinfo)
878 AC_CACHE_VAL(ac_cv_struct_addrinfo,
879-AC_TRY_COMPILE([
880-# include <netdb.h>],
881- [struct addrinfo a],
882- ac_cv_struct_addrinfo=yes,
883- ac_cv_struct_addrinfo=no))
884+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
885+# include <netdb.h>]], [[struct addrinfo a]])],[ac_cv_struct_addrinfo=yes],[ac_cv_struct_addrinfo=no]))
886 AC_MSG_RESULT($ac_cv_struct_addrinfo)
887 if test $ac_cv_struct_addrinfo = yes; then
888 AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo (netdb.h)])
889@@ -2433,12 +2337,9 @@
890
891 AC_MSG_CHECKING(for sockaddr_storage)
892 AC_CACHE_VAL(ac_cv_struct_sockaddr_storage,
893-AC_TRY_COMPILE([
894+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
895 # include <sys/types.h>
896-# include <sys/socket.h>],
897- [struct sockaddr_storage s],
898- ac_cv_struct_sockaddr_storage=yes,
899- ac_cv_struct_sockaddr_storage=no))
900+# include <sys/socket.h>]], [[struct sockaddr_storage s]])],[ac_cv_struct_sockaddr_storage=yes],[ac_cv_struct_sockaddr_storage=no]))
901 AC_MSG_RESULT($ac_cv_struct_sockaddr_storage)
902 if test $ac_cv_struct_sockaddr_storage = yes; then
903 AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)])
904@@ -2451,30 +2352,28 @@
905
906 works=no
907 AC_MSG_CHECKING(for working volatile)
908-AC_TRY_COMPILE([],[volatile int x; x = 0;], works=yes,
909- AC_DEFINE(volatile, [], [Define to empty if the keyword does not work.])
910-)
911+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[volatile int x; x = 0;]])],[works=yes],[AC_DEFINE(volatile, , Define to empty if the keyword does not work.)
912+])
913 AC_MSG_RESULT($works)
914
915 works=no
916 AC_MSG_CHECKING(for working signed char)
917-AC_TRY_COMPILE([], [signed char c;], works=yes,
918- AC_DEFINE(signed, [], [Define to empty if the keyword does not work.])
919-)
920+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char c;]])],[works=yes],[AC_DEFINE(signed, , Define to empty if the keyword does not work.)
921+])
922 AC_MSG_RESULT($works)
923
924 have_prototypes=no
925 AC_MSG_CHECKING(for prototypes)
926-AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],[
927+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],[
928 AC_DEFINE(HAVE_PROTOTYPES, 1,
929 [Define if your compiler supports function prototype])
930 have_prototypes=yes
931-])
932+],[])
933 AC_MSG_RESULT($have_prototypes)
934
935 works=no
936 AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
937-AC_TRY_COMPILE([
938+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
939 #include <stdarg.h>
940 int foo(int x, ...) {
941 va_list va;
942@@ -2484,45 +2383,41 @@
943 va_arg(va, double);
944 return 0;
945 }
946-], [return foo(10, "", 3.14);], [
947+]], [[return foo(10, "", 3.14);]])],[
948 AC_DEFINE(HAVE_STDARG_PROTOTYPES, 1,
949 [Define if your compiler supports variable length function prototypes
950 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>])
951 works=yes
952-])
953+],[])
954 AC_MSG_RESULT($works)
955
956 if test "$have_prototypes" = yes; then
957 bad_prototypes=no
958 AC_MSG_CHECKING(for bad exec* prototypes)
959-AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
960- AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
961- [Define if your <unistd.h> contains bad prototypes for exec*()
962- (as it does on SGI IRIX 4.x)])
963+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[char **t;execve("@",t,t);]])],[],[AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
964+ Define if your <unistd.h> contains bad prototypes for exec*()
965+ (as it does on SGI IRIX 4.x))
966 bad_prototypes=yes
967-)
968+])
969 AC_MSG_RESULT($bad_prototypes)
970 fi
971
972 # check if sockaddr has sa_len member
973 AC_MSG_CHECKING(if sockaddr has sa_len member)
974-AC_TRY_COMPILE([#include <sys/types.h>
975-#include <sys/socket.h>],
976-[struct sockaddr x;
977-x.sa_len = 0;],
978- AC_MSG_RESULT(yes)
979- AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if sockaddr has sa_len member]),
980- AC_MSG_RESULT(no))
981+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
982+#include <sys/socket.h>]], [[struct sockaddr x;
983+x.sa_len = 0;]])],[AC_MSG_RESULT(yes)
984+ AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, Define if sockaddr has sa_len member)],[AC_MSG_RESULT(no)])
985
986 va_list_is_array=no
987 AC_MSG_CHECKING(whether va_list is an array)
988-AC_TRY_COMPILE([
989+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
990 #ifdef HAVE_STDARG_PROTOTYPES
991 #include <stdarg.h>
992 #else
993 #include <varargs.h>
994 #endif
995-], [va_list list1, list2; list1 = list2;], , [
996+]], [[va_list list1, list2; list1 = list2;]])],[],[
997 AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind])
998 va_list_is_array=yes
999 ])
1000@@ -2537,9 +2432,9 @@
1001 AC_MSG_CHECKING([gethostbyname_r with 6 args])
1002 OLD_CFLAGS=$CFLAGS
1003 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
1004- AC_TRY_COMPILE([
1005+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1006 # include <netdb.h>
1007- ], [
1008+ ]], [[
1009 char *name;
1010 struct hostent *he, *res;
1011 char buffer[2048];
1012@@ -2547,12 +2442,12 @@
1013 int h_errnop;
1014
1015 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
1016- ], [
1017+ ]])],[
1018 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
1019 AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
1020 [Define this if you have the 6-arg version of gethostbyname_r().])
1021 AC_MSG_RESULT(yes)
1022- ], [
1023+ ],[
1024 AC_MSG_RESULT(no)
1025 AC_MSG_CHECKING([gethostbyname_r with 5 args])
1026 AC_TRY_COMPILE([
1027@@ -2613,7 +2508,7 @@
1028 # Check for --with-fpectl
1029 AC_MSG_CHECKING(for --with-fpectl)
1030 AC_ARG_WITH(fpectl,
1031- AC_HELP_STRING(--with-fpectl, enable SIGFPE catching),
1032+ AS_HELP_STRING(--with-fpectl,enable SIGFPE catching),
1033 [
1034 if test "$withval" != no
1035 then
1036@@ -2633,7 +2528,7 @@
1037 esac
1038 AC_MSG_CHECKING(for --with-libm=STRING)
1039 AC_ARG_WITH(libm,
1040- AC_HELP_STRING(--with-libm=STRING, math library),
1041+ AS_HELP_STRING(--with-libm=STRING,math library),
1042 [
1043 if test "$withval" = no
1044 then LIBM=
1045@@ -2649,7 +2544,7 @@
1046 AC_SUBST(LIBC)
1047 AC_MSG_CHECKING(for --with-libc=STRING)
1048 AC_ARG_WITH(libc,
1049- AC_HELP_STRING(--with-libc=STRING, C library),
1050+ AS_HELP_STRING(--with-libc=STRING,C library),
1051 [
1052 if test "$withval" = no
1053 then LIBC=
1054@@ -2684,20 +2579,20 @@
1055
1056 AC_MSG_CHECKING(for UCS-4 tcl)
1057 have_ucs4_tcl=no
1058-AC_TRY_COMPILE([
1059+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1060 #include <tcl.h>
1061 #if TCL_UTF_MAX != 6
1062 # error "NOT UCS4_TCL"
1063-#endif], [], [
1064+#endif]], [[]])],[
1065 AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6])
1066 have_ucs4_tcl=yes
1067-])
1068+],[])
1069 AC_MSG_RESULT($have_ucs4_tcl)
1070
1071 AC_MSG_CHECKING(what type to use for unicode)
1072 dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
1073 AC_ARG_ENABLE(unicode,
1074- AC_HELP_STRING(--enable-unicode@<:@=ucs@<:@24@:>@@:>@, Enable Unicode strings (default is yes)),
1075+ AS_HELP_STRING(--enable-unicode@<:@=ucs@<:@24@:>@@:>@,Enable Unicode strings (default is yes)),
1076 [],
1077 [enable_unicode=yes])
1078
1079@@ -2764,15 +2659,12 @@
1080 # or fills with zeros (like the Cray J90, according to Tim Peters).
1081 AC_MSG_CHECKING(whether right shift extends the sign bit)
1082 AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
1083-AC_TRY_RUN([
1084+AC_RUN_IFELSE([AC_LANG_SOURCE([[
1085 int main()
1086 {
1087 exit(((-1)>>3 == -1) ? 0 : 1);
1088 }
1089-],
1090-ac_cv_rshift_extends_sign=yes,
1091-ac_cv_rshift_extends_sign=no,
1092-ac_cv_rshift_extends_sign=yes)])
1093+]])],[ac_cv_rshift_extends_sign=yes],[ac_cv_rshift_extends_sign=no],[ac_cv_rshift_extends_sign=yes])])
1094 AC_MSG_RESULT($ac_cv_rshift_extends_sign)
1095 if test "$ac_cv_rshift_extends_sign" = no
1096 then
1097@@ -2784,12 +2676,12 @@
1098 # check for getc_unlocked and related locking functions
1099 AC_MSG_CHECKING(for getc_unlocked() and friends)
1100 AC_CACHE_VAL(ac_cv_have_getc_unlocked, [
1101-AC_TRY_LINK([#include <stdio.h>],[
1102+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
1103 FILE *f = fopen("/dev/null", "r");
1104 flockfile(f);
1105 getc_unlocked(f);
1106 funlockfile(f);
1107-], ac_cv_have_getc_unlocked=yes, ac_cv_have_getc_unlocked=no)])
1108+]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
1109 AC_MSG_RESULT($ac_cv_have_getc_unlocked)
1110 if test "$ac_cv_have_getc_unlocked" = yes
1111 then
1112@@ -2798,8 +2690,7 @@
1113 fi
1114
1115 # check for readline 2.2
1116-AC_TRY_CPP([#include <readline/readline.h>],
1117-have_readline=yes, have_readline=no)
1118+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],[have_readline=yes],[have_readline=no])
1119 if test $have_readline = yes
1120 then
1121 AC_EGREP_HEADER([extern int rl_completion_append_character;],
1122@@ -2820,7 +2711,7 @@
1123
1124 AC_MSG_CHECKING(for broken nice())
1125 AC_CACHE_VAL(ac_cv_broken_nice, [
1126-AC_TRY_RUN([
1127+AC_RUN_IFELSE([AC_LANG_SOURCE([[
1128 int main()
1129 {
1130 int val1 = nice(1);
1131@@ -2828,10 +2719,7 @@
1132 exit(0);
1133 exit(1);
1134 }
1135-],
1136-ac_cv_broken_nice=yes,
1137-ac_cv_broken_nice=no,
1138-ac_cv_broken_nice=no)])
1139+]])],[ac_cv_broken_nice=yes],[ac_cv_broken_nice=no],[ac_cv_broken_nice=no])])
1140 AC_MSG_RESULT($ac_cv_broken_nice)
1141 if test "$ac_cv_broken_nice" = yes
1142 then
1143@@ -2842,7 +2730,7 @@
1144 # tzset(3) exists and works like we expect it to
1145 AC_MSG_CHECKING(for working tzset())
1146 AC_CACHE_VAL(ac_cv_working_tzset, [
1147-AC_TRY_RUN([
1148+AC_RUN_IFELSE([AC_LANG_SOURCE([[
1149 #include <stdlib.h>
1150 #include <time.h>
1151 #include <string.h>
1152@@ -2880,10 +2768,7 @@
1153
1154 exit(0);
1155 }
1156-],
1157-ac_cv_working_tzset=yes,
1158-ac_cv_working_tzset=no,
1159-ac_cv_working_tzset=no)])
1160+]])],[ac_cv_working_tzset=yes],[ac_cv_working_tzset=no],[ac_cv_working_tzset=no])])
1161 AC_MSG_RESULT($ac_cv_working_tzset)
1162 if test "$ac_cv_working_tzset" = yes
1163 then
1164@@ -2894,13 +2779,10 @@
1165 # Look for subsecond timestamps in struct stat
1166 AC_MSG_CHECKING(for tv_nsec in struct stat)
1167 AC_CACHE_VAL(ac_cv_stat_tv_nsec,
1168-AC_TRY_COMPILE([#include <sys/stat.h>], [
1169+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[
1170 struct stat st;
1171 st.st_mtim.tv_nsec = 1;
1172-],
1173-ac_cv_stat_tv_nsec=yes,
1174-ac_cv_stat_tv_nsec=no,
1175-ac_cv_stat_tv_nsec=no))
1176+]])],[ac_cv_stat_tv_nsec=yes],[ac_cv_stat_tv_nsec=no]))
1177 AC_MSG_RESULT($ac_cv_stat_tv_nsec)
1178 if test "$ac_cv_stat_tv_nsec" = yes
1179 then
1180@@ -2911,12 +2793,10 @@
1181 # On HP/UX 11.0, mvwdelch is a block with a return statement
1182 AC_MSG_CHECKING(whether mvwdelch is an expression)
1183 AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
1184-AC_TRY_COMPILE([#include <curses.h>], [
1185+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
1186 int rtn;
1187 rtn = mvwdelch(0,0,0);
1188-], ac_cv_mvwdelch_is_expression=yes,
1189- ac_cv_mvwdelch_is_expression=no,
1190- ac_cv_mvwdelch_is_expression=yes))
1191+]])],[ac_cv_mvwdelch_is_expression=yes],[ac_cv_mvwdelch_is_expression=no]))
1192 AC_MSG_RESULT($ac_cv_mvwdelch_is_expression)
1193
1194 if test "$ac_cv_mvwdelch_is_expression" = yes
1195@@ -2927,12 +2807,10 @@
1196
1197 AC_MSG_CHECKING(whether WINDOW has _flags)
1198 AC_CACHE_VAL(ac_cv_window_has_flags,
1199-AC_TRY_COMPILE([#include <curses.h>], [
1200+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
1201 WINDOW *w;
1202 w->_flags = 0;
1203-], ac_cv_window_has_flags=yes,
1204- ac_cv_window_has_flags=no,
1205- ac_cv_window_has_flags=no))
1206+]])],[ac_cv_window_has_flags=yes],[ac_cv_window_has_flags=no]))
1207 AC_MSG_RESULT($ac_cv_window_has_flags)
1208
1209