blob: aca101dcd4d5895d69dabc5ad40e2a8c0660efbc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Wouterscf297e42007-02-23 15:07:44 +00002# From configure.in Revision: 53610 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Thomas Wouters89f507f2006-12-13 04:49:30 +00004# Generated by GNU Autoconf 2.61 for python 3.0.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Thomas Wouters477c8d52006-05-27 19:21:47 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters89f507f2006-12-13 04:49:30 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000024 setopt NO_GLOB_SUBST
25else
Thomas Wouters89f507f2006-12-13 04:49:30 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters477c8d52006-05-27 19:21:47 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters477c8d52006-05-27 19:21:47 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters477c8d52006-05-27 19:21:47 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters477c8d52006-05-27 19:21:47 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters477c8d52006-05-27 19:21:47 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000242 { ("$as_shell") 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
Thomas Wouters89f507f2006-12-13 04:49:30 +0000251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
Thomas Wouters477c8d52006-05-27 19:21:47 +0000255fi
Thomas Wouters89f507f2006-12-13 04:49:30 +0000256
Thomas Wouters477c8d52006-05-27 19:21:47 +0000257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000263 if { "$as_shell" 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
Thomas Wouters89f507f2006-12-13 04:49:30 +0000272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
Thomas Wouters477c8d52006-05-27 19:21:47 +0000276fi
Thomas Wouters89f507f2006-12-13 04:49:30 +0000277
Thomas Wouters477c8d52006-05-27 19:21:47 +0000278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Martin v. Löwis11437992002-04-12 09:54:03 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters477c8d52006-05-27 19:21:47 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Thomas Wouters477c8d52006-05-27 19:21:47 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters89f507f2006-12-13 04:49:30 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000526else
Thomas Wouters89f507f2006-12-13 04:49:30 +0000527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
Thomas Wouters477c8d52006-05-27 19:21:47 +0000544fi
Thomas Wouters89f507f2006-12-13 04:49:30 +0000545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters477c8d52006-05-27 19:21:47 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters477c8d52006-05-27 19:21:47 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000578PACKAGE_VERSION='3.0'
579PACKAGE_STRING='python 3.0'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters89f507f2006-12-13 04:49:30 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters89f507f2006-12-13 04:49:30 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000612#ifdef HAVE_STDINT_H
Thomas Wouters477c8d52006-05-27 19:21:47 +0000613# include <stdint.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000614#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +0000615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Thomas Wouters477c8d52006-05-27 19:21:47 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
Thomas Wouters73e5a5b2006-06-08 15:35:45 +0000666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
Thomas Wouters477c8d52006-05-27 19:21:47 +0000669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Thomas Wouters477c8d52006-05-27 19:21:47 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
Thomas Wouters89f507f2006-12-13 04:49:30 +0000742LIBS
Thomas Wouters477c8d52006-05-27 19:21:47 +0000743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Thomas Wouters477c8d52006-05-27 19:21:47 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Thomas Wouters477c8d52006-05-27 19:21:47 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Thomas Wouters477c8d52006-05-27 19:21:47 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Thomas Wouters477c8d52006-05-27 19:21:47 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Thomas Wouters477c8d52006-05-27 19:21:47 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Thomas Wouters89f507f2006-12-13 04:49:30 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Thomas Wouters89f507f2006-12-13 04:49:30 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Thomas Wouters477c8d52006-05-27 19:21:47 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Thomas Wouters477c8d52006-05-27 19:21:47 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Thomas Wouters477c8d52006-05-27 19:21:47 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Thomas Wouters89f507f2006-12-13 04:49:30 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Thomas Wouters89f507f2006-12-13 04:49:30 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Thomas Wouters477c8d52006-05-27 19:21:47 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Thomas Wouters477c8d52006-05-27 19:21:47 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Thomas Wouters477c8d52006-05-27 19:21:47 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001247\`configure' configures python 3.0 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001308 short | recursive ) echo "Configuration of python 3.0:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001315 --enable-universalsdk[SDKDIR]
1316 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Thomas Wouters89f507f2006-12-13 04:49:30 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
Thomas Wouters477c8d52006-05-27 19:21:47 +00001359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Thomas Wouters477c8d52006-05-27 19:21:47 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001411 if test -f "$ac_srcdir/configure.gnu"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001412 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001415 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters477c8d52006-05-27 19:21:47 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Thomas Wouters477c8d52006-05-27 19:21:47 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001427python configure 3.0
Thomas Wouters89f507f2006-12-13 04:49:30 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Thomas Wouters477c8d52006-05-27 19:21:47 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001441It was created by python $as_me 3.0, which was
Thomas Wouters89f507f2006-12-13 04:49:30 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Thomas Wouters477c8d52006-05-27 19:21:47 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters477c8d52006-05-27 19:21:47 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001597 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001614 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Thomas Wouters477c8d52006-05-27 19:21:47 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Thomas Wouters477c8d52006-05-27 19:21:47 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Thomas Wouters477c8d52006-05-27 19:21:47 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters477c8d52006-05-27 19:21:47 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Thomas Wouters477c8d52006-05-27 19:21:47 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Thomas Wouters477c8d52006-05-27 19:21:47 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001810VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Thomas Wouters477c8d52006-05-27 19:21:47 +00001855# Check whether --enable-universalsdk was given.
1856if test "${enable_universalsdk+set}" = set; then
1857 enableval=$enable_universalsdk;
1858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001872
Thomas Wouters477c8d52006-05-27 19:21:47 +00001873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
1878fi
1879
1880
1881
1882# Check whether --enable-framework was given.
1883if test "${enable_framework+set}" = set; then
1884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
1899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001925
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001927
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
1942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Thomas Wouters477c8d52006-05-27 19:21:47 +00001949fi
1950
1951
1952
Michael W. Hudson54241132001-12-07 15:38:26 +00001953
1954
1955
1956
Jack Jansene578a632001-08-15 01:27:14 +00001957
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Thomas Wouters477c8d52006-05-27 19:21:47 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Thomas Wouters89f507f2006-12-13 04:49:30 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
2007 define_xopen_source=no;;
2008 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2009 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2010 # Marc Recht
2011 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002012 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002013 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2014 # of union __?sigval. Reported by Stuart Bishop.
2015 SunOS/5.6)
2016 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002017 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2018 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002019 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002020 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002021 define_xopen_source=no;;
2022 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002023 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002024 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002025 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002026 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2027 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2028 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2029 # This should hopefully be fixed in FreeBSD 4.9
2030 FreeBSD/4.8* | Darwin/6* )
2031 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002032 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2033 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2034 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002035 AIX/4)
2036 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002037 AIX/5)
2038 if test `uname -r` -eq 1; then
2039 define_xopen_source=no
2040 fi
2041 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002042 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2043 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002044 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002045 # has no effect, don't bother defining them
2046 Darwin/[789].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002047 define_xopen_source=no
2048 ;;
2049
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002050esac
2051
2052if test $define_xopen_source = yes
2053then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002054 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2055 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002056 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2057 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002058 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002059 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002060
2061cat >>confdefs.h <<\_ACEOF
2062#define _XOPEN_SOURCE 500
2063_ACEOF
2064
2065 ;;
2066 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002067
2068cat >>confdefs.h <<\_ACEOF
2069#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002070_ACEOF
2071
Skip Montanarof0d5f792004-08-15 14:08:23 +00002072 ;;
2073 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002074
2075 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2076 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2077 # several APIs are not declared. Since this is also needed in some
2078 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002079 # except for Solaris 10, where it must not be defined,
2080 # as it implies XPG4.2
2081 case $ac_sys_system/$ac_sys_release in
2082 SunOS/5.10)
2083 ;;
2084 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002085
2086cat >>confdefs.h <<\_ACEOF
2087#define _XOPEN_SOURCE_EXTENDED 1
2088_ACEOF
2089
Martin v. Löwis7dece662005-11-26 11:38:24 +00002090 ;;
2091 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002092
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002093
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094cat >>confdefs.h <<\_ACEOF
2095#define _POSIX_C_SOURCE 200112L
2096_ACEOF
2097
2098
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002099fi
2100
Guido van Rossum91922671997-10-09 20:24:13 +00002101#
2102# SGI compilers allow the specification of the both the ABI and the
2103# ISA on the command line. Depending on the values of these switches,
2104# different and often incompatable code will be generated.
2105#
2106# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2107# thus supply support for various ABI/ISA combinations. The MACHDEP
2108# variable is also adjusted.
2109#
2110
2111if test ! -z "$SGI_ABI"
2112then
2113 CC="cc $SGI_ABI"
2114 LDFLAGS="$SGI_ABI $LDFLAGS"
2115 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2116fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002117{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2118echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002119
Jack Jansen83f898c2002-12-30 22:23:40 +00002120# And add extra plat-mac for darwin
2121
Jack Jansen7b59b422003-03-17 15:44:10 +00002122
Thomas Wouters477c8d52006-05-27 19:21:47 +00002123{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2124echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002125if test -z "$EXTRAPLATDIR"
2126then
2127 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002128 darwin)
2129 EXTRAPLATDIR="\$(PLATMACDIRS)"
2130 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2131 ;;
2132 *)
2133 EXTRAPLATDIR=""
2134 EXTRAMACHDEPPATH=""
2135 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002136 esac
2137fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002138{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2139echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002140
Jack Jansen6b08a402004-06-03 12:41:45 +00002141# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2142# it may influence the way we can build extensions, so distutils
2143# needs to check it
2144
Thomas Wouters477c8d52006-05-27 19:21:47 +00002145
Jack Jansen6b08a402004-06-03 12:41:45 +00002146CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002147EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002148
Guido van Rossum627b2d71993-12-24 10:39:16 +00002149# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002150
2151# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2152# for debug/optimization stuff. BASECFLAGS is for flags that are required
2153# just to get things to compile and link. Users are free to override OPT
2154# when running configure or make. The build should not break if they do.
2155# BASECFLAGS should generally not be messed with, however.
2156
2157# XXX shouldn't some/most/all of this code be merged with the stuff later
2158# on that fiddles with OPT and BASECFLAGS?
Thomas Wouters477c8d52006-05-27 19:21:47 +00002159{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2160echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002161
Thomas Wouters477c8d52006-05-27 19:21:47 +00002162# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002163if test "${with_gcc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002164 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002165 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002166 no) CC=cc
2167 without_gcc=yes;;
2168 yes) CC=gcc
2169 without_gcc=no;;
2170 *) CC=$withval
2171 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002172 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002173else
Martin v. Löwis11437992002-04-12 09:54:03 +00002174
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002175 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002176 AIX*) CC=cc_r
2177 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002178 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002179 case $BE_HOST_CPU in
2180 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002181 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002182 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002183 BASECFLAGS="$BASECFLAGS -export pragma"
2184 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002185 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002186 ;;
2187 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002188 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002189 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002190 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 ;;
2192 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002193 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2194echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2195 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002196 ;;
2197 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002198 AR="\$(srcdir)/Modules/ar_beos"
2199 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002201 Monterey*)
2202 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002203 without_gcc=;;
2204 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002205 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00002206fi
2207
2208{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2209echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002210
Guido van Rossum8b131c51995-03-09 14:10:13 +00002211# If the user switches compilers, we can't believe the cache
2212if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2213then
Martin v. Löwis11437992002-04-12 09:54:03 +00002214 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2215(it is also a good idea to do 'make clean' before compiling)" >&5
2216echo "$as_me: error: cached CC is different -- throw away $cache_file
2217(it is also a good idea to do 'make clean' before compiling)" >&2;}
2218 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002219fi
2220
Martin v. Löwis11437992002-04-12 09:54:03 +00002221ac_ext=c
2222ac_cpp='$CPP $CPPFLAGS'
2223ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2224ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2225ac_compiler_gnu=$ac_cv_c_compiler_gnu
2226if test -n "$ac_tool_prefix"; then
2227 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2228set dummy ${ac_tool_prefix}gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002231if test "${ac_cv_prog_CC+set}" = set; then
2232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002233else
2234 if test -n "$CC"; then
2235 ac_cv_prog_CC="$CC" # Let the user override the test.
2236else
Martin v. Löwis11437992002-04-12 09:54:03 +00002237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2238for as_dir in $PATH
2239do
2240 IFS=$as_save_IFS
2241 test -z "$as_dir" && as_dir=.
2242 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2246 break 2
2247 fi
2248done
2249done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002250IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002251
Jack Jansendd19cf82001-12-06 22:36:17 +00002252fi
2253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002255if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002256 { echo "$as_me:$LINENO: result: $CC" >&5
2257echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002258else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002259 { echo "$as_me:$LINENO: result: no" >&5
2260echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002261fi
2262
Thomas Wouters477c8d52006-05-27 19:21:47 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264fi
2265if test -z "$ac_cv_prog_CC"; then
2266 ac_ct_CC=$CC
2267 # Extract the first word of "gcc", so it can be a program name with args.
2268set dummy gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002269{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002271if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2272 echo $ECHO_N "(cached) $ECHO_C" >&6
2273else
2274 if test -n "$ac_ct_CC"; then
2275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2276else
2277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2278for as_dir in $PATH
2279do
2280 IFS=$as_save_IFS
2281 test -z "$as_dir" && as_dir=.
2282 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002284 ac_cv_prog_ac_ct_CC="gcc"
2285 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2286 break 2
2287 fi
2288done
2289done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002290IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002291
2292fi
2293fi
2294ac_ct_CC=$ac_cv_prog_ac_ct_CC
2295if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002296 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2297echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002298else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002299 { echo "$as_me:$LINENO: result: no" >&5
2300echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002301fi
2302
Thomas Wouters477c8d52006-05-27 19:21:47 +00002303 if test "x$ac_ct_CC" = x; then
2304 CC=""
2305 else
2306 case $cross_compiling:$ac_tool_warned in
2307yes:)
2308{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2309whose name does not start with the host triplet. If you think this
2310configuration is useful to you, please write to autoconf@gnu.org." >&5
2311echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2312whose name does not start with the host triplet. If you think this
2313configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2314ac_tool_warned=yes ;;
2315esac
2316 CC=$ac_ct_CC
2317 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002318else
2319 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002320fi
2321
Jack Jansendd19cf82001-12-06 22:36:17 +00002322if test -z "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002323 if test -n "$ac_tool_prefix"; then
2324 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002325set dummy ${ac_tool_prefix}cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002326{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002328if test "${ac_cv_prog_CC+set}" = set; then
2329 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002330else
2331 if test -n "$CC"; then
2332 ac_cv_prog_CC="$CC" # Let the user override the test.
2333else
Martin v. Löwis11437992002-04-12 09:54:03 +00002334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2335for as_dir in $PATH
2336do
2337 IFS=$as_save_IFS
2338 test -z "$as_dir" && as_dir=.
2339 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002340 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 ac_cv_prog_CC="${ac_tool_prefix}cc"
2342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2343 break 2
2344 fi
2345done
2346done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002348
2349fi
2350fi
2351CC=$ac_cv_prog_CC
2352if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002353 { echo "$as_me:$LINENO: result: $CC" >&5
2354echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002356 { echo "$as_me:$LINENO: result: no" >&5
2357echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002358fi
2359
Thomas Wouters477c8d52006-05-27 19:21:47 +00002360
Martin v. Löwis11437992002-04-12 09:54:03 +00002361 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002362fi
2363if test -z "$CC"; then
2364 # Extract the first word of "cc", so it can be a program name with args.
2365set dummy cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368if test "${ac_cv_prog_CC+set}" = set; then
2369 echo $ECHO_N "(cached) $ECHO_C" >&6
2370else
2371 if test -n "$CC"; then
2372 ac_cv_prog_CC="$CC" # Let the user override the test.
2373else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002374 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
2380 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002381 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002382 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2383 ac_prog_rejected=yes
2384 continue
2385 fi
2386 ac_cv_prog_CC="cc"
2387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2388 break 2
2389 fi
2390done
2391done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002394if test $ac_prog_rejected = yes; then
2395 # We found a bogon in the path, so make sure we never use it.
2396 set dummy $ac_cv_prog_CC
2397 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002399 # We chose a different compiler from the bogus one.
2400 # However, it has the same basename, so the bogon will be chosen
2401 # first if we set CC to just the basename; use the full file name.
2402 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002404 fi
2405fi
2406fi
2407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002408CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002409if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002410 { echo "$as_me:$LINENO: result: $CC" >&5
2411echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002412else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002413 { echo "$as_me:$LINENO: result: no" >&5
2414echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002415fi
2416
Thomas Wouters477c8d52006-05-27 19:21:47 +00002417
Martin v. Löwis11437992002-04-12 09:54:03 +00002418fi
2419if test -z "$CC"; then
2420 if test -n "$ac_tool_prefix"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002421 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002422 do
2423 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002425{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002427if test "${ac_cv_prog_CC+set}" = set; then
2428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002429else
2430 if test -n "$CC"; then
2431 ac_cv_prog_CC="$CC" # Let the user override the test.
2432else
Martin v. Löwis11437992002-04-12 09:54:03 +00002433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434for as_dir in $PATH
2435do
2436 IFS=$as_save_IFS
2437 test -z "$as_dir" && as_dir=.
2438 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002440 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2442 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002444done
2445done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
2448fi
2449fi
2450CC=$ac_cv_prog_CC
2451if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002452 { echo "$as_me:$LINENO: result: $CC" >&5
2453echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002455 { echo "$as_me:$LINENO: result: no" >&5
2456echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002457fi
2458
Thomas Wouters477c8d52006-05-27 19:21:47 +00002459
Martin v. Löwis11437992002-04-12 09:54:03 +00002460 test -n "$CC" && break
2461 done
2462fi
2463if test -z "$CC"; then
2464 ac_ct_CC=$CC
Thomas Wouters477c8d52006-05-27 19:21:47 +00002465 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002466do
2467 # Extract the first word of "$ac_prog", so it can be a program name with args.
2468set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002469{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002471if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2472 echo $ECHO_N "(cached) $ECHO_C" >&6
2473else
2474 if test -n "$ac_ct_CC"; then
2475 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2476else
2477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478for as_dir in $PATH
2479do
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00002483 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 ac_cv_prog_ac_ct_CC="$ac_prog"
2485 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2486 break 2
2487 fi
2488done
2489done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002490IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002491
Martin v. Löwis11437992002-04-12 09:54:03 +00002492fi
2493fi
2494ac_ct_CC=$ac_cv_prog_ac_ct_CC
2495if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002496 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2497echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002498else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002499 { echo "$as_me:$LINENO: result: no" >&5
2500echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002502
Thomas Wouters477c8d52006-05-27 19:21:47 +00002503
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 test -n "$ac_ct_CC" && break
2505done
Michael W. Hudson54241132001-12-07 15:38:26 +00002506
Thomas Wouters477c8d52006-05-27 19:21:47 +00002507 if test "x$ac_ct_CC" = x; then
2508 CC=""
2509 else
2510 case $cross_compiling:$ac_tool_warned in
2511yes:)
2512{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2513whose name does not start with the host triplet. If you think this
2514configuration is useful to you, please write to autoconf@gnu.org." >&5
2515echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2516whose name does not start with the host triplet. If you think this
2517configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2518ac_tool_warned=yes ;;
2519esac
2520 CC=$ac_ct_CC
2521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002522fi
2523
2524fi
2525
2526
Skip Montanaro6dead952003-09-25 14:50:04 +00002527test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2528See \`config.log' for more details." >&5
2529echo "$as_me: error: no acceptable C compiler found in \$PATH
2530See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 { (exit 1); exit 1; }; }
2532
2533# Provide some information about the compiler.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002534echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002535ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002536{ (ac_try="$ac_compiler --version >&5"
2537case "(($ac_try" in
2538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2539 *) ac_try_echo=$ac_try;;
2540esac
2541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2542 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 ac_status=$?
2544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2545 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002546{ (ac_try="$ac_compiler -v >&5"
2547case "(($ac_try" in
2548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549 *) ac_try_echo=$ac_try;;
2550esac
2551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2552 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 ac_status=$?
2554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2555 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002556{ (ac_try="$ac_compiler -V >&5"
2557case "(($ac_try" in
2558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559 *) ac_try_echo=$ac_try;;
2560esac
2561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2562 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 ac_status=$?
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); }
2566
2567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002568/* confdefs.h. */
2569_ACEOF
2570cat confdefs.h >>conftest.$ac_ext
2571cat >>conftest.$ac_ext <<_ACEOF
2572/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574int
2575main ()
2576{
2577
2578 ;
2579 return 0;
2580}
2581_ACEOF
2582ac_clean_files_save=$ac_clean_files
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002583ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002584# Try to create an executable without -o first, disregard a.out.
2585# It will help us diagnose broken compilers, and finding out an intuition
2586# of exeext.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002587{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2588echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002590#
2591# List of possible output files, starting from the most likely.
2592# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2593# only as a last resort. b.out is created by i960 compilers.
2594ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2595#
2596# The IRIX 6 linker writes into existing files which may not be
2597# executable, retaining their permissions. Remove them first so a
2598# subsequent execution test works.
2599ac_rmfiles=
2600for ac_file in $ac_files
2601do
2602 case $ac_file in
2603 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2604 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2605 esac
2606done
2607rm -f $ac_rmfiles
Thomas Wouters477c8d52006-05-27 19:21:47 +00002608
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002609if { (ac_try="$ac_link_default"
2610case "(($ac_try" in
2611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2612 *) ac_try_echo=$ac_try;;
2613esac
2614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2615 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 ac_status=$?
2617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2618 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002619 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2620# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2621# in a Makefile. We should not override ac_cv_exeext if it was cached,
2622# so that the user can short-circuit this test for compilers unknown to
2623# Autoconf.
Thomas Wouters89f507f2006-12-13 04:49:30 +00002624for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002625do
2626 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002628 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2629 ;;
2630 [ab].out )
2631 # We found the default executable, but exeext='' is most
2632 # certainly right.
2633 break;;
2634 *.* )
2635 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2636 then :; else
2637 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2638 fi
2639 # We set ac_cv_exeext here because the later test for it is not
2640 # safe: cross compilers may not add the suffix if given an `-o'
2641 # argument, so we may need to know it at that point already.
2642 # Even if this section looks crufty: it has the advantage of
2643 # actually working.
2644 break;;
2645 * )
2646 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 esac
2648done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002649test "$ac_cv_exeext" = no && ac_cv_exeext=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002650
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002651else
Thomas Wouters89f507f2006-12-13 04:49:30 +00002652 ac_file=''
2653fi
2654
2655{ echo "$as_me:$LINENO: result: $ac_file" >&5
2656echo "${ECHO_T}$ac_file" >&6; }
2657if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002659sed 's/^/| /' conftest.$ac_ext >&5
2660
2661{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2662See \`config.log' for more details." >&5
2663echo "$as_me: error: C compiler cannot create executables
2664See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002666fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002667
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002668ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002669
Thomas Wouters477c8d52006-05-27 19:21:47 +00002670# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002671# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002672{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2673echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002674# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2675# If not cross compiling, check that we can run a simple program.
2676if test "$cross_compiling" != yes; then
2677 if { ac_try='./$ac_file'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002678 { (case "(($ac_try" in
2679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2680 *) ac_try_echo=$ac_try;;
2681esac
2682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2683 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 ac_status=$?
2685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2686 (exit $ac_status); }; }; then
2687 cross_compiling=no
2688 else
2689 if test "$cross_compiling" = maybe; then
2690 cross_compiling=yes
2691 else
2692 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002693If you meant to cross compile, use \`--host'.
2694See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002695echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002696If you meant to cross compile, use \`--host'.
2697See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 { (exit 1); exit 1; }; }
2699 fi
2700 fi
2701fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002702{ echo "$as_me:$LINENO: result: yes" >&5
2703echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002705rm -f a.out a.exe conftest$ac_cv_exeext b.out
2706ac_clean_files=$ac_clean_files_save
2707# Check that the compiler produces executables we can run. If not, either
2708# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002709{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2710echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2711{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2712echo "${ECHO_T}$cross_compiling" >&6; }
2713
2714{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2715echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002716if { (ac_try="$ac_link"
2717case "(($ac_try" in
2718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719 *) ac_try_echo=$ac_try;;
2720esac
2721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2722 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 ac_status=$?
2724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2725 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002726 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2727# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2728# work properly (i.e., refer to `conftest.exe'), while it won't with
2729# `rm'.
2730for ac_file in conftest.exe conftest conftest.*; do
2731 test -f "$ac_file" || continue
2732 case $ac_file in
2733 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2734 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2735 break;;
2736 * ) break;;
2737 esac
2738done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739else
Skip Montanaro6dead952003-09-25 14:50:04 +00002740 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2741See \`config.log' for more details." >&5
2742echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2743See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002745fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002746
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002747rm -f conftest$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002748{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2749echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002750
2751rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002752EXEEXT=$ac_cv_exeext
2753ac_exeext=$EXEEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2755echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002756if test "${ac_cv_objext+set}" = set; then
2757 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002758else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759 cat >conftest.$ac_ext <<_ACEOF
2760/* confdefs.h. */
2761_ACEOF
2762cat confdefs.h >>conftest.$ac_ext
2763cat >>conftest.$ac_ext <<_ACEOF
2764/* end confdefs.h. */
2765
2766int
2767main ()
2768{
2769
2770 ;
2771 return 0;
2772}
2773_ACEOF
2774rm -f conftest.o conftest.obj
2775if { (ac_try="$ac_compile"
2776case "(($ac_try" in
2777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778 *) ac_try_echo=$ac_try;;
2779esac
2780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2781 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 ac_status=$?
2783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2784 (exit $ac_status); }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785 for ac_file in conftest.o conftest.obj conftest.*; do
2786 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2790 break;;
2791 esac
2792done
2793else
2794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002795sed 's/^/| /' conftest.$ac_ext >&5
2796
2797{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2798See \`config.log' for more details." >&5
2799echo "$as_me: error: cannot compute suffix of object files: cannot compile
2800See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002801 { (exit 1); exit 1; }; }
2802fi
2803
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002806{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2807echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808OBJEXT=$ac_cv_objext
2809ac_objext=$OBJEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002810{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2811echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002812if test "${ac_cv_c_compiler_gnu+set}" = set; then
2813 echo $ECHO_N "(cached) $ECHO_C" >&6
2814else
2815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002816/* confdefs.h. */
2817_ACEOF
2818cat confdefs.h >>conftest.$ac_ext
2819cat >>conftest.$ac_ext <<_ACEOF
2820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002821
Martin v. Löwis11437992002-04-12 09:54:03 +00002822int
2823main ()
2824{
2825#ifndef __GNUC__
2826 choke me
2827#endif
2828
2829 ;
2830 return 0;
2831}
2832_ACEOF
2833rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002834if { (ac_try="$ac_compile"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
2839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002842 grep -v '^ *+' conftest.er1 >conftest.err
2843 rm -f conftest.er1
2844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00002846 (exit $ac_status); } && {
2847 test -z "$ac_c_werror_flag" ||
2848 test ! -s conftest.err
2849 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_compiler_gnu=yes
2851else
2852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002853sed 's/^/| /' conftest.$ac_ext >&5
2854
Thomas Wouters477c8d52006-05-27 19:21:47 +00002855 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002856fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002857
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002859ac_cv_c_compiler_gnu=$ac_compiler_gnu
2860
2861fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002862{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2863echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864GCC=`test $ac_compiler_gnu = yes && echo yes`
2865ac_test_CFLAGS=${CFLAGS+set}
2866ac_save_CFLAGS=$CFLAGS
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2868echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002869if test "${ac_cv_prog_cc_g+set}" = set; then
2870 echo $ECHO_N "(cached) $ECHO_C" >&6
2871else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002872 ac_save_c_werror_flag=$ac_c_werror_flag
2873 ac_c_werror_flag=yes
2874 ac_cv_prog_cc_g=no
2875 CFLAGS="-g"
2876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002877/* confdefs.h. */
2878_ACEOF
2879cat confdefs.h >>conftest.$ac_ext
2880cat >>conftest.$ac_ext <<_ACEOF
2881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002882
Martin v. Löwis11437992002-04-12 09:54:03 +00002883int
2884main ()
2885{
2886
2887 ;
2888 return 0;
2889}
2890_ACEOF
2891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002892if { (ac_try="$ac_compile"
2893case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2896esac
2897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002900 grep -v '^ *+' conftest.er1 >conftest.err
2901 rm -f conftest.er1
2902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00002904 (exit $ac_status); } && {
2905 test -z "$ac_c_werror_flag" ||
2906 test ! -s conftest.err
2907 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002908 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002909else
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002911sed 's/^/| /' conftest.$ac_ext >&5
2912
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 CFLAGS=""
2914 cat >conftest.$ac_ext <<_ACEOF
2915/* confdefs.h. */
2916_ACEOF
2917cat confdefs.h >>conftest.$ac_ext
2918cat >>conftest.$ac_ext <<_ACEOF
2919/* end confdefs.h. */
2920
2921int
2922main ()
2923{
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002930if { (ac_try="$ac_compile"
2931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
2935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2936 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937 ac_status=$?
2938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
2941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00002942 (exit $ac_status); } && {
2943 test -z "$ac_c_werror_flag" ||
2944 test ! -s conftest.err
2945 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002946 :
2947else
2948 echo "$as_me: failed program was:" >&5
2949sed 's/^/| /' conftest.$ac_ext >&5
2950
2951 ac_c_werror_flag=$ac_save_c_werror_flag
2952 CFLAGS="-g"
2953 cat >conftest.$ac_ext <<_ACEOF
2954/* confdefs.h. */
2955_ACEOF
2956cat confdefs.h >>conftest.$ac_ext
2957cat >>conftest.$ac_ext <<_ACEOF
2958/* end confdefs.h. */
2959
2960int
2961main ()
2962{
2963
2964 ;
2965 return 0;
2966}
2967_ACEOF
2968rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002969if { (ac_try="$ac_compile"
2970case "(($ac_try" in
2971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2972 *) ac_try_echo=$ac_try;;
2973esac
2974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2975 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002976 ac_status=$?
2977 grep -v '^ *+' conftest.er1 >conftest.err
2978 rm -f conftest.er1
2979 cat conftest.err >&5
2980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00002981 (exit $ac_status); } && {
2982 test -z "$ac_c_werror_flag" ||
2983 test ! -s conftest.err
2984 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002985 ac_cv_prog_cc_g=yes
2986else
2987 echo "$as_me: failed program was:" >&5
2988sed 's/^/| /' conftest.$ac_ext >&5
2989
2990
Guido van Rossum627b2d71993-12-24 10:39:16 +00002991fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002994fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002995
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997fi
2998
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003000 ac_c_werror_flag=$ac_save_c_werror_flag
3001fi
3002{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3003echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003004if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003006elif test $ac_cv_prog_cc_g = yes; then
3007 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003008 CFLAGS="-g -O2"
3009 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003010 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011 fi
3012else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013 if test "$GCC" = yes; then
3014 CFLAGS="-O2"
3015 else
3016 CFLAGS=
3017 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003018fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3020echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3021if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003022 echo $ECHO_N "(cached) $ECHO_C" >&6
3023else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003025ac_save_CC=$CC
3026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003027/* confdefs.h. */
3028_ACEOF
3029cat confdefs.h >>conftest.$ac_ext
3030cat >>conftest.$ac_ext <<_ACEOF
3031/* end confdefs.h. */
3032#include <stdarg.h>
3033#include <stdio.h>
3034#include <sys/types.h>
3035#include <sys/stat.h>
3036/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3037struct buf { int x; };
3038FILE * (*rcsopen) (struct buf *, struct stat *, int);
3039static char *e (p, i)
3040 char **p;
3041 int i;
3042{
3043 return p[i];
3044}
3045static char *f (char * (*g) (char **, int), char **p, ...)
3046{
3047 char *s;
3048 va_list v;
3049 va_start (v,p);
3050 s = g (p, va_arg (v,int));
3051 va_end (v);
3052 return s;
3053}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003054
3055/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3056 function prototypes and stuff, but not '\xHH' hex character constants.
3057 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003059 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3060 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003062int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3063
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003064/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3065 inside strings and character constants. */
3066#define FOO(x) 'x'
3067int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3068
Skip Montanaro6dead952003-09-25 14:50:04 +00003069int test (int i, double x);
3070struct s1 {int (*f) (int a);};
3071struct s2 {int (*f) (double a);};
3072int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3073int argc;
3074char **argv;
3075int
3076main ()
3077{
3078return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3079 ;
3080 return 0;
3081}
3082_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3084 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003085do
3086 CC="$ac_save_CC $ac_arg"
3087 rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003088if { (ac_try="$ac_compile"
3089case "(($ac_try" in
3090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3091 *) ac_try_echo=$ac_try;;
3092esac
3093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3094 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003096 grep -v '^ *+' conftest.er1 >conftest.err
3097 rm -f conftest.er1
3098 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00003100 (exit $ac_status); } && {
3101 test -z "$ac_c_werror_flag" ||
3102 test ! -s conftest.err
3103 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003105else
3106 echo "$as_me: failed program was:" >&5
3107sed 's/^/| /' conftest.$ac_ext >&5
3108
Thomas Wouters477c8d52006-05-27 19:21:47 +00003109
Skip Montanaro6dead952003-09-25 14:50:04 +00003110fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003111
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003112rm -f core conftest.err conftest.$ac_objext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003113 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003114done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003116CC=$ac_save_CC
3117
3118fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119# AC_CACHE_VAL
3120case "x$ac_cv_prog_cc_c89" in
3121 x)
3122 { echo "$as_me:$LINENO: result: none needed" >&5
3123echo "${ECHO_T}none needed" >&6; } ;;
3124 xno)
3125 { echo "$as_me:$LINENO: result: unsupported" >&5
3126echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003127 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128 CC="$CC $ac_cv_prog_cc_c89"
3129 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3130echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003131esac
3132
Skip Montanaro6dead952003-09-25 14:50:04 +00003133
Martin v. Löwis11437992002-04-12 09:54:03 +00003134ac_ext=c
3135ac_cpp='$CPP $CPPFLAGS'
3136ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3137ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3138ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003139
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003140
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003141
3142
Thomas Wouters477c8d52006-05-27 19:21:47 +00003143{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3144echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003145
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003147if test "${with_cxx_main+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003149
3150 case $withval in
3151 no) with_cxx_main=no
3152 MAINCC='$(CC)';;
3153 yes) with_cxx_main=yes
3154 MAINCC='$(CXX)';;
3155 *) with_cxx_main=yes
3156 MAINCC=$withval
3157 if test -z "$CXX"
3158 then
3159 CXX=$withval
3160 fi;;
3161 esac
3162else
3163
3164 with_cxx_main=no
3165 MAINCC='$(CC)'
3166
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167fi
3168
3169{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3170echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003171
3172preset_cxx="$CXX"
3173if test -z "$CXX"
3174then
3175 case "$CC" in
3176 gcc) # Extract the first word of "g++", so it can be a program name with args.
3177set dummy g++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003180if test "${ac_cv_path_CXX+set}" = set; then
3181 echo $ECHO_N "(cached) $ECHO_C" >&6
3182else
3183 case $CXX in
3184 [\\/]* | ?:[\\/]*)
3185 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3186 ;;
3187 *)
3188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3189for as_dir in notfound
3190do
3191 IFS=$as_save_IFS
3192 test -z "$as_dir" && as_dir=.
3193 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00003194 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003195 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3196 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3197 break 2
3198 fi
3199done
3200done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202
3203 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3204 ;;
3205esac
3206fi
3207CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003208if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003209 { echo "$as_me:$LINENO: result: $CXX" >&5
3210echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003211else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 { echo "$as_me:$LINENO: result: no" >&5
3213echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003214fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003216 ;;
3217 cc) # Extract the first word of "c++", so it can be a program name with args.
3218set dummy c++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003221if test "${ac_cv_path_CXX+set}" = set; then
3222 echo $ECHO_N "(cached) $ECHO_C" >&6
3223else
3224 case $CXX in
3225 [\\/]* | ?:[\\/]*)
3226 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3227 ;;
3228 *)
3229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3230for as_dir in notfound
3231do
3232 IFS=$as_save_IFS
3233 test -z "$as_dir" && as_dir=.
3234 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00003235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003236 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3237 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3238 break 2
3239 fi
3240done
3241done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003243
3244 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3245 ;;
3246esac
3247fi
3248CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003249if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003250 { echo "$as_me:$LINENO: result: $CXX" >&5
3251echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 { echo "$as_me:$LINENO: result: no" >&5
3254echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257 ;;
3258 esac
3259 if test "$CXX" = "notfound"
3260 then
3261 CXX=""
3262 fi
3263fi
3264if test -z "$CXX"
3265then
3266 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3267do
3268 # Extract the first word of "$ac_prog", so it can be a program name with args.
3269set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003270{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3271echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272if test "${ac_cv_prog_CXX+set}" = set; then
3273 echo $ECHO_N "(cached) $ECHO_C" >&6
3274else
3275 if test -n "$CXX"; then
3276 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3277else
3278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in $PATH
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
3283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00003284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003285 ac_cv_prog_CXX="$ac_prog"
3286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3287 break 2
3288 fi
3289done
3290done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003291IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292
3293fi
3294fi
3295CXX=$ac_cv_prog_CXX
3296if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003297 { echo "$as_me:$LINENO: result: $CXX" >&5
3298echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003299else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003300 { echo "$as_me:$LINENO: result: no" >&5
3301echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302fi
3303
Thomas Wouters477c8d52006-05-27 19:21:47 +00003304
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003305 test -n "$CXX" && break
3306done
3307test -n "$CXX" || CXX="notfound"
3308
3309 if test "$CXX" = "notfound"
3310 then
3311 CXX=""
3312 fi
3313fi
3314if test "$preset_cxx" != "$CXX"
3315then
3316 { echo "$as_me:$LINENO: WARNING:
3317
3318 By default, distutils will build C++ extension modules with \"$CXX\".
3319 If this is not intended, then set CXX on the configure command line.
3320 " >&5
3321echo "$as_me: WARNING:
3322
3323 By default, distutils will build C++ extension modules with \"$CXX\".
3324 If this is not intended, then set CXX on the configure command line.
3325 " >&2;}
3326fi
3327
3328
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003329# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003330
3331ac_ext=c
3332ac_cpp='$CPP $CPPFLAGS'
3333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3335ac_compiler_gnu=$ac_cv_c_compiler_gnu
Thomas Wouters477c8d52006-05-27 19:21:47 +00003336{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3337echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# On Suns, sometimes $CPP names a directory.
3339if test -n "$CPP" && test -d "$CPP"; then
3340 CPP=
3341fi
3342if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003343 if test "${ac_cv_prog_CPP+set}" = set; then
3344 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003345else
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 # Double quotes because CPP needs to be expanded
3347 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3348 do
3349 ac_preproc_ok=false
3350for ac_c_preproc_warn_flag in '' yes
3351do
3352 # Use a header file that comes with gcc, so configuring glibc
3353 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003354 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3355 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003356 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003357 # not just through cpp. "Syntax error" is here to catch this case.
3358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003359/* confdefs.h. */
3360_ACEOF
3361cat confdefs.h >>conftest.$ac_ext
3362cat >>conftest.$ac_ext <<_ACEOF
3363/* end confdefs.h. */
3364#ifdef __STDC__
3365# include <limits.h>
3366#else
3367# include <assert.h>
3368#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003369 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003370_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003371if { (ac_try="$ac_cpp conftest.$ac_ext"
3372case "(($ac_try" in
3373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3374 *) ac_try_echo=$ac_try;;
3375esac
3376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3377 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003379 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003380 rm -f conftest.er1
3381 cat conftest.err >&5
3382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00003383 (exit $ac_status); } >/dev/null && {
3384 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3385 test ! -s conftest.err
3386 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387 :
3388else
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003390sed 's/^/| /' conftest.$ac_ext >&5
3391
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 # Broken: fails on valid input.
3393continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003394fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003395
Martin v. Löwis11437992002-04-12 09:54:03 +00003396rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003397
Thomas Wouters477c8d52006-05-27 19:21:47 +00003398 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 # can be detected and how.
3400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003401/* confdefs.h. */
3402_ACEOF
3403cat confdefs.h >>conftest.$ac_ext
3404cat >>conftest.$ac_ext <<_ACEOF
3405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003406#include <ac_nonexistent.h>
3407_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003408if { (ac_try="$ac_cpp conftest.$ac_ext"
3409case "(($ac_try" in
3410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411 *) ac_try_echo=$ac_try;;
3412esac
3413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3414 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003416 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 rm -f conftest.er1
3418 cat conftest.err >&5
3419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00003420 (exit $ac_status); } >/dev/null && {
3421 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3422 test ! -s conftest.err
3423 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 # Broken: success on invalid input.
3425continue
3426else
3427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003428sed 's/^/| /' conftest.$ac_ext >&5
3429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 # Passes both tests.
3431ac_preproc_ok=:
3432break
3433fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435rm -f conftest.err conftest.$ac_ext
3436
3437done
3438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3439rm -f conftest.err conftest.$ac_ext
3440if $ac_preproc_ok; then
3441 break
3442fi
3443
3444 done
3445 ac_cv_prog_CPP=$CPP
3446
3447fi
3448 CPP=$ac_cv_prog_CPP
3449else
3450 ac_cv_prog_CPP=$CPP
3451fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003452{ echo "$as_me:$LINENO: result: $CPP" >&5
3453echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003454ac_preproc_ok=false
3455for ac_c_preproc_warn_flag in '' yes
3456do
3457 # Use a header file that comes with gcc, so configuring glibc
3458 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003459 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3460 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 # On the NeXT, cc -E runs the code through the compiler's parser,
3462 # not just through cpp. "Syntax error" is here to catch this case.
3463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003464/* confdefs.h. */
3465_ACEOF
3466cat confdefs.h >>conftest.$ac_ext
3467cat >>conftest.$ac_ext <<_ACEOF
3468/* end confdefs.h. */
3469#ifdef __STDC__
3470# include <limits.h>
3471#else
3472# include <assert.h>
3473#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003474 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003475_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003476if { (ac_try="$ac_cpp conftest.$ac_ext"
3477case "(($ac_try" in
3478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3479 *) ac_try_echo=$ac_try;;
3480esac
3481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003484 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 rm -f conftest.er1
3486 cat conftest.err >&5
3487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00003488 (exit $ac_status); } >/dev/null && {
3489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3490 test ! -s conftest.err
3491 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 :
3493else
3494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003495sed 's/^/| /' conftest.$ac_ext >&5
3496
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 # Broken: fails on valid input.
3498continue
3499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003500
Martin v. Löwis11437992002-04-12 09:54:03 +00003501rm -f conftest.err conftest.$ac_ext
3502
Thomas Wouters477c8d52006-05-27 19:21:47 +00003503 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # can be detected and how.
3505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003506/* confdefs.h. */
3507_ACEOF
3508cat confdefs.h >>conftest.$ac_ext
3509cat >>conftest.$ac_ext <<_ACEOF
3510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003511#include <ac_nonexistent.h>
3512_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003513if { (ac_try="$ac_cpp conftest.$ac_ext"
3514case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517esac
3518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3519 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003521 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 rm -f conftest.er1
3523 cat conftest.err >&5
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00003525 (exit $ac_status); } >/dev/null && {
3526 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3527 test ! -s conftest.err
3528 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 # Broken: success on invalid input.
3530continue
3531else
3532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003533sed 's/^/| /' conftest.$ac_ext >&5
3534
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 # Passes both tests.
3536ac_preproc_ok=:
3537break
3538fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540rm -f conftest.err conftest.$ac_ext
3541
3542done
3543# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3544rm -f conftest.err conftest.$ac_ext
3545if $ac_preproc_ok; then
3546 :
3547else
Skip Montanaro6dead952003-09-25 14:50:04 +00003548 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3549See \`config.log' for more details." >&5
3550echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3551See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 { (exit 1); exit 1; }; }
3553fi
3554
3555ac_ext=c
3556ac_cpp='$CPP $CPPFLAGS'
3557ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3558ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3559ac_compiler_gnu=$ac_cv_c_compiler_gnu
3560
3561
Thomas Wouters477c8d52006-05-27 19:21:47 +00003562{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3563echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3564if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003565 echo $ECHO_N "(cached) $ECHO_C" >&6
3566else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003567 # Extract the first word of "grep ggrep" to use in msg output
3568if test -z "$GREP"; then
3569set dummy grep ggrep; ac_prog_name=$2
3570if test "${ac_cv_path_GREP+set}" = set; then
3571 echo $ECHO_N "(cached) $ECHO_C" >&6
3572else
3573 ac_path_GREP_found=false
3574# Loop through the user's path and test for each of PROGNAME-LIST
3575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3577do
3578 IFS=$as_save_IFS
3579 test -z "$as_dir" && as_dir=.
3580 for ac_prog in grep ggrep; do
3581 for ac_exec_ext in '' $ac_executable_extensions; do
3582 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Thomas Wouters89f507f2006-12-13 04:49:30 +00003583 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584 # Check for GNU ac_path_GREP and select it if it is found.
3585 # Check for GNU $ac_path_GREP
3586case `"$ac_path_GREP" --version 2>&1` in
3587*GNU*)
3588 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3589*)
3590 ac_count=0
3591 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3592 while :
3593 do
3594 cat "conftest.in" "conftest.in" >"conftest.tmp"
3595 mv "conftest.tmp" "conftest.in"
3596 cp "conftest.in" "conftest.nl"
3597 echo 'GREP' >> "conftest.nl"
3598 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3599 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3600 ac_count=`expr $ac_count + 1`
3601 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3602 # Best one so far, save it but keep looking for a better one
3603 ac_cv_path_GREP="$ac_path_GREP"
3604 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003605 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003606 # 10*(2^10) chars as input seems more than enough
3607 test $ac_count -gt 10 && break
3608 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003609 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003610esac
3611
3612
3613 $ac_path_GREP_found && break 3
3614 done
3615done
3616
3617done
3618IFS=$as_save_IFS
3619
3620
Skip Montanaro6dead952003-09-25 14:50:04 +00003621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003622
3623GREP="$ac_cv_path_GREP"
3624if test -z "$GREP"; then
3625 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3626echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3627 { (exit 1); exit 1; }; }
3628fi
3629
3630else
3631 ac_cv_path_GREP=$GREP
3632fi
3633
3634
3635fi
3636{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3637echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3638 GREP="$ac_cv_path_GREP"
3639
3640
3641{ echo "$as_me:$LINENO: checking for egrep" >&5
3642echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3643if test "${ac_cv_path_EGREP+set}" = set; then
3644 echo $ECHO_N "(cached) $ECHO_C" >&6
3645else
3646 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3647 then ac_cv_path_EGREP="$GREP -E"
3648 else
3649 # Extract the first word of "egrep" to use in msg output
3650if test -z "$EGREP"; then
3651set dummy egrep; ac_prog_name=$2
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 ac_path_EGREP_found=false
3656# Loop through the user's path and test for each of PROGNAME-LIST
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_prog in egrep; do
3663 for ac_exec_ext in '' $ac_executable_extensions; do
3664 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Thomas Wouters89f507f2006-12-13 04:49:30 +00003665 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Thomas Wouters477c8d52006-05-27 19:21:47 +00003666 # Check for GNU ac_path_EGREP and select it if it is found.
3667 # Check for GNU $ac_path_EGREP
3668case `"$ac_path_EGREP" --version 2>&1` in
3669*GNU*)
3670 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3671*)
3672 ac_count=0
3673 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3674 while :
3675 do
3676 cat "conftest.in" "conftest.in" >"conftest.tmp"
3677 mv "conftest.tmp" "conftest.in"
3678 cp "conftest.in" "conftest.nl"
3679 echo 'EGREP' >> "conftest.nl"
3680 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3681 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3682 ac_count=`expr $ac_count + 1`
3683 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3684 # Best one so far, save it but keep looking for a better one
3685 ac_cv_path_EGREP="$ac_path_EGREP"
3686 ac_path_EGREP_max=$ac_count
3687 fi
3688 # 10*(2^10) chars as input seems more than enough
3689 test $ac_count -gt 10 && break
3690 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003691 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003692esac
3693
3694
3695 $ac_path_EGREP_found && break 3
3696 done
3697done
3698
3699done
3700IFS=$as_save_IFS
3701
3702
3703fi
3704
3705EGREP="$ac_cv_path_EGREP"
3706if test -z "$EGREP"; then
3707 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3708echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3709 { (exit 1); exit 1; }; }
3710fi
3711
3712else
3713 ac_cv_path_EGREP=$EGREP
3714fi
3715
3716
3717 fi
3718fi
3719{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3720echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3721 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003722
3723
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Thomas Wouters477c8d52006-05-27 19:21:47 +00003725{ echo "$as_me:$LINENO: checking for AIX" >&5
3726echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003728/* confdefs.h. */
3729_ACEOF
3730cat confdefs.h >>conftest.$ac_ext
3731cat >>conftest.$ac_ext <<_ACEOF
3732/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003733#ifdef _AIX
3734 yes
3735#endif
3736
Martin v. Löwis11437992002-04-12 09:54:03 +00003737_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003739 $EGREP "yes" >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003740 { echo "$as_me:$LINENO: result: yes" >&5
3741echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003742cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003743#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003744_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003745
3746else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003747 { echo "$as_me:$LINENO: result: no" >&5
3748echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003749fi
3750rm -f conftest*
3751
Michael W. Hudson54241132001-12-07 15:38:26 +00003752
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003753
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003754# Check for unsupported systems
3755case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003756Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003757 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3758 echo See README for details.
3759 exit 1;;
3760esac
3761
Michael W. Hudson54241132001-12-07 15:38:26 +00003762
Thomas Wouters477c8d52006-05-27 19:21:47 +00003763{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3764echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003765
Thomas Wouters477c8d52006-05-27 19:21:47 +00003766# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003767if test "${with_suffix+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003768 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003769 case $withval in
3770 no) EXEEXT=;;
3771 yes) EXEEXT=.exe;;
3772 *) EXEEXT=$withval;;
3773 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00003774fi
3775
3776{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3777echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003778
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003779# Test whether we're running on a non-case-sensitive system, in which
3780# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003781
Thomas Wouters477c8d52006-05-27 19:21:47 +00003782{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3783echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003784if test ! -d CaseSensitiveTestDir; then
3785mkdir CaseSensitiveTestDir
3786fi
3787
3788if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003789then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003790 { echo "$as_me:$LINENO: result: yes" >&5
3791echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003792 BUILDEXEEXT=.exe
3793else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003794 { echo "$as_me:$LINENO: result: no" >&5
3795echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003796 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003797fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003798rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003799
Guido van Rossumdd997f71998-10-07 19:58:26 +00003800case $MACHDEP in
3801bsdos*)
3802 case $CC in
3803 gcc) CC="$CC -D_HAVE_BSDI";;
3804 esac;;
3805esac
3806
Guido van Rossum24b1e751997-08-21 02:29:16 +00003807case $ac_sys_system in
3808hp*|HP*)
3809 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003810 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003811 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003812Monterey*)
3813 case $CC in
3814 cc) CC="$CC -Wl,-Bexport";;
3815 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003816SunOS*)
3817 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
3819cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003820#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003821_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003822
3823 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003824esac
3825
Michael W. Hudson54241132001-12-07 15:38:26 +00003826
3827
Thomas Wouters477c8d52006-05-27 19:21:47 +00003828{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3829echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003830if test -z "$LIBRARY"
3831then
3832 LIBRARY='libpython$(VERSION).a'
3833fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003834{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3835echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003836
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003837# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003838# name of the library into which to insert object files). BLDLIBRARY is also
3839# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3840# is blank as the main program is not linked directly against LDLIBRARY.
3841# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3842# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3843# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3844# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003845#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003846# RUNSHARED is used to run shared python without installed libraries
3847#
3848# INSTSONAME is the name of the shared library that will be use to install
3849# on the system - some systems like version suffix, others don't
3850
3851
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
3853
3854
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003855
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003856LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003857BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003858INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003859DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003860LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003861RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003862
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003863# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003864# If CXX is set, and if it is needed to link a main function that was
3865# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3866# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003867# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003868# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003869
Thomas Wouters477c8d52006-05-27 19:21:47 +00003870{ echo "$as_me:$LINENO: checking LINKCC" >&5
3871echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872if test -z "$LINKCC"
3873then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003874 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003875 case $ac_sys_system in
3876 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003877 exp_extra="\"\""
3878 if test $ac_sys_release -ge 5 -o \
3879 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3880 exp_extra="."
3881 fi
3882 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003883 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003884 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003885 esac
3886fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003887{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3888echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003889
Thomas Wouters477c8d52006-05-27 19:21:47 +00003890{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3891echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3892# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003893if test "${enable_shared+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003894 enableval=$enable_shared;
3895fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003896
Martin v. Löwis1142de32002-03-29 16:28:31 +00003897
3898if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003899then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003900 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003901 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003902 enable_shared="yes";;
3903 *)
3904 enable_shared="no";;
3905 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003907{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3908echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003909
Thomas Wouters477c8d52006-05-27 19:21:47 +00003910{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3911echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3912# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003913if test "${enable_profiling+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003914 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003915 CC="$CC -pg"
3916 if test "$cross_compiling" = yes; then
3917 ac_enable_profiling="no"
3918else
3919 cat >conftest.$ac_ext <<_ACEOF
3920/* confdefs.h. */
3921_ACEOF
3922cat confdefs.h >>conftest.$ac_ext
3923cat >>conftest.$ac_ext <<_ACEOF
3924/* end confdefs.h. */
3925int main() { return 0; }
3926_ACEOF
3927rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928if { (ac_try="$ac_link"
3929case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
3933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3934 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003935 ac_status=$?
3936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938 { (case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
3947 ac_enable_profiling="yes"
3948else
3949 echo "$as_me: program exited with status $ac_status" >&5
3950echo "$as_me: failed program was:" >&5
3951sed 's/^/| /' conftest.$ac_ext >&5
3952
3953( exit $ac_status )
3954ac_enable_profiling="no"
3955fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003957fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003958
3959
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003960 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003961fi
3962
3963{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3964echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003965
3966case "$ac_enable_profiling" in
3967 "yes")
3968 BASECFLAGS="-pg $BASECFLAGS"
3969 LDFLAGS="-pg $LDFLAGS"
3970 ;;
3971esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003972
Thomas Wouters477c8d52006-05-27 19:21:47 +00003973{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3974echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003975
Guido van Rossumb8552162001-09-05 14:58:11 +00003976# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3977# library that we build, but we do not want to link against it (we
3978# will find it with a -framework option). For this reason there is an
3979# extra variable BLDLIBRARY against which Python and the extension
3980# modules are linked, BLDLIBRARY. This is normally the same as
3981# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003982if test "$enable_framework"
3983then
3984 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003985 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003986 BLDLIBRARY=''
3987else
3988 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003989fi
Jack Jansene578a632001-08-15 01:27:14 +00003990
Martin v. Löwis1142de32002-03-29 16:28:31 +00003991# Other platforms follow
3992if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003993
3994cat >>confdefs.h <<\_ACEOF
3995#define Py_ENABLE_SHARED 1
3996_ACEOF
3997
Martin v. Löwis1142de32002-03-29 16:28:31 +00003998 case $ac_sys_system in
3999 BeOS*)
4000 LDLIBRARY='libpython$(VERSION).so'
4001 ;;
4002 CYGWIN*)
4003 LDLIBRARY='libpython$(VERSION).dll.a'
4004 DLLLIBRARY='libpython$(VERSION).dll'
4005 ;;
4006 SunOS*)
4007 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004008 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004009 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004010 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004011 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004012 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004013 LDLIBRARY='libpython$(VERSION).so'
4014 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004015 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004016 case $ac_sys_system in
4017 FreeBSD*)
4018 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4019 ;;
4020 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004021 INSTSONAME="$LDLIBRARY".$SOVERSION
4022 ;;
4023 hp*|HP*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00004024 case `uname -m` in
4025 ia64)
4026 LDLIBRARY='libpython$(VERSION).so'
4027 ;;
4028 *)
4029 LDLIBRARY='libpython$(VERSION).sl'
4030 ;;
4031 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004032 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004033 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004034 ;;
4035 OSF*)
4036 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004037 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004038 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004039 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004040 atheos*)
4041 LDLIBRARY='libpython$(VERSION).so'
4042 BLDLIBRARY='-L. -lpython$(VERSION)'
4043 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4044 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004045 esac
Jason Tishler30765592003-09-04 11:04:06 +00004046else # shared is disabled
4047 case $ac_sys_system in
4048 CYGWIN*)
4049 BLDLIBRARY='$(LIBRARY)'
4050 LDLIBRARY='libpython$(VERSION).dll.a'
4051 ;;
4052 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004053fi
4054
Thomas Wouters477c8d52006-05-27 19:21:47 +00004055{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4056echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004057
Martin v. Löwis11437992002-04-12 09:54:03 +00004058if test -n "$ac_tool_prefix"; then
4059 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4060set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004061{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004063if test "${ac_cv_prog_RANLIB+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
4066 if test -n "$RANLIB"; then
4067 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4068else
Martin v. Löwis11437992002-04-12 09:54:03 +00004069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070for as_dir in $PATH
4071do
4072 IFS=$as_save_IFS
4073 test -z "$as_dir" && as_dir=.
4074 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00004075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004076 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4077 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4078 break 2
4079 fi
4080done
4081done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004082IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004083
Guido van Rossum627b2d71993-12-24 10:39:16 +00004084fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004086RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087if test -n "$RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004088 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4089echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004091 { echo "$as_me:$LINENO: result: no" >&5
4092echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004093fi
4094
Thomas Wouters477c8d52006-05-27 19:21:47 +00004095
Martin v. Löwis11437992002-04-12 09:54:03 +00004096fi
4097if test -z "$ac_cv_prog_RANLIB"; then
4098 ac_ct_RANLIB=$RANLIB
4099 # Extract the first word of "ranlib", so it can be a program name with args.
4100set dummy ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004101{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004103if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4104 echo $ECHO_N "(cached) $ECHO_C" >&6
4105else
4106 if test -n "$ac_ct_RANLIB"; then
4107 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4108else
4109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4110for as_dir in $PATH
4111do
4112 IFS=$as_save_IFS
4113 test -z "$as_dir" && as_dir=.
4114 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00004115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 ac_cv_prog_ac_ct_RANLIB="ranlib"
4117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4118 break 2
4119 fi
4120done
4121done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004122IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004123
Martin v. Löwis11437992002-04-12 09:54:03 +00004124fi
4125fi
4126ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4127if test -n "$ac_ct_RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004128 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4129echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004130else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004131 { echo "$as_me:$LINENO: result: no" >&5
4132echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134
Thomas Wouters477c8d52006-05-27 19:21:47 +00004135 if test "x$ac_ct_RANLIB" = x; then
4136 RANLIB=":"
4137 else
4138 case $cross_compiling:$ac_tool_warned in
4139yes:)
4140{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4141whose name does not start with the host triplet. If you think this
4142configuration is useful to you, please write to autoconf@gnu.org." >&5
4143echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4144whose name does not start with the host triplet. If you think this
4145configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4146ac_tool_warned=yes ;;
4147esac
4148 RANLIB=$ac_ct_RANLIB
4149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004150else
4151 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153
4154
Guido van Rossum7f43da71994-08-01 12:15:30 +00004155for ac_prog in ar aal
4156do
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004159{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161if test "${ac_cv_prog_AR+set}" = set; then
4162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163else
4164 if test -n "$AR"; then
4165 ac_cv_prog_AR="$AR" # Let the user override the test.
4166else
Martin v. Löwis11437992002-04-12 09:54:03 +00004167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168for as_dir in $PATH
4169do
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00004173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 ac_cv_prog_AR="$ac_prog"
4175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4176 break 2
4177 fi
4178done
4179done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004180IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
Guido van Rossum7f43da71994-08-01 12:15:30 +00004182fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004184AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185if test -n "$AR"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004186 { echo "$as_me:$LINENO: result: $AR" >&5
4187echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004189 { echo "$as_me:$LINENO: result: no" >&5
4190echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004192
Thomas Wouters477c8d52006-05-27 19:21:47 +00004193
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004195done
4196test -n "$AR" || AR="ar"
4197
Michael W. Hudson54241132001-12-07 15:38:26 +00004198
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004199
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004200# Extract the first word of "svnversion", so it can be a program name with args.
4201set dummy svnversion; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004204if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4205 echo $ECHO_N "(cached) $ECHO_C" >&6
4206else
4207 if test -n "$SVNVERSION"; then
4208 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4209else
4210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211for as_dir in $PATH
4212do
4213 IFS=$as_save_IFS
4214 test -z "$as_dir" && as_dir=.
4215 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00004216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004217 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4219 break 2
4220 fi
4221done
4222done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004223IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004224
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004225 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004226fi
4227fi
4228SVNVERSION=$ac_cv_prog_SVNVERSION
4229if test -n "$SVNVERSION"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004230 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4231echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004232else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004233 { echo "$as_me:$LINENO: result: no" >&5
4234echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236
Thomas Wouters477c8d52006-05-27 19:21:47 +00004237
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004238if test $SVNVERSION = found
4239then
4240 SVNVERSION="svnversion \$(srcdir)"
4241else
4242 SVNVERSION="echo exported"
4243fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244
Neil Schemenauera42c8272001-03-31 00:01:55 +00004245case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004246bsdos*|hp*|HP*)
4247 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004248 if test -z "$INSTALL"
4249 then
4250 INSTALL="${srcdir}/install-sh -c"
4251 fi
4252esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004253ac_aux_dir=
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004254for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4255 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004256 ac_aux_dir=$ac_dir
4257 ac_install_sh="$ac_aux_dir/install-sh -c"
4258 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004259 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004260 ac_aux_dir=$ac_dir
4261 ac_install_sh="$ac_aux_dir/install.sh -c"
4262 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004263 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 ac_aux_dir=$ac_dir
4265 ac_install_sh="$ac_aux_dir/shtool install -c"
4266 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004267 fi
4268done
4269if test -z "$ac_aux_dir"; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004270 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4271echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004273fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004274
4275# These three variables are undocumented and unsupported,
4276# and are intended to be withdrawn in a future Autoconf release.
4277# They can cause serious problems if a builder's source tree is in a directory
4278# whose full name contains unusual characters.
4279ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4280ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4281ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4282
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004283
4284# Find a good install program. We prefer a C program (faster),
4285# so one script is as good as another. But avoid the broken or
4286# incompatible versions:
4287# SysV /etc/install, /usr/sbin/install
4288# SunOS /usr/etc/install
4289# IRIX /sbin/install
4290# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004291# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4293# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4294# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004296# ./install, which can be erroneously created by make from ./install.sh.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004297{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4298echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004299if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004300if test "${ac_cv_path_install+set}" = set; then
4301 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004302else
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
4308 # Account for people who put trailing slashes in PATH elements.
4309case $as_dir/ in
4310 ./ | .// | /cC/* | \
4311 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 /usr/ucb/* ) ;;
4314 *)
4315 # OSF1 and SCO ODT 3.0 have their own names for install.
4316 # Don't use installbsd from OSF since it installs stuff as root
4317 # by default.
4318 for ac_prog in ginstall scoinst install; do
4319 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +00004320 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 if test $ac_prog = install &&
4322 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4323 # AIX install. It has an incompatible calling convention.
4324 :
4325 elif test $ac_prog = install &&
4326 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4327 # program-specific install script used by HP pwplus--don't use.
4328 :
4329 else
4330 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4331 break 3
4332 fi
4333 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004334 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 done
4336 ;;
4337esac
4338done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004341
4342fi
4343 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004345 else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004346 # As a last resort, use the slow shell script. Don't cache a
4347 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004348 # break other packages using the cache if that directory is
Thomas Wouters477c8d52006-05-27 19:21:47 +00004349 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004350 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004351 fi
4352fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004353{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4354echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004355
4356# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4357# It thinks the first close brace ends the variable substitution.
4358test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4359
Martin v. Löwis11437992002-04-12 09:54:03 +00004360test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004361
4362test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4363
Michael W. Hudson54241132001-12-07 15:38:26 +00004364
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004365# Not every filesystem supports hard links
4366
4367if test -z "$LN" ; then
4368 case $ac_sys_system in
4369 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004370 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004371 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004372 *) LN=ln;;
4373 esac
4374fi
4375
Fred Drake109d9862001-07-11 06:27:56 +00004376# Check for --with-pydebug
Thomas Wouters477c8d52006-05-27 19:21:47 +00004377{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4378echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
Thomas Wouters477c8d52006-05-27 19:21:47 +00004380# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004381if test "${with_pydebug+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004382 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004383if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004384then
4385
4386cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004387#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004388_ACEOF
4389
Thomas Wouters477c8d52006-05-27 19:21:47 +00004390 { echo "$as_me:$LINENO: result: yes" >&5
4391echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004392 Py_DEBUG='true'
Thomas Wouters477c8d52006-05-27 19:21:47 +00004393else { echo "$as_me:$LINENO: result: no" >&5
4394echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004395fi
4396else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004397 { echo "$as_me:$LINENO: result: no" >&5
4398echo "${ECHO_T}no" >&6; }
4399fi
4400
Fred Drake109d9862001-07-11 06:27:56 +00004401
Skip Montanarodecc6a42003-01-01 20:07:49 +00004402# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4403# merged with this chunk of code?
4404
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004405# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004406# ------------------------
4407# (The following bit of code is complicated enough - please keep things
4408# indented properly. Just pretend you're editing Python code. ;-)
4409
4410# There are two parallel sets of case statements below, one that checks to
4411# see if OPT was set and one that does BASECFLAGS setting based upon
4412# compiler and platform. BASECFLAGS tweaks need to be made even if the
4413# user set OPT.
4414
4415# tweak OPT based on compiler and platform, only if the user didn't set
4416# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004417
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004418if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004419then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004420 case $GCC in
4421 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004422 if test "$CC" != 'g++' ; then
4423 STRICT_PROTO="-Wstrict-prototypes"
4424 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004425 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004426 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004427 if test "$Py_DEBUG" = 'true' ; then
4428 # Optimization messes up debuggers, so turn it off for
4429 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004430 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004431 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004432 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004433 fi
4434 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004435 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004436 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004437 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004438 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004439 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004440 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4441 ;;
4442 esac
Fred Drake109d9862001-07-11 06:27:56 +00004443 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004444
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004445 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 OPT="-O"
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004449
4450 # The current (beta) Monterey compiler dies with optimizations
4451 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 Monterey*)
4454 OPT=""
4455 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004456 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004458fi
4459
Skip Montanarodecc6a42003-01-01 20:07:49 +00004460
4461# tweak BASECFLAGS based on compiler and platform
4462case $GCC in
4463yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004464 # Python violates C99 rules, by casting between incompatible
4465 # pointer types. GCC may generate bad code as a result of that,
4466 # so use -fno-strict-aliasing if supported.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004467 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4468echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004469 ac_save_cc="$CC"
4470 CC="$CC -fno-strict-aliasing"
4471 if test "$cross_compiling" = yes; then
4472 ac_cv_no_strict_aliasing_ok=no
4473else
4474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004475/* confdefs.h. */
4476_ACEOF
4477cat confdefs.h >>conftest.$ac_ext
4478cat >>conftest.$ac_ext <<_ACEOF
4479/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004480int main() { return 0; }
4481_ACEOF
4482rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004483if { (ac_try="$ac_link"
4484case "(($ac_try" in
4485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4486 *) ac_try_echo=$ac_try;;
4487esac
4488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4489 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004493 { (case "(($ac_try" in
4494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4495 *) ac_try_echo=$ac_try;;
4496esac
4497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4498 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004499 ac_status=$?
4500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4501 (exit $ac_status); }; }; then
4502 ac_cv_no_strict_aliasing_ok=yes
4503else
4504 echo "$as_me: program exited with status $ac_status" >&5
4505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004506sed 's/^/| /' conftest.$ac_ext >&5
4507
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004508( exit $ac_status )
4509ac_cv_no_strict_aliasing_ok=no
4510fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004513
4514
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004515 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004516 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4517echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004518 if test $ac_cv_no_strict_aliasing_ok = yes
4519 then
4520 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4521 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522 case $ac_sys_system in
4523 SCO_SV*)
4524 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4525 ;;
4526 # is there any other compiler on Darwin besides gcc?
4527 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004528 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004529 if test "${enable_universalsdk}"; then
4530 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4531 fi
4532
Skip Montanarodecc6a42003-01-01 20:07:49 +00004533 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004534 OSF*)
4535 BASECFLAGS="$BASECFLAGS -mieee"
4536 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004537 esac
4538 ;;
4539
4540*)
4541 case $ac_sys_system in
4542 OpenUNIX*|UnixWare*)
4543 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4544 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004545 OSF*)
4546 BASECFLAGS="$BASECFLAGS -ieee -std"
4547 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004548 SCO_SV*)
4549 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4550 ;;
4551 esac
4552 ;;
4553esac
4554
Fred Drakee1ceaa02001-12-04 20:55:47 +00004555if test "$Py_DEBUG" = 'true'; then
4556 :
4557else
4558 OPT="-DNDEBUG $OPT"
4559fi
4560
Guido van Rossum563e7081996-09-10 18:20:48 +00004561if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004562then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004563 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004564fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004565
Neal Norwitz020c46a2006-01-07 21:39:28 +00004566# disable check for icc since it seems to pass, but generates a warning
4567if test "$CC" = icc
4568then
4569 ac_cv_opt_olimit_ok=no
4570fi
4571
Thomas Wouters477c8d52006-05-27 19:21:47 +00004572{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4573echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004574if test "${ac_cv_opt_olimit_ok+set}" = set; then
4575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004576else
4577 ac_save_cc="$CC"
4578CC="$CC -OPT:Olimit=0"
4579if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004580 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004581else
Martin v. Löwis11437992002-04-12 09:54:03 +00004582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004583/* confdefs.h. */
4584_ACEOF
4585cat confdefs.h >>conftest.$ac_ext
4586cat >>conftest.$ac_ext <<_ACEOF
4587/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004588int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004589_ACEOF
4590rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004591if { (ac_try="$ac_link"
4592case "(($ac_try" in
4593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4594 *) ac_try_echo=$ac_try;;
4595esac
4596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4597 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004601 { (case "(($ac_try" in
4602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4603 *) ac_try_echo=$ac_try;;
4604esac
4605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4606 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004610 ac_cv_opt_olimit_ok=yes
4611else
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 echo "$as_me: program exited with status $ac_status" >&5
4613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004614sed 's/^/| /' conftest.$ac_ext >&5
4615
Martin v. Löwis11437992002-04-12 09:54:03 +00004616( exit $ac_status )
4617ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004618fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00004620fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004621
4622
Guido van Rossum91922671997-10-09 20:24:13 +00004623CC="$ac_save_cc"
4624fi
4625
Thomas Wouters477c8d52006-05-27 19:21:47 +00004626{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4627echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004628if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004629 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004630 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4631 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4632 # environment?
4633 Darwin*)
4634 ;;
4635 *)
4636 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4637 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004638 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004639else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004640 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4641echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 if test "${ac_cv_olimit_ok+set}" = set; then
4643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004644else
4645 ac_save_cc="$CC"
4646 CC="$CC -Olimit 1500"
4647 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004648 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004649else
Martin v. Löwis11437992002-04-12 09:54:03 +00004650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004651/* confdefs.h. */
4652_ACEOF
4653cat confdefs.h >>conftest.$ac_ext
4654cat >>conftest.$ac_ext <<_ACEOF
4655/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004656int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004657_ACEOF
4658rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004659if { (ac_try="$ac_link"
4660case "(($ac_try" in
4661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4662 *) ac_try_echo=$ac_try;;
4663esac
4664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4665 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004666 ac_status=$?
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004669 { (case "(($ac_try" in
4670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4671 *) ac_try_echo=$ac_try;;
4672esac
4673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4674 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004675 ac_status=$?
4676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004678 ac_cv_olimit_ok=yes
4679else
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 echo "$as_me: program exited with status $ac_status" >&5
4681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004682sed 's/^/| /' conftest.$ac_ext >&5
4683
Martin v. Löwis11437992002-04-12 09:54:03 +00004684( exit $ac_status )
4685ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004686fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004688fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004689
4690
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004691 CC="$ac_save_cc"
4692fi
4693
Thomas Wouters477c8d52006-05-27 19:21:47 +00004694 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4695echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004696 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004697 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004698 fi
4699fi
4700
Thomas Wouters89f507f2006-12-13 04:49:30 +00004701# Check whether GCC supports PyArg_ParseTuple format
4702if test "$GCC" = "yes"
4703then
4704 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4705echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
4706 save_CFLAGS=$CFLAGS
4707 CFLAGS="$CFLAGS -Werror"
4708 cat >conftest.$ac_ext <<_ACEOF
4709/* confdefs.h. */
4710_ACEOF
4711cat confdefs.h >>conftest.$ac_ext
4712cat >>conftest.$ac_ext <<_ACEOF
4713/* end confdefs.h. */
4714
4715 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4716
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725rm -f conftest.$ac_objext
4726if { (ac_try="$ac_compile"
4727case "(($ac_try" in
4728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4729 *) ac_try_echo=$ac_try;;
4730esac
4731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4732 (eval "$ac_compile") 2>conftest.er1
4733 ac_status=$?
4734 grep -v '^ *+' conftest.er1 >conftest.err
4735 rm -f conftest.er1
4736 cat conftest.err >&5
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } && {
4739 test -z "$ac_c_werror_flag" ||
4740 test ! -s conftest.err
4741 } && test -s conftest.$ac_objext; then
4742
4743cat >>confdefs.h <<\_ACEOF
4744#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4745_ACEOF
4746
4747 { echo "$as_me:$LINENO: result: yes" >&5
4748echo "${ECHO_T}yes" >&6; }
4749else
4750 echo "$as_me: failed program was:" >&5
4751sed 's/^/| /' conftest.$ac_ext >&5
4752
4753 { echo "$as_me:$LINENO: result: no" >&5
4754echo "${ECHO_T}no" >&6; }
4755
4756fi
4757
4758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4759 CFLAGS=$save_CFLAGS
4760fi
4761
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004762# On some compilers, pthreads are available without further options
4763# (e.g. MacOS X). On some of these systems, the compiler will not
4764# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4765# So we have to see first whether pthreads are available without
4766# options before we can check whether -Kpthread improves anything.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004767{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4768echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004769if test "${ac_cv_pthread_is_default+set}" = set; then
4770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004771else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004772 if test "$cross_compiling" = yes; then
4773 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004774else
Martin v. Löwis11437992002-04-12 09:54:03 +00004775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004776/* confdefs.h. */
4777_ACEOF
4778cat confdefs.h >>conftest.$ac_ext
4779cat >>conftest.$ac_ext <<_ACEOF
4780/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004781
Martin v. Löwis130fb172001-07-19 11:00:41 +00004782#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004783
4784void* routine(void* p){return NULL;}
4785
4786int main(){
4787 pthread_t p;
4788 if(pthread_create(&p,NULL,routine,NULL)!=0)
4789 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004790 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004791 return 0;
4792}
4793
Martin v. Löwis11437992002-04-12 09:54:03 +00004794_ACEOF
4795rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004796if { (ac_try="$ac_link"
4797case "(($ac_try" in
4798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4799 *) ac_try_echo=$ac_try;;
4800esac
4801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4802 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004803 ac_status=$?
4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004806 { (case "(($ac_try" in
4807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4808 *) ac_try_echo=$ac_try;;
4809esac
4810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4811 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004815
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004816 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004817 ac_cv_kthread=no
4818 ac_cv_pthread=no
4819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004820else
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 echo "$as_me: program exited with status $ac_status" >&5
4822echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004823sed 's/^/| /' conftest.$ac_ext >&5
4824
Martin v. Löwis11437992002-04-12 09:54:03 +00004825( exit $ac_status )
4826ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004827fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004829fi
4830
Thomas Wouters477c8d52006-05-27 19:21:47 +00004831
4832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004833fi
4834
Thomas Wouters477c8d52006-05-27 19:21:47 +00004835{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4836echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004837
Michael W. Hudson54241132001-12-07 15:38:26 +00004838
Martin v. Löwis11437992002-04-12 09:54:03 +00004839if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004840then
4841 ac_cv_kpthread=no
4842else
4843# -Kpthread, if available, provides the right #defines
4844# and linker options to make pthread_create available
4845# Some compilers won't report that they do not support -Kpthread,
4846# so we need to run a program to see whether it really made the
4847# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004848{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4849echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004850if test "${ac_cv_kpthread+set}" = set; then
4851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004852else
4853 ac_save_cc="$CC"
4854CC="$CC -Kpthread"
4855if test "$cross_compiling" = yes; then
4856 ac_cv_kpthread=no
4857else
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004859/* confdefs.h. */
4860_ACEOF
4861cat confdefs.h >>conftest.$ac_ext
4862cat >>conftest.$ac_ext <<_ACEOF
4863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004864
4865#include <pthread.h>
4866
4867void* routine(void* p){return NULL;}
4868
4869int main(){
4870 pthread_t p;
4871 if(pthread_create(&p,NULL,routine,NULL)!=0)
4872 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004873 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004874 return 0;
4875}
4876
Martin v. Löwis11437992002-04-12 09:54:03 +00004877_ACEOF
4878rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004879if { (ac_try="$ac_link"
4880case "(($ac_try" in
4881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4882 *) ac_try_echo=$ac_try;;
4883esac
4884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4885 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 ac_status=$?
4887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004889 { (case "(($ac_try" in
4890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4891 *) ac_try_echo=$ac_try;;
4892esac
4893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4894 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004898 ac_cv_kpthread=yes
4899else
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 echo "$as_me: program exited with status $ac_status" >&5
4901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004902sed 's/^/| /' conftest.$ac_ext >&5
4903
Martin v. Löwis11437992002-04-12 09:54:03 +00004904( exit $ac_status )
4905ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004908fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004909
4910
Martin v. Löwis130fb172001-07-19 11:00:41 +00004911CC="$ac_save_cc"
4912fi
4913
Thomas Wouters477c8d52006-05-27 19:21:47 +00004914{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4915echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004916fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004917
Skip Montanarod8d39a02003-07-10 20:44:10 +00004918if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004919then
4920# -Kthread, if available, provides the right #defines
4921# and linker options to make pthread_create available
4922# Some compilers won't report that they do not support -Kthread,
4923# so we need to run a program to see whether it really made the
4924# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004925{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4926echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004927if test "${ac_cv_kthread+set}" = set; then
4928 echo $ECHO_N "(cached) $ECHO_C" >&6
4929else
4930 ac_save_cc="$CC"
4931CC="$CC -Kthread"
4932if test "$cross_compiling" = yes; then
4933 ac_cv_kthread=no
4934else
4935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004936/* confdefs.h. */
4937_ACEOF
4938cat confdefs.h >>conftest.$ac_ext
4939cat >>conftest.$ac_ext <<_ACEOF
4940/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004941
4942#include <pthread.h>
4943
4944void* routine(void* p){return NULL;}
4945
4946int main(){
4947 pthread_t p;
4948 if(pthread_create(&p,NULL,routine,NULL)!=0)
4949 return 1;
4950 (void)pthread_detach(p);
4951 return 0;
4952}
4953
4954_ACEOF
4955rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004956if { (ac_try="$ac_link"
4957case "(($ac_try" in
4958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4959 *) ac_try_echo=$ac_try;;
4960esac
4961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4962 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004963 ac_status=$?
4964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004966 { (case "(($ac_try" in
4967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4968 *) ac_try_echo=$ac_try;;
4969esac
4970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4971 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004972 ac_status=$?
4973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4974 (exit $ac_status); }; }; then
4975 ac_cv_kthread=yes
4976else
4977 echo "$as_me: program exited with status $ac_status" >&5
4978echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004979sed 's/^/| /' conftest.$ac_ext >&5
4980
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004981( exit $ac_status )
4982ac_cv_kthread=no
4983fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004985fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004986
4987
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004988CC="$ac_save_cc"
4989fi
4990
Thomas Wouters477c8d52006-05-27 19:21:47 +00004991{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4992echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004993fi
4994
Skip Montanarod8d39a02003-07-10 20:44:10 +00004995if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004996then
4997# -pthread, if available, provides the right #defines
4998# and linker options to make pthread_create available
4999# Some compilers won't report that they do not support -pthread,
5000# so we need to run a program to see whether it really made the
5001# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00005002{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5003echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005004if test "${ac_cv_thread+set}" = set; then
5005 echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007 ac_save_cc="$CC"
5008CC="$CC -pthread"
5009if test "$cross_compiling" = yes; then
5010 ac_cv_pthread=no
5011else
5012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005018
5019#include <pthread.h>
5020
5021void* routine(void* p){return NULL;}
5022
5023int main(){
5024 pthread_t p;
5025 if(pthread_create(&p,NULL,routine,NULL)!=0)
5026 return 1;
5027 (void)pthread_detach(p);
5028 return 0;
5029}
5030
5031_ACEOF
5032rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005033if { (ac_try="$ac_link"
5034case "(($ac_try" in
5035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5036 *) ac_try_echo=$ac_try;;
5037esac
5038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5039 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005043 { (case "(($ac_try" in
5044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5045 *) ac_try_echo=$ac_try;;
5046esac
5047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5048 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 ac_cv_pthread=yes
5053else
5054 echo "$as_me: program exited with status $ac_status" >&5
5055echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005056sed 's/^/| /' conftest.$ac_ext >&5
5057
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005058( exit $ac_status )
5059ac_cv_pthread=no
5060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005062fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005063
5064
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005065CC="$ac_save_cc"
5066fi
5067
Thomas Wouters477c8d52006-05-27 19:21:47 +00005068{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5069echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005070fi
5071
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005072# If we have set a CC compiler flag for thread support then
5073# check if it works for CXX, too.
5074ac_cv_cxx_thread=no
5075if test ! -z "$CXX"
5076then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005077{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5078echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005079ac_save_cxx="$CXX"
5080
5081if test "$ac_cv_kpthread" = "yes"
5082then
5083 CXX="$CXX -Kpthread"
5084 ac_cv_cxx_thread=yes
5085elif test "$ac_cv_kthread" = "yes"
5086then
5087 CXX="$CXX -Kthread"
5088 ac_cv_cxx_thread=yes
5089elif test "$ac_cv_pthread" = "yes"
5090then
5091 CXX="$CXX -pthread"
5092 ac_cv_cxx_thread=yes
5093fi
5094
5095if test $ac_cv_cxx_thread = yes
5096then
5097 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5098 $CXX -c conftest.$ac_ext 2>&5
5099 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5100 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5101 then
5102 ac_cv_cxx_thread=yes
5103 else
5104 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005105 fi
5106 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005108{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5109echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005110fi
5111CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005112
Michael W. Hudson54241132001-12-07 15:38:26 +00005113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005114# checks for header files
Thomas Wouters477c8d52006-05-27 19:21:47 +00005115{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5116echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005117if test "${ac_cv_header_stdc+set}" = set; then
5118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119else
Martin v. Löwis11437992002-04-12 09:54:03 +00005120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005121/* confdefs.h. */
5122_ACEOF
5123cat confdefs.h >>conftest.$ac_ext
5124cat >>conftest.$ac_ext <<_ACEOF
5125/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126#include <stdlib.h>
5127#include <stdarg.h>
5128#include <string.h>
5129#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005130
Skip Montanaro6dead952003-09-25 14:50:04 +00005131int
5132main ()
5133{
5134
5135 ;
5136 return 0;
5137}
Martin v. Löwis11437992002-04-12 09:54:03 +00005138_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005139rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005140if { (ac_try="$ac_compile"
5141case "(($ac_try" in
5142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5143 *) ac_try_echo=$ac_try;;
5144esac
5145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005148 grep -v '^ *+' conftest.er1 >conftest.err
5149 rm -f conftest.er1
5150 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005152 (exit $ac_status); } && {
5153 test -z "$ac_c_werror_flag" ||
5154 test ! -s conftest.err
5155 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156 ac_cv_header_stdc=yes
5157else
Martin v. Löwis11437992002-04-12 09:54:03 +00005158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005159sed 's/^/| /' conftest.$ac_ext >&5
5160
Thomas Wouters477c8d52006-05-27 19:21:47 +00005161 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005162fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005163
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165
5166if test $ac_cv_header_stdc = yes; then
5167 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005169/* confdefs.h. */
5170_ACEOF
5171cat confdefs.h >>conftest.$ac_ext
5172cat >>conftest.$ac_ext <<_ACEOF
5173/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005175
5176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005178 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179 :
5180else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005181 ac_cv_header_stdc=no
5182fi
5183rm -f conftest*
5184
5185fi
5186
5187if test $ac_cv_header_stdc = yes; then
5188 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005190/* confdefs.h. */
5191_ACEOF
5192cat confdefs.h >>conftest.$ac_ext
5193cat >>conftest.$ac_ext <<_ACEOF
5194/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005196
5197_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005199 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005200 :
5201else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005202 ac_cv_header_stdc=no
5203fi
5204rm -f conftest*
5205
5206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005210 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005211 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212else
Martin v. Löwis11437992002-04-12 09:54:03 +00005213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005214/* confdefs.h. */
5215_ACEOF
5216cat confdefs.h >>conftest.$ac_ext
5217cat >>conftest.$ac_ext <<_ACEOF
5218/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005219#include <ctype.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +00005220#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005221#if ((' ' & 0x0FF) == 0x020)
5222# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5223# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5224#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005225# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005226 (('a' <= (c) && (c) <= 'i') \
5227 || ('j' <= (c) && (c) <= 'r') \
5228 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005229# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5230#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005231
Martin v. Löwis11437992002-04-12 09:54:03 +00005232#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5233int
5234main ()
5235{
5236 int i;
5237 for (i = 0; i < 256; i++)
5238 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005239 || toupper (i) != TOUPPER (i))
Thomas Wouters477c8d52006-05-27 19:21:47 +00005240 return 2;
5241 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005242}
5243_ACEOF
5244rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005245if { (ac_try="$ac_link"
5246case "(($ac_try" in
5247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5248 *) ac_try_echo=$ac_try;;
5249esac
5250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5251 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005255 { (case "(($ac_try" in
5256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5257 *) ac_try_echo=$ac_try;;
5258esac
5259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5260 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264 :
5265else
Martin v. Löwis11437992002-04-12 09:54:03 +00005266 echo "$as_me: program exited with status $ac_status" >&5
5267echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005268sed 's/^/| /' conftest.$ac_ext >&5
5269
Martin v. Löwis11437992002-04-12 09:54:03 +00005270( exit $ac_status )
5271ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005272fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5274fi
5275
5276
Michael W. Hudson54241132001-12-07 15:38:26 +00005277fi
5278fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005279{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5280echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005281if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005282
5283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005285_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286
5287fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288
Skip Montanarob9820a32004-01-17 00:16:12 +00005289# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005300 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005301do
5302as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005303{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5304echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5305if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005306 echo $ECHO_N "(cached) $ECHO_C" >&6
5307else
5308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005309/* confdefs.h. */
5310_ACEOF
5311cat confdefs.h >>conftest.$ac_ext
5312cat >>conftest.$ac_ext <<_ACEOF
5313/* end confdefs.h. */
5314$ac_includes_default
5315
5316#include <$ac_header>
5317_ACEOF
5318rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005319if { (ac_try="$ac_compile"
5320case "(($ac_try" in
5321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5322 *) ac_try_echo=$ac_try;;
5323esac
5324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5325 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005327 grep -v '^ *+' conftest.er1 >conftest.err
5328 rm -f conftest.er1
5329 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005331 (exit $ac_status); } && {
5332 test -z "$ac_c_werror_flag" ||
5333 test ! -s conftest.err
5334 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005335 eval "$as_ac_Header=yes"
5336else
5337 echo "$as_me: failed program was:" >&5
5338sed 's/^/| /' conftest.$ac_ext >&5
5339
Thomas Wouters477c8d52006-05-27 19:21:47 +00005340 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005341fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005342
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005344fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005345ac_res=`eval echo '${'$as_ac_Header'}'`
5346 { echo "$as_me:$LINENO: result: $ac_res" >&5
5347echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005348if test `eval echo '${'$as_ac_Header'}'` = yes; then
5349 cat >>confdefs.h <<_ACEOF
5350#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5351_ACEOF
5352
5353fi
5354
5355done
5356
5357
Martin v. Löwis11437992002-04-12 09:54:03 +00005358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
Anthony Baxter8a560de2004-10-13 15:30:56 +00005394
Martin v. Löwisc3001752005-01-23 09:27:24 +00005395
Martin v. Löwis11017b12006-01-14 18:12:57 +00005396
Thomas Wouters477c8d52006-05-27 19:21:47 +00005397
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005398
5399
5400
5401
5402
5403
5404
5405
Thomas Wouters89f507f2006-12-13 04:49:30 +00005406
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005407for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5408fcntl.h grp.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005409io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5410shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005411unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005412sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5413sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005414sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5415sys/time.h \
5416sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005417sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
5418bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419do
Martin v. Löwis11437992002-04-12 09:54:03 +00005420as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005421if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5422 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5424if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005425 echo $ECHO_N "(cached) $ECHO_C" >&6
5426fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005427ac_res=`eval echo '${'$as_ac_Header'}'`
5428 { echo "$as_me:$LINENO: result: $ac_res" >&5
5429echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005430else
Martin v. Löwis11437992002-04-12 09:54:03 +00005431 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005432{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5433echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005435/* confdefs.h. */
5436_ACEOF
5437cat confdefs.h >>conftest.$ac_ext
5438cat >>conftest.$ac_ext <<_ACEOF
5439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005440$ac_includes_default
5441#include <$ac_header>
5442_ACEOF
5443rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005444if { (ac_try="$ac_compile"
5445case "(($ac_try" in
5446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5447 *) ac_try_echo=$ac_try;;
5448esac
5449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005452 grep -v '^ *+' conftest.er1 >conftest.err
5453 rm -f conftest.er1
5454 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005456 (exit $ac_status); } && {
5457 test -z "$ac_c_werror_flag" ||
5458 test ! -s conftest.err
5459 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005460 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005461else
Martin v. Löwis11437992002-04-12 09:54:03 +00005462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005463sed 's/^/| /' conftest.$ac_ext >&5
5464
Thomas Wouters477c8d52006-05-27 19:21:47 +00005465 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005466fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005467
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005469{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5470echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005471
5472# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005473{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5474echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005475cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005476/* confdefs.h. */
5477_ACEOF
5478cat confdefs.h >>conftest.$ac_ext
5479cat >>conftest.$ac_ext <<_ACEOF
5480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005481#include <$ac_header>
5482_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005483if { (ac_try="$ac_cpp conftest.$ac_ext"
5484case "(($ac_try" in
5485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5486 *) ac_try_echo=$ac_try;;
5487esac
5488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5489 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005490 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005491 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005492 rm -f conftest.er1
5493 cat conftest.err >&5
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005495 (exit $ac_status); } >/dev/null && {
5496 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5497 test ! -s conftest.err
5498 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005499 ac_header_preproc=yes
5500else
5501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005502sed 's/^/| /' conftest.$ac_ext >&5
5503
Martin v. Löwis11437992002-04-12 09:54:03 +00005504 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005505fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005506
Martin v. Löwis11437992002-04-12 09:54:03 +00005507rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005508{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5509echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005510
5511# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005512case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5513 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005514 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5515echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005516 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5517echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5518 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005519 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005520 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005521 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5522echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005523 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5524echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5525 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5526echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5527 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5528echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005529 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5530echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005531 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5532echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00005533 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005534## ------------------------------------------------ ##
5535## Report this to http://www.python.org/python-bugs ##
5536## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005537_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00005538 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005539 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005540esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00005541{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5542echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5543if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005544 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005545else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005546 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005547fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005548ac_res=`eval echo '${'$as_ac_Header'}'`
5549 { echo "$as_me:$LINENO: result: $ac_res" >&5
5550echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005551
5552fi
5553if test `eval echo '${'$as_ac_Header'}'` = yes; then
5554 cat >>confdefs.h <<_ACEOF
5555#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
Guido van Rossum627b2d71993-12-24 10:39:16 +00005560done
5561
Martin v. Löwis11437992002-04-12 09:54:03 +00005562
5563
5564
5565
5566
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005568for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5569 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005570{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5571echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5572if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005574else
Martin v. Löwis11437992002-04-12 09:54:03 +00005575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005576/* confdefs.h. */
5577_ACEOF
5578cat confdefs.h >>conftest.$ac_ext
5579cat >>conftest.$ac_ext <<_ACEOF
5580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005581#include <sys/types.h>
5582#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005583
Martin v. Löwis11437992002-04-12 09:54:03 +00005584int
5585main ()
5586{
5587if ((DIR *) 0)
5588return 0;
5589 ;
5590 return 0;
5591}
5592_ACEOF
5593rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005594if { (ac_try="$ac_compile"
5595case "(($ac_try" in
5596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5597 *) ac_try_echo=$ac_try;;
5598esac
5599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005602 grep -v '^ *+' conftest.er1 >conftest.err
5603 rm -f conftest.er1
5604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005606 (exit $ac_status); } && {
5607 test -z "$ac_c_werror_flag" ||
5608 test ! -s conftest.err
5609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005610 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005611else
Martin v. Löwis11437992002-04-12 09:54:03 +00005612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005613sed 's/^/| /' conftest.$ac_ext >&5
5614
Thomas Wouters477c8d52006-05-27 19:21:47 +00005615 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005616fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005617
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005619fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005620ac_res=`eval echo '${'$as_ac_Header'}'`
5621 { echo "$as_me:$LINENO: result: $ac_res" >&5
5622echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005623if test `eval echo '${'$as_ac_Header'}'` = yes; then
5624 cat >>confdefs.h <<_ACEOF
5625#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5626_ACEOF
5627
5628ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005629fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631done
5632# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5633if test $ac_header_dirent = dirent.h; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005634 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5635echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005636if test "${ac_cv_search_opendir+set}" = set; then
5637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005638else
Martin v. Löwis11437992002-04-12 09:54:03 +00005639 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005641/* confdefs.h. */
5642_ACEOF
5643cat confdefs.h >>conftest.$ac_ext
5644cat >>conftest.$ac_ext <<_ACEOF
5645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
Thomas Wouters477c8d52006-05-27 19:21:47 +00005647/* Override any GCC internal prototype to avoid an error.
5648 Use char because int might match the return type of a GCC
5649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005650#ifdef __cplusplus
5651extern "C"
5652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005653char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005654int
5655main ()
5656{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005657return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 ;
5659 return 0;
5660}
5661_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005662for ac_lib in '' dir; do
5663 if test -z "$ac_lib"; then
5664 ac_res="none required"
5665 else
5666 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005668 fi
5669 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005670if { (ac_try="$ac_link"
5671case "(($ac_try" in
5672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5673 *) ac_try_echo=$ac_try;;
5674esac
5675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5676 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005678 grep -v '^ *+' conftest.er1 >conftest.err
5679 rm -f conftest.er1
5680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005682 (exit $ac_status); } && {
5683 test -z "$ac_c_werror_flag" ||
5684 test ! -s conftest.err
5685 } && test -s conftest$ac_exeext &&
5686 $as_test_x conftest$ac_exeext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005687 ac_cv_search_opendir=$ac_res
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688else
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005690sed 's/^/| /' conftest.$ac_ext >&5
5691
Thomas Wouters477c8d52006-05-27 19:21:47 +00005692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005694
Thomas Wouters89f507f2006-12-13 04:49:30 +00005695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005696 conftest$ac_exeext
5697 if test "${ac_cv_search_opendir+set}" = set; then
5698 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005699fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005700done
5701if test "${ac_cv_search_opendir+set}" = set; then
5702 :
5703else
5704 ac_cv_search_opendir=no
5705fi
5706rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005707LIBS=$ac_func_search_save_LIBS
5708fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005709{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5710echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5711ac_res=$ac_cv_search_opendir
5712if test "$ac_res" != no; then
5713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005716
Michael W. Hudson54241132001-12-07 15:38:26 +00005717else
Thomas Wouters477c8d52006-05-27 19:21:47 +00005718 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5719echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005720if test "${ac_cv_search_opendir+set}" = set; then
5721 echo $ECHO_N "(cached) $ECHO_C" >&6
5722else
5723 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005725/* confdefs.h. */
5726_ACEOF
5727cat confdefs.h >>conftest.$ac_ext
5728cat >>conftest.$ac_ext <<_ACEOF
5729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005730
Thomas Wouters477c8d52006-05-27 19:21:47 +00005731/* Override any GCC internal prototype to avoid an error.
5732 Use char because int might match the return type of a GCC
5733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005734#ifdef __cplusplus
5735extern "C"
5736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005737char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005738int
5739main ()
5740{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005741return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 ;
5743 return 0;
5744}
5745_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005746for ac_lib in '' x; do
5747 if test -z "$ac_lib"; then
5748 ac_res="none required"
5749 else
5750 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005752 fi
5753 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005754if { (ac_try="$ac_link"
5755case "(($ac_try" in
5756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5757 *) ac_try_echo=$ac_try;;
5758esac
5759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5760 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005762 grep -v '^ *+' conftest.er1 >conftest.err
5763 rm -f conftest.er1
5764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005766 (exit $ac_status); } && {
5767 test -z "$ac_c_werror_flag" ||
5768 test ! -s conftest.err
5769 } && test -s conftest$ac_exeext &&
5770 $as_test_x conftest$ac_exeext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005771 ac_cv_search_opendir=$ac_res
Martin v. Löwis11437992002-04-12 09:54:03 +00005772else
5773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005774sed 's/^/| /' conftest.$ac_ext >&5
5775
Thomas Wouters477c8d52006-05-27 19:21:47 +00005776
Martin v. Löwis11437992002-04-12 09:54:03 +00005777fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005778
Thomas Wouters89f507f2006-12-13 04:49:30 +00005779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005780 conftest$ac_exeext
5781 if test "${ac_cv_search_opendir+set}" = set; then
5782 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005783fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005784done
5785if test "${ac_cv_search_opendir+set}" = set; then
5786 :
5787else
5788 ac_cv_search_opendir=no
5789fi
5790rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005791LIBS=$ac_func_search_save_LIBS
5792fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005793{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5794echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5795ac_res=$ac_cv_search_opendir
5796if test "$ac_res" != no; then
5797 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005799fi
5800
5801fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005802
Thomas Wouters477c8d52006-05-27 19:21:47 +00005803{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5804echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005805if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5806 echo $ECHO_N "(cached) $ECHO_C" >&6
5807else
5808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005809/* confdefs.h. */
5810_ACEOF
5811cat confdefs.h >>conftest.$ac_ext
5812cat >>conftest.$ac_ext <<_ACEOF
5813/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005814#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005815int
5816main ()
5817{
5818return makedev(0, 0);
5819 ;
5820 return 0;
5821}
5822_ACEOF
5823rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005824if { (ac_try="$ac_link"
5825case "(($ac_try" in
5826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5827 *) ac_try_echo=$ac_try;;
5828esac
5829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5830 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005832 grep -v '^ *+' conftest.er1 >conftest.err
5833 rm -f conftest.er1
5834 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005836 (exit $ac_status); } && {
5837 test -z "$ac_c_werror_flag" ||
5838 test ! -s conftest.err
5839 } && test -s conftest$ac_exeext &&
5840 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005841 ac_cv_header_sys_types_h_makedev=yes
5842else
5843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005844sed 's/^/| /' conftest.$ac_ext >&5
5845
Thomas Wouters477c8d52006-05-27 19:21:47 +00005846 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005848
Thomas Wouters89f507f2006-12-13 04:49:30 +00005849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005851
5852fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005853{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5854echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005855
5856if test $ac_cv_header_sys_types_h_makedev = no; then
5857if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005858 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5859echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005860if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5861 echo $ECHO_N "(cached) $ECHO_C" >&6
5862fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005863{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5864echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005865else
5866 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005867{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5868echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005870/* confdefs.h. */
5871_ACEOF
5872cat confdefs.h >>conftest.$ac_ext
5873cat >>conftest.$ac_ext <<_ACEOF
5874/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005875$ac_includes_default
5876#include <sys/mkdev.h>
5877_ACEOF
5878rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005879if { (ac_try="$ac_compile"
5880case "(($ac_try" in
5881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5882 *) ac_try_echo=$ac_try;;
5883esac
5884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005887 grep -v '^ *+' conftest.er1 >conftest.err
5888 rm -f conftest.er1
5889 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005891 (exit $ac_status); } && {
5892 test -z "$ac_c_werror_flag" ||
5893 test ! -s conftest.err
5894 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005895 ac_header_compiler=yes
5896else
5897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005898sed 's/^/| /' conftest.$ac_ext >&5
5899
Thomas Wouters477c8d52006-05-27 19:21:47 +00005900 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005901fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005902
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005904{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5905echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005906
5907# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005908{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5909echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005911/* confdefs.h. */
5912_ACEOF
5913cat confdefs.h >>conftest.$ac_ext
5914cat >>conftest.$ac_ext <<_ACEOF
5915/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005916#include <sys/mkdev.h>
5917_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005918if { (ac_try="$ac_cpp conftest.$ac_ext"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
5923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5924 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005925 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005926 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005927 rm -f conftest.er1
5928 cat conftest.err >&5
5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00005930 (exit $ac_status); } >/dev/null && {
5931 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5932 test ! -s conftest.err
5933 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005934 ac_header_preproc=yes
5935else
5936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005937sed 's/^/| /' conftest.$ac_ext >&5
5938
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005939 ac_header_preproc=no
5940fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005941
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005943{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5944echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005945
5946# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005947case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5948 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005949 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5950echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005951 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5952echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5953 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005954 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005955 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005956 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5957echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005958 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5959echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5960 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5961echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5962 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5963echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005964 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5965echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005966 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5967echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00005968 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005969## ------------------------------------------------ ##
5970## Report this to http://www.python.org/python-bugs ##
5971## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005972_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00005973 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005974 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005975esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00005976{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5977echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5979 echo $ECHO_N "(cached) $ECHO_C" >&6
5980else
5981 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5982fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005983{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5984echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005985
5986fi
5987if test $ac_cv_header_sys_mkdev_h = yes; then
5988
5989cat >>confdefs.h <<\_ACEOF
5990#define MAJOR_IN_MKDEV 1
5991_ACEOF
5992
5993fi
5994
5995
5996
5997 if test $ac_cv_header_sys_mkdev_h = no; then
5998 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005999 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6000echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6002 echo $ECHO_N "(cached) $ECHO_C" >&6
6003fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006004{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6005echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006else
6007 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006008{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6009echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006011/* confdefs.h. */
6012_ACEOF
6013cat confdefs.h >>conftest.$ac_ext
6014cat >>conftest.$ac_ext <<_ACEOF
6015/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016$ac_includes_default
6017#include <sys/sysmacros.h>
6018_ACEOF
6019rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006020if { (ac_try="$ac_compile"
6021case "(($ac_try" in
6022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6023 *) ac_try_echo=$ac_try;;
6024esac
6025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006028 grep -v '^ *+' conftest.er1 >conftest.err
6029 rm -f conftest.er1
6030 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006032 (exit $ac_status); } && {
6033 test -z "$ac_c_werror_flag" ||
6034 test ! -s conftest.err
6035 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036 ac_header_compiler=yes
6037else
6038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006039sed 's/^/| /' conftest.$ac_ext >&5
6040
Thomas Wouters477c8d52006-05-27 19:21:47 +00006041 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006043
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006045{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6046echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047
6048# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006049{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6050echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006052/* confdefs.h. */
6053_ACEOF
6054cat confdefs.h >>conftest.$ac_ext
6055cat >>conftest.$ac_ext <<_ACEOF
6056/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057#include <sys/sysmacros.h>
6058_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006059if { (ac_try="$ac_cpp conftest.$ac_ext"
6060case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6063esac
6064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6065 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006067 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 rm -f conftest.er1
6069 cat conftest.err >&5
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006071 (exit $ac_status); } >/dev/null && {
6072 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6073 test ! -s conftest.err
6074 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_header_preproc=yes
6076else
6077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006078sed 's/^/| /' conftest.$ac_ext >&5
6079
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_header_preproc=no
6081fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006082
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006084{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6085echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6089 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6091echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006092 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6093echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6094 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006095 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006097 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6098echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006099 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6100echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6101 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6102echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6103 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6104echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006105 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6106echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006107 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6108echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006109 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006110## ------------------------------------------------ ##
6111## Report this to http://www.python.org/python-bugs ##
6112## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006113_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006114 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006115 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006117{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6118echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6120 echo $ECHO_N "(cached) $ECHO_C" >&6
6121else
6122 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6123fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006124{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6125echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126
6127fi
6128if test $ac_cv_header_sys_sysmacros_h = yes; then
6129
6130cat >>confdefs.h <<\_ACEOF
6131#define MAJOR_IN_SYSMACROS 1
6132_ACEOF
6133
6134fi
6135
6136
6137 fi
6138fi
6139
Michael W. Hudson54241132001-12-07 15:38:26 +00006140
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006141# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006142
6143for ac_header in term.h
6144do
6145as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006146{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6148if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006149 echo $ECHO_N "(cached) $ECHO_C" >&6
6150else
6151 cat >conftest.$ac_ext <<_ACEOF
6152/* confdefs.h. */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006157
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006158#ifdef HAVE_CURSES_H
6159#include <curses.h>
6160#endif
6161
6162
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006163#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006164_ACEOF
6165rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006166if { (ac_try="$ac_compile"
6167case "(($ac_try" in
6168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6169 *) ac_try_echo=$ac_try;;
6170esac
6171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006173 ac_status=$?
6174 grep -v '^ *+' conftest.er1 >conftest.err
6175 rm -f conftest.er1
6176 cat conftest.err >&5
6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006178 (exit $ac_status); } && {
6179 test -z "$ac_c_werror_flag" ||
6180 test ! -s conftest.err
6181 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006182 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006183else
6184 echo "$as_me: failed program was:" >&5
6185sed 's/^/| /' conftest.$ac_ext >&5
6186
Thomas Wouters477c8d52006-05-27 19:21:47 +00006187 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006188fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006189
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006192ac_res=`eval echo '${'$as_ac_Header'}'`
6193 { echo "$as_me:$LINENO: result: $ac_res" >&5
6194echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006195if test `eval echo '${'$as_ac_Header'}'` = yes; then
6196 cat >>confdefs.h <<_ACEOF
6197#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6198_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006199
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006200fi
6201
6202done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006203
6204
Martin v. Löwis11017b12006-01-14 18:12:57 +00006205# On Linux, netlink.h requires asm/types.h
6206
6207for ac_header in linux/netlink.h
6208do
6209as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006210{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6211echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6212if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006213 echo $ECHO_N "(cached) $ECHO_C" >&6
6214else
6215 cat >conftest.$ac_ext <<_ACEOF
6216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
6221
6222#ifdef HAVE_ASM_TYPES_H
6223#include <asm/types.h>
6224#endif
6225#ifdef HAVE_SYS_SOCKET_H
6226#include <sys/socket.h>
6227#endif
6228
6229
6230#include <$ac_header>
6231_ACEOF
6232rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006233if { (ac_try="$ac_compile"
6234case "(($ac_try" in
6235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6236 *) ac_try_echo=$ac_try;;
6237esac
6238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006240 ac_status=$?
6241 grep -v '^ *+' conftest.er1 >conftest.err
6242 rm -f conftest.er1
6243 cat conftest.err >&5
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006245 (exit $ac_status); } && {
6246 test -z "$ac_c_werror_flag" ||
6247 test ! -s conftest.err
6248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006249 eval "$as_ac_Header=yes"
6250else
6251 echo "$as_me: failed program was:" >&5
6252sed 's/^/| /' conftest.$ac_ext >&5
6253
Thomas Wouters477c8d52006-05-27 19:21:47 +00006254 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006255fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006256
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006258fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006259ac_res=`eval echo '${'$as_ac_Header'}'`
6260 { echo "$as_me:$LINENO: result: $ac_res" >&5
6261echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006262if test `eval echo '${'$as_ac_Header'}'` = yes; then
6263 cat >>confdefs.h <<_ACEOF
6264#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6265_ACEOF
6266
6267fi
6268
6269done
6270
6271
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006273was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +00006274{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6275echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006277/* confdefs.h. */
6278_ACEOF
6279cat confdefs.h >>conftest.$ac_ext
6280cat >>conftest.$ac_ext <<_ACEOF
6281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
6284_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006286 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006288else
Martin v. Löwis11437992002-04-12 09:54:03 +00006289
6290
6291cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006293_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006295
Guido van Rossum627b2d71993-12-24 10:39:16 +00006296fi
6297rm -f conftest*
6298
Thomas Wouters477c8d52006-05-27 19:21:47 +00006299{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6300echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006301
Neal Norwitz11690112002-07-30 01:08:28 +00006302# Check whether using makedev requires defining _OSF_SOURCE
Thomas Wouters477c8d52006-05-27 19:21:47 +00006303{ echo "$as_me:$LINENO: checking for makedev" >&5
6304echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006306/* confdefs.h. */
6307_ACEOF
6308cat confdefs.h >>conftest.$ac_ext
6309cat >>conftest.$ac_ext <<_ACEOF
6310/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006311#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006312int
6313main ()
6314{
6315 makedev(0, 0)
6316 ;
6317 return 0;
6318}
6319_ACEOF
6320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006321if { (ac_try="$ac_link"
6322case "(($ac_try" in
6323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6324 *) ac_try_echo=$ac_try;;
6325esac
6326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6327 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 grep -v '^ *+' conftest.er1 >conftest.err
6330 rm -f conftest.er1
6331 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006333 (exit $ac_status); } && {
6334 test -z "$ac_c_werror_flag" ||
6335 test ! -s conftest.err
6336 } && test -s conftest$ac_exeext &&
6337 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006338 ac_cv_has_makedev=yes
6339else
6340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006341sed 's/^/| /' conftest.$ac_ext >&5
6342
Thomas Wouters477c8d52006-05-27 19:21:47 +00006343 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006344fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006345
Thomas Wouters89f507f2006-12-13 04:49:30 +00006346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006347 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006348if test "$ac_cv_has_makedev" = "no"; then
6349 # we didn't link, try if _OSF_SOURCE will allow us to link
6350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006351/* confdefs.h. */
6352_ACEOF
6353cat confdefs.h >>conftest.$ac_ext
6354cat >>conftest.$ac_ext <<_ACEOF
6355/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006356
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006357#define _OSF_SOURCE 1
6358#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006359
Neal Norwitz11690112002-07-30 01:08:28 +00006360int
6361main ()
6362{
6363 makedev(0, 0)
6364 ;
6365 return 0;
6366}
6367_ACEOF
6368rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006369if { (ac_try="$ac_link"
6370case "(($ac_try" in
6371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6372 *) ac_try_echo=$ac_try;;
6373esac
6374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6375 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006377 grep -v '^ *+' conftest.er1 >conftest.err
6378 rm -f conftest.er1
6379 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006381 (exit $ac_status); } && {
6382 test -z "$ac_c_werror_flag" ||
6383 test ! -s conftest.err
6384 } && test -s conftest$ac_exeext &&
6385 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006386 ac_cv_has_makedev=yes
6387else
6388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006389sed 's/^/| /' conftest.$ac_ext >&5
6390
Thomas Wouters477c8d52006-05-27 19:21:47 +00006391 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006392fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006393
Thomas Wouters89f507f2006-12-13 04:49:30 +00006394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006395 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006396 if test "$ac_cv_has_makedev" = "yes"; then
6397
6398cat >>confdefs.h <<\_ACEOF
6399#define _OSF_SOURCE 1
6400_ACEOF
6401
6402 fi
6403fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006404{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6405echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006406if test "$ac_cv_has_makedev" = "yes"; then
6407
6408cat >>confdefs.h <<\_ACEOF
6409#define HAVE_MAKEDEV 1
6410_ACEOF
6411
6412fi
6413
Martin v. Löwis399a6892002-10-04 10:22:02 +00006414# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6415# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6416# defined, but the compiler does not support pragma redefine_extname,
6417# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6418# structures (such as rlimit64) without declaring them. As a
6419# work-around, disable LFS on such configurations
6420
6421use_lfs=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00006422{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6423echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006424cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006425/* confdefs.h. */
6426_ACEOF
6427cat confdefs.h >>conftest.$ac_ext
6428cat >>conftest.$ac_ext <<_ACEOF
6429/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006430
6431#define _LARGEFILE_SOURCE 1
6432#define _FILE_OFFSET_BITS 64
6433#include <sys/resource.h>
6434
Martin v. Löwis399a6892002-10-04 10:22:02 +00006435int
6436main ()
6437{
6438struct rlimit foo;
6439 ;
6440 return 0;
6441}
6442_ACEOF
6443rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006444if { (ac_try="$ac_compile"
6445case "(($ac_try" in
6446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6447 *) ac_try_echo=$ac_try;;
6448esac
6449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006452 grep -v '^ *+' conftest.er1 >conftest.err
6453 rm -f conftest.er1
6454 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006456 (exit $ac_status); } && {
6457 test -z "$ac_c_werror_flag" ||
6458 test ! -s conftest.err
6459 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006460 sol_lfs_bug=no
6461else
6462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006463sed 's/^/| /' conftest.$ac_ext >&5
6464
Thomas Wouters477c8d52006-05-27 19:21:47 +00006465 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006466fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006467
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006469{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6470echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006471if test "$sol_lfs_bug" = "yes"; then
6472 use_lfs=no
6473fi
6474
6475if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006476# Two defines needed to enable largefile support on various platforms
6477# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006478
Martin v. Löwis11437992002-04-12 09:54:03 +00006479cat >>confdefs.h <<\_ACEOF
6480#define _LARGEFILE_SOURCE 1
6481_ACEOF
6482
6483
6484cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006485#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006486_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006487
Martin v. Löwis399a6892002-10-04 10:22:02 +00006488fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006489
Guido van Rossum84e7b241996-08-19 21:59:00 +00006490# Add some code to confdefs.h so that the test for off_t works on SCO
6491cat >> confdefs.h <<\EOF
6492#if defined(SCO_DS)
6493#undef _OFF_T
6494#endif
6495EOF
6496
Guido van Rossumef2255b2000-03-10 22:30:29 +00006497# Type availability checks
Thomas Wouters477c8d52006-05-27 19:21:47 +00006498{ echo "$as_me:$LINENO: checking for mode_t" >&5
6499echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006500if test "${ac_cv_type_mode_t+set}" = set; then
6501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502else
Martin v. Löwis11437992002-04-12 09:54:03 +00006503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006504/* confdefs.h. */
6505_ACEOF
6506cat confdefs.h >>conftest.$ac_ext
6507cat >>conftest.$ac_ext <<_ACEOF
6508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006509$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006510typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006511int
6512main ()
6513{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006514if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006515 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006516if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006517 return 0;
6518 ;
6519 return 0;
6520}
6521_ACEOF
6522rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006523if { (ac_try="$ac_compile"
6524case "(($ac_try" in
6525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6526 *) ac_try_echo=$ac_try;;
6527esac
6528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006531 grep -v '^ *+' conftest.er1 >conftest.err
6532 rm -f conftest.er1
6533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006535 (exit $ac_status); } && {
6536 test -z "$ac_c_werror_flag" ||
6537 test ! -s conftest.err
6538 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006539 ac_cv_type_mode_t=yes
6540else
Martin v. Löwis11437992002-04-12 09:54:03 +00006541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006542sed 's/^/| /' conftest.$ac_ext >&5
6543
Thomas Wouters477c8d52006-05-27 19:21:47 +00006544 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006545fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006546
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006548fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006549{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6550echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006551if test $ac_cv_type_mode_t = yes; then
6552 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006553else
Martin v. Löwis11437992002-04-12 09:54:03 +00006554
6555cat >>confdefs.h <<_ACEOF
6556#define mode_t int
6557_ACEOF
6558
6559fi
6560
Thomas Wouters477c8d52006-05-27 19:21:47 +00006561{ echo "$as_me:$LINENO: checking for off_t" >&5
6562echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006563if test "${ac_cv_type_off_t+set}" = set; then
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6565else
6566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006567/* confdefs.h. */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006572$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006573typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006574int
6575main ()
6576{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006577if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006578 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006579if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006580 return 0;
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006586if { (ac_try="$ac_compile"
6587case "(($ac_try" in
6588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6589 *) ac_try_echo=$ac_try;;
6590esac
6591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006594 grep -v '^ *+' conftest.er1 >conftest.err
6595 rm -f conftest.er1
6596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006598 (exit $ac_status); } && {
6599 test -z "$ac_c_werror_flag" ||
6600 test ! -s conftest.err
6601 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006602 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006603else
Martin v. Löwis11437992002-04-12 09:54:03 +00006604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006605sed 's/^/| /' conftest.$ac_ext >&5
6606
Thomas Wouters477c8d52006-05-27 19:21:47 +00006607 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006608fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006609
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006611fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006612{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6613echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006614if test $ac_cv_type_off_t = yes; then
6615 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006616else
Martin v. Löwis11437992002-04-12 09:54:03 +00006617
6618cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00006619#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006620_ACEOF
6621
6622fi
6623
Thomas Wouters477c8d52006-05-27 19:21:47 +00006624{ echo "$as_me:$LINENO: checking for pid_t" >&5
6625echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006626if test "${ac_cv_type_pid_t+set}" = set; then
6627 echo $ECHO_N "(cached) $ECHO_C" >&6
6628else
6629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006630/* confdefs.h. */
6631_ACEOF
6632cat confdefs.h >>conftest.$ac_ext
6633cat >>conftest.$ac_ext <<_ACEOF
6634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006635$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006636typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006637int
6638main ()
6639{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006640if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006641 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006642if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006643 return 0;
6644 ;
6645 return 0;
6646}
6647_ACEOF
6648rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006649if { (ac_try="$ac_compile"
6650case "(($ac_try" in
6651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6652 *) ac_try_echo=$ac_try;;
6653esac
6654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006661 (exit $ac_status); } && {
6662 test -z "$ac_c_werror_flag" ||
6663 test ! -s conftest.err
6664 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006665 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006666else
Martin v. Löwis11437992002-04-12 09:54:03 +00006667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006668sed 's/^/| /' conftest.$ac_ext >&5
6669
Thomas Wouters477c8d52006-05-27 19:21:47 +00006670 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006671fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006672
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006674fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006675{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6676echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006677if test $ac_cv_type_pid_t = yes; then
6678 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006679else
Martin v. Löwis11437992002-04-12 09:54:03 +00006680
6681cat >>confdefs.h <<_ACEOF
6682#define pid_t int
6683_ACEOF
6684
6685fi
6686
Thomas Wouters477c8d52006-05-27 19:21:47 +00006687{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6688echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006689if test "${ac_cv_type_signal+set}" = set; then
6690 echo $ECHO_N "(cached) $ECHO_C" >&6
6691else
6692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006693/* confdefs.h. */
6694_ACEOF
6695cat confdefs.h >>conftest.$ac_ext
6696cat >>conftest.$ac_ext <<_ACEOF
6697/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006698#include <sys/types.h>
6699#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006700
Martin v. Löwis11437992002-04-12 09:54:03 +00006701int
6702main ()
6703{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006704return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006705 ;
6706 return 0;
6707}
6708_ACEOF
6709rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006710if { (ac_try="$ac_compile"
6711case "(($ac_try" in
6712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6713 *) ac_try_echo=$ac_try;;
6714esac
6715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006718 grep -v '^ *+' conftest.er1 >conftest.err
6719 rm -f conftest.er1
6720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006722 (exit $ac_status); } && {
6723 test -z "$ac_c_werror_flag" ||
6724 test ! -s conftest.err
6725 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00006726 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006727else
Martin v. Löwis11437992002-04-12 09:54:03 +00006728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006729sed 's/^/| /' conftest.$ac_ext >&5
6730
Thomas Wouters477c8d52006-05-27 19:21:47 +00006731 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006732fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006733
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006736{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6737echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006741_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006742
Michael W. Hudson54241132001-12-07 15:38:26 +00006743
Thomas Wouters477c8d52006-05-27 19:21:47 +00006744{ echo "$as_me:$LINENO: checking for size_t" >&5
6745echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006746if test "${ac_cv_type_size_t+set}" = set; then
6747 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006748else
Martin v. Löwis11437992002-04-12 09:54:03 +00006749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006755$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006756typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006757int
6758main ()
6759{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006760if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006761 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006762if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 return 0;
6764 ;
6765 return 0;
6766}
6767_ACEOF
6768rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006769if { (ac_try="$ac_compile"
6770case "(($ac_try" in
6771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6772 *) ac_try_echo=$ac_try;;
6773esac
6774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006777 grep -v '^ *+' conftest.er1 >conftest.err
6778 rm -f conftest.er1
6779 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006781 (exit $ac_status); } && {
6782 test -z "$ac_c_werror_flag" ||
6783 test ! -s conftest.err
6784 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006785 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006788sed 's/^/| /' conftest.$ac_ext >&5
6789
Thomas Wouters477c8d52006-05-27 19:21:47 +00006790 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006791fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006792
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006795{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6796echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006797if test $ac_cv_type_size_t = yes; then
6798 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006799else
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
6801cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00006802#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006803_ACEOF
6804
6805fi
6806
Thomas Wouters477c8d52006-05-27 19:21:47 +00006807{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6808echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006809if test "${ac_cv_type_uid_t+set}" = set; then
6810 echo $ECHO_N "(cached) $ECHO_C" >&6
6811else
6812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006813/* confdefs.h. */
6814_ACEOF
6815cat confdefs.h >>conftest.$ac_ext
6816cat >>conftest.$ac_ext <<_ACEOF
6817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006818#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006819
6820_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006822 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006823 ac_cv_type_uid_t=yes
6824else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006825 ac_cv_type_uid_t=no
6826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827rm -f conftest*
6828
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006829fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006830{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6831echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006832if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834cat >>confdefs.h <<\_ACEOF
6835#define uid_t int
6836_ACEOF
6837
6838
6839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006840#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006841_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842
6843fi
6844
Thomas Wouters477c8d52006-05-27 19:21:47 +00006845{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6846echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006847if test "${ac_cv_type_ssize_t+set}" = set; then
6848 echo $ECHO_N "(cached) $ECHO_C" >&6
6849else
6850 cat >conftest.$ac_ext <<_ACEOF
6851/* confdefs.h. */
6852_ACEOF
6853cat confdefs.h >>conftest.$ac_ext
6854cat >>conftest.$ac_ext <<_ACEOF
6855/* end confdefs.h. */
6856$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006857typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006858int
6859main ()
6860{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006861if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006862 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006863if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006864 return 0;
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006870if { (ac_try="$ac_compile"
6871case "(($ac_try" in
6872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6873 *) ac_try_echo=$ac_try;;
6874esac
6875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877 ac_status=$?
6878 grep -v '^ *+' conftest.er1 >conftest.err
6879 rm -f conftest.er1
6880 cat conftest.err >&5
6881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006882 (exit $ac_status); } && {
6883 test -z "$ac_c_werror_flag" ||
6884 test ! -s conftest.err
6885 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886 ac_cv_type_ssize_t=yes
6887else
6888 echo "$as_me: failed program was:" >&5
6889sed 's/^/| /' conftest.$ac_ext >&5
6890
Thomas Wouters477c8d52006-05-27 19:21:47 +00006891 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006893
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006895fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006896{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6897echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006898if test $ac_cv_type_ssize_t = yes; then
6899
6900cat >>confdefs.h <<\_ACEOF
6901#define HAVE_SSIZE_T 1
6902_ACEOF
6903
6904fi
6905
Jack Jansendd19cf82001-12-06 22:36:17 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006908# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters477c8d52006-05-27 19:21:47 +00006909{ echo "$as_me:$LINENO: checking for int" >&5
6910echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006911if test "${ac_cv_type_int+set}" = set; then
6912 echo $ECHO_N "(cached) $ECHO_C" >&6
6913else
6914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006915/* confdefs.h. */
6916_ACEOF
6917cat confdefs.h >>conftest.$ac_ext
6918cat >>conftest.$ac_ext <<_ACEOF
6919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006920$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006921typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006922int
6923main ()
6924{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006925if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006927if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 return 0;
6929 ;
6930 return 0;
6931}
6932_ACEOF
6933rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006934if { (ac_try="$ac_compile"
6935case "(($ac_try" in
6936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6937 *) ac_try_echo=$ac_try;;
6938esac
6939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006942 grep -v '^ *+' conftest.er1 >conftest.err
6943 rm -f conftest.er1
6944 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00006946 (exit $ac_status); } && {
6947 test -z "$ac_c_werror_flag" ||
6948 test ! -s conftest.err
6949 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_cv_type_int=yes
6951else
6952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006953sed 's/^/| /' conftest.$ac_ext >&5
6954
Thomas Wouters477c8d52006-05-27 19:21:47 +00006955 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006956fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006957
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006959fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006960{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6961echo "${ECHO_T}$ac_cv_type_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
Thomas Wouters89f507f2006-12-13 04:49:30 +00006963# The cast to long int works around a bug in the HP C Compiler
6964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6966# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00006967{ echo "$as_me:$LINENO: checking size of int" >&5
6968echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006969if test "${ac_cv_sizeof_int+set}" = set; then
6970 echo $ECHO_N "(cached) $ECHO_C" >&6
6971else
Martin v. Löwis11437992002-04-12 09:54:03 +00006972 if test "$cross_compiling" = yes; then
6973 # Depending upon the size, compute the lo and hi bounds.
6974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* confdefs.h. */
6976_ACEOF
6977cat confdefs.h >>conftest.$ac_ext
6978cat >>conftest.$ac_ext <<_ACEOF
6979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006980$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00006981 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006982int
6983main ()
6984{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006985static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006986test_array [0] = 0
6987
6988 ;
6989 return 0;
6990}
6991_ACEOF
6992rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006993if { (ac_try="$ac_compile"
6994case "(($ac_try" in
6995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6996 *) ac_try_echo=$ac_try;;
6997esac
6998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007001 grep -v '^ *+' conftest.er1 >conftest.err
7002 rm -f conftest.er1
7003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007005 (exit $ac_status); } && {
7006 test -z "$ac_c_werror_flag" ||
7007 test ! -s conftest.err
7008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 ac_lo=0 ac_mid=0
7010 while :; do
7011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007012/* confdefs.h. */
7013_ACEOF
7014cat confdefs.h >>conftest.$ac_ext
7015cat >>conftest.$ac_ext <<_ACEOF
7016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007017$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007018 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007019int
7020main ()
7021{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007022static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007023test_array [0] = 0
7024
7025 ;
7026 return 0;
7027}
7028_ACEOF
7029rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007030if { (ac_try="$ac_compile"
7031case "(($ac_try" in
7032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7033 *) ac_try_echo=$ac_try;;
7034esac
7035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007038 grep -v '^ *+' conftest.er1 >conftest.err
7039 rm -f conftest.er1
7040 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007042 (exit $ac_status); } && {
7043 test -z "$ac_c_werror_flag" ||
7044 test ! -s conftest.err
7045 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007046 ac_hi=$ac_mid; break
7047else
7048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007049sed 's/^/| /' conftest.$ac_ext >&5
7050
Thomas Wouters477c8d52006-05-27 19:21:47 +00007051 ac_lo=`expr $ac_mid + 1`
7052 if test $ac_lo -le $ac_mid; then
7053 ac_lo= ac_hi=
7054 break
7055 fi
7056 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007058
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 done
7061else
7062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007063sed 's/^/| /' conftest.$ac_ext >&5
7064
Thomas Wouters477c8d52006-05-27 19:21:47 +00007065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007066/* confdefs.h. */
7067_ACEOF
7068cat confdefs.h >>conftest.$ac_ext
7069cat >>conftest.$ac_ext <<_ACEOF
7070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007071$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007072 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007073int
7074main ()
7075{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007077test_array [0] = 0
7078
7079 ;
7080 return 0;
7081}
7082_ACEOF
7083rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007084if { (ac_try="$ac_compile"
7085case "(($ac_try" in
7086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7087 *) ac_try_echo=$ac_try;;
7088esac
7089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007092 grep -v '^ *+' conftest.er1 >conftest.err
7093 rm -f conftest.er1
7094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007096 (exit $ac_status); } && {
7097 test -z "$ac_c_werror_flag" ||
7098 test ! -s conftest.err
7099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007100 ac_hi=-1 ac_mid=-1
7101 while :; do
7102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007103/* confdefs.h. */
7104_ACEOF
7105cat confdefs.h >>conftest.$ac_ext
7106cat >>conftest.$ac_ext <<_ACEOF
7107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007108$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007109 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007110int
7111main ()
7112{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007113static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007114test_array [0] = 0
7115
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007121if { (ac_try="$ac_compile"
7122case "(($ac_try" in
7123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7124 *) ac_try_echo=$ac_try;;
7125esac
7126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007129 grep -v '^ *+' conftest.er1 >conftest.err
7130 rm -f conftest.er1
7131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007133 (exit $ac_status); } && {
7134 test -z "$ac_c_werror_flag" ||
7135 test ! -s conftest.err
7136 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007137 ac_lo=$ac_mid; break
7138else
7139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007140sed 's/^/| /' conftest.$ac_ext >&5
7141
Thomas Wouters477c8d52006-05-27 19:21:47 +00007142 ac_hi=`expr '(' $ac_mid ')' - 1`
7143 if test $ac_mid -le $ac_hi; then
7144 ac_lo= ac_hi=
7145 break
7146 fi
7147 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007148fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007149
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 done
7152else
7153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007154sed 's/^/| /' conftest.$ac_ext >&5
7155
Thomas Wouters477c8d52006-05-27 19:21:47 +00007156 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007157fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007158
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007160fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007161
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007163# Binary search between lo and hi bounds.
7164while test "x$ac_lo" != "x$ac_hi"; do
7165 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007167/* confdefs.h. */
7168_ACEOF
7169cat confdefs.h >>conftest.$ac_ext
7170cat >>conftest.$ac_ext <<_ACEOF
7171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007172$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007173 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007174int
7175main ()
7176{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007177static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007178test_array [0] = 0
7179
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007185if { (ac_try="$ac_compile"
7186case "(($ac_try" in
7187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7188 *) ac_try_echo=$ac_try;;
7189esac
7190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007193 grep -v '^ *+' conftest.er1 >conftest.err
7194 rm -f conftest.er1
7195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007197 (exit $ac_status); } && {
7198 test -z "$ac_c_werror_flag" ||
7199 test ! -s conftest.err
7200 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007201 ac_hi=$ac_mid
7202else
7203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
Thomas Wouters477c8d52006-05-27 19:21:47 +00007206 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007207fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007208
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007210done
7211case $ac_lo in
7212?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00007213'') if test "$ac_cv_type_int" = yes; then
7214 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007215See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007216echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007217See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00007218 { (exit 77); exit 77; }; }
7219 else
7220 ac_cv_sizeof_int=0
7221 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007222esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007223else
Martin v. Löwis11437992002-04-12 09:54:03 +00007224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* confdefs.h. */
7226_ACEOF
7227cat confdefs.h >>conftest.$ac_ext
7228cat >>conftest.$ac_ext <<_ACEOF
7229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007230$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007231 typedef int ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007232static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7233static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007234#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007235#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007236int
7237main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007238{
Martin v. Löwis11437992002-04-12 09:54:03 +00007239
7240 FILE *f = fopen ("conftest.val", "w");
7241 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007242 return 1;
7243 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007244 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007245 long int i = longval ();
7246 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7247 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007248 fprintf (f, "%ld\n", i);
7249 }
7250 else
7251 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007252 unsigned long int i = ulongval ();
7253 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7254 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007255 fprintf (f, "%lu\n", i);
7256 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007257 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
7259 ;
7260 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007261}
Martin v. Löwis11437992002-04-12 09:54:03 +00007262_ACEOF
7263rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007264if { (ac_try="$ac_link"
7265case "(($ac_try" in
7266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7267 *) ac_try_echo=$ac_try;;
7268esac
7269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7270 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007274 { (case "(($ac_try" in
7275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7276 *) ac_try_echo=$ac_try;;
7277esac
7278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7279 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); }; }; then
7283 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007284else
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 echo "$as_me: program exited with status $ac_status" >&5
7286echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007287sed 's/^/| /' conftest.$ac_ext >&5
7288
Martin v. Löwis11437992002-04-12 09:54:03 +00007289( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00007290if test "$ac_cv_type_int" = yes; then
7291 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007292See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007293echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007294See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007295 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00007296 else
7297 ac_cv_sizeof_int=0
7298 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007299fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007301fi
7302rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007303fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007304{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7305echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00007306
7307
7308
Martin v. Löwis11437992002-04-12 09:54:03 +00007309cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007310#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007311_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007312
7313
Thomas Wouters477c8d52006-05-27 19:21:47 +00007314{ echo "$as_me:$LINENO: checking for long" >&5
7315echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007316if test "${ac_cv_type_long+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
7318else
7319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* confdefs.h. */
7321_ACEOF
7322cat confdefs.h >>conftest.$ac_ext
7323cat >>conftest.$ac_ext <<_ACEOF
7324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007325$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007326typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007327int
7328main ()
7329{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007330if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007331 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007332if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 return 0;
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007339if { (ac_try="$ac_compile"
7340case "(($ac_try" in
7341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7342 *) ac_try_echo=$ac_try;;
7343esac
7344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007347 grep -v '^ *+' conftest.er1 >conftest.err
7348 rm -f conftest.er1
7349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007351 (exit $ac_status); } && {
7352 test -z "$ac_c_werror_flag" ||
7353 test ! -s conftest.err
7354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007355 ac_cv_type_long=yes
7356else
7357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007358sed 's/^/| /' conftest.$ac_ext >&5
7359
Thomas Wouters477c8d52006-05-27 19:21:47 +00007360 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007361fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007362
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007364fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007365{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7366echo "${ECHO_T}$ac_cv_type_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007367
Thomas Wouters89f507f2006-12-13 04:49:30 +00007368# The cast to long int works around a bug in the HP C Compiler
7369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7371# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00007372{ echo "$as_me:$LINENO: checking size of long" >&5
7373echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007374if test "${ac_cv_sizeof_long+set}" = set; then
7375 echo $ECHO_N "(cached) $ECHO_C" >&6
7376else
Martin v. Löwis11437992002-04-12 09:54:03 +00007377 if test "$cross_compiling" = yes; then
7378 # Depending upon the size, compute the lo and hi bounds.
7379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007386 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007387int
7388main ()
7389{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007391test_array [0] = 0
7392
7393 ;
7394 return 0;
7395}
7396_ACEOF
7397rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007398if { (ac_try="$ac_compile"
7399case "(($ac_try" in
7400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7401 *) ac_try_echo=$ac_try;;
7402esac
7403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007406 grep -v '^ *+' conftest.er1 >conftest.err
7407 rm -f conftest.er1
7408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007410 (exit $ac_status); } && {
7411 test -z "$ac_c_werror_flag" ||
7412 test ! -s conftest.err
7413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 ac_lo=0 ac_mid=0
7415 while :; do
7416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007417/* confdefs.h. */
7418_ACEOF
7419cat confdefs.h >>conftest.$ac_ext
7420cat >>conftest.$ac_ext <<_ACEOF
7421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007422$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007423 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007424int
7425main ()
7426{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007427static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007428test_array [0] = 0
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007435if { (ac_try="$ac_compile"
7436case "(($ac_try" in
7437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7438 *) ac_try_echo=$ac_try;;
7439esac
7440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007447 (exit $ac_status); } && {
7448 test -z "$ac_c_werror_flag" ||
7449 test ! -s conftest.err
7450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007451 ac_hi=$ac_mid; break
7452else
7453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007454sed 's/^/| /' conftest.$ac_ext >&5
7455
Thomas Wouters477c8d52006-05-27 19:21:47 +00007456 ac_lo=`expr $ac_mid + 1`
7457 if test $ac_lo -le $ac_mid; then
7458 ac_lo= ac_hi=
7459 break
7460 fi
7461 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007462fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007463
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 done
7466else
7467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007468sed 's/^/| /' conftest.$ac_ext >&5
7469
Thomas Wouters477c8d52006-05-27 19:21:47 +00007470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007476$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007477 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007478int
7479main ()
7480{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007482test_array [0] = 0
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
7494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 ac_hi=-1 ac_mid=-1
7506 while :; do
7507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007508/* confdefs.h. */
7509_ACEOF
7510cat confdefs.h >>conftest.$ac_ext
7511cat >>conftest.$ac_ext <<_ACEOF
7512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007513$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007514 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007515int
7516main ()
7517{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007518static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007519test_array [0] = 0
7520
7521 ;
7522 return 0;
7523}
7524_ACEOF
7525rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007526if { (ac_try="$ac_compile"
7527case "(($ac_try" in
7528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7529 *) ac_try_echo=$ac_try;;
7530esac
7531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007534 grep -v '^ *+' conftest.er1 >conftest.err
7535 rm -f conftest.er1
7536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007538 (exit $ac_status); } && {
7539 test -z "$ac_c_werror_flag" ||
7540 test ! -s conftest.err
7541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_lo=$ac_mid; break
7543else
7544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007545sed 's/^/| /' conftest.$ac_ext >&5
7546
Thomas Wouters477c8d52006-05-27 19:21:47 +00007547 ac_hi=`expr '(' $ac_mid ')' - 1`
7548 if test $ac_mid -le $ac_hi; then
7549 ac_lo= ac_hi=
7550 break
7551 fi
7552 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007553fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007554
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 done
7557else
7558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007559sed 's/^/| /' conftest.$ac_ext >&5
7560
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007562fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007566
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007568# Binary search between lo and hi bounds.
7569while test "x$ac_lo" != "x$ac_hi"; do
7570 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007572/* confdefs.h. */
7573_ACEOF
7574cat confdefs.h >>conftest.$ac_ext
7575cat >>conftest.$ac_ext <<_ACEOF
7576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007577$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007578 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007579int
7580main ()
7581{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007583test_array [0] = 0
7584
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007590if { (ac_try="$ac_compile"
7591case "(($ac_try" in
7592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7593 *) ac_try_echo=$ac_try;;
7594esac
7595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007598 grep -v '^ *+' conftest.er1 >conftest.err
7599 rm -f conftest.er1
7600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007602 (exit $ac_status); } && {
7603 test -z "$ac_c_werror_flag" ||
7604 test ! -s conftest.err
7605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 ac_hi=$ac_mid
7607else
7608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007609sed 's/^/| /' conftest.$ac_ext >&5
7610
Thomas Wouters477c8d52006-05-27 19:21:47 +00007611 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007613
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007615done
7616case $ac_lo in
7617?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00007618'') if test "$ac_cv_type_long" = yes; then
7619 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007620See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007621echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007622See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00007623 { (exit 77); exit 77; }; }
7624 else
7625 ac_cv_sizeof_long=0
7626 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007627esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007628else
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007636 typedef long ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007637static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7638static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007639#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007640#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007641int
7642main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007643{
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
7645 FILE *f = fopen ("conftest.val", "w");
7646 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007647 return 1;
7648 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007650 long int i = longval ();
7651 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7652 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 fprintf (f, "%ld\n", i);
7654 }
7655 else
7656 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007657 unsigned long int i = ulongval ();
7658 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7659 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 fprintf (f, "%lu\n", i);
7661 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007662 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007663
7664 ;
7665 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007666}
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
7668rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007669if { (ac_try="$ac_link"
7670case "(($ac_try" in
7671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7672 *) ac_try_echo=$ac_try;;
7673esac
7674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007676 ac_status=$?
7677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007679 { (case "(($ac_try" in
7680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7681 *) ac_try_echo=$ac_try;;
7682esac
7683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7684 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007685 ac_status=$?
7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007689else
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 echo "$as_me: program exited with status $ac_status" >&5
7691echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007692sed 's/^/| /' conftest.$ac_ext >&5
7693
Martin v. Löwis11437992002-04-12 09:54:03 +00007694( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00007695if test "$ac_cv_type_long" = yes; then
7696 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007697See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007698echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007699See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007700 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00007701 else
7702 ac_cv_sizeof_long=0
7703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
7707rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007708fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007709{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7710echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00007711
7712
7713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007715#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007717
7718
Thomas Wouters477c8d52006-05-27 19:21:47 +00007719{ echo "$as_me:$LINENO: checking for void *" >&5
7720echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007721if test "${ac_cv_type_void_p+set}" = set; then
7722 echo $ECHO_N "(cached) $ECHO_C" >&6
7723else
7724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007725/* confdefs.h. */
7726_ACEOF
7727cat confdefs.h >>conftest.$ac_ext
7728cat >>conftest.$ac_ext <<_ACEOF
7729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007730$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007731typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007732int
7733main ()
7734{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007735if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007737if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 return 0;
7739 ;
7740 return 0;
7741}
7742_ACEOF
7743rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007744if { (ac_try="$ac_compile"
7745case "(($ac_try" in
7746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7747 *) ac_try_echo=$ac_try;;
7748esac
7749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007752 grep -v '^ *+' conftest.er1 >conftest.err
7753 rm -f conftest.er1
7754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007756 (exit $ac_status); } && {
7757 test -z "$ac_c_werror_flag" ||
7758 test ! -s conftest.err
7759 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 ac_cv_type_void_p=yes
7761else
7762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007763sed 's/^/| /' conftest.$ac_ext >&5
7764
Thomas Wouters477c8d52006-05-27 19:21:47 +00007765 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007767
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007770{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7771echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007772
Thomas Wouters89f507f2006-12-13 04:49:30 +00007773# The cast to long int works around a bug in the HP C Compiler
7774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7776# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00007777{ echo "$as_me:$LINENO: checking size of void *" >&5
7778echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007779if test "${ac_cv_sizeof_void_p+set}" = set; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7781else
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 if test "$cross_compiling" = yes; then
7783 # Depending upon the size, compute the lo and hi bounds.
7784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007791 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007792int
7793main ()
7794{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007803if { (ac_try="$ac_compile"
7804case "(($ac_try" in
7805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7806 *) ac_try_echo=$ac_try;;
7807esac
7808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007811 grep -v '^ *+' conftest.er1 >conftest.err
7812 rm -f conftest.er1
7813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007815 (exit $ac_status); } && {
7816 test -z "$ac_c_werror_flag" ||
7817 test ! -s conftest.err
7818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_lo=0 ac_mid=0
7820 while :; do
7821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007822/* confdefs.h. */
7823_ACEOF
7824cat confdefs.h >>conftest.$ac_ext
7825cat >>conftest.$ac_ext <<_ACEOF
7826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007828 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007829int
7830main ()
7831{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007832static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007833test_array [0] = 0
7834
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007840if { (ac_try="$ac_compile"
7841case "(($ac_try" in
7842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7843 *) ac_try_echo=$ac_try;;
7844esac
7845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007848 grep -v '^ *+' conftest.er1 >conftest.err
7849 rm -f conftest.er1
7850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007852 (exit $ac_status); } && {
7853 test -z "$ac_c_werror_flag" ||
7854 test ! -s conftest.err
7855 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 ac_hi=$ac_mid; break
7857else
7858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007859sed 's/^/| /' conftest.$ac_ext >&5
7860
Thomas Wouters477c8d52006-05-27 19:21:47 +00007861 ac_lo=`expr $ac_mid + 1`
7862 if test $ac_lo -le $ac_mid; then
7863 ac_lo= ac_hi=
7864 break
7865 fi
7866 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007867fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007868
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 done
7871else
7872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007873sed 's/^/| /' conftest.$ac_ext >&5
7874
Thomas Wouters477c8d52006-05-27 19:21:47 +00007875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007876/* confdefs.h. */
7877_ACEOF
7878cat confdefs.h >>conftest.$ac_ext
7879cat >>conftest.$ac_ext <<_ACEOF
7880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007881$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007882 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
7899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ac_hi=-1 ac_mid=-1
7911 while :; do
7912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* confdefs.h. */
7914_ACEOF
7915cat confdefs.h >>conftest.$ac_ext
7916cat >>conftest.$ac_ext <<_ACEOF
7917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007919 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007920int
7921main ()
7922{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007923static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007924test_array [0] = 0
7925
7926 ;
7927 return 0;
7928}
7929_ACEOF
7930rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007931if { (ac_try="$ac_compile"
7932case "(($ac_try" in
7933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7934 *) ac_try_echo=$ac_try;;
7935esac
7936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007939 grep -v '^ *+' conftest.er1 >conftest.err
7940 rm -f conftest.er1
7941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00007943 (exit $ac_status); } && {
7944 test -z "$ac_c_werror_flag" ||
7945 test ! -s conftest.err
7946 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_lo=$ac_mid; break
7948else
7949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007950sed 's/^/| /' conftest.$ac_ext >&5
7951
Thomas Wouters477c8d52006-05-27 19:21:47 +00007952 ac_hi=`expr '(' $ac_mid ')' - 1`
7953 if test $ac_mid -le $ac_hi; then
7954 ac_lo= ac_hi=
7955 break
7956 fi
7957 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007958fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007959
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 done
7962else
7963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007964sed 's/^/| /' conftest.$ac_ext >&5
7965
Thomas Wouters477c8d52006-05-27 19:21:47 +00007966 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007967fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007968
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007970fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007971
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007973# Binary search between lo and hi bounds.
7974while test "x$ac_lo" != "x$ac_hi"; do
7975 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* confdefs.h. */
7978_ACEOF
7979cat confdefs.h >>conftest.$ac_ext
7980cat >>conftest.$ac_ext <<_ACEOF
7981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00007983 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007984int
7985main ()
7986{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007987static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007988test_array [0] = 0
7989
7990 ;
7991 return 0;
7992}
7993_ACEOF
7994rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007995if { (ac_try="$ac_compile"
7996case "(($ac_try" in
7997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7998 *) ac_try_echo=$ac_try;;
7999esac
8000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008003 grep -v '^ *+' conftest.er1 >conftest.err
8004 rm -f conftest.er1
8005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008007 (exit $ac_status); } && {
8008 test -z "$ac_c_werror_flag" ||
8009 test ! -s conftest.err
8010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_hi=$ac_mid
8012else
8013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Thomas Wouters477c8d52006-05-27 19:21:47 +00008016 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008017fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008018
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008020done
8021case $ac_lo in
8022?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00008023'') if test "$ac_cv_type_void_p" = yes; then
8024 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008025See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008026echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008027See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00008028 { (exit 77); exit 77; }; }
8029 else
8030 ac_cv_sizeof_void_p=0
8031 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008032esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008033else
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* confdefs.h. */
8036_ACEOF
8037cat confdefs.h >>conftest.$ac_ext
8038cat >>conftest.$ac_ext <<_ACEOF
8039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008041 typedef void * ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008042static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8043static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008044#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008045#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008046int
8047main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008048{
Martin v. Löwis11437992002-04-12 09:54:03 +00008049
8050 FILE *f = fopen ("conftest.val", "w");
8051 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008052 return 1;
8053 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008055 long int i = longval ();
8056 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8057 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 fprintf (f, "%ld\n", i);
8059 }
8060 else
8061 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008062 unsigned long int i = ulongval ();
8063 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8064 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 fprintf (f, "%lu\n", i);
8066 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008067 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
8069 ;
8070 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008071}
Martin v. Löwis11437992002-04-12 09:54:03 +00008072_ACEOF
8073rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008074if { (ac_try="$ac_link"
8075case "(($ac_try" in
8076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8077 *) ac_try_echo=$ac_try;;
8078esac
8079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8080 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ac_status=$?
8082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8083 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008084 { (case "(($ac_try" in
8085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8086 *) ac_try_echo=$ac_try;;
8087esac
8088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8089 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); }; }; then
8093 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008094else
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 echo "$as_me: program exited with status $ac_status" >&5
8096echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008097sed 's/^/| /' conftest.$ac_ext >&5
8098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00008100if test "$ac_cv_type_void_p" = yes; then
8101 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008102See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008103echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008104See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008105 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008106 else
8107 ac_cv_sizeof_void_p=0
8108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111fi
8112rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008113fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008114{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8115echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008116
8117
8118
Martin v. Löwis11437992002-04-12 09:54:03 +00008119cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008120#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008121_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008122
8123
Thomas Wouters477c8d52006-05-27 19:21:47 +00008124{ echo "$as_me:$LINENO: checking for short" >&5
8125echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008126if test "${ac_cv_type_short+set}" = set; then
8127 echo $ECHO_N "(cached) $ECHO_C" >&6
8128else
8129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008130/* confdefs.h. */
8131_ACEOF
8132cat confdefs.h >>conftest.$ac_ext
8133cat >>conftest.$ac_ext <<_ACEOF
8134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008135$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008136typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008137int
8138main ()
8139{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008140if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008142if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 return 0;
8144 ;
8145 return 0;
8146}
8147_ACEOF
8148rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008149if { (ac_try="$ac_compile"
8150case "(($ac_try" in
8151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8152 *) ac_try_echo=$ac_try;;
8153esac
8154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008157 grep -v '^ *+' conftest.er1 >conftest.err
8158 rm -f conftest.er1
8159 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008161 (exit $ac_status); } && {
8162 test -z "$ac_c_werror_flag" ||
8163 test ! -s conftest.err
8164 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 ac_cv_type_short=yes
8166else
8167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008168sed 's/^/| /' conftest.$ac_ext >&5
8169
Thomas Wouters477c8d52006-05-27 19:21:47 +00008170 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008172
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008175{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8176echo "${ECHO_T}$ac_cv_type_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
Thomas Wouters89f507f2006-12-13 04:49:30 +00008178# The cast to long int works around a bug in the HP C Compiler
8179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8181# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00008182{ echo "$as_me:$LINENO: checking size of short" >&5
8183echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008184if test "${ac_cv_sizeof_short+set}" = set; then
8185 echo $ECHO_N "(cached) $ECHO_C" >&6
8186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 if test "$cross_compiling" = yes; then
8188 # Depending upon the size, compute the lo and hi bounds.
8189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008196 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008197int
8198main ()
8199{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008201test_array [0] = 0
8202
8203 ;
8204 return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008208if { (ac_try="$ac_compile"
8209case "(($ac_try" in
8210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211 *) ac_try_echo=$ac_try;;
8212esac
8213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008220 (exit $ac_status); } && {
8221 test -z "$ac_c_werror_flag" ||
8222 test ! -s conftest.err
8223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_lo=0 ac_mid=0
8225 while :; do
8226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008227/* confdefs.h. */
8228_ACEOF
8229cat confdefs.h >>conftest.$ac_ext
8230cat >>conftest.$ac_ext <<_ACEOF
8231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008232$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008233 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008234int
8235main ()
8236{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008238test_array [0] = 0
8239
8240 ;
8241 return 0;
8242}
8243_ACEOF
8244rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008245if { (ac_try="$ac_compile"
8246case "(($ac_try" in
8247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8248 *) ac_try_echo=$ac_try;;
8249esac
8250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008253 grep -v '^ *+' conftest.er1 >conftest.err
8254 rm -f conftest.er1
8255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008257 (exit $ac_status); } && {
8258 test -z "$ac_c_werror_flag" ||
8259 test ! -s conftest.err
8260 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 ac_hi=$ac_mid; break
8262else
8263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008264sed 's/^/| /' conftest.$ac_ext >&5
8265
Thomas Wouters477c8d52006-05-27 19:21:47 +00008266 ac_lo=`expr $ac_mid + 1`
8267 if test $ac_lo -le $ac_mid; then
8268 ac_lo= ac_hi=
8269 break
8270 fi
8271 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008272fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008273
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 done
8276else
8277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008278sed 's/^/| /' conftest.$ac_ext >&5
8279
Thomas Wouters477c8d52006-05-27 19:21:47 +00008280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008287 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008288int
8289main ()
8290{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008292test_array [0] = 0
8293
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008299if { (ac_try="$ac_compile"
8300case "(($ac_try" in
8301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8302 *) ac_try_echo=$ac_try;;
8303esac
8304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008307 grep -v '^ *+' conftest.er1 >conftest.err
8308 rm -f conftest.er1
8309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008311 (exit $ac_status); } && {
8312 test -z "$ac_c_werror_flag" ||
8313 test ! -s conftest.err
8314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 ac_hi=-1 ac_mid=-1
8316 while :; do
8317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008323$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008324 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008325int
8326main ()
8327{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008328static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008329test_array [0] = 0
8330
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008336if { (ac_try="$ac_compile"
8337case "(($ac_try" in
8338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8339 *) ac_try_echo=$ac_try;;
8340esac
8341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008344 grep -v '^ *+' conftest.er1 >conftest.err
8345 rm -f conftest.er1
8346 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008348 (exit $ac_status); } && {
8349 test -z "$ac_c_werror_flag" ||
8350 test ! -s conftest.err
8351 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ac_lo=$ac_mid; break
8353else
8354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008355sed 's/^/| /' conftest.$ac_ext >&5
8356
Thomas Wouters477c8d52006-05-27 19:21:47 +00008357 ac_hi=`expr '(' $ac_mid ')' - 1`
8358 if test $ac_mid -le $ac_hi; then
8359 ac_lo= ac_hi=
8360 break
8361 fi
8362 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008363fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008364
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 done
8367else
8368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008369sed 's/^/| /' conftest.$ac_ext >&5
8370
Thomas Wouters477c8d52006-05-27 19:21:47 +00008371 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008373
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008375fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008376
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008378# Binary search between lo and hi bounds.
8379while test "x$ac_lo" != "x$ac_hi"; do
8380 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008387$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008388 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008389int
8390main ()
8391{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008392static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008393test_array [0] = 0
8394
8395 ;
8396 return 0;
8397}
8398_ACEOF
8399rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008400if { (ac_try="$ac_compile"
8401case "(($ac_try" in
8402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8403 *) ac_try_echo=$ac_try;;
8404esac
8405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008408 grep -v '^ *+' conftest.er1 >conftest.err
8409 rm -f conftest.er1
8410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008412 (exit $ac_status); } && {
8413 test -z "$ac_c_werror_flag" ||
8414 test ! -s conftest.err
8415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 ac_hi=$ac_mid
8417else
8418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008419sed 's/^/| /' conftest.$ac_ext >&5
8420
Thomas Wouters477c8d52006-05-27 19:21:47 +00008421 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008423
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008425done
8426case $ac_lo in
8427?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00008428'') if test "$ac_cv_type_short" = yes; then
8429 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008430See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008431echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008432See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00008433 { (exit 77); exit 77; }; }
8434 else
8435 ac_cv_sizeof_short=0
8436 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008437esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008438else
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008445$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008446 typedef short ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008447static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8448static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008449#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008450#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008451int
8452main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453{
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455 FILE *f = fopen ("conftest.val", "w");
8456 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008457 return 1;
8458 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008460 long int i = longval ();
8461 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8462 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 fprintf (f, "%ld\n", i);
8464 }
8465 else
8466 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008467 unsigned long int i = ulongval ();
8468 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8469 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 fprintf (f, "%lu\n", i);
8471 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008472 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
8474 ;
8475 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008476}
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
8478rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008479if { (ac_try="$ac_link"
8480case "(($ac_try" in
8481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8482 *) ac_try_echo=$ac_try;;
8483esac
8484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8485 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_status=$?
8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008489 { (case "(($ac_try" in
8490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8491 *) ac_try_echo=$ac_try;;
8492esac
8493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8494 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; }; then
8498 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008499else
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 echo "$as_me: program exited with status $ac_status" >&5
8501echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008502sed 's/^/| /' conftest.$ac_ext >&5
8503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00008505if test "$ac_cv_type_short" = yes; then
8506 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008507See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008508echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008509See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008510 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008511 else
8512 ac_cv_sizeof_short=0
8513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516fi
8517rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008518fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008519{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8520echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008521
8522
8523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008525#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008526_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008527
8528
Thomas Wouters477c8d52006-05-27 19:21:47 +00008529{ echo "$as_me:$LINENO: checking for float" >&5
8530echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008531if test "${ac_cv_type_float+set}" = set; then
8532 echo $ECHO_N "(cached) $ECHO_C" >&6
8533else
8534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008535/* confdefs.h. */
8536_ACEOF
8537cat confdefs.h >>conftest.$ac_ext
8538cat >>conftest.$ac_ext <<_ACEOF
8539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008540$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008541typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008545if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008547if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 return 0;
8549 ;
8550 return 0;
8551}
8552_ACEOF
8553rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008554if { (ac_try="$ac_compile"
8555case "(($ac_try" in
8556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8557 *) ac_try_echo=$ac_try;;
8558esac
8559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008562 grep -v '^ *+' conftest.er1 >conftest.err
8563 rm -f conftest.er1
8564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008566 (exit $ac_status); } && {
8567 test -z "$ac_c_werror_flag" ||
8568 test ! -s conftest.err
8569 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_cv_type_float=yes
8571else
8572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008573sed 's/^/| /' conftest.$ac_ext >&5
8574
Thomas Wouters477c8d52006-05-27 19:21:47 +00008575 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008577
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008580{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8581echo "${ECHO_T}$ac_cv_type_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008582
Thomas Wouters89f507f2006-12-13 04:49:30 +00008583# The cast to long int works around a bug in the HP C Compiler
8584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8586# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00008587{ echo "$as_me:$LINENO: checking size of float" >&5
8588echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008589if test "${ac_cv_sizeof_float+set}" = set; then
8590 echo $ECHO_N "(cached) $ECHO_C" >&6
8591else
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 if test "$cross_compiling" = yes; then
8593 # Depending upon the size, compute the lo and hi bounds.
8594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008601 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008606test_array [0] = 0
8607
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008613if { (ac_try="$ac_compile"
8614case "(($ac_try" in
8615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8616 *) ac_try_echo=$ac_try;;
8617esac
8618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008621 grep -v '^ *+' conftest.er1 >conftest.err
8622 rm -f conftest.er1
8623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008625 (exit $ac_status); } && {
8626 test -z "$ac_c_werror_flag" ||
8627 test ! -s conftest.err
8628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_lo=0 ac_mid=0
8630 while :; do
8631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008632/* confdefs.h. */
8633_ACEOF
8634cat confdefs.h >>conftest.$ac_ext
8635cat >>conftest.$ac_ext <<_ACEOF
8636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008637$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008638 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008639int
8640main ()
8641{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008642static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008643test_array [0] = 0
8644
8645 ;
8646 return 0;
8647}
8648_ACEOF
8649rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008650if { (ac_try="$ac_compile"
8651case "(($ac_try" in
8652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8653 *) ac_try_echo=$ac_try;;
8654esac
8655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008658 grep -v '^ *+' conftest.er1 >conftest.err
8659 rm -f conftest.er1
8660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008662 (exit $ac_status); } && {
8663 test -z "$ac_c_werror_flag" ||
8664 test ! -s conftest.err
8665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_hi=$ac_mid; break
8667else
8668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008669sed 's/^/| /' conftest.$ac_ext >&5
8670
Thomas Wouters477c8d52006-05-27 19:21:47 +00008671 ac_lo=`expr $ac_mid + 1`
8672 if test $ac_lo -le $ac_mid; then
8673 ac_lo= ac_hi=
8674 break
8675 fi
8676 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008678
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 done
8681else
8682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008683sed 's/^/| /' conftest.$ac_ext >&5
8684
Thomas Wouters477c8d52006-05-27 19:21:47 +00008685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008692 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008693int
8694main ()
8695{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008697test_array [0] = 0
8698
8699 ;
8700 return 0;
8701}
8702_ACEOF
8703rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008704if { (ac_try="$ac_compile"
8705case "(($ac_try" in
8706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8707 *) ac_try_echo=$ac_try;;
8708esac
8709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008716 (exit $ac_status); } && {
8717 test -z "$ac_c_werror_flag" ||
8718 test ! -s conftest.err
8719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_hi=-1 ac_mid=-1
8721 while :; do
8722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008723/* confdefs.h. */
8724_ACEOF
8725cat confdefs.h >>conftest.$ac_ext
8726cat >>conftest.$ac_ext <<_ACEOF
8727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008729 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008730int
8731main ()
8732{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008733static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008734test_array [0] = 0
8735
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008741if { (ac_try="$ac_compile"
8742case "(($ac_try" in
8743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8744 *) ac_try_echo=$ac_try;;
8745esac
8746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008749 grep -v '^ *+' conftest.er1 >conftest.err
8750 rm -f conftest.er1
8751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008753 (exit $ac_status); } && {
8754 test -z "$ac_c_werror_flag" ||
8755 test ! -s conftest.err
8756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_lo=$ac_mid; break
8758else
8759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008760sed 's/^/| /' conftest.$ac_ext >&5
8761
Thomas Wouters477c8d52006-05-27 19:21:47 +00008762 ac_hi=`expr '(' $ac_mid ')' - 1`
8763 if test $ac_mid -le $ac_hi; then
8764 ac_lo= ac_hi=
8765 break
8766 fi
8767 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008768fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008769
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 done
8772else
8773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Thomas Wouters477c8d52006-05-27 19:21:47 +00008776 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008777fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008778
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008780fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008781
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008783# Binary search between lo and hi bounds.
8784while test "x$ac_lo" != "x$ac_hi"; do
8785 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008787/* confdefs.h. */
8788_ACEOF
8789cat confdefs.h >>conftest.$ac_ext
8790cat >>conftest.$ac_ext <<_ACEOF
8791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008792$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008793 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
8796{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008798test_array [0] = 0
8799
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008805if { (ac_try="$ac_compile"
8806case "(($ac_try" in
8807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8808 *) ac_try_echo=$ac_try;;
8809esac
8810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008813 grep -v '^ *+' conftest.er1 >conftest.err
8814 rm -f conftest.er1
8815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008817 (exit $ac_status); } && {
8818 test -z "$ac_c_werror_flag" ||
8819 test ! -s conftest.err
8820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_hi=$ac_mid
8822else
8823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008824sed 's/^/| /' conftest.$ac_ext >&5
8825
Thomas Wouters477c8d52006-05-27 19:21:47 +00008826 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008827fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008828
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830done
8831case $ac_lo in
8832?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00008833'') if test "$ac_cv_type_float" = yes; then
8834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008835See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008836echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008837See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00008838 { (exit 77); exit 77; }; }
8839 else
8840 ac_cv_sizeof_float=0
8841 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008842esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008843else
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00008851 typedef float ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008852static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8853static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008854#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008855#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008856int
8857main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008858{
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
8860 FILE *f = fopen ("conftest.val", "w");
8861 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008862 return 1;
8863 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008865 long int i = longval ();
8866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8867 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 fprintf (f, "%ld\n", i);
8869 }
8870 else
8871 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008872 unsigned long int i = ulongval ();
8873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8874 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 fprintf (f, "%lu\n", i);
8876 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008877 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
8879 ;
8880 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008881}
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
8883rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008884if { (ac_try="$ac_link"
8885case "(($ac_try" in
8886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8887 *) ac_try_echo=$ac_try;;
8888esac
8889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8890 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008894 { (case "(($ac_try" in
8895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8896 *) ac_try_echo=$ac_try;;
8897esac
8898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8899 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_status=$?
8901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8902 (exit $ac_status); }; }; then
8903 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008904else
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 echo "$as_me: program exited with status $ac_status" >&5
8906echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008907sed 's/^/| /' conftest.$ac_ext >&5
8908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00008910if test "$ac_cv_type_float" = yes; then
8911 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008912See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008913echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008914See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008915 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008916 else
8917 ac_cv_sizeof_float=0
8918 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008919fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921fi
8922rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008923fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008924{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8925echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00008926
8927
8928
Martin v. Löwis11437992002-04-12 09:54:03 +00008929cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008930#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008932
8933
Thomas Wouters477c8d52006-05-27 19:21:47 +00008934{ echo "$as_me:$LINENO: checking for double" >&5
8935echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008936if test "${ac_cv_type_double+set}" = set; then
8937 echo $ECHO_N "(cached) $ECHO_C" >&6
8938else
8939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* confdefs.h. */
8941_ACEOF
8942cat confdefs.h >>conftest.$ac_ext
8943cat >>conftest.$ac_ext <<_ACEOF
8944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008945$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008946typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008947int
8948main ()
8949{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008950if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008952if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 return 0;
8954 ;
8955 return 0;
8956}
8957_ACEOF
8958rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008959if { (ac_try="$ac_compile"
8960case "(($ac_try" in
8961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8962 *) ac_try_echo=$ac_try;;
8963esac
8964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008967 grep -v '^ *+' conftest.er1 >conftest.err
8968 rm -f conftest.er1
8969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00008971 (exit $ac_status); } && {
8972 test -z "$ac_c_werror_flag" ||
8973 test ! -s conftest.err
8974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ac_cv_type_double=yes
8976else
8977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008978sed 's/^/| /' conftest.$ac_ext >&5
8979
Thomas Wouters477c8d52006-05-27 19:21:47 +00008980 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008982
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008985{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8986echo "${ECHO_T}$ac_cv_type_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
Thomas Wouters89f507f2006-12-13 04:49:30 +00008988# The cast to long int works around a bug in the HP C Compiler
8989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8991# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00008992{ echo "$as_me:$LINENO: checking size of double" >&5
8993echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008994if test "${ac_cv_sizeof_double+set}" = set; then
8995 echo $ECHO_N "(cached) $ECHO_C" >&6
8996else
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 if test "$cross_compiling" = yes; then
8998 # Depending upon the size, compute the lo and hi bounds.
8999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009006 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
9009{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009011test_array [0] = 0
9012
9013 ;
9014 return 0;
9015}
9016_ACEOF
9017rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009018if { (ac_try="$ac_compile"
9019case "(($ac_try" in
9020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9021 *) ac_try_echo=$ac_try;;
9022esac
9023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009026 grep -v '^ *+' conftest.er1 >conftest.err
9027 rm -f conftest.er1
9028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009030 (exit $ac_status); } && {
9031 test -z "$ac_c_werror_flag" ||
9032 test ! -s conftest.err
9033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_lo=0 ac_mid=0
9035 while :; do
9036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009037/* confdefs.h. */
9038_ACEOF
9039cat confdefs.h >>conftest.$ac_ext
9040cat >>conftest.$ac_ext <<_ACEOF
9041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009042$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009043 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009044int
9045main ()
9046{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009048test_array [0] = 0
9049
9050 ;
9051 return 0;
9052}
9053_ACEOF
9054rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009055if { (ac_try="$ac_compile"
9056case "(($ac_try" in
9057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9058 *) ac_try_echo=$ac_try;;
9059esac
9060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009063 grep -v '^ *+' conftest.er1 >conftest.err
9064 rm -f conftest.er1
9065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009067 (exit $ac_status); } && {
9068 test -z "$ac_c_werror_flag" ||
9069 test ! -s conftest.err
9070 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 ac_hi=$ac_mid; break
9072else
9073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009074sed 's/^/| /' conftest.$ac_ext >&5
9075
Thomas Wouters477c8d52006-05-27 19:21:47 +00009076 ac_lo=`expr $ac_mid + 1`
9077 if test $ac_lo -le $ac_mid; then
9078 ac_lo= ac_hi=
9079 break
9080 fi
9081 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009083
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 done
9086else
9087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009088sed 's/^/| /' conftest.$ac_ext >&5
9089
Thomas Wouters477c8d52006-05-27 19:21:47 +00009090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009091/* confdefs.h. */
9092_ACEOF
9093cat confdefs.h >>conftest.$ac_ext
9094cat >>conftest.$ac_ext <<_ACEOF
9095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009096$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009097 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009098int
9099main ()
9100{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009102test_array [0] = 0
9103
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009109if { (ac_try="$ac_compile"
9110case "(($ac_try" in
9111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112 *) ac_try_echo=$ac_try;;
9113esac
9114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009117 grep -v '^ *+' conftest.er1 >conftest.err
9118 rm -f conftest.er1
9119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009121 (exit $ac_status); } && {
9122 test -z "$ac_c_werror_flag" ||
9123 test ! -s conftest.err
9124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 ac_hi=-1 ac_mid=-1
9126 while :; do
9127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* confdefs.h. */
9129_ACEOF
9130cat confdefs.h >>conftest.$ac_ext
9131cat >>conftest.$ac_ext <<_ACEOF
9132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009133$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009134 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009135int
9136main ()
9137{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009138static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009139test_array [0] = 0
9140
9141 ;
9142 return 0;
9143}
9144_ACEOF
9145rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009146if { (ac_try="$ac_compile"
9147case "(($ac_try" in
9148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9149 *) ac_try_echo=$ac_try;;
9150esac
9151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009154 grep -v '^ *+' conftest.er1 >conftest.err
9155 rm -f conftest.er1
9156 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009158 (exit $ac_status); } && {
9159 test -z "$ac_c_werror_flag" ||
9160 test ! -s conftest.err
9161 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ac_lo=$ac_mid; break
9163else
9164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009165sed 's/^/| /' conftest.$ac_ext >&5
9166
Thomas Wouters477c8d52006-05-27 19:21:47 +00009167 ac_hi=`expr '(' $ac_mid ')' - 1`
9168 if test $ac_mid -le $ac_hi; then
9169 ac_lo= ac_hi=
9170 break
9171 fi
9172 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009174
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 done
9177else
9178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Thomas Wouters477c8d52006-05-27 19:21:47 +00009181 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009182fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009183
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009186
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009188# Binary search between lo and hi bounds.
9189while test "x$ac_lo" != "x$ac_hi"; do
9190 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009192/* confdefs.h. */
9193_ACEOF
9194cat confdefs.h >>conftest.$ac_ext
9195cat >>conftest.$ac_ext <<_ACEOF
9196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009198 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009199int
9200main ()
9201{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009203test_array [0] = 0
9204
9205 ;
9206 return 0;
9207}
9208_ACEOF
9209rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009210if { (ac_try="$ac_compile"
9211case "(($ac_try" in
9212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9213 *) ac_try_echo=$ac_try;;
9214esac
9215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009218 grep -v '^ *+' conftest.er1 >conftest.err
9219 rm -f conftest.er1
9220 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009222 (exit $ac_status); } && {
9223 test -z "$ac_c_werror_flag" ||
9224 test ! -s conftest.err
9225 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ac_hi=$ac_mid
9227else
9228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009229sed 's/^/| /' conftest.$ac_ext >&5
9230
Thomas Wouters477c8d52006-05-27 19:21:47 +00009231 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009232fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009233
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009235done
9236case $ac_lo in
9237?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00009238'') if test "$ac_cv_type_double" = yes; then
9239 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009240See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009241echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009242See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00009243 { (exit 77); exit 77; }; }
9244 else
9245 ac_cv_sizeof_double=0
9246 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009247esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009248else
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* confdefs.h. */
9251_ACEOF
9252cat confdefs.h >>conftest.$ac_ext
9253cat >>conftest.$ac_ext <<_ACEOF
9254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009255$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009256 typedef double ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009257static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9258static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009259#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009260#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009261int
9262main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009263{
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
9265 FILE *f = fopen ("conftest.val", "w");
9266 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009267 return 1;
9268 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009270 long int i = longval ();
9271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9272 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 fprintf (f, "%ld\n", i);
9274 }
9275 else
9276 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009277 unsigned long int i = ulongval ();
9278 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9279 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 fprintf (f, "%lu\n", i);
9281 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009282 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009283
9284 ;
9285 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009286}
Martin v. Löwis11437992002-04-12 09:54:03 +00009287_ACEOF
9288rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009289if { (ac_try="$ac_link"
9290case "(($ac_try" in
9291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9292 *) ac_try_echo=$ac_try;;
9293esac
9294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9295 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009299 { (case "(($ac_try" in
9300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9301 *) ac_try_echo=$ac_try;;
9302esac
9303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9304 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ac_status=$?
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); }; }; then
9308 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009309else
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 echo "$as_me: program exited with status $ac_status" >&5
9311echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009312sed 's/^/| /' conftest.$ac_ext >&5
9313
Martin v. Löwis11437992002-04-12 09:54:03 +00009314( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00009315if test "$ac_cv_type_double" = yes; then
9316 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009317See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009318echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009319See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009320 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00009321 else
9322 ac_cv_sizeof_double=0
9323 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009324fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326fi
9327rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009328fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009329{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9330echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00009331
9332
9333
Martin v. Löwis11437992002-04-12 09:54:03 +00009334cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009335#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009336_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009337
9338
Thomas Wouters477c8d52006-05-27 19:21:47 +00009339{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9340echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009341if test "${ac_cv_type_fpos_t+set}" = set; then
9342 echo $ECHO_N "(cached) $ECHO_C" >&6
9343else
9344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009345/* confdefs.h. */
9346_ACEOF
9347cat confdefs.h >>conftest.$ac_ext
9348cat >>conftest.$ac_ext <<_ACEOF
9349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009350$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009351typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009352int
9353main ()
9354{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009355if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009357if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 return 0;
9359 ;
9360 return 0;
9361}
9362_ACEOF
9363rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009364if { (ac_try="$ac_compile"
9365case "(($ac_try" in
9366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9367 *) ac_try_echo=$ac_try;;
9368esac
9369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009372 grep -v '^ *+' conftest.er1 >conftest.err
9373 rm -f conftest.er1
9374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009376 (exit $ac_status); } && {
9377 test -z "$ac_c_werror_flag" ||
9378 test ! -s conftest.err
9379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ac_cv_type_fpos_t=yes
9381else
9382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009383sed 's/^/| /' conftest.$ac_ext >&5
9384
Thomas Wouters477c8d52006-05-27 19:21:47 +00009385 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009387
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009390{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9391echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
Thomas Wouters89f507f2006-12-13 04:49:30 +00009393# The cast to long int works around a bug in the HP C Compiler
9394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9396# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00009397{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9398echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009399if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9400 echo $ECHO_N "(cached) $ECHO_C" >&6
9401else
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 if test "$cross_compiling" = yes; then
9403 # Depending upon the size, compute the lo and hi bounds.
9404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009411 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009412int
9413main ()
9414{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009416test_array [0] = 0
9417
9418 ;
9419 return 0;
9420}
9421_ACEOF
9422rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009423if { (ac_try="$ac_compile"
9424case "(($ac_try" in
9425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9426 *) ac_try_echo=$ac_try;;
9427esac
9428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009431 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1
9433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009435 (exit $ac_status); } && {
9436 test -z "$ac_c_werror_flag" ||
9437 test ! -s conftest.err
9438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_lo=0 ac_mid=0
9440 while :; do
9441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009442/* confdefs.h. */
9443_ACEOF
9444cat confdefs.h >>conftest.$ac_ext
9445cat >>conftest.$ac_ext <<_ACEOF
9446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009447$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009448 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009449int
9450main ()
9451{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009452static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009453test_array [0] = 0
9454
9455 ;
9456 return 0;
9457}
9458_ACEOF
9459rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009460if { (ac_try="$ac_compile"
9461case "(($ac_try" in
9462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9463 *) ac_try_echo=$ac_try;;
9464esac
9465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009468 grep -v '^ *+' conftest.er1 >conftest.err
9469 rm -f conftest.er1
9470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009472 (exit $ac_status); } && {
9473 test -z "$ac_c_werror_flag" ||
9474 test ! -s conftest.err
9475 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_hi=$ac_mid; break
9477else
9478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009479sed 's/^/| /' conftest.$ac_ext >&5
9480
Thomas Wouters477c8d52006-05-27 19:21:47 +00009481 ac_lo=`expr $ac_mid + 1`
9482 if test $ac_lo -le $ac_mid; then
9483 ac_lo= ac_hi=
9484 break
9485 fi
9486 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009487fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009488
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 done
9491else
9492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Thomas Wouters477c8d52006-05-27 19:21:47 +00009495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* confdefs.h. */
9497_ACEOF
9498cat confdefs.h >>conftest.$ac_ext
9499cat >>conftest.$ac_ext <<_ACEOF
9500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009502 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009503int
9504main ()
9505{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009507test_array [0] = 0
9508
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009514if { (ac_try="$ac_compile"
9515case "(($ac_try" in
9516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9517 *) ac_try_echo=$ac_try;;
9518esac
9519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009522 grep -v '^ *+' conftest.er1 >conftest.err
9523 rm -f conftest.er1
9524 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009526 (exit $ac_status); } && {
9527 test -z "$ac_c_werror_flag" ||
9528 test ! -s conftest.err
9529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 ac_hi=-1 ac_mid=-1
9531 while :; do
9532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009533/* confdefs.h. */
9534_ACEOF
9535cat confdefs.h >>conftest.$ac_ext
9536cat >>conftest.$ac_ext <<_ACEOF
9537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009538$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009539 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009540int
9541main ()
9542{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009543static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009544test_array [0] = 0
9545
9546 ;
9547 return 0;
9548}
9549_ACEOF
9550rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009551if { (ac_try="$ac_compile"
9552case "(($ac_try" in
9553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9554 *) ac_try_echo=$ac_try;;
9555esac
9556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009559 grep -v '^ *+' conftest.er1 >conftest.err
9560 rm -f conftest.er1
9561 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009563 (exit $ac_status); } && {
9564 test -z "$ac_c_werror_flag" ||
9565 test ! -s conftest.err
9566 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_lo=$ac_mid; break
9568else
9569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009570sed 's/^/| /' conftest.$ac_ext >&5
9571
Thomas Wouters477c8d52006-05-27 19:21:47 +00009572 ac_hi=`expr '(' $ac_mid ')' - 1`
9573 if test $ac_mid -le $ac_hi; then
9574 ac_lo= ac_hi=
9575 break
9576 fi
9577 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009578fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009579
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 done
9582else
9583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009584sed 's/^/| /' conftest.$ac_ext >&5
9585
Thomas Wouters477c8d52006-05-27 19:21:47 +00009586 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009587fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009588
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009590fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009591
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009593# Binary search between lo and hi bounds.
9594while test "x$ac_lo" != "x$ac_hi"; do
9595 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* confdefs.h. */
9598_ACEOF
9599cat confdefs.h >>conftest.$ac_ext
9600cat >>conftest.$ac_ext <<_ACEOF
9601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009603 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009607static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009608test_array [0] = 0
9609
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009615if { (ac_try="$ac_compile"
9616case "(($ac_try" in
9617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9618 *) ac_try_echo=$ac_try;;
9619esac
9620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009623 grep -v '^ *+' conftest.er1 >conftest.err
9624 rm -f conftest.er1
9625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009627 (exit $ac_status); } && {
9628 test -z "$ac_c_werror_flag" ||
9629 test ! -s conftest.err
9630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_hi=$ac_mid
9632else
9633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009634sed 's/^/| /' conftest.$ac_ext >&5
9635
Thomas Wouters477c8d52006-05-27 19:21:47 +00009636 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009637fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009638
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009640done
9641case $ac_lo in
9642?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00009643'') if test "$ac_cv_type_fpos_t" = yes; then
9644 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009645See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009646echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009647See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +00009648 { (exit 77); exit 77; }; }
9649 else
9650 ac_cv_sizeof_fpos_t=0
9651 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009652esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009653else
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* confdefs.h. */
9656_ACEOF
9657cat confdefs.h >>conftest.$ac_ext
9658cat >>conftest.$ac_ext <<_ACEOF
9659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009661 typedef fpos_t ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009662static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9663static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009665#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009666int
9667main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009668{
Martin v. Löwis11437992002-04-12 09:54:03 +00009669
9670 FILE *f = fopen ("conftest.val", "w");
9671 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009672 return 1;
9673 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009675 long int i = longval ();
9676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9677 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 fprintf (f, "%ld\n", i);
9679 }
9680 else
9681 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009682 unsigned long int i = ulongval ();
9683 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9684 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 fprintf (f, "%lu\n", i);
9686 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009687 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009688
9689 ;
9690 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009691}
Martin v. Löwis11437992002-04-12 09:54:03 +00009692_ACEOF
9693rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009694if { (ac_try="$ac_link"
9695case "(($ac_try" in
9696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9697 *) ac_try_echo=$ac_try;;
9698esac
9699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9700 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_status=$?
9702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009704 { (case "(($ac_try" in
9705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9706 *) ac_try_echo=$ac_try;;
9707esac
9708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9709 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_status=$?
9711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9712 (exit $ac_status); }; }; then
9713 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009714else
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 echo "$as_me: program exited with status $ac_status" >&5
9716echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009717sed 's/^/| /' conftest.$ac_ext >&5
9718
Martin v. Löwis11437992002-04-12 09:54:03 +00009719( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +00009720if test "$ac_cv_type_fpos_t" = yes; then
9721 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009722See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009723echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009724See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009725 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00009726 else
9727 ac_cv_sizeof_fpos_t=0
9728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731fi
9732rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009734{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9735echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +00009736
9737
9738
Martin v. Löwis11437992002-04-12 09:54:03 +00009739cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009740#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009741_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009742
Michael W. Hudson54241132001-12-07 15:38:26 +00009743
Thomas Wouters477c8d52006-05-27 19:21:47 +00009744{ echo "$as_me:$LINENO: checking for size_t" >&5
9745echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009746if test "${ac_cv_type_size_t+set}" = set; then
9747 echo $ECHO_N "(cached) $ECHO_C" >&6
9748else
9749 cat >conftest.$ac_ext <<_ACEOF
9750/* confdefs.h. */
9751_ACEOF
9752cat confdefs.h >>conftest.$ac_ext
9753cat >>conftest.$ac_ext <<_ACEOF
9754/* end confdefs.h. */
9755$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009756typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009757int
9758main ()
9759{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009760if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009761 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009762if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009763 return 0;
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009769if { (ac_try="$ac_compile"
9770case "(($ac_try" in
9771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9772 *) ac_try_echo=$ac_try;;
9773esac
9774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009776 ac_status=$?
9777 grep -v '^ *+' conftest.er1 >conftest.err
9778 rm -f conftest.er1
9779 cat conftest.err >&5
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009781 (exit $ac_status); } && {
9782 test -z "$ac_c_werror_flag" ||
9783 test ! -s conftest.err
9784 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009785 ac_cv_type_size_t=yes
9786else
9787 echo "$as_me: failed program was:" >&5
9788sed 's/^/| /' conftest.$ac_ext >&5
9789
Thomas Wouters477c8d52006-05-27 19:21:47 +00009790 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009791fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009792
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009795{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9796echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009797
Thomas Wouters89f507f2006-12-13 04:49:30 +00009798# The cast to long int works around a bug in the HP C Compiler
9799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9801# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +00009802{ echo "$as_me:$LINENO: checking size of size_t" >&5
9803echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009804if test "${ac_cv_sizeof_size_t+set}" = set; then
9805 echo $ECHO_N "(cached) $ECHO_C" >&6
9806else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009807 if test "$cross_compiling" = yes; then
9808 # Depending upon the size, compute the lo and hi bounds.
9809cat >conftest.$ac_ext <<_ACEOF
9810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
9815$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009816 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009817int
9818main ()
9819{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009821test_array [0] = 0
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009828if { (ac_try="$ac_compile"
9829case "(($ac_try" in
9830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831 *) ac_try_echo=$ac_try;;
9832esac
9833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009835 ac_status=$?
9836 grep -v '^ *+' conftest.er1 >conftest.err
9837 rm -f conftest.er1
9838 cat conftest.err >&5
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009840 (exit $ac_status); } && {
9841 test -z "$ac_c_werror_flag" ||
9842 test ! -s conftest.err
9843 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009844 ac_lo=0 ac_mid=0
9845 while :; do
9846 cat >conftest.$ac_ext <<_ACEOF
9847/* confdefs.h. */
9848_ACEOF
9849cat confdefs.h >>conftest.$ac_ext
9850cat >>conftest.$ac_ext <<_ACEOF
9851/* end confdefs.h. */
9852$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009853 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009854int
9855main ()
9856{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009858test_array [0] = 0
9859
9860 ;
9861 return 0;
9862}
9863_ACEOF
9864rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009865if { (ac_try="$ac_compile"
9866case "(($ac_try" in
9867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9868 *) ac_try_echo=$ac_try;;
9869esac
9870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009872 ac_status=$?
9873 grep -v '^ *+' conftest.er1 >conftest.err
9874 rm -f conftest.er1
9875 cat conftest.err >&5
9876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009877 (exit $ac_status); } && {
9878 test -z "$ac_c_werror_flag" ||
9879 test ! -s conftest.err
9880 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009881 ac_hi=$ac_mid; break
9882else
9883 echo "$as_me: failed program was:" >&5
9884sed 's/^/| /' conftest.$ac_ext >&5
9885
Thomas Wouters477c8d52006-05-27 19:21:47 +00009886 ac_lo=`expr $ac_mid + 1`
9887 if test $ac_lo -le $ac_mid; then
9888 ac_lo= ac_hi=
9889 break
9890 fi
9891 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009892fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009893
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009895 done
9896else
9897 echo "$as_me: failed program was:" >&5
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
Thomas Wouters477c8d52006-05-27 19:21:47 +00009900 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009901/* confdefs.h. */
9902_ACEOF
9903cat confdefs.h >>conftest.$ac_ext
9904cat >>conftest.$ac_ext <<_ACEOF
9905/* end confdefs.h. */
9906$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009907 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009908int
9909main ()
9910{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009912test_array [0] = 0
9913
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009919if { (ac_try="$ac_compile"
9920case "(($ac_try" in
9921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9922 *) ac_try_echo=$ac_try;;
9923esac
9924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926 ac_status=$?
9927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009931 (exit $ac_status); } && {
9932 test -z "$ac_c_werror_flag" ||
9933 test ! -s conftest.err
9934 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009935 ac_hi=-1 ac_mid=-1
9936 while :; do
9937 cat >conftest.$ac_ext <<_ACEOF
9938/* confdefs.h. */
9939_ACEOF
9940cat confdefs.h >>conftest.$ac_ext
9941cat >>conftest.$ac_ext <<_ACEOF
9942/* end confdefs.h. */
9943$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +00009944 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009945int
9946main ()
9947{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009948static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009949test_array [0] = 0
9950
9951 ;
9952 return 0;
9953}
9954_ACEOF
9955rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009956if { (ac_try="$ac_compile"
9957case "(($ac_try" in
9958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9959 *) ac_try_echo=$ac_try;;
9960esac
9961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963 ac_status=$?
9964 grep -v '^ *+' conftest.er1 >conftest.err
9965 rm -f conftest.er1
9966 cat conftest.err >&5
9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +00009968 (exit $ac_status); } && {
9969 test -z "$ac_c_werror_flag" ||
9970 test ! -s conftest.err
9971 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009972 ac_lo=$ac_mid; break
9973else
9974 echo "$as_me: failed program was:" >&5
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
Thomas Wouters477c8d52006-05-27 19:21:47 +00009977 ac_hi=`expr '(' $ac_mid ')' - 1`
9978 if test $ac_mid -le $ac_hi; then
9979 ac_lo= ac_hi=
9980 break
9981 fi
9982 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009983fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009984
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009986 done
9987else
9988 echo "$as_me: failed program was:" >&5
9989sed 's/^/| /' conftest.$ac_ext >&5
9990
Thomas Wouters477c8d52006-05-27 19:21:47 +00009991 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +00009992fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009993
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009995fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009996
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009998# Binary search between lo and hi bounds.
9999while test "x$ac_lo" != "x$ac_hi"; do
10000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10001 cat >conftest.$ac_ext <<_ACEOF
10002/* confdefs.h. */
10003_ACEOF
10004cat confdefs.h >>conftest.$ac_ext
10005cat >>conftest.$ac_ext <<_ACEOF
10006/* end confdefs.h. */
10007$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010008 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009int
10010main ()
10011{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013test_array [0] = 0
10014
10015 ;
10016 return 0;
10017}
10018_ACEOF
10019rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010020if { (ac_try="$ac_compile"
10021case "(($ac_try" in
10022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10023 *) ac_try_echo=$ac_try;;
10024esac
10025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010027 ac_status=$?
10028 grep -v '^ *+' conftest.er1 >conftest.err
10029 rm -f conftest.er1
10030 cat conftest.err >&5
10031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010032 (exit $ac_status); } && {
10033 test -z "$ac_c_werror_flag" ||
10034 test ! -s conftest.err
10035 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010036 ac_hi=$ac_mid
10037else
10038 echo "$as_me: failed program was:" >&5
10039sed 's/^/| /' conftest.$ac_ext >&5
10040
Thomas Wouters477c8d52006-05-27 19:21:47 +000010041 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010043
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010045done
10046case $ac_lo in
10047?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +000010048'') if test "$ac_cv_type_size_t" = yes; then
10049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010051echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010052See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +000010053 { (exit 77); exit 77; }; }
10054 else
10055 ac_cv_sizeof_size_t=0
10056 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010057esac
10058else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059 cat >conftest.$ac_ext <<_ACEOF
10060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
10065$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010066 typedef size_t ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010067static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10068static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010069#include <stdio.h>
10070#include <stdlib.h>
10071int
10072main ()
10073{
10074
10075 FILE *f = fopen ("conftest.val", "w");
10076 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010077 return 1;
10078 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010079 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010080 long int i = longval ();
10081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10082 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010083 fprintf (f, "%ld\n", i);
10084 }
10085 else
10086 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010087 unsigned long int i = ulongval ();
10088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10089 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010090 fprintf (f, "%lu\n", i);
10091 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010092 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010093
10094 ;
10095 return 0;
10096}
10097_ACEOF
10098rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010099if { (ac_try="$ac_link"
10100case "(($ac_try" in
10101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10102 *) ac_try_echo=$ac_try;;
10103esac
10104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10105 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010106 ac_status=$?
10107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010109 { (case "(($ac_try" in
10110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10111 *) ac_try_echo=$ac_try;;
10112esac
10113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10114 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010115 ac_status=$?
10116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10117 (exit $ac_status); }; }; then
10118 ac_cv_sizeof_size_t=`cat conftest.val`
10119else
10120 echo "$as_me: program exited with status $ac_status" >&5
10121echo "$as_me: failed program was:" >&5
10122sed 's/^/| /' conftest.$ac_ext >&5
10123
10124( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +000010125if test "$ac_cv_type_size_t" = yes; then
10126 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010127See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010128echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010130 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000010131 else
10132 ac_cv_sizeof_size_t=0
10133 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010136fi
10137rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010138fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010139{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10140echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000010141
10142
10143
Martin v. Löwis18e16552006-02-15 17:27:45 +000010144cat >>confdefs.h <<_ACEOF
10145#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10146_ACEOF
10147
10148
Michael W. Hudson54241132001-12-07 15:38:26 +000010149
Thomas Wouters477c8d52006-05-27 19:21:47 +000010150{ echo "$as_me:$LINENO: checking for long long support" >&5
10151echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010152have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010154/* confdefs.h. */
10155_ACEOF
10156cat confdefs.h >>conftest.$ac_ext
10157cat >>conftest.$ac_ext <<_ACEOF
10158/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160int
10161main ()
10162{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010163long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
10174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010181 (exit $ac_status); } && {
10182 test -z "$ac_c_werror_flag" ||
10183 test ! -s conftest.err
10184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
10186
10187cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010188#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010189_ACEOF
10190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010191 have_long_long=yes
10192
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010195sed 's/^/| /' conftest.$ac_ext >&5
10196
Thomas Wouters477c8d52006-05-27 19:21:47 +000010197
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010198fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010199
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000010201{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10202echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010203if test "$have_long_long" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010204{ echo "$as_me:$LINENO: checking for long long" >&5
10205echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010206if test "${ac_cv_type_long_long+set}" = set; then
10207 echo $ECHO_N "(cached) $ECHO_C" >&6
10208else
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010216typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010220if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010222if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 return 0;
10224 ;
10225 return 0;
10226}
10227_ACEOF
10228rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010229if { (ac_try="$ac_compile"
10230case "(($ac_try" in
10231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232 *) ac_try_echo=$ac_try;;
10233esac
10234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010237 grep -v '^ *+' conftest.er1 >conftest.err
10238 rm -f conftest.er1
10239 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010241 (exit $ac_status); } && {
10242 test -z "$ac_c_werror_flag" ||
10243 test ! -s conftest.err
10244 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cv_type_long_long=yes
10246else
10247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010248sed 's/^/| /' conftest.$ac_ext >&5
10249
Thomas Wouters477c8d52006-05-27 19:21:47 +000010250 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010251fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010252
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010254fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010255{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10256echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Thomas Wouters89f507f2006-12-13 04:49:30 +000010258# The cast to long int works around a bug in the HP C Compiler
10259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10261# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +000010262{ echo "$as_me:$LINENO: checking size of long long" >&5
10263echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010264if test "${ac_cv_sizeof_long_long+set}" = set; then
10265 echo $ECHO_N "(cached) $ECHO_C" >&6
10266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 if test "$cross_compiling" = yes; then
10268 # Depending upon the size, compute the lo and hi bounds.
10269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010276 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010281test_array [0] = 0
10282
10283 ;
10284 return 0;
10285}
10286_ACEOF
10287rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010288if { (ac_try="$ac_compile"
10289case "(($ac_try" in
10290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10291 *) ac_try_echo=$ac_try;;
10292esac
10293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010296 grep -v '^ *+' conftest.er1 >conftest.err
10297 rm -f conftest.er1
10298 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010300 (exit $ac_status); } && {
10301 test -z "$ac_c_werror_flag" ||
10302 test ! -s conftest.err
10303 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ac_lo=0 ac_mid=0
10305 while :; do
10306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* confdefs.h. */
10308_ACEOF
10309cat confdefs.h >>conftest.$ac_ext
10310cat >>conftest.$ac_ext <<_ACEOF
10311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010312$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010313 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010314int
10315main ()
10316{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010317static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010318test_array [0] = 0
10319
10320 ;
10321 return 0;
10322}
10323_ACEOF
10324rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010325if { (ac_try="$ac_compile"
10326case "(($ac_try" in
10327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10328 *) ac_try_echo=$ac_try;;
10329esac
10330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010333 grep -v '^ *+' conftest.er1 >conftest.err
10334 rm -f conftest.er1
10335 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010337 (exit $ac_status); } && {
10338 test -z "$ac_c_werror_flag" ||
10339 test ! -s conftest.err
10340 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_hi=$ac_mid; break
10342else
10343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010344sed 's/^/| /' conftest.$ac_ext >&5
10345
Thomas Wouters477c8d52006-05-27 19:21:47 +000010346 ac_lo=`expr $ac_mid + 1`
10347 if test $ac_lo -le $ac_mid; then
10348 ac_lo= ac_hi=
10349 break
10350 fi
10351 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010352fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010353
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 done
10356else
10357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010358sed 's/^/| /' conftest.$ac_ext >&5
10359
Thomas Wouters477c8d52006-05-27 19:21:47 +000010360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* confdefs.h. */
10362_ACEOF
10363cat confdefs.h >>conftest.$ac_ext
10364cat >>conftest.$ac_ext <<_ACEOF
10365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010366$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010367 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010368int
10369main ()
10370{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010372test_array [0] = 0
10373
10374 ;
10375 return 0;
10376}
10377_ACEOF
10378rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010379if { (ac_try="$ac_compile"
10380case "(($ac_try" in
10381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10382 *) ac_try_echo=$ac_try;;
10383esac
10384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010391 (exit $ac_status); } && {
10392 test -z "$ac_c_werror_flag" ||
10393 test ! -s conftest.err
10394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_hi=-1 ac_mid=-1
10396 while :; do
10397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010398/* confdefs.h. */
10399_ACEOF
10400cat confdefs.h >>conftest.$ac_ext
10401cat >>conftest.$ac_ext <<_ACEOF
10402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010404 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010405int
10406main ()
10407{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010409test_array [0] = 0
10410
10411 ;
10412 return 0;
10413}
10414_ACEOF
10415rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010416if { (ac_try="$ac_compile"
10417case "(($ac_try" in
10418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419 *) ac_try_echo=$ac_try;;
10420esac
10421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010424 grep -v '^ *+' conftest.er1 >conftest.err
10425 rm -f conftest.er1
10426 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010428 (exit $ac_status); } && {
10429 test -z "$ac_c_werror_flag" ||
10430 test ! -s conftest.err
10431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 ac_lo=$ac_mid; break
10433else
10434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010435sed 's/^/| /' conftest.$ac_ext >&5
10436
Thomas Wouters477c8d52006-05-27 19:21:47 +000010437 ac_hi=`expr '(' $ac_mid ')' - 1`
10438 if test $ac_mid -le $ac_hi; then
10439 ac_lo= ac_hi=
10440 break
10441 fi
10442 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010443fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010444
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 done
10447else
10448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010449sed 's/^/| /' conftest.$ac_ext >&5
10450
Thomas Wouters477c8d52006-05-27 19:21:47 +000010451 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010452fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010453
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010455fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010456
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010458# Binary search between lo and hi bounds.
10459while test "x$ac_lo" != "x$ac_hi"; do
10460 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010462/* confdefs.h. */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010467$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010468 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010469int
10470main ()
10471{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010473test_array [0] = 0
10474
10475 ;
10476 return 0;
10477}
10478_ACEOF
10479rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010480if { (ac_try="$ac_compile"
10481case "(($ac_try" in
10482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10483 *) ac_try_echo=$ac_try;;
10484esac
10485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010488 grep -v '^ *+' conftest.er1 >conftest.err
10489 rm -f conftest.er1
10490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000010492 (exit $ac_status); } && {
10493 test -z "$ac_c_werror_flag" ||
10494 test ! -s conftest.err
10495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 ac_hi=$ac_mid
10497else
10498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010499sed 's/^/| /' conftest.$ac_ext >&5
10500
Thomas Wouters477c8d52006-05-27 19:21:47 +000010501 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010502fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010503
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010505done
10506case $ac_lo in
10507?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +000010508'') if test "$ac_cv_type_long_long" = yes; then
10509 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010510See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010511echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010512See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +000010513 { (exit 77); exit 77; }; }
10514 else
10515 ac_cv_sizeof_long_long=0
10516 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010517esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010518else
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010525$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000010526 typedef long long ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010527static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10528static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010529#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010530#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010531int
10532main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010533{
Martin v. Löwis11437992002-04-12 09:54:03 +000010534
10535 FILE *f = fopen ("conftest.val", "w");
10536 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010537 return 1;
10538 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010540 long int i = longval ();
10541 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10542 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 fprintf (f, "%ld\n", i);
10544 }
10545 else
10546 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010547 unsigned long int i = ulongval ();
10548 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10549 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 fprintf (f, "%lu\n", i);
10551 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010552 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
10554 ;
10555 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010556}
Martin v. Löwis11437992002-04-12 09:54:03 +000010557_ACEOF
10558rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010559if { (ac_try="$ac_link"
10560case "(($ac_try" in
10561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10562 *) ac_try_echo=$ac_try;;
10563esac
10564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10565 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ac_status=$?
10567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010569 { (case "(($ac_try" in
10570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10571 *) ac_try_echo=$ac_try;;
10572esac
10573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10574 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ac_status=$?
10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10577 (exit $ac_status); }; }; then
10578 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 echo "$as_me: program exited with status $ac_status" >&5
10581echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010582sed 's/^/| /' conftest.$ac_ext >&5
10583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +000010585if test "$ac_cv_type_long_long" = yes; then
10586 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010587See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010588echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010589See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010590 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000010591 else
10592 ac_cv_sizeof_long_long=0
10593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010594fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010596fi
10597rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010598fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010599{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10600echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000010601
10602
10603
Martin v. Löwis11437992002-04-12 09:54:03 +000010604cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010605#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010606_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010607
Michael W. Hudson54241132001-12-07 15:38:26 +000010608
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010609fi
10610
Thomas Woutersb2137042007-02-01 18:02:27 +000010611{ echo "$as_me:$LINENO: checking for _Bool support" >&5
10612echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
10613have_c99_bool=no
10614cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620
10621int
10622main ()
10623{
10624_Bool x; x = (_Bool)0;
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629rm -f conftest.$ac_objext
10630if { (ac_try="$ac_compile"
10631case "(($ac_try" in
10632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10633 *) ac_try_echo=$ac_try;;
10634esac
10635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10636 (eval "$ac_compile") 2>conftest.er1
10637 ac_status=$?
10638 grep -v '^ *+' conftest.er1 >conftest.err
10639 rm -f conftest.er1
10640 cat conftest.err >&5
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } && {
10643 test -z "$ac_c_werror_flag" ||
10644 test ! -s conftest.err
10645 } && test -s conftest.$ac_objext; then
10646
10647
10648cat >>confdefs.h <<\_ACEOF
10649#define HAVE_C99_BOOL 1
10650_ACEOF
10651
10652 have_c99_bool=yes
10653
10654else
10655 echo "$as_me: failed program was:" >&5
10656sed 's/^/| /' conftest.$ac_ext >&5
10657
10658
10659fi
10660
10661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10662{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10663echo "${ECHO_T}$have_c99_bool" >&6; }
10664if test "$have_c99_bool" = yes ; then
10665{ echo "$as_me:$LINENO: checking for _Bool" >&5
10666echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
10667if test "${ac_cv_type__Bool+set}" = set; then
10668 echo $ECHO_N "(cached) $ECHO_C" >&6
10669else
10670 cat >conftest.$ac_ext <<_ACEOF
10671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
10676$ac_includes_default
10677typedef _Bool ac__type_new_;
10678int
10679main ()
10680{
10681if ((ac__type_new_ *) 0)
10682 return 0;
10683if (sizeof (ac__type_new_))
10684 return 0;
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext
10690if { (ac_try="$ac_compile"
10691case "(($ac_try" in
10692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10693 *) ac_try_echo=$ac_try;;
10694esac
10695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10696 (eval "$ac_compile") 2>conftest.er1
10697 ac_status=$?
10698 grep -v '^ *+' conftest.er1 >conftest.err
10699 rm -f conftest.er1
10700 cat conftest.err >&5
10701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702 (exit $ac_status); } && {
10703 test -z "$ac_c_werror_flag" ||
10704 test ! -s conftest.err
10705 } && test -s conftest.$ac_objext; then
10706 ac_cv_type__Bool=yes
10707else
10708 echo "$as_me: failed program was:" >&5
10709sed 's/^/| /' conftest.$ac_ext >&5
10710
10711 ac_cv_type__Bool=no
10712fi
10713
10714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10715fi
10716{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10717echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
10718
10719# The cast to long int works around a bug in the HP C Compiler
10720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10722# This bug is HP SR number 8606223364.
10723{ echo "$as_me:$LINENO: checking size of _Bool" >&5
10724echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
10725if test "${ac_cv_sizeof__Bool+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
10727else
10728 if test "$cross_compiling" = yes; then
10729 # Depending upon the size, compute the lo and hi bounds.
10730cat >conftest.$ac_ext <<_ACEOF
10731/* confdefs.h. */
10732_ACEOF
10733cat confdefs.h >>conftest.$ac_ext
10734cat >>conftest.$ac_ext <<_ACEOF
10735/* end confdefs.h. */
10736$ac_includes_default
10737 typedef _Bool ac__type_sizeof_;
10738int
10739main ()
10740{
10741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10742test_array [0] = 0
10743
10744 ;
10745 return 0;
10746}
10747_ACEOF
10748rm -f conftest.$ac_objext
10749if { (ac_try="$ac_compile"
10750case "(($ac_try" in
10751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10752 *) ac_try_echo=$ac_try;;
10753esac
10754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10755 (eval "$ac_compile") 2>conftest.er1
10756 ac_status=$?
10757 grep -v '^ *+' conftest.er1 >conftest.err
10758 rm -f conftest.er1
10759 cat conftest.err >&5
10760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10761 (exit $ac_status); } && {
10762 test -z "$ac_c_werror_flag" ||
10763 test ! -s conftest.err
10764 } && test -s conftest.$ac_objext; then
10765 ac_lo=0 ac_mid=0
10766 while :; do
10767 cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
10774 typedef _Bool ac__type_sizeof_;
10775int
10776main ()
10777{
10778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10779test_array [0] = 0
10780
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785rm -f conftest.$ac_objext
10786if { (ac_try="$ac_compile"
10787case "(($ac_try" in
10788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10789 *) ac_try_echo=$ac_try;;
10790esac
10791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10792 (eval "$ac_compile") 2>conftest.er1
10793 ac_status=$?
10794 grep -v '^ *+' conftest.er1 >conftest.err
10795 rm -f conftest.er1
10796 cat conftest.err >&5
10797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798 (exit $ac_status); } && {
10799 test -z "$ac_c_werror_flag" ||
10800 test ! -s conftest.err
10801 } && test -s conftest.$ac_objext; then
10802 ac_hi=$ac_mid; break
10803else
10804 echo "$as_me: failed program was:" >&5
10805sed 's/^/| /' conftest.$ac_ext >&5
10806
10807 ac_lo=`expr $ac_mid + 1`
10808 if test $ac_lo -le $ac_mid; then
10809 ac_lo= ac_hi=
10810 break
10811 fi
10812 ac_mid=`expr 2 '*' $ac_mid + 1`
10813fi
10814
10815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816 done
10817else
10818 echo "$as_me: failed program was:" >&5
10819sed 's/^/| /' conftest.$ac_ext >&5
10820
10821 cat >conftest.$ac_ext <<_ACEOF
10822/* confdefs.h. */
10823_ACEOF
10824cat confdefs.h >>conftest.$ac_ext
10825cat >>conftest.$ac_ext <<_ACEOF
10826/* end confdefs.h. */
10827$ac_includes_default
10828 typedef _Bool ac__type_sizeof_;
10829int
10830main ()
10831{
10832static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10833test_array [0] = 0
10834
10835 ;
10836 return 0;
10837}
10838_ACEOF
10839rm -f conftest.$ac_objext
10840if { (ac_try="$ac_compile"
10841case "(($ac_try" in
10842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10843 *) ac_try_echo=$ac_try;;
10844esac
10845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10846 (eval "$ac_compile") 2>conftest.er1
10847 ac_status=$?
10848 grep -v '^ *+' conftest.er1 >conftest.err
10849 rm -f conftest.er1
10850 cat conftest.err >&5
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); } && {
10853 test -z "$ac_c_werror_flag" ||
10854 test ! -s conftest.err
10855 } && test -s conftest.$ac_objext; then
10856 ac_hi=-1 ac_mid=-1
10857 while :; do
10858 cat >conftest.$ac_ext <<_ACEOF
10859/* confdefs.h. */
10860_ACEOF
10861cat confdefs.h >>conftest.$ac_ext
10862cat >>conftest.$ac_ext <<_ACEOF
10863/* end confdefs.h. */
10864$ac_includes_default
10865 typedef _Bool ac__type_sizeof_;
10866int
10867main ()
10868{
10869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10870test_array [0] = 0
10871
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext
10877if { (ac_try="$ac_compile"
10878case "(($ac_try" in
10879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880 *) ac_try_echo=$ac_try;;
10881esac
10882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883 (eval "$ac_compile") 2>conftest.er1
10884 ac_status=$?
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10889 (exit $ac_status); } && {
10890 test -z "$ac_c_werror_flag" ||
10891 test ! -s conftest.err
10892 } && test -s conftest.$ac_objext; then
10893 ac_lo=$ac_mid; break
10894else
10895 echo "$as_me: failed program was:" >&5
10896sed 's/^/| /' conftest.$ac_ext >&5
10897
10898 ac_hi=`expr '(' $ac_mid ')' - 1`
10899 if test $ac_mid -le $ac_hi; then
10900 ac_lo= ac_hi=
10901 break
10902 fi
10903 ac_mid=`expr 2 '*' $ac_mid`
10904fi
10905
10906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907 done
10908else
10909 echo "$as_me: failed program was:" >&5
10910sed 's/^/| /' conftest.$ac_ext >&5
10911
10912 ac_lo= ac_hi=
10913fi
10914
10915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10916fi
10917
10918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10919# Binary search between lo and hi bounds.
10920while test "x$ac_lo" != "x$ac_hi"; do
10921 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10922 cat >conftest.$ac_ext <<_ACEOF
10923/* confdefs.h. */
10924_ACEOF
10925cat confdefs.h >>conftest.$ac_ext
10926cat >>conftest.$ac_ext <<_ACEOF
10927/* end confdefs.h. */
10928$ac_includes_default
10929 typedef _Bool ac__type_sizeof_;
10930int
10931main ()
10932{
10933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10934test_array [0] = 0
10935
10936 ;
10937 return 0;
10938}
10939_ACEOF
10940rm -f conftest.$ac_objext
10941if { (ac_try="$ac_compile"
10942case "(($ac_try" in
10943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10944 *) ac_try_echo=$ac_try;;
10945esac
10946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10947 (eval "$ac_compile") 2>conftest.er1
10948 ac_status=$?
10949 grep -v '^ *+' conftest.er1 >conftest.err
10950 rm -f conftest.er1
10951 cat conftest.err >&5
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); } && {
10954 test -z "$ac_c_werror_flag" ||
10955 test ! -s conftest.err
10956 } && test -s conftest.$ac_objext; then
10957 ac_hi=$ac_mid
10958else
10959 echo "$as_me: failed program was:" >&5
10960sed 's/^/| /' conftest.$ac_ext >&5
10961
10962 ac_lo=`expr '(' $ac_mid ')' + 1`
10963fi
10964
10965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10966done
10967case $ac_lo in
10968?*) ac_cv_sizeof__Bool=$ac_lo;;
10969'') if test "$ac_cv_type__Bool" = yes; then
10970 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
10971See \`config.log' for more details." >&5
10972echo "$as_me: error: cannot compute sizeof (_Bool)
10973See \`config.log' for more details." >&2;}
10974 { (exit 77); exit 77; }; }
10975 else
10976 ac_cv_sizeof__Bool=0
10977 fi ;;
10978esac
10979else
10980 cat >conftest.$ac_ext <<_ACEOF
10981/* confdefs.h. */
10982_ACEOF
10983cat confdefs.h >>conftest.$ac_ext
10984cat >>conftest.$ac_ext <<_ACEOF
10985/* end confdefs.h. */
10986$ac_includes_default
10987 typedef _Bool ac__type_sizeof_;
10988static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10989static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10990#include <stdio.h>
10991#include <stdlib.h>
10992int
10993main ()
10994{
10995
10996 FILE *f = fopen ("conftest.val", "w");
10997 if (! f)
10998 return 1;
10999 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11000 {
11001 long int i = longval ();
11002 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11003 return 1;
11004 fprintf (f, "%ld\n", i);
11005 }
11006 else
11007 {
11008 unsigned long int i = ulongval ();
11009 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11010 return 1;
11011 fprintf (f, "%lu\n", i);
11012 }
11013 return ferror (f) || fclose (f) != 0;
11014
11015 ;
11016 return 0;
11017}
11018_ACEOF
11019rm -f conftest$ac_exeext
11020if { (ac_try="$ac_link"
11021case "(($ac_try" in
11022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11023 *) ac_try_echo=$ac_try;;
11024esac
11025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11026 (eval "$ac_link") 2>&5
11027 ac_status=$?
11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11030 { (case "(($ac_try" in
11031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11032 *) ac_try_echo=$ac_try;;
11033esac
11034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11035 (eval "$ac_try") 2>&5
11036 ac_status=$?
11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); }; }; then
11039 ac_cv_sizeof__Bool=`cat conftest.val`
11040else
11041 echo "$as_me: program exited with status $ac_status" >&5
11042echo "$as_me: failed program was:" >&5
11043sed 's/^/| /' conftest.$ac_ext >&5
11044
11045( exit $ac_status )
11046if test "$ac_cv_type__Bool" = yes; then
11047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
11048See \`config.log' for more details." >&5
11049echo "$as_me: error: cannot compute sizeof (_Bool)
11050See \`config.log' for more details." >&2;}
11051 { (exit 77); exit 77; }; }
11052 else
11053 ac_cv_sizeof__Bool=0
11054 fi
11055fi
11056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11057fi
11058rm -f conftest.val
11059fi
11060{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11061echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11062
11063
11064
11065cat >>confdefs.h <<_ACEOF
11066#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11067_ACEOF
11068
11069
11070fi
11071
Thomas Wouters89f507f2006-12-13 04:49:30 +000011072{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11073echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
11074if test "${ac_cv_type_uintptr_t+set}" = set; then
11075 echo $ECHO_N "(cached) $ECHO_C" >&6
11076else
11077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000011083#ifdef HAVE_STDINT_H
11084 #include <stdint.h>
11085 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011086
Thomas Wouters89f507f2006-12-13 04:49:30 +000011087typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Thomas Wouters89f507f2006-12-13 04:49:30 +000011091if ((ac__type_new_ *) 0)
11092 return 0;
11093if (sizeof (ac__type_new_))
11094 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 ;
11096 return 0;
11097}
11098_ACEOF
11099rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011100if { (ac_try="$ac_compile"
11101case "(($ac_try" in
11102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11103 *) ac_try_echo=$ac_try;;
11104esac
11105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011108 grep -v '^ *+' conftest.er1 >conftest.err
11109 rm -f conftest.er1
11110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011112 (exit $ac_status); } && {
11113 test -z "$ac_c_werror_flag" ||
11114 test ! -s conftest.err
11115 } && test -s conftest.$ac_objext; then
11116 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011117else
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011119sed 's/^/| /' conftest.$ac_ext >&5
11120
Thomas Wouters89f507f2006-12-13 04:49:30 +000011121 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011122fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011123
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000011125fi
11126{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11127echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11128if test $ac_cv_type_uintptr_t = yes; then
11129
11130cat >>confdefs.h <<_ACEOF
11131#define HAVE_UINTPTR_T 1
11132_ACEOF
11133
Thomas Wouters477c8d52006-05-27 19:21:47 +000011134{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11135echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011136if test "${ac_cv_type_uintptr_t+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
11138else
11139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* confdefs.h. */
11141_ACEOF
11142cat confdefs.h >>conftest.$ac_ext
11143cat >>conftest.$ac_ext <<_ACEOF
11144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011145$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011146typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147int
11148main ()
11149{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011150if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011152if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 return 0;
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011159if { (ac_try="$ac_compile"
11160case "(($ac_try" in
11161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11162 *) ac_try_echo=$ac_try;;
11163esac
11164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011167 grep -v '^ *+' conftest.er1 >conftest.err
11168 rm -f conftest.er1
11169 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011171 (exit $ac_status); } && {
11172 test -z "$ac_c_werror_flag" ||
11173 test ! -s conftest.err
11174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ac_cv_type_uintptr_t=yes
11176else
11177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011178sed 's/^/| /' conftest.$ac_ext >&5
11179
Thomas Wouters477c8d52006-05-27 19:21:47 +000011180 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011181fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011182
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011184fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011185{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11186echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011187
Thomas Wouters89f507f2006-12-13 04:49:30 +000011188# The cast to long int works around a bug in the HP C Compiler
11189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11191# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +000011192{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11193echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011194if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11195 echo $ECHO_N "(cached) $ECHO_C" >&6
11196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 if test "$cross_compiling" = yes; then
11198 # Depending upon the size, compute the lo and hi bounds.
11199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* confdefs.h. */
11201_ACEOF
11202cat confdefs.h >>conftest.$ac_ext
11203cat >>conftest.$ac_ext <<_ACEOF
11204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011205$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011206 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207int
11208main ()
11209{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011211test_array [0] = 0
11212
11213 ;
11214 return 0;
11215}
11216_ACEOF
11217rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011218if { (ac_try="$ac_compile"
11219case "(($ac_try" in
11220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11221 *) ac_try_echo=$ac_try;;
11222esac
11223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011226 grep -v '^ *+' conftest.er1 >conftest.err
11227 rm -f conftest.er1
11228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011230 (exit $ac_status); } && {
11231 test -z "$ac_c_werror_flag" ||
11232 test ! -s conftest.err
11233 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 ac_lo=0 ac_mid=0
11235 while :; do
11236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* confdefs.h. */
11238_ACEOF
11239cat confdefs.h >>conftest.$ac_ext
11240cat >>conftest.$ac_ext <<_ACEOF
11241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011242$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011243 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011248test_array [0] = 0
11249
11250 ;
11251 return 0;
11252}
11253_ACEOF
11254rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011255if { (ac_try="$ac_compile"
11256case "(($ac_try" in
11257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11258 *) ac_try_echo=$ac_try;;
11259esac
11260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011263 grep -v '^ *+' conftest.er1 >conftest.err
11264 rm -f conftest.er1
11265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011267 (exit $ac_status); } && {
11268 test -z "$ac_c_werror_flag" ||
11269 test ! -s conftest.err
11270 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 ac_hi=$ac_mid; break
11272else
11273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011274sed 's/^/| /' conftest.$ac_ext >&5
11275
Thomas Wouters477c8d52006-05-27 19:21:47 +000011276 ac_lo=`expr $ac_mid + 1`
11277 if test $ac_lo -le $ac_mid; then
11278 ac_lo= ac_hi=
11279 break
11280 fi
11281 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011283
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 done
11286else
11287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011288sed 's/^/| /' conftest.$ac_ext >&5
11289
Thomas Wouters477c8d52006-05-27 19:21:47 +000011290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* confdefs.h. */
11292_ACEOF
11293cat confdefs.h >>conftest.$ac_ext
11294cat >>conftest.$ac_ext <<_ACEOF
11295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011296$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011297 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011298int
11299main ()
11300{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011301static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011302test_array [0] = 0
11303
11304 ;
11305 return 0;
11306}
11307_ACEOF
11308rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011309if { (ac_try="$ac_compile"
11310case "(($ac_try" in
11311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11312 *) ac_try_echo=$ac_try;;
11313esac
11314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011317 grep -v '^ *+' conftest.er1 >conftest.err
11318 rm -f conftest.er1
11319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011321 (exit $ac_status); } && {
11322 test -z "$ac_c_werror_flag" ||
11323 test ! -s conftest.err
11324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ac_hi=-1 ac_mid=-1
11326 while :; do
11327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* confdefs.h. */
11329_ACEOF
11330cat confdefs.h >>conftest.$ac_ext
11331cat >>conftest.$ac_ext <<_ACEOF
11332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011333$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011334 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011335int
11336main ()
11337{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011339test_array [0] = 0
11340
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011346if { (ac_try="$ac_compile"
11347case "(($ac_try" in
11348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11349 *) ac_try_echo=$ac_try;;
11350esac
11351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011354 grep -v '^ *+' conftest.er1 >conftest.err
11355 rm -f conftest.er1
11356 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011358 (exit $ac_status); } && {
11359 test -z "$ac_c_werror_flag" ||
11360 test ! -s conftest.err
11361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 ac_lo=$ac_mid; break
11363else
11364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011365sed 's/^/| /' conftest.$ac_ext >&5
11366
Thomas Wouters477c8d52006-05-27 19:21:47 +000011367 ac_hi=`expr '(' $ac_mid ')' - 1`
11368 if test $ac_mid -le $ac_hi; then
11369 ac_lo= ac_hi=
11370 break
11371 fi
11372 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011373fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011374
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 done
11377else
11378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011379sed 's/^/| /' conftest.$ac_ext >&5
11380
Thomas Wouters477c8d52006-05-27 19:21:47 +000011381 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011382fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011383
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011385fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011386
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011388# Binary search between lo and hi bounds.
11389while test "x$ac_lo" != "x$ac_hi"; do
11390 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011398 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011399int
11400main ()
11401{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011402static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011403test_array [0] = 0
11404
11405 ;
11406 return 0;
11407}
11408_ACEOF
11409rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011410if { (ac_try="$ac_compile"
11411case "(($ac_try" in
11412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11413 *) ac_try_echo=$ac_try;;
11414esac
11415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011418 grep -v '^ *+' conftest.er1 >conftest.err
11419 rm -f conftest.er1
11420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011422 (exit $ac_status); } && {
11423 test -z "$ac_c_werror_flag" ||
11424 test ! -s conftest.err
11425 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 ac_hi=$ac_mid
11427else
11428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011429sed 's/^/| /' conftest.$ac_ext >&5
11430
Thomas Wouters477c8d52006-05-27 19:21:47 +000011431 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011432fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011433
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011435done
11436case $ac_lo in
11437?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +000011438'') if test "$ac_cv_type_uintptr_t" = yes; then
11439 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011440See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011441echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011442See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +000011443 { (exit 77); exit 77; }; }
11444 else
11445 ac_cv_sizeof_uintptr_t=0
11446 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011447esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011448else
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011450/* confdefs.h. */
11451_ACEOF
11452cat confdefs.h >>conftest.$ac_ext
11453cat >>conftest.$ac_ext <<_ACEOF
11454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011455$ac_includes_default
Thomas Wouters89f507f2006-12-13 04:49:30 +000011456 typedef uintptr_t ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011457static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11458static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011459#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011460#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011461int
11462main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011463{
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
11465 FILE *f = fopen ("conftest.val", "w");
11466 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011467 return 1;
11468 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011470 long int i = longval ();
11471 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11472 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 fprintf (f, "%ld\n", i);
11474 }
11475 else
11476 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011477 unsigned long int i = ulongval ();
11478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11479 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 fprintf (f, "%lu\n", i);
11481 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011482 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011483
11484 ;
11485 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011486}
Martin v. Löwis11437992002-04-12 09:54:03 +000011487_ACEOF
11488rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011489if { (ac_try="$ac_link"
11490case "(($ac_try" in
11491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492 *) ac_try_echo=$ac_try;;
11493esac
11494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11495 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 ac_status=$?
11497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011499 { (case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
11503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11504 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); }; }; then
11508 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 echo "$as_me: program exited with status $ac_status" >&5
11511echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011512sed 's/^/| /' conftest.$ac_ext >&5
11513
Martin v. Löwis11437992002-04-12 09:54:03 +000011514( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +000011515if test "$ac_cv_type_uintptr_t" = yes; then
11516 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011517See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011518echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011519See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011520 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000011521 else
11522 ac_cv_sizeof_uintptr_t=0
11523 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011524fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011526fi
11527rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011528fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011529{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11530echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000011531
11532
11533
Martin v. Löwis11437992002-04-12 09:54:03 +000011534cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011535#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011536_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011537
Michael W. Hudson54241132001-12-07 15:38:26 +000011538
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011539fi
11540
Thomas Wouters89f507f2006-12-13 04:49:30 +000011541
11542
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011543# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000011544{ echo "$as_me:$LINENO: checking size of off_t" >&5
11545echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011546if test "${ac_cv_sizeof_off_t+set}" = set; then
11547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011548else
11549 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011550 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011551else
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* confdefs.h. */
11554_ACEOF
11555cat confdefs.h >>conftest.$ac_ext
11556cat >>conftest.$ac_ext <<_ACEOF
11557/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011558#include <stdio.h>
11559#include <sys/types.h>
11560main()
11561{
11562 FILE *f=fopen("conftestval", "w");
11563 if (!f) exit(1);
11564 fprintf(f, "%d\n", sizeof(off_t));
11565 exit(0);
11566}
Martin v. Löwis11437992002-04-12 09:54:03 +000011567_ACEOF
11568rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011569if { (ac_try="$ac_link"
11570case "(($ac_try" in
11571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11572 *) ac_try_echo=$ac_try;;
11573esac
11574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11575 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ac_status=$?
11577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011579 { (case "(($ac_try" in
11580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581 *) ac_try_echo=$ac_try;;
11582esac
11583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11584 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 ac_status=$?
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011588 ac_cv_sizeof_off_t=`cat conftestval`
11589else
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 echo "$as_me: program exited with status $ac_status" >&5
11591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011592sed 's/^/| /' conftest.$ac_ext >&5
11593
Martin v. Löwis11437992002-04-12 09:54:03 +000011594( exit $ac_status )
11595ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011596fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011598fi
11599
Thomas Wouters477c8d52006-05-27 19:21:47 +000011600
11601
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011602fi
11603
Thomas Wouters477c8d52006-05-27 19:21:47 +000011604{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11605echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
11607cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011608#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011609_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011610
Michael W. Hudson54241132001-12-07 15:38:26 +000011611
Thomas Wouters477c8d52006-05-27 19:21:47 +000011612{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11613echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011614if test "$have_long_long" = yes -a \
11615 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11616 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618cat >>confdefs.h <<\_ACEOF
11619#define HAVE_LARGEFILE_SUPPORT 1
11620_ACEOF
11621
Thomas Wouters477c8d52006-05-27 19:21:47 +000011622 { echo "$as_me:$LINENO: result: yes" >&5
11623echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011624else
Thomas Wouters477c8d52006-05-27 19:21:47 +000011625 { echo "$as_me:$LINENO: result: no" >&5
11626echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011627fi
11628
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011629# AC_CHECK_SIZEOF() doesn't include <time.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000011630{ echo "$as_me:$LINENO: checking size of time_t" >&5
11631echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011632if test "${ac_cv_sizeof_time_t+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011634else
11635 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011636 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011637else
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011644#include <stdio.h>
11645#include <time.h>
11646main()
11647{
11648 FILE *f=fopen("conftestval", "w");
11649 if (!f) exit(1);
11650 fprintf(f, "%d\n", sizeof(time_t));
11651 exit(0);
11652}
Martin v. Löwis11437992002-04-12 09:54:03 +000011653_ACEOF
11654rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011655if { (ac_try="$ac_link"
11656case "(($ac_try" in
11657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11658 *) ac_try_echo=$ac_try;;
11659esac
11660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11661 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011665 { (case "(($ac_try" in
11666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11667 *) ac_try_echo=$ac_try;;
11668esac
11669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11670 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 ac_status=$?
11672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011674 ac_cv_sizeof_time_t=`cat conftestval`
11675else
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 echo "$as_me: program exited with status $ac_status" >&5
11677echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011678sed 's/^/| /' conftest.$ac_ext >&5
11679
Martin v. Löwis11437992002-04-12 09:54:03 +000011680( exit $ac_status )
11681ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011682fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011684fi
11685
Thomas Wouters477c8d52006-05-27 19:21:47 +000011686
11687
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011688fi
11689
Thomas Wouters477c8d52006-05-27 19:21:47 +000011690{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11691echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
11693cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011694#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011695_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011696
Michael W. Hudson54241132001-12-07 15:38:26 +000011697
11698
Trent Mick635f6fb2000-08-23 21:33:05 +000011699# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011700ac_save_cc="$CC"
11701if test "$ac_cv_kpthread" = "yes"
11702then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011703elif test "$ac_cv_kthread" = "yes"
11704then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011705elif test "$ac_cv_pthread" = "yes"
11706then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011707fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011708{ echo "$as_me:$LINENO: checking for pthread_t" >&5
11709echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011710have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011712/* confdefs.h. */
11713_ACEOF
11714cat confdefs.h >>conftest.$ac_ext
11715cat >>conftest.$ac_ext <<_ACEOF
11716/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011717#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011718int
11719main ()
11720{
Guido van Rossum12580492000-09-24 16:47:19 +000011721pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 ;
11723 return 0;
11724}
11725_ACEOF
11726rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011727if { (ac_try="$ac_compile"
11728case "(($ac_try" in
11729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11730 *) ac_try_echo=$ac_try;;
11731esac
11732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011735 grep -v '^ *+' conftest.er1 >conftest.err
11736 rm -f conftest.er1
11737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000011739 (exit $ac_status); } && {
11740 test -z "$ac_c_werror_flag" ||
11741 test ! -s conftest.err
11742 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011743 have_pthread_t=yes
11744else
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011746sed 's/^/| /' conftest.$ac_ext >&5
11747
Thomas Wouters477c8d52006-05-27 19:21:47 +000011748
Trent Mick635f6fb2000-08-23 21:33:05 +000011749fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011750
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011752{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11753echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011754if test "$have_pthread_t" = yes ; then
11755 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000011756 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
11757echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11759 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011760else
11761 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011762 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011763else
Martin v. Löwis11437992002-04-12 09:54:03 +000011764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011765/* confdefs.h. */
11766_ACEOF
11767cat confdefs.h >>conftest.$ac_ext
11768cat >>conftest.$ac_ext <<_ACEOF
11769/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011770#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011771#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011772 main()
11773 {
11774 FILE *f=fopen("conftestval", "w");
11775 if (!f) exit(1);
11776 fprintf(f, "%d\n", sizeof(pthread_t));
11777 exit(0);
11778 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
11780rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011781if { (ac_try="$ac_link"
11782case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785esac
11786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11787 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ac_status=$?
11789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011791 { (case "(($ac_try" in
11792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11793 *) ac_try_echo=$ac_try;;
11794esac
11795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11796 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 ac_status=$?
11798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011800 ac_cv_sizeof_pthread_t=`cat conftestval`
11801else
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 echo "$as_me: program exited with status $ac_status" >&5
11803echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011804sed 's/^/| /' conftest.$ac_ext >&5
11805
Martin v. Löwis11437992002-04-12 09:54:03 +000011806( exit $ac_status )
11807ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011808fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000011810fi
11811
Thomas Wouters477c8d52006-05-27 19:21:47 +000011812
11813
Trent Mick635f6fb2000-08-23 21:33:05 +000011814fi
11815
Thomas Wouters477c8d52006-05-27 19:21:47 +000011816 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11817echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
11819cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011820#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011821_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011822
11823fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011824CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011825
Thomas Wouters477c8d52006-05-27 19:21:47 +000011826{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11827echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
11828# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011829if test "${enable_toolbox_glue+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011830 enableval=$enable_toolbox_glue;
11831fi
Jack Jansene578a632001-08-15 01:27:14 +000011832
11833
11834if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011835then
Jack Jansene578a632001-08-15 01:27:14 +000011836 case $ac_sys_system/$ac_sys_release in
11837 Darwin/*)
11838 enable_toolbox_glue="yes";;
11839 *)
11840 enable_toolbox_glue="no";;
11841 esac
11842fi
11843case "$enable_toolbox_glue" in
11844yes)
Jack Jansene578a632001-08-15 01:27:14 +000011845 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011846 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011847
11848cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011849#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011850_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011851
11852 ;;
11853*)
Jack Jansene578a632001-08-15 01:27:14 +000011854 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011855 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011856 ;;
11857esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000011858{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11859echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011860
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011861
11862case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011863 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011864 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11865 ;;
11866 Darwin/*)
11867 OTHER_LIBTOOL_OPT=""
11868 ;;
11869esac
11870
11871
11872case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011873 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011874 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11875 if test "${enable_universalsdk}"; then
11876 :
11877 else
11878 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11879 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011880 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011881 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011882 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011883 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11884 if test ${gcc_version} '<' 4.0
11885 then
11886 LIBTOOL_CRUFT="-lcc_dynamic"
11887 else
11888 LIBTOOL_CRUFT=""
11889 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011890 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011891 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011892 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011893esac
11894
Thomas Wouters477c8d52006-05-27 19:21:47 +000011895{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
11896echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011897if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011898then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011899 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011901 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011902
Martin v. Löwis11437992002-04-12 09:54:03 +000011903cat >>confdefs.h <<\_ACEOF
11904#define WITH_NEXT_FRAMEWORK 1
11905_ACEOF
11906
Thomas Wouters477c8d52006-05-27 19:21:47 +000011907 { echo "$as_me:$LINENO: result: yes" >&5
11908echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011909else
Thomas Wouters477c8d52006-05-27 19:21:47 +000011910 { echo "$as_me:$LINENO: result: no" >&5
11911echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011912fi
11913
Thomas Wouters477c8d52006-05-27 19:21:47 +000011914{ echo "$as_me:$LINENO: checking for dyld" >&5
11915echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011916case $ac_sys_system/$ac_sys_release in
11917 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011918
Martin v. Löwis11437992002-04-12 09:54:03 +000011919cat >>confdefs.h <<\_ACEOF
11920#define WITH_DYLD 1
11921_ACEOF
11922
Thomas Wouters477c8d52006-05-27 19:21:47 +000011923 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
11924echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011925 ;;
11926 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011927 { echo "$as_me:$LINENO: result: no" >&5
11928echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011929 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011930esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011931
Guido van Rossum0a516c91994-09-12 10:58:40 +000011932# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011933
Michael W. Hudson54241132001-12-07 15:38:26 +000011934
11935
11936
11937
Guido van Rossum0a516c91994-09-12 10:58:40 +000011938# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011939# -- usually .so, .sl on HP-UX, .dll on Cygwin
Thomas Wouters477c8d52006-05-27 19:21:47 +000011940{ echo "$as_me:$LINENO: checking SO" >&5
11941echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011942if test -z "$SO"
11943then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011944 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000011945 hp*|HP*)
11946 case `uname -m` in
11947 ia64) SO=.so;;
11948 *) SO=.sl;;
11949 esac
11950 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011951 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011952 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011953 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011954else
11955 # this might also be a termcap variable, see #610332
11956 echo
11957 echo '====================================================================='
11958 echo '+ +'
11959 echo '+ WARNING: You have set SO in your environment. +'
11960 echo '+ Do you really mean to change the extension for shared libraries? +'
11961 echo '+ Continuing in 10 seconds to let you to ponder. +'
11962 echo '+ +'
11963 echo '====================================================================='
11964 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011965fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011966{ echo "$as_me:$LINENO: result: $SO" >&5
11967echo "${ECHO_T}$SO" >&6; }
11968
11969cat >>confdefs.h <<_ACEOF
11970#define SHLIB_EXT "$SO"
11971_ACEOF
11972
Guido van Rossum0a516c91994-09-12 10:58:40 +000011973# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011974# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011975# (Shared libraries in this instance are shared modules to be loaded into
11976# Python, as opposed to building Python itself as a shared library.)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011977{ echo "$as_me:$LINENO: checking LDSHARED" >&5
11978echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011979if test -z "$LDSHARED"
11980then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011982 AIX*)
11983 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011984 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011985 ;;
11986 BeOS*)
11987 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000011988 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011989 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000011990 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000011991 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000011993 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000011994 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000011995 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000011996 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011997 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000011998 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000011999 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012000 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12001 if test "$enable_framework" ; then
12002 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012003 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12004 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012005 else
12006 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012007 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012008 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012009 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012010 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12011 if test "$enable_framework" ; then
12012 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012013 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12014 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012015 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012016 # No framework, use the Python app as bundle-loader
12017 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012018 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012019 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012020 Darwin/*)
12021 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12022 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012023 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000012024 if test ${cur_target} '>' 10.2; then
12025 cur_target=10.3
12026 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012027 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012028 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012029 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012030 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012031 if test "${enable_universalsdk}"; then
12032 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12033 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012034 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12035 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012036 else
12037 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12038 if test "$enable_framework" ; then
12039 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012040 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12041 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012042 else
12043 # No framework, use the Python app as bundle-loader
12044 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12045 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12046 fi
12047 fi
12048 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012049 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012050 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012051 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012052 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012053 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012054 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012055 else
12056 LDSHARED="ld -Bshareable ${LDFLAGS}"
12057 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012058 OpenBSD*)
12059 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12060 then
12061 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12062 else
12063 case `uname -r` in
12064 [01].* | 2.[0-7] | 2.[0-7].*)
12065 LDSHARED="ld -Bshareable ${LDFLAGS}"
12066 ;;
12067 *)
12068 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12069 ;;
12070 esac
12071 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012072 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012073 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012074 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012075 then LDSHARED='$(CC) -shared'
12076 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012077 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012078 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012079 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012080 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012081 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012082 *) LDSHARED="ld";;
12083 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012084fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012085{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12086echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012087BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012088# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012089# library (module) -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000012090{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12091echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012092if test -z "$CCSHARED"
12093then
Guido van Rossum07397971997-04-29 21:49:50 +000012094 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012095 SunOS*) if test "$GCC" = yes;
12096 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000012097 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012098 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012099 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012100 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012101 else CCSHARED="+z";
12102 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012103 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012104 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012105 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012106 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012107 if test "$GCC" = "yes"
12108 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012109 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012110 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012111 SCO_SV*)
12112 if test "$GCC" = "yes"
12113 then CCSHARED="-fPIC"
12114 else CCSHARED="-Kpic -belf"
12115 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012116 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012117 IRIX*/6*) case $CC in
12118 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012119 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012120 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012121 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012122 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012123fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012124{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12125echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012126# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012127# the python executable -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000012128{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12129echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012130if test -z "$LINKFORSHARED"
12131then
Guido van Rossum07397971997-04-29 21:49:50 +000012132 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012133 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012134 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012135 LINKFORSHARED="-Wl,-E -Wl,+s";;
12136# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012137 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012138 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012139 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012141 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12142 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012143 # not used by the core itself but which needs to be in the core so
12144 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012145 # -prebind is no longer used, because it actually seems to give a
12146 # slowdown in stead of a speedup, maybe due to the large number of
12147 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012148
12149 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012150 if test "$enable_framework"
12151 then
Jack Jansenda49e192005-01-07 13:08:22 +000012152 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012153 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012154 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012155 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012156 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012157 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012158 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012159 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12160 then
12161 LINKFORSHARED="-Wl,--export-dynamic"
12162 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012163 SunOS/5*) case $CC in
12164 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012165 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012166 then
12167 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012168 fi;;
12169 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012170 CYGWIN*)
12171 if test $enable_shared = "no"
12172 then
12173 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12174 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012175 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012177{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12178echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
Thomas Wouters477c8d52006-05-27 19:21:47 +000012181{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12182echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012183if test ! "$LIBRARY" = "$LDLIBRARY"
12184then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012185 case $ac_sys_system in
12186 CYGWIN*)
12187 # Cygwin needs CCSHARED when building extension DLLs
12188 # but not when building the interpreter DLL.
12189 CFLAGSFORSHARED='';;
12190 *)
12191 CFLAGSFORSHARED='$(CCSHARED)'
12192 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012193fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012194{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12195echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012196
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012197# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12198# library (with --enable-shared).
12199# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012200# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12201# if it is not required, since it creates a dependency of the shared library
12202# to LIBS. This, in turn, means that applications linking the shared libpython
12203# don't need to link LIBS explicitly. The default should be only changed
12204# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012205
Thomas Wouters477c8d52006-05-27 19:21:47 +000012206{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12207echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012208case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012209 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012210 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012211esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000012212{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12213echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012214
12215
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Thomas Wouters477c8d52006-05-27 19:21:47 +000012218{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12219echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012220if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012224LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012226/* confdefs.h. */
12227_ACEOF
12228cat confdefs.h >>conftest.$ac_ext
12229cat >>conftest.$ac_ext <<_ACEOF
12230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012231
Thomas Wouters477c8d52006-05-27 19:21:47 +000012232/* Override any GCC internal prototype to avoid an error.
12233 Use char because int might match the return type of a GCC
12234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012235#ifdef __cplusplus
12236extern "C"
12237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012238char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012242return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
12245}
12246_ACEOF
12247rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012248if { (ac_try="$ac_link"
12249case "(($ac_try" in
12250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12251 *) ac_try_echo=$ac_try;;
12252esac
12253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12254 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012256 grep -v '^ *+' conftest.er1 >conftest.err
12257 rm -f conftest.er1
12258 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012260 (exit $ac_status); } && {
12261 test -z "$ac_c_werror_flag" ||
12262 test ! -s conftest.err
12263 } && test -s conftest$ac_exeext &&
12264 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012266else
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012268sed 's/^/| /' conftest.$ac_ext >&5
12269
Thomas Wouters477c8d52006-05-27 19:21:47 +000012270 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012271fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012272
Thomas Wouters89f507f2006-12-13 04:49:30 +000012273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012275LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012276fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012277{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12278echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012279if test $ac_cv_lib_dl_dlopen = yes; then
12280 cat >>confdefs.h <<_ACEOF
12281#define HAVE_LIBDL 1
12282_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012284 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012286fi
12287 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Thomas Wouters477c8d52006-05-27 19:21:47 +000012289{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12290echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012291if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293else
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012295LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* confdefs.h. */
12298_ACEOF
12299cat confdefs.h >>conftest.$ac_ext
12300cat >>conftest.$ac_ext <<_ACEOF
12301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Thomas Wouters477c8d52006-05-27 19:21:47 +000012303/* Override any GCC internal prototype to avoid an error.
12304 Use char because int might match the return type of a GCC
12305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012306#ifdef __cplusplus
12307extern "C"
12308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012309char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012310int
12311main ()
12312{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012313return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 ;
12315 return 0;
12316}
12317_ACEOF
12318rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012319if { (ac_try="$ac_link"
12320case "(($ac_try" in
12321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12322 *) ac_try_echo=$ac_try;;
12323esac
12324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12325 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012327 grep -v '^ *+' conftest.er1 >conftest.err
12328 rm -f conftest.er1
12329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012331 (exit $ac_status); } && {
12332 test -z "$ac_c_werror_flag" ||
12333 test ! -s conftest.err
12334 } && test -s conftest$ac_exeext &&
12335 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337else
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012339sed 's/^/| /' conftest.$ac_ext >&5
12340
Thomas Wouters477c8d52006-05-27 19:21:47 +000012341 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012342fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012343
Thomas Wouters89f507f2006-12-13 04:49:30 +000012344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012346LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012348{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12349echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012350if test $ac_cv_lib_dld_shl_load = yes; then
12351 cat >>confdefs.h <<_ACEOF
12352#define HAVE_LIBDLD 1
12353_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012354
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012355 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357fi
12358 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012359
12360# only check for sem_ini if thread support is requested
12361if test "$with_threads" = "yes" -o -z "$with_threads"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012362 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12363echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012364if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012366else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012367 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012369/* confdefs.h. */
12370_ACEOF
12371cat confdefs.h >>conftest.$ac_ext
12372cat >>conftest.$ac_ext <<_ACEOF
12373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012374
Thomas Wouters477c8d52006-05-27 19:21:47 +000012375/* Override any GCC internal prototype to avoid an error.
12376 Use char because int might match the return type of a GCC
12377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#ifdef __cplusplus
12379extern "C"
12380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012381char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012382int
12383main ()
12384{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012385return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ;
12387 return 0;
12388}
12389_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000012390for ac_lib in '' pthread rt posix4; do
12391 if test -z "$ac_lib"; then
12392 ac_res="none required"
12393 else
12394 ac_res=-l$ac_lib
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +000012396 fi
12397 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012398if { (ac_try="$ac_link"
12399case "(($ac_try" in
12400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12401 *) ac_try_echo=$ac_try;;
12402esac
12403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12404 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012406 grep -v '^ *+' conftest.er1 >conftest.err
12407 rm -f conftest.er1
12408 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012410 (exit $ac_status); } && {
12411 test -z "$ac_c_werror_flag" ||
12412 test ! -s conftest.err
12413 } && test -s conftest$ac_exeext &&
12414 $as_test_x conftest$ac_exeext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012415 ac_cv_search_sem_init=$ac_res
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012416else
12417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012418sed 's/^/| /' conftest.$ac_ext >&5
12419
Thomas Wouters477c8d52006-05-27 19:21:47 +000012420
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012421fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012422
Thomas Wouters89f507f2006-12-13 04:49:30 +000012423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters477c8d52006-05-27 19:21:47 +000012424 conftest$ac_exeext
12425 if test "${ac_cv_search_sem_init+set}" = set; then
12426 break
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012427fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012428done
12429if test "${ac_cv_search_sem_init+set}" = set; then
12430 :
12431else
12432 ac_cv_search_sem_init=no
12433fi
12434rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012435LIBS=$ac_func_search_save_LIBS
12436fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012437{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12438echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12439ac_res=$ac_cv_search_sem_init
12440if test "$ac_res" != no; then
12441 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012442
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012443fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012444 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012445 # posix4 on Solaris 2.6
12446 # pthread (first!) on Linux
12447fi
12448
Martin v. Löwis19d17342003-06-14 21:03:05 +000012449# check if we need libintl for locale functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000012450{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12451echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012452if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12453 echo $ECHO_N "(cached) $ECHO_C" >&6
12454else
12455 ac_check_lib_save_LIBS=$LIBS
12456LIBS="-lintl $LIBS"
12457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012458/* confdefs.h. */
12459_ACEOF
12460cat confdefs.h >>conftest.$ac_ext
12461cat >>conftest.$ac_ext <<_ACEOF
12462/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012463
Thomas Wouters477c8d52006-05-27 19:21:47 +000012464/* Override any GCC internal prototype to avoid an error.
12465 Use char because int might match the return type of a GCC
12466 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012467#ifdef __cplusplus
12468extern "C"
12469#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012470char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012471int
12472main ()
12473{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012474return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012475 ;
12476 return 0;
12477}
12478_ACEOF
12479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012480if { (ac_try="$ac_link"
12481case "(($ac_try" in
12482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12483 *) ac_try_echo=$ac_try;;
12484esac
12485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12486 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012488 grep -v '^ *+' conftest.er1 >conftest.err
12489 rm -f conftest.er1
12490 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012492 (exit $ac_status); } && {
12493 test -z "$ac_c_werror_flag" ||
12494 test ! -s conftest.err
12495 } && test -s conftest$ac_exeext &&
12496 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012497 ac_cv_lib_intl_textdomain=yes
12498else
12499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
Thomas Wouters477c8d52006-05-27 19:21:47 +000012502 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012503fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012504
Thomas Wouters89f507f2006-12-13 04:49:30 +000012505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012507LIBS=$ac_check_lib_save_LIBS
12508fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012509{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12510echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012511if test $ac_cv_lib_intl_textdomain = yes; then
12512
12513cat >>confdefs.h <<\_ACEOF
12514#define WITH_LIBINTL 1
12515_ACEOF
12516
12517fi
12518
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012519
12520# checks for system dependent C++ extensions support
12521case "$ac_sys_system" in
Thomas Wouters477c8d52006-05-27 19:21:47 +000012522 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12523echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* confdefs.h. */
12526_ACEOF
12527cat confdefs.h >>conftest.$ac_ext
12528cat >>conftest.$ac_ext <<_ACEOF
12529/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012530#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012531int
12532main ()
12533{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012534loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012540if { (ac_try="$ac_link"
12541case "(($ac_try" in
12542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12543 *) ac_try_echo=$ac_try;;
12544esac
12545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12546 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012552 (exit $ac_status); } && {
12553 test -z "$ac_c_werror_flag" ||
12554 test ! -s conftest.err
12555 } && test -s conftest$ac_exeext &&
12556 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558cat >>confdefs.h <<\_ACEOF
12559#define AIX_GENUINE_CPLUSPLUS 1
12560_ACEOF
12561
Thomas Wouters477c8d52006-05-27 19:21:47 +000012562 { echo "$as_me:$LINENO: result: yes" >&5
12563echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012564else
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012566sed 's/^/| /' conftest.$ac_ext >&5
12567
Thomas Wouters477c8d52006-05-27 19:21:47 +000012568 { echo "$as_me:$LINENO: result: no" >&5
12569echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012570fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012571
Thomas Wouters89f507f2006-12-13 04:49:30 +000012572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012573 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012574 *) ;;
12575esac
12576
Guido van Rossum70c7f481998-03-26 18:44:10 +000012577# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012578# BeOS' sockets are stashed in libnet.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012579{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12580echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012581if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012583else
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012585LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012587/* confdefs.h. */
12588_ACEOF
12589cat confdefs.h >>conftest.$ac_ext
12590cat >>conftest.$ac_ext <<_ACEOF
12591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
Thomas Wouters477c8d52006-05-27 19:21:47 +000012593/* Override any GCC internal prototype to avoid an error.
12594 Use char because int might match the return type of a GCC
12595 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012596#ifdef __cplusplus
12597extern "C"
12598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012599char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012600int
12601main ()
12602{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012603return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 ;
12605 return 0;
12606}
12607_ACEOF
12608rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012609if { (ac_try="$ac_link"
12610case "(($ac_try" in
12611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12612 *) ac_try_echo=$ac_try;;
12613esac
12614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12615 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012617 grep -v '^ *+' conftest.er1 >conftest.err
12618 rm -f conftest.er1
12619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012621 (exit $ac_status); } && {
12622 test -z "$ac_c_werror_flag" ||
12623 test ! -s conftest.err
12624 } && test -s conftest$ac_exeext &&
12625 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012627else
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012629sed 's/^/| /' conftest.$ac_ext >&5
12630
Thomas Wouters477c8d52006-05-27 19:21:47 +000012631 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012632fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012633
Thomas Wouters89f507f2006-12-13 04:49:30 +000012634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012637fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012638{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12639echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012640if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012641 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012642fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012643 # SVR4
Thomas Wouters477c8d52006-05-27 19:21:47 +000012644{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12645echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012646if test "${ac_cv_lib_socket_socket+set}" = set; then
12647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648else
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012650LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* confdefs.h. */
12653_ACEOF
12654cat confdefs.h >>conftest.$ac_ext
12655cat >>conftest.$ac_ext <<_ACEOF
12656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Thomas Wouters477c8d52006-05-27 19:21:47 +000012658/* Override any GCC internal prototype to avoid an error.
12659 Use char because int might match the return type of a GCC
12660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012661#ifdef __cplusplus
12662extern "C"
12663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012664char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012665int
12666main ()
12667{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012668return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ;
12670 return 0;
12671}
12672_ACEOF
12673rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012674if { (ac_try="$ac_link"
12675case "(($ac_try" in
12676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12677 *) ac_try_echo=$ac_try;;
12678esac
12679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012682 grep -v '^ *+' conftest.er1 >conftest.err
12683 rm -f conftest.er1
12684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012686 (exit $ac_status); } && {
12687 test -z "$ac_c_werror_flag" ||
12688 test ! -s conftest.err
12689 } && test -s conftest$ac_exeext &&
12690 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012692else
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012694sed 's/^/| /' conftest.$ac_ext >&5
12695
Thomas Wouters477c8d52006-05-27 19:21:47 +000012696 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012697fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012698
Thomas Wouters89f507f2006-12-13 04:49:30 +000012699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012701LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012702fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012703{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12704echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012705if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012706 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012707fi
12708 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012709
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000012710case "$ac_sys_system" in
12711BeOS*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012712{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
12713echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012714if test "${ac_cv_lib_net_socket+set}" = set; then
12715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012716else
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012718LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Thomas Wouters477c8d52006-05-27 19:21:47 +000012726/* Override any GCC internal prototype to avoid an error.
12727 Use char because int might match the return type of a GCC
12728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012729#ifdef __cplusplus
12730extern "C"
12731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012732char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012733int
12734main ()
12735{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012736return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ;
12738 return 0;
12739}
12740_ACEOF
12741rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012742if { (ac_try="$ac_link"
12743case "(($ac_try" in
12744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12745 *) ac_try_echo=$ac_try;;
12746esac
12747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12748 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012750 grep -v '^ *+' conftest.er1 >conftest.err
12751 rm -f conftest.er1
12752 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000012754 (exit $ac_status); } && {
12755 test -z "$ac_c_werror_flag" ||
12756 test ! -s conftest.err
12757 } && test -s conftest$ac_exeext &&
12758 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012760else
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012762sed 's/^/| /' conftest.$ac_ext >&5
12763
Thomas Wouters477c8d52006-05-27 19:21:47 +000012764 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012765fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012766
Thomas Wouters89f507f2006-12-13 04:49:30 +000012767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012770fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012771{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
12772echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012773if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012774 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012775fi
12776 # BeOS
12777;;
12778esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000012779
Thomas Wouters477c8d52006-05-27 19:21:47 +000012780{ echo "$as_me:$LINENO: checking for --with-libs" >&5
12781echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Thomas Wouters477c8d52006-05-27 19:21:47 +000012783# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012784if test "${with_libs+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012785 withval=$with_libs;
12786{ echo "$as_me:$LINENO: result: $withval" >&5
12787echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000012788LIBS="$withval $LIBS"
12789
12790else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012791 { echo "$as_me:$LINENO: result: no" >&5
12792echo "${ECHO_T}no" >&6; }
12793fi
12794
Guido van Rossum7f43da71994-08-01 12:15:30 +000012795
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012796# Check for use of the system libffi library
Thomas Wouters477c8d52006-05-27 19:21:47 +000012797{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12798echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012799
Thomas Wouters477c8d52006-05-27 19:21:47 +000012800# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012801if test "${with_system_ffi+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012802 withval=$with_system_ffi;
12803fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012804
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012805
12806if test -z "$with_system_ffi"
12807then with_system_ffi="no"
12808fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012809{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12810echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012811
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012812# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012813
12814
Thomas Wouters477c8d52006-05-27 19:21:47 +000012815{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12816echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Thomas Wouters477c8d52006-05-27 19:21:47 +000012818# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012819if test "${with_signal_module+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012820 withval=$with_signal_module;
12821fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012822
12823
12824if test -z "$with_signal_module"
12825then with_signal_module="yes"
12826fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012827{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
12828echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012829
12830if test "${with_signal_module}" = "yes"; then
12831 USE_SIGNAL_MODULE=""
12832 SIGNAL_OBJS=""
12833else
12834 USE_SIGNAL_MODULE="#"
12835 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12836fi
12837
Guido van Rossum3d15bd82001-01-10 18:53:48 +000012838# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000012839
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012840USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000012841
Thomas Wouters477c8d52006-05-27 19:21:47 +000012842{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
12843echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
Guido van Rossumec2f0731997-01-22 20:54:01 +000012845
Thomas Wouters477c8d52006-05-27 19:21:47 +000012846# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012847if test "${with_dec_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012848 withval=$with_dec_threads;
12849{ echo "$as_me:$LINENO: result: $withval" >&5
12850echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000012851LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000012852if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000012853 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000012854fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000012855else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012856 { echo "$as_me:$LINENO: result: no" >&5
12857echo "${ECHO_T}no" >&6; }
12858fi
12859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
12861# Templates for things AC_DEFINEd more than once.
12862# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012863
12864
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
12866
12867
12868
12869
Thomas Wouters477c8d52006-05-27 19:21:47 +000012870{ echo "$as_me:$LINENO: checking for --with-threads" >&5
12871echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Thomas Wouters477c8d52006-05-27 19:21:47 +000012873# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012874if test "${with_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012875 withval=$with_threads;
12876fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000012877
12878
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012879# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000012880
Thomas Wouters477c8d52006-05-27 19:21:47 +000012881# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012882if test "${with_thread+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012883 withval=$with_thread; with_threads=$with_thread
12884fi
12885
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012886
12887if test -z "$with_threads"
12888then with_threads="yes"
12889fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012890{ echo "$as_me:$LINENO: result: $with_threads" >&5
12891echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012892
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012893
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012894if test "$with_threads" = "no"
12895then
12896 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012897elif test "$ac_cv_pthread_is_default" = yes
12898then
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012900#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012902
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012903 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012905#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012907
12908 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012910elif test "$ac_cv_kpthread" = "yes"
12911then
12912 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012913 if test "$ac_cv_cxx_thread" = "yes"; then
12914 CXX="$CXX -Kpthread"
12915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012917#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012919
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012920 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012921 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012922elif test "$ac_cv_kthread" = "yes"
12923then
12924 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012925 if test "$ac_cv_cxx_thread" = "yes"; then
12926 CXX="$CXX -Kthread"
12927 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012928 cat >>confdefs.h <<\_ACEOF
12929#define WITH_THREAD 1
12930_ACEOF
12931
12932 posix_threads=yes
12933 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012934elif test "$ac_cv_pthread" = "yes"
12935then
12936 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012937 if test "$ac_cv_cxx_thread" = "yes"; then
12938 CXX="$CXX -pthread"
12939 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012940 cat >>confdefs.h <<\_ACEOF
12941#define WITH_THREAD 1
12942_ACEOF
12943
12944 posix_threads=yes
12945 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012946else
12947 if test ! -z "$with_threads" -a -d "$with_threads"
12948 then LDFLAGS="$LDFLAGS -L$with_threads"
12949 fi
12950 if test ! -z "$withval" -a -d "$withval"
12951 then LDFLAGS="$LDFLAGS -L$withval"
12952 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012953
12954 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000012955 # define _POSIX_THREADS in unistd.h. Some apparently don't
12956 # (e.g. gnu pth with pthread emulation)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012957 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
12958echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012960/* confdefs.h. */
12961_ACEOF
12962cat confdefs.h >>conftest.$ac_ext
12963cat >>conftest.$ac_ext <<_ACEOF
12964/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012965
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012966#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012967#ifdef _POSIX_THREADS
12968yes
12969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
12971_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012973 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012974 unistd_defines_pthreads=yes
12975else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012976 unistd_defines_pthreads=no
12977fi
12978rm -f conftest*
12979
Thomas Wouters477c8d52006-05-27 19:21:47 +000012980 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
12981echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012984#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012985_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 if test "${ac_cv_header_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012988 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
12989echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012990if test "${ac_cv_header_cthreads_h+set}" = set; then
12991 echo $ECHO_N "(cached) $ECHO_C" >&6
12992fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012993{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12994echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012995else
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000012997{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
12998echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* confdefs.h. */
13001_ACEOF
13002cat confdefs.h >>conftest.$ac_ext
13003cat >>conftest.$ac_ext <<_ACEOF
13004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013005$ac_includes_default
13006#include <cthreads.h>
13007_ACEOF
13008rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013009if { (ac_try="$ac_compile"
13010case "(($ac_try" in
13011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13012 *) ac_try_echo=$ac_try;;
13013esac
13014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013017 grep -v '^ *+' conftest.er1 >conftest.err
13018 rm -f conftest.er1
13019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013021 (exit $ac_status); } && {
13022 test -z "$ac_c_werror_flag" ||
13023 test ! -s conftest.err
13024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 ac_header_compiler=yes
13026else
13027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013028sed 's/^/| /' conftest.$ac_ext >&5
13029
Thomas Wouters477c8d52006-05-27 19:21:47 +000013030 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013031fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013032
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013034{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13035echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
13037# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013038{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13039echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013041/* confdefs.h. */
13042_ACEOF
13043cat confdefs.h >>conftest.$ac_ext
13044cat >>conftest.$ac_ext <<_ACEOF
13045/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013046#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013047_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013048if { (ac_try="$ac_cpp conftest.$ac_ext"
13049case "(($ac_try" in
13050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13051 *) ac_try_echo=$ac_try;;
13052esac
13053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13054 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013056 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 rm -f conftest.er1
13058 cat conftest.err >&5
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013060 (exit $ac_status); } >/dev/null && {
13061 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13062 test ! -s conftest.err
13063 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 ac_header_preproc=yes
13065else
13066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013067sed 's/^/| /' conftest.$ac_ext >&5
13068
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013073{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13074echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
13076# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013077case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13078 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13080echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013081 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13082echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13083 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013084 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013085 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013086 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13087echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013088 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13089echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13090 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13091echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13092 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13093echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013094 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13095echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013096 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13097echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000013098 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013099## ------------------------------------------------ ##
13100## Report this to http://www.python.org/python-bugs ##
13101## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013102_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000013103 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013104 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013105esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013106{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13107echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013108if test "${ac_cv_header_cthreads_h+set}" = set; then
13109 echo $ECHO_N "(cached) $ECHO_C" >&6
13110else
13111 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013113{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13114echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
13116fi
13117if test $ac_cv_header_cthreads_h = yes; then
13118 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013119#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013120_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013123#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013124_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
13127cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013128#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013129_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013130
13131 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013132 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013133else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013134
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013136 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13137echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013138if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13139 echo $ECHO_N "(cached) $ECHO_C" >&6
13140fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013141{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13142echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013143else
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013145{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13146echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* confdefs.h. */
13149_ACEOF
13150cat confdefs.h >>conftest.$ac_ext
13151cat >>conftest.$ac_ext <<_ACEOF
13152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013153$ac_includes_default
13154#include <mach/cthreads.h>
13155_ACEOF
13156rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013157if { (ac_try="$ac_compile"
13158case "(($ac_try" in
13159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160 *) ac_try_echo=$ac_try;;
13161esac
13162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013165 grep -v '^ *+' conftest.er1 >conftest.err
13166 rm -f conftest.er1
13167 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013169 (exit $ac_status); } && {
13170 test -z "$ac_c_werror_flag" ||
13171 test ! -s conftest.err
13172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 ac_header_compiler=yes
13174else
13175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013176sed 's/^/| /' conftest.$ac_ext >&5
13177
Thomas Wouters477c8d52006-05-27 19:21:47 +000013178 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013179fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013180
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013182{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13183echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
13185# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013186{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13187echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* confdefs.h. */
13190_ACEOF
13191cat confdefs.h >>conftest.$ac_ext
13192cat >>conftest.$ac_ext <<_ACEOF
13193/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013194#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013195_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013196if { (ac_try="$ac_cpp conftest.$ac_ext"
13197case "(($ac_try" in
13198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13199 *) ac_try_echo=$ac_try;;
13200esac
13201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13202 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013204 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 rm -f conftest.er1
13206 cat conftest.err >&5
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013208 (exit $ac_status); } >/dev/null && {
13209 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13210 test ! -s conftest.err
13211 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ac_header_preproc=yes
13213else
13214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013215sed 's/^/| /' conftest.$ac_ext >&5
13216
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013218fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013219
Martin v. Löwis11437992002-04-12 09:54:03 +000013220rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013221{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13222echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
13224# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13226 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13228echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013229 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13230echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13231 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013233 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013234 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13235echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013236 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13237echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13238 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13239echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13240 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13241echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013242 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13243echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013244 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13245echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000013246 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013247## ------------------------------------------------ ##
13248## Report this to http://www.python.org/python-bugs ##
13249## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013250_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000013251 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013252 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013253esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013254{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13255echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013256if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13257 echo $ECHO_N "(cached) $ECHO_C" >&6
13258else
13259 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013261{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13262echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
13264fi
13265if test $ac_cv_header_mach_cthreads_h = yes; then
13266 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013267#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013268_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013271#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013272_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
13275cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013276#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013277_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013278
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013279 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013280else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013281
Thomas Wouters477c8d52006-05-27 19:21:47 +000013282 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13283echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Thomas Wouters477c8d52006-05-27 19:21:47 +000013285# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013286if test "${with_pth+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013287 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13288echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013289 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013290#define WITH_THREAD 1
13291_ACEOF
13292
13293
13294cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013295#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013296_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013297
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013298 LIBS="-lpth $LIBS"
13299 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013300else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013301 { echo "$as_me:$LINENO: result: no" >&5
13302echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013303
13304 # Just looking for pthread_create in libpthread is not enough:
13305 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13306 # So we really have to include pthread.h, and then link.
13307 _libs=$LIBS
13308 LIBS="$LIBS -lpthread"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013309 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13310echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013312/* confdefs.h. */
13313_ACEOF
13314cat confdefs.h >>conftest.$ac_ext
13315cat >>conftest.$ac_ext <<_ACEOF
13316/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013317#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013318
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013319void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013320int
13321main ()
13322{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013323
13324pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 ;
13326 return 0;
13327}
13328_ACEOF
13329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013330if { (ac_try="$ac_link"
13331case "(($ac_try" in
13332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13333 *) ac_try_echo=$ac_try;;
13334esac
13335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013338 grep -v '^ *+' conftest.er1 >conftest.err
13339 rm -f conftest.er1
13340 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013342 (exit $ac_status); } && {
13343 test -z "$ac_c_werror_flag" ||
13344 test ! -s conftest.err
13345 } && test -s conftest$ac_exeext &&
13346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
Thomas Wouters477c8d52006-05-27 19:21:47 +000013348 { echo "$as_me:$LINENO: result: yes" >&5
13349echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013352_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013353
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013354 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013355 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013358sed 's/^/| /' conftest.$ac_ext >&5
13359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013361 LIBS=$_libs
Thomas Wouters477c8d52006-05-27 19:21:47 +000013362 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13363echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013364if test "${ac_cv_func_pthread_detach+set}" = set; then
13365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013366else
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* confdefs.h. */
13369_ACEOF
13370cat confdefs.h >>conftest.$ac_ext
13371cat >>conftest.$ac_ext <<_ACEOF
13372/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013373/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13374 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13375#define pthread_detach innocuous_pthread_detach
13376
Guido van Rossumad678af1998-10-02 14:42:15 +000013377/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013378 which can conflict with char pthread_detach (); below.
13379 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013380 <limits.h> exists even on freestanding compilers. */
13381
13382#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013383# include <limits.h>
13384#else
13385# include <assert.h>
13386#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013387
13388#undef pthread_detach
13389
Thomas Wouters477c8d52006-05-27 19:21:47 +000013390/* Override any GCC internal prototype to avoid an error.
13391 Use char because int might match the return type of a GCC
13392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013393#ifdef __cplusplus
13394extern "C"
13395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013396char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013397/* The GNU C library defines this for functions which it implements
13398 to always fail with ENOSYS. Some functions are actually named
13399 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000013400#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013401choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013402#endif
13403
Skip Montanaro6dead952003-09-25 14:50:04 +000013404int
13405main ()
13406{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013407return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 ;
13409 return 0;
13410}
13411_ACEOF
13412rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013413if { (ac_try="$ac_link"
13414case "(($ac_try" in
13415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13416 *) ac_try_echo=$ac_try;;
13417esac
13418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13419 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013421 grep -v '^ *+' conftest.er1 >conftest.err
13422 rm -f conftest.er1
13423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013425 (exit $ac_status); } && {
13426 test -z "$ac_c_werror_flag" ||
13427 test ! -s conftest.err
13428 } && test -s conftest$ac_exeext &&
13429 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013431else
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013433sed 's/^/| /' conftest.$ac_ext >&5
13434
Thomas Wouters477c8d52006-05-27 19:21:47 +000013435 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013436fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013437
Thomas Wouters89f507f2006-12-13 04:49:30 +000013438rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013439 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013440fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013441{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13442echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013443if test $ac_cv_func_pthread_detach = yes; then
13444 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013445#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013446_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013447
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013448 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013449 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013450else
Guido van Rossumad678af1998-10-02 14:42:15 +000013451
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013452 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013453 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13454echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013455if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13456 echo $ECHO_N "(cached) $ECHO_C" >&6
13457fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013458{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13459echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013460else
13461 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013462{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13463echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013464cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* confdefs.h. */
13466_ACEOF
13467cat confdefs.h >>conftest.$ac_ext
13468cat >>conftest.$ac_ext <<_ACEOF
13469/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013470$ac_includes_default
13471#include <atheos/threads.h>
13472_ACEOF
13473rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013474if { (ac_try="$ac_compile"
13475case "(($ac_try" in
13476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13477 *) ac_try_echo=$ac_try;;
13478esac
13479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013482 grep -v '^ *+' conftest.er1 >conftest.err
13483 rm -f conftest.er1
13484 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013486 (exit $ac_status); } && {
13487 test -z "$ac_c_werror_flag" ||
13488 test ! -s conftest.err
13489 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013490 ac_header_compiler=yes
13491else
13492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013493sed 's/^/| /' conftest.$ac_ext >&5
13494
Thomas Wouters477c8d52006-05-27 19:21:47 +000013495 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013496fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013497
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013499{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13500echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013501
13502# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013503{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13504echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* confdefs.h. */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013511#include <atheos/threads.h>
13512_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013513if { (ac_try="$ac_cpp conftest.$ac_ext"
13514case "(($ac_try" in
13515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13516 *) ac_try_echo=$ac_try;;
13517esac
13518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13519 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013520 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013521 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013522 rm -f conftest.er1
13523 cat conftest.err >&5
13524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013525 (exit $ac_status); } >/dev/null && {
13526 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13527 test ! -s conftest.err
13528 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013529 ac_header_preproc=yes
13530else
13531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013532sed 's/^/| /' conftest.$ac_ext >&5
13533
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013534 ac_header_preproc=no
13535fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013536
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013537rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013538{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13539echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013540
13541# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013542case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13543 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013544 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13545echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013546 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13547echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13548 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013549 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013550 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013551 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13552echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013553 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13554echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13555 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13556echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13557 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13558echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013559 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13560echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13562echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000013563 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013564## ------------------------------------------------ ##
13565## Report this to http://www.python.org/python-bugs ##
13566## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013567_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000013568 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013569 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013570esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013571{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13572echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013573if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13574 echo $ECHO_N "(cached) $ECHO_C" >&6
13575else
13576 ac_cv_header_atheos_threads_h=$ac_header_preproc
13577fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013578{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13579echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013580
13581fi
13582if test $ac_cv_header_atheos_threads_h = yes; then
13583 cat >>confdefs.h <<\_ACEOF
13584#define WITH_THREAD 1
13585_ACEOF
13586
13587
13588cat >>confdefs.h <<\_ACEOF
13589#define ATHEOS_THREADS 1
13590_ACEOF
13591
13592 THREADOBJ="Python/thread.o"
13593else
13594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013596 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13597echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013598if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13599 echo $ECHO_N "(cached) $ECHO_C" >&6
13600fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013601{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13602echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013603else
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013605{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
13606echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013608/* confdefs.h. */
13609_ACEOF
13610cat confdefs.h >>conftest.$ac_ext
13611cat >>conftest.$ac_ext <<_ACEOF
13612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013613$ac_includes_default
13614#include <kernel/OS.h>
13615_ACEOF
13616rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013617if { (ac_try="$ac_compile"
13618case "(($ac_try" in
13619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13620 *) ac_try_echo=$ac_try;;
13621esac
13622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013625 grep -v '^ *+' conftest.er1 >conftest.err
13626 rm -f conftest.er1
13627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013629 (exit $ac_status); } && {
13630 test -z "$ac_c_werror_flag" ||
13631 test ! -s conftest.err
13632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013633 ac_header_compiler=yes
13634else
13635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013636sed 's/^/| /' conftest.$ac_ext >&5
13637
Thomas Wouters477c8d52006-05-27 19:21:47 +000013638 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013639fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013640
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013642{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13643echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
13645# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013646{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
13647echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* confdefs.h. */
13650_ACEOF
13651cat confdefs.h >>conftest.$ac_ext
13652cat >>conftest.$ac_ext <<_ACEOF
13653/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013654#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013655_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013656if { (ac_try="$ac_cpp conftest.$ac_ext"
13657case "(($ac_try" in
13658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13659 *) ac_try_echo=$ac_try;;
13660esac
13661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013664 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 rm -f conftest.er1
13666 cat conftest.err >&5
13667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013668 (exit $ac_status); } >/dev/null && {
13669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13670 test ! -s conftest.err
13671 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 ac_header_preproc=yes
13673else
13674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013675sed 's/^/| /' conftest.$ac_ext >&5
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013678fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013679
Martin v. Löwis11437992002-04-12 09:54:03 +000013680rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13682echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13686 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
13688echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013689 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
13690echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
13691 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013693 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013694 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
13695echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013696 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
13697echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
13698 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
13699echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
13700 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
13701echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013702 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
13703echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013704 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
13705echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000013706 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013707## ------------------------------------------------ ##
13708## Report this to http://www.python.org/python-bugs ##
13709## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013710_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000013711 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013713esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013714{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13715echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013716if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13717 echo $ECHO_N "(cached) $ECHO_C" >&6
13718else
13719 ac_cv_header_kernel_OS_h=$ac_header_preproc
13720fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013721{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13722echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013723
13724fi
13725if test $ac_cv_header_kernel_OS_h = yes; then
13726 cat >>confdefs.h <<\_ACEOF
13727#define WITH_THREAD 1
13728_ACEOF
13729
13730
13731cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013732#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013733_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013734
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013735 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013736else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013737
Thomas Wouters477c8d52006-05-27 19:21:47 +000013738 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13739echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013740if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013744LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* confdefs.h. */
13747_ACEOF
13748cat confdefs.h >>conftest.$ac_ext
13749cat >>conftest.$ac_ext <<_ACEOF
13750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013751
Thomas Wouters477c8d52006-05-27 19:21:47 +000013752/* Override any GCC internal prototype to avoid an error.
13753 Use char because int might match the return type of a GCC
13754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013755#ifdef __cplusplus
13756extern "C"
13757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013759int
13760main ()
13761{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ;
13764 return 0;
13765}
13766_ACEOF
13767rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013768if { (ac_try="$ac_link"
13769case "(($ac_try" in
13770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13771 *) ac_try_echo=$ac_try;;
13772esac
13773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13774 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013776 grep -v '^ *+' conftest.er1 >conftest.err
13777 rm -f conftest.er1
13778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013780 (exit $ac_status); } && {
13781 test -z "$ac_c_werror_flag" ||
13782 test ! -s conftest.err
13783 } && test -s conftest$ac_exeext &&
13784 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013788sed 's/^/| /' conftest.$ac_ext >&5
13789
Thomas Wouters477c8d52006-05-27 19:21:47 +000013790 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013791fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013792
Thomas Wouters89f507f2006-12-13 04:49:30 +000013793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013795LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013796fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013797{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13798echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013799if test $ac_cv_lib_pthreads_pthread_create = yes; then
13800 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013802_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013804 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013805 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013806 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013807else
Greg Steinadf63d62000-07-05 10:38:09 +000013808
Thomas Wouters477c8d52006-05-27 19:21:47 +000013809 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13810echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013811if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13812 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013815LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* confdefs.h. */
13818_ACEOF
13819cat confdefs.h >>conftest.$ac_ext
13820cat >>conftest.$ac_ext <<_ACEOF
13821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Thomas Wouters477c8d52006-05-27 19:21:47 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013829char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013833return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013839if { (ac_try="$ac_link"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
13844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13845 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013847 grep -v '^ *+' conftest.er1 >conftest.err
13848 rm -f conftest.er1
13849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013851 (exit $ac_status); } && {
13852 test -z "$ac_c_werror_flag" ||
13853 test ! -s conftest.err
13854 } && test -s conftest$ac_exeext &&
13855 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000013857else
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013859sed 's/^/| /' conftest.$ac_ext >&5
13860
Thomas Wouters477c8d52006-05-27 19:21:47 +000013861 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000013862fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013863
Thomas Wouters89f507f2006-12-13 04:49:30 +000013864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013866LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000013867fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013868{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
13869echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013870if test $ac_cv_lib_c_r_pthread_create = yes; then
13871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013872#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013873_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013874
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013875 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013876 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013877 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013878else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013879
Thomas Wouters477c8d52006-05-27 19:21:47 +000013880 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
13881echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013882if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
13883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013884else
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013886LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013888/* confdefs.h. */
13889_ACEOF
13890cat confdefs.h >>conftest.$ac_ext
13891cat >>conftest.$ac_ext <<_ACEOF
13892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Thomas Wouters477c8d52006-05-27 19:21:47 +000013894/* Override any GCC internal prototype to avoid an error.
13895 Use char because int might match the return type of a GCC
13896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013897#ifdef __cplusplus
13898extern "C"
13899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013900char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013901int
13902main ()
13903{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013904return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ;
13906 return 0;
13907}
13908_ACEOF
13909rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013910if { (ac_try="$ac_link"
13911case "(($ac_try" in
13912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13913 *) ac_try_echo=$ac_try;;
13914esac
13915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13916 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013918 grep -v '^ *+' conftest.er1 >conftest.err
13919 rm -f conftest.er1
13920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013922 (exit $ac_status); } && {
13923 test -z "$ac_c_werror_flag" ||
13924 test ! -s conftest.err
13925 } && test -s conftest$ac_exeext &&
13926 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013928else
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013930sed 's/^/| /' conftest.$ac_ext >&5
13931
Thomas Wouters477c8d52006-05-27 19:21:47 +000013932 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013933fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013934
Thomas Wouters89f507f2006-12-13 04:49:30 +000013935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013937LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013938fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013939{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
13940echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013941if test $ac_cv_lib_pthread___pthread_create_system = yes; then
13942 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013943#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013944_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013945
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013946 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013947 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013948 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013949else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013950
Thomas Wouters477c8d52006-05-27 19:21:47 +000013951 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
13952echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013953if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
13954 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000013955else
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013957LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Thomas Wouters477c8d52006-05-27 19:21:47 +000013965/* Override any GCC internal prototype to avoid an error.
13966 Use char because int might match the return type of a GCC
13967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013968#ifdef __cplusplus
13969extern "C"
13970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013971char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013972int
13973main ()
13974{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013975return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ;
13977 return 0;
13978}
13979_ACEOF
13980rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013981if { (ac_try="$ac_link"
13982case "(($ac_try" in
13983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13984 *) ac_try_echo=$ac_try;;
13985esac
13986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13987 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013989 grep -v '^ *+' conftest.er1 >conftest.err
13990 rm -f conftest.er1
13991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000013993 (exit $ac_status); } && {
13994 test -z "$ac_c_werror_flag" ||
13995 test ! -s conftest.err
13996 } && test -s conftest$ac_exeext &&
13997 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013999else
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014001sed 's/^/| /' conftest.$ac_ext >&5
14002
Thomas Wouters477c8d52006-05-27 19:21:47 +000014003 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014004fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014005
Thomas Wouters89f507f2006-12-13 04:49:30 +000014006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014008LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014010{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14011echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014012if test $ac_cv_lib_cma_pthread_create = yes; then
14013 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014015_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014016
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014017 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014018 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014019 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014020else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014021
Martin v. Löwis130fb172001-07-19 11:00:41 +000014022 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014023fi
14024
Guido van Rossum627b2d71993-12-24 10:39:16 +000014025
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014026fi
14027
Guido van Rossum0be3e491997-05-22 20:33:33 +000014028fi
14029
Guido van Rossum49545951997-12-02 19:28:29 +000014030fi
14031
Guido van Rossumb93a8621998-05-07 13:27:32 +000014032fi
14033
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014034
Michael W. Hudson54241132001-12-07 15:38:26 +000014035fi
14036
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014037
14038fi
14039
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014041
Thomas Wouters89f507f2006-12-13 04:49:30 +000014042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014044fi
14045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046fi
14047
14048
14049fi
14050
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014051
Michael W. Hudson54241132001-12-07 15:38:26 +000014052
Thomas Wouters477c8d52006-05-27 19:21:47 +000014053 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14054echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014055if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014057else
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014059LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014061/* confdefs.h. */
14062_ACEOF
14063cat confdefs.h >>conftest.$ac_ext
14064cat >>conftest.$ac_ext <<_ACEOF
14065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Thomas Wouters477c8d52006-05-27 19:21:47 +000014067/* Override any GCC internal prototype to avoid an error.
14068 Use char because int might match the return type of a GCC
14069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014070#ifdef __cplusplus
14071extern "C"
14072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014073char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014074int
14075main ()
14076{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014077return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ;
14079 return 0;
14080}
14081_ACEOF
14082rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014083if { (ac_try="$ac_link"
14084case "(($ac_try" in
14085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14086 *) ac_try_echo=$ac_try;;
14087esac
14088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14089 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014091 grep -v '^ *+' conftest.er1 >conftest.err
14092 rm -f conftest.er1
14093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000014095 (exit $ac_status); } && {
14096 test -z "$ac_c_werror_flag" ||
14097 test ! -s conftest.err
14098 } && test -s conftest$ac_exeext &&
14099 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101else
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014103sed 's/^/| /' conftest.$ac_ext >&5
14104
Thomas Wouters477c8d52006-05-27 19:21:47 +000014105 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014107
Thomas Wouters89f507f2006-12-13 04:49:30 +000014108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014110LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014112{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14113echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014114if test $ac_cv_lib_mpc_usconfig = yes; then
14115 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014116#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014117_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014118
Martin v. Löwis130fb172001-07-19 11:00:41 +000014119 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014120 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014121 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014122fi
14123
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014124
Neal Norwitza978ab02002-11-02 16:58:05 +000014125 if test "$posix_threads" != "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014126 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14127echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014128if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014130else
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014132LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014134/* confdefs.h. */
14135_ACEOF
14136cat confdefs.h >>conftest.$ac_ext
14137cat >>conftest.$ac_ext <<_ACEOF
14138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014139
Thomas Wouters477c8d52006-05-27 19:21:47 +000014140/* Override any GCC internal prototype to avoid an error.
14141 Use char because int might match the return type of a GCC
14142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014143#ifdef __cplusplus
14144extern "C"
14145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014146char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014147int
14148main ()
14149{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014150return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ;
14152 return 0;
14153}
14154_ACEOF
14155rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014156if { (ac_try="$ac_link"
14157case "(($ac_try" in
14158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14159 *) ac_try_echo=$ac_try;;
14160esac
14161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014164 grep -v '^ *+' conftest.er1 >conftest.err
14165 rm -f conftest.er1
14166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000014168 (exit $ac_status); } && {
14169 test -z "$ac_c_werror_flag" ||
14170 test ! -s conftest.err
14171 } && test -s conftest$ac_exeext &&
14172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174else
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014176sed 's/^/| /' conftest.$ac_ext >&5
14177
Thomas Wouters477c8d52006-05-27 19:21:47 +000014178 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014180
Thomas Wouters89f507f2006-12-13 04:49:30 +000014181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014184fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014185{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14186echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014187if test $ac_cv_lib_thread_thr_create = yes; then
14188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014190_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014191
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014192 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014193 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014194 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014195fi
14196
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014197 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014198
Martin v. Löwis130fb172001-07-19 11:00:41 +000014199 if test "$USE_THREAD_MODULE" != "#"
14200 then
14201 # If the above checks didn't disable threads, (at least) OSF1
14202 # needs this '-threads' argument during linking.
14203 case $ac_sys_system in
14204 OSF1) LDLAST=-threads;;
14205 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014206 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014207fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014208
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014209if test "$posix_threads" = "yes"; then
14210 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014211
14212cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014213#define _POSIX_THREADS 1
14214_ACEOF
14215
14216 fi
14217
14218 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14219 case $ac_sys_system/$ac_sys_release in
14220 SunOS/5.6)
14221cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014222#define HAVE_PTHREAD_DESTRUCTOR 1
14223_ACEOF
14224
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014225 ;;
14226 SunOS/5.8)
14227cat >>confdefs.h <<\_ACEOF
14228#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14229_ACEOF
14230
14231 ;;
14232 esac
14233
Thomas Wouters477c8d52006-05-27 19:21:47 +000014234 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14235echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014236 if test "${ac_cv_pthread_system_supported+set}" = set; then
14237 echo $ECHO_N "(cached) $ECHO_C" >&6
14238else
14239 if test "$cross_compiling" = yes; then
14240 ac_cv_pthread_system_supported=no
14241else
14242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* confdefs.h. */
14244_ACEOF
14245cat confdefs.h >>conftest.$ac_ext
14246cat >>conftest.$ac_ext <<_ACEOF
14247/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014248#include <pthread.h>
14249 void *foo(void *parm) {
14250 return NULL;
14251 }
14252 main() {
14253 pthread_attr_t attr;
14254 pthread_t id;
14255 if (pthread_attr_init(&attr)) exit(-1);
14256 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14257 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14258 exit(0);
14259 }
14260_ACEOF
14261rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014262if { (ac_try="$ac_link"
14263case "(($ac_try" in
14264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14265 *) ac_try_echo=$ac_try;;
14266esac
14267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14268 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014269 ac_status=$?
14270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014272 { (case "(($ac_try" in
14273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14274 *) ac_try_echo=$ac_try;;
14275esac
14276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14277 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014278 ac_status=$?
14279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14280 (exit $ac_status); }; }; then
14281 ac_cv_pthread_system_supported=yes
14282else
14283 echo "$as_me: program exited with status $ac_status" >&5
14284echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014285sed 's/^/| /' conftest.$ac_ext >&5
14286
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014287( exit $ac_status )
14288ac_cv_pthread_system_supported=no
14289fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014291fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014292
Thomas Wouters477c8d52006-05-27 19:21:47 +000014293
14294
Guido van Rossum627b2d71993-12-24 10:39:16 +000014295fi
14296
Thomas Wouters477c8d52006-05-27 19:21:47 +000014297 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14298echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014299 if test "$ac_cv_pthread_system_supported" = "yes"; then
14300
14301cat >>confdefs.h <<\_ACEOF
14302#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14303_ACEOF
14304
14305 fi
14306
14307for ac_func in pthread_sigmask
14308do
14309as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000014310{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14311echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14312if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014313 echo $ECHO_N "(cached) $ECHO_C" >&6
14314else
14315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014316/* confdefs.h. */
14317_ACEOF
14318cat confdefs.h >>conftest.$ac_ext
14319cat >>conftest.$ac_ext <<_ACEOF
14320/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014321/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14323#define $ac_func innocuous_$ac_func
14324
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014325/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014326 which can conflict with char $ac_func (); below.
14327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014328 <limits.h> exists even on freestanding compilers. */
14329
14330#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014331# include <limits.h>
14332#else
14333# include <assert.h>
14334#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014335
14336#undef $ac_func
14337
Thomas Wouters477c8d52006-05-27 19:21:47 +000014338/* Override any GCC internal prototype to avoid an error.
14339 Use char because int might match the return type of a GCC
14340 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014341#ifdef __cplusplus
14342extern "C"
14343#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014344char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014345/* The GNU C library defines this for functions which it implements
14346 to always fail with ENOSYS. Some functions are actually named
14347 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000014348#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014349choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014350#endif
14351
Skip Montanaro6dead952003-09-25 14:50:04 +000014352int
14353main ()
14354{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014355return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014356 ;
14357 return 0;
14358}
14359_ACEOF
14360rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014361if { (ac_try="$ac_link"
14362case "(($ac_try" in
14363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14364 *) ac_try_echo=$ac_try;;
14365esac
14366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014369 grep -v '^ *+' conftest.er1 >conftest.err
14370 rm -f conftest.er1
14371 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000014373 (exit $ac_status); } && {
14374 test -z "$ac_c_werror_flag" ||
14375 test ! -s conftest.err
14376 } && test -s conftest$ac_exeext &&
14377 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014378 eval "$as_ac_var=yes"
14379else
14380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014381sed 's/^/| /' conftest.$ac_ext >&5
14382
Thomas Wouters477c8d52006-05-27 19:21:47 +000014383 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014384fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014385
Thomas Wouters89f507f2006-12-13 04:49:30 +000014386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014388fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014389ac_res=`eval echo '${'$as_ac_var'}'`
14390 { echo "$as_me:$LINENO: result: $ac_res" >&5
14391echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014392if test `eval echo '${'$as_ac_var'}'` = yes; then
14393 cat >>confdefs.h <<_ACEOF
14394#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14395_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014396 case $ac_sys_system in
14397 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014398
Jason Tishlerfac083d2003-07-22 15:20:49 +000014399cat >>confdefs.h <<\_ACEOF
14400#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14401_ACEOF
14402
14403 ;;
14404 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014405fi
14406done
14407
14408fi
14409
14410
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014411# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
14413
Thomas Wouters477c8d52006-05-27 19:21:47 +000014414{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14415echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14416# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014417if test "${enable_ipv6+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014418 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014419 no)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014420 { echo "$as_me:$LINENO: result: no" >&5
14421echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014422 ipv6=no
14423 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000014424 *) { echo "$as_me:$LINENO: result: yes" >&5
14425echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014427#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014429
14430 ipv6=yes
14431 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014433else
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014435 if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014436 { echo "$as_me:$LINENO: result: no" >&5
14437echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014438 ipv6=no
14439
14440else
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014442/* confdefs.h. */
14443_ACEOF
14444cat confdefs.h >>conftest.$ac_ext
14445cat >>conftest.$ac_ext <<_ACEOF
14446/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014447 /* AF_INET6 available check */
14448#include <sys/types.h>
14449#include <sys/socket.h>
14450main()
14451{
14452 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14453 exit(1);
14454 else
14455 exit(0);
14456}
14457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458_ACEOF
14459rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014460if { (ac_try="$ac_link"
14461case "(($ac_try" in
14462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14463 *) ac_try_echo=$ac_try;;
14464esac
14465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14466 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 ac_status=$?
14468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014470 { (case "(($ac_try" in
14471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14472 *) ac_try_echo=$ac_try;;
14473esac
14474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 ac_status=$?
14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014479 { echo "$as_me:$LINENO: result: yes" >&5
14480echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014481 ipv6=yes
14482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me: program exited with status $ac_status" >&5
14484echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014485sed 's/^/| /' conftest.$ac_ext >&5
14486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000014488{ echo "$as_me:$LINENO: result: no" >&5
14489echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014490 ipv6=no
14491fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014493fi
14494
Thomas Wouters477c8d52006-05-27 19:21:47 +000014495
14496
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014497if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014498 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14499echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014501/* confdefs.h. */
14502_ACEOF
14503cat confdefs.h >>conftest.$ac_ext
14504cat >>conftest.$ac_ext <<_ACEOF
14505/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014506#include <sys/types.h>
14507#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014508int
14509main ()
14510{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014511struct sockaddr_in6 x;
14512x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ;
14514 return 0;
14515}
14516_ACEOF
14517rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014518if { (ac_try="$ac_compile"
14519case "(($ac_try" in
14520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14521 *) ac_try_echo=$ac_try;;
14522esac
14523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014526 grep -v '^ *+' conftest.er1 >conftest.err
14527 rm -f conftest.er1
14528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000014530 (exit $ac_status); } && {
14531 test -z "$ac_c_werror_flag" ||
14532 test ! -s conftest.err
14533 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014534 { echo "$as_me:$LINENO: result: yes" >&5
14535echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014536 ipv6=yes
14537else
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014539sed 's/^/| /' conftest.$ac_ext >&5
14540
Thomas Wouters477c8d52006-05-27 19:21:47 +000014541 { echo "$as_me:$LINENO: result: no" >&5
14542echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014543 ipv6=no
14544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014545
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014547fi
14548
14549if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014551#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014552_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014553
14554fi
14555
Thomas Wouters477c8d52006-05-27 19:21:47 +000014556fi
14557
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014558
14559ipv6type=unknown
14560ipv6lib=none
14561ipv6trylibc=no
14562
14563if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014564 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14565echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014566 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14567 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014568 case $i in
14569 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014571/* confdefs.h. */
14572_ACEOF
14573cat confdefs.h >>conftest.$ac_ext
14574cat >>conftest.$ac_ext <<_ACEOF
14575/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014576
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014577#include <netinet/in.h>
14578#ifdef IPV6_INRIA_VERSION
14579yes
14580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014581_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014583 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014584 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014585fi
14586rm -f conftest*
14587
14588 ;;
14589 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014591/* confdefs.h. */
14592_ACEOF
14593cat confdefs.h >>conftest.$ac_ext
14594cat >>conftest.$ac_ext <<_ACEOF
14595/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014596
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014597#include <netinet/in.h>
14598#ifdef __KAME__
14599yes
14600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014601_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014603 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014604 ipv6type=$i;
14605 ipv6lib=inet6
14606 ipv6libdir=/usr/local/v6/lib
14607 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014608fi
14609rm -f conftest*
14610
14611 ;;
14612 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014614/* confdefs.h. */
14615_ACEOF
14616cat confdefs.h >>conftest.$ac_ext
14617cat >>conftest.$ac_ext <<_ACEOF
14618/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014620#include <features.h>
14621#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14622yes
14623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014626 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014627 ipv6type=$i;
14628 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014629fi
14630rm -f conftest*
14631
14632 ;;
14633 linux-inet6)
14634 if test -d /usr/inet6; then
14635 ipv6type=$i
14636 ipv6lib=inet6
14637 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014638 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014639 fi
14640 ;;
14641 solaris)
14642 if test -f /etc/netconfig; then
14643 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14644 ipv6type=$i
14645 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014646 fi
14647 fi
14648 ;;
14649 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014651/* confdefs.h. */
14652_ACEOF
14653cat confdefs.h >>conftest.$ac_ext
14654cat >>conftest.$ac_ext <<_ACEOF
14655/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014656
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014657#include <sys/param.h>
14658#ifdef _TOSHIBA_INET6
14659yes
14660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014661_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014663 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014664 ipv6type=$i;
14665 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014666 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014667fi
14668rm -f conftest*
14669
14670 ;;
14671 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014673/* confdefs.h. */
14674_ACEOF
14675cat confdefs.h >>conftest.$ac_ext
14676cat >>conftest.$ac_ext <<_ACEOF
14677/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014679#include </usr/local/v6/include/sys/v6config.h>
14680#ifdef __V6D__
14681yes
14682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014683_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014685 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014686 ipv6type=$i;
14687 ipv6lib=v6;
14688 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014689 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014690fi
14691rm -f conftest*
14692
14693 ;;
14694 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014695 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014696/* confdefs.h. */
14697_ACEOF
14698cat confdefs.h >>conftest.$ac_ext
14699cat >>conftest.$ac_ext <<_ACEOF
14700/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014701
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014702#include <sys/param.h>
14703#ifdef _ZETA_MINAMI_INET6
14704yes
14705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014708 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014709 ipv6type=$i;
14710 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014711 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014712fi
14713rm -f conftest*
14714
14715 ;;
14716 esac
14717 if test "$ipv6type" != "unknown"; then
14718 break
14719 fi
14720 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000014721 { echo "$as_me:$LINENO: result: $ipv6type" >&5
14722echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014723fi
14724
14725if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14726 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14727 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14728 echo "using lib$ipv6lib"
14729 else
14730 if test $ipv6trylibc = "yes"; then
14731 echo "using libc"
14732 else
14733 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14734 echo "You need to fetch lib$ipv6lib.a from appropriate"
14735 echo 'ipv6 kit and compile beforehand.'
14736 exit 1
14737 fi
14738 fi
14739fi
14740
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014741# Check for --with-doc-strings
Thomas Wouters477c8d52006-05-27 19:21:47 +000014742{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14743echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014744
Thomas Wouters477c8d52006-05-27 19:21:47 +000014745# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014746if test "${with_doc_strings+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014747 withval=$with_doc_strings;
14748fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014749
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014750
14751if test -z "$with_doc_strings"
14752then with_doc_strings="yes"
14753fi
14754if test "$with_doc_strings" != "no"
14755then
14756
14757cat >>confdefs.h <<\_ACEOF
14758#define WITH_DOC_STRINGS 1
14759_ACEOF
14760
14761fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014762{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14763echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014764
Neil Schemenauera35c6882001-02-27 04:45:05 +000014765# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000014766{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
14767echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014768
Thomas Wouters477c8d52006-05-27 19:21:47 +000014769# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014770if test "${with_tsc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014771 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014772if test "$withval" != no
14773then
14774
14775cat >>confdefs.h <<\_ACEOF
14776#define WITH_TSC 1
14777_ACEOF
14778
Thomas Wouters477c8d52006-05-27 19:21:47 +000014779 { echo "$as_me:$LINENO: result: yes" >&5
14780echo "${ECHO_T}yes" >&6; }
14781else { echo "$as_me:$LINENO: result: no" >&5
14782echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014783fi
14784else
Thomas Wouters477c8d52006-05-27 19:21:47 +000014785 { echo "$as_me:$LINENO: result: no" >&5
14786echo "${ECHO_T}no" >&6; }
14787fi
14788
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014789
14790# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000014791{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14792echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014793
Thomas Wouters477c8d52006-05-27 19:21:47 +000014794# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014795if test "${with_pymalloc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014796 withval=$with_pymalloc;
14797fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014798
Neil Schemenauera35c6882001-02-27 04:45:05 +000014799
Neil Schemenauer16c22972002-03-22 15:34:49 +000014800if test -z "$with_pymalloc"
14801then with_pymalloc="yes"
14802fi
14803if test "$with_pymalloc" != "no"
14804then
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
14806cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014807#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014808_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014809
14810fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014811{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14812echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000014813
Barry Warsawef82cd72000-06-30 16:21:01 +000014814# Check for --with-wctype-functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000014815{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14816echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Thomas Wouters477c8d52006-05-27 19:21:47 +000014818# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014819if test "${with_wctype_functions+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014820 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000014821if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014822then
14823
14824cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014825#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014826_ACEOF
14827
Thomas Wouters477c8d52006-05-27 19:21:47 +000014828 { echo "$as_me:$LINENO: result: yes" >&5
14829echo "${ECHO_T}yes" >&6; }
14830else { echo "$as_me:$LINENO: result: no" >&5
14831echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000014832fi
14833else
Thomas Wouters477c8d52006-05-27 19:21:47 +000014834 { echo "$as_me:$LINENO: result: no" >&5
14835echo "${ECHO_T}no" >&6; }
14836fi
14837
Barry Warsawef82cd72000-06-30 16:21:01 +000014838
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014839# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000014840
Guido van Rossum98935bf2001-09-05 19:13:16 +000014841DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000014842
Guido van Rossume97ee181999-12-20 21:27:22 +000014843# the dlopen() function means we might want to use dynload_shlib.o. some
14844# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
Thomas Wouters3a584202000-08-05 23:28:51 +000014846for ac_func in dlopen
14847do
Martin v. Löwis11437992002-04-12 09:54:03 +000014848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000014849{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14851if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014853else
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014855/* confdefs.h. */
14856_ACEOF
14857cat confdefs.h >>conftest.$ac_ext
14858cat >>conftest.$ac_ext <<_ACEOF
14859/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14862#define $ac_func innocuous_$ac_func
14863
Guido van Rossume97ee181999-12-20 21:27:22 +000014864/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014865 which can conflict with char $ac_func (); below.
14866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014867 <limits.h> exists even on freestanding compilers. */
14868
14869#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014870# include <limits.h>
14871#else
14872# include <assert.h>
14873#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014874
14875#undef $ac_func
14876
Thomas Wouters477c8d52006-05-27 19:21:47 +000014877/* Override any GCC internal prototype to avoid an error.
14878 Use char because int might match the return type of a GCC
14879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014880#ifdef __cplusplus
14881extern "C"
14882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014883char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000014884/* The GNU C library defines this for functions which it implements
14885 to always fail with ENOSYS. Some functions are actually named
14886 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000014887#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000014888choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000014889#endif
14890
Skip Montanaro6dead952003-09-25 14:50:04 +000014891int
14892main ()
14893{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014894return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ;
14896 return 0;
14897}
14898_ACEOF
14899rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014900if { (ac_try="$ac_link"
14901case "(($ac_try" in
14902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14903 *) ac_try_echo=$ac_try;;
14904esac
14905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14906 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014908 grep -v '^ *+' conftest.er1 >conftest.err
14909 rm -f conftest.er1
14910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000014912 (exit $ac_status); } && {
14913 test -z "$ac_c_werror_flag" ||
14914 test ! -s conftest.err
14915 } && test -s conftest$ac_exeext &&
14916 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014920sed 's/^/| /' conftest.$ac_ext >&5
14921
Thomas Wouters477c8d52006-05-27 19:21:47 +000014922 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014923fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014924
Thomas Wouters89f507f2006-12-13 04:49:30 +000014925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014926 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014927fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014928ac_res=`eval echo '${'$as_ac_var'}'`
14929 { echo "$as_me:$LINENO: result: $ac_res" >&5
14930echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014931if test `eval echo '${'$as_ac_var'}'` = yes; then
14932 cat >>confdefs.h <<_ACEOF
14933#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14934_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014935
Guido van Rossume97ee181999-12-20 21:27:22 +000014936fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014937done
Guido van Rossume97ee181999-12-20 21:27:22 +000014938
Michael W. Hudson54241132001-12-07 15:38:26 +000014939
Guido van Rossume97ee181999-12-20 21:27:22 +000014940# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
14941# loading of modules.
14942
Thomas Wouters477c8d52006-05-27 19:21:47 +000014943{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
14944echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000014945if test -z "$DYNLOADFILE"
14946then
14947 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000014948 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
14949 if test "$ac_cv_func_dlopen" = yes
14950 then DYNLOADFILE="dynload_shlib.o"
14951 else DYNLOADFILE="dynload_aix.o"
14952 fi
14953 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000014954 BeOS*) DYNLOADFILE="dynload_beos.o";;
14955 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014956 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
14957 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014958 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000014959 *)
14960 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
14961 # out any dynamic loading
14962 if test "$ac_cv_func_dlopen" = yes
14963 then DYNLOADFILE="dynload_shlib.o"
14964 else DYNLOADFILE="dynload_stub.o"
14965 fi
14966 ;;
14967 esac
14968fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014969{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
14970echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000014971if test "$DYNLOADFILE" != "dynload_stub.o"
14972then
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
14974cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014975#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014976_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014977
14978fi
14979
Neil Schemenauer4e425612001-06-19 15:44:15 +000014980# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14981
Michael W. Hudson54241132001-12-07 15:38:26 +000014982
Thomas Wouters477c8d52006-05-27 19:21:47 +000014983{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14984echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000014985if test -z "$MACHDEP_OBJS"
14986then
Jack Jansene578a632001-08-15 01:27:14 +000014987 MACHDEP_OBJS=$extra_machdep_objs
14988else
14989 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014990fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014991{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14992echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000014993
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
Martin v. Löwisd6320502004-08-12 13:45:08 +000015066
Martin v. Löwisc3001752005-01-23 09:27:24 +000015067
15068
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015069
15070
Thomas Wouterscf297e42007-02-23 15:07:44 +000015071
15072
15073for ac_func in alarm bind_textdomain_codeset chflags chown clock confstr \
15074 ctermid execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015075 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015076 getpriority getpwent getspnam getspent getsid getwd \
Thomas Wouterscf297e42007-02-23 15:07:44 +000015077 kill killpg lchflags lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015078 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015079 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015080 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015081 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015082 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015083 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015084 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015085do
Martin v. Löwis11437992002-04-12 09:54:03 +000015086as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000015087{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15088echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15089if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015091else
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* confdefs.h. */
15094_ACEOF
15095cat confdefs.h >>conftest.$ac_ext
15096cat >>conftest.$ac_ext <<_ACEOF
15097/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015098/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15100#define $ac_func innocuous_$ac_func
15101
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015102/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015103 which can conflict with char $ac_func (); below.
15104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015105 <limits.h> exists even on freestanding compilers. */
15106
15107#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015108# include <limits.h>
15109#else
15110# include <assert.h>
15111#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015112
15113#undef $ac_func
15114
Thomas Wouters477c8d52006-05-27 19:21:47 +000015115/* Override any GCC internal prototype to avoid an error.
15116 Use char because int might match the return type of a GCC
15117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118#ifdef __cplusplus
15119extern "C"
15120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015121char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015122/* The GNU C library defines this for functions which it implements
15123 to always fail with ENOSYS. Some functions are actually named
15124 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000015125#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015126choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015127#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015128
Skip Montanaro6dead952003-09-25 14:50:04 +000015129int
15130main ()
15131{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015132return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
15137rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015138if { (ac_try="$ac_link"
15139case "(($ac_try" in
15140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15141 *) ac_try_echo=$ac_try;;
15142esac
15143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015146 grep -v '^ *+' conftest.er1 >conftest.err
15147 rm -f conftest.er1
15148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015150 (exit $ac_status); } && {
15151 test -z "$ac_c_werror_flag" ||
15152 test ! -s conftest.err
15153 } && test -s conftest$ac_exeext &&
15154 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015156else
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015158sed 's/^/| /' conftest.$ac_ext >&5
15159
Thomas Wouters477c8d52006-05-27 19:21:47 +000015160 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015161fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015162
Thomas Wouters89f507f2006-12-13 04:49:30 +000015163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015164 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015165fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015166ac_res=`eval echo '${'$as_ac_var'}'`
15167 { echo "$as_me:$LINENO: result: $ac_res" >&5
15168echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015169if test `eval echo '${'$as_ac_var'}'` = yes; then
15170 cat >>confdefs.h <<_ACEOF
15171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15172_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015173
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015174fi
15175done
15176
Michael W. Hudson54241132001-12-07 15:38:26 +000015177
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015178# For some functions, having a definition is not sufficient, since
15179# we want to take their address.
Thomas Wouters477c8d52006-05-27 19:21:47 +000015180{ echo "$as_me:$LINENO: checking for chroot" >&5
15181echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015183/* confdefs.h. */
15184_ACEOF
15185cat confdefs.h >>conftest.$ac_ext
15186cat >>conftest.$ac_ext <<_ACEOF
15187/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015188#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015189int
15190main ()
15191{
15192void *x=chroot
15193 ;
15194 return 0;
15195}
15196_ACEOF
15197rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015198if { (ac_try="$ac_compile"
15199case "(($ac_try" in
15200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15201 *) ac_try_echo=$ac_try;;
15202esac
15203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015206 grep -v '^ *+' conftest.er1 >conftest.err
15207 rm -f conftest.er1
15208 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015210 (exit $ac_status); } && {
15211 test -z "$ac_c_werror_flag" ||
15212 test ! -s conftest.err
15213 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015214
15215cat >>confdefs.h <<\_ACEOF
15216#define HAVE_CHROOT 1
15217_ACEOF
15218
Thomas Wouters477c8d52006-05-27 19:21:47 +000015219 { echo "$as_me:$LINENO: result: yes" >&5
15220echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015221else
15222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Thomas Wouters477c8d52006-05-27 19:21:47 +000015225 { echo "$as_me:$LINENO: result: no" >&5
15226echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015227
15228fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015229
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015231{ echo "$as_me:$LINENO: checking for link" >&5
15232echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015234/* confdefs.h. */
15235_ACEOF
15236cat confdefs.h >>conftest.$ac_ext
15237cat >>conftest.$ac_ext <<_ACEOF
15238/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015239#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015240int
15241main ()
15242{
15243void *x=link
15244 ;
15245 return 0;
15246}
15247_ACEOF
15248rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015249if { (ac_try="$ac_compile"
15250case "(($ac_try" in
15251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15252 *) ac_try_echo=$ac_try;;
15253esac
15254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015257 grep -v '^ *+' conftest.er1 >conftest.err
15258 rm -f conftest.er1
15259 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015261 (exit $ac_status); } && {
15262 test -z "$ac_c_werror_flag" ||
15263 test ! -s conftest.err
15264 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015265
15266cat >>confdefs.h <<\_ACEOF
15267#define HAVE_LINK 1
15268_ACEOF
15269
Thomas Wouters477c8d52006-05-27 19:21:47 +000015270 { echo "$as_me:$LINENO: result: yes" >&5
15271echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015272else
15273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015274sed 's/^/| /' conftest.$ac_ext >&5
15275
Thomas Wouters477c8d52006-05-27 19:21:47 +000015276 { echo "$as_me:$LINENO: result: no" >&5
15277echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015278
15279fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015280
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015282{ echo "$as_me:$LINENO: checking for symlink" >&5
15283echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015285/* confdefs.h. */
15286_ACEOF
15287cat confdefs.h >>conftest.$ac_ext
15288cat >>conftest.$ac_ext <<_ACEOF
15289/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015290#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015291int
15292main ()
15293{
15294void *x=symlink
15295 ;
15296 return 0;
15297}
15298_ACEOF
15299rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015300if { (ac_try="$ac_compile"
15301case "(($ac_try" in
15302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15303 *) ac_try_echo=$ac_try;;
15304esac
15305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015308 grep -v '^ *+' conftest.er1 >conftest.err
15309 rm -f conftest.er1
15310 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015312 (exit $ac_status); } && {
15313 test -z "$ac_c_werror_flag" ||
15314 test ! -s conftest.err
15315 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015316
15317cat >>confdefs.h <<\_ACEOF
15318#define HAVE_SYMLINK 1
15319_ACEOF
15320
Thomas Wouters477c8d52006-05-27 19:21:47 +000015321 { echo "$as_me:$LINENO: result: yes" >&5
15322echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015323else
15324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015325sed 's/^/| /' conftest.$ac_ext >&5
15326
Thomas Wouters477c8d52006-05-27 19:21:47 +000015327 { echo "$as_me:$LINENO: result: no" >&5
15328echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015329
15330fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015331
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015333{ echo "$as_me:$LINENO: checking for fchdir" >&5
15334echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015336/* confdefs.h. */
15337_ACEOF
15338cat confdefs.h >>conftest.$ac_ext
15339cat >>conftest.$ac_ext <<_ACEOF
15340/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015341#include <unistd.h>
15342int
15343main ()
15344{
15345void *x=fchdir
15346 ;
15347 return 0;
15348}
15349_ACEOF
15350rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015351if { (ac_try="$ac_compile"
15352case "(($ac_try" in
15353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15354 *) ac_try_echo=$ac_try;;
15355esac
15356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015359 grep -v '^ *+' conftest.er1 >conftest.err
15360 rm -f conftest.er1
15361 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015363 (exit $ac_status); } && {
15364 test -z "$ac_c_werror_flag" ||
15365 test ! -s conftest.err
15366 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015367
15368cat >>confdefs.h <<\_ACEOF
15369#define HAVE_FCHDIR 1
15370_ACEOF
15371
Thomas Wouters477c8d52006-05-27 19:21:47 +000015372 { echo "$as_me:$LINENO: result: yes" >&5
15373echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015374else
15375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015376sed 's/^/| /' conftest.$ac_ext >&5
15377
Thomas Wouters477c8d52006-05-27 19:21:47 +000015378 { echo "$as_me:$LINENO: result: no" >&5
15379echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015380
15381fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015382
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015384{ echo "$as_me:$LINENO: checking for fsync" >&5
15385echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015386cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015387/* confdefs.h. */
15388_ACEOF
15389cat confdefs.h >>conftest.$ac_ext
15390cat >>conftest.$ac_ext <<_ACEOF
15391/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015392#include <unistd.h>
15393int
15394main ()
15395{
15396void *x=fsync
15397 ;
15398 return 0;
15399}
15400_ACEOF
15401rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015402if { (ac_try="$ac_compile"
15403case "(($ac_try" in
15404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15405 *) ac_try_echo=$ac_try;;
15406esac
15407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015410 grep -v '^ *+' conftest.er1 >conftest.err
15411 rm -f conftest.er1
15412 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015414 (exit $ac_status); } && {
15415 test -z "$ac_c_werror_flag" ||
15416 test ! -s conftest.err
15417 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015418
15419cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015420#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015421_ACEOF
15422
Thomas Wouters477c8d52006-05-27 19:21:47 +000015423 { echo "$as_me:$LINENO: result: yes" >&5
15424echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015425else
15426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015427sed 's/^/| /' conftest.$ac_ext >&5
15428
Thomas Wouters477c8d52006-05-27 19:21:47 +000015429 { echo "$as_me:$LINENO: result: no" >&5
15430echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015431
15432fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015433
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015435{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15436echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015438/* confdefs.h. */
15439_ACEOF
15440cat confdefs.h >>conftest.$ac_ext
15441cat >>conftest.$ac_ext <<_ACEOF
15442/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015443#include <unistd.h>
15444int
15445main ()
15446{
15447void *x=fdatasync
15448 ;
15449 return 0;
15450}
15451_ACEOF
15452rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015453if { (ac_try="$ac_compile"
15454case "(($ac_try" in
15455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15456 *) ac_try_echo=$ac_try;;
15457esac
15458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015461 grep -v '^ *+' conftest.er1 >conftest.err
15462 rm -f conftest.er1
15463 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015465 (exit $ac_status); } && {
15466 test -z "$ac_c_werror_flag" ||
15467 test ! -s conftest.err
15468 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015469
15470cat >>confdefs.h <<\_ACEOF
15471#define HAVE_FDATASYNC 1
15472_ACEOF
15473
Thomas Wouters477c8d52006-05-27 19:21:47 +000015474 { echo "$as_me:$LINENO: result: yes" >&5
15475echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015476else
15477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015478sed 's/^/| /' conftest.$ac_ext >&5
15479
Thomas Wouters477c8d52006-05-27 19:21:47 +000015480 { echo "$as_me:$LINENO: result: no" >&5
15481echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015482
15483fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015484
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015486
Martin v. Löwisd5843682002-11-21 20:41:28 +000015487# On some systems (eg. FreeBSD 5), we would find a definition of the
15488# functions ctermid_r, setgroups in the library, but no prototype
15489# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15490# address to avoid compiler warnings and potential miscompilations
15491# because of the missing prototypes.
15492
Thomas Wouters477c8d52006-05-27 19:21:47 +000015493{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15494echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015496/* confdefs.h. */
15497_ACEOF
15498cat confdefs.h >>conftest.$ac_ext
15499cat >>conftest.$ac_ext <<_ACEOF
15500/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015501
15502#include "confdefs.h"
15503#include <stdio.h>
15504
Martin v. Löwisd5843682002-11-21 20:41:28 +000015505int
15506main ()
15507{
15508void* p = ctermid_r
15509 ;
15510 return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015514if { (ac_try="$ac_compile"
15515case "(($ac_try" in
15516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15517 *) ac_try_echo=$ac_try;;
15518esac
15519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015522 grep -v '^ *+' conftest.er1 >conftest.err
15523 rm -f conftest.er1
15524 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015526 (exit $ac_status); } && {
15527 test -z "$ac_c_werror_flag" ||
15528 test ! -s conftest.err
15529 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015530
15531cat >>confdefs.h <<\_ACEOF
15532#define HAVE_CTERMID_R 1
15533_ACEOF
15534
Thomas Wouters477c8d52006-05-27 19:21:47 +000015535 { echo "$as_me:$LINENO: result: yes" >&5
15536echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015537else
15538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015539sed 's/^/| /' conftest.$ac_ext >&5
15540
Thomas Wouters477c8d52006-05-27 19:21:47 +000015541 { echo "$as_me:$LINENO: result: no" >&5
15542echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015543
15544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015545
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015547
Thomas Wouters477c8d52006-05-27 19:21:47 +000015548{ echo "$as_me:$LINENO: checking for flock" >&5
15549echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015551/* confdefs.h. */
15552_ACEOF
15553cat confdefs.h >>conftest.$ac_ext
15554cat >>conftest.$ac_ext <<_ACEOF
15555/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015556
15557#include "confdefs.h"
15558#include <sys/file.h>
15559
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015560int
15561main ()
15562{
15563void* p = flock
15564 ;
15565 return 0;
15566}
15567_ACEOF
15568rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015569if { (ac_try="$ac_compile"
15570case "(($ac_try" in
15571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15572 *) ac_try_echo=$ac_try;;
15573esac
15574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015577 grep -v '^ *+' conftest.er1 >conftest.err
15578 rm -f conftest.er1
15579 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015581 (exit $ac_status); } && {
15582 test -z "$ac_c_werror_flag" ||
15583 test ! -s conftest.err
15584 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015585
15586cat >>confdefs.h <<\_ACEOF
15587#define HAVE_FLOCK 1
15588_ACEOF
15589
Thomas Wouters477c8d52006-05-27 19:21:47 +000015590 { echo "$as_me:$LINENO: result: yes" >&5
15591echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015592else
15593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015594sed 's/^/| /' conftest.$ac_ext >&5
15595
Thomas Wouters477c8d52006-05-27 19:21:47 +000015596 { echo "$as_me:$LINENO: result: no" >&5
15597echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015598
15599fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015600
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015602
Thomas Wouters477c8d52006-05-27 19:21:47 +000015603{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15604echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015611
15612#include "confdefs.h"
15613#include <unistd.h>
15614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015615int
15616main ()
15617{
15618void* p = getpagesize
15619 ;
15620 return 0;
15621}
15622_ACEOF
15623rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015624if { (ac_try="$ac_compile"
15625case "(($ac_try" in
15626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15627 *) ac_try_echo=$ac_try;;
15628esac
15629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015632 grep -v '^ *+' conftest.er1 >conftest.err
15633 rm -f conftest.er1
15634 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015636 (exit $ac_status); } && {
15637 test -z "$ac_c_werror_flag" ||
15638 test ! -s conftest.err
15639 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015640
15641cat >>confdefs.h <<\_ACEOF
15642#define HAVE_GETPAGESIZE 1
15643_ACEOF
15644
Thomas Wouters477c8d52006-05-27 19:21:47 +000015645 { echo "$as_me:$LINENO: result: yes" >&5
15646echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015647else
15648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015649sed 's/^/| /' conftest.$ac_ext >&5
15650
Thomas Wouters477c8d52006-05-27 19:21:47 +000015651 { echo "$as_me:$LINENO: result: no" >&5
15652echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015653
15654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015655
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015657
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015658for ac_prog in true
15659do
15660 # Extract the first word of "$ac_prog", so it can be a program name with args.
15661set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +000015662{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015664if test "${ac_cv_prog_TRUE+set}" = set; then
15665 echo $ECHO_N "(cached) $ECHO_C" >&6
15666else
15667 if test -n "$TRUE"; then
15668 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15669else
15670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15671for as_dir in $PATH
15672do
15673 IFS=$as_save_IFS
15674 test -z "$as_dir" && as_dir=.
15675 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters89f507f2006-12-13 04:49:30 +000015676 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 ac_cv_prog_TRUE="$ac_prog"
15678 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15679 break 2
15680 fi
15681done
15682done
Thomas Wouters477c8d52006-05-27 19:21:47 +000015683IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015684
15685fi
15686fi
15687TRUE=$ac_cv_prog_TRUE
15688if test -n "$TRUE"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015689 { echo "$as_me:$LINENO: result: $TRUE" >&5
15690echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015691else
Thomas Wouters477c8d52006-05-27 19:21:47 +000015692 { echo "$as_me:$LINENO: result: no" >&5
15693echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015694fi
15695
Thomas Wouters477c8d52006-05-27 19:21:47 +000015696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015697 test -n "$TRUE" && break
15698done
15699test -n "$TRUE" || TRUE="/bin/true"
15700
15701
Thomas Wouters477c8d52006-05-27 19:21:47 +000015702{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15703echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015704if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15705 echo $ECHO_N "(cached) $ECHO_C" >&6
15706else
15707 ac_check_lib_save_LIBS=$LIBS
15708LIBS="-lc $LIBS"
15709cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015710/* confdefs.h. */
15711_ACEOF
15712cat confdefs.h >>conftest.$ac_ext
15713cat >>conftest.$ac_ext <<_ACEOF
15714/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015715
Thomas Wouters477c8d52006-05-27 19:21:47 +000015716/* Override any GCC internal prototype to avoid an error.
15717 Use char because int might match the return type of a GCC
15718 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015719#ifdef __cplusplus
15720extern "C"
15721#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015722char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015723int
15724main ()
15725{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015726return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015727 ;
15728 return 0;
15729}
15730_ACEOF
15731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015732if { (ac_try="$ac_link"
15733case "(($ac_try" in
15734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15735 *) ac_try_echo=$ac_try;;
15736esac
15737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015740 grep -v '^ *+' conftest.er1 >conftest.err
15741 rm -f conftest.er1
15742 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015744 (exit $ac_status); } && {
15745 test -z "$ac_c_werror_flag" ||
15746 test ! -s conftest.err
15747 } && test -s conftest$ac_exeext &&
15748 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015749 ac_cv_lib_c_inet_aton=yes
15750else
15751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015752sed 's/^/| /' conftest.$ac_ext >&5
15753
Thomas Wouters477c8d52006-05-27 19:21:47 +000015754 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015755fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756
Thomas Wouters89f507f2006-12-13 04:49:30 +000015757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015759LIBS=$ac_check_lib_save_LIBS
15760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015761{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15762echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015763if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015764 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015765else
15766
Thomas Wouters477c8d52006-05-27 19:21:47 +000015767{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15768echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015769if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15770 echo $ECHO_N "(cached) $ECHO_C" >&6
15771else
15772 ac_check_lib_save_LIBS=$LIBS
15773LIBS="-lresolv $LIBS"
15774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015780
Thomas Wouters477c8d52006-05-27 19:21:47 +000015781/* Override any GCC internal prototype to avoid an error.
15782 Use char because int might match the return type of a GCC
15783 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015784#ifdef __cplusplus
15785extern "C"
15786#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015787char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015788int
15789main ()
15790{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015791return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015792 ;
15793 return 0;
15794}
15795_ACEOF
15796rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015797if { (ac_try="$ac_link"
15798case "(($ac_try" in
15799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15800 *) ac_try_echo=$ac_try;;
15801esac
15802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015805 grep -v '^ *+' conftest.er1 >conftest.err
15806 rm -f conftest.er1
15807 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015809 (exit $ac_status); } && {
15810 test -z "$ac_c_werror_flag" ||
15811 test ! -s conftest.err
15812 } && test -s conftest$ac_exeext &&
15813 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015814 ac_cv_lib_resolv_inet_aton=yes
15815else
15816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015817sed 's/^/| /' conftest.$ac_ext >&5
15818
Thomas Wouters477c8d52006-05-27 19:21:47 +000015819 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015820fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015821
Thomas Wouters89f507f2006-12-13 04:49:30 +000015822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015824LIBS=$ac_check_lib_save_LIBS
15825fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015826{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15827echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015828if test $ac_cv_lib_resolv_inet_aton = yes; then
15829 cat >>confdefs.h <<_ACEOF
15830#define HAVE_LIBRESOLV 1
15831_ACEOF
15832
15833 LIBS="-lresolv $LIBS"
15834
15835fi
15836
15837
15838fi
15839
15840
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015841case $ac_sys_system/$ac_sys_release in
15842Darwin/*)
15843 _CUR_CFLAGS="${CFLAGS}"
15844 _CUR_LDFLAGS="${LDFLAGS}"
15845 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
15846 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
15847 ;;
15848esac
15849
15850{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
15851echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
15852if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
15853 echo $ECHO_N "(cached) $ECHO_C" >&6
15854else
15855 ac_check_lib_save_LIBS=$LIBS
15856LIBS="-lz $LIBS"
15857cat >conftest.$ac_ext <<_ACEOF
15858/* confdefs.h. */
15859_ACEOF
15860cat confdefs.h >>conftest.$ac_ext
15861cat >>conftest.$ac_ext <<_ACEOF
15862/* end confdefs.h. */
15863
15864/* Override any GCC internal prototype to avoid an error.
15865 Use char because int might match the return type of a GCC
15866 builtin and then its argument prototype would still apply. */
15867#ifdef __cplusplus
15868extern "C"
15869#endif
15870char inflateCopy ();
15871int
15872main ()
15873{
15874return inflateCopy ();
15875 ;
15876 return 0;
15877}
15878_ACEOF
15879rm -f conftest.$ac_objext conftest$ac_exeext
15880if { (ac_try="$ac_link"
15881case "(($ac_try" in
15882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15883 *) ac_try_echo=$ac_try;;
15884esac
15885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15886 (eval "$ac_link") 2>conftest.er1
15887 ac_status=$?
15888 grep -v '^ *+' conftest.er1 >conftest.err
15889 rm -f conftest.er1
15890 cat conftest.err >&5
15891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015892 (exit $ac_status); } && {
15893 test -z "$ac_c_werror_flag" ||
15894 test ! -s conftest.err
15895 } && test -s conftest$ac_exeext &&
15896 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015897 ac_cv_lib_z_inflateCopy=yes
15898else
15899 echo "$as_me: failed program was:" >&5
15900sed 's/^/| /' conftest.$ac_ext >&5
15901
15902 ac_cv_lib_z_inflateCopy=no
15903fi
15904
Thomas Wouters89f507f2006-12-13 04:49:30 +000015905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015906 conftest$ac_exeext conftest.$ac_ext
15907LIBS=$ac_check_lib_save_LIBS
15908fi
15909{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
15910echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
15911if test $ac_cv_lib_z_inflateCopy = yes; then
15912
15913cat >>confdefs.h <<\_ACEOF
15914#define HAVE_ZLIB_COPY 1
15915_ACEOF
15916
15917fi
15918
15919
15920case $ac_sys_system/$ac_sys_release in
15921Darwin/*)
15922 CFLAGS="${_CUR_CFLAGS}"
15923 LDFLAGS="${_CUR_LDFLAGS}"
15924 ;;
15925esac
15926
Thomas Wouters477c8d52006-05-27 19:21:47 +000015927{ echo "$as_me:$LINENO: checking for hstrerror" >&5
15928echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000015929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015935
15936#include "confdefs.h"
15937#include <netdb.h>
15938
Martin v. Löwise9416172003-05-03 10:12:45 +000015939int
15940main ()
15941{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015942void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015943 ;
15944 return 0;
15945}
15946_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015947rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015948if { (ac_try="$ac_link"
15949case "(($ac_try" in
15950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15951 *) ac_try_echo=$ac_try;;
15952esac
15953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015956 grep -v '^ *+' conftest.er1 >conftest.err
15957 rm -f conftest.er1
15958 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000015960 (exit $ac_status); } && {
15961 test -z "$ac_c_werror_flag" ||
15962 test ! -s conftest.err
15963 } && test -s conftest$ac_exeext &&
15964 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015965
15966cat >>confdefs.h <<\_ACEOF
15967#define HAVE_HSTRERROR 1
15968_ACEOF
15969
Thomas Wouters477c8d52006-05-27 19:21:47 +000015970 { echo "$as_me:$LINENO: result: yes" >&5
15971echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000015972else
15973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015974sed 's/^/| /' conftest.$ac_ext >&5
15975
Thomas Wouters477c8d52006-05-27 19:21:47 +000015976 { echo "$as_me:$LINENO: result: no" >&5
15977echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000015978
15979fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015980
Thomas Wouters89f507f2006-12-13 04:49:30 +000015981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015983
Thomas Wouters477c8d52006-05-27 19:21:47 +000015984{ echo "$as_me:$LINENO: checking for inet_aton" >&5
15985echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000015986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015987/* confdefs.h. */
15988_ACEOF
15989cat confdefs.h >>conftest.$ac_ext
15990cat >>conftest.$ac_ext <<_ACEOF
15991/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015992
15993#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000015994#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015995#include <sys/socket.h>
15996#include <netinet/in.h>
15997#include <arpa/inet.h>
15998
Martin v. Löwise9416172003-05-03 10:12:45 +000015999int
16000main ()
16001{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016002void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016003 ;
16004 return 0;
16005}
16006_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016007rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016008if { (ac_try="$ac_link"
16009case "(($ac_try" in
16010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16011 *) ac_try_echo=$ac_try;;
16012esac
16013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16014 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016016 grep -v '^ *+' conftest.er1 >conftest.err
16017 rm -f conftest.er1
16018 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016020 (exit $ac_status); } && {
16021 test -z "$ac_c_werror_flag" ||
16022 test ! -s conftest.err
16023 } && test -s conftest$ac_exeext &&
16024 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016025
16026cat >>confdefs.h <<\_ACEOF
16027#define HAVE_INET_ATON 1
16028_ACEOF
16029
Thomas Wouters477c8d52006-05-27 19:21:47 +000016030 { echo "$as_me:$LINENO: result: yes" >&5
16031echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016032else
16033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016034sed 's/^/| /' conftest.$ac_ext >&5
16035
Thomas Wouters477c8d52006-05-27 19:21:47 +000016036 { echo "$as_me:$LINENO: result: no" >&5
16037echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016038
16039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016040
Thomas Wouters89f507f2006-12-13 04:49:30 +000016041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016043
Thomas Wouters477c8d52006-05-27 19:21:47 +000016044{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16045echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016047/* confdefs.h. */
16048_ACEOF
16049cat confdefs.h >>conftest.$ac_ext
16050cat >>conftest.$ac_ext <<_ACEOF
16051/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016052
16053#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016054#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016055#include <sys/socket.h>
16056#include <netinet/in.h>
16057#include <arpa/inet.h>
16058
Martin v. Löwise9416172003-05-03 10:12:45 +000016059int
16060main ()
16061{
16062void* p = inet_pton
16063 ;
16064 return 0;
16065}
16066_ACEOF
16067rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016068if { (ac_try="$ac_compile"
16069case "(($ac_try" in
16070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16071 *) ac_try_echo=$ac_try;;
16072esac
16073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016076 grep -v '^ *+' conftest.er1 >conftest.err
16077 rm -f conftest.er1
16078 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016080 (exit $ac_status); } && {
16081 test -z "$ac_c_werror_flag" ||
16082 test ! -s conftest.err
16083 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016084
16085cat >>confdefs.h <<\_ACEOF
16086#define HAVE_INET_PTON 1
16087_ACEOF
16088
Thomas Wouters477c8d52006-05-27 19:21:47 +000016089 { echo "$as_me:$LINENO: result: yes" >&5
16090echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016091else
16092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016093sed 's/^/| /' conftest.$ac_ext >&5
16094
Thomas Wouters477c8d52006-05-27 19:21:47 +000016095 { echo "$as_me:$LINENO: result: no" >&5
16096echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016097
16098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016099
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016101
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016102# On some systems, setgroups is in unistd.h, on others, in grp.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000016103{ echo "$as_me:$LINENO: checking for setgroups" >&5
16104echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016106/* confdefs.h. */
16107_ACEOF
16108cat confdefs.h >>conftest.$ac_ext
16109cat >>conftest.$ac_ext <<_ACEOF
16110/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016111
16112#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016113#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016114#ifdef HAVE_GRP_H
16115#include <grp.h>
16116#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016117
Martin v. Löwisd5843682002-11-21 20:41:28 +000016118int
16119main ()
16120{
16121void* p = setgroups
16122 ;
16123 return 0;
16124}
16125_ACEOF
16126rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016127if { (ac_try="$ac_compile"
16128case "(($ac_try" in
16129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16130 *) ac_try_echo=$ac_try;;
16131esac
16132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016135 grep -v '^ *+' conftest.er1 >conftest.err
16136 rm -f conftest.er1
16137 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016139 (exit $ac_status); } && {
16140 test -z "$ac_c_werror_flag" ||
16141 test ! -s conftest.err
16142 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016143
16144cat >>confdefs.h <<\_ACEOF
16145#define HAVE_SETGROUPS 1
16146_ACEOF
16147
Thomas Wouters477c8d52006-05-27 19:21:47 +000016148 { echo "$as_me:$LINENO: result: yes" >&5
16149echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016150else
16151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016152sed 's/^/| /' conftest.$ac_ext >&5
16153
Thomas Wouters477c8d52006-05-27 19:21:47 +000016154 { echo "$as_me:$LINENO: result: no" >&5
16155echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016156
16157fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016158
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016161# check for openpty and forkpty
16162
Martin v. Löwis11437992002-04-12 09:54:03 +000016163
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016164for ac_func in openpty
16165do
Martin v. Löwis11437992002-04-12 09:54:03 +000016166as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016167{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16169if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016171else
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016173/* confdefs.h. */
16174_ACEOF
16175cat confdefs.h >>conftest.$ac_ext
16176cat >>conftest.$ac_ext <<_ACEOF
16177/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016178/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16180#define $ac_func innocuous_$ac_func
16181
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016182/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016183 which can conflict with char $ac_func (); below.
16184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016185 <limits.h> exists even on freestanding compilers. */
16186
16187#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016188# include <limits.h>
16189#else
16190# include <assert.h>
16191#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016192
16193#undef $ac_func
16194
Thomas Wouters477c8d52006-05-27 19:21:47 +000016195/* Override any GCC internal prototype to avoid an error.
16196 Use char because int might match the return type of a GCC
16197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016198#ifdef __cplusplus
16199extern "C"
16200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016201char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016202/* The GNU C library defines this for functions which it implements
16203 to always fail with ENOSYS. Some functions are actually named
16204 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016205#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016206choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016207#endif
16208
Skip Montanaro6dead952003-09-25 14:50:04 +000016209int
16210main ()
16211{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016212return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 ;
16214 return 0;
16215}
16216_ACEOF
16217rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016218if { (ac_try="$ac_link"
16219case "(($ac_try" in
16220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16221 *) ac_try_echo=$ac_try;;
16222esac
16223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 grep -v '^ *+' conftest.er1 >conftest.err
16227 rm -f conftest.er1
16228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016230 (exit $ac_status); } && {
16231 test -z "$ac_c_werror_flag" ||
16232 test ! -s conftest.err
16233 } && test -s conftest$ac_exeext &&
16234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016236else
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016238sed 's/^/| /' conftest.$ac_ext >&5
16239
Thomas Wouters477c8d52006-05-27 19:21:47 +000016240 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016241fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016242
Thomas Wouters89f507f2006-12-13 04:49:30 +000016243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016245fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016246ac_res=`eval echo '${'$as_ac_var'}'`
16247 { echo "$as_me:$LINENO: result: $ac_res" >&5
16248echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016249if test `eval echo '${'$as_ac_var'}'` = yes; then
16250 cat >>confdefs.h <<_ACEOF
16251#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16252_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016253
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016254else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016255 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16256echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016257if test "${ac_cv_lib_util_openpty+set}" = set; then
16258 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016259else
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016261LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016268
Thomas Wouters477c8d52006-05-27 19:21:47 +000016269/* Override any GCC internal prototype to avoid an error.
16270 Use char because int might match the return type of a GCC
16271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016272#ifdef __cplusplus
16273extern "C"
16274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016275char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016276int
16277main ()
16278{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016279return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 ;
16281 return 0;
16282}
16283_ACEOF
16284rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016285if { (ac_try="$ac_link"
16286case "(($ac_try" in
16287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16288 *) ac_try_echo=$ac_try;;
16289esac
16290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016293 grep -v '^ *+' conftest.er1 >conftest.err
16294 rm -f conftest.er1
16295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016297 (exit $ac_status); } && {
16298 test -z "$ac_c_werror_flag" ||
16299 test ! -s conftest.err
16300 } && test -s conftest$ac_exeext &&
16301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016303else
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016305sed 's/^/| /' conftest.$ac_ext >&5
16306
Thomas Wouters477c8d52006-05-27 19:21:47 +000016307 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016308fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016309
Thomas Wouters89f507f2006-12-13 04:49:30 +000016310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016312LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016313fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016314{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16315echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016316if test $ac_cv_lib_util_openpty = yes; then
16317 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016318#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016319_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016320 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016321else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016322 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16323echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016324if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16325 echo $ECHO_N "(cached) $ECHO_C" >&6
16326else
16327 ac_check_lib_save_LIBS=$LIBS
16328LIBS="-lbsd $LIBS"
16329cat >conftest.$ac_ext <<_ACEOF
16330/* confdefs.h. */
16331_ACEOF
16332cat confdefs.h >>conftest.$ac_ext
16333cat >>conftest.$ac_ext <<_ACEOF
16334/* end confdefs.h. */
16335
Thomas Wouters477c8d52006-05-27 19:21:47 +000016336/* Override any GCC internal prototype to avoid an error.
16337 Use char because int might match the return type of a GCC
16338 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016339#ifdef __cplusplus
16340extern "C"
16341#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016342char openpty ();
16343int
16344main ()
16345{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016346return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016347 ;
16348 return 0;
16349}
16350_ACEOF
16351rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016352if { (ac_try="$ac_link"
16353case "(($ac_try" in
16354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16355 *) ac_try_echo=$ac_try;;
16356esac
16357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16358 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016359 ac_status=$?
16360 grep -v '^ *+' conftest.er1 >conftest.err
16361 rm -f conftest.er1
16362 cat conftest.err >&5
16363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016364 (exit $ac_status); } && {
16365 test -z "$ac_c_werror_flag" ||
16366 test ! -s conftest.err
16367 } && test -s conftest$ac_exeext &&
16368 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016369 ac_cv_lib_bsd_openpty=yes
16370else
16371 echo "$as_me: failed program was:" >&5
16372sed 's/^/| /' conftest.$ac_ext >&5
16373
Thomas Wouters477c8d52006-05-27 19:21:47 +000016374 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016375fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016376
Thomas Wouters89f507f2006-12-13 04:49:30 +000016377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016378 conftest$ac_exeext conftest.$ac_ext
16379LIBS=$ac_check_lib_save_LIBS
16380fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016381{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16382echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016383if test $ac_cv_lib_bsd_openpty = yes; then
16384 cat >>confdefs.h <<\_ACEOF
16385#define HAVE_OPENPTY 1
16386_ACEOF
16387 LIBS="$LIBS -lbsd"
16388fi
16389
16390
16391fi
16392
Fred Drake8cef4cf2000-06-28 16:40:38 +000016393
16394fi
16395done
16396
Martin v. Löwis11437992002-04-12 09:54:03 +000016397
Fred Drake8cef4cf2000-06-28 16:40:38 +000016398for ac_func in forkpty
16399do
Martin v. Löwis11437992002-04-12 09:54:03 +000016400as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016401{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16402echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16403if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016405else
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016407/* confdefs.h. */
16408_ACEOF
16409cat confdefs.h >>conftest.$ac_ext
16410cat >>conftest.$ac_ext <<_ACEOF
16411/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016412/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16413 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16414#define $ac_func innocuous_$ac_func
16415
Fred Drake8cef4cf2000-06-28 16:40:38 +000016416/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016417 which can conflict with char $ac_func (); below.
16418 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016419 <limits.h> exists even on freestanding compilers. */
16420
16421#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016422# include <limits.h>
16423#else
16424# include <assert.h>
16425#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016426
16427#undef $ac_func
16428
Thomas Wouters477c8d52006-05-27 19:21:47 +000016429/* Override any GCC internal prototype to avoid an error.
16430 Use char because int might match the return type of a GCC
16431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016432#ifdef __cplusplus
16433extern "C"
16434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016435char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016436/* The GNU C library defines this for functions which it implements
16437 to always fail with ENOSYS. Some functions are actually named
16438 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016439#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000016440choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000016441#endif
16442
Skip Montanaro6dead952003-09-25 14:50:04 +000016443int
16444main ()
16445{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016446return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 ;
16448 return 0;
16449}
16450_ACEOF
16451rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016452if { (ac_try="$ac_link"
16453case "(($ac_try" in
16454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16455 *) ac_try_echo=$ac_try;;
16456esac
16457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016460 grep -v '^ *+' conftest.er1 >conftest.err
16461 rm -f conftest.er1
16462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016464 (exit $ac_status); } && {
16465 test -z "$ac_c_werror_flag" ||
16466 test ! -s conftest.err
16467 } && test -s conftest$ac_exeext &&
16468 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016469 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016470else
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016472sed 's/^/| /' conftest.$ac_ext >&5
16473
Thomas Wouters477c8d52006-05-27 19:21:47 +000016474 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016476
Thomas Wouters89f507f2006-12-13 04:49:30 +000016477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016478 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016479fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016480ac_res=`eval echo '${'$as_ac_var'}'`
16481 { echo "$as_me:$LINENO: result: $ac_res" >&5
16482echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016483if test `eval echo '${'$as_ac_var'}'` = yes; then
16484 cat >>confdefs.h <<_ACEOF
16485#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16486_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016487
Fred Drake8cef4cf2000-06-28 16:40:38 +000016488else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016489 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16490echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016491if test "${ac_cv_lib_util_forkpty+set}" = set; then
16492 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016493else
Martin v. Löwis11437992002-04-12 09:54:03 +000016494 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016495LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016497/* confdefs.h. */
16498_ACEOF
16499cat confdefs.h >>conftest.$ac_ext
16500cat >>conftest.$ac_ext <<_ACEOF
16501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
Thomas Wouters477c8d52006-05-27 19:21:47 +000016503/* Override any GCC internal prototype to avoid an error.
16504 Use char because int might match the return type of a GCC
16505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016506#ifdef __cplusplus
16507extern "C"
16508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016509char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016510int
16511main ()
16512{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016513return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 ;
16515 return 0;
16516}
16517_ACEOF
16518rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016519if { (ac_try="$ac_link"
16520case "(($ac_try" in
16521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16522 *) ac_try_echo=$ac_try;;
16523esac
16524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16525 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 grep -v '^ *+' conftest.er1 >conftest.err
16528 rm -f conftest.er1
16529 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016531 (exit $ac_status); } && {
16532 test -z "$ac_c_werror_flag" ||
16533 test ! -s conftest.err
16534 } && test -s conftest$ac_exeext &&
16535 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016537else
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016539sed 's/^/| /' conftest.$ac_ext >&5
16540
Thomas Wouters477c8d52006-05-27 19:21:47 +000016541 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016542fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016543
Thomas Wouters89f507f2006-12-13 04:49:30 +000016544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016546LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016547fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016548{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16549echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016550if test $ac_cv_lib_util_forkpty = yes; then
16551 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016552#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016553_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016554 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016555else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016556 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16557echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016558if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16559 echo $ECHO_N "(cached) $ECHO_C" >&6
16560else
16561 ac_check_lib_save_LIBS=$LIBS
16562LIBS="-lbsd $LIBS"
16563cat >conftest.$ac_ext <<_ACEOF
16564/* confdefs.h. */
16565_ACEOF
16566cat confdefs.h >>conftest.$ac_ext
16567cat >>conftest.$ac_ext <<_ACEOF
16568/* end confdefs.h. */
16569
Thomas Wouters477c8d52006-05-27 19:21:47 +000016570/* Override any GCC internal prototype to avoid an error.
16571 Use char because int might match the return type of a GCC
16572 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016573#ifdef __cplusplus
16574extern "C"
16575#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016576char forkpty ();
16577int
16578main ()
16579{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016580return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016586if { (ac_try="$ac_link"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
16591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016593 ac_status=$?
16594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
16597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
16601 } && test -s conftest$ac_exeext &&
16602 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016603 ac_cv_lib_bsd_forkpty=yes
16604else
16605 echo "$as_me: failed program was:" >&5
16606sed 's/^/| /' conftest.$ac_ext >&5
16607
Thomas Wouters477c8d52006-05-27 19:21:47 +000016608 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016610
Thomas Wouters89f507f2006-12-13 04:49:30 +000016611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016612 conftest$ac_exeext conftest.$ac_ext
16613LIBS=$ac_check_lib_save_LIBS
16614fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016615{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16616echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016617if test $ac_cv_lib_bsd_forkpty = yes; then
16618 cat >>confdefs.h <<\_ACEOF
16619#define HAVE_FORKPTY 1
16620_ACEOF
16621 LIBS="$LIBS -lbsd"
16622fi
16623
16624
16625fi
16626
Fred Drake8cef4cf2000-06-28 16:40:38 +000016627
16628fi
16629done
16630
Jack Jansendd19cf82001-12-06 22:36:17 +000016631
Michael W. Hudson54241132001-12-07 15:38:26 +000016632# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016633
16634
16635
16636
16637
16638
Fred Drake8cef4cf2000-06-28 16:40:38 +000016639for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16640do
Martin v. Löwis11437992002-04-12 09:54:03 +000016641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016646else
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016648/* confdefs.h. */
16649_ACEOF
16650cat confdefs.h >>conftest.$ac_ext
16651cat >>conftest.$ac_ext <<_ACEOF
16652/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16655#define $ac_func innocuous_$ac_func
16656
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016657/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016658 which can conflict with char $ac_func (); below.
16659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016660 <limits.h> exists even on freestanding compilers. */
16661
16662#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016663# include <limits.h>
16664#else
16665# include <assert.h>
16666#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016667
16668#undef $ac_func
16669
Thomas Wouters477c8d52006-05-27 19:21:47 +000016670/* Override any GCC internal prototype to avoid an error.
16671 Use char because int might match the return type of a GCC
16672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016673#ifdef __cplusplus
16674extern "C"
16675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016676char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016677/* The GNU C library defines this for functions which it implements
16678 to always fail with ENOSYS. Some functions are actually named
16679 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016680#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016681choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016682#endif
16683
Skip Montanaro6dead952003-09-25 14:50:04 +000016684int
16685main ()
16686{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016687return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 ;
16689 return 0;
16690}
16691_ACEOF
16692rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016693if { (ac_try="$ac_link"
16694case "(($ac_try" in
16695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16696 *) ac_try_echo=$ac_try;;
16697esac
16698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701 grep -v '^ *+' conftest.er1 >conftest.err
16702 rm -f conftest.er1
16703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016705 (exit $ac_status); } && {
16706 test -z "$ac_c_werror_flag" ||
16707 test ! -s conftest.err
16708 } && test -s conftest$ac_exeext &&
16709 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016711else
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016713sed 's/^/| /' conftest.$ac_ext >&5
16714
Thomas Wouters477c8d52006-05-27 19:21:47 +000016715 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016716fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016717
Thomas Wouters89f507f2006-12-13 04:49:30 +000016718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016719 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016720fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016721ac_res=`eval echo '${'$as_ac_var'}'`
16722 { echo "$as_me:$LINENO: result: $ac_res" >&5
16723echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016724if test `eval echo '${'$as_ac_var'}'` = yes; then
16725 cat >>confdefs.h <<_ACEOF
16726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16727_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016728
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016729fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016730done
16731
Michael W. Hudson54241132001-12-07 15:38:26 +000016732
Martin v. Löwis11437992002-04-12 09:54:03 +000016733
16734
16735
16736
16737
Martin v. Löwis1142de32002-03-29 16:28:31 +000016738for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000016739do
Martin v. Löwis11437992002-04-12 09:54:03 +000016740as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016741{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16742echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16743if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016745else
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016747/* confdefs.h. */
16748_ACEOF
16749cat confdefs.h >>conftest.$ac_ext
16750cat >>conftest.$ac_ext <<_ACEOF
16751/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016752/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16753 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16754#define $ac_func innocuous_$ac_func
16755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016756/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016757 which can conflict with char $ac_func (); below.
16758 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016759 <limits.h> exists even on freestanding compilers. */
16760
16761#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016762# include <limits.h>
16763#else
16764# include <assert.h>
16765#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016766
16767#undef $ac_func
16768
Thomas Wouters477c8d52006-05-27 19:21:47 +000016769/* Override any GCC internal prototype to avoid an error.
16770 Use char because int might match the return type of a GCC
16771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016772#ifdef __cplusplus
16773extern "C"
16774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016775char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016776/* The GNU C library defines this for functions which it implements
16777 to always fail with ENOSYS. Some functions are actually named
16778 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016779#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016780choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016781#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016782
Skip Montanaro6dead952003-09-25 14:50:04 +000016783int
16784main ()
16785{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016786return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 ;
16788 return 0;
16789}
16790_ACEOF
16791rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016792if { (ac_try="$ac_link"
16793case "(($ac_try" in
16794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16795 *) ac_try_echo=$ac_try;;
16796esac
16797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16798 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800 grep -v '^ *+' conftest.er1 >conftest.err
16801 rm -f conftest.er1
16802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016804 (exit $ac_status); } && {
16805 test -z "$ac_c_werror_flag" ||
16806 test ! -s conftest.err
16807 } && test -s conftest$ac_exeext &&
16808 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016810else
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016812sed 's/^/| /' conftest.$ac_ext >&5
16813
Thomas Wouters477c8d52006-05-27 19:21:47 +000016814 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016816
Thomas Wouters89f507f2006-12-13 04:49:30 +000016817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000016819fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016820ac_res=`eval echo '${'$as_ac_var'}'`
16821 { echo "$as_me:$LINENO: result: $ac_res" >&5
16822echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016823if test `eval echo '${'$as_ac_var'}'` = yes; then
16824 cat >>confdefs.h <<_ACEOF
16825#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16826_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000016827
Martin v. Löwis1142de32002-03-29 16:28:31 +000016828else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016829 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000016830 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000016831 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16832 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016833esac
16834
Martin v. Löwis1142de32002-03-29 16:28:31 +000016835fi
16836done
16837
16838
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
Martin v. Löwis1142de32002-03-29 16:28:31 +000016840for ac_func in getpgrp
16841do
Martin v. Löwis11437992002-04-12 09:54:03 +000016842as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016843{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16844echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16845if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000016847else
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016854/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16855 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16856#define $ac_func innocuous_$ac_func
16857
Martin v. Löwis1142de32002-03-29 16:28:31 +000016858/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016859 which can conflict with char $ac_func (); below.
16860 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016861 <limits.h> exists even on freestanding compilers. */
16862
16863#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016864# include <limits.h>
16865#else
16866# include <assert.h>
16867#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016868
16869#undef $ac_func
16870
Thomas Wouters477c8d52006-05-27 19:21:47 +000016871/* Override any GCC internal prototype to avoid an error.
16872 Use char because int might match the return type of a GCC
16873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016874#ifdef __cplusplus
16875extern "C"
16876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016877char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000016878/* The GNU C library defines this for functions which it implements
16879 to always fail with ENOSYS. Some functions are actually named
16880 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016881#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000016882choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000016883#endif
16884
Skip Montanaro6dead952003-09-25 14:50:04 +000016885int
16886main ()
16887{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016888return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016889 ;
16890 return 0;
16891}
16892_ACEOF
16893rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016894if { (ac_try="$ac_link"
16895case "(($ac_try" in
16896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16897 *) ac_try_echo=$ac_try;;
16898esac
16899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016902 grep -v '^ *+' conftest.er1 >conftest.err
16903 rm -f conftest.er1
16904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016906 (exit $ac_status); } && {
16907 test -z "$ac_c_werror_flag" ||
16908 test ! -s conftest.err
16909 } && test -s conftest$ac_exeext &&
16910 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016912else
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016914sed 's/^/| /' conftest.$ac_ext >&5
16915
Thomas Wouters477c8d52006-05-27 19:21:47 +000016916 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016917fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016918
Thomas Wouters89f507f2006-12-13 04:49:30 +000016919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016920 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016921fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016922ac_res=`eval echo '${'$as_ac_var'}'`
16923 { echo "$as_me:$LINENO: result: $ac_res" >&5
16924echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016925if test `eval echo '${'$as_ac_var'}'` = yes; then
16926 cat >>confdefs.h <<_ACEOF
16927#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16928_ACEOF
16929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016930/* confdefs.h. */
16931_ACEOF
16932cat confdefs.h >>conftest.$ac_ext
16933cat >>conftest.$ac_ext <<_ACEOF
16934/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016935#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016936int
16937main ()
16938{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016939getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ;
16941 return 0;
16942}
16943_ACEOF
16944rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016945if { (ac_try="$ac_compile"
16946case "(($ac_try" in
16947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16948 *) ac_try_echo=$ac_try;;
16949esac
16950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016953 grep -v '^ *+' conftest.er1 >conftest.err
16954 rm -f conftest.er1
16955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000016957 (exit $ac_status); } && {
16958 test -z "$ac_c_werror_flag" ||
16959 test ! -s conftest.err
16960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016961
16962cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016963#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016964_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966
Guido van Rossumf78abae1997-01-21 22:02:36 +000016967else
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016969sed 's/^/| /' conftest.$ac_ext >&5
16970
Thomas Wouters477c8d52006-05-27 19:21:47 +000016971
Guido van Rossum627b2d71993-12-24 10:39:16 +000016972fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016973
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016975
Guido van Rossum627b2d71993-12-24 10:39:16 +000016976fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016977done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016978
Jack Jansen150753c2003-03-29 22:07:47 +000016979
16980for ac_func in setpgrp
16981do
16982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016983{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16985if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016987else
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016989/* confdefs.h. */
16990_ACEOF
16991cat confdefs.h >>conftest.$ac_ext
16992cat >>conftest.$ac_ext <<_ACEOF
16993/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016994/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16995 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16996#define $ac_func innocuous_$ac_func
16997
Jack Jansen150753c2003-03-29 22:07:47 +000016998/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016999 which can conflict with char $ac_func (); below.
17000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017001 <limits.h> exists even on freestanding compilers. */
17002
17003#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017004# include <limits.h>
17005#else
17006# include <assert.h>
17007#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017008
17009#undef $ac_func
17010
Thomas Wouters477c8d52006-05-27 19:21:47 +000017011/* Override any GCC internal prototype to avoid an error.
17012 Use char because int might match the return type of a GCC
17013 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017014#ifdef __cplusplus
17015extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017016#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017017char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017018/* The GNU C library defines this for functions which it implements
17019 to always fail with ENOSYS. Some functions are actually named
17020 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017021#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017022choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017023#endif
17024
Skip Montanaro6dead952003-09-25 14:50:04 +000017025int
17026main ()
17027{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017028return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 ;
17030 return 0;
17031}
17032_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017033rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017034if { (ac_try="$ac_link"
17035case "(($ac_try" in
17036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17037 *) ac_try_echo=$ac_try;;
17038esac
17039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017042 grep -v '^ *+' conftest.er1 >conftest.err
17043 rm -f conftest.er1
17044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017046 (exit $ac_status); } && {
17047 test -z "$ac_c_werror_flag" ||
17048 test ! -s conftest.err
17049 } && test -s conftest$ac_exeext &&
17050 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017051 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017052else
Jack Jansen150753c2003-03-29 22:07:47 +000017053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017054sed 's/^/| /' conftest.$ac_ext >&5
17055
Thomas Wouters477c8d52006-05-27 19:21:47 +000017056 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017058
Thomas Wouters89f507f2006-12-13 04:49:30 +000017059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017060 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017062ac_res=`eval echo '${'$as_ac_var'}'`
17063 { echo "$as_me:$LINENO: result: $ac_res" >&5
17064echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017065if test `eval echo '${'$as_ac_var'}'` = yes; then
17066 cat >>confdefs.h <<_ACEOF
17067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17068_ACEOF
17069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017070/* confdefs.h. */
17071_ACEOF
17072cat confdefs.h >>conftest.$ac_ext
17073cat >>conftest.$ac_ext <<_ACEOF
17074/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017075#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017076int
17077main ()
17078{
17079setpgrp(0,0);
17080 ;
17081 return 0;
17082}
17083_ACEOF
17084rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017085if { (ac_try="$ac_compile"
17086case "(($ac_try" in
17087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17088 *) ac_try_echo=$ac_try;;
17089esac
17090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17091 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017093 grep -v '^ *+' conftest.er1 >conftest.err
17094 rm -f conftest.er1
17095 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017097 (exit $ac_status); } && {
17098 test -z "$ac_c_werror_flag" ||
17099 test ! -s conftest.err
17100 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017103#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017104_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017105
Jack Jansen150753c2003-03-29 22:07:47 +000017106
17107else
17108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017109sed 's/^/| /' conftest.$ac_ext >&5
17110
Thomas Wouters477c8d52006-05-27 19:21:47 +000017111
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017113
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017115
17116fi
17117done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017118
Martin v. Löwis11437992002-04-12 09:54:03 +000017119
Thomas Wouters3a584202000-08-05 23:28:51 +000017120for ac_func in gettimeofday
17121do
Martin v. Löwis11437992002-04-12 09:54:03 +000017122as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017123{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17124echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17125if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017127else
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017129/* confdefs.h. */
17130_ACEOF
17131cat confdefs.h >>conftest.$ac_ext
17132cat >>conftest.$ac_ext <<_ACEOF
17133/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017134/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17135 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17136#define $ac_func innocuous_$ac_func
17137
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017138/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017139 which can conflict with char $ac_func (); below.
17140 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017141 <limits.h> exists even on freestanding compilers. */
17142
17143#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017144# include <limits.h>
17145#else
17146# include <assert.h>
17147#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017148
17149#undef $ac_func
17150
Thomas Wouters477c8d52006-05-27 19:21:47 +000017151/* Override any GCC internal prototype to avoid an error.
17152 Use char because int might match the return type of a GCC
17153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017154#ifdef __cplusplus
17155extern "C"
17156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017157char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017158/* The GNU C library defines this for functions which it implements
17159 to always fail with ENOSYS. Some functions are actually named
17160 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017161#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017162choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017163#endif
17164
Skip Montanaro6dead952003-09-25 14:50:04 +000017165int
17166main ()
17167{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017168return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 ;
17170 return 0;
17171}
17172_ACEOF
17173rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017174if { (ac_try="$ac_link"
17175case "(($ac_try" in
17176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17177 *) ac_try_echo=$ac_try;;
17178esac
17179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017182 grep -v '^ *+' conftest.er1 >conftest.err
17183 rm -f conftest.er1
17184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017186 (exit $ac_status); } && {
17187 test -z "$ac_c_werror_flag" ||
17188 test ! -s conftest.err
17189 } && test -s conftest$ac_exeext &&
17190 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017192else
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017194sed 's/^/| /' conftest.$ac_ext >&5
17195
Thomas Wouters477c8d52006-05-27 19:21:47 +000017196 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017197fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017198
Thomas Wouters89f507f2006-12-13 04:49:30 +000017199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017200 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017201fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017202ac_res=`eval echo '${'$as_ac_var'}'`
17203 { echo "$as_me:$LINENO: result: $ac_res" >&5
17204echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017205if test `eval echo '${'$as_ac_var'}'` = yes; then
17206 cat >>confdefs.h <<_ACEOF
17207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17208_ACEOF
17209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017210/* confdefs.h. */
17211_ACEOF
17212cat confdefs.h >>conftest.$ac_ext
17213cat >>conftest.$ac_ext <<_ACEOF
17214/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017215#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017216int
17217main ()
17218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017219gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 ;
17221 return 0;
17222}
17223_ACEOF
17224rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017225if { (ac_try="$ac_compile"
17226case "(($ac_try" in
17227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17228 *) ac_try_echo=$ac_try;;
17229esac
17230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017233 grep -v '^ *+' conftest.er1 >conftest.err
17234 rm -f conftest.er1
17235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017237 (exit $ac_status); } && {
17238 test -z "$ac_c_werror_flag" ||
17239 test ! -s conftest.err
17240 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017241 :
17242else
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017244sed 's/^/| /' conftest.$ac_ext >&5
17245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246
17247cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017248#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017249_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017250
Martin v. Löwis11437992002-04-12 09:54:03 +000017251
Guido van Rossum627b2d71993-12-24 10:39:16 +000017252fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017253
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017255
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017256fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017257done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017258
Michael W. Hudson54241132001-12-07 15:38:26 +000017259
Thomas Wouters477c8d52006-05-27 19:21:47 +000017260{ echo "$as_me:$LINENO: checking for major" >&5
17261echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017263/* confdefs.h. */
17264_ACEOF
17265cat confdefs.h >>conftest.$ac_ext
17266cat >>conftest.$ac_ext <<_ACEOF
17267/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017268
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017269#if defined(MAJOR_IN_MKDEV)
17270#include <sys/mkdev.h>
17271#elif defined(MAJOR_IN_SYSMACROS)
17272#include <sys/sysmacros.h>
17273#else
17274#include <sys/types.h>
17275#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017276
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017277int
17278main ()
17279{
17280
17281 makedev(major(0),minor(0));
17282
17283 ;
17284 return 0;
17285}
17286_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017287rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017288if { (ac_try="$ac_link"
17289case "(($ac_try" in
17290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17291 *) ac_try_echo=$ac_try;;
17292esac
17293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17294 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017296 grep -v '^ *+' conftest.er1 >conftest.err
17297 rm -f conftest.er1
17298 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017300 (exit $ac_status); } && {
17301 test -z "$ac_c_werror_flag" ||
17302 test ! -s conftest.err
17303 } && test -s conftest$ac_exeext &&
17304 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017305
17306
17307cat >>confdefs.h <<\_ACEOF
17308#define HAVE_DEVICE_MACROS 1
17309_ACEOF
17310
Thomas Wouters477c8d52006-05-27 19:21:47 +000017311 { echo "$as_me:$LINENO: result: yes" >&5
17312echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017313
17314else
17315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017316sed 's/^/| /' conftest.$ac_ext >&5
17317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017318
Thomas Wouters477c8d52006-05-27 19:21:47 +000017319 { echo "$as_me:$LINENO: result: no" >&5
17320echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017321
17322fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017323
Thomas Wouters89f507f2006-12-13 04:49:30 +000017324rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017326
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017327# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017328# for [no]getaddrinfo in netdb.h.
Thomas Wouters477c8d52006-05-27 19:21:47 +000017329{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17330echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017332/* confdefs.h. */
17333_ACEOF
17334cat confdefs.h >>conftest.$ac_ext
17335cat >>conftest.$ac_ext <<_ACEOF
17336/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017337
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017338#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017339#include <sys/socket.h>
17340#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017341#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017342
Martin v. Löwis11437992002-04-12 09:54:03 +000017343int
17344main ()
17345{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017346
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017347getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017348
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 ;
17350 return 0;
17351}
17352_ACEOF
17353rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017354if { (ac_try="$ac_link"
17355case "(($ac_try" in
17356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17357 *) ac_try_echo=$ac_try;;
17358esac
17359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 grep -v '^ *+' conftest.er1 >conftest.err
17363 rm -f conftest.er1
17364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017366 (exit $ac_status); } && {
17367 test -z "$ac_c_werror_flag" ||
17368 test ! -s conftest.err
17369 } && test -s conftest$ac_exeext &&
17370 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017371
Thomas Wouters477c8d52006-05-27 19:21:47 +000017372{ echo "$as_me:$LINENO: result: yes" >&5
17373echo "${ECHO_T}yes" >&6; }
17374{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17375echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017376if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017377 { echo "$as_me:$LINENO: result: buggy" >&5
17378echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017379buggygetaddrinfo=yes
17380else
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017382/* confdefs.h. */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017387
17388#include <sys/types.h>
17389#include <netdb.h>
17390#include <string.h>
17391#include <sys/socket.h>
17392#include <netinet/in.h>
17393
17394main()
17395{
17396 int passive, gaierr, inet4 = 0, inet6 = 0;
17397 struct addrinfo hints, *ai, *aitop;
17398 char straddr[INET6_ADDRSTRLEN], strport[16];
17399
17400 for (passive = 0; passive <= 1; passive++) {
17401 memset(&hints, 0, sizeof(hints));
17402 hints.ai_family = AF_UNSPEC;
17403 hints.ai_flags = passive ? AI_PASSIVE : 0;
17404 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017405 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017406 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17407 (void)gai_strerror(gaierr);
17408 goto bad;
17409 }
17410 for (ai = aitop; ai; ai = ai->ai_next) {
17411 if (ai->ai_addr == NULL ||
17412 ai->ai_addrlen == 0 ||
17413 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17414 straddr, sizeof(straddr), strport, sizeof(strport),
17415 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17416 goto bad;
17417 }
17418 switch (ai->ai_family) {
17419 case AF_INET:
17420 if (strcmp(strport, "54321") != 0) {
17421 goto bad;
17422 }
17423 if (passive) {
17424 if (strcmp(straddr, "0.0.0.0") != 0) {
17425 goto bad;
17426 }
17427 } else {
17428 if (strcmp(straddr, "127.0.0.1") != 0) {
17429 goto bad;
17430 }
17431 }
17432 inet4++;
17433 break;
17434 case AF_INET6:
17435 if (strcmp(strport, "54321") != 0) {
17436 goto bad;
17437 }
17438 if (passive) {
17439 if (strcmp(straddr, "::") != 0) {
17440 goto bad;
17441 }
17442 } else {
17443 if (strcmp(straddr, "::1") != 0) {
17444 goto bad;
17445 }
17446 }
17447 inet6++;
17448 break;
17449 case AF_UNSPEC:
17450 goto bad;
17451 break;
17452 default:
17453 /* another family support? */
17454 break;
17455 }
17456 }
17457 }
17458
17459 if (!(inet4 == 0 || inet4 == 2))
17460 goto bad;
17461 if (!(inet6 == 0 || inet6 == 2))
17462 goto bad;
17463
17464 if (aitop)
17465 freeaddrinfo(aitop);
17466 exit(0);
17467
17468 bad:
17469 if (aitop)
17470 freeaddrinfo(aitop);
17471 exit(1);
17472}
17473
Martin v. Löwis11437992002-04-12 09:54:03 +000017474_ACEOF
17475rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017476if { (ac_try="$ac_link"
17477case "(($ac_try" in
17478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17479 *) ac_try_echo=$ac_try;;
17480esac
17481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17482 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 ac_status=$?
17484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017486 { (case "(($ac_try" in
17487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17488 *) ac_try_echo=$ac_try;;
17489esac
17490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17491 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 ac_status=$?
17493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17494 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017495 { echo "$as_me:$LINENO: result: good" >&5
17496echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017497buggygetaddrinfo=no
17498else
Martin v. Löwis11437992002-04-12 09:54:03 +000017499 echo "$as_me: program exited with status $ac_status" >&5
17500echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017501sed 's/^/| /' conftest.$ac_ext >&5
17502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000017504{ echo "$as_me:$LINENO: result: buggy" >&5
17505echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017506buggygetaddrinfo=yes
17507fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017509fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017510
17511
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017512else
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017514sed 's/^/| /' conftest.$ac_ext >&5
17515
Martin v. Löwis11437992002-04-12 09:54:03 +000017516
Thomas Wouters477c8d52006-05-27 19:21:47 +000017517{ echo "$as_me:$LINENO: result: no" >&5
17518echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017519buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017520
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017521fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017522
Thomas Wouters89f507f2006-12-13 04:49:30 +000017523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017525
17526if test "$buggygetaddrinfo" = "yes"; then
17527 if test "$ipv6" = "yes"; then
17528 echo 'Fatal: You must get working getaddrinfo() function.'
17529 echo ' or you can specify "--disable-ipv6"'.
17530 exit 1
17531 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017532else
Martin v. Löwis11437992002-04-12 09:54:03 +000017533
17534cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017535#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017536_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017537
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017539
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017540for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017541do
Martin v. Löwis11437992002-04-12 09:54:03 +000017542as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017543{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17544echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17545if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017547else
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017549/* confdefs.h. */
17550_ACEOF
17551cat confdefs.h >>conftest.$ac_ext
17552cat >>conftest.$ac_ext <<_ACEOF
17553/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017554/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17555 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17556#define $ac_func innocuous_$ac_func
17557
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017558/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017559 which can conflict with char $ac_func (); below.
17560 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017561 <limits.h> exists even on freestanding compilers. */
17562
17563#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017564# include <limits.h>
17565#else
17566# include <assert.h>
17567#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017568
17569#undef $ac_func
17570
Thomas Wouters477c8d52006-05-27 19:21:47 +000017571/* Override any GCC internal prototype to avoid an error.
17572 Use char because int might match the return type of a GCC
17573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017574#ifdef __cplusplus
17575extern "C"
17576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017577char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017578/* The GNU C library defines this for functions which it implements
17579 to always fail with ENOSYS. Some functions are actually named
17580 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017581#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017582choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017583#endif
17584
Skip Montanaro6dead952003-09-25 14:50:04 +000017585int
17586main ()
17587{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017588return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 ;
17590 return 0;
17591}
17592_ACEOF
17593rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017594if { (ac_try="$ac_link"
17595case "(($ac_try" in
17596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17597 *) ac_try_echo=$ac_try;;
17598esac
17599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17600 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017602 grep -v '^ *+' conftest.er1 >conftest.err
17603 rm -f conftest.er1
17604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017606 (exit $ac_status); } && {
17607 test -z "$ac_c_werror_flag" ||
17608 test ! -s conftest.err
17609 } && test -s conftest$ac_exeext &&
17610 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017612else
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017614sed 's/^/| /' conftest.$ac_ext >&5
17615
Thomas Wouters477c8d52006-05-27 19:21:47 +000017616 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017617fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017618
Thomas Wouters89f507f2006-12-13 04:49:30 +000017619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017620 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017622ac_res=`eval echo '${'$as_ac_var'}'`
17623 { echo "$as_me:$LINENO: result: $ac_res" >&5
17624echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017625if test `eval echo '${'$as_ac_var'}'` = yes; then
17626 cat >>confdefs.h <<_ACEOF
17627#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17628_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017629
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017630fi
17631done
17632
Michael W. Hudson54241132001-12-07 15:38:26 +000017633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017634# checks for structures
Thomas Wouters477c8d52006-05-27 19:21:47 +000017635{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17636echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017637if test "${ac_cv_header_time+set}" = set; then
17638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017639else
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017641/* confdefs.h. */
17642_ACEOF
17643cat confdefs.h >>conftest.$ac_ext
17644cat >>conftest.$ac_ext <<_ACEOF
17645/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017646#include <sys/types.h>
17647#include <sys/time.h>
17648#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017649
Martin v. Löwis11437992002-04-12 09:54:03 +000017650int
17651main ()
17652{
17653if ((struct tm *) 0)
17654return 0;
17655 ;
17656 return 0;
17657}
17658_ACEOF
17659rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017660if { (ac_try="$ac_compile"
17661case "(($ac_try" in
17662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17663 *) ac_try_echo=$ac_try;;
17664esac
17665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017668 grep -v '^ *+' conftest.er1 >conftest.err
17669 rm -f conftest.er1
17670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017672 (exit $ac_status); } && {
17673 test -z "$ac_c_werror_flag" ||
17674 test ! -s conftest.err
17675 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017676 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017677else
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017679sed 's/^/| /' conftest.$ac_ext >&5
17680
Thomas Wouters477c8d52006-05-27 19:21:47 +000017681 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017682fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017683
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017685fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017686{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17687echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017688if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017689
17690cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017691#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017692_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017693
17694fi
17695
Thomas Wouters477c8d52006-05-27 19:21:47 +000017696{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17697echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017698if test "${ac_cv_struct_tm+set}" = set; then
17699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017700else
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017702/* confdefs.h. */
17703_ACEOF
17704cat confdefs.h >>conftest.$ac_ext
17705cat >>conftest.$ac_ext <<_ACEOF
17706/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017707#include <sys/types.h>
17708#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017709
Martin v. Löwis11437992002-04-12 09:54:03 +000017710int
17711main ()
17712{
Thomas Wouters89f507f2006-12-13 04:49:30 +000017713struct tm tm;
17714 int *p = &tm.tm_sec;
17715 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 ;
17717 return 0;
17718}
17719_ACEOF
17720rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017721if { (ac_try="$ac_compile"
17722case "(($ac_try" in
17723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17724 *) ac_try_echo=$ac_try;;
17725esac
17726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017729 grep -v '^ *+' conftest.er1 >conftest.err
17730 rm -f conftest.er1
17731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017733 (exit $ac_status); } && {
17734 test -z "$ac_c_werror_flag" ||
17735 test ! -s conftest.err
17736 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017737 ac_cv_struct_tm=time.h
17738else
Martin v. Löwis11437992002-04-12 09:54:03 +000017739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017740sed 's/^/| /' conftest.$ac_ext >&5
17741
Thomas Wouters477c8d52006-05-27 19:21:47 +000017742 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017743fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017744
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017746fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017747{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
17748echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017749if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017750
17751cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017752#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017753_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017754
17755fi
17756
Thomas Wouters477c8d52006-05-27 19:21:47 +000017757{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
17758echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017759if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
17760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017761else
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017763/* confdefs.h. */
17764_ACEOF
17765cat confdefs.h >>conftest.$ac_ext
17766cat >>conftest.$ac_ext <<_ACEOF
17767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017768#include <sys/types.h>
17769#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
17771
Martin v. Löwis11437992002-04-12 09:54:03 +000017772int
17773main ()
17774{
17775static struct tm ac_aggr;
17776if (ac_aggr.tm_zone)
17777return 0;
17778 ;
17779 return 0;
17780}
17781_ACEOF
17782rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017783if { (ac_try="$ac_compile"
17784case "(($ac_try" in
17785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17786 *) ac_try_echo=$ac_try;;
17787esac
17788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017791 grep -v '^ *+' conftest.er1 >conftest.err
17792 rm -f conftest.er1
17793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017795 (exit $ac_status); } && {
17796 test -z "$ac_c_werror_flag" ||
17797 test ! -s conftest.err
17798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017800else
Martin v. Löwis11437992002-04-12 09:54:03 +000017801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017802sed 's/^/| /' conftest.$ac_ext >&5
17803
Thomas Wouters477c8d52006-05-27 19:21:47 +000017804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
17810#include <sys/types.h>
17811#include <$ac_cv_struct_tm>
17812
17813
17814int
17815main ()
17816{
17817static struct tm ac_aggr;
17818if (sizeof ac_aggr.tm_zone)
17819return 0;
17820 ;
17821 return 0;
17822}
17823_ACEOF
17824rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017825if { (ac_try="$ac_compile"
17826case "(($ac_try" in
17827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17828 *) ac_try_echo=$ac_try;;
17829esac
17830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17831 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017833 grep -v '^ *+' conftest.er1 >conftest.err
17834 rm -f conftest.er1
17835 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017837 (exit $ac_status); } && {
17838 test -z "$ac_c_werror_flag" ||
17839 test ! -s conftest.err
17840 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017841 ac_cv_member_struct_tm_tm_zone=yes
17842else
17843 echo "$as_me: failed program was:" >&5
17844sed 's/^/| /' conftest.$ac_ext >&5
17845
Thomas Wouters477c8d52006-05-27 19:21:47 +000017846 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017848
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017850fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017851
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017853fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017854{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
17855echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017856if test $ac_cv_member_struct_tm_tm_zone = yes; then
17857
17858cat >>confdefs.h <<_ACEOF
17859#define HAVE_STRUCT_TM_TM_ZONE 1
17860_ACEOF
17861
17862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017863fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017864
Martin v. Löwis11437992002-04-12 09:54:03 +000017865if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
17866
17867cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017868#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017870
17871else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017872 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
17873echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
17874if test "${ac_cv_have_decl_tzname+set}" = set; then
17875 echo $ECHO_N "(cached) $ECHO_C" >&6
17876else
17877 cat >conftest.$ac_ext <<_ACEOF
17878/* confdefs.h. */
17879_ACEOF
17880cat confdefs.h >>conftest.$ac_ext
17881cat >>conftest.$ac_ext <<_ACEOF
17882/* end confdefs.h. */
17883#include <time.h>
17884
17885int
17886main ()
17887{
17888#ifndef tzname
Thomas Wouters89f507f2006-12-13 04:49:30 +000017889 (void) tzname;
Thomas Wouters477c8d52006-05-27 19:21:47 +000017890#endif
17891
17892 ;
17893 return 0;
17894}
17895_ACEOF
17896rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017897if { (ac_try="$ac_compile"
17898case "(($ac_try" in
17899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17900 *) ac_try_echo=$ac_try;;
17901esac
17902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17903 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000017904 ac_status=$?
17905 grep -v '^ *+' conftest.er1 >conftest.err
17906 rm -f conftest.er1
17907 cat conftest.err >&5
17908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017909 (exit $ac_status); } && {
17910 test -z "$ac_c_werror_flag" ||
17911 test ! -s conftest.err
17912 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017913 ac_cv_have_decl_tzname=yes
17914else
17915 echo "$as_me: failed program was:" >&5
17916sed 's/^/| /' conftest.$ac_ext >&5
17917
17918 ac_cv_have_decl_tzname=no
17919fi
17920
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000017922fi
17923{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
17924echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
17925if test $ac_cv_have_decl_tzname = yes; then
17926
17927cat >>confdefs.h <<_ACEOF
17928#define HAVE_DECL_TZNAME 1
17929_ACEOF
17930
17931
17932else
17933 cat >>confdefs.h <<_ACEOF
17934#define HAVE_DECL_TZNAME 0
17935_ACEOF
17936
17937
17938fi
17939
17940
17941 { echo "$as_me:$LINENO: checking for tzname" >&5
17942echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017943if test "${ac_cv_var_tzname+set}" = set; then
17944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017945else
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017947/* confdefs.h. */
17948_ACEOF
17949cat confdefs.h >>conftest.$ac_ext
17950cat >>conftest.$ac_ext <<_ACEOF
17951/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017952#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000017953#if !HAVE_DECL_TZNAME
17954extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000017955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017956
Martin v. Löwis11437992002-04-12 09:54:03 +000017957int
17958main ()
17959{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017960return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000017961 ;
17962 return 0;
17963}
17964_ACEOF
17965rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017966if { (ac_try="$ac_link"
17967case "(($ac_try" in
17968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17969 *) ac_try_echo=$ac_try;;
17970esac
17971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017974 grep -v '^ *+' conftest.er1 >conftest.err
17975 rm -f conftest.er1
17976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000017978 (exit $ac_status); } && {
17979 test -z "$ac_c_werror_flag" ||
17980 test ! -s conftest.err
17981 } && test -s conftest$ac_exeext &&
17982 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017983 ac_cv_var_tzname=yes
17984else
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017986sed 's/^/| /' conftest.$ac_ext >&5
17987
Thomas Wouters477c8d52006-05-27 19:21:47 +000017988 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017989fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017990
Thomas Wouters89f507f2006-12-13 04:49:30 +000017991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017992 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017993fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017994{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17995echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017996 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
17998cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017999#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018000_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018002 fi
18003fi
18004
Thomas Wouters477c8d52006-05-27 19:21:47 +000018005{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18006echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018007if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18008 echo $ECHO_N "(cached) $ECHO_C" >&6
18009else
18010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018011/* confdefs.h. */
18012_ACEOF
18013cat confdefs.h >>conftest.$ac_ext
18014cat >>conftest.$ac_ext <<_ACEOF
18015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018016$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018017int
18018main ()
18019{
18020static struct stat ac_aggr;
18021if (ac_aggr.st_rdev)
18022return 0;
18023 ;
18024 return 0;
18025}
18026_ACEOF
18027rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018028if { (ac_try="$ac_compile"
18029case "(($ac_try" in
18030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18031 *) ac_try_echo=$ac_try;;
18032esac
18033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018036 grep -v '^ *+' conftest.er1 >conftest.err
18037 rm -f conftest.er1
18038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018040 (exit $ac_status); } && {
18041 test -z "$ac_c_werror_flag" ||
18042 test ! -s conftest.err
18043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018044 ac_cv_member_struct_stat_st_rdev=yes
18045else
18046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018047sed 's/^/| /' conftest.$ac_ext >&5
18048
Thomas Wouters477c8d52006-05-27 19:21:47 +000018049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
18055$ac_includes_default
18056int
18057main ()
18058{
18059static struct stat ac_aggr;
18060if (sizeof ac_aggr.st_rdev)
18061return 0;
18062 ;
18063 return 0;
18064}
18065_ACEOF
18066rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018067if { (ac_try="$ac_compile"
18068case "(($ac_try" in
18069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070 *) ac_try_echo=$ac_try;;
18071esac
18072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18073 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018075 grep -v '^ *+' conftest.er1 >conftest.err
18076 rm -f conftest.er1
18077 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018079 (exit $ac_status); } && {
18080 test -z "$ac_c_werror_flag" ||
18081 test ! -s conftest.err
18082 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018083 ac_cv_member_struct_stat_st_rdev=yes
18084else
18085 echo "$as_me: failed program was:" >&5
18086sed 's/^/| /' conftest.$ac_ext >&5
18087
Thomas Wouters477c8d52006-05-27 19:21:47 +000018088 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018089fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018090
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018092fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018093
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018096{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18097echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018098if test $ac_cv_member_struct_stat_st_rdev = yes; then
18099
18100cat >>confdefs.h <<_ACEOF
18101#define HAVE_STRUCT_STAT_ST_RDEV 1
18102_ACEOF
18103
18104
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018105fi
18106
Thomas Wouters477c8d52006-05-27 19:21:47 +000018107{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18108echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018109if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018111else
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018113/* confdefs.h. */
18114_ACEOF
18115cat confdefs.h >>conftest.$ac_ext
18116cat >>conftest.$ac_ext <<_ACEOF
18117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018118$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018119int
18120main ()
18121{
18122static struct stat ac_aggr;
18123if (ac_aggr.st_blksize)
18124return 0;
18125 ;
18126 return 0;
18127}
18128_ACEOF
18129rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018130if { (ac_try="$ac_compile"
18131case "(($ac_try" in
18132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18133 *) ac_try_echo=$ac_try;;
18134esac
18135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018138 grep -v '^ *+' conftest.er1 >conftest.err
18139 rm -f conftest.er1
18140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018142 (exit $ac_status); } && {
18143 test -z "$ac_c_werror_flag" ||
18144 test ! -s conftest.err
18145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018147else
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018149sed 's/^/| /' conftest.$ac_ext >&5
18150
Thomas Wouters477c8d52006-05-27 19:21:47 +000018151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018152/* confdefs.h. */
18153_ACEOF
18154cat confdefs.h >>conftest.$ac_ext
18155cat >>conftest.$ac_ext <<_ACEOF
18156/* end confdefs.h. */
18157$ac_includes_default
18158int
18159main ()
18160{
18161static struct stat ac_aggr;
18162if (sizeof ac_aggr.st_blksize)
18163return 0;
18164 ;
18165 return 0;
18166}
18167_ACEOF
18168rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018169if { (ac_try="$ac_compile"
18170case "(($ac_try" in
18171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18172 *) ac_try_echo=$ac_try;;
18173esac
18174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18175 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018177 grep -v '^ *+' conftest.er1 >conftest.err
18178 rm -f conftest.er1
18179 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018181 (exit $ac_status); } && {
18182 test -z "$ac_c_werror_flag" ||
18183 test ! -s conftest.err
18184 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018185 ac_cv_member_struct_stat_st_blksize=yes
18186else
18187 echo "$as_me: failed program was:" >&5
18188sed 's/^/| /' conftest.$ac_ext >&5
18189
Thomas Wouters477c8d52006-05-27 19:21:47 +000018190 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018192
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018194fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018195
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018197fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018198{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18199echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018200if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018201
Martin v. Löwis11437992002-04-12 09:54:03 +000018202cat >>confdefs.h <<_ACEOF
18203#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18204_ACEOF
18205
18206
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018207fi
18208
Thomas Wouters477c8d52006-05-27 19:21:47 +000018209{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18210echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018211if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18212 echo $ECHO_N "(cached) $ECHO_C" >&6
18213else
18214 cat >conftest.$ac_ext <<_ACEOF
18215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
18220$ac_includes_default
18221int
18222main ()
18223{
18224static struct stat ac_aggr;
18225if (ac_aggr.st_flags)
18226return 0;
18227 ;
18228 return 0;
18229}
18230_ACEOF
18231rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018232if { (ac_try="$ac_compile"
18233case "(($ac_try" in
18234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18235 *) ac_try_echo=$ac_try;;
18236esac
18237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18238 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018239 ac_status=$?
18240 grep -v '^ *+' conftest.er1 >conftest.err
18241 rm -f conftest.er1
18242 cat conftest.err >&5
18243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018244 (exit $ac_status); } && {
18245 test -z "$ac_c_werror_flag" ||
18246 test ! -s conftest.err
18247 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018248 ac_cv_member_struct_stat_st_flags=yes
18249else
18250 echo "$as_me: failed program was:" >&5
18251sed 's/^/| /' conftest.$ac_ext >&5
18252
Thomas Wouters477c8d52006-05-27 19:21:47 +000018253 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018254/* confdefs.h. */
18255_ACEOF
18256cat confdefs.h >>conftest.$ac_ext
18257cat >>conftest.$ac_ext <<_ACEOF
18258/* end confdefs.h. */
18259$ac_includes_default
18260int
18261main ()
18262{
18263static struct stat ac_aggr;
18264if (sizeof ac_aggr.st_flags)
18265return 0;
18266 ;
18267 return 0;
18268}
18269_ACEOF
18270rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018271if { (ac_try="$ac_compile"
18272case "(($ac_try" in
18273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18274 *) ac_try_echo=$ac_try;;
18275esac
18276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18277 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018278 ac_status=$?
18279 grep -v '^ *+' conftest.er1 >conftest.err
18280 rm -f conftest.er1
18281 cat conftest.err >&5
18282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018283 (exit $ac_status); } && {
18284 test -z "$ac_c_werror_flag" ||
18285 test ! -s conftest.err
18286 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018287 ac_cv_member_struct_stat_st_flags=yes
18288else
18289 echo "$as_me: failed program was:" >&5
18290sed 's/^/| /' conftest.$ac_ext >&5
18291
Thomas Wouters477c8d52006-05-27 19:21:47 +000018292 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018293fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018294
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018296fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018297
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018299fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018300{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18301echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018302if test $ac_cv_member_struct_stat_st_flags = yes; then
18303
18304cat >>confdefs.h <<_ACEOF
18305#define HAVE_STRUCT_STAT_ST_FLAGS 1
18306_ACEOF
18307
18308
18309fi
18310
Thomas Wouters477c8d52006-05-27 19:21:47 +000018311{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18312echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018313if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
18315else
18316 cat >conftest.$ac_ext <<_ACEOF
18317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
18322$ac_includes_default
18323int
18324main ()
18325{
18326static struct stat ac_aggr;
18327if (ac_aggr.st_gen)
18328return 0;
18329 ;
18330 return 0;
18331}
18332_ACEOF
18333rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018334if { (ac_try="$ac_compile"
18335case "(($ac_try" in
18336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18337 *) ac_try_echo=$ac_try;;
18338esac
18339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018341 ac_status=$?
18342 grep -v '^ *+' conftest.er1 >conftest.err
18343 rm -f conftest.er1
18344 cat conftest.err >&5
18345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018346 (exit $ac_status); } && {
18347 test -z "$ac_c_werror_flag" ||
18348 test ! -s conftest.err
18349 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018350 ac_cv_member_struct_stat_st_gen=yes
18351else
18352 echo "$as_me: failed program was:" >&5
18353sed 's/^/| /' conftest.$ac_ext >&5
18354
Thomas Wouters477c8d52006-05-27 19:21:47 +000018355 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018356/* confdefs.h. */
18357_ACEOF
18358cat confdefs.h >>conftest.$ac_ext
18359cat >>conftest.$ac_ext <<_ACEOF
18360/* end confdefs.h. */
18361$ac_includes_default
18362int
18363main ()
18364{
18365static struct stat ac_aggr;
18366if (sizeof ac_aggr.st_gen)
18367return 0;
18368 ;
18369 return 0;
18370}
18371_ACEOF
18372rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018373if { (ac_try="$ac_compile"
18374case "(($ac_try" in
18375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18376 *) ac_try_echo=$ac_try;;
18377esac
18378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018380 ac_status=$?
18381 grep -v '^ *+' conftest.er1 >conftest.err
18382 rm -f conftest.er1
18383 cat conftest.err >&5
18384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018385 (exit $ac_status); } && {
18386 test -z "$ac_c_werror_flag" ||
18387 test ! -s conftest.err
18388 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018389 ac_cv_member_struct_stat_st_gen=yes
18390else
18391 echo "$as_me: failed program was:" >&5
18392sed 's/^/| /' conftest.$ac_ext >&5
18393
Thomas Wouters477c8d52006-05-27 19:21:47 +000018394 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018395fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018396
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018398fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018399
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018401fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018402{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18403echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018404if test $ac_cv_member_struct_stat_st_gen = yes; then
18405
18406cat >>confdefs.h <<_ACEOF
18407#define HAVE_STRUCT_STAT_ST_GEN 1
18408_ACEOF
18409
18410
18411fi
18412
Thomas Wouters477c8d52006-05-27 19:21:47 +000018413{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18414echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018415if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18416 echo $ECHO_N "(cached) $ECHO_C" >&6
18417else
18418 cat >conftest.$ac_ext <<_ACEOF
18419/* confdefs.h. */
18420_ACEOF
18421cat confdefs.h >>conftest.$ac_ext
18422cat >>conftest.$ac_ext <<_ACEOF
18423/* end confdefs.h. */
18424$ac_includes_default
18425int
18426main ()
18427{
18428static struct stat ac_aggr;
18429if (ac_aggr.st_birthtime)
18430return 0;
18431 ;
18432 return 0;
18433}
18434_ACEOF
18435rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018436if { (ac_try="$ac_compile"
18437case "(($ac_try" in
18438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18439 *) ac_try_echo=$ac_try;;
18440esac
18441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018443 ac_status=$?
18444 grep -v '^ *+' conftest.er1 >conftest.err
18445 rm -f conftest.er1
18446 cat conftest.err >&5
18447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018448 (exit $ac_status); } && {
18449 test -z "$ac_c_werror_flag" ||
18450 test ! -s conftest.err
18451 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018452 ac_cv_member_struct_stat_st_birthtime=yes
18453else
18454 echo "$as_me: failed program was:" >&5
18455sed 's/^/| /' conftest.$ac_ext >&5
18456
Thomas Wouters477c8d52006-05-27 19:21:47 +000018457 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018458/* confdefs.h. */
18459_ACEOF
18460cat confdefs.h >>conftest.$ac_ext
18461cat >>conftest.$ac_ext <<_ACEOF
18462/* end confdefs.h. */
18463$ac_includes_default
18464int
18465main ()
18466{
18467static struct stat ac_aggr;
18468if (sizeof ac_aggr.st_birthtime)
18469return 0;
18470 ;
18471 return 0;
18472}
18473_ACEOF
18474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018475if { (ac_try="$ac_compile"
18476case "(($ac_try" in
18477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478 *) ac_try_echo=$ac_try;;
18479esac
18480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018482 ac_status=$?
18483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018487 (exit $ac_status); } && {
18488 test -z "$ac_c_werror_flag" ||
18489 test ! -s conftest.err
18490 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018491 ac_cv_member_struct_stat_st_birthtime=yes
18492else
18493 echo "$as_me: failed program was:" >&5
18494sed 's/^/| /' conftest.$ac_ext >&5
18495
Thomas Wouters477c8d52006-05-27 19:21:47 +000018496 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018497fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018498
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018500fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018501
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018503fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018504{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18505echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018506if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18507
18508cat >>confdefs.h <<_ACEOF
18509#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18510_ACEOF
18511
18512
18513fi
18514
Thomas Wouters477c8d52006-05-27 19:21:47 +000018515{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18516echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018517if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018519else
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018521/* confdefs.h. */
18522_ACEOF
18523cat confdefs.h >>conftest.$ac_ext
18524cat >>conftest.$ac_ext <<_ACEOF
18525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018526$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018527int
18528main ()
18529{
18530static struct stat ac_aggr;
18531if (ac_aggr.st_blocks)
18532return 0;
18533 ;
18534 return 0;
18535}
18536_ACEOF
18537rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018538if { (ac_try="$ac_compile"
18539case "(($ac_try" in
18540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18541 *) ac_try_echo=$ac_try;;
18542esac
18543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018546 grep -v '^ *+' conftest.er1 >conftest.err
18547 rm -f conftest.er1
18548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018550 (exit $ac_status); } && {
18551 test -z "$ac_c_werror_flag" ||
18552 test ! -s conftest.err
18553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018555else
Martin v. Löwis11437992002-04-12 09:54:03 +000018556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018557sed 's/^/| /' conftest.$ac_ext >&5
18558
Thomas Wouters477c8d52006-05-27 19:21:47 +000018559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018560/* confdefs.h. */
18561_ACEOF
18562cat confdefs.h >>conftest.$ac_ext
18563cat >>conftest.$ac_ext <<_ACEOF
18564/* end confdefs.h. */
18565$ac_includes_default
18566int
18567main ()
18568{
18569static struct stat ac_aggr;
18570if (sizeof ac_aggr.st_blocks)
18571return 0;
18572 ;
18573 return 0;
18574}
18575_ACEOF
18576rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018577if { (ac_try="$ac_compile"
18578case "(($ac_try" in
18579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18580 *) ac_try_echo=$ac_try;;
18581esac
18582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18583 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018585 grep -v '^ *+' conftest.er1 >conftest.err
18586 rm -f conftest.er1
18587 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018589 (exit $ac_status); } && {
18590 test -z "$ac_c_werror_flag" ||
18591 test ! -s conftest.err
18592 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018593 ac_cv_member_struct_stat_st_blocks=yes
18594else
18595 echo "$as_me: failed program was:" >&5
18596sed 's/^/| /' conftest.$ac_ext >&5
18597
Thomas Wouters477c8d52006-05-27 19:21:47 +000018598 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018599fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018600
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018602fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018603
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018605fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018606{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18607echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018608if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018609
Martin v. Löwis11437992002-04-12 09:54:03 +000018610cat >>confdefs.h <<_ACEOF
18611#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18612_ACEOF
18613
18614
18615cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018616#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018617_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018618
18619else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018620 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018621 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018622 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
18623 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018624esac
18625
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018626fi
18627
Michael W. Hudson54241132001-12-07 15:38:26 +000018628
Martin v. Löwis11437992002-04-12 09:54:03 +000018629
Thomas Wouters477c8d52006-05-27 19:21:47 +000018630{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18631echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018632if test "${ac_cv_header_time_altzone+set}" = set; then
18633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018634else
Martin v. Löwis11437992002-04-12 09:54:03 +000018635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018636/* confdefs.h. */
18637_ACEOF
18638cat confdefs.h >>conftest.$ac_ext
18639cat >>conftest.$ac_ext <<_ACEOF
18640/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018641#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018642int
18643main ()
18644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018645return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 ;
18647 return 0;
18648}
18649_ACEOF
18650rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018651if { (ac_try="$ac_compile"
18652case "(($ac_try" in
18653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18654 *) ac_try_echo=$ac_try;;
18655esac
18656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659 grep -v '^ *+' conftest.er1 >conftest.err
18660 rm -f conftest.er1
18661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018663 (exit $ac_status); } && {
18664 test -z "$ac_c_werror_flag" ||
18665 test ! -s conftest.err
18666 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018667 ac_cv_header_time_altzone=yes
18668else
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018670sed 's/^/| /' conftest.$ac_ext >&5
18671
Thomas Wouters477c8d52006-05-27 19:21:47 +000018672 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000018673fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018674
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018676fi
18677
Thomas Wouters477c8d52006-05-27 19:21:47 +000018678{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18679echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018680if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018681
18682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018683#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018685
18686fi
18687
Guido van Rossumda88dad1995-01-26 00:46:29 +000018688was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000018689{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18690echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018697
18698#include <sys/types.h>
18699#include <sys/select.h>
18700#include <sys/time.h>
18701
Martin v. Löwis11437992002-04-12 09:54:03 +000018702int
18703main ()
18704{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018705;
Martin v. Löwis11437992002-04-12 09:54:03 +000018706 ;
18707 return 0;
18708}
18709_ACEOF
18710rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018711if { (ac_try="$ac_compile"
18712case "(($ac_try" in
18713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18714 *) ac_try_echo=$ac_try;;
18715esac
18716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018719 grep -v '^ *+' conftest.er1 >conftest.err
18720 rm -f conftest.er1
18721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018723 (exit $ac_status); } && {
18724 test -z "$ac_c_werror_flag" ||
18725 test ! -s conftest.err
18726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018727
18728
18729cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018730#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018731_ACEOF
18732
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018733 was_it_defined=yes
18734
Guido van Rossumf78abae1997-01-21 22:02:36 +000018735else
Martin v. Löwis11437992002-04-12 09:54:03 +000018736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018737sed 's/^/| /' conftest.$ac_ext >&5
18738
Guido van Rossum627b2d71993-12-24 10:39:16 +000018739
Thomas Wouters477c8d52006-05-27 19:21:47 +000018740fi
18741
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000018743{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
18744echo "${ECHO_T}$was_it_defined" >&6; }
18745
18746{ echo "$as_me:$LINENO: checking for addrinfo" >&5
18747echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018748if test "${ac_cv_struct_addrinfo+set}" = set; then
18749 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018750else
Martin v. Löwis11437992002-04-12 09:54:03 +000018751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018752/* confdefs.h. */
18753_ACEOF
18754cat confdefs.h >>conftest.$ac_ext
18755cat >>conftest.$ac_ext <<_ACEOF
18756/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018757
18758# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018759int
18760main ()
18761{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018762struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000018763 ;
18764 return 0;
18765}
18766_ACEOF
18767rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018768if { (ac_try="$ac_compile"
18769case "(($ac_try" in
18770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18771 *) ac_try_echo=$ac_try;;
18772esac
18773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018776 grep -v '^ *+' conftest.er1 >conftest.err
18777 rm -f conftest.er1
18778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018780 (exit $ac_status); } && {
18781 test -z "$ac_c_werror_flag" ||
18782 test ! -s conftest.err
18783 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018784 ac_cv_struct_addrinfo=yes
18785else
Martin v. Löwis11437992002-04-12 09:54:03 +000018786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018787sed 's/^/| /' conftest.$ac_ext >&5
18788
Thomas Wouters477c8d52006-05-27 19:21:47 +000018789 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018790fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018791
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018793fi
18794
Thomas Wouters477c8d52006-05-27 19:21:47 +000018795{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
18796echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018797if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018798
18799cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018800#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018801_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018802
18803fi
18804
Thomas Wouters477c8d52006-05-27 19:21:47 +000018805{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
18806echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018807if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
18808 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018809else
Martin v. Löwis11437992002-04-12 09:54:03 +000018810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018811/* confdefs.h. */
18812_ACEOF
18813cat confdefs.h >>conftest.$ac_ext
18814cat >>conftest.$ac_ext <<_ACEOF
18815/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018816
18817# include <sys/types.h>
18818# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018819int
18820main ()
18821{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018822struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 ;
18824 return 0;
18825}
18826_ACEOF
18827rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018828if { (ac_try="$ac_compile"
18829case "(($ac_try" in
18830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18831 *) ac_try_echo=$ac_try;;
18832esac
18833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018836 grep -v '^ *+' conftest.er1 >conftest.err
18837 rm -f conftest.er1
18838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018840 (exit $ac_status); } && {
18841 test -z "$ac_c_werror_flag" ||
18842 test ! -s conftest.err
18843 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018844 ac_cv_struct_sockaddr_storage=yes
18845else
Martin v. Löwis11437992002-04-12 09:54:03 +000018846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018847sed 's/^/| /' conftest.$ac_ext >&5
18848
Thomas Wouters477c8d52006-05-27 19:21:47 +000018849 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018850fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018851
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018853fi
18854
Thomas Wouters477c8d52006-05-27 19:21:47 +000018855{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
18856echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018857if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018858
18859cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018860#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018861_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018862
18863fi
18864
Guido van Rossum627b2d71993-12-24 10:39:16 +000018865# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000018866
Michael W. Hudson54241132001-12-07 15:38:26 +000018867
Thomas Wouters477c8d52006-05-27 19:21:47 +000018868{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
18869echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018870if test "${ac_cv_c_char_unsigned+set}" = set; then
18871 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000018872else
Martin v. Löwis11437992002-04-12 09:54:03 +000018873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018874/* confdefs.h. */
18875_ACEOF
18876cat confdefs.h >>conftest.$ac_ext
18877cat >>conftest.$ac_ext <<_ACEOF
18878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018880int
18881main ()
18882{
18883static int test_array [1 - 2 * !(((char) -1) < 0)];
18884test_array [0] = 0
18885
18886 ;
18887 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000018888}
Martin v. Löwis11437992002-04-12 09:54:03 +000018889_ACEOF
18890rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018891if { (ac_try="$ac_compile"
18892case "(($ac_try" in
18893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18894 *) ac_try_echo=$ac_try;;
18895esac
18896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018899 grep -v '^ *+' conftest.er1 >conftest.err
18900 rm -f conftest.er1
18901 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000018903 (exit $ac_status); } && {
18904 test -z "$ac_c_werror_flag" ||
18905 test ! -s conftest.err
18906 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018907 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018908else
18909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018910sed 's/^/| /' conftest.$ac_ext >&5
18911
Thomas Wouters477c8d52006-05-27 19:21:47 +000018912 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018913fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018914
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018916fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018917{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18918echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018919if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018921#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018922_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018923
18924fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018925
Thomas Wouters477c8d52006-05-27 19:21:47 +000018926{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18927echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018928if test "${ac_cv_c_const+set}" = set; then
18929 echo $ECHO_N "(cached) $ECHO_C" >&6
18930else
18931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018932/* confdefs.h. */
18933_ACEOF
18934cat confdefs.h >>conftest.$ac_ext
18935cat >>conftest.$ac_ext <<_ACEOF
18936/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018937
Martin v. Löwis11437992002-04-12 09:54:03 +000018938int
18939main ()
18940{
18941/* FIXME: Include the comments suggested by Paul. */
18942#ifndef __cplusplus
18943 /* Ultrix mips cc rejects this. */
18944 typedef int charset[2];
Thomas Wouters89f507f2006-12-13 04:49:30 +000018945 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000018947 char const *const *pcpcc;
18948 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000018949 /* NEC SVR4.0.2 mips cc rejects this. */
18950 struct point {int x, y;};
18951 static struct point const zero = {0,0};
18952 /* AIX XL C 1.02.0.0 rejects this.
18953 It does not let you subtract one const X* pointer from another in
18954 an arm of an if-expression whose if-part is not a constant
18955 expression */
18956 const char *g = "string";
Thomas Wouters89f507f2006-12-13 04:49:30 +000018957 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 /* HPUX 7.0 cc rejects these. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000018959 ++pcpcc;
18960 ppc = (char**) pcpcc;
18961 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 { /* SCO 3.2v4 cc rejects this. */
18963 char *t;
18964 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018965
Martin v. Löwis11437992002-04-12 09:54:03 +000018966 *t++ = 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018967 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 }
18969 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18970 int x[] = {25, 17};
18971 const int *foo = &x[0];
18972 ++foo;
18973 }
18974 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18975 typedef const int *iptr;
18976 iptr p = 0;
18977 ++p;
18978 }
18979 { /* AIX XL C 1.02.0.0 rejects this saying
18980 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18981 struct s { int j; const int *ap[3]; };
18982 struct s *b; b->j = 5;
18983 }
18984 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18985 const int foo = 10;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018986 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 }
Thomas Wouters89f507f2006-12-13 04:49:30 +000018988 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000018989#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018990
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 ;
18992 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018993}
Martin v. Löwis11437992002-04-12 09:54:03 +000018994_ACEOF
18995rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018996if { (ac_try="$ac_compile"
18997case "(($ac_try" in
18998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18999 *) ac_try_echo=$ac_try;;
19000esac
19001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019004 grep -v '^ *+' conftest.er1 >conftest.err
19005 rm -f conftest.er1
19006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019008 (exit $ac_status); } && {
19009 test -z "$ac_c_werror_flag" ||
19010 test ! -s conftest.err
19011 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019012 ac_cv_c_const=yes
19013else
Martin v. Löwis11437992002-04-12 09:54:03 +000019014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019015sed 's/^/| /' conftest.$ac_ext >&5
19016
Thomas Wouters477c8d52006-05-27 19:21:47 +000019017 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019018fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019019
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019021fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019022{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19023echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019024if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019025
19026cat >>confdefs.h <<\_ACEOF
19027#define const
19028_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019029
19030fi
19031
Michael W. Hudson54241132001-12-07 15:38:26 +000019032
Guido van Rossumda88dad1995-01-26 00:46:29 +000019033works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000019034{ echo "$as_me:$LINENO: checking for working volatile" >&5
19035echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019037/* confdefs.h. */
19038_ACEOF
19039cat confdefs.h >>conftest.$ac_ext
19040cat >>conftest.$ac_ext <<_ACEOF
19041/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019042
Martin v. Löwis11437992002-04-12 09:54:03 +000019043int
19044main ()
19045{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019046volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 ;
19048 return 0;
19049}
19050_ACEOF
19051rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019052if { (ac_try="$ac_compile"
19053case "(($ac_try" in
19054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19055 *) ac_try_echo=$ac_try;;
19056esac
19057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019060 grep -v '^ *+' conftest.er1 >conftest.err
19061 rm -f conftest.er1
19062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019064 (exit $ac_status); } && {
19065 test -z "$ac_c_werror_flag" ||
19066 test ! -s conftest.err
19067 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019068 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019069else
Martin v. Löwis11437992002-04-12 09:54:03 +000019070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019071sed 's/^/| /' conftest.$ac_ext >&5
19072
Martin v. Löwis11437992002-04-12 09:54:03 +000019073
19074cat >>confdefs.h <<\_ACEOF
19075#define volatile
19076_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019077
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019078
Guido van Rossum627b2d71993-12-24 10:39:16 +000019079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019080
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019082{ echo "$as_me:$LINENO: result: $works" >&5
19083echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019084
Guido van Rossumda88dad1995-01-26 00:46:29 +000019085works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000019086{ echo "$as_me:$LINENO: checking for working signed char" >&5
19087echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019089/* confdefs.h. */
19090_ACEOF
19091cat confdefs.h >>conftest.$ac_ext
19092cat >>conftest.$ac_ext <<_ACEOF
19093/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019094
Martin v. Löwis11437992002-04-12 09:54:03 +000019095int
19096main ()
19097{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019098signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019099 ;
19100 return 0;
19101}
19102_ACEOF
19103rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019104if { (ac_try="$ac_compile"
19105case "(($ac_try" in
19106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19107 *) ac_try_echo=$ac_try;;
19108esac
19109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019112 grep -v '^ *+' conftest.er1 >conftest.err
19113 rm -f conftest.er1
19114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019116 (exit $ac_status); } && {
19117 test -z "$ac_c_werror_flag" ||
19118 test ! -s conftest.err
19119 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019120 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019121else
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019123sed 's/^/| /' conftest.$ac_ext >&5
19124
Martin v. Löwis11437992002-04-12 09:54:03 +000019125
19126cat >>confdefs.h <<\_ACEOF
19127#define signed
19128_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019129
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019130
Guido van Rossum7f43da71994-08-01 12:15:30 +000019131fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019132
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019134{ echo "$as_me:$LINENO: result: $works" >&5
19135echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019136
Guido van Rossumda88dad1995-01-26 00:46:29 +000019137have_prototypes=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000019138{ echo "$as_me:$LINENO: checking for prototypes" >&5
19139echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019141/* confdefs.h. */
19142_ACEOF
19143cat confdefs.h >>conftest.$ac_ext
19144cat >>conftest.$ac_ext <<_ACEOF
19145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019146int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019147int
19148main ()
19149{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019150return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019151 ;
19152 return 0;
19153}
19154_ACEOF
19155rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019156if { (ac_try="$ac_compile"
19157case "(($ac_try" in
19158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19159 *) ac_try_echo=$ac_try;;
19160esac
19161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019164 grep -v '^ *+' conftest.er1 >conftest.err
19165 rm -f conftest.er1
19166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019168 (exit $ac_status); } && {
19169 test -z "$ac_c_werror_flag" ||
19170 test ! -s conftest.err
19171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019172
19173
19174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019175#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019176_ACEOF
19177
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019178 have_prototypes=yes
19179
Guido van Rossumf78abae1997-01-21 22:02:36 +000019180else
Martin v. Löwis11437992002-04-12 09:54:03 +000019181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019182sed 's/^/| /' conftest.$ac_ext >&5
19183
Thomas Wouters477c8d52006-05-27 19:21:47 +000019184
Guido van Rossum7f43da71994-08-01 12:15:30 +000019185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019186
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019188{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19189echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019190
Guido van Rossumda88dad1995-01-26 00:46:29 +000019191works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000019192{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19193echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019195/* confdefs.h. */
19196_ACEOF
19197cat confdefs.h >>conftest.$ac_ext
19198cat >>conftest.$ac_ext <<_ACEOF
19199/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019200
19201#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019202int foo(int x, ...) {
19203 va_list va;
19204 va_start(va, x);
19205 va_arg(va, int);
19206 va_arg(va, char *);
19207 va_arg(va, double);
19208 return 0;
19209}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019210
Martin v. Löwis11437992002-04-12 09:54:03 +000019211int
19212main ()
19213{
Guido van Rossum90eea071996-08-30 20:58:57 +000019214return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019215 ;
19216 return 0;
19217}
19218_ACEOF
19219rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019220if { (ac_try="$ac_compile"
19221case "(($ac_try" in
19222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19223 *) ac_try_echo=$ac_try;;
19224esac
19225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019228 grep -v '^ *+' conftest.er1 >conftest.err
19229 rm -f conftest.er1
19230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019232 (exit $ac_status); } && {
19233 test -z "$ac_c_werror_flag" ||
19234 test ! -s conftest.err
19235 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019236
19237
19238cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019239#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019240_ACEOF
19241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019242 works=yes
19243
Guido van Rossumf78abae1997-01-21 22:02:36 +000019244else
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019246sed 's/^/| /' conftest.$ac_ext >&5
19247
Thomas Wouters477c8d52006-05-27 19:21:47 +000019248
Guido van Rossum627b2d71993-12-24 10:39:16 +000019249fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019250
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019252{ echo "$as_me:$LINENO: result: $works" >&5
19253echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019254
Martin v. Löwisd6320502004-08-12 13:45:08 +000019255# check for socketpair
Thomas Wouters477c8d52006-05-27 19:21:47 +000019256{ echo "$as_me:$LINENO: checking for socketpair" >&5
19257echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019258cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019259/* confdefs.h. */
19260_ACEOF
19261cat confdefs.h >>conftest.$ac_ext
19262cat >>conftest.$ac_ext <<_ACEOF
19263/* end confdefs.h. */
19264
19265#include <sys/types.h>
19266#include <sys/socket.h>
19267
19268int
19269main ()
19270{
19271void *x=socketpair
19272 ;
19273 return 0;
19274}
19275_ACEOF
19276rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019277if { (ac_try="$ac_compile"
19278case "(($ac_try" in
19279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19280 *) ac_try_echo=$ac_try;;
19281esac
19282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019285 grep -v '^ *+' conftest.er1 >conftest.err
19286 rm -f conftest.er1
19287 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019289 (exit $ac_status); } && {
19290 test -z "$ac_c_werror_flag" ||
19291 test ! -s conftest.err
19292 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019293
19294cat >>confdefs.h <<\_ACEOF
19295#define HAVE_SOCKETPAIR 1
19296_ACEOF
19297
Thomas Wouters477c8d52006-05-27 19:21:47 +000019298 { echo "$as_me:$LINENO: result: yes" >&5
19299echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019300else
19301 echo "$as_me: failed program was:" >&5
19302sed 's/^/| /' conftest.$ac_ext >&5
19303
Thomas Wouters477c8d52006-05-27 19:21:47 +000019304 { echo "$as_me:$LINENO: result: no" >&5
19305echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019306
19307fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019308
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019310
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019311# check if sockaddr has sa_len member
Thomas Wouters477c8d52006-05-27 19:21:47 +000019312{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19313echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019315/* confdefs.h. */
19316_ACEOF
19317cat confdefs.h >>conftest.$ac_ext
19318cat >>conftest.$ac_ext <<_ACEOF
19319/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019320#include <sys/types.h>
19321#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019322int
19323main ()
19324{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019325struct sockaddr x;
19326x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019327 ;
19328 return 0;
19329}
19330_ACEOF
19331rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019332if { (ac_try="$ac_compile"
19333case "(($ac_try" in
19334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19335 *) ac_try_echo=$ac_try;;
19336esac
19337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019340 grep -v '^ *+' conftest.er1 >conftest.err
19341 rm -f conftest.er1
19342 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019344 (exit $ac_status); } && {
19345 test -z "$ac_c_werror_flag" ||
19346 test ! -s conftest.err
19347 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019348 { echo "$as_me:$LINENO: result: yes" >&5
19349echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019350
19351cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019352#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019353_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019354
19355else
Martin v. Löwis11437992002-04-12 09:54:03 +000019356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019357sed 's/^/| /' conftest.$ac_ext >&5
19358
Thomas Wouters477c8d52006-05-27 19:21:47 +000019359 { echo "$as_me:$LINENO: result: no" >&5
19360echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019361fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019362
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019364
Guido van Rossumda88dad1995-01-26 00:46:29 +000019365va_list_is_array=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000019366{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19367echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019369/* confdefs.h. */
19370_ACEOF
19371cat confdefs.h >>conftest.$ac_ext
19372cat >>conftest.$ac_ext <<_ACEOF
19373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019374
19375#ifdef HAVE_STDARG_PROTOTYPES
19376#include <stdarg.h>
19377#else
19378#include <varargs.h>
19379#endif
19380
Martin v. Löwis11437992002-04-12 09:54:03 +000019381int
19382main ()
19383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019384va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 ;
19386 return 0;
19387}
19388_ACEOF
19389rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019390if { (ac_try="$ac_compile"
19391case "(($ac_try" in
19392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19393 *) ac_try_echo=$ac_try;;
19394esac
19395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019398 grep -v '^ *+' conftest.er1 >conftest.err
19399 rm -f conftest.er1
19400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019402 (exit $ac_status); } && {
19403 test -z "$ac_c_werror_flag" ||
19404 test ! -s conftest.err
19405 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019406 :
19407else
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019409sed 's/^/| /' conftest.$ac_ext >&5
19410
Martin v. Löwis11437992002-04-12 09:54:03 +000019411
19412
19413cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019414#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019415_ACEOF
19416
Guido van Rossumda88dad1995-01-26 00:46:29 +000019417 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019419fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019420
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019422{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19423echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019425# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019426
19427
19428
Thomas Wouters477c8d52006-05-27 19:21:47 +000019429{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19430echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019431if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019433else
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019435/* confdefs.h. */
19436_ACEOF
19437cat confdefs.h >>conftest.$ac_ext
19438cat >>conftest.$ac_ext <<_ACEOF
19439/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019440/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19442#define gethostbyname_r innocuous_gethostbyname_r
19443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019444/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019445 which can conflict with char gethostbyname_r (); below.
19446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019447 <limits.h> exists even on freestanding compilers. */
19448
19449#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019450# include <limits.h>
19451#else
19452# include <assert.h>
19453#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019454
19455#undef gethostbyname_r
19456
Thomas Wouters477c8d52006-05-27 19:21:47 +000019457/* Override any GCC internal prototype to avoid an error.
19458 Use char because int might match the return type of a GCC
19459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019460#ifdef __cplusplus
19461extern "C"
19462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019463char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019464/* The GNU C library defines this for functions which it implements
19465 to always fail with ENOSYS. Some functions are actually named
19466 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019467#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019468choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019469#endif
19470
Skip Montanaro6dead952003-09-25 14:50:04 +000019471int
19472main ()
19473{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019474return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019475 ;
19476 return 0;
19477}
19478_ACEOF
19479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019480if { (ac_try="$ac_link"
19481case "(($ac_try" in
19482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19483 *) ac_try_echo=$ac_try;;
19484esac
19485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19486 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019488 grep -v '^ *+' conftest.er1 >conftest.err
19489 rm -f conftest.er1
19490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019492 (exit $ac_status); } && {
19493 test -z "$ac_c_werror_flag" ||
19494 test ! -s conftest.err
19495 } && test -s conftest$ac_exeext &&
19496 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019498else
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019500sed 's/^/| /' conftest.$ac_ext >&5
19501
Thomas Wouters477c8d52006-05-27 19:21:47 +000019502 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019503fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019504
Thomas Wouters89f507f2006-12-13 04:49:30 +000019505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019506 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019507fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019508{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19509echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019510if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019511
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019513#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019514_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019515
Thomas Wouters477c8d52006-05-27 19:21:47 +000019516 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19517echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019518 OLD_CFLAGS=$CFLAGS
19519 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019526
19527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019528
Martin v. Löwis11437992002-04-12 09:54:03 +000019529int
19530main ()
19531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019532
19533 char *name;
19534 struct hostent *he, *res;
19535 char buffer[2048];
19536 int buflen = 2048;
19537 int h_errnop;
19538
19539 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019540
19541 ;
19542 return 0;
19543}
19544_ACEOF
19545rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019546if { (ac_try="$ac_compile"
19547case "(($ac_try" in
19548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549 *) ac_try_echo=$ac_try;;
19550esac
19551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019554 grep -v '^ *+' conftest.er1 >conftest.err
19555 rm -f conftest.er1
19556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019558 (exit $ac_status); } && {
19559 test -z "$ac_c_werror_flag" ||
19560 test ! -s conftest.err
19561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019562
19563 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019564#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019565_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019566
Martin v. Löwis11437992002-04-12 09:54:03 +000019567
19568cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019569#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019570_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019571
Thomas Wouters477c8d52006-05-27 19:21:47 +000019572 { echo "$as_me:$LINENO: result: yes" >&5
19573echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019575else
Martin v. Löwis11437992002-04-12 09:54:03 +000019576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019577sed 's/^/| /' conftest.$ac_ext >&5
19578
Martin v. Löwis11437992002-04-12 09:54:03 +000019579
Thomas Wouters477c8d52006-05-27 19:21:47 +000019580 { echo "$as_me:$LINENO: result: no" >&5
19581echo "${ECHO_T}no" >&6; }
19582 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19583echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019585/* confdefs.h. */
19586_ACEOF
19587cat confdefs.h >>conftest.$ac_ext
19588cat >>conftest.$ac_ext <<_ACEOF
19589/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019590
19591# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019592
Martin v. Löwis11437992002-04-12 09:54:03 +000019593int
19594main ()
19595{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019596
19597 char *name;
19598 struct hostent *he;
19599 char buffer[2048];
19600 int buflen = 2048;
19601 int h_errnop;
19602
19603 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019604
19605 ;
19606 return 0;
19607}
19608_ACEOF
19609rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019610if { (ac_try="$ac_compile"
19611case "(($ac_try" in
19612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19613 *) ac_try_echo=$ac_try;;
19614esac
19615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019618 grep -v '^ *+' conftest.er1 >conftest.err
19619 rm -f conftest.er1
19620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019622 (exit $ac_status); } && {
19623 test -z "$ac_c_werror_flag" ||
19624 test ! -s conftest.err
19625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019626
19627 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019628#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019629_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019630
Martin v. Löwis11437992002-04-12 09:54:03 +000019631
19632cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019633#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019634_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019635
Thomas Wouters477c8d52006-05-27 19:21:47 +000019636 { echo "$as_me:$LINENO: result: yes" >&5
19637echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019638
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019639else
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019641sed 's/^/| /' conftest.$ac_ext >&5
19642
Martin v. Löwis11437992002-04-12 09:54:03 +000019643
Thomas Wouters477c8d52006-05-27 19:21:47 +000019644 { echo "$as_me:$LINENO: result: no" >&5
19645echo "${ECHO_T}no" >&6; }
19646 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19647echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019649/* confdefs.h. */
19650_ACEOF
19651cat confdefs.h >>conftest.$ac_ext
19652cat >>conftest.$ac_ext <<_ACEOF
19653/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019654
19655# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019656
Martin v. Löwis11437992002-04-12 09:54:03 +000019657int
19658main ()
19659{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019660
19661 char *name;
19662 struct hostent *he;
19663 struct hostent_data data;
19664
19665 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019666
19667 ;
19668 return 0;
19669}
19670_ACEOF
19671rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019672if { (ac_try="$ac_compile"
19673case "(($ac_try" in
19674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19675 *) ac_try_echo=$ac_try;;
19676esac
19677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019680 grep -v '^ *+' conftest.er1 >conftest.err
19681 rm -f conftest.er1
19682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019684 (exit $ac_status); } && {
19685 test -z "$ac_c_werror_flag" ||
19686 test ! -s conftest.err
19687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019688
19689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019690#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019691_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019692
Martin v. Löwis11437992002-04-12 09:54:03 +000019693
19694cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019695#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019697
Thomas Wouters477c8d52006-05-27 19:21:47 +000019698 { echo "$as_me:$LINENO: result: yes" >&5
19699echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019700
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019701else
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019703sed 's/^/| /' conftest.$ac_ext >&5
19704
Martin v. Löwis11437992002-04-12 09:54:03 +000019705
Thomas Wouters477c8d52006-05-27 19:21:47 +000019706 { echo "$as_me:$LINENO: result: no" >&5
19707echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019708
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019709fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019710
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019713fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019714
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019716
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019717fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019718
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019720 CFLAGS=$OLD_CFLAGS
19721
19722else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019723
Martin v. Löwis11437992002-04-12 09:54:03 +000019724
19725for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000019726do
Martin v. Löwis11437992002-04-12 09:54:03 +000019727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000019728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019732else
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019734/* confdefs.h. */
19735_ACEOF
19736cat confdefs.h >>conftest.$ac_ext
19737cat >>conftest.$ac_ext <<_ACEOF
19738/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19741#define $ac_func innocuous_$ac_func
19742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019743/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019744 which can conflict with char $ac_func (); below.
19745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019746 <limits.h> exists even on freestanding compilers. */
19747
19748#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019749# include <limits.h>
19750#else
19751# include <assert.h>
19752#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019753
19754#undef $ac_func
19755
Thomas Wouters477c8d52006-05-27 19:21:47 +000019756/* Override any GCC internal prototype to avoid an error.
19757 Use char because int might match the return type of a GCC
19758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019759#ifdef __cplusplus
19760extern "C"
19761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019762char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019763/* The GNU C library defines this for functions which it implements
19764 to always fail with ENOSYS. Some functions are actually named
19765 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019766#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019767choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019768#endif
19769
Skip Montanaro6dead952003-09-25 14:50:04 +000019770int
19771main ()
19772{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019773return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019774 ;
19775 return 0;
19776}
19777_ACEOF
19778rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019779if { (ac_try="$ac_link"
19780case "(($ac_try" in
19781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19782 *) ac_try_echo=$ac_try;;
19783esac
19784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19785 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019787 grep -v '^ *+' conftest.er1 >conftest.err
19788 rm -f conftest.er1
19789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019791 (exit $ac_status); } && {
19792 test -z "$ac_c_werror_flag" ||
19793 test ! -s conftest.err
19794 } && test -s conftest$ac_exeext &&
19795 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019796 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019797else
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019799sed 's/^/| /' conftest.$ac_ext >&5
19800
Thomas Wouters477c8d52006-05-27 19:21:47 +000019801 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019802fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019803
Thomas Wouters89f507f2006-12-13 04:49:30 +000019804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019806fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019807ac_res=`eval echo '${'$as_ac_var'}'`
19808 { echo "$as_me:$LINENO: result: $ac_res" >&5
19809echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019810if test `eval echo '${'$as_ac_var'}'` = yes; then
19811 cat >>confdefs.h <<_ACEOF
19812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19813_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019814
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019815fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019816done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019817
Michael W. Hudson54241132001-12-07 15:38:26 +000019818
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019819fi
19820
Michael W. Hudson54241132001-12-07 15:38:26 +000019821
19822
19823
19824
19825
19826
Guido van Rossum627b2d71993-12-24 10:39:16 +000019827# checks for system services
19828# (none yet)
19829
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019830# Linux requires this for correct f.p. operations
Thomas Wouters477c8d52006-05-27 19:21:47 +000019831{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
19832echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019833if test "${ac_cv_func___fpu_control+set}" = set; then
19834 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019835else
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019837/* confdefs.h. */
19838_ACEOF
19839cat confdefs.h >>conftest.$ac_ext
19840cat >>conftest.$ac_ext <<_ACEOF
19841/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019842/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19844#define __fpu_control innocuous___fpu_control
19845
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019846/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019847 which can conflict with char __fpu_control (); below.
19848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019849 <limits.h> exists even on freestanding compilers. */
19850
19851#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019852# include <limits.h>
19853#else
19854# include <assert.h>
19855#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019856
19857#undef __fpu_control
19858
Thomas Wouters477c8d52006-05-27 19:21:47 +000019859/* Override any GCC internal prototype to avoid an error.
19860 Use char because int might match the return type of a GCC
19861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019862#ifdef __cplusplus
19863extern "C"
19864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019865char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019866/* The GNU C library defines this for functions which it implements
19867 to always fail with ENOSYS. Some functions are actually named
19868 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019869#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019870choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019871#endif
19872
Skip Montanaro6dead952003-09-25 14:50:04 +000019873int
19874main ()
19875{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019876return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ;
19878 return 0;
19879}
19880_ACEOF
19881rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019882if { (ac_try="$ac_link"
19883case "(($ac_try" in
19884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19885 *) ac_try_echo=$ac_try;;
19886esac
19887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019894 (exit $ac_status); } && {
19895 test -z "$ac_c_werror_flag" ||
19896 test ! -s conftest.err
19897 } && test -s conftest$ac_exeext &&
19898 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019899 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019900else
Martin v. Löwis11437992002-04-12 09:54:03 +000019901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019902sed 's/^/| /' conftest.$ac_ext >&5
19903
Thomas Wouters477c8d52006-05-27 19:21:47 +000019904 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019905fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019906
Thomas Wouters89f507f2006-12-13 04:49:30 +000019907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019909fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019910{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19911echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019912if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019913 :
19914else
Martin v. Löwis11437992002-04-12 09:54:03 +000019915
Thomas Wouters477c8d52006-05-27 19:21:47 +000019916{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19917echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019918if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019920else
Martin v. Löwis11437992002-04-12 09:54:03 +000019921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019922LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019924/* confdefs.h. */
19925_ACEOF
19926cat confdefs.h >>conftest.$ac_ext
19927cat >>conftest.$ac_ext <<_ACEOF
19928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019929
Thomas Wouters477c8d52006-05-27 19:21:47 +000019930/* Override any GCC internal prototype to avoid an error.
19931 Use char because int might match the return type of a GCC
19932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019933#ifdef __cplusplus
19934extern "C"
19935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019936char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019937int
19938main ()
19939{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019940return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 ;
19942 return 0;
19943}
19944_ACEOF
19945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019946if { (ac_try="$ac_link"
19947case "(($ac_try" in
19948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949 *) ac_try_echo=$ac_try;;
19950esac
19951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019954 grep -v '^ *+' conftest.er1 >conftest.err
19955 rm -f conftest.er1
19956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000019958 (exit $ac_status); } && {
19959 test -z "$ac_c_werror_flag" ||
19960 test ! -s conftest.err
19961 } && test -s conftest$ac_exeext &&
19962 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019963 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019964else
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019966sed 's/^/| /' conftest.$ac_ext >&5
19967
Thomas Wouters477c8d52006-05-27 19:21:47 +000019968 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019969fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019970
Thomas Wouters89f507f2006-12-13 04:49:30 +000019971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019974fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019975{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19976echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019977if test $ac_cv_lib_ieee___fpu_control = yes; then
19978 cat >>confdefs.h <<_ACEOF
19979#define HAVE_LIBIEEE 1
19980_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019981
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019982 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019983
Guido van Rossum627b2d71993-12-24 10:39:16 +000019984fi
19985
Michael W. Hudson54241132001-12-07 15:38:26 +000019986
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019987fi
19988
Michael W. Hudson54241132001-12-07 15:38:26 +000019989
Guido van Rossum7f253911997-05-09 02:42:48 +000019990# Check for --with-fpectl
Thomas Wouters477c8d52006-05-27 19:21:47 +000019991{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19992echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019993
Thomas Wouters477c8d52006-05-27 19:21:47 +000019994# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000019995if test "${with_fpectl+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019996 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000019997if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019998then
19999
20000cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020001#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020002_ACEOF
20003
Thomas Wouters477c8d52006-05-27 19:21:47 +000020004 { echo "$as_me:$LINENO: result: yes" >&5
20005echo "${ECHO_T}yes" >&6; }
20006else { echo "$as_me:$LINENO: result: no" >&5
20007echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020008fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020009else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020010 { echo "$as_me:$LINENO: result: no" >&5
20011echo "${ECHO_T}no" >&6; }
20012fi
20013
Guido van Rossum7f253911997-05-09 02:42:48 +000020014
Guido van Rossum7f43da71994-08-01 12:15:30 +000020015# check for --with-libm=...
20016
Guido van Rossum563e7081996-09-10 18:20:48 +000020017case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020018Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020019BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020020*) LIBM=-lm
20021esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000020022{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20023echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020024
Thomas Wouters477c8d52006-05-27 19:21:47 +000020025# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020026if test "${with_libm+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000020027 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020028if test "$withval" = no
20029then LIBM=
Thomas Wouters477c8d52006-05-27 19:21:47 +000020030 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20031echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020032elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020033then LIBM=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000020034 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20035echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020036else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20037echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20038 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020039fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020040else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020041 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20042echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20043fi
20044
Guido van Rossum7f43da71994-08-01 12:15:30 +000020045
20046# check for --with-libc=...
20047
Thomas Wouters477c8d52006-05-27 19:21:47 +000020048{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20049echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020050
Thomas Wouters477c8d52006-05-27 19:21:47 +000020051# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020052if test "${with_libc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000020053 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020054if test "$withval" = no
20055then LIBC=
Thomas Wouters477c8d52006-05-27 19:21:47 +000020056 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20057echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020058elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020059then LIBC=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000020060 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20061echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020062else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20063echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20064 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020065fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020066else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020067 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20068echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20069fi
20070
Guido van Rossum7f43da71994-08-01 12:15:30 +000020071
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020072# check for hypot() in math library
20073LIBS_SAVE=$LIBS
20074LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020075
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020076for ac_func in hypot
20077do
Martin v. Löwis11437992002-04-12 09:54:03 +000020078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000020079{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20081if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020083else
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020090/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20091 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20092#define $ac_func innocuous_$ac_func
20093
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020094/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020095 which can conflict with char $ac_func (); below.
20096 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020097 <limits.h> exists even on freestanding compilers. */
20098
20099#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020100# include <limits.h>
20101#else
20102# include <assert.h>
20103#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020104
20105#undef $ac_func
20106
Thomas Wouters477c8d52006-05-27 19:21:47 +000020107/* Override any GCC internal prototype to avoid an error.
20108 Use char because int might match the return type of a GCC
20109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020110#ifdef __cplusplus
20111extern "C"
20112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020113char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020114/* The GNU C library defines this for functions which it implements
20115 to always fail with ENOSYS. Some functions are actually named
20116 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000020117#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020118choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020119#endif
20120
Skip Montanaro6dead952003-09-25 14:50:04 +000020121int
20122main ()
20123{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020124return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ;
20126 return 0;
20127}
20128_ACEOF
20129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020130if { (ac_try="$ac_link"
20131case "(($ac_try" in
20132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20133 *) ac_try_echo=$ac_try;;
20134esac
20135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020138 grep -v '^ *+' conftest.er1 >conftest.err
20139 rm -f conftest.er1
20140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020142 (exit $ac_status); } && {
20143 test -z "$ac_c_werror_flag" ||
20144 test ! -s conftest.err
20145 } && test -s conftest$ac_exeext &&
20146 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020148else
Martin v. Löwis11437992002-04-12 09:54:03 +000020149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020150sed 's/^/| /' conftest.$ac_ext >&5
20151
Thomas Wouters477c8d52006-05-27 19:21:47 +000020152 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020153fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020154
Thomas Wouters89f507f2006-12-13 04:49:30 +000020155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020157fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020158ac_res=`eval echo '${'$as_ac_var'}'`
20159 { echo "$as_me:$LINENO: result: $ac_res" >&5
20160echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020161if test `eval echo '${'$as_ac_var'}'` = yes; then
20162 cat >>confdefs.h <<_ACEOF
20163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20164_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020165
Michael W. Hudson54241132001-12-07 15:38:26 +000020166else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020167 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020169 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20170 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020171esac
20172
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020173fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020174done
20175
Michael W. Hudson54241132001-12-07 15:38:26 +000020176
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020177LIBS=$LIBS_SAVE
20178
Guido van Rossumef2255b2000-03-10 22:30:29 +000020179# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020180if test "${ac_cv_header_wchar_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000020181 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20182echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020183if test "${ac_cv_header_wchar_h+set}" = set; then
20184 echo $ECHO_N "(cached) $ECHO_C" >&6
20185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020186{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20187echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020188else
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000020190{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20191echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020193/* confdefs.h. */
20194_ACEOF
20195cat confdefs.h >>conftest.$ac_ext
20196cat >>conftest.$ac_ext <<_ACEOF
20197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020198$ac_includes_default
20199#include <wchar.h>
20200_ACEOF
20201rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020202if { (ac_try="$ac_compile"
20203case "(($ac_try" in
20204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20205 *) ac_try_echo=$ac_try;;
20206esac
20207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020210 grep -v '^ *+' conftest.er1 >conftest.err
20211 rm -f conftest.er1
20212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020214 (exit $ac_status); } && {
20215 test -z "$ac_c_werror_flag" ||
20216 test ! -s conftest.err
20217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020218 ac_header_compiler=yes
20219else
20220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020221sed 's/^/| /' conftest.$ac_ext >&5
20222
Thomas Wouters477c8d52006-05-27 19:21:47 +000020223 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020224fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020225
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000020227{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20228echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020229
20230# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000020231{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
20232echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020234/* confdefs.h. */
20235_ACEOF
20236cat confdefs.h >>conftest.$ac_ext
20237cat >>conftest.$ac_ext <<_ACEOF
20238/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020239#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020240_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020241if { (ac_try="$ac_cpp conftest.$ac_ext"
20242case "(($ac_try" in
20243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20244 *) ac_try_echo=$ac_try;;
20245esac
20246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20247 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020248 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020249 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 rm -f conftest.er1
20251 cat conftest.err >&5
20252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020253 (exit $ac_status); } >/dev/null && {
20254 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20255 test ! -s conftest.err
20256 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020257 ac_header_preproc=yes
20258else
20259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwis11437992002-04-12 09:54:03 +000020262 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020263fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020264
Martin v. Löwis11437992002-04-12 09:54:03 +000020265rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000020266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20267echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020268
20269# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20271 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20273echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020274 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20275echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20276 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020277 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020279 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20280echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020281 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20282echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20283 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20284echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20285 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20286echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020287 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20288echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020289 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20290echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000020291 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020292## ------------------------------------------------ ##
20293## Report this to http://www.python.org/python-bugs ##
20294## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020295_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000020296 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020297 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020298esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000020299{ echo "$as_me:$LINENO: checking for wchar.h" >&5
20300echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020301if test "${ac_cv_header_wchar_h+set}" = set; then
20302 echo $ECHO_N "(cached) $ECHO_C" >&6
20303else
20304 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020305fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020306{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20307echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020308
20309fi
20310if test $ac_cv_header_wchar_h = yes; then
20311
20312
20313cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020314#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020315_ACEOF
20316
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020317 wchar_h="yes"
20318
Guido van Rossumef2255b2000-03-10 22:30:29 +000020319else
Martin v. Löwis11437992002-04-12 09:54:03 +000020320 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020321
20322fi
20323
Michael W. Hudson54241132001-12-07 15:38:26 +000020324
Martin v. Löwis11437992002-04-12 09:54:03 +000020325
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020326# determine wchar_t size
20327if test "$wchar_h" = yes
20328then
Thomas Wouters477c8d52006-05-27 19:21:47 +000020329 { echo "$as_me:$LINENO: checking for wchar_t" >&5
20330echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020331if test "${ac_cv_type_wchar_t+set}" = set; then
20332 echo $ECHO_N "(cached) $ECHO_C" >&6
20333else
20334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020340#include <wchar.h>
20341
Thomas Wouters477c8d52006-05-27 19:21:47 +000020342typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020343int
20344main ()
20345{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020346if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020348if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 return 0;
20350 ;
20351 return 0;
20352}
20353_ACEOF
20354rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020355if { (ac_try="$ac_compile"
20356case "(($ac_try" in
20357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20358 *) ac_try_echo=$ac_try;;
20359esac
20360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020363 grep -v '^ *+' conftest.er1 >conftest.err
20364 rm -f conftest.er1
20365 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020367 (exit $ac_status); } && {
20368 test -z "$ac_c_werror_flag" ||
20369 test ! -s conftest.err
20370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 ac_cv_type_wchar_t=yes
20372else
20373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020374sed 's/^/| /' conftest.$ac_ext >&5
20375
Thomas Wouters477c8d52006-05-27 19:21:47 +000020376 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020377fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020378
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020380fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020381{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20382echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020383
Thomas Wouters89f507f2006-12-13 04:49:30 +000020384# The cast to long int works around a bug in the HP C Compiler
20385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20387# This bug is HP SR number 8606223364.
Thomas Wouters477c8d52006-05-27 19:21:47 +000020388{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
20389echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020390if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20391 echo $ECHO_N "(cached) $ECHO_C" >&6
20392else
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 if test "$cross_compiling" = yes; then
20394 # Depending upon the size, compute the lo and hi bounds.
20395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020396/* confdefs.h. */
20397_ACEOF
20398cat confdefs.h >>conftest.$ac_ext
20399cat >>conftest.$ac_ext <<_ACEOF
20400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020401#include <wchar.h>
20402
Thomas Wouters89f507f2006-12-13 04:49:30 +000020403 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020404int
20405main ()
20406{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020408test_array [0] = 0
20409
20410 ;
20411 return 0;
20412}
20413_ACEOF
20414rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020415if { (ac_try="$ac_compile"
20416case "(($ac_try" in
20417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418 *) ac_try_echo=$ac_try;;
20419esac
20420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020423 grep -v '^ *+' conftest.er1 >conftest.err
20424 rm -f conftest.er1
20425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020427 (exit $ac_status); } && {
20428 test -z "$ac_c_werror_flag" ||
20429 test ! -s conftest.err
20430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020431 ac_lo=0 ac_mid=0
20432 while :; do
20433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020434/* confdefs.h. */
20435_ACEOF
20436cat confdefs.h >>conftest.$ac_ext
20437cat >>conftest.$ac_ext <<_ACEOF
20438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020439#include <wchar.h>
20440
Thomas Wouters89f507f2006-12-13 04:49:30 +000020441 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020442int
20443main ()
20444{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020446test_array [0] = 0
20447
20448 ;
20449 return 0;
20450}
20451_ACEOF
20452rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020453if { (ac_try="$ac_compile"
20454case "(($ac_try" in
20455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20456 *) ac_try_echo=$ac_try;;
20457esac
20458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020461 grep -v '^ *+' conftest.er1 >conftest.err
20462 rm -f conftest.er1
20463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020465 (exit $ac_status); } && {
20466 test -z "$ac_c_werror_flag" ||
20467 test ! -s conftest.err
20468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 ac_hi=$ac_mid; break
20470else
20471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020472sed 's/^/| /' conftest.$ac_ext >&5
20473
Thomas Wouters477c8d52006-05-27 19:21:47 +000020474 ac_lo=`expr $ac_mid + 1`
20475 if test $ac_lo -le $ac_mid; then
20476 ac_lo= ac_hi=
20477 break
20478 fi
20479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020480fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020481
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 done
20484else
20485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020486sed 's/^/| /' conftest.$ac_ext >&5
20487
Thomas Wouters477c8d52006-05-27 19:21:47 +000020488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020489/* confdefs.h. */
20490_ACEOF
20491cat confdefs.h >>conftest.$ac_ext
20492cat >>conftest.$ac_ext <<_ACEOF
20493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020494#include <wchar.h>
20495
Thomas Wouters89f507f2006-12-13 04:49:30 +000020496 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020497int
20498main ()
20499{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020501test_array [0] = 0
20502
20503 ;
20504 return 0;
20505}
20506_ACEOF
20507rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020508if { (ac_try="$ac_compile"
20509case "(($ac_try" in
20510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20511 *) ac_try_echo=$ac_try;;
20512esac
20513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020516 grep -v '^ *+' conftest.er1 >conftest.err
20517 rm -f conftest.er1
20518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020520 (exit $ac_status); } && {
20521 test -z "$ac_c_werror_flag" ||
20522 test ! -s conftest.err
20523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020524 ac_hi=-1 ac_mid=-1
20525 while :; do
20526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020527/* confdefs.h. */
20528_ACEOF
20529cat confdefs.h >>conftest.$ac_ext
20530cat >>conftest.$ac_ext <<_ACEOF
20531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020532#include <wchar.h>
20533
Thomas Wouters89f507f2006-12-13 04:49:30 +000020534 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020535int
20536main ()
20537{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020539test_array [0] = 0
20540
20541 ;
20542 return 0;
20543}
20544_ACEOF
20545rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020546if { (ac_try="$ac_compile"
20547case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
20551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020554 grep -v '^ *+' conftest.er1 >conftest.err
20555 rm -f conftest.er1
20556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020558 (exit $ac_status); } && {
20559 test -z "$ac_c_werror_flag" ||
20560 test ! -s conftest.err
20561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 ac_lo=$ac_mid; break
20563else
20564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020565sed 's/^/| /' conftest.$ac_ext >&5
20566
Thomas Wouters477c8d52006-05-27 19:21:47 +000020567 ac_hi=`expr '(' $ac_mid ')' - 1`
20568 if test $ac_mid -le $ac_hi; then
20569 ac_lo= ac_hi=
20570 break
20571 fi
20572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020574
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020576 done
20577else
20578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020579sed 's/^/| /' conftest.$ac_ext >&5
20580
Thomas Wouters477c8d52006-05-27 19:21:47 +000020581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020583
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020586
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020588# Binary search between lo and hi bounds.
20589while test "x$ac_lo" != "x$ac_hi"; do
20590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020592/* confdefs.h. */
20593_ACEOF
20594cat confdefs.h >>conftest.$ac_ext
20595cat >>conftest.$ac_ext <<_ACEOF
20596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020597#include <wchar.h>
20598
Thomas Wouters89f507f2006-12-13 04:49:30 +000020599 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020600int
20601main ()
20602{
Thomas Wouters477c8d52006-05-27 19:21:47 +000020603static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020604test_array [0] = 0
20605
20606 ;
20607 return 0;
20608}
20609_ACEOF
20610rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020611if { (ac_try="$ac_compile"
20612case "(($ac_try" in
20613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20614 *) ac_try_echo=$ac_try;;
20615esac
20616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020619 grep -v '^ *+' conftest.er1 >conftest.err
20620 rm -f conftest.er1
20621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020623 (exit $ac_status); } && {
20624 test -z "$ac_c_werror_flag" ||
20625 test ! -s conftest.err
20626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 ac_hi=$ac_mid
20628else
20629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020630sed 's/^/| /' conftest.$ac_ext >&5
20631
Thomas Wouters477c8d52006-05-27 19:21:47 +000020632 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020633fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020634
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020636done
20637case $ac_lo in
20638?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters89f507f2006-12-13 04:49:30 +000020639'') if test "$ac_cv_type_wchar_t" = yes; then
20640 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020641See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000020642echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020643See \`config.log' for more details." >&2;}
Thomas Wouters89f507f2006-12-13 04:49:30 +000020644 { (exit 77); exit 77; }; }
20645 else
20646 ac_cv_sizeof_wchar_t=0
20647 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020648esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020649else
Martin v. Löwis11437992002-04-12 09:54:03 +000020650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020651/* confdefs.h. */
20652_ACEOF
20653cat confdefs.h >>conftest.$ac_ext
20654cat >>conftest.$ac_ext <<_ACEOF
20655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020656#include <wchar.h>
20657
Thomas Wouters89f507f2006-12-13 04:49:30 +000020658 typedef wchar_t ac__type_sizeof_;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020659static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20660static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000020661#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020662#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020663int
20664main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020665{
Martin v. Löwis11437992002-04-12 09:54:03 +000020666
20667 FILE *f = fopen ("conftest.val", "w");
20668 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000020669 return 1;
20670 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000020672 long int i = longval ();
20673 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20674 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 fprintf (f, "%ld\n", i);
20676 }
20677 else
20678 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000020679 unsigned long int i = ulongval ();
20680 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20681 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 fprintf (f, "%lu\n", i);
20683 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000020684 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020685
20686 ;
20687 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000020688}
Martin v. Löwis11437992002-04-12 09:54:03 +000020689_ACEOF
20690rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020691if { (ac_try="$ac_link"
20692case "(($ac_try" in
20693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20694 *) ac_try_echo=$ac_try;;
20695esac
20696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20697 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 ac_status=$?
20699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020701 { (case "(($ac_try" in
20702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703 *) ac_try_echo=$ac_try;;
20704esac
20705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20706 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 ac_status=$?
20708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20709 (exit $ac_status); }; }; then
20710 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000020711else
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 echo "$as_me: program exited with status $ac_status" >&5
20713echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020714sed 's/^/| /' conftest.$ac_ext >&5
20715
Martin v. Löwis11437992002-04-12 09:54:03 +000020716( exit $ac_status )
Thomas Wouters89f507f2006-12-13 04:49:30 +000020717if test "$ac_cv_type_wchar_t" = yes; then
20718 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020719See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000020720echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020721See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000020722 { (exit 77); exit 77; }; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000020723 else
20724 ac_cv_sizeof_wchar_t=0
20725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020726fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020728fi
20729rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000020730fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020731{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
20732echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000020733
20734
20735
Martin v. Löwis11437992002-04-12 09:54:03 +000020736cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020737#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020738_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020739
Michael W. Hudson54241132001-12-07 15:38:26 +000020740
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020741fi
20742
Thomas Wouters477c8d52006-05-27 19:21:47 +000020743{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
20744echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020745have_ucs4_tcl=no
20746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020747/* confdefs.h. */
20748_ACEOF
20749cat confdefs.h >>conftest.$ac_ext
20750cat >>conftest.$ac_ext <<_ACEOF
20751/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020752
20753#include <tcl.h>
20754#if TCL_UTF_MAX != 6
20755# error "NOT UCS4_TCL"
20756#endif
20757int
20758main ()
20759{
20760
20761 ;
20762 return 0;
20763}
20764_ACEOF
20765rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020766if { (ac_try="$ac_compile"
20767case "(($ac_try" in
20768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20769 *) ac_try_echo=$ac_try;;
20770esac
20771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020774 grep -v '^ *+' conftest.er1 >conftest.err
20775 rm -f conftest.er1
20776 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020778 (exit $ac_status); } && {
20779 test -z "$ac_c_werror_flag" ||
20780 test ! -s conftest.err
20781 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020782
20783
20784cat >>confdefs.h <<\_ACEOF
20785#define HAVE_UCS4_TCL 1
20786_ACEOF
20787
20788 have_ucs4_tcl=yes
20789
20790else
20791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020792sed 's/^/| /' conftest.$ac_ext >&5
20793
Thomas Wouters477c8d52006-05-27 19:21:47 +000020794
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020795fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020796
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000020798{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20799echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020800
Skip Montanaro6dead952003-09-25 14:50:04 +000020801# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020802if test "$wchar_h" = yes
20803then
20804 # check whether wchar_t is signed or not
Thomas Wouters477c8d52006-05-27 19:21:47 +000020805 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20806echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020807 if test "${ac_cv_wchar_t_signed+set}" = set; then
20808 echo $ECHO_N "(cached) $ECHO_C" >&6
20809else
20810
20811 if test "$cross_compiling" = yes; then
20812 ac_cv_wchar_t_signed=yes
20813else
20814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020815/* confdefs.h. */
20816_ACEOF
20817cat confdefs.h >>conftest.$ac_ext
20818cat >>conftest.$ac_ext <<_ACEOF
20819/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020820
20821 #include <wchar.h>
20822 int main()
20823 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020824 /* Success: exit code 0 */
20825 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020826 }
20827
20828_ACEOF
20829rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020830if { (ac_try="$ac_link"
20831case "(($ac_try" in
20832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20833 *) ac_try_echo=$ac_try;;
20834esac
20835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20836 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020837 ac_status=$?
20838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020840 { (case "(($ac_try" in
20841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20842 *) ac_try_echo=$ac_try;;
20843esac
20844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20845 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020846 ac_status=$?
20847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20848 (exit $ac_status); }; }; then
20849 ac_cv_wchar_t_signed=yes
20850else
20851 echo "$as_me: program exited with status $ac_status" >&5
20852echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020853sed 's/^/| /' conftest.$ac_ext >&5
20854
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020855( exit $ac_status )
20856ac_cv_wchar_t_signed=no
20857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020859fi
20860
Thomas Wouters477c8d52006-05-27 19:21:47 +000020861
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020862fi
20863
Thomas Wouters477c8d52006-05-27 19:21:47 +000020864 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20865echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
20866fi
20867
20868{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20869echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
20870# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020871if test "${enable_unicode+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000020872 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020873else
20874 enable_unicode=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +000020875fi
20876
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020877
20878if test $enable_unicode = yes
20879then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020880 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020881 case "$have_ucs4_tcl" in
20882 yes) enable_unicode="ucs4"
20883 ;;
20884 *) enable_unicode="ucs2"
20885 ;;
20886 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020887fi
20888
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020889
20890
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020891case "$enable_unicode" in
20892ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020893 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020894#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020895_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020896
20897 ;;
20898ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020900#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020901_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020902
20903 ;;
20904esac
20905
Michael W. Hudson54241132001-12-07 15:38:26 +000020906
Martin v. Löwis11437992002-04-12 09:54:03 +000020907
20908
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020909
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020910if test "$enable_unicode" = "no"
20911then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020912 UNICODE_OBJS=""
Thomas Wouters477c8d52006-05-27 19:21:47 +000020913 { echo "$as_me:$LINENO: result: not used" >&5
20914echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020915else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020916 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020917
20918cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020919#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020920_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020921
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020922
20923 # wchar_t is only usable if it maps to an unsigned type
20924 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020925 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020926 then
20927 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020928
Martin v. Löwis11437992002-04-12 09:54:03 +000020929cat >>confdefs.h <<\_ACEOF
20930#define HAVE_USABLE_WCHAR_T 1
20931_ACEOF
20932
20933 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020934#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020935_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020936
20937 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20938 then
20939 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020941#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020942_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020943
20944 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20945 then
20946 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020947 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020948#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020949_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020950
20951 else
20952 PY_UNICODE_TYPE="no type found"
20953 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020954 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20955echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020956fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020957
20958# check for endianness
Thomas Wouters477c8d52006-05-27 19:21:47 +000020959{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20960echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020961if test "${ac_cv_c_bigendian+set}" = set; then
20962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020963else
Martin v. Löwis11437992002-04-12 09:54:03 +000020964 # See if sys/param.h defines the BYTE_ORDER macro.
20965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020966/* confdefs.h. */
20967_ACEOF
20968cat confdefs.h >>conftest.$ac_ext
20969cat >>conftest.$ac_ext <<_ACEOF
20970/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020971#include <sys/types.h>
20972#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020973
Martin v. Löwis11437992002-04-12 09:54:03 +000020974int
20975main ()
20976{
Thomas Wouters89f507f2006-12-13 04:49:30 +000020977#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
20978 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000020979 bogus endian macros
20980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020981
20982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020987if { (ac_try="$ac_compile"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
20992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000020999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
21002 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021003 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021005/* confdefs.h. */
21006_ACEOF
21007cat confdefs.h >>conftest.$ac_ext
21008cat >>conftest.$ac_ext <<_ACEOF
21009/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021010#include <sys/types.h>
21011#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021012
Martin v. Löwis11437992002-04-12 09:54:03 +000021013int
21014main ()
21015{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021016#if BYTE_ORDER != BIG_ENDIAN
21017 not big endian
21018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021019
21020 ;
21021 return 0;
21022}
21023_ACEOF
21024rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021025if { (ac_try="$ac_compile"
21026case "(($ac_try" in
21027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21028 *) ac_try_echo=$ac_try;;
21029esac
21030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021033 grep -v '^ *+' conftest.er1 >conftest.err
21034 rm -f conftest.er1
21035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021037 (exit $ac_status); } && {
21038 test -z "$ac_c_werror_flag" ||
21039 test ! -s conftest.err
21040 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021041 ac_cv_c_bigendian=yes
21042else
Martin v. Löwis11437992002-04-12 09:54:03 +000021043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021044sed 's/^/| /' conftest.$ac_ext >&5
21045
Thomas Wouters477c8d52006-05-27 19:21:47 +000021046 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021048
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021050else
Martin v. Löwis11437992002-04-12 09:54:03 +000021051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021052sed 's/^/| /' conftest.$ac_ext >&5
21053
Thomas Wouters477c8d52006-05-27 19:21:47 +000021054 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021055if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021056 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021057 ac_cv_c_bigendian=unknown
21058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021059/* confdefs.h. */
21060_ACEOF
21061cat confdefs.h >>conftest.$ac_ext
21062cat >>conftest.$ac_ext <<_ACEOF
21063/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000021064short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21065short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021066void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000021067short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21068short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021069void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021070int
21071main ()
21072{
21073 _ascii (); _ebcdic ();
21074 ;
21075 return 0;
21076}
21077_ACEOF
21078rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021079if { (ac_try="$ac_compile"
21080case "(($ac_try" in
21081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21082 *) ac_try_echo=$ac_try;;
21083esac
21084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021087 grep -v '^ *+' conftest.er1 >conftest.err
21088 rm -f conftest.er1
21089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021091 (exit $ac_status); } && {
21092 test -z "$ac_c_werror_flag" ||
21093 test ! -s conftest.err
21094 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021095 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 ac_cv_c_bigendian=yes
21097fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021098if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021099 if test "$ac_cv_c_bigendian" = unknown; then
21100 ac_cv_c_bigendian=no
21101 else
21102 # finding both strings is unlikely to happen, but who knows?
21103 ac_cv_c_bigendian=unknown
21104 fi
21105fi
21106else
21107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021108sed 's/^/| /' conftest.$ac_ext >&5
21109
Thomas Wouters477c8d52006-05-27 19:21:47 +000021110
Martin v. Löwis11437992002-04-12 09:54:03 +000021111fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021112
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021114else
21115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021116/* confdefs.h. */
21117_ACEOF
21118cat confdefs.h >>conftest.$ac_ext
21119cat >>conftest.$ac_ext <<_ACEOF
21120/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000021121$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021122int
21123main ()
21124{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021125
Guido van Rossumef2255b2000-03-10 22:30:29 +000021126 /* Are we little or big endian? From Harbison&Steele. */
21127 union
21128 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000021129 long int l;
21130 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021131 } u;
21132 u.l = 1;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021133 return u.c[sizeof (long int) - 1] == 1;
21134
21135 ;
21136 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021137}
Martin v. Löwis11437992002-04-12 09:54:03 +000021138_ACEOF
21139rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021140if { (ac_try="$ac_link"
21141case "(($ac_try" in
21142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21143 *) ac_try_echo=$ac_try;;
21144esac
21145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21146 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 ac_status=$?
21148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21149 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021150 { (case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
21154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21155 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021156 ac_status=$?
21157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21158 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021159 ac_cv_c_bigendian=no
21160else
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 echo "$as_me: program exited with status $ac_status" >&5
21162echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021163sed 's/^/| /' conftest.$ac_ext >&5
21164
Martin v. Löwis11437992002-04-12 09:54:03 +000021165( exit $ac_status )
21166ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021167fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021169fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021170
21171
Martin v. Löwis11437992002-04-12 09:54:03 +000021172fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021173
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021176{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21177echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021178case $ac_cv_c_bigendian in
21179 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021180
Martin v. Löwis11437992002-04-12 09:54:03 +000021181cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021182#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021183_ACEOF
21184 ;;
21185 no)
21186 ;;
21187 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021188 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021189presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021190echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021191presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21192 { (exit 1); exit 1; }; } ;;
21193esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021194
Michael W. Hudson54241132001-12-07 15:38:26 +000021195
Thomas Wouters477c8d52006-05-27 19:21:47 +000021196
21197
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021198# Check whether right shifting a negative integer extends the sign bit
21199# or fills with zeros (like the Cray J90, according to Tim Peters).
Thomas Wouters477c8d52006-05-27 19:21:47 +000021200{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21201echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021202if test "${ac_cv_rshift_extends_sign+set}" = set; then
21203 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021204else
Martin v. Löwis11437992002-04-12 09:54:03 +000021205
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021206if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021207 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021208else
Martin v. Löwis11437992002-04-12 09:54:03 +000021209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021210/* confdefs.h. */
21211_ACEOF
21212cat confdefs.h >>conftest.$ac_ext
21213cat >>conftest.$ac_ext <<_ACEOF
21214/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021215
21216int main()
21217{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021218 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021219}
21220
Martin v. Löwis11437992002-04-12 09:54:03 +000021221_ACEOF
21222rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021223if { (ac_try="$ac_link"
21224case "(($ac_try" in
21225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226 *) ac_try_echo=$ac_try;;
21227esac
21228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21229 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 ac_status=$?
21231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021233 { (case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
21237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21238 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 ac_status=$?
21240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021242 ac_cv_rshift_extends_sign=yes
21243else
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 echo "$as_me: program exited with status $ac_status" >&5
21245echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021246sed 's/^/| /' conftest.$ac_ext >&5
21247
Martin v. Löwis11437992002-04-12 09:54:03 +000021248( exit $ac_status )
21249ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021250fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000021252fi
21253
Thomas Wouters477c8d52006-05-27 19:21:47 +000021254
21255fi
21256
21257{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21258echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000021259if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021260then
Martin v. Löwis11437992002-04-12 09:54:03 +000021261
21262cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021263#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021264_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021265
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021266fi
21267
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021268# check for getc_unlocked and related locking functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000021269{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21270echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021271if test "${ac_cv_have_getc_unlocked+set}" = set; then
21272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021273else
Martin v. Löwis11437992002-04-12 09:54:03 +000021274
21275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021281#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021282int
21283main ()
21284{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021285
21286 FILE *f = fopen("/dev/null", "r");
21287 flockfile(f);
21288 getc_unlocked(f);
21289 funlockfile(f);
21290
Martin v. Löwis11437992002-04-12 09:54:03 +000021291 ;
21292 return 0;
21293}
21294_ACEOF
21295rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021296if { (ac_try="$ac_link"
21297case "(($ac_try" in
21298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21299 *) ac_try_echo=$ac_try;;
21300esac
21301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021304 grep -v '^ *+' conftest.er1 >conftest.err
21305 rm -f conftest.er1
21306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021308 (exit $ac_status); } && {
21309 test -z "$ac_c_werror_flag" ||
21310 test ! -s conftest.err
21311 } && test -s conftest$ac_exeext &&
21312 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021313 ac_cv_have_getc_unlocked=yes
21314else
Martin v. Löwis11437992002-04-12 09:54:03 +000021315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021316sed 's/^/| /' conftest.$ac_ext >&5
21317
Thomas Wouters477c8d52006-05-27 19:21:47 +000021318 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021319fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021320
Thomas Wouters89f507f2006-12-13 04:49:30 +000021321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021322 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021323fi
21324
Thomas Wouters477c8d52006-05-27 19:21:47 +000021325{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21326echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021327if test "$ac_cv_have_getc_unlocked" = yes
21328then
Martin v. Löwis11437992002-04-12 09:54:03 +000021329
21330cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021331#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021332_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021333
21334fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021335
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021336# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021337# save the value of LIBS so we don't actually link Python with readline
21338LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021339
Thomas Wouters477c8d52006-05-27 19:21:47 +000021340{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21341echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021342if test "${ac_cv_lib_readline_readline+set}" = set; then
21343 echo $ECHO_N "(cached) $ECHO_C" >&6
21344else
21345 ac_check_lib_save_LIBS=$LIBS
21346LIBS="-lreadline $LIBS"
21347cat >conftest.$ac_ext <<_ACEOF
21348/* confdefs.h. */
21349_ACEOF
21350cat confdefs.h >>conftest.$ac_ext
21351cat >>conftest.$ac_ext <<_ACEOF
21352/* end confdefs.h. */
21353
Thomas Wouters477c8d52006-05-27 19:21:47 +000021354/* Override any GCC internal prototype to avoid an error.
21355 Use char because int might match the return type of a GCC
21356 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021357#ifdef __cplusplus
21358extern "C"
21359#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021360char readline ();
21361int
21362main ()
21363{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021364return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021365 ;
21366 return 0;
21367}
21368_ACEOF
21369rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021370if { (ac_try="$ac_link"
21371case "(($ac_try" in
21372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21373 *) ac_try_echo=$ac_try;;
21374esac
21375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21376 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021377 ac_status=$?
21378 grep -v '^ *+' conftest.er1 >conftest.err
21379 rm -f conftest.er1
21380 cat conftest.err >&5
21381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021382 (exit $ac_status); } && {
21383 test -z "$ac_c_werror_flag" ||
21384 test ! -s conftest.err
21385 } && test -s conftest$ac_exeext &&
21386 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021387 ac_cv_lib_readline_readline=yes
21388else
21389 echo "$as_me: failed program was:" >&5
21390sed 's/^/| /' conftest.$ac_ext >&5
21391
Thomas Wouters477c8d52006-05-27 19:21:47 +000021392 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021393fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021394
Thomas Wouters89f507f2006-12-13 04:49:30 +000021395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021396 conftest$ac_exeext conftest.$ac_ext
21397LIBS=$ac_check_lib_save_LIBS
21398fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021399{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21400echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021401if test $ac_cv_lib_readline_readline = yes; then
21402 cat >>confdefs.h <<_ACEOF
21403#define HAVE_LIBREADLINE 1
21404_ACEOF
21405
21406 LIBS="-lreadline $LIBS"
21407
21408fi
21409
21410if test "$ac_cv_have_readline_readline" = no
21411then
21412
Thomas Wouters477c8d52006-05-27 19:21:47 +000021413{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21414echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021415if test "${ac_cv_lib_termcap_readline+set}" = set; then
21416 echo $ECHO_N "(cached) $ECHO_C" >&6
21417else
21418 ac_check_lib_save_LIBS=$LIBS
21419LIBS="-ltermcap $LIBS"
21420cat >conftest.$ac_ext <<_ACEOF
21421/* confdefs.h. */
21422_ACEOF
21423cat confdefs.h >>conftest.$ac_ext
21424cat >>conftest.$ac_ext <<_ACEOF
21425/* end confdefs.h. */
21426
Thomas Wouters477c8d52006-05-27 19:21:47 +000021427/* Override any GCC internal prototype to avoid an error.
21428 Use char because int might match the return type of a GCC
21429 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021430#ifdef __cplusplus
21431extern "C"
21432#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021433char readline ();
21434int
21435main ()
21436{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021437return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021438 ;
21439 return 0;
21440}
21441_ACEOF
21442rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021443if { (ac_try="$ac_link"
21444case "(($ac_try" in
21445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21446 *) ac_try_echo=$ac_try;;
21447esac
21448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21449 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021450 ac_status=$?
21451 grep -v '^ *+' conftest.er1 >conftest.err
21452 rm -f conftest.er1
21453 cat conftest.err >&5
21454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021455 (exit $ac_status); } && {
21456 test -z "$ac_c_werror_flag" ||
21457 test ! -s conftest.err
21458 } && test -s conftest$ac_exeext &&
21459 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021460 ac_cv_lib_termcap_readline=yes
21461else
21462 echo "$as_me: failed program was:" >&5
21463sed 's/^/| /' conftest.$ac_ext >&5
21464
Thomas Wouters477c8d52006-05-27 19:21:47 +000021465 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021466fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021467
Thomas Wouters89f507f2006-12-13 04:49:30 +000021468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021469 conftest$ac_exeext conftest.$ac_ext
21470LIBS=$ac_check_lib_save_LIBS
21471fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021472{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21473echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021474if test $ac_cv_lib_termcap_readline = yes; then
21475 cat >>confdefs.h <<_ACEOF
21476#define HAVE_LIBTERMCAP 1
21477_ACEOF
21478
21479 LIBS="-ltermcap $LIBS"
21480
21481fi
21482
21483fi
21484
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021485# check for readline 2.1
Thomas Wouters477c8d52006-05-27 19:21:47 +000021486{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21487echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021488if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21489 echo $ECHO_N "(cached) $ECHO_C" >&6
21490else
21491 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021492LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021493cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021494/* confdefs.h. */
21495_ACEOF
21496cat confdefs.h >>conftest.$ac_ext
21497cat >>conftest.$ac_ext <<_ACEOF
21498/* end confdefs.h. */
21499
Thomas Wouters477c8d52006-05-27 19:21:47 +000021500/* Override any GCC internal prototype to avoid an error.
21501 Use char because int might match the return type of a GCC
21502 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021503#ifdef __cplusplus
21504extern "C"
21505#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021506char rl_callback_handler_install ();
21507int
21508main ()
21509{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021510return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021511 ;
21512 return 0;
21513}
21514_ACEOF
21515rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021516if { (ac_try="$ac_link"
21517case "(($ac_try" in
21518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21519 *) ac_try_echo=$ac_try;;
21520esac
21521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21522 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021524 grep -v '^ *+' conftest.er1 >conftest.err
21525 rm -f conftest.er1
21526 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021528 (exit $ac_status); } && {
21529 test -z "$ac_c_werror_flag" ||
21530 test ! -s conftest.err
21531 } && test -s conftest$ac_exeext &&
21532 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021533 ac_cv_lib_readline_rl_callback_handler_install=yes
21534else
21535 echo "$as_me: failed program was:" >&5
21536sed 's/^/| /' conftest.$ac_ext >&5
21537
Thomas Wouters477c8d52006-05-27 19:21:47 +000021538 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021539fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021540
Thomas Wouters89f507f2006-12-13 04:49:30 +000021541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021542 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021543LIBS=$ac_check_lib_save_LIBS
21544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021545{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21546echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021547if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21548
21549cat >>confdefs.h <<\_ACEOF
21550#define HAVE_RL_CALLBACK 1
21551_ACEOF
21552
21553fi
21554
21555
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021556# check for readline 2.2
21557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021558/* confdefs.h. */
21559_ACEOF
21560cat confdefs.h >>conftest.$ac_ext
21561cat >>conftest.$ac_ext <<_ACEOF
21562/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021563#include <readline/readline.h>
21564_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021565if { (ac_try="$ac_cpp conftest.$ac_ext"
21566case "(($ac_try" in
21567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21568 *) ac_try_echo=$ac_try;;
21569esac
21570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021572 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021573 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021574 rm -f conftest.er1
21575 cat conftest.err >&5
21576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021577 (exit $ac_status); } >/dev/null && {
21578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21579 test ! -s conftest.err
21580 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021581 have_readline=yes
21582else
21583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021584sed 's/^/| /' conftest.$ac_ext >&5
21585
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021586 have_readline=no
21587fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021588
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021589rm -f conftest.err conftest.$ac_ext
21590if test $have_readline = yes
21591then
21592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021593/* confdefs.h. */
21594_ACEOF
21595cat confdefs.h >>conftest.$ac_ext
21596cat >>conftest.$ac_ext <<_ACEOF
21597/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021598#include <readline/readline.h>
21599
21600_ACEOF
21601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000021602 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021603
21604cat >>confdefs.h <<\_ACEOF
21605#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
21606_ACEOF
21607
21608fi
21609rm -f conftest*
21610
21611fi
21612
Martin v. Löwis0daad592001-09-30 21:09:59 +000021613# check for readline 4.0
Thomas Wouters477c8d52006-05-27 19:21:47 +000021614{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
21615echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021616if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
21617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000021618else
Martin v. Löwis11437992002-04-12 09:54:03 +000021619 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021620LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021622/* confdefs.h. */
21623_ACEOF
21624cat confdefs.h >>conftest.$ac_ext
21625cat >>conftest.$ac_ext <<_ACEOF
21626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021627
Thomas Wouters477c8d52006-05-27 19:21:47 +000021628/* Override any GCC internal prototype to avoid an error.
21629 Use char because int might match the return type of a GCC
21630 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021631#ifdef __cplusplus
21632extern "C"
21633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021634char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021635int
21636main ()
21637{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021638return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021639 ;
21640 return 0;
21641}
21642_ACEOF
21643rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021644if { (ac_try="$ac_link"
21645case "(($ac_try" in
21646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21647 *) ac_try_echo=$ac_try;;
21648esac
21649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021652 grep -v '^ *+' conftest.er1 >conftest.err
21653 rm -f conftest.er1
21654 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021656 (exit $ac_status); } && {
21657 test -z "$ac_c_werror_flag" ||
21658 test ! -s conftest.err
21659 } && test -s conftest$ac_exeext &&
21660 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000021662else
Martin v. Löwis11437992002-04-12 09:54:03 +000021663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021664sed 's/^/| /' conftest.$ac_ext >&5
21665
Thomas Wouters477c8d52006-05-27 19:21:47 +000021666 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000021667fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021668
Thomas Wouters89f507f2006-12-13 04:49:30 +000021669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021671LIBS=$ac_check_lib_save_LIBS
21672fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021673{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
21674echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021675if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021676
Martin v. Löwis11437992002-04-12 09:54:03 +000021677cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021678#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021679_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021680
Martin v. Löwis0daad592001-09-30 21:09:59 +000021681fi
21682
Michael W. Hudson54241132001-12-07 15:38:26 +000021683
Martin v. Löwis0daad592001-09-30 21:09:59 +000021684# check for readline 4.2
Thomas Wouters477c8d52006-05-27 19:21:47 +000021685{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
21686echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021687if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
21688 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000021689else
Martin v. Löwis11437992002-04-12 09:54:03 +000021690 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021691LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021693/* confdefs.h. */
21694_ACEOF
21695cat confdefs.h >>conftest.$ac_ext
21696cat >>conftest.$ac_ext <<_ACEOF
21697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021698
Thomas Wouters477c8d52006-05-27 19:21:47 +000021699/* Override any GCC internal prototype to avoid an error.
21700 Use char because int might match the return type of a GCC
21701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021702#ifdef __cplusplus
21703extern "C"
21704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021705char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021706int
21707main ()
21708{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021709return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021710 ;
21711 return 0;
21712}
21713_ACEOF
21714rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021715if { (ac_try="$ac_link"
21716case "(($ac_try" in
21717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21718 *) ac_try_echo=$ac_try;;
21719esac
21720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21721 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021723 grep -v '^ *+' conftest.er1 >conftest.err
21724 rm -f conftest.er1
21725 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021727 (exit $ac_status); } && {
21728 test -z "$ac_c_werror_flag" ||
21729 test ! -s conftest.err
21730 } && test -s conftest$ac_exeext &&
21731 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000021733else
Martin v. Löwis11437992002-04-12 09:54:03 +000021734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021735sed 's/^/| /' conftest.$ac_ext >&5
21736
Thomas Wouters477c8d52006-05-27 19:21:47 +000021737 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000021738fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021739
Thomas Wouters89f507f2006-12-13 04:49:30 +000021740rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021742LIBS=$ac_check_lib_save_LIBS
21743fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021744{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
21745echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021746if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021747
Martin v. Löwis11437992002-04-12 09:54:03 +000021748cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021749#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021750_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021751
Guido van Rossum353ae582001-07-10 16:45:32 +000021752fi
21753
Jack Jansendd19cf82001-12-06 22:36:17 +000021754
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021755# also in readline 4.2
21756cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021757/* confdefs.h. */
21758_ACEOF
21759cat confdefs.h >>conftest.$ac_ext
21760cat >>conftest.$ac_ext <<_ACEOF
21761/* end confdefs.h. */
21762#include <readline/readline.h>
21763_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021764if { (ac_try="$ac_cpp conftest.$ac_ext"
21765case "(($ac_try" in
21766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21767 *) ac_try_echo=$ac_try;;
21768esac
21769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021771 ac_status=$?
21772 grep -v '^ *+' conftest.er1 >conftest.err
21773 rm -f conftest.er1
21774 cat conftest.err >&5
21775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000021776 (exit $ac_status); } >/dev/null && {
21777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21778 test ! -s conftest.err
21779 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021780 have_readline=yes
21781else
21782 echo "$as_me: failed program was:" >&5
21783sed 's/^/| /' conftest.$ac_ext >&5
21784
21785 have_readline=no
21786fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021787
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021788rm -f conftest.err conftest.$ac_ext
21789if test $have_readline = yes
21790then
21791 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021792/* confdefs.h. */
21793_ACEOF
21794cat confdefs.h >>conftest.$ac_ext
21795cat >>conftest.$ac_ext <<_ACEOF
21796/* end confdefs.h. */
21797#include <readline/readline.h>
21798
21799_ACEOF
21800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21801 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
21802
21803cat >>confdefs.h <<\_ACEOF
21804#define HAVE_RL_CATCH_SIGNAL 1
21805_ACEOF
21806
21807fi
21808rm -f conftest*
21809
21810fi
21811
Martin v. Löwis82bca632006-02-10 20:49:30 +000021812# End of readline checks: restore LIBS
21813LIBS=$LIBS_no_readline
21814
Thomas Wouters477c8d52006-05-27 19:21:47 +000021815{ echo "$as_me:$LINENO: checking for broken nice()" >&5
21816echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021817if test "${ac_cv_broken_nice+set}" = set; then
21818 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021819else
Martin v. Löwis11437992002-04-12 09:54:03 +000021820
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021821if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021822 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021823else
Martin v. Löwis11437992002-04-12 09:54:03 +000021824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021825/* confdefs.h. */
21826_ACEOF
21827cat confdefs.h >>conftest.$ac_ext
21828cat >>conftest.$ac_ext <<_ACEOF
21829/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021830
21831int main()
21832{
21833 int val1 = nice(1);
21834 if (val1 != -1 && val1 == nice(2))
21835 exit(0);
21836 exit(1);
21837}
21838
Martin v. Löwis11437992002-04-12 09:54:03 +000021839_ACEOF
21840rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021841if { (ac_try="$ac_link"
21842case "(($ac_try" in
21843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21844 *) ac_try_echo=$ac_try;;
21845esac
21846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021848 ac_status=$?
21849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021851 { (case "(($ac_try" in
21852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21853 *) ac_try_echo=$ac_try;;
21854esac
21855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21856 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021857 ac_status=$?
21858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21859 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021860 ac_cv_broken_nice=yes
21861else
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 echo "$as_me: program exited with status $ac_status" >&5
21863echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021864sed 's/^/| /' conftest.$ac_ext >&5
21865
Martin v. Löwis11437992002-04-12 09:54:03 +000021866( exit $ac_status )
21867ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021870fi
21871
Thomas Wouters477c8d52006-05-27 19:21:47 +000021872
21873fi
21874
21875{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21876echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021877if test "$ac_cv_broken_nice" = yes
21878then
Martin v. Löwis11437992002-04-12 09:54:03 +000021879
21880cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021881#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021882_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021883
21884fi
21885
Thomas Wouters477c8d52006-05-27 19:21:47 +000021886{ echo "$as_me:$LINENO: checking for broken poll()" >&5
21887echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021888if test "$cross_compiling" = yes; then
21889 ac_cv_broken_poll=no
21890else
21891 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021892/* confdefs.h. */
21893_ACEOF
21894cat confdefs.h >>conftest.$ac_ext
21895cat >>conftest.$ac_ext <<_ACEOF
21896/* end confdefs.h. */
21897
21898#include <poll.h>
21899
21900int main (void)
21901 {
21902 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21903
21904 close (42);
21905
21906 int poll_test = poll (&poll_struct, 1, 0);
21907
21908 if (poll_test < 0)
21909 {
21910 exit(0);
21911 }
21912 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21913 {
21914 exit(0);
21915 }
21916 else
21917 {
21918 exit(1);
21919 }
21920 }
21921
21922_ACEOF
21923rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021924if { (ac_try="$ac_link"
21925case "(($ac_try" in
21926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21927 *) ac_try_echo=$ac_try;;
21928esac
21929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21930 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021931 ac_status=$?
21932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021934 { (case "(($ac_try" in
21935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21936 *) ac_try_echo=$ac_try;;
21937esac
21938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21939 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021940 ac_status=$?
21941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21942 (exit $ac_status); }; }; then
21943 ac_cv_broken_poll=yes
21944else
21945 echo "$as_me: program exited with status $ac_status" >&5
21946echo "$as_me: failed program was:" >&5
21947sed 's/^/| /' conftest.$ac_ext >&5
21948
21949( exit $ac_status )
21950ac_cv_broken_poll=no
21951fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021953fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021954
21955
21956{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21957echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021958if test "$ac_cv_broken_poll" = yes
21959then
21960
21961cat >>confdefs.h <<\_ACEOF
21962#define HAVE_BROKEN_POLL 1
21963_ACEOF
21964
21965fi
21966
Brett Cannon43802422005-02-10 20:48:03 +000021967# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000021968# (which is not required by ISO C or UNIX spec) and/or if we support
21969# tzname[]
Thomas Wouters477c8d52006-05-27 19:21:47 +000021970{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21971echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000021972if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21973 echo $ECHO_N "(cached) $ECHO_C" >&6
21974else
21975 cat >conftest.$ac_ext <<_ACEOF
21976/* confdefs.h. */
21977_ACEOF
21978cat confdefs.h >>conftest.$ac_ext
21979cat >>conftest.$ac_ext <<_ACEOF
21980/* end confdefs.h. */
21981#include <sys/types.h>
21982#include <$ac_cv_struct_tm>
21983
21984
21985int
21986main ()
21987{
21988static struct tm ac_aggr;
21989if (ac_aggr.tm_zone)
21990return 0;
21991 ;
21992 return 0;
21993}
21994_ACEOF
21995rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021996if { (ac_try="$ac_compile"
21997case "(($ac_try" in
21998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21999 *) ac_try_echo=$ac_try;;
22000esac
22001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22002 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022003 ac_status=$?
22004 grep -v '^ *+' conftest.er1 >conftest.err
22005 rm -f conftest.er1
22006 cat conftest.err >&5
22007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022008 (exit $ac_status); } && {
22009 test -z "$ac_c_werror_flag" ||
22010 test ! -s conftest.err
22011 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022012 ac_cv_member_struct_tm_tm_zone=yes
22013else
22014 echo "$as_me: failed program was:" >&5
22015sed 's/^/| /' conftest.$ac_ext >&5
22016
Thomas Wouters477c8d52006-05-27 19:21:47 +000022017 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022018/* confdefs.h. */
22019_ACEOF
22020cat confdefs.h >>conftest.$ac_ext
22021cat >>conftest.$ac_ext <<_ACEOF
22022/* end confdefs.h. */
22023#include <sys/types.h>
22024#include <$ac_cv_struct_tm>
22025
22026
22027int
22028main ()
22029{
22030static struct tm ac_aggr;
22031if (sizeof ac_aggr.tm_zone)
22032return 0;
22033 ;
22034 return 0;
22035}
22036_ACEOF
22037rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022038if { (ac_try="$ac_compile"
22039case "(($ac_try" in
22040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22041 *) ac_try_echo=$ac_try;;
22042esac
22043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22044 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022045 ac_status=$?
22046 grep -v '^ *+' conftest.er1 >conftest.err
22047 rm -f conftest.er1
22048 cat conftest.err >&5
22049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022050 (exit $ac_status); } && {
22051 test -z "$ac_c_werror_flag" ||
22052 test ! -s conftest.err
22053 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022054 ac_cv_member_struct_tm_tm_zone=yes
22055else
22056 echo "$as_me: failed program was:" >&5
22057sed 's/^/| /' conftest.$ac_ext >&5
22058
Thomas Wouters477c8d52006-05-27 19:21:47 +000022059 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022061
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022064
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022067{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22068echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022069if test $ac_cv_member_struct_tm_tm_zone = yes; then
22070
22071cat >>confdefs.h <<_ACEOF
22072#define HAVE_STRUCT_TM_TM_ZONE 1
22073_ACEOF
22074
22075
22076fi
22077
22078if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22079
22080cat >>confdefs.h <<\_ACEOF
22081#define HAVE_TM_ZONE 1
22082_ACEOF
22083
22084else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022085 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22086echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22087if test "${ac_cv_have_decl_tzname+set}" = set; then
22088 echo $ECHO_N "(cached) $ECHO_C" >&6
22089else
22090 cat >conftest.$ac_ext <<_ACEOF
22091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
22096#include <time.h>
22097
22098int
22099main ()
22100{
22101#ifndef tzname
Thomas Wouters89f507f2006-12-13 04:49:30 +000022102 (void) tzname;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022103#endif
22104
22105 ;
22106 return 0;
22107}
22108_ACEOF
22109rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022110if { (ac_try="$ac_compile"
22111case "(($ac_try" in
22112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22113 *) ac_try_echo=$ac_try;;
22114esac
22115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22116 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000022117 ac_status=$?
22118 grep -v '^ *+' conftest.er1 >conftest.err
22119 rm -f conftest.er1
22120 cat conftest.err >&5
22121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022122 (exit $ac_status); } && {
22123 test -z "$ac_c_werror_flag" ||
22124 test ! -s conftest.err
22125 } && test -s conftest.$ac_objext; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022126 ac_cv_have_decl_tzname=yes
22127else
22128 echo "$as_me: failed program was:" >&5
22129sed 's/^/| /' conftest.$ac_ext >&5
22130
22131 ac_cv_have_decl_tzname=no
22132fi
22133
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022135fi
22136{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22137echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22138if test $ac_cv_have_decl_tzname = yes; then
22139
22140cat >>confdefs.h <<_ACEOF
22141#define HAVE_DECL_TZNAME 1
22142_ACEOF
22143
22144
22145else
22146 cat >>confdefs.h <<_ACEOF
22147#define HAVE_DECL_TZNAME 0
22148_ACEOF
22149
22150
22151fi
22152
22153
22154 { echo "$as_me:$LINENO: checking for tzname" >&5
22155echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022156if test "${ac_cv_var_tzname+set}" = set; then
22157 echo $ECHO_N "(cached) $ECHO_C" >&6
22158else
22159 cat >conftest.$ac_ext <<_ACEOF
22160/* confdefs.h. */
22161_ACEOF
22162cat confdefs.h >>conftest.$ac_ext
22163cat >>conftest.$ac_ext <<_ACEOF
22164/* end confdefs.h. */
22165#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000022166#if !HAVE_DECL_TZNAME
22167extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000022168#endif
22169
22170int
22171main ()
22172{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022173return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000022174 ;
22175 return 0;
22176}
22177_ACEOF
22178rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022179if { (ac_try="$ac_link"
22180case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
22184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22185 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022186 ac_status=$?
22187 grep -v '^ *+' conftest.er1 >conftest.err
22188 rm -f conftest.er1
22189 cat conftest.err >&5
22190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022191 (exit $ac_status); } && {
22192 test -z "$ac_c_werror_flag" ||
22193 test ! -s conftest.err
22194 } && test -s conftest$ac_exeext &&
22195 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000022196 ac_cv_var_tzname=yes
22197else
22198 echo "$as_me: failed program was:" >&5
22199sed 's/^/| /' conftest.$ac_ext >&5
22200
Thomas Wouters477c8d52006-05-27 19:21:47 +000022201 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022202fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022203
Thomas Wouters89f507f2006-12-13 04:49:30 +000022204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000022205 conftest$ac_exeext conftest.$ac_ext
22206fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022207{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22208echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022209 if test $ac_cv_var_tzname = yes; then
22210
22211cat >>confdefs.h <<\_ACEOF
22212#define HAVE_TZNAME 1
22213_ACEOF
22214
22215 fi
22216fi
22217
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022218
Martin v. Löwis1d459062005-03-14 21:23:33 +000022219# check tzset(3) exists and works like we expect it to
Thomas Wouters477c8d52006-05-27 19:21:47 +000022220{ echo "$as_me:$LINENO: checking for working tzset()" >&5
22221echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022222if test "${ac_cv_working_tzset+set}" = set; then
22223 echo $ECHO_N "(cached) $ECHO_C" >&6
22224else
22225
22226if test "$cross_compiling" = yes; then
22227 ac_cv_working_tzset=no
22228else
22229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022230/* confdefs.h. */
22231_ACEOF
22232cat confdefs.h >>conftest.$ac_ext
22233cat >>conftest.$ac_ext <<_ACEOF
22234/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022235
22236#include <stdlib.h>
22237#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022238#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022239
22240#if HAVE_TZNAME
22241extern char *tzname[];
22242#endif
22243
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022244int main()
22245{
Brett Cannon18367812003-09-19 00:59:16 +000022246 /* Note that we need to ensure that not only does tzset(3)
22247 do 'something' with localtime, but it works as documented
22248 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022249 This includes making sure that tzname is set properly if
22250 tm->tm_zone does not exist since it is the alternative way
22251 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022252
22253 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022254 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022255 */
22256
Martin v. Löwis1d459062005-03-14 21:23:33 +000022257 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022258 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22259
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022260 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022261 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022262 if (localtime(&groundhogday)->tm_hour != 0)
22263 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022264#if HAVE_TZNAME
22265 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22266 if (strcmp(tzname[0], "UTC") ||
22267 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22268 exit(1);
22269#endif
Brett Cannon18367812003-09-19 00:59:16 +000022270
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022271 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022272 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022273 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022275#if HAVE_TZNAME
22276 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22277 exit(1);
22278#endif
Brett Cannon18367812003-09-19 00:59:16 +000022279
22280 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22281 tzset();
22282 if (localtime(&groundhogday)->tm_hour != 11)
22283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022284#if HAVE_TZNAME
22285 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22286 exit(1);
22287#endif
22288
22289#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022290 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22291 exit(1);
22292 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022294#endif
Brett Cannon18367812003-09-19 00:59:16 +000022295
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022296 exit(0);
22297}
22298
22299_ACEOF
22300rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022301if { (ac_try="$ac_link"
22302case "(($ac_try" in
22303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22304 *) ac_try_echo=$ac_try;;
22305esac
22306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22307 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022308 ac_status=$?
22309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022311 { (case "(($ac_try" in
22312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22313 *) ac_try_echo=$ac_try;;
22314esac
22315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22316 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022317 ac_status=$?
22318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22319 (exit $ac_status); }; }; then
22320 ac_cv_working_tzset=yes
22321else
22322 echo "$as_me: program exited with status $ac_status" >&5
22323echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022324sed 's/^/| /' conftest.$ac_ext >&5
22325
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022326( exit $ac_status )
22327ac_cv_working_tzset=no
22328fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022330fi
22331
Thomas Wouters477c8d52006-05-27 19:21:47 +000022332
22333fi
22334
22335{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22336echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022337if test "$ac_cv_working_tzset" = yes
22338then
22339
22340cat >>confdefs.h <<\_ACEOF
22341#define HAVE_WORKING_TZSET 1
22342_ACEOF
22343
22344fi
22345
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022346# Look for subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000022347{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22348echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022349if test "${ac_cv_stat_tv_nsec+set}" = set; then
22350 echo $ECHO_N "(cached) $ECHO_C" >&6
22351else
22352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022353/* confdefs.h. */
22354_ACEOF
22355cat confdefs.h >>conftest.$ac_ext
22356cat >>conftest.$ac_ext <<_ACEOF
22357/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022358#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022359int
22360main ()
22361{
22362
22363struct stat st;
22364st.st_mtim.tv_nsec = 1;
22365
22366 ;
22367 return 0;
22368}
22369_ACEOF
22370rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022371if { (ac_try="$ac_compile"
22372case "(($ac_try" in
22373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22374 *) ac_try_echo=$ac_try;;
22375esac
22376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022379 grep -v '^ *+' conftest.er1 >conftest.err
22380 rm -f conftest.er1
22381 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022383 (exit $ac_status); } && {
22384 test -z "$ac_c_werror_flag" ||
22385 test ! -s conftest.err
22386 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022387 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022388else
22389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022390sed 's/^/| /' conftest.$ac_ext >&5
22391
Thomas Wouters477c8d52006-05-27 19:21:47 +000022392 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022393fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022394
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022396fi
22397
Thomas Wouters477c8d52006-05-27 19:21:47 +000022398{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22399echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022400if test "$ac_cv_stat_tv_nsec" = yes
22401then
22402
22403cat >>confdefs.h <<\_ACEOF
22404#define HAVE_STAT_TV_NSEC 1
22405_ACEOF
22406
22407fi
22408
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022409# Look for BSD style subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000022410{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22411echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022412if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22413 echo $ECHO_N "(cached) $ECHO_C" >&6
22414else
22415 cat >conftest.$ac_ext <<_ACEOF
22416/* confdefs.h. */
22417_ACEOF
22418cat confdefs.h >>conftest.$ac_ext
22419cat >>conftest.$ac_ext <<_ACEOF
22420/* end confdefs.h. */
22421#include <sys/stat.h>
22422int
22423main ()
22424{
22425
22426struct stat st;
22427st.st_mtimespec.tv_nsec = 1;
22428
22429 ;
22430 return 0;
22431}
22432_ACEOF
22433rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022434if { (ac_try="$ac_compile"
22435case "(($ac_try" in
22436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22437 *) ac_try_echo=$ac_try;;
22438esac
22439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022441 ac_status=$?
22442 grep -v '^ *+' conftest.er1 >conftest.err
22443 rm -f conftest.er1
22444 cat conftest.err >&5
22445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022446 (exit $ac_status); } && {
22447 test -z "$ac_c_werror_flag" ||
22448 test ! -s conftest.err
22449 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022450 ac_cv_stat_tv_nsec2=yes
22451else
22452 echo "$as_me: failed program was:" >&5
22453sed 's/^/| /' conftest.$ac_ext >&5
22454
Thomas Wouters477c8d52006-05-27 19:21:47 +000022455 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022456fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022457
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022459fi
22460
Thomas Wouters477c8d52006-05-27 19:21:47 +000022461{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22462echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022463if test "$ac_cv_stat_tv_nsec2" = yes
22464then
22465
22466cat >>confdefs.h <<\_ACEOF
22467#define HAVE_STAT_TV_NSEC2 1
22468_ACEOF
22469
22470fi
22471
Jack Jansen666b1e72001-10-31 12:11:48 +000022472# On HP/UX 11.0, mvwdelch is a block with a return statement
Thomas Wouters477c8d52006-05-27 19:21:47 +000022473{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22474echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022475if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22476 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022477else
Martin v. Löwis11437992002-04-12 09:54:03 +000022478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022479/* confdefs.h. */
22480_ACEOF
22481cat confdefs.h >>conftest.$ac_ext
22482cat >>conftest.$ac_ext <<_ACEOF
22483/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022484#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022485int
22486main ()
22487{
Jack Jansen666b1e72001-10-31 12:11:48 +000022488
22489 int rtn;
22490 rtn = mvwdelch(0,0,0);
22491
Martin v. Löwis11437992002-04-12 09:54:03 +000022492 ;
22493 return 0;
22494}
22495_ACEOF
22496rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022497if { (ac_try="$ac_compile"
22498case "(($ac_try" in
22499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22500 *) ac_try_echo=$ac_try;;
22501esac
22502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022505 grep -v '^ *+' conftest.er1 >conftest.err
22506 rm -f conftest.er1
22507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022509 (exit $ac_status); } && {
22510 test -z "$ac_c_werror_flag" ||
22511 test ! -s conftest.err
22512 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022513 ac_cv_mvwdelch_is_expression=yes
22514else
Martin v. Löwis11437992002-04-12 09:54:03 +000022515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022516sed 's/^/| /' conftest.$ac_ext >&5
22517
Thomas Wouters477c8d52006-05-27 19:21:47 +000022518 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022519fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022520
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022522fi
22523
Thomas Wouters477c8d52006-05-27 19:21:47 +000022524{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22525echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000022526
22527if test "$ac_cv_mvwdelch_is_expression" = yes
22528then
Martin v. Löwis11437992002-04-12 09:54:03 +000022529
22530cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022531#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022532_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022533
22534fi
22535
Thomas Wouters477c8d52006-05-27 19:21:47 +000022536{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
22537echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022538if test "${ac_cv_window_has_flags+set}" = set; then
22539 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022540else
Martin v. Löwis11437992002-04-12 09:54:03 +000022541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022542/* confdefs.h. */
22543_ACEOF
22544cat confdefs.h >>conftest.$ac_ext
22545cat >>conftest.$ac_ext <<_ACEOF
22546/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022547#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022548int
22549main ()
22550{
Jack Jansen666b1e72001-10-31 12:11:48 +000022551
22552 WINDOW *w;
22553 w->_flags = 0;
22554
Martin v. Löwis11437992002-04-12 09:54:03 +000022555 ;
22556 return 0;
22557}
22558_ACEOF
22559rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022560if { (ac_try="$ac_compile"
22561case "(($ac_try" in
22562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22563 *) ac_try_echo=$ac_try;;
22564esac
22565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022568 grep -v '^ *+' conftest.er1 >conftest.err
22569 rm -f conftest.er1
22570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022572 (exit $ac_status); } && {
22573 test -z "$ac_c_werror_flag" ||
22574 test ! -s conftest.err
22575 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022576 ac_cv_window_has_flags=yes
22577else
Martin v. Löwis11437992002-04-12 09:54:03 +000022578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022579sed 's/^/| /' conftest.$ac_ext >&5
22580
Thomas Wouters477c8d52006-05-27 19:21:47 +000022581 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022583
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022585fi
22586
Thomas Wouters477c8d52006-05-27 19:21:47 +000022587{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
22588echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022589
Jack Jansen666b1e72001-10-31 12:11:48 +000022590
22591if test "$ac_cv_window_has_flags" = yes
22592then
Martin v. Löwis11437992002-04-12 09:54:03 +000022593
22594cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022595#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022596_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022597
22598fi
22599
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022600{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
22601echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
22602cat >conftest.$ac_ext <<_ACEOF
22603/* confdefs.h. */
22604_ACEOF
22605cat confdefs.h >>conftest.$ac_ext
22606cat >>conftest.$ac_ext <<_ACEOF
22607/* end confdefs.h. */
22608#include <curses.h>
22609int
22610main ()
22611{
22612void *x=is_term_resized
22613 ;
22614 return 0;
22615}
22616_ACEOF
22617rm -f conftest.$ac_objext
22618if { (ac_try="$ac_compile"
22619case "(($ac_try" in
22620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22621 *) ac_try_echo=$ac_try;;
22622esac
22623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22624 (eval "$ac_compile") 2>conftest.er1
22625 ac_status=$?
22626 grep -v '^ *+' conftest.er1 >conftest.err
22627 rm -f conftest.er1
22628 cat conftest.err >&5
22629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022630 (exit $ac_status); } && {
22631 test -z "$ac_c_werror_flag" ||
22632 test ! -s conftest.err
22633 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022634
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022635cat >>confdefs.h <<\_ACEOF
22636#define HAVE_CURSES_IS_TERM_RESIZED 1
22637_ACEOF
22638
Thomas Wouters477c8d52006-05-27 19:21:47 +000022639 { echo "$as_me:$LINENO: result: yes" >&5
22640echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022641else
22642 echo "$as_me: failed program was:" >&5
22643sed 's/^/| /' conftest.$ac_ext >&5
22644
22645 { echo "$as_me:$LINENO: result: no" >&5
22646echo "${ECHO_T}no" >&6; }
22647
22648fi
22649
22650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22651
22652{ echo "$as_me:$LINENO: checking for resize_term" >&5
22653echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
22654cat >conftest.$ac_ext <<_ACEOF
22655/* confdefs.h. */
22656_ACEOF
22657cat confdefs.h >>conftest.$ac_ext
22658cat >>conftest.$ac_ext <<_ACEOF
22659/* end confdefs.h. */
22660#include <curses.h>
22661int
22662main ()
22663{
22664void *x=resize_term
22665 ;
22666 return 0;
22667}
22668_ACEOF
22669rm -f conftest.$ac_objext
22670if { (ac_try="$ac_compile"
22671case "(($ac_try" in
22672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22673 *) ac_try_echo=$ac_try;;
22674esac
22675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22676 (eval "$ac_compile") 2>conftest.er1
22677 ac_status=$?
22678 grep -v '^ *+' conftest.er1 >conftest.err
22679 rm -f conftest.er1
22680 cat conftest.err >&5
22681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022682 (exit $ac_status); } && {
22683 test -z "$ac_c_werror_flag" ||
22684 test ! -s conftest.err
22685 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022686
22687cat >>confdefs.h <<\_ACEOF
22688#define HAVE_CURSES_RESIZE_TERM 1
22689_ACEOF
22690
22691 { echo "$as_me:$LINENO: result: yes" >&5
22692echo "${ECHO_T}yes" >&6; }
22693else
22694 echo "$as_me: failed program was:" >&5
22695sed 's/^/| /' conftest.$ac_ext >&5
22696
22697 { echo "$as_me:$LINENO: result: no" >&5
22698echo "${ECHO_T}no" >&6; }
22699
22700fi
22701
22702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22703
22704{ echo "$as_me:$LINENO: checking for resizeterm" >&5
22705echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
22706cat >conftest.$ac_ext <<_ACEOF
22707/* confdefs.h. */
22708_ACEOF
22709cat confdefs.h >>conftest.$ac_ext
22710cat >>conftest.$ac_ext <<_ACEOF
22711/* end confdefs.h. */
22712#include <curses.h>
22713int
22714main ()
22715{
22716void *x=resizeterm
22717 ;
22718 return 0;
22719}
22720_ACEOF
22721rm -f conftest.$ac_objext
22722if { (ac_try="$ac_compile"
22723case "(($ac_try" in
22724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22725 *) ac_try_echo=$ac_try;;
22726esac
22727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22728 (eval "$ac_compile") 2>conftest.er1
22729 ac_status=$?
22730 grep -v '^ *+' conftest.er1 >conftest.err
22731 rm -f conftest.er1
22732 cat conftest.err >&5
22733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022734 (exit $ac_status); } && {
22735 test -z "$ac_c_werror_flag" ||
22736 test ! -s conftest.err
22737 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022738
22739cat >>confdefs.h <<\_ACEOF
22740#define HAVE_CURSES_RESIZETERM 1
22741_ACEOF
22742
22743 { echo "$as_me:$LINENO: result: yes" >&5
22744echo "${ECHO_T}yes" >&6; }
22745else
22746 echo "$as_me: failed program was:" >&5
22747sed 's/^/| /' conftest.$ac_ext >&5
22748
22749 { echo "$as_me:$LINENO: result: no" >&5
22750echo "${ECHO_T}no" >&6; }
22751
22752fi
22753
22754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22755
22756{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
22757echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000022758
22759if test -r /dev/ptmx
22760then
22761 { echo "$as_me:$LINENO: result: yes" >&5
22762echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022763
22764cat >>confdefs.h <<\_ACEOF
22765#define HAVE_DEV_PTMX 1
22766_ACEOF
22767
Thomas Wouters89f507f2006-12-13 04:49:30 +000022768else
22769 { echo "$as_me:$LINENO: result: no" >&5
22770echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022771fi
22772
Thomas Wouters477c8d52006-05-27 19:21:47 +000022773{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
22774echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000022775
22776if test -r /dev/ptc
22777then
22778 { echo "$as_me:$LINENO: result: yes" >&5
22779echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000022780
22781cat >>confdefs.h <<\_ACEOF
22782#define HAVE_DEV_PTC 1
22783_ACEOF
22784
Thomas Wouters89f507f2006-12-13 04:49:30 +000022785else
22786 { echo "$as_me:$LINENO: result: no" >&5
22787echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000022788fi
22789
Thomas Wouters477c8d52006-05-27 19:21:47 +000022790{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
22791echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
22792if test "$cross_compiling" = yes; then
22793 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22794See \`config.log' for more details." >&5
22795echo "$as_me: error: cannot run test program while cross compiling
22796See \`config.log' for more details." >&2;}
22797 { (exit 1); exit 1; }; }
22798else
22799 cat >conftest.$ac_ext <<_ACEOF
22800/* confdefs.h. */
22801_ACEOF
22802cat confdefs.h >>conftest.$ac_ext
22803cat >>conftest.$ac_ext <<_ACEOF
22804/* end confdefs.h. */
22805#include <stdio.h>
22806#include <stddef.h>
22807#include <string.h>
22808
22809int main()
22810{
Thomas Wouters89f507f2006-12-13 04:49:30 +000022811 char buffer[256];
22812
22813#ifdef HAVE_SSIZE_T
22814typedef ssize_t Py_ssize_t;
22815#elif SIZEOF_VOID_P == SIZEOF_LONG
22816typedef long Py_ssize_t;
22817#else
22818typedef int Py_ssize_t;
22819#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000022820
22821 if(sprintf(buffer, "%zd", (size_t)123) < 0)
22822 return 1;
22823
Thomas Wouters89f507f2006-12-13 04:49:30 +000022824 if (strcmp(buffer, "123"))
22825 return 1;
22826
22827 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
22828 return 1;
22829
22830 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000022831 return 1;
22832
22833 return 0;
22834}
22835_ACEOF
22836rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022837if { (ac_try="$ac_link"
22838case "(($ac_try" in
22839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22840 *) ac_try_echo=$ac_try;;
22841esac
22842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22843 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000022844 ac_status=$?
22845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022847 { (case "(($ac_try" in
22848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22849 *) ac_try_echo=$ac_try;;
22850esac
22851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22852 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000022853 ac_status=$?
22854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22855 (exit $ac_status); }; }; then
22856 { echo "$as_me:$LINENO: result: yes" >&5
22857echo "${ECHO_T}yes" >&6; }
22858
22859cat >>confdefs.h <<\_ACEOF
22860#define PY_FORMAT_SIZE_T "z"
22861_ACEOF
22862
22863else
22864 echo "$as_me: program exited with status $ac_status" >&5
22865echo "$as_me: failed program was:" >&5
22866sed 's/^/| /' conftest.$ac_ext >&5
22867
22868( exit $ac_status )
22869{ echo "$as_me:$LINENO: result: no" >&5
22870echo "${ECHO_T}no" >&6; }
22871fi
22872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22873fi
22874
22875
22876
22877{ echo "$as_me:$LINENO: checking for socklen_t" >&5
22878echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022879if test "${ac_cv_type_socklen_t+set}" = set; then
22880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000022881else
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000022888
22889#ifdef HAVE_SYS_TYPES_H
22890#include <sys/types.h>
22891#endif
22892#ifdef HAVE_SYS_SOCKET_H
22893#include <sys/socket.h>
22894#endif
22895
22896
Thomas Wouters477c8d52006-05-27 19:21:47 +000022897typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022898int
22899main ()
22900{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022901if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022903if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022904 return 0;
22905 ;
22906 return 0;
22907}
22908_ACEOF
22909rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022910if { (ac_try="$ac_compile"
22911case "(($ac_try" in
22912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22913 *) ac_try_echo=$ac_try;;
22914esac
22915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022918 grep -v '^ *+' conftest.er1 >conftest.err
22919 rm -f conftest.er1
22920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89f507f2006-12-13 04:49:30 +000022922 (exit $ac_status); } && {
22923 test -z "$ac_c_werror_flag" ||
22924 test ! -s conftest.err
22925 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000022926 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000022927else
Martin v. Löwis11437992002-04-12 09:54:03 +000022928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022929sed 's/^/| /' conftest.$ac_ext >&5
22930
Thomas Wouters477c8d52006-05-27 19:21:47 +000022931 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000022932fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022933
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022935fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022936{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22937echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022938if test $ac_cv_type_socklen_t = yes; then
22939 :
22940else
Guido van Rossum95713eb2000-05-18 20:53:31 +000022941
Martin v. Löwis01c04012002-11-11 14:58:44 +000022942cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022943#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000022944_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022945
22946fi
22947
Michael W. Hudson54241132001-12-07 15:38:26 +000022948
Michael W. Hudson54241132001-12-07 15:38:26 +000022949
22950
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000022951for h in `(cd $srcdir;echo Python/thread_*.h)`
22952do
22953 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
22954done
22955
Michael W. Hudson54241132001-12-07 15:38:26 +000022956
Neal Norwitzd24499d2005-12-18 21:36:39 +000022957SRCDIRS="Parser Grammar Objects Python Modules Mac"
Thomas Wouters477c8d52006-05-27 19:21:47 +000022958{ echo "$as_me:$LINENO: checking for build directories" >&5
22959echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022960for dir in $SRCDIRS; do
22961 if test ! -d $dir; then
22962 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000022963 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022964done
Thomas Wouters477c8d52006-05-27 19:21:47 +000022965{ echo "$as_me:$LINENO: result: done" >&5
22966echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000022967
Guido van Rossum627b2d71993-12-24 10:39:16 +000022968# generate output files
Thomas Wouters477c8d52006-05-27 19:21:47 +000022969ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000022970
Martin v. Löwis11437992002-04-12 09:54:03 +000022971cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022972# This file is a shell script that caches the results of configure
22973# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000022974# scripts and configure runs, see configure's option --config-cache.
22975# It is not useful on other systems. If it contains results you don't
22976# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022977#
Martin v. Löwis11437992002-04-12 09:54:03 +000022978# config.status only pays attention to the cache file if you give it
22979# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022980#
Skip Montanaro6dead952003-09-25 14:50:04 +000022981# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000022982# loading this file, other *unset* `ac_cv_foo' will be assigned the
22983# following values.
22984
22985_ACEOF
22986
Guido van Rossumf78abae1997-01-21 22:02:36 +000022987# The following way of writing the cache mishandles newlines in values,
22988# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters477c8d52006-05-27 19:21:47 +000022989# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022990# Ultrix sh set writes to stderr and can't be redirected directly,
22991# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters477c8d52006-05-27 19:21:47 +000022992(
22993 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22994 eval ac_val=\$$ac_var
22995 case $ac_val in #(
22996 *${as_nl}*)
22997 case $ac_var in #(
22998 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
22999echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23000 esac
23001 case $ac_var in #(
23002 _ | IFS | as_nl) ;; #(
23003 *) $as_unset $ac_var ;;
23004 esac ;;
23005 esac
23006 done
23007
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +000023009 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23010 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 # `set' does not quote correctly, so add quotes (double-quote
23012 # substitution turns \\\\ into \\, and sed turns \\ into \).
23013 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023014 "s/'/'\\\\''/g;
23015 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters477c8d52006-05-27 19:21:47 +000023016 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023017 *)
23018 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023019 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023020 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023021 esac |
23022 sort
23023) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023024 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000023025 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 t clear
Thomas Wouters477c8d52006-05-27 19:21:47 +000023027 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23029 t end
Thomas Wouters477c8d52006-05-27 19:21:47 +000023030 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23031 :end' >>confcache
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023032if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23033 if test -w "$cache_file"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023034 test "x$cache_file" != "x/dev/null" &&
23035 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23036echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023038 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000023039 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23040echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023041 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023042fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023043rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023045test "x$prefix" = xNONE && prefix=$ac_default_prefix
23046# Let make expand exec_prefix.
23047test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023049DEFS=-DHAVE_CONFIG_H
23050
Skip Montanaro6dead952003-09-25 14:50:04 +000023051ac_libobjs=
23052ac_ltlibobjs=
23053for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23054 # 1. Remove the extension, and $U if already installed.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023055 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23056 ac_i=`echo "$ac_i" | sed "$ac_script"`
23057 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23058 # will be set to the directory where LIBOBJS objects are built.
23059 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23060 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023061done
23062LIBOBJS=$ac_libobjs
23063
23064LTLIBOBJS=$ac_ltlibobjs
23065
23066
Martin v. Löwis11437992002-04-12 09:54:03 +000023067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023068: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023069ac_clean_files_save=$ac_clean_files
23070ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23071{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23072echo "$as_me: creating $CONFIG_STATUS" >&6;}
23073cat >$CONFIG_STATUS <<_ACEOF
23074#! $SHELL
23075# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023076# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023077# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023078# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023079
Martin v. Löwis11437992002-04-12 09:54:03 +000023080debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023081ac_cs_recheck=false
23082ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023083SHELL=\${CONFIG_SHELL-$SHELL}
23084_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023085
Martin v. Löwis11437992002-04-12 09:54:03 +000023086cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023087## --------------------- ##
23088## M4sh Initialization. ##
23089## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023090
Thomas Wouters89f507f2006-12-13 04:49:30 +000023091# Be more Bourne compatible
23092DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023093if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23094 emulate sh
23095 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023096 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23097 # is contrary to our usage. Disable this feature.
23098 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000023099 setopt NO_GLOB_SUBST
23100else
Thomas Wouters89f507f2006-12-13 04:49:30 +000023101 case `(set -o) 2>/dev/null` in
23102 *posix*) set -o posix ;;
23103esac
23104
Michael W. Hudson54241132001-12-07 15:38:26 +000023105fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000023106
23107
Michael W. Hudson54241132001-12-07 15:38:26 +000023108
Michael W. Hudson54241132001-12-07 15:38:26 +000023109
Thomas Wouters477c8d52006-05-27 19:21:47 +000023110# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023111# Avoid depending upon Character Ranges.
23112as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23113as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23114as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23115as_cr_digits='0123456789'
23116as_cr_alnum=$as_cr_Letters$as_cr_digits
23117
23118# The user is always right.
23119if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023120 echo "#! /bin/sh" >conf$$.sh
23121 echo "exit 0" >>conf$$.sh
23122 chmod +x conf$$.sh
23123 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023124 PATH_SEPARATOR=';'
23125 else
23126 PATH_SEPARATOR=:
23127 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023128 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023129fi
23130
Thomas Wouters477c8d52006-05-27 19:21:47 +000023131# Support unset when possible.
23132if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23133 as_unset=unset
23134else
23135 as_unset=false
23136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023137
Thomas Wouters477c8d52006-05-27 19:21:47 +000023138
23139# IFS
23140# We need space, tab and new line, in precisely that order. Quoting is
23141# there to prevent editors from complaining about space-tab.
23142# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23143# splitting by setting IFS to empty value.)
23144as_nl='
23145'
23146IFS=" "" $as_nl"
23147
23148# Find who we are. Look in the path if we contain no directory separator.
23149case $0 in
23150 *[\\/]* ) as_myself=$0 ;;
23151 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023152for as_dir in $PATH
23153do
23154 IFS=$as_save_IFS
23155 test -z "$as_dir" && as_dir=.
23156 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23157done
Thomas Wouters477c8d52006-05-27 19:21:47 +000023158IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000023159
Thomas Wouters477c8d52006-05-27 19:21:47 +000023160 ;;
23161esac
23162# We did not find ourselves, most probably we were run as `sh COMMAND'
23163# in which case we are not to be found in the path.
23164if test "x$as_myself" = x; then
23165 as_myself=$0
23166fi
23167if test ! -f "$as_myself"; then
23168 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23169 { (exit 1); exit 1; }
23170fi
23171
23172# Work around bugs in pre-3.0 UWIN ksh.
23173for as_var in ENV MAIL MAILPATH
23174do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23175done
23176PS1='$ '
23177PS2='> '
23178PS4='+ '
23179
23180# NLS nuisances.
23181for as_var in \
23182 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23183 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23184 LC_TELEPHONE LC_TIME
Martin v. Löwis11437992002-04-12 09:54:03 +000023185do
Thomas Wouters477c8d52006-05-27 19:21:47 +000023186 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23187 eval $as_var=C; export $as_var
23188 else
23189 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23190 fi
23191done
23192
23193# Required to use basename.
23194if expr a : '\(a\)' >/dev/null 2>&1 &&
23195 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23196 as_expr=expr
23197else
23198 as_expr=false
23199fi
23200
23201if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23202 as_basename=basename
23203else
23204 as_basename=false
23205fi
23206
23207
23208# Name of the executable.
23209as_me=`$as_basename -- "$0" ||
23210$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23211 X"$0" : 'X\(//\)$' \| \
23212 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23213echo X/"$0" |
23214 sed '/^.*\/\([^/][^/]*\)\/*$/{
23215 s//\1/
23216 q
23217 }
23218 /^X\/\(\/\/\)$/{
23219 s//\1/
23220 q
23221 }
23222 /^X\/\(\/\).*/{
23223 s//\1/
23224 q
23225 }
23226 s/.*/./; q'`
23227
23228# CDPATH.
23229$as_unset CDPATH
23230
23231
23232
Martin v. Löwis11437992002-04-12 09:54:03 +000023233 as_lineno_1=$LINENO
23234 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000023235 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000023236 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000023237
Martin v. Löwis11437992002-04-12 09:54:03 +000023238 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23239 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +000023240 # line-number line after each line using $LINENO; the second 'sed'
23241 # does the real work. The second script uses 'N' to pair each
23242 # line-number line with the line containing $LINENO, and appends
23243 # trailing '-' during substitution so that $LINENO is not a special
23244 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023245 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +000023246 # scripts with optimization help from Paolo Bonzini. Blame Lee
23247 # E. McMahon (1931-1989) for sed's syntax. :-)
23248 sed -n '
23249 p
23250 /[$]LINENO/=
23251 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023252 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000023253 s/[$]LINENO.*/&-/
23254 t lineno
23255 b
23256 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023257 N
Thomas Wouters477c8d52006-05-27 19:21:47 +000023258 :loop
23259 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000023260 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +000023261 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000023262 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000023263 chmod +x "$as_me.lineno" ||
23264 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023266
Martin v. Löwis11437992002-04-12 09:54:03 +000023267 # Don't try to exec as it changes $[0], causing all sort of problems
23268 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +000023269 # original and so on. Autoconf is especially sensitive to this).
23270 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000023271 # Exit status is that of the last command.
23272 exit
23273}
23274
23275
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023276if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023277 as_dirname=dirname
23278else
23279 as_dirname=false
23280fi
23281
23282ECHO_C= ECHO_N= ECHO_T=
23283case `echo -n x` in
23284-n*)
23285 case `echo 'x\c'` in
23286 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23287 *) ECHO_C='\c';;
23288 esac;;
23289*)
23290 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000023291esac
23292
Thomas Wouters477c8d52006-05-27 19:21:47 +000023293if expr a : '\(a\)' >/dev/null 2>&1 &&
23294 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023295 as_expr=expr
23296else
23297 as_expr=false
23298fi
23299
23300rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +000023301if test -d conf$$.dir; then
23302 rm -f conf$$.dir/conf$$.file
23303else
23304 rm -f conf$$.dir
23305 mkdir conf$$.dir
23306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023307echo >conf$$.file
23308if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023309 as_ln_s='ln -s'
23310 # ... but there are two gotchas:
23311 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23312 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23313 # In both cases, we have to default to `cp -p'.
23314 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023315 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000023316elif ln conf$$.file conf$$ 2>/dev/null; then
23317 as_ln_s=ln
23318else
23319 as_ln_s='cp -p'
23320fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023321rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23322rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000023323
Skip Montanaro6dead952003-09-25 14:50:04 +000023324if mkdir -p . 2>/dev/null; then
23325 as_mkdir_p=:
23326else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023327 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023328 as_mkdir_p=false
23329fi
23330
Thomas Wouters89f507f2006-12-13 04:49:30 +000023331if test -x / >/dev/null 2>&1; then
23332 as_test_x='test -x'
Thomas Wouters477c8d52006-05-27 19:21:47 +000023333else
Thomas Wouters89f507f2006-12-13 04:49:30 +000023334 if ls -dL / >/dev/null 2>&1; then
23335 as_ls_L_option=L
23336 else
23337 as_ls_L_option=
23338 fi
23339 as_test_x='
23340 eval sh -c '\''
23341 if test -d "$1"; then
23342 test -d "$1/.";
23343 else
23344 case $1 in
23345 -*)set "./$1";;
23346 esac;
23347 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23348 ???[sx]*):;;*)false;;esac;fi
23349 '\'' sh
23350 '
Thomas Wouters477c8d52006-05-27 19:21:47 +000023351fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000023352as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
23354# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023355as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023356
23357# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023358as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023359
23360
Martin v. Löwis11437992002-04-12 09:54:03 +000023361exec 6>&1
23362
Thomas Wouters477c8d52006-05-27 19:21:47 +000023363# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023364# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters477c8d52006-05-27 19:21:47 +000023365# values after options handling.
23366ac_log="
Guido van Rossum0c4eb622006-03-30 16:19:24 +000023367This file was extended by python $as_me 3.0, which was
Thomas Wouters89f507f2006-12-13 04:49:30 +000023368generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023369
23370 CONFIG_FILES = $CONFIG_FILES
23371 CONFIG_HEADERS = $CONFIG_HEADERS
23372 CONFIG_LINKS = $CONFIG_LINKS
23373 CONFIG_COMMANDS = $CONFIG_COMMANDS
23374 $ $0 $@
23375
Thomas Wouters477c8d52006-05-27 19:21:47 +000023376on `(hostname || uname -n) 2>/dev/null | sed 1q`
23377"
23378
Martin v. Löwis11437992002-04-12 09:54:03 +000023379_ACEOF
23380
Thomas Wouters477c8d52006-05-27 19:21:47 +000023381cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023382# Files that config.status was made for.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023383config_files="$ac_config_files"
23384config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000023385
Thomas Wouters477c8d52006-05-27 19:21:47 +000023386_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023387
23388cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023389ac_cs_usage="\
23390\`$as_me' instantiates files from templates according to the
23391current configuration.
23392
23393Usage: $0 [OPTIONS] [FILE]...
23394
23395 -h, --help print this help, then exit
Thomas Wouters89f507f2006-12-13 04:49:30 +000023396 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023397 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 -d, --debug don't remove temporary files
23399 --recheck update $as_me by reconfiguring in the same conditions
23400 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023401 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023402 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023403 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023404
23405Configuration files:
23406$config_files
23407
23408Configuration headers:
23409$config_headers
23410
23411Report bugs to <bug-autoconf@gnu.org>."
Martin v. Löwis11437992002-04-12 09:54:03 +000023412
Thomas Wouters477c8d52006-05-27 19:21:47 +000023413_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023414cat >>$CONFIG_STATUS <<_ACEOF
23415ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000023416python config.status 3.0
Thomas Wouters89f507f2006-12-13 04:49:30 +000023417configured by $0, generated by GNU Autoconf 2.61,
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023418 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023419
Thomas Wouters477c8d52006-05-27 19:21:47 +000023420Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023421This config.status script is free software; the Free Software Foundation
23422gives unlimited permission to copy, distribute and modify it."
Thomas Wouters477c8d52006-05-27 19:21:47 +000023423
23424ac_pwd='$ac_pwd'
23425srcdir='$srcdir'
23426INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000023427_ACEOF
23428
23429cat >>$CONFIG_STATUS <<\_ACEOF
23430# If no file are specified by the user, then we need to provide default
23431# value. By we need to know if files were specified by the user.
23432ac_need_defaults=:
23433while test $# != 0
23434do
23435 case $1 in
23436 --*=*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000023437 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23438 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023439 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023440 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023441 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023442 ac_option=$1
23443 ac_optarg=$2
23444 ac_shift=shift
23445 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023446 esac
23447
Skip Montanaro6dead952003-09-25 14:50:04 +000023448 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023449 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000023450 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23451 ac_cs_recheck=: ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023452 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23453 echo "$ac_cs_version"; exit ;;
23454 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023455 debug=: ;;
23456 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023457 $ac_shift
23458 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 ac_need_defaults=false;;
23460 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023461 $ac_shift
23462 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023463 ac_need_defaults=false;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023464 --he | --h)
23465 # Conflict between --help and --header
23466 { echo "$as_me: error: ambiguous option: $1
23467Try \`$0 --help' for more information." >&2
23468 { (exit 1); exit 1; }; };;
23469 --help | --hel | -h )
23470 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023471 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23472 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23473 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023474
23475 # This is an error.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023476 -*) { echo "$as_me: error: unrecognized option: $1
23477Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023478 { (exit 1); exit 1; }; } ;;
23479
Thomas Wouters477c8d52006-05-27 19:21:47 +000023480 *) ac_config_targets="$ac_config_targets $1"
23481 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023482
23483 esac
23484 shift
23485done
23486
Skip Montanaro6dead952003-09-25 14:50:04 +000023487ac_configure_extra_args=
23488
23489if $ac_cs_silent; then
23490 exec 6>/dev/null
23491 ac_configure_extra_args="$ac_configure_extra_args --silent"
23492fi
23493
23494_ACEOF
23495cat >>$CONFIG_STATUS <<_ACEOF
23496if \$ac_cs_recheck; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023497 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000023498 CONFIG_SHELL=$SHELL
23499 export CONFIG_SHELL
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023500 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023501fi
23502
Martin v. Löwis11437992002-04-12 09:54:03 +000023503_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000023504cat >>$CONFIG_STATUS <<\_ACEOF
23505exec 5>>config.log
23506{
23507 echo
23508 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23509## Running $as_me. ##
23510_ASBOX
23511 echo "$ac_log"
23512} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023513
Thomas Wouters477c8d52006-05-27 19:21:47 +000023514_ACEOF
23515cat >>$CONFIG_STATUS <<_ACEOF
23516_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023517
23518cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000023519
23520# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000023521for ac_config_target in $ac_config_targets
23522do
Thomas Wouters477c8d52006-05-27 19:21:47 +000023523 case $ac_config_target in
23524 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000023525 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
23526 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
23527 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023528 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
23529 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
23530
Martin v. Löwis11437992002-04-12 09:54:03 +000023531 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23532echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23533 { (exit 1); exit 1; }; };;
23534 esac
23535done
23536
Thomas Wouters477c8d52006-05-27 19:21:47 +000023537
Martin v. Löwis11437992002-04-12 09:54:03 +000023538# If the user did not use the arguments to specify the items to instantiate,
23539# then the envvar interface is used. Set only those that are not.
23540# We use the long form for the default assignment because of an extremely
23541# bizarre bug on SunOS 4.1.3.
23542if $ac_need_defaults; then
23543 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23544 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23545fi
23546
Skip Montanaro6dead952003-09-25 14:50:04 +000023547# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters477c8d52006-05-27 19:21:47 +000023548# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000023549# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023550# Hook for its removal unless debugging.
23551# Note that there is a small window in which the directory will not be cleaned:
23552# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000023553$debug ||
23554{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023555 tmp=
23556 trap 'exit_status=$?
23557 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23558' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000023559 trap '{ (exit 1); exit 1; }' 1 2 13 15
23560}
Martin v. Löwis11437992002-04-12 09:54:03 +000023561# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000023562
Martin v. Löwis11437992002-04-12 09:54:03 +000023563{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023564 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 test -n "$tmp" && test -d "$tmp"
23566} ||
23567{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023568 tmp=./conf$$-$RANDOM
23569 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000023570} ||
23571{
Skip Montanaro6dead952003-09-25 14:50:04 +000023572 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023573 { (exit 1); exit 1; }
23574}
23575
Martin v. Löwis11437992002-04-12 09:54:03 +000023576#
Thomas Wouters477c8d52006-05-27 19:21:47 +000023577# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000023578#
23579
23580# No need to generate the scripts if there are no CONFIG_FILES.
23581# This happens for instance when ./config.status config.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000023582if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023583
23584_ACEOF
23585
Thomas Wouters477c8d52006-05-27 19:21:47 +000023586
23587
23588ac_delim='%!_!# '
23589for ac_last_try in false false false false false :; do
23590 cat >conf$$subs.sed <<_ACEOF
23591SHELL!$SHELL$ac_delim
23592PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23593PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23594PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23595PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23596PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23597PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23598exec_prefix!$exec_prefix$ac_delim
23599prefix!$prefix$ac_delim
23600program_transform_name!$program_transform_name$ac_delim
23601bindir!$bindir$ac_delim
23602sbindir!$sbindir$ac_delim
23603libexecdir!$libexecdir$ac_delim
23604datarootdir!$datarootdir$ac_delim
23605datadir!$datadir$ac_delim
23606sysconfdir!$sysconfdir$ac_delim
23607sharedstatedir!$sharedstatedir$ac_delim
23608localstatedir!$localstatedir$ac_delim
23609includedir!$includedir$ac_delim
23610oldincludedir!$oldincludedir$ac_delim
23611docdir!$docdir$ac_delim
23612infodir!$infodir$ac_delim
23613htmldir!$htmldir$ac_delim
23614dvidir!$dvidir$ac_delim
23615pdfdir!$pdfdir$ac_delim
23616psdir!$psdir$ac_delim
23617libdir!$libdir$ac_delim
23618localedir!$localedir$ac_delim
23619mandir!$mandir$ac_delim
23620DEFS!$DEFS$ac_delim
23621ECHO_C!$ECHO_C$ac_delim
23622ECHO_N!$ECHO_N$ac_delim
23623ECHO_T!$ECHO_T$ac_delim
23624LIBS!$LIBS$ac_delim
23625build_alias!$build_alias$ac_delim
23626host_alias!$host_alias$ac_delim
23627target_alias!$target_alias$ac_delim
23628VERSION!$VERSION$ac_delim
23629SOVERSION!$SOVERSION$ac_delim
23630CONFIG_ARGS!$CONFIG_ARGS$ac_delim
23631UNIVERSALSDK!$UNIVERSALSDK$ac_delim
23632PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
23633PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
23634PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
23635PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
23636FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
23637FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000023638FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
23639FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
23640FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000023641MACHDEP!$MACHDEP$ac_delim
23642SGI_ABI!$SGI_ABI$ac_delim
23643EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
23644EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
23645CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
23646EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
23647CC!$CC$ac_delim
23648CFLAGS!$CFLAGS$ac_delim
23649LDFLAGS!$LDFLAGS$ac_delim
23650CPPFLAGS!$CPPFLAGS$ac_delim
23651ac_ct_CC!$ac_ct_CC$ac_delim
23652EXEEXT!$EXEEXT$ac_delim
23653OBJEXT!$OBJEXT$ac_delim
23654CXX!$CXX$ac_delim
23655MAINCC!$MAINCC$ac_delim
23656CPP!$CPP$ac_delim
23657GREP!$GREP$ac_delim
23658EGREP!$EGREP$ac_delim
23659BUILDEXEEXT!$BUILDEXEEXT$ac_delim
23660LIBRARY!$LIBRARY$ac_delim
23661LDLIBRARY!$LDLIBRARY$ac_delim
23662DLLLIBRARY!$DLLLIBRARY$ac_delim
23663BLDLIBRARY!$BLDLIBRARY$ac_delim
23664LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
23665INSTSONAME!$INSTSONAME$ac_delim
23666RUNSHARED!$RUNSHARED$ac_delim
23667LINKCC!$LINKCC$ac_delim
23668RANLIB!$RANLIB$ac_delim
23669AR!$AR$ac_delim
23670SVNVERSION!$SVNVERSION$ac_delim
23671INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23672INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23673INSTALL_DATA!$INSTALL_DATA$ac_delim
23674LN!$LN$ac_delim
23675OPT!$OPT$ac_delim
23676BASECFLAGS!$BASECFLAGS$ac_delim
23677OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
23678LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
23679SO!$SO$ac_delim
23680LDSHARED!$LDSHARED$ac_delim
23681BLDSHARED!$BLDSHARED$ac_delim
23682CCSHARED!$CCSHARED$ac_delim
23683LINKFORSHARED!$LINKFORSHARED$ac_delim
23684CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
23685SHLIBS!$SHLIBS$ac_delim
23686USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
23687SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000023688_ACEOF
23689
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023690 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023691 break
23692 elif $ac_last_try; then
23693 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23694echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23695 { (exit 1); exit 1; }; }
23696 else
23697 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000023698 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023699done
23700
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023701ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23702if test -n "$ac_eof"; then
23703 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23704 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000023705fi
23706
23707cat >>$CONFIG_STATUS <<_ACEOF
23708cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23709/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23710_ACEOF
23711sed '
23712s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23713s/^/s,@/; s/!/@,|#_!!_#|/
23714:n
23715t n
23716s/'"$ac_delim"'$/,g/; t
23717s/$/\\/; p
23718N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23719' >>$CONFIG_STATUS <conf$$subs.sed
23720rm -f conf$$subs.sed
23721cat >>$CONFIG_STATUS <<_ACEOF
23722CEOF$ac_eof
23723_ACEOF
23724
23725
23726ac_delim='%!_!# '
23727for ac_last_try in false false false false false :; do
23728 cat >conf$$subs.sed <<_ACEOF
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000023729USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
23730LDLAST!$LDLAST$ac_delim
23731THREADOBJ!$THREADOBJ$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000023732DLINCLDIR!$DLINCLDIR$ac_delim
23733DYNLOADFILE!$DYNLOADFILE$ac_delim
23734MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
23735TRUE!$TRUE$ac_delim
23736LIBOBJS!$LIBOBJS$ac_delim
23737HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
23738HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
23739HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
23740HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
23741HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
23742LIBM!$LIBM$ac_delim
23743LIBC!$LIBC$ac_delim
23744UNICODE_OBJS!$UNICODE_OBJS$ac_delim
23745THREADHEADERS!$THREADHEADERS$ac_delim
23746SRCDIRS!$SRCDIRS$ac_delim
23747LTLIBOBJS!$LTLIBOBJS$ac_delim
23748_ACEOF
23749
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000023750 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023751 break
23752 elif $ac_last_try; then
23753 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23754echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23755 { (exit 1); exit 1; }; }
23756 else
23757 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23758 fi
23759done
23760
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023761ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23762if test -n "$ac_eof"; then
23763 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23764 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000023765fi
23766
23767cat >>$CONFIG_STATUS <<_ACEOF
23768cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23769/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23770_ACEOF
23771sed '
23772s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23773s/^/s,@/; s/!/@,|#_!!_#|/
23774:n
23775t n
23776s/'"$ac_delim"'$/,g/; t
23777s/$/\\/; p
23778N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23779' >>$CONFIG_STATUS <conf$$subs.sed
23780rm -f conf$$subs.sed
23781cat >>$CONFIG_STATUS <<_ACEOF
23782:end
23783s/|#_!!_#|//g
23784CEOF$ac_eof
23785_ACEOF
23786
23787
23788# VPATH may cause trouble with some makes, so we remove $(srcdir),
23789# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23790# trailing colons and then remove the whole line if VPATH becomes empty
23791# (actually we leave an empty line to preserve line numbers).
23792if test "x$srcdir" = x.; then
23793 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23794s/:*\$(srcdir):*/:/
23795s/:*\${srcdir}:*/:/
23796s/:*@srcdir@:*/:/
23797s/^\([^=]*=[ ]*\):*/\1/
23798s/:*$//
23799s/^[^=]*=[ ]*$//
23800}'
23801fi
23802
23803cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023804fi # test -n "$CONFIG_FILES"
23805
Thomas Wouters477c8d52006-05-27 19:21:47 +000023806
23807for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
23808do
23809 case $ac_tag in
23810 :[FHLC]) ac_mode=$ac_tag; continue;;
23811 esac
23812 case $ac_mode$ac_tag in
23813 :[FHL]*:*);;
23814 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
23815echo "$as_me: error: Invalid tag $ac_tag." >&2;}
23816 { (exit 1); exit 1; }; };;
23817 :[FH]-) ac_tag=-:-;;
23818 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23819 esac
23820 ac_save_IFS=$IFS
23821 IFS=:
23822 set x $ac_tag
23823 IFS=$ac_save_IFS
23824 shift
23825 ac_file=$1
23826 shift
23827
23828 case $ac_mode in
23829 :L) ac_source=$1;;
23830 :[FH])
23831 ac_file_inputs=
23832 for ac_f
23833 do
23834 case $ac_f in
23835 -) ac_f="$tmp/stdin";;
23836 *) # Look for the file first in the build tree, then in the source tree
23837 # (if the path is not absolute). The absolute path cannot be DOS-style,
23838 # because $ac_f cannot contain `:'.
23839 test -f "$ac_f" ||
23840 case $ac_f in
23841 [\\/$]*) false;;
23842 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23843 esac ||
23844 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
23845echo "$as_me: error: cannot find input file: $ac_f" >&2;}
23846 { (exit 1); exit 1; }; };;
23847 esac
23848 ac_file_inputs="$ac_file_inputs $ac_f"
23849 done
23850
23851 # Let's still pretend it is `configure' which instantiates (i.e., don't
23852 # use $as_me), people would be surprised to read:
23853 # /* config.h. Generated by config.status. */
23854 configure_input="Generated from "`IFS=:
23855 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
23856 if test x"$ac_file" != x-; then
23857 configure_input="$ac_file. $configure_input"
23858 { echo "$as_me:$LINENO: creating $ac_file" >&5
23859echo "$as_me: creating $ac_file" >&6;}
23860 fi
23861
23862 case $ac_tag in
23863 *:-:* | *:-) cat >"$tmp/stdin";;
23864 esac
23865 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023866 esac
23867
Thomas Wouters477c8d52006-05-27 19:21:47 +000023868 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023869$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023870 X"$ac_file" : 'X\(//\)[^/]' \| \
23871 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000023872 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023873echo X"$ac_file" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000023874 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23875 s//\1/
23876 q
23877 }
23878 /^X\(\/\/\)[^/].*/{
23879 s//\1/
23880 q
23881 }
23882 /^X\(\/\/\)$/{
23883 s//\1/
23884 q
23885 }
23886 /^X\(\/\).*/{
23887 s//\1/
23888 q
23889 }
23890 s/.*/./; q'`
23891 { as_dir="$ac_dir"
23892 case $as_dir in #(
23893 -*) as_dir=./$as_dir;;
23894 esac
23895 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000023896 as_dirs=
Thomas Wouters477c8d52006-05-27 19:21:47 +000023897 while :; do
23898 case $as_dir in #(
23899 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
23900 *) as_qdir=$as_dir;;
23901 esac
23902 as_dirs="'$as_qdir' $as_dirs"
23903 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023904$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023905 X"$as_dir" : 'X\(//\)[^/]' \| \
23906 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000023907 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023908echo X"$as_dir" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000023909 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23910 s//\1/
23911 q
23912 }
23913 /^X\(\/\/\)[^/].*/{
23914 s//\1/
23915 q
23916 }
23917 /^X\(\/\/\)$/{
23918 s//\1/
23919 q
23920 }
23921 /^X\(\/\).*/{
23922 s//\1/
23923 q
23924 }
23925 s/.*/./; q'`
23926 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000023927 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000023928 test -z "$as_dirs" || eval "mkdir $as_dirs"
23929 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
23930echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000023931 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023932 ac_builddir=.
23933
Thomas Wouters477c8d52006-05-27 19:21:47 +000023934case "$ac_dir" in
23935.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23936*)
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000023938 # A ".." for each directory in $ac_dir_suffix.
23939 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
23940 case $ac_top_builddir_sub in
23941 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23942 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23943 esac ;;
23944esac
23945ac_abs_top_builddir=$ac_pwd
23946ac_abs_builddir=$ac_pwd$ac_dir_suffix
23947# for backward compatibility:
23948ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000023949
23950case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +000023951 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000023952 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +000023953 ac_top_srcdir=$ac_top_builddir_sub
23954 ac_abs_top_srcdir=$ac_pwd ;;
23955 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000023956 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023957 ac_top_srcdir=$srcdir
23958 ac_abs_top_srcdir=$srcdir ;;
23959 *) # Relative name.
23960 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23961 ac_top_srcdir=$ac_top_build_prefix$srcdir
23962 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023963esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000023964ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000023965
Martin v. Löwis11437992002-04-12 09:54:03 +000023966
Thomas Wouters477c8d52006-05-27 19:21:47 +000023967 case $ac_mode in
23968 :F)
23969 #
23970 # CONFIG_FILE
23971 #
Martin v. Löwis11437992002-04-12 09:54:03 +000023972
23973 case $INSTALL in
23974 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023975 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023976 esac
Martin v. Löwis11437992002-04-12 09:54:03 +000023977_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000023978
23979cat >>$CONFIG_STATUS <<\_ACEOF
23980# If the template does not know about datarootdir, expand it.
23981# FIXME: This hack should be removed a few years after 2.60.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023982ac_datarootdir_hack=; ac_datarootdir_seen=
Thomas Wouters477c8d52006-05-27 19:21:47 +000023983
23984case `sed -n '/datarootdir/ {
23985 p
23986 q
23987}
23988/@datadir@/p
23989/@docdir@/p
23990/@infodir@/p
23991/@localedir@/p
23992/@mandir@/p
23993' $ac_file_inputs` in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023994*datarootdir*) ac_datarootdir_seen=yes;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023995*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23996 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23997echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23998_ACEOF
23999cat >>$CONFIG_STATUS <<_ACEOF
24000 ac_datarootdir_hack='
24001 s&@datadir@&$datadir&g
24002 s&@docdir@&$docdir&g
24003 s&@infodir@&$infodir&g
24004 s&@localedir@&$localedir&g
24005 s&@mandir@&$mandir&g
24006 s&\\\${datarootdir}&$datarootdir&g' ;;
24007esac
24008_ACEOF
24009
24010# Neutralize VPATH when `$srcdir' = `.'.
24011# Shell code in configure.ac might set extrasub.
24012# FIXME: do we really want to maintain this feature?
Martin v. Löwis11437992002-04-12 09:54:03 +000024013cat >>$CONFIG_STATUS <<_ACEOF
24014 sed "$ac_vpsub
24015$extrasub
24016_ACEOF
24017cat >>$CONFIG_STATUS <<\_ACEOF
24018:t
24019/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters477c8d52006-05-27 19:21:47 +000024020s&@configure_input@&$configure_input&;t t
24021s&@top_builddir@&$ac_top_builddir_sub&;t t
24022s&@srcdir@&$ac_srcdir&;t t
24023s&@abs_srcdir@&$ac_abs_srcdir&;t t
24024s&@top_srcdir@&$ac_top_srcdir&;t t
24025s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24026s&@builddir@&$ac_builddir&;t t
24027s&@abs_builddir@&$ac_abs_builddir&;t t
24028s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24029s&@INSTALL@&$ac_INSTALL&;t t
24030$ac_datarootdir_hack
24031" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024032
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024033test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24034 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024035 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024036 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24037which seems to be undefined. Please make sure it is defined." >&5
24038echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24039which seems to be undefined. Please make sure it is defined." >&2;}
24040
Thomas Wouters477c8d52006-05-27 19:21:47 +000024041 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024042 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +000024043 -) cat "$tmp/out"; rm -f "$tmp/out";;
24044 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024045 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000024046 ;;
24047 :H)
24048 #
24049 # CONFIG_HEADER
24050 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024051_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024052
Thomas Wouters477c8d52006-05-27 19:21:47 +000024053# Transform confdefs.h into a sed script `conftest.defines', that
24054# substitutes the proper values into config.h.in to produce config.h.
24055rm -f conftest.defines conftest.tail
24056# First, append a space to every undef/define line, to ease matching.
24057echo 's/$/ /' >conftest.defines
24058# Then, protect against being on the right side of a sed subst, or in
24059# an unquoted here document, in config.status. If some macros were
24060# called several times there might be several #defines for the same
24061# symbol, which is useless. But do not sort them, since the last
24062# AC_DEFINE must be honored.
24063ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024064# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24065# NAME is the cpp macro being defined, VALUE is the value it is being given.
24066# PARAMS is the parameter list in the macro definition--in most cases, it's
24067# just an empty string.
24068ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24069ac_dB='\\)[ (].*,\\1define\\2'
24070ac_dC=' '
24071ac_dD=' ,'
24072
Thomas Wouters477c8d52006-05-27 19:21:47 +000024073uniq confdefs.h |
24074 sed -n '
24075 t rset
24076 :rset
24077 s/^[ ]*#[ ]*define[ ][ ]*//
24078 t ok
24079 d
24080 :ok
24081 s/[\\&,]/\\&/g
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024082 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24083 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
Thomas Wouters477c8d52006-05-27 19:21:47 +000024084 ' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024085
Thomas Wouters477c8d52006-05-27 19:21:47 +000024086# Remove the space that was appended to ease matching.
24087# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024088# example, in the case of _POSIX_SOURCE, which is predefined and required
24089# on some systems where configure will not decide to define it.
Thomas Wouters477c8d52006-05-27 19:21:47 +000024090# (The regexp can be short, since the line contains either #define or #undef.)
24091echo 's/ $//
24092s,^[ #]*u.*,/* & */,' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024093
Thomas Wouters477c8d52006-05-27 19:21:47 +000024094# Break up conftest.defines:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024095ac_max_sed_lines=50
Thomas Wouters477c8d52006-05-27 19:21:47 +000024096
24097# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24098# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24099# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24100# et cetera.
24101ac_in='$ac_file_inputs'
24102ac_out='"$tmp/out1"'
24103ac_nxt='"$tmp/out2"'
24104
24105while :
Jack Jansendd19cf82001-12-06 22:36:17 +000024106do
Thomas Wouters477c8d52006-05-27 19:21:47 +000024107 # Write a here document:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024108 cat >>$CONFIG_STATUS <<_ACEOF
24109 # First, check the format of the line:
24110 cat >"\$tmp/defines.sed" <<\\CEOF
24111/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24112/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
Thomas Wouters477c8d52006-05-27 19:21:47 +000024113b
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024114:def
24115_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000024116 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024117 echo 'CEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000024118 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24119 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24120 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24121 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024122 rm -f conftest.defines
24123 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024124done
Thomas Wouters477c8d52006-05-27 19:21:47 +000024125rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024126
Thomas Wouters477c8d52006-05-27 19:21:47 +000024127echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024128cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024129 if test x"$ac_file" != x-; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000024130 echo "/* $configure_input */" >"$tmp/config.h"
24131 cat "$ac_result" >>"$tmp/config.h"
24132 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024133 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24134echo "$as_me: $ac_file is unchanged" >&6;}
24135 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024136 rm -f $ac_file
Thomas Wouters477c8d52006-05-27 19:21:47 +000024137 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 fi
24139 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000024140 echo "/* $configure_input */"
24141 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024142 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024143 rm -f "$tmp/out12"
24144 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024145
Thomas Wouters477c8d52006-05-27 19:21:47 +000024146
24147 esac
24148
24149done # for ac_tag
24150
Guido van Rossum627b2d71993-12-24 10:39:16 +000024151
Martin v. Löwis11437992002-04-12 09:54:03 +000024152{ (exit 0); exit 0; }
24153_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024154chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024155ac_clean_files=$ac_clean_files_save
24156
24157
24158# configure is writing to config.log, and then calls config.status.
24159# config.status does its own redirection, appending to config.log.
24160# Unfortunately, on DOS this fails, as config.log is still kept open
24161# by configure, so config.status won't be able to write to it; its
24162# output is simply discarded. So we exec the FD to /dev/null,
24163# effectively closing config.log, so it can be properly (re)opened and
24164# appended to by config.status. When coming back to configure, we
24165# need to make the FD available again.
24166if test "$no_create" != yes; then
24167 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024168 ac_config_status_args=
24169 test "$silent" = yes &&
24170 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000024171 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000024172 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024173 exec 5>>config.log
24174 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24175 # would make configure fail if this is the last instruction.
24176 $ac_cs_success || { (exit 1); exit 1; }
24177fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000024178
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024179
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024180echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024181if test ! -f Modules/Setup
24182then
24183 cp $srcdir/Modules/Setup.dist Modules/Setup
24184fi
24185
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024186echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024187if test ! -f Modules/Setup.local
24188then
24189 echo "# Edit this file for local setup changes" >Modules/Setup.local
24190fi
24191
24192echo "creating Makefile"
24193$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24194 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024195 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024196mv config.c Modules