blob: 2abce67f94ecac356a26f132aac5aa93b90b8448 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00002# From configure.in Revision: 63955 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
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#
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +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
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +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
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if 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
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if 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
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
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(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 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 '
544fi
545as_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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000661PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000662PYTHONFRAMEWORKDIR
663PYTHONFRAMEWORKPREFIX
664PYTHONFRAMEWORKINSTALLDIR
665FRAMEWORKINSTALLFIRST
666FRAMEWORKINSTALLLAST
667FRAMEWORKALTINSTALLFIRST
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKUNIXTOOLSPREFIX
670MACHDEP
671SGI_ABI
672EXTRAPLATDIR
673EXTRAMACHDEPPATH
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697RANLIB
698AR
699SVNVERSION
700INSTALL_PROGRAM
701INSTALL_SCRIPT
702INSTALL_DATA
703LN
704OPT
705BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000706UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000707OTHER_LIBTOOL_OPT
708LIBTOOL_CRUFT
709SO
710LDSHARED
711BLDSHARED
712CCSHARED
713LINKFORSHARED
714CFLAGSFORSHARED
715SHLIBS
716USE_SIGNAL_MODULE
717SIGNAL_OBJS
718USE_THREAD_MODULE
719LDLAST
720THREADOBJ
721DLINCLDIR
722DYNLOADFILE
723MACHDEP_OBJS
724TRUE
725LIBOBJS
726HAVE_GETHOSTBYNAME_R_6_ARG
727HAVE_GETHOSTBYNAME_R_5_ARG
728HAVE_GETHOSTBYNAME_R_3_ARG
729HAVE_GETHOSTBYNAME_R
730HAVE_GETHOSTBYNAME
731LIBM
732LIBC
733UNICODE_OBJS
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
854 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
873 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Martin v. Löwiseba40652007-08-30 20:10:57 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Martin v. Löwiseba40652007-08-30 20:10:57 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 { echo "$as_me: error: invalid package name: $ac_package" >&2
1070 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 { echo "$as_me: error: invalid package name: $ac_package" >&2
1079 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
1102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1111 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
1117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1128 { echo "$as_me: error: missing argument to $ac_option" >&2
1129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Martin v. Löwiseba40652007-08-30 20:10:57 +00001132# Be sure to have absolute directory names.
1133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
1158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Martin v. Löwiseba40652007-08-30 20:10:57 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1174 { echo "$as_me: error: Working directory cannot be determined" >&2
1175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1177 { echo "$as_me: error: pwd does not report name of working directory" >&2
1178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001184 # Try the directory containing this script, then the parent directory.
1185 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001190echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
1222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001223 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001249\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
1283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001310 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001317 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1324 --enable-ipv6 Enable ipv6 (with ipv4) support
1325 --disable-ipv6 Disable ipv6 support
1326 --enable-unicode[=ucs[24]]
1327 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Optional Packages:
1330 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1331 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001332 --with-universal-archs=ARCH
1333 select architectures for universal build ("32-bit",
1334 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001335 --with-framework-name=FRAMEWORK
1336 specify an alternate name of the framework built
1337 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001339 --with-cxx-main=<compiler>
1340 compile main() and link python executable with C++
1341 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-suffix=.exe set executable suffix
1343 --with-pydebug build with Py_DEBUG defined
1344 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001345 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001346 --with-signal-module disable/enable signal module
1347 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1348 --with(out)-threads[=DIRECTORY]
1349 disable/enable thread support
1350 --with(out)-thread[=DIRECTORY]
1351 deprecated; use --with(out)-threads
1352 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001354 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-pymalloc disable/enable specialized mallocs
1356 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with-fpectl enable SIGFPE catching
1358 --with-libm=STRING math library
1359 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361Some influential environment variables:
1362 CC C compiler command
1363 CFLAGS C compiler flags
1364 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1365 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001366 LIBS libraries to pass to the linker, e.g. -l<library>
1367 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1368 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 CPP C preprocessor
1370
1371Use these variables to override the choices made by `configure' or to help
1372it to find libraries and programs with nonstandard names/locations.
1373
Martin v. Löwis1d459062005-03-14 21:23:33 +00001374Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001376ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001377fi
1378
1379if test "$ac_init_help" = "recursive"; then
1380 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001382 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 ac_builddir=.
1384
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385case "$ac_dir" in
1386.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1387*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001389 # A ".." for each directory in $ac_dir_suffix.
1390 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1391 case $ac_top_builddir_sub in
1392 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1394 esac ;;
1395esac
1396ac_abs_top_builddir=$ac_pwd
1397ac_abs_builddir=$ac_pwd$ac_dir_suffix
1398# for backward compatibility:
1399ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$ac_top_builddir_sub
1405 ac_abs_top_srcdir=$ac_pwd ;;
1406 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001408 ac_top_srcdir=$srcdir
1409 ac_abs_top_srcdir=$srcdir ;;
1410 *) # Relative name.
1411 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1412 ac_top_srcdir=$ac_top_build_prefix$srcdir
1413 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001414esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001416
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 cd "$ac_dir" || { ac_status=$?; continue; }
1418 # Check for guested configure.
1419 if test -f "$ac_srcdir/configure.gnu"; then
1420 echo &&
1421 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1422 elif test -f "$ac_srcdir/configure"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 else
1426 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001427 fi || ac_status=$?
1428 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 done
1430fi
1431
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001433if $ac_init_version; then
1434 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001435python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
Martin v. Löwiseba40652007-08-30 20:10:57 +00001438Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14392002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001440This configure script is free software; the Free Software Foundation
1441gives unlimited permission to copy, distribute and modify it.
1442_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001445cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This file contains any messages produced by compilers while
1447running configure, to aid debugging if configure makes a mistake.
1448
Neal Norwitz9be57322006-08-18 05:39:20 +00001449It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001450generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001451
1452 $ $0 $@
1453
1454_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001455exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001456{
1457cat <<_ASUNAME
1458## --------- ##
1459## Platform. ##
1460## --------- ##
1461
1462hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1463uname -m = `(uname -m) 2>/dev/null || echo unknown`
1464uname -r = `(uname -r) 2>/dev/null || echo unknown`
1465uname -s = `(uname -s) 2>/dev/null || echo unknown`
1466uname -v = `(uname -v) 2>/dev/null || echo unknown`
1467
1468/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1469/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1470
1471/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1472/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1473/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001474/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001475/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1476/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1477/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1478
1479_ASUNAME
1480
1481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1482for as_dir in $PATH
1483do
1484 IFS=$as_save_IFS
1485 test -z "$as_dir" && as_dir=.
1486 echo "PATH: $as_dir"
1487done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001488IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490} >&5
1491
1492cat >&5 <<_ACEOF
1493
1494
1495## ----------- ##
1496## Core tests. ##
1497## ----------- ##
1498
1499_ACEOF
1500
1501
1502# Keep a trace of the command line.
1503# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001504# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001506# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001508ac_configure_args0=
1509ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001510ac_must_keep_next=false
1511for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001512do
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 for ac_arg
1514 do
1515 case $ac_arg in
1516 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1518 | -silent | --silent | --silen | --sile | --sil)
1519 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1522 esac
1523 case $ac_pass in
1524 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1525 2)
1526 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1527 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001530 case $ac_arg in
1531 *=* | --config-cache | -C | -disable-* | --disable-* \
1532 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1533 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1534 | -with-* | --with-* | -without-* | --without-* | --x)
1535 case "$ac_configure_args0 " in
1536 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1537 esac
1538 ;;
1539 -* ) ac_must_keep_next=true ;;
1540 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001541 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001542 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001543 ;;
1544 esac
1545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001546done
Skip Montanaro6dead952003-09-25 14:50:04 +00001547$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1548$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 +00001549
1550# When interrupted or exit'd, cleanup temporary files, and complete
1551# config.log. We remove comments because anyway the quotes in there
1552# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553# WARNING: Use '\'' to represent an apostrophe within the trap.
1554# 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 +00001555trap 'exit_status=$?
1556 # Save into config.log some information that might help in debugging.
1557 {
1558 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001559
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 cat <<\_ASBOX
1561## ---------------- ##
1562## Cache variables. ##
1563## ---------------- ##
1564_ASBOX
1565 echo
1566 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001567(
1568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1569 eval ac_val=\$$ac_var
1570 case $ac_val in #(
1571 *${as_nl}*)
1572 case $ac_var in #(
1573 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1574echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1575 esac
1576 case $ac_var in #(
1577 _ | IFS | as_nl) ;; #(
1578 *) $as_unset $ac_var ;;
1579 esac ;;
1580 esac
1581 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1584 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 "s/'\''/'\''\\\\'\'''\''/g;
1587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1588 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001589 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001591 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 esac |
1593 sort
1594)
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001596
1597 cat <<\_ASBOX
1598## ----------------- ##
1599## Output variables. ##
1600## ----------------- ##
1601_ASBOX
1602 echo
1603 for ac_var in $ac_subst_vars
1604 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 eval ac_val=\$$ac_var
1606 case $ac_val in
1607 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1608 esac
1609 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001610 done | sort
1611 echo
1612
1613 if test -n "$ac_subst_files"; then
1614 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615## ------------------- ##
1616## File substitutions. ##
1617## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001618_ASBOX
1619 echo
1620 for ac_var in $ac_subst_files
1621 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001622 eval ac_val=\$$ac_var
1623 case $ac_val in
1624 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1625 esac
1626 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001627 done | sort
1628 echo
1629 fi
1630
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 if test -s confdefs.h; then
1632 cat <<\_ASBOX
1633## ----------- ##
1634## confdefs.h. ##
1635## ----------- ##
1636_ASBOX
1637 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 echo
1640 fi
1641 test "$ac_signal" != 0 &&
1642 echo "$as_me: caught signal $ac_signal"
1643 echo "$as_me: exit $exit_status"
1644 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001645 rm -f core *.core core.conftest.* &&
1646 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001649for ac_signal in 1 2 13 15; do
1650 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1651done
1652ac_signal=0
1653
1654# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001655rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001656
1657# Predefined preprocessor variables.
1658
1659cat >>confdefs.h <<_ACEOF
1660#define PACKAGE_NAME "$PACKAGE_NAME"
1661_ACEOF
1662
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_VERSION "$PACKAGE_VERSION"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_STRING "$PACKAGE_STRING"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1681_ACEOF
1682
1683
1684# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686if test -n "$CONFIG_SITE"; then
1687 set x "$CONFIG_SITE"
1688elif test "x$prefix" != xNONE; then
1689 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1690else
1691 set x "$ac_default_prefix/share/config.site" \
1692 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001694shift
1695for ac_site_file
1696do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1699echo "$as_me: loading site script $ac_site_file" >&6;}
1700 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701 . "$ac_site_file"
1702 fi
1703done
1704
1705if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 # Some versions of bash will fail to source /dev/null (special
1707 # files actually), so we avoid doing that.
1708 if test -f "$cache_file"; then
1709 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1710echo "$as_me: loading cache $cache_file" >&6;}
1711 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001712 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1713 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 esac
1715 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716else
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1718echo "$as_me: creating cache $cache_file" >&6;}
1719 >$cache_file
1720fi
1721
1722# Check that the precious variables saved in the cache have kept the same
1723# value.
1724ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001725for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1727 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1729 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 case $ac_old_set,$ac_new_set in
1731 set,)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,set)
1736 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1737echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1738 ac_cache_corrupted=: ;;
1739 ,);;
1740 *)
1741 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001745echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001746 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001747echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001748 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 fi;;
1750 esac
1751 # Pass precious variables to config.status.
1752 if test "$ac_new_set" = set; then
1753 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001754 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 *) ac_arg=$ac_var=$ac_new_val ;;
1756 esac
1757 case " $ac_configure_args " in
1758 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1759 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1760 esac
1761 fi
1762done
1763if $ac_cache_corrupted; then
1764 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1765echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1766 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1767echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1768 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769fi
1770
Martin v. Löwiseba40652007-08-30 20:10:57 +00001771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
Guido van Rossum7f43da71994-08-01 12:15:30 +00001795ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001797ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1798ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1799ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800
Guido van Rossum627b2d71993-12-24 10:39:16 +00001801
Michael W. Hudson54241132001-12-07 15:38:26 +00001802
Martin v. Löwiseba40652007-08-30 20:10:57 +00001803ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001804
1805
Martin v. Löwis11437992002-04-12 09:54:03 +00001806
1807
1808
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001809
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001810
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001811# We don't use PACKAGE_ variables, and they cause conflicts
1812# with other autoconf-based packages that include Python.h
1813grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1814rm confdefs.h
1815mv confdefs.h.new confdefs.h
1816
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001817
Neal Norwitz9be57322006-08-18 05:39:20 +00001818VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwis1142de32002-03-29 16:28:31 +00001820
1821SOVERSION=1.0
1822
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001823# The later defininition of _XOPEN_SOURCE disables certain features
1824# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1825
1826cat >>confdefs.h <<\_ACEOF
1827#define _GNU_SOURCE 1
1828_ACEOF
1829
1830
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001831# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1832# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1833# them.
1834
1835cat >>confdefs.h <<\_ACEOF
1836#define _NETBSD_SOURCE 1
1837_ACEOF
1838
1839
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001840# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1841# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1842# them.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define __BSD_VISIBLE 1
1846_ACEOF
1847
1848
Martin v. Löwisd6320502004-08-12 13:45:08 +00001849# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1850# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define _BSD_TYPES 1
1854_ACEOF
1855
1856
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1859# them.
1860
1861cat >>confdefs.h <<\_ACEOF
1862#define _DARWIN_C_SOURCE 1
1863_ACEOF
1864
1865
1866
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001867define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001868
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001869# Arguments passed to configure.
1870
1871CONFIG_ARGS="$ac_configure_args"
1872
Martin v. Löwiseba40652007-08-30 20:10:57 +00001873# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001874if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001875 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001876 case $enableval in
1877 yes)
1878 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1879 ;;
1880 esac
1881 case $enableval in
1882 no)
1883 UNIVERSALSDK=
1884 enable_universalsdk=
1885 ;;
1886 *)
1887 UNIVERSALSDK=$enableval
1888 ;;
1889 esac
1890
1891else
1892
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895
Martin v. Löwiseba40652007-08-30 20:10:57 +00001896fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001897
1898
Martin v. Löwiseba40652007-08-30 20:10:57 +00001899
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001900UNIVERSAL_ARCHS="32-bit"
1901{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1902echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1903
1904# Check whether --with-universal-archs was given.
1905if test "${with_universal_archs+set}" = set; then
1906 withval=$with_universal_archs;
1907 { echo "$as_me:$LINENO: result: $withval" >&5
1908echo "${ECHO_T}$withval" >&6; }
1909 UNIVERSAL_ARCHS="$withval"
1910
1911else
1912
1913 { echo "$as_me:$LINENO: result: 32-bit" >&5
1914echo "${ECHO_T}32-bit" >&6; }
1915
1916fi
1917
1918
1919
1920
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001921
1922# Check whether --with-framework-name was given.
1923if test "${with_framework_name+set}" = set; then
1924 withval=$with_framework_name;
1925 PYTHONFRAMEWORK=${withval}
1926 PYTHONFRAMEWORKDIR=${withval}.framework
1927 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1928
1929else
1930
1931 PYTHONFRAMEWORK=Python
1932 PYTHONFRAMEWORKDIR=Python.framework
1933 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1934
1935fi
1936
Martin v. Löwiseba40652007-08-30 20:10:57 +00001937# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001938if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001939 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001940 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001942 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001943 esac
1944 case $enableval in
1945 no)
1946 PYTHONFRAMEWORK=
1947 PYTHONFRAMEWORKDIR=no-framework
1948 PYTHONFRAMEWORKPREFIX=
1949 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001950 FRAMEWORKINSTALLFIRST=
1951 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001952 FRAMEWORKALTINSTALLFIRST=
1953 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001954 if test "x${prefix}" = "xNONE"; then
1955 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1956 else
1957 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1958 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001960 ;;
1961 *)
1962 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001963 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001964 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001965 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1966 if test "$UNIVERSAL_ARCHS" = "all"
1967 then
1968 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1969 else
1970 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1971 fi
1972
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001973 if test "x${prefix}" = "xNONE" ; then
1974 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1975 else
1976 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1977 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001979
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001980 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001981 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001982 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001983
Martin v. Löwiseba40652007-08-30 20:10:57 +00001984 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985
Martin v. Löwiseba40652007-08-30 20:10:57 +00001986 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001988 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1989
1990 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1991
Jack Jansene578a632001-08-15 01:27:14 +00001992 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001993
Guido van Rossum563e7081996-09-10 18:20:48 +00001994else
Martin v. Löwis11437992002-04-12 09:54:03 +00001995
Jack Jansene578a632001-08-15 01:27:14 +00001996 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001998 PYTHONFRAMEWORKPREFIX=
1999 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002000 FRAMEWORKINSTALLFIRST=
2001 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002002 FRAMEWORKALTINSTALLFIRST=
2003 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002004 if test "x${prefix}" = "xNONE" ; then
2005 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2006 else
2007 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2008 fi
Jack Jansene578a632001-08-15 01:27:14 +00002009 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002010
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002011 if test "$UNIVERSAL_ARCHS" = "all"
2012 then
2013 FRAMEWORKINSTALLLAST=update4wayuniversal
2014 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2015 fi
2016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017fi
2018
Michael W. Hudson54241132001-12-07 15:38:26 +00002019
2020
2021
2022
Jack Jansene578a632001-08-15 01:27:14 +00002023
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002024
2025
Ronald Oussoren5b787322006-06-06 19:50:24 +00002026
2027
2028
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002031## AC_HELP_STRING(--with-dyld,
2032## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002033##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002034# Set name for machine-dependent library files
2035
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2037echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038if test -z "$MACHDEP"
2039then
Guido van Rossum563e7081996-09-10 18:20:48 +00002040 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002041 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2042 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002043 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002045 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_md_system=`echo $ac_sys_system |
2048 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2049 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002050 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002051 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002052
Guido van Rossum07397971997-04-29 21:49:50 +00002053 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002054 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002055 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002056 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 esac
2060fi
Guido van Rossum91922671997-10-09 20:24:13 +00002061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2063# disable features if it is defined, without any means to access these
2064# features as extensions. For these systems, we skip the definition of
2065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2066# some feature, make sure there is no alternative way to access this
2067# feature. Also, when using wildcards, make sure you have verified the
2068# need for not defining _XOPEN_SOURCE on all systems matching the
2069# wildcard, and that the wildcard does not include future systems
2070# (which may remove their limitations).
2071case $ac_sys_system/$ac_sys_release in
2072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz2a3e3d02008-06-06 04:47:01 +00002075 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002076 define_xopen_source=no
2077 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2078 # also defined. This can be overridden by defining _BSD_SOURCE
2079 # As this has a different meaning on Linux, only define it on OpenBSD
2080
2081cat >>confdefs.h <<\_ACEOF
2082#define _BSD_SOURCE 1
2083_ACEOF
2084
2085 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002086 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2087 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2088 # Marc Recht
2089 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2090 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002091 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2092 # of union __?sigval. Reported by Stuart Bishop.
2093 SunOS/5.6)
2094 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002095 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2096 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002097 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002098 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002099 define_xopen_source=no;;
2100 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002101 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002102 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002103 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002104 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2105 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2106 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2107 # This should hopefully be fixed in FreeBSD 4.9
2108 FreeBSD/4.8* | Darwin/6* )
2109 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002110 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2111 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2112 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002113 AIX/4)
2114 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002115 AIX/5)
2116 if test `uname -r` -eq 1; then
2117 define_xopen_source=no
2118 fi
2119 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002120 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2121 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002122 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002123 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002124 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002125 define_xopen_source=no
2126 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002127 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2128 # defining NI_NUMERICHOST.
2129 QNX/6.3.2)
2130 define_xopen_source=no
2131 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002132
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002133esac
2134
2135if test $define_xopen_source = yes
2136then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002137 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2138 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002139 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2140 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002141 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002142 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002143
2144cat >>confdefs.h <<\_ACEOF
2145#define _XOPEN_SOURCE 500
2146_ACEOF
2147
2148 ;;
2149 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002150
2151cat >>confdefs.h <<\_ACEOF
2152#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002153_ACEOF
2154
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 ;;
2156 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002157
2158 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2159 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2160 # several APIs are not declared. Since this is also needed in some
2161 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002162 # except for Solaris 10, where it must not be defined,
2163 # as it implies XPG4.2
2164 case $ac_sys_system/$ac_sys_release in
2165 SunOS/5.10)
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE_EXTENDED 1
2171_ACEOF
2172
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002176
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002177cat >>confdefs.h <<\_ACEOF
2178#define _POSIX_C_SOURCE 200112L
2179_ACEOF
2180
2181
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002182fi
2183
Guido van Rossum91922671997-10-09 20:24:13 +00002184#
2185# SGI compilers allow the specification of the both the ABI and the
2186# ISA on the command line. Depending on the values of these switches,
2187# different and often incompatable code will be generated.
2188#
2189# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2190# thus supply support for various ABI/ISA combinations. The MACHDEP
2191# variable is also adjusted.
2192#
2193
2194if test ! -z "$SGI_ABI"
2195then
2196 CC="cc $SGI_ABI"
2197 LDFLAGS="$SGI_ABI $LDFLAGS"
2198 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002200{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2201echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002202
Jack Jansen83f898c2002-12-30 22:23:40 +00002203# And add extra plat-mac for darwin
2204
Jack Jansen7b59b422003-03-17 15:44:10 +00002205
Martin v. Löwiseba40652007-08-30 20:10:57 +00002206{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2207echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002208if test -z "$EXTRAPLATDIR"
2209then
2210 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002211 darwin)
2212 EXTRAPLATDIR="\$(PLATMACDIRS)"
2213 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2214 ;;
2215 *)
2216 EXTRAPLATDIR=""
2217 EXTRAMACHDEPPATH=""
2218 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002219 esac
2220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002221{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2222echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002223
Jack Jansen6b08a402004-06-03 12:41:45 +00002224# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2225# it may influence the way we can build extensions, so distutils
2226# needs to check it
2227
Ronald Oussoren988117f2006-04-29 11:31:35 +00002228
Jack Jansen6b08a402004-06-03 12:41:45 +00002229CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002230EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002231
Mark Dickinson65134662008-04-25 16:11:04 +00002232{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2233echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2234ac_sys_machine=`uname -m`
2235{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2236echo "${ECHO_T}$ac_sys_machine" >&6; }
2237
Guido van Rossum627b2d71993-12-24 10:39:16 +00002238# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002239
2240# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2241# for debug/optimization stuff. BASECFLAGS is for flags that are required
2242# just to get things to compile and link. Users are free to override OPT
2243# when running configure or make. The build should not break if they do.
2244# BASECFLAGS should generally not be messed with, however.
2245
2246# XXX shouldn't some/most/all of this code be merged with the stuff later
2247# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002248{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2249echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002250
Martin v. Löwiseba40652007-08-30 20:10:57 +00002251# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002252if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002253 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002255 no) CC=cc
2256 without_gcc=yes;;
2257 yes) CC=gcc
2258 without_gcc=no;;
2259 *) CC=$withval
2260 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002262else
Martin v. Löwis11437992002-04-12 09:54:03 +00002263
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002264 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002265 AIX*) CC=cc_r
2266 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002267 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002268 case $BE_HOST_CPU in
2269 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002270 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002271 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272 BASECFLAGS="$BASECFLAGS -export pragma"
2273 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002274 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002275 ;;
2276 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002277 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002278 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002279 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 ;;
2281 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002282 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2283echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2284 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 ;;
2286 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002287 AR="\$(srcdir)/Modules/ar_beos"
2288 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002290 Monterey*)
2291 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002292 without_gcc=;;
2293 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002294 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002295fi
2296
2297{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2298echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002299
Guido van Rossum8b131c51995-03-09 14:10:13 +00002300# If the user switches compilers, we can't believe the cache
2301if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2302then
Martin v. Löwis11437992002-04-12 09:54:03 +00002303 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2304(it is also a good idea to do 'make clean' before compiling)" >&5
2305echo "$as_me: error: cached CC is different -- throw away $cache_file
2306(it is also a good idea to do 'make clean' before compiling)" >&2;}
2307 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002308fi
2309
Martin v. Löwis11437992002-04-12 09:54:03 +00002310ac_ext=c
2311ac_cpp='$CPP $CPPFLAGS'
2312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2314ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315if test -n "$ac_tool_prefix"; then
2316 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2317set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320if test "${ac_cv_prog_CC+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322else
2323 if test -n "$CC"; then
2324 ac_cv_prog_CC="$CC" # Let the user override the test.
2325else
Martin v. Löwis11437992002-04-12 09:54:03 +00002326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 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 +00002333 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2335 break 2
2336 fi
2337done
2338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
Jack Jansendd19cf82001-12-06 22:36:17 +00002341fi
2342fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002343CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002344if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345 { echo "$as_me:$LINENO: result: $CC" >&5
2346echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002347else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348 { echo "$as_me:$LINENO: result: no" >&5
2349echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352
Martin v. Löwis11437992002-04-12 09:54:03 +00002353fi
2354if test -z "$ac_cv_prog_CC"; then
2355 ac_ct_CC=$CC
2356 # Extract the first word of "gcc", so it can be a program name with args.
2357set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002360if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 if test -n "$ac_ct_CC"; then
2364 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2365else
2366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367for as_dir in $PATH
2368do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
2371 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002372 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 +00002373 ac_cv_prog_ac_ct_CC="gcc"
2374 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2375 break 2
2376 fi
2377done
2378done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381fi
2382fi
2383ac_ct_CC=$ac_cv_prog_ac_ct_CC
2384if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2386echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002388 { echo "$as_me:$LINENO: result: no" >&5
2389echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002390fi
2391
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392 if test "x$ac_ct_CC" = x; then
2393 CC=""
2394 else
2395 case $cross_compiling:$ac_tool_warned in
2396yes:)
2397{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2398whose name does not start with the host triplet. If you think this
2399configuration is useful to you, please write to autoconf@gnu.org." >&5
2400echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2401whose name does not start with the host triplet. If you think this
2402configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2403ac_tool_warned=yes ;;
2404esac
2405 CC=$ac_ct_CC
2406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002407else
2408 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002409fi
2410
Jack Jansendd19cf82001-12-06 22:36:17 +00002411if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002412 if test -n "$ac_tool_prefix"; then
2413 # 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 +00002414set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417if test "${ac_cv_prog_CC+set}" = set; then
2418 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002419else
2420 if test -n "$CC"; then
2421 ac_cv_prog_CC="$CC" # Let the user override the test.
2422else
Martin v. Löwis11437992002-04-12 09:54:03 +00002423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2424for as_dir in $PATH
2425do
2426 IFS=$as_save_IFS
2427 test -z "$as_dir" && as_dir=.
2428 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002429 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 +00002430 ac_cv_prog_CC="${ac_tool_prefix}cc"
2431 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2432 break 2
2433 fi
2434done
2435done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438fi
2439fi
2440CC=$ac_cv_prog_CC
2441if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442 { echo "$as_me:$LINENO: result: $CC" >&5
2443echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002445 { echo "$as_me:$LINENO: result: no" >&5
2446echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002447fi
2448
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452if test -z "$CC"; then
2453 # Extract the first word of "cc", so it can be a program name with args.
2454set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2456echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002457if test "${ac_cv_prog_CC+set}" = set; then
2458 echo $ECHO_N "(cached) $ECHO_C" >&6
2459else
2460 if test -n "$CC"; then
2461 ac_cv_prog_CC="$CC" # Let the user override the test.
2462else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2465for as_dir in $PATH
2466do
2467 IFS=$as_save_IFS
2468 test -z "$as_dir" && as_dir=.
2469 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470 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 +00002471 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2472 ac_prog_rejected=yes
2473 continue
2474 fi
2475 ac_cv_prog_CC="cc"
2476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2477 break 2
2478 fi
2479done
2480done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002482
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002483if test $ac_prog_rejected = yes; then
2484 # We found a bogon in the path, so make sure we never use it.
2485 set dummy $ac_cv_prog_CC
2486 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488 # We chose a different compiler from the bogus one.
2489 # However, it has the same basename, so the bogon will be chosen
2490 # first if we set CC to just the basename; use the full file name.
2491 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493 fi
2494fi
2495fi
2496fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 { echo "$as_me:$LINENO: result: $CC" >&5
2500echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002502 { echo "$as_me:$LINENO: result: no" >&5
2503echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504fi
2505
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508if test -z "$CC"; then
2509 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 do
2512 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2513set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2515echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002516if test "${ac_cv_prog_CC+set}" = set; then
2517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002518else
2519 if test -n "$CC"; then
2520 ac_cv_prog_CC="$CC" # Let the user override the test.
2521else
Martin v. Löwis11437992002-04-12 09:54:03 +00002522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523for as_dir in $PATH
2524do
2525 IFS=$as_save_IFS
2526 test -z "$as_dir" && as_dir=.
2527 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002528 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 +00002529 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2530 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2531 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002536
2537fi
2538fi
2539CC=$ac_cv_prog_CC
2540if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 { echo "$as_me:$LINENO: result: $CC" >&5
2542echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 { echo "$as_me:$LINENO: result: no" >&5
2545echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002546fi
2547
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 test -n "$CC" && break
2550 done
2551fi
2552if test -z "$CC"; then
2553 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002555do
2556 # Extract the first word of "$ac_prog", so it can be a program name with args.
2557set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002560if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2561 echo $ECHO_N "(cached) $ECHO_C" >&6
2562else
2563 if test -n "$ac_ct_CC"; then
2564 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2565else
2566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2567for as_dir in $PATH
2568do
2569 IFS=$as_save_IFS
2570 test -z "$as_dir" && as_dir=.
2571 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 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 +00002573 ac_cv_prog_ac_ct_CC="$ac_prog"
2574 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2575 break 2
2576 fi
2577done
2578done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581fi
2582fi
2583ac_ct_CC=$ac_cv_prog_ac_ct_CC
2584if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2586echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 { echo "$as_me:$LINENO: result: no" >&5
2589echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002590fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002591
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 test -n "$ac_ct_CC" && break
2594done
Michael W. Hudson54241132001-12-07 15:38:26 +00002595
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 if test "x$ac_ct_CC" = x; then
2597 CC=""
2598 else
2599 case $cross_compiling:$ac_tool_warned in
2600yes:)
2601{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2602whose name does not start with the host triplet. If you think this
2603configuration is useful to you, please write to autoconf@gnu.org." >&5
2604echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2605whose name does not start with the host triplet. If you think this
2606configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2607ac_tool_warned=yes ;;
2608esac
2609 CC=$ac_ct_CC
2610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002611fi
2612
2613fi
2614
2615
Skip Montanaro6dead952003-09-25 14:50:04 +00002616test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2617See \`config.log' for more details." >&5
2618echo "$as_me: error: no acceptable C compiler found in \$PATH
2619See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 { (exit 1); exit 1; }; }
2621
2622# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002624ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625{ (ac_try="$ac_compiler --version >&5"
2626case "(($ac_try" in
2627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2628 *) ac_try_echo=$ac_try;;
2629esac
2630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2631 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_status=$?
2633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2634 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002635{ (ac_try="$ac_compiler -v >&5"
2636case "(($ac_try" in
2637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2638 *) ac_try_echo=$ac_try;;
2639esac
2640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2641 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 ac_status=$?
2643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2644 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002645{ (ac_try="$ac_compiler -V >&5"
2646case "(($ac_try" in
2647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2648 *) ac_try_echo=$ac_try;;
2649esac
2650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2651 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 ac_status=$?
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); }
2655
2656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002657/* confdefs.h. */
2658_ACEOF
2659cat confdefs.h >>conftest.$ac_ext
2660cat >>conftest.$ac_ext <<_ACEOF
2661/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663int
2664main ()
2665{
2666
2667 ;
2668 return 0;
2669}
2670_ACEOF
2671ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002672ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002673# Try to create an executable without -o first, disregard a.out.
2674# It will help us diagnose broken compilers, and finding out an intuition
2675# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002676{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2677echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679#
2680# List of possible output files, starting from the most likely.
2681# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2682# only as a last resort. b.out is created by i960 compilers.
2683ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2684#
2685# The IRIX 6 linker writes into existing files which may not be
2686# executable, retaining their permissions. Remove them first so a
2687# subsequent execution test works.
2688ac_rmfiles=
2689for ac_file in $ac_files
2690do
2691 case $ac_file in
2692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2693 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2694 esac
2695done
2696rm -f $ac_rmfiles
2697
2698if { (ac_try="$ac_link_default"
2699case "(($ac_try" in
2700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2701 *) ac_try_echo=$ac_try;;
2702esac
2703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2704 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 ac_status=$?
2706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2707 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2709# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2710# in a Makefile. We should not override ac_cv_exeext if it was cached,
2711# so that the user can short-circuit this test for compilers unknown to
2712# Autoconf.
2713for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002714do
2715 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002718 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002719 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002720 # We found the default executable, but exeext='' is most
2721 # certainly right.
2722 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002723 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2725 then :; else
2726 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2727 fi
2728 # We set ac_cv_exeext here because the later test for it is not
2729 # safe: cross compilers may not add the suffix if given an `-o'
2730 # argument, so we may need to know it at that point already.
2731 # Even if this section looks crufty: it has the advantage of
2732 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002734 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 esac
2737done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002738test "$ac_cv_exeext" = no && ac_cv_exeext=
2739
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002740else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 ac_file=''
2742fi
2743
2744{ echo "$as_me:$LINENO: result: $ac_file" >&5
2745echo "${ECHO_T}$ac_file" >&6; }
2746if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002748sed 's/^/| /' conftest.$ac_ext >&5
2749
2750{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2751See \`config.log' for more details." >&5
2752echo "$as_me: error: C compiler cannot create executables
2753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002755fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002756
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002758
Martin v. Löwiseba40652007-08-30 20:10:57 +00002759# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002760# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2762echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002763# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2764# If not cross compiling, check that we can run a simple program.
2765if test "$cross_compiling" != yes; then
2766 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767 { (case "(($ac_try" in
2768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2769 *) ac_try_echo=$ac_try;;
2770esac
2771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2772 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 ac_status=$?
2774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2775 (exit $ac_status); }; }; then
2776 cross_compiling=no
2777 else
2778 if test "$cross_compiling" = maybe; then
2779 cross_compiling=yes
2780 else
2781 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002782If you meant to cross compile, use \`--host'.
2783See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002785If you meant to cross compile, use \`--host'.
2786See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 { (exit 1); exit 1; }; }
2788 fi
2789 fi
2790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791{ echo "$as_me:$LINENO: result: yes" >&5
2792echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002793
Skip Montanaro6dead952003-09-25 14:50:04 +00002794rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002795ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002797# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002798{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2799echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2800{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2801echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002802
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2804echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2805if { (ac_try="$ac_link"
2806case "(($ac_try" in
2807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2808 *) ac_try_echo=$ac_try;;
2809esac
2810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2811 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002812 ac_status=$?
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); }; then
2815 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2816# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2817# work properly (i.e., refer to `conftest.exe'), while it won't with
2818# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002819for ac_file in conftest.exe conftest conftest.*; do
2820 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002822 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002823 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 * ) break;;
2826 esac
2827done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002828else
Skip Montanaro6dead952003-09-25 14:50:04 +00002829 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2830See \`config.log' for more details." >&5
2831echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2832See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002834fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002835
Martin v. Löwis11437992002-04-12 09:54:03 +00002836rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002837{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2838echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840rm -f conftest.$ac_ext
2841EXEEXT=$ac_cv_exeext
2842ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2844echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002845if test "${ac_cv_objext+set}" = set; then
2846 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002847else
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002849/* confdefs.h. */
2850_ACEOF
2851cat confdefs.h >>conftest.$ac_ext
2852cat >>conftest.$ac_ext <<_ACEOF
2853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
Martin v. Löwis11437992002-04-12 09:54:03 +00002855int
2856main ()
2857{
2858
2859 ;
2860 return 0;
2861}
2862_ACEOF
2863rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864if { (ac_try="$ac_compile"
2865case "(($ac_try" in
2866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2867 *) ac_try_echo=$ac_try;;
2868esac
2869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2870 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 ac_status=$?
2872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2873 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002874 for ac_file in conftest.o conftest.obj conftest.*; do
2875 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2879 break;;
2880 esac
2881done
2882else
2883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002884sed 's/^/| /' conftest.$ac_ext >&5
2885
2886{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2887See \`config.log' for more details." >&5
2888echo "$as_me: error: cannot compute suffix of object files: cannot compile
2889See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 { (exit 1); exit 1; }; }
2891fi
2892
2893rm -f conftest.$ac_cv_objext conftest.$ac_ext
2894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2896echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002897OBJEXT=$ac_cv_objext
2898ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2900echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901if test "${ac_cv_c_compiler_gnu+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903else
2904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911int
2912main ()
2913{
2914#ifndef __GNUC__
2915 choke me
2916#endif
2917
2918 ;
2919 return 0;
2920}
2921_ACEOF
2922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002923if { (ac_try="$ac_compile"
2924case "(($ac_try" in
2925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2926 *) ac_try_echo=$ac_try;;
2927esac
2928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002931 grep -v '^ *+' conftest.er1 >conftest.err
2932 rm -f conftest.er1
2933 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002935 (exit $ac_status); } && {
2936 test -z "$ac_c_werror_flag" ||
2937 test ! -s conftest.err
2938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 ac_compiler_gnu=yes
2940else
2941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002942sed 's/^/| /' conftest.$ac_ext >&5
2943
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002946
2947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002948ac_cv_c_compiler_gnu=$ac_compiler_gnu
2949
2950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2952echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953GCC=`test $ac_compiler_gnu = yes && echo yes`
2954ac_test_CFLAGS=${CFLAGS+set}
2955ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2957echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002958if test "${ac_cv_prog_cc_g+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2960else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961 ac_save_c_werror_flag=$ac_c_werror_flag
2962 ac_c_werror_flag=yes
2963 ac_cv_prog_cc_g=no
2964 CFLAGS="-g"
2965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002966/* confdefs.h. */
2967_ACEOF
2968cat confdefs.h >>conftest.$ac_ext
2969cat >>conftest.$ac_ext <<_ACEOF
2970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972int
2973main ()
2974{
2975
2976 ;
2977 return 0;
2978}
2979_ACEOF
2980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002981if { (ac_try="$ac_compile"
2982case "(($ac_try" in
2983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984 *) ac_try_echo=$ac_try;;
2985esac
2986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002989 grep -v '^ *+' conftest.er1 >conftest.err
2990 rm -f conftest.er1
2991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002993 (exit $ac_status); } && {
2994 test -z "$ac_c_werror_flag" ||
2995 test ! -s conftest.err
2996 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002997 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003000sed 's/^/| /' conftest.$ac_ext >&5
3001
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 CFLAGS=""
3003 cat >conftest.$ac_ext <<_ACEOF
3004/* confdefs.h. */
3005_ACEOF
3006cat confdefs.h >>conftest.$ac_ext
3007cat >>conftest.$ac_ext <<_ACEOF
3008/* end confdefs.h. */
3009
3010int
3011main ()
3012{
3013
3014 ;
3015 return 0;
3016}
3017_ACEOF
3018rm -f conftest.$ac_objext
3019if { (ac_try="$ac_compile"
3020case "(($ac_try" in
3021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3022 *) ac_try_echo=$ac_try;;
3023esac
3024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3025 (eval "$ac_compile") 2>conftest.er1
3026 ac_status=$?
3027 grep -v '^ *+' conftest.er1 >conftest.err
3028 rm -f conftest.er1
3029 cat conftest.err >&5
3030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3031 (exit $ac_status); } && {
3032 test -z "$ac_c_werror_flag" ||
3033 test ! -s conftest.err
3034 } && test -s conftest.$ac_objext; then
3035 :
3036else
3037 echo "$as_me: failed program was:" >&5
3038sed 's/^/| /' conftest.$ac_ext >&5
3039
3040 ac_c_werror_flag=$ac_save_c_werror_flag
3041 CFLAGS="-g"
3042 cat >conftest.$ac_ext <<_ACEOF
3043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
3048
3049int
3050main ()
3051{
3052
3053 ;
3054 return 0;
3055}
3056_ACEOF
3057rm -f conftest.$ac_objext
3058if { (ac_try="$ac_compile"
3059case "(($ac_try" in
3060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3061 *) ac_try_echo=$ac_try;;
3062esac
3063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3064 (eval "$ac_compile") 2>conftest.er1
3065 ac_status=$?
3066 grep -v '^ *+' conftest.er1 >conftest.err
3067 rm -f conftest.er1
3068 cat conftest.err >&5
3069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070 (exit $ac_status); } && {
3071 test -z "$ac_c_werror_flag" ||
3072 test ! -s conftest.err
3073 } && test -s conftest.$ac_objext; then
3074 ac_cv_prog_cc_g=yes
3075else
3076 echo "$as_me: failed program was:" >&5
3077sed 's/^/| /' conftest.$ac_ext >&5
3078
3079
Guido van Rossum627b2d71993-12-24 10:39:16 +00003080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003084
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086fi
3087
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3089 ac_c_werror_flag=$ac_save_c_werror_flag
3090fi
3091{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3092echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003093if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003094 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003095elif test $ac_cv_prog_cc_g = yes; then
3096 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003097 CFLAGS="-g -O2"
3098 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003100 fi
3101else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102 if test "$GCC" = yes; then
3103 CFLAGS="-O2"
3104 else
3105 CFLAGS=
3106 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003108{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3109echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3110if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003111 echo $ECHO_N "(cached) $ECHO_C" >&6
3112else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003114ac_save_CC=$CC
3115cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003116/* confdefs.h. */
3117_ACEOF
3118cat confdefs.h >>conftest.$ac_ext
3119cat >>conftest.$ac_ext <<_ACEOF
3120/* end confdefs.h. */
3121#include <stdarg.h>
3122#include <stdio.h>
3123#include <sys/types.h>
3124#include <sys/stat.h>
3125/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3126struct buf { int x; };
3127FILE * (*rcsopen) (struct buf *, struct stat *, int);
3128static char *e (p, i)
3129 char **p;
3130 int i;
3131{
3132 return p[i];
3133}
3134static char *f (char * (*g) (char **, int), char **p, ...)
3135{
3136 char *s;
3137 va_list v;
3138 va_start (v,p);
3139 s = g (p, va_arg (v,int));
3140 va_end (v);
3141 return s;
3142}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143
3144/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3145 function prototypes and stuff, but not '\xHH' hex character constants.
3146 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003147 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3149 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003150 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3152
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3154 inside strings and character constants. */
3155#define FOO(x) 'x'
3156int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3157
Skip Montanaro6dead952003-09-25 14:50:04 +00003158int test (int i, double x);
3159struct s1 {int (*f) (int a);};
3160struct s2 {int (*f) (double a);};
3161int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3162int argc;
3163char **argv;
3164int
3165main ()
3166{
3167return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3168 ;
3169 return 0;
3170}
3171_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3173 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003174do
3175 CC="$ac_save_CC $ac_arg"
3176 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177if { (ac_try="$ac_compile"
3178case "(($ac_try" in
3179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180 *) ac_try_echo=$ac_try;;
3181esac
3182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3183 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003185 grep -v '^ *+' conftest.er1 >conftest.err
3186 rm -f conftest.er1
3187 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189 (exit $ac_status); } && {
3190 test -z "$ac_c_werror_flag" ||
3191 test ! -s conftest.err
3192 } && test -s conftest.$ac_objext; then
3193 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003194else
3195 echo "$as_me: failed program was:" >&5
3196sed 's/^/| /' conftest.$ac_ext >&5
3197
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198
Skip Montanaro6dead952003-09-25 14:50:04 +00003199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200
3201rm -f core conftest.err conftest.$ac_objext
3202 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003203done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003205CC=$ac_save_CC
3206
3207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208# AC_CACHE_VAL
3209case "x$ac_cv_prog_cc_c89" in
3210 x)
3211 { echo "$as_me:$LINENO: result: none needed" >&5
3212echo "${ECHO_T}none needed" >&6; } ;;
3213 xno)
3214 { echo "$as_me:$LINENO: result: unsupported" >&5
3215echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003216 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217 CC="$CC $ac_cv_prog_cc_c89"
3218 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3219echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003220esac
3221
Skip Montanaro6dead952003-09-25 14:50:04 +00003222
Martin v. Löwis11437992002-04-12 09:54:03 +00003223ac_ext=c
3224ac_cpp='$CPP $CPPFLAGS'
3225ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3226ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3227ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003228
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003229
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230
3231
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3233echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003234
Martin v. Löwiseba40652007-08-30 20:10:57 +00003235# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003236if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003238
3239 case $withval in
3240 no) with_cxx_main=no
3241 MAINCC='$(CC)';;
3242 yes) with_cxx_main=yes
3243 MAINCC='$(CXX)';;
3244 *) with_cxx_main=yes
3245 MAINCC=$withval
3246 if test -z "$CXX"
3247 then
3248 CXX=$withval
3249 fi;;
3250 esac
3251else
3252
3253 with_cxx_main=no
3254 MAINCC='$(CC)'
3255
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256fi
3257
3258{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3259echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003260
3261preset_cxx="$CXX"
3262if test -z "$CXX"
3263then
3264 case "$CC" in
3265 gcc) # Extract the first word of "g++", so it can be a program name with args.
3266set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003267{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003269if test "${ac_cv_path_CXX+set}" = set; then
3270 echo $ECHO_N "(cached) $ECHO_C" >&6
3271else
3272 case $CXX in
3273 [\\/]* | ?:[\\/]*)
3274 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3275 ;;
3276 *)
3277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3278for as_dir in notfound
3279do
3280 IFS=$as_save_IFS
3281 test -z "$as_dir" && as_dir=.
3282 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003284 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3285 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3286 break 2
3287 fi
3288done
3289done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003290IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003291
3292 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3293 ;;
3294esac
3295fi
3296CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003297if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298 { echo "$as_me:$LINENO: result: $CXX" >&5
3299echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003300else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003301 { echo "$as_me:$LINENO: result: no" >&5
3302echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003305 ;;
3306 cc) # Extract the first word of "c++", so it can be a program name with args.
3307set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310if test "${ac_cv_path_CXX+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
3312else
3313 case $CXX in
3314 [\\/]* | ?:[\\/]*)
3315 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3316 ;;
3317 *)
3318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3319for as_dir in notfound
3320do
3321 IFS=$as_save_IFS
3322 test -z "$as_dir" && as_dir=.
3323 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003325 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3327 break 2
3328 fi
3329done
3330done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332
3333 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3334 ;;
3335esac
3336fi
3337CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003338if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 { echo "$as_me:$LINENO: result: $CXX" >&5
3340echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003341else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342 { echo "$as_me:$LINENO: result: no" >&5
3343echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003346 ;;
3347 esac
3348 if test "$CXX" = "notfound"
3349 then
3350 CXX=""
3351 fi
3352fi
3353if test -z "$CXX"
3354then
3355 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3356do
3357 # Extract the first word of "$ac_prog", so it can be a program name with args.
3358set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361if test "${ac_cv_prog_CXX+set}" = set; then
3362 echo $ECHO_N "(cached) $ECHO_C" >&6
3363else
3364 if test -n "$CXX"; then
3365 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3366else
3367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3368for as_dir in $PATH
3369do
3370 IFS=$as_save_IFS
3371 test -z "$as_dir" && as_dir=.
3372 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003374 ac_cv_prog_CXX="$ac_prog"
3375 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3376 break 2
3377 fi
3378done
3379done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003381
3382fi
3383fi
3384CXX=$ac_cv_prog_CXX
3385if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 { echo "$as_me:$LINENO: result: $CXX" >&5
3387echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003389 { echo "$as_me:$LINENO: result: no" >&5
3390echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391fi
3392
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394 test -n "$CXX" && break
3395done
3396test -n "$CXX" || CXX="notfound"
3397
3398 if test "$CXX" = "notfound"
3399 then
3400 CXX=""
3401 fi
3402fi
3403if test "$preset_cxx" != "$CXX"
3404then
3405 { echo "$as_me:$LINENO: WARNING:
3406
3407 By default, distutils will build C++ extension modules with \"$CXX\".
3408 If this is not intended, then set CXX on the configure command line.
3409 " >&5
3410echo "$as_me: WARNING:
3411
3412 By default, distutils will build C++ extension modules with \"$CXX\".
3413 If this is not intended, then set CXX on the configure command line.
3414 " >&2;}
3415fi
3416
3417
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003418# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
3420ac_ext=c
3421ac_cpp='$CPP $CPPFLAGS'
3422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3426echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003427# On Suns, sometimes $CPP names a directory.
3428if test -n "$CPP" && test -d "$CPP"; then
3429 CPP=
3430fi
3431if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 if test "${ac_cv_prog_CPP+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434else
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 # Double quotes because CPP needs to be expanded
3436 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3437 do
3438 ac_preproc_ok=false
3439for ac_c_preproc_warn_flag in '' yes
3440do
3441 # Use a header file that comes with gcc, so configuring glibc
3442 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003443 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3444 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # not just through cpp. "Syntax error" is here to catch this case.
3447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003448/* confdefs.h. */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h. */
3453#ifdef __STDC__
3454# include <limits.h>
3455#else
3456# include <assert.h>
3457#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003458 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003460if { (ac_try="$ac_cpp conftest.$ac_ext"
3461case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464esac
3465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3466 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 rm -f conftest.er1
3470 cat conftest.err >&5
3471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472 (exit $ac_status); } >/dev/null && {
3473 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3474 test ! -s conftest.err
3475 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003476 :
3477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003479sed 's/^/| /' conftest.$ac_ext >&5
3480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481 # Broken: fails on valid input.
3482continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003486
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # can be detected and how.
3489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003490/* confdefs.h. */
3491_ACEOF
3492cat confdefs.h >>conftest.$ac_ext
3493cat >>conftest.$ac_ext <<_ACEOF
3494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003495#include <ac_nonexistent.h>
3496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497if { (ac_try="$ac_cpp conftest.$ac_ext"
3498case "(($ac_try" in
3499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3500 *) ac_try_echo=$ac_try;;
3501esac
3502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3503 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003505 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 rm -f conftest.er1
3507 cat conftest.err >&5
3508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509 (exit $ac_status); } >/dev/null && {
3510 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3511 test ! -s conftest.err
3512 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # Broken: success on invalid input.
3514continue
3515else
3516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003517sed 's/^/| /' conftest.$ac_ext >&5
3518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # Passes both tests.
3520ac_preproc_ok=:
3521break
3522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523
Martin v. Löwis11437992002-04-12 09:54:03 +00003524rm -f conftest.err conftest.$ac_ext
3525
3526done
3527# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3528rm -f conftest.err conftest.$ac_ext
3529if $ac_preproc_ok; then
3530 break
3531fi
3532
3533 done
3534 ac_cv_prog_CPP=$CPP
3535
3536fi
3537 CPP=$ac_cv_prog_CPP
3538else
3539 ac_cv_prog_CPP=$CPP
3540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541{ echo "$as_me:$LINENO: result: $CPP" >&5
3542echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543ac_preproc_ok=false
3544for ac_c_preproc_warn_flag in '' yes
3545do
3546 # Use a header file that comes with gcc, so configuring glibc
3547 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003548 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3549 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # On the NeXT, cc -E runs the code through the compiler's parser,
3551 # not just through cpp. "Syntax error" is here to catch this case.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
3558#ifdef __STDC__
3559# include <limits.h>
3560#else
3561# include <assert.h>
3562#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003563 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003565if { (ac_try="$ac_cpp conftest.$ac_ext"
3566case "(($ac_try" in
3567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3568 *) ac_try_echo=$ac_try;;
3569esac
3570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003573 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 rm -f conftest.er1
3575 cat conftest.err >&5
3576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003577 (exit $ac_status); } >/dev/null && {
3578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3579 test ! -s conftest.err
3580 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 :
3582else
3583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003584sed 's/^/| /' conftest.$ac_ext >&5
3585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 # Broken: fails on valid input.
3587continue
3588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590rm -f conftest.err conftest.$ac_ext
3591
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # can be detected and how.
3594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003595/* confdefs.h. */
3596_ACEOF
3597cat confdefs.h >>conftest.$ac_ext
3598cat >>conftest.$ac_ext <<_ACEOF
3599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003600#include <ac_nonexistent.h>
3601_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602if { (ac_try="$ac_cpp conftest.$ac_ext"
3603case "(($ac_try" in
3604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605 *) ac_try_echo=$ac_try;;
3606esac
3607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 rm -f conftest.er1
3612 cat conftest.err >&5
3613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 (exit $ac_status); } >/dev/null && {
3615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3616 test ! -s conftest.err
3617 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 # Broken: success on invalid input.
3619continue
3620else
3621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003622sed 's/^/| /' conftest.$ac_ext >&5
3623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 # Passes both tests.
3625ac_preproc_ok=:
3626break
3627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629rm -f conftest.err conftest.$ac_ext
3630
3631done
3632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3633rm -f conftest.err conftest.$ac_ext
3634if $ac_preproc_ok; then
3635 :
3636else
Skip Montanaro6dead952003-09-25 14:50:04 +00003637 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3638See \`config.log' for more details." >&5
3639echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3640See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 { (exit 1); exit 1; }; }
3642fi
3643
3644ac_ext=c
3645ac_cpp='$CPP $CPPFLAGS'
3646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3648ac_compiler_gnu=$ac_cv_c_compiler_gnu
3649
3650
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3652echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3653if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 echo $ECHO_N "(cached) $ECHO_C" >&6
3655else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003656 # Extract the first word of "grep ggrep" to use in msg output
3657if test -z "$GREP"; then
3658set dummy grep ggrep; ac_prog_name=$2
3659if test "${ac_cv_path_GREP+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
3662 ac_path_GREP_found=false
3663# Loop through the user's path and test for each of PROGNAME-LIST
3664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3665for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3666do
3667 IFS=$as_save_IFS
3668 test -z "$as_dir" && as_dir=.
3669 for ac_prog in grep ggrep; do
3670 for ac_exec_ext in '' $ac_executable_extensions; do
3671 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3672 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3673 # Check for GNU ac_path_GREP and select it if it is found.
3674 # Check for GNU $ac_path_GREP
3675case `"$ac_path_GREP" --version 2>&1` in
3676*GNU*)
3677 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3678*)
3679 ac_count=0
3680 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3681 while :
3682 do
3683 cat "conftest.in" "conftest.in" >"conftest.tmp"
3684 mv "conftest.tmp" "conftest.in"
3685 cp "conftest.in" "conftest.nl"
3686 echo 'GREP' >> "conftest.nl"
3687 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3688 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3689 ac_count=`expr $ac_count + 1`
3690 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3691 # Best one so far, save it but keep looking for a better one
3692 ac_cv_path_GREP="$ac_path_GREP"
3693 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003694 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003695 # 10*(2^10) chars as input seems more than enough
3696 test $ac_count -gt 10 && break
3697 done
3698 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3699esac
3700
3701
3702 $ac_path_GREP_found && break 3
3703 done
3704done
3705
3706done
3707IFS=$as_save_IFS
3708
3709
Skip Montanaro6dead952003-09-25 14:50:04 +00003710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003711
3712GREP="$ac_cv_path_GREP"
3713if test -z "$GREP"; then
3714 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3715echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3716 { (exit 1); exit 1; }; }
3717fi
3718
3719else
3720 ac_cv_path_GREP=$GREP
3721fi
3722
3723
3724fi
3725{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3726echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3727 GREP="$ac_cv_path_GREP"
3728
3729
3730{ echo "$as_me:$LINENO: checking for egrep" >&5
3731echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3732if test "${ac_cv_path_EGREP+set}" = set; then
3733 echo $ECHO_N "(cached) $ECHO_C" >&6
3734else
3735 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3736 then ac_cv_path_EGREP="$GREP -E"
3737 else
3738 # Extract the first word of "egrep" to use in msg output
3739if test -z "$EGREP"; then
3740set dummy egrep; ac_prog_name=$2
3741if test "${ac_cv_path_EGREP+set}" = set; then
3742 echo $ECHO_N "(cached) $ECHO_C" >&6
3743else
3744 ac_path_EGREP_found=false
3745# Loop through the user's path and test for each of PROGNAME-LIST
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
3751 for ac_prog in egrep; do
3752 for ac_exec_ext in '' $ac_executable_extensions; do
3753 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3754 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3755 # Check for GNU ac_path_EGREP and select it if it is found.
3756 # Check for GNU $ac_path_EGREP
3757case `"$ac_path_EGREP" --version 2>&1` in
3758*GNU*)
3759 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3760*)
3761 ac_count=0
3762 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3763 while :
3764 do
3765 cat "conftest.in" "conftest.in" >"conftest.tmp"
3766 mv "conftest.tmp" "conftest.in"
3767 cp "conftest.in" "conftest.nl"
3768 echo 'EGREP' >> "conftest.nl"
3769 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3770 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3771 ac_count=`expr $ac_count + 1`
3772 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3773 # Best one so far, save it but keep looking for a better one
3774 ac_cv_path_EGREP="$ac_path_EGREP"
3775 ac_path_EGREP_max=$ac_count
3776 fi
3777 # 10*(2^10) chars as input seems more than enough
3778 test $ac_count -gt 10 && break
3779 done
3780 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3781esac
3782
3783
3784 $ac_path_EGREP_found && break 3
3785 done
3786done
3787
3788done
3789IFS=$as_save_IFS
3790
3791
3792fi
3793
3794EGREP="$ac_cv_path_EGREP"
3795if test -z "$EGREP"; then
3796 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3797echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3798 { (exit 1); exit 1; }; }
3799fi
3800
3801else
3802 ac_cv_path_EGREP=$EGREP
3803fi
3804
3805
3806 fi
3807fi
3808{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3809echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3810 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003811
3812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814{ echo "$as_me:$LINENO: checking for AIX" >&5
3815echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003817/* confdefs.h. */
3818_ACEOF
3819cat confdefs.h >>conftest.$ac_ext
3820cat >>conftest.$ac_ext <<_ACEOF
3821/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003822#ifdef _AIX
3823 yes
3824#endif
3825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003828 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 { echo "$as_me:$LINENO: result: yes" >&5
3830echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003831cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003832#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003833_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003834
3835else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836 { echo "$as_me:$LINENO: result: no" >&5
3837echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838fi
3839rm -f conftest*
3840
Michael W. Hudson54241132001-12-07 15:38:26 +00003841
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003842
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003843# Check for unsupported systems
3844case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003845atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003846 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3847 echo See README for details.
3848 exit 1;;
3849esac
3850
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3853echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003856if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003858 case $withval in
3859 no) EXEEXT=;;
3860 yes) EXEEXT=.exe;;
3861 *) EXEEXT=$withval;;
3862 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863fi
3864
3865{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3866echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003867
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003868# Test whether we're running on a non-case-sensitive system, in which
3869# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003870
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3872echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003873if test ! -d CaseSensitiveTestDir; then
3874mkdir CaseSensitiveTestDir
3875fi
3876
3877if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003878then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879 { echo "$as_me:$LINENO: result: yes" >&5
3880echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003881 BUILDEXEEXT=.exe
3882else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 { echo "$as_me:$LINENO: result: no" >&5
3884echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003885 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003886fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003887rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003888
Guido van Rossumdd997f71998-10-07 19:58:26 +00003889case $MACHDEP in
3890bsdos*)
3891 case $CC in
3892 gcc) CC="$CC -D_HAVE_BSDI";;
3893 esac;;
3894esac
3895
Guido van Rossum24b1e751997-08-21 02:29:16 +00003896case $ac_sys_system in
3897hp*|HP*)
3898 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003899 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003900 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003901Monterey*)
3902 case $CC in
3903 cc) CC="$CC -Wl,-Bexport";;
3904 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003905SunOS*)
3906 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003907
3908cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003909#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003910_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003911
3912 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003913esac
3914
Michael W. Hudson54241132001-12-07 15:38:26 +00003915
3916
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3918echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003919if test -z "$LIBRARY"
3920then
3921 LIBRARY='libpython$(VERSION).a'
3922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3924echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003925
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003926# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003927# name of the library into which to insert object files). BLDLIBRARY is also
3928# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3929# is blank as the main program is not linked directly against LDLIBRARY.
3930# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3931# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3932# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3933# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003934#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003935# RUNSHARED is used to run shared python without installed libraries
3936#
3937# INSTSONAME is the name of the shared library that will be use to install
3938# on the system - some systems like version suffix, others don't
3939
3940
Michael W. Hudson54241132001-12-07 15:38:26 +00003941
3942
3943
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003944
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003945LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003946BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003947INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003948DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003949LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003950RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003951
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003952# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003953# If CXX is set, and if it is needed to link a main function that was
3954# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3955# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003956# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003957# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003958
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959{ echo "$as_me:$LINENO: checking LINKCC" >&5
3960echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003961if test -z "$LINKCC"
3962then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003963 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003964 case $ac_sys_system in
3965 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003966 exp_extra="\"\""
3967 if test $ac_sys_release -ge 5 -o \
3968 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3969 exp_extra="."
3970 fi
3971 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003972 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003973 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003974 QNX*)
3975 # qcc must be used because the other compilers do not
3976 # support -N.
3977 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003978 esac
3979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003980{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3981echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003982
Martin v. Löwiseba40652007-08-30 20:10:57 +00003983{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3984echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3985# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003986if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987 enableval=$enable_shared;
3988fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003989
Martin v. Löwis1142de32002-03-29 16:28:31 +00003990
3991if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003992then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003993 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003994 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003995 enable_shared="yes";;
3996 *)
3997 enable_shared="no";;
3998 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4001echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004002
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4004echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4005# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004006if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004008 CC="$CC -pg"
4009 if test "$cross_compiling" = yes; then
4010 ac_enable_profiling="no"
4011else
4012 cat >conftest.$ac_ext <<_ACEOF
4013/* confdefs.h. */
4014_ACEOF
4015cat confdefs.h >>conftest.$ac_ext
4016cat >>conftest.$ac_ext <<_ACEOF
4017/* end confdefs.h. */
4018int main() { return 0; }
4019_ACEOF
4020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021if { (ac_try="$ac_link"
4022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4027 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004028 ac_status=$?
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031 { (case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
4035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4036 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004037 ac_status=$?
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); }; }; then
4040 ac_enable_profiling="yes"
4041else
4042 echo "$as_me: program exited with status $ac_status" >&5
4043echo "$as_me: failed program was:" >&5
4044sed 's/^/| /' conftest.$ac_ext >&5
4045
4046( exit $ac_status )
4047ac_enable_profiling="no"
4048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004049rm -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 +00004050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004051
4052
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004053 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004054fi
4055
4056{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4057echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004058
4059case "$ac_enable_profiling" in
4060 "yes")
4061 BASECFLAGS="-pg $BASECFLAGS"
4062 LDFLAGS="-pg $LDFLAGS"
4063 ;;
4064esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004065
Martin v. Löwiseba40652007-08-30 20:10:57 +00004066{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4067echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004068
Guido van Rossumb8552162001-09-05 14:58:11 +00004069# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4070# library that we build, but we do not want to link against it (we
4071# will find it with a -framework option). For this reason there is an
4072# extra variable BLDLIBRARY against which Python and the extension
4073# modules are linked, BLDLIBRARY. This is normally the same as
4074# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004075if test "$enable_framework"
4076then
4077 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004078 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004079 BLDLIBRARY=''
4080else
4081 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004082fi
Jack Jansene578a632001-08-15 01:27:14 +00004083
Martin v. Löwis1142de32002-03-29 16:28:31 +00004084# Other platforms follow
4085if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004086
4087cat >>confdefs.h <<\_ACEOF
4088#define Py_ENABLE_SHARED 1
4089_ACEOF
4090
Martin v. Löwis1142de32002-03-29 16:28:31 +00004091 case $ac_sys_system in
4092 BeOS*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 ;;
4095 CYGWIN*)
4096 LDLIBRARY='libpython$(VERSION).dll.a'
4097 DLLLIBRARY='libpython$(VERSION).dll'
4098 ;;
4099 SunOS*)
4100 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004101 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004102 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004103 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004104 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004105 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004106 LDLIBRARY='libpython$(VERSION).so'
4107 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004109 case $ac_sys_system in
4110 FreeBSD*)
4111 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4112 ;;
4113 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004114 INSTSONAME="$LDLIBRARY".$SOVERSION
4115 ;;
4116 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004117 case `uname -m` in
4118 ia64)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 ;;
4121 *)
4122 LDLIBRARY='libpython$(VERSION).sl'
4123 ;;
4124 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004125 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004126 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004127 ;;
4128 OSF*)
4129 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004130 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004131 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004132 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004133 atheos*)
4134 LDLIBRARY='libpython$(VERSION).so'
4135 BLDLIBRARY='-L. -lpython$(VERSION)'
4136 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4137 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 esac
Jason Tishler30765592003-09-04 11:04:06 +00004139else # shared is disabled
4140 case $ac_sys_system in
4141 CYGWIN*)
4142 BLDLIBRARY='$(LIBRARY)'
4143 LDLIBRARY='libpython$(VERSION).dll.a'
4144 ;;
4145 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004146fi
4147
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4149echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151if test -n "$ac_tool_prefix"; then
4152 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4153set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4155echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004156if test "${ac_cv_prog_RANLIB+set}" = set; then
4157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158else
4159 if test -n "$RANLIB"; then
4160 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4161else
Martin v. Löwis11437992002-04-12 09:54:03 +00004162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165 IFS=$as_save_IFS
4166 test -z "$as_dir" && as_dir=.
4167 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168 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 +00004169 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4170 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4171 break 2
4172 fi
4173done
4174done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004176
Guido van Rossum627b2d71993-12-24 10:39:16 +00004177fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004179RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4182echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184 { echo "$as_me:$LINENO: result: no" >&5
4185echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186fi
4187
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189fi
4190if test -z "$ac_cv_prog_RANLIB"; then
4191 ac_ct_RANLIB=$RANLIB
4192 # Extract the first word of "ranlib", so it can be a program name with args.
4193set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004196if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4197 echo $ECHO_N "(cached) $ECHO_C" >&6
4198else
4199 if test -n "$ac_ct_RANLIB"; then
4200 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4201else
4202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4203for as_dir in $PATH
4204do
4205 IFS=$as_save_IFS
4206 test -z "$as_dir" && as_dir=.
4207 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208 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 +00004209 ac_cv_prog_ac_ct_RANLIB="ranlib"
4210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4211 break 2
4212 fi
4213done
4214done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004215IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217fi
4218fi
4219ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4220if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4222echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004223else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 { echo "$as_me:$LINENO: result: no" >&5
4225echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004226fi
4227
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228 if test "x$ac_ct_RANLIB" = x; then
4229 RANLIB=":"
4230 else
4231 case $cross_compiling:$ac_tool_warned in
4232yes:)
4233{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4234whose name does not start with the host triplet. If you think this
4235configuration is useful to you, please write to autoconf@gnu.org." >&5
4236echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4237whose name does not start with the host triplet. If you think this
4238configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4239ac_tool_warned=yes ;;
4240esac
4241 RANLIB=$ac_ct_RANLIB
4242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004243else
4244 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
4247
Guido van Rossum7f43da71994-08-01 12:15:30 +00004248for ac_prog in ar aal
4249do
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4253echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004254if test "${ac_cv_prog_AR+set}" = set; then
4255 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
4257 if test -n "$AR"; then
4258 ac_cv_prog_AR="$AR" # Let the user override the test.
4259else
Martin v. Löwis11437992002-04-12 09:54:03 +00004260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261for as_dir in $PATH
4262do
4263 IFS=$as_save_IFS
4264 test -z "$as_dir" && as_dir=.
4265 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266 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 +00004267 ac_cv_prog_AR="$ac_prog"
4268 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4269 break 2
4270 fi
4271done
4272done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004273IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
Guido van Rossum7f43da71994-08-01 12:15:30 +00004275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004277AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { echo "$as_me:$LINENO: result: $AR" >&5
4280echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282 { echo "$as_me:$LINENO: result: no" >&5
4283echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004285
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004288done
4289test -n "$AR" || AR="ar"
4290
Michael W. Hudson54241132001-12-07 15:38:26 +00004291
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004292
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004293# Extract the first word of "svnversion", so it can be a program name with args.
4294set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004297if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4298 echo $ECHO_N "(cached) $ECHO_C" >&6
4299else
4300 if test -n "$SVNVERSION"; then
4301 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4302else
4303as_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 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309 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 +00004310 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4312 break 2
4313 fi
4314done
4315done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004316IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004317
Martin v. Löwisff600232006-04-03 19:12:32 +00004318 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004319fi
4320fi
4321SVNVERSION=$ac_cv_prog_SVNVERSION
4322if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004323 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4324echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004325else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004328fi
4329
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004331if test $SVNVERSION = found
4332then
4333 SVNVERSION="svnversion \$(srcdir)"
4334else
4335 SVNVERSION="echo exported"
4336fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004337
Neil Schemenauera42c8272001-03-31 00:01:55 +00004338case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004339bsdos*|hp*|HP*)
4340 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004341 if test -z "$INSTALL"
4342 then
4343 INSTALL="${srcdir}/install-sh -c"
4344 fi
4345esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004346ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004347for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4348 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004352 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004356 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361done
4362if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4364echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367
4368# These three variables are undocumented and unsupported,
4369# and are intended to be withdrawn in a future Autoconf release.
4370# They can cause serious problems if a builder's source tree is in a directory
4371# whose full name contains unusual characters.
4372ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4373ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4374ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4375
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004376
4377# Find a good install program. We prefer a C program (faster),
4378# so one script is as good as another. But avoid the broken or
4379# incompatible versions:
4380# SysV /etc/install, /usr/sbin/install
4381# SunOS /usr/etc/install
4382# IRIX /sbin/install
4383# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004384# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004388# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4391echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004392if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004393if test "${ac_cv_path_install+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395else
Martin v. Löwis11437992002-04-12 09:54:03 +00004396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399 IFS=$as_save_IFS
4400 test -z "$as_dir" && as_dir=.
4401 # Account for people who put trailing slashes in PATH elements.
4402case $as_dir/ in
4403 ./ | .// | /cC/* | \
4404 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004405 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004406 /usr/ucb/* ) ;;
4407 *)
4408 # OSF1 and SCO ODT 3.0 have their own names for install.
4409 # Don't use installbsd from OSF since it installs stuff as root
4410 # by default.
4411 for ac_prog in ginstall scoinst install; do
4412 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413 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 +00004414 if test $ac_prog = install &&
4415 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4416 # AIX install. It has an incompatible calling convention.
4417 :
4418 elif test $ac_prog = install &&
4419 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # program-specific install script used by HP pwplus--don't use.
4421 :
4422 else
4423 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4424 break 3
4425 fi
4426 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004428 done
4429 ;;
4430esac
4431done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004433
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004434
4435fi
4436 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004437 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439 # As a last resort, use the slow shell script. Don't cache a
4440 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004441 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004442 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004444 fi
4445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4447echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448
4449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4450# It thinks the first close brace ends the variable substitution.
4451test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4452
Martin v. Löwis11437992002-04-12 09:54:03 +00004453test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004454
4455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4456
Michael W. Hudson54241132001-12-07 15:38:26 +00004457
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004458# Not every filesystem supports hard links
4459
4460if test -z "$LN" ; then
4461 case $ac_sys_system in
4462 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004463 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004464 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004465 *) LN=ln;;
4466 esac
4467fi
4468
Fred Drake109d9862001-07-11 06:27:56 +00004469# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4471echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004472
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004474if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004476if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004477then
4478
4479cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004480#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004481_ACEOF
4482
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483 { echo "$as_me:$LINENO: result: yes" >&5
4484echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004485 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486else { echo "$as_me:$LINENO: result: no" >&5
4487echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004488fi
4489else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004490 { echo "$as_me:$LINENO: result: no" >&5
4491echo "${ECHO_T}no" >&6; }
4492fi
4493
Fred Drake109d9862001-07-11 06:27:56 +00004494
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4496# merged with this chunk of code?
4497
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004498# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499# ------------------------
4500# (The following bit of code is complicated enough - please keep things
4501# indented properly. Just pretend you're editing Python code. ;-)
4502
4503# There are two parallel sets of case statements below, one that checks to
4504# see if OPT was set and one that does BASECFLAGS setting based upon
4505# compiler and platform. BASECFLAGS tweaks need to be made even if the
4506# user set OPT.
4507
4508# tweak OPT based on compiler and platform, only if the user didn't set
4509# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004510
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004511if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004512then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004513 case $GCC in
4514 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004515 if test "$CC" != 'g++' ; then
4516 STRICT_PROTO="-Wstrict-prototypes"
4517 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004518 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4519 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4520 WRAP="-fwrapv"
4521 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004523 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004524 if test "$Py_DEBUG" = 'true' ; then
4525 # Optimization messes up debuggers, so turn it off for
4526 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004527 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004528 else
Thomas Hellere5529592007-12-13 21:20:29 +00004529 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004530 fi
4531 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004532 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004533 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004535 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004536 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004537 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4538 ;;
4539 esac
Fred Drake109d9862001-07-11 06:27:56 +00004540 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004542 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004543 OPT="-O"
4544 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004545 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546
4547 # The current (beta) Monterey compiler dies with optimizations
4548 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004549 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550 Monterey*)
4551 OPT=""
4552 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004553 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004554
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004555fi
4556
Skip Montanarodecc6a42003-01-01 20:07:49 +00004557
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004558
4559# The -arch flags for universal builds on OSX
4560UNIVERSAL_ARCH_FLAGS=
4561
4562
Skip Montanarodecc6a42003-01-01 20:07:49 +00004563# tweak BASECFLAGS based on compiler and platform
4564case $GCC in
4565yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004566 # Python violates C99 rules, by casting between incompatible
4567 # pointer types. GCC may generate bad code as a result of that,
4568 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004569 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4570echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004571 ac_save_cc="$CC"
4572 CC="$CC -fno-strict-aliasing"
4573 if test "$cross_compiling" = yes; then
4574 ac_cv_no_strict_aliasing_ok=no
4575else
4576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004582int main() { return 0; }
4583_ACEOF
4584rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585if { (ac_try="$ac_link"
4586case "(($ac_try" in
4587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4588 *) ac_try_echo=$ac_try;;
4589esac
4590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4591 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004595 { (case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
4599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4600 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); }; }; then
4604 ac_cv_no_strict_aliasing_ok=yes
4605else
4606 echo "$as_me: program exited with status $ac_status" >&5
4607echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004608sed 's/^/| /' conftest.$ac_ext >&5
4609
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004610( exit $ac_status )
4611ac_cv_no_strict_aliasing_ok=no
4612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004613rm -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 +00004614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615
4616
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004617 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004618 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4619echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004620 if test $ac_cv_no_strict_aliasing_ok = yes
4621 then
4622 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4623 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004624
4625 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4626 # support. Without this, treatment of subnormals doesn't follow
4627 # the standard.
4628 case $ac_sys_machine in
4629 alpha*)
4630 BASECFLAGS="$BASECFLAGS -mieee"
4631 ;;
4632 esac
4633
Skip Montanarodecc6a42003-01-01 20:07:49 +00004634 case $ac_sys_system in
4635 SCO_SV*)
4636 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4637 ;;
4638 # is there any other compiler on Darwin besides gcc?
4639 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004640 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4641 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004642 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004643 UNIVERSAL_ARCH_FLAGS=""
4644 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4646
4647 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4648 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4649
4650 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4652
4653 else
4654 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4655echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4656 { (exit 1); exit 1; }; }
4657
4658 fi
4659
4660
4661 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00004662 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004663 fi
4664
Skip Montanarodecc6a42003-01-01 20:07:49 +00004665 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004666 OSF*)
4667 BASECFLAGS="$BASECFLAGS -mieee"
4668 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004669 esac
4670 ;;
4671
4672*)
4673 case $ac_sys_system in
4674 OpenUNIX*|UnixWare*)
4675 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4676 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004677 OSF*)
4678 BASECFLAGS="$BASECFLAGS -ieee -std"
4679 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004680 SCO_SV*)
4681 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4682 ;;
4683 esac
4684 ;;
4685esac
4686
Fred Drakee1ceaa02001-12-04 20:55:47 +00004687if test "$Py_DEBUG" = 'true'; then
4688 :
4689else
4690 OPT="-DNDEBUG $OPT"
4691fi
4692
Guido van Rossum563e7081996-09-10 18:20:48 +00004693if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004694then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004695 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004696fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004697
Neal Norwitz020c46a2006-01-07 21:39:28 +00004698# disable check for icc since it seems to pass, but generates a warning
4699if test "$CC" = icc
4700then
4701 ac_cv_opt_olimit_ok=no
4702fi
4703
Martin v. Löwiseba40652007-08-30 20:10:57 +00004704{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4705echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004706if test "${ac_cv_opt_olimit_ok+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004708else
4709 ac_save_cc="$CC"
4710CC="$CC -OPT:Olimit=0"
4711if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004712 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004713else
Martin v. Löwis11437992002-04-12 09:54:03 +00004714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004715/* confdefs.h. */
4716_ACEOF
4717cat confdefs.h >>conftest.$ac_ext
4718cat >>conftest.$ac_ext <<_ACEOF
4719/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004720int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004721_ACEOF
4722rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004723if { (ac_try="$ac_link"
4724case "(($ac_try" in
4725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4726 *) ac_try_echo=$ac_try;;
4727esac
4728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4729 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004733 { (case "(($ac_try" in
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4736esac
4737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004742 ac_cv_opt_olimit_ok=yes
4743else
Martin v. Löwis11437992002-04-12 09:54:03 +00004744 echo "$as_me: program exited with status $ac_status" >&5
4745echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004746sed 's/^/| /' conftest.$ac_ext >&5
4747
Martin v. Löwis11437992002-04-12 09:54:03 +00004748( exit $ac_status )
4749ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751rm -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 +00004752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004753
4754
Guido van Rossum91922671997-10-09 20:24:13 +00004755CC="$ac_save_cc"
4756fi
4757
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4759echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004760if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004761 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004762 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4763 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4764 # environment?
4765 Darwin*)
4766 ;;
4767 *)
4768 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4769 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004770 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004771else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004772 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4773echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 if test "${ac_cv_olimit_ok+set}" = set; then
4775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004776else
4777 ac_save_cc="$CC"
4778 CC="$CC -Olimit 1500"
4779 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004780 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004788int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004789_ACEOF
4790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791if { (ac_try="$ac_link"
4792case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795esac
4796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4797 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801 { (case "(($ac_try" in
4802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4803 *) ac_try_echo=$ac_try;;
4804esac
4805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4806 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004810 ac_cv_olimit_ok=yes
4811else
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 echo "$as_me: program exited with status $ac_status" >&5
4813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004814sed 's/^/| /' conftest.$ac_ext >&5
4815
Martin v. Löwis11437992002-04-12 09:54:03 +00004816( exit $ac_status )
4817ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819rm -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 +00004820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821
4822
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004823 CC="$ac_save_cc"
4824fi
4825
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4827echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004828 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004829 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004830 fi
4831fi
4832
Martin v. Löwisaac13162006-10-19 10:58:46 +00004833# Check whether GCC supports PyArg_ParseTuple format
4834if test "$GCC" = "yes"
4835then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004836 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4837echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004838 save_CFLAGS=$CFLAGS
4839 CFLAGS="$CFLAGS -Werror"
4840 cat >conftest.$ac_ext <<_ACEOF
4841/* confdefs.h. */
4842_ACEOF
4843cat confdefs.h >>conftest.$ac_ext
4844cat >>conftest.$ac_ext <<_ACEOF
4845/* end confdefs.h. */
4846
4847 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4848
4849int
4850main ()
4851{
4852
4853 ;
4854 return 0;
4855}
4856_ACEOF
4857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858if { (ac_try="$ac_compile"
4859case "(($ac_try" in
4860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4861 *) ac_try_echo=$ac_try;;
4862esac
4863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004865 ac_status=$?
4866 grep -v '^ *+' conftest.er1 >conftest.err
4867 rm -f conftest.er1
4868 cat conftest.err >&5
4869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004870 (exit $ac_status); } && {
4871 test -z "$ac_c_werror_flag" ||
4872 test ! -s conftest.err
4873 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004874
4875cat >>confdefs.h <<\_ACEOF
4876#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4877_ACEOF
4878
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 { echo "$as_me:$LINENO: result: yes" >&5
4880echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004881else
4882 echo "$as_me: failed program was:" >&5
4883sed 's/^/| /' conftest.$ac_ext >&5
4884
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 { echo "$as_me:$LINENO: result: no" >&5
4886echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004887
4888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004889
4890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004891 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004892fi
4893
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004894# On some compilers, pthreads are available without further options
4895# (e.g. MacOS X). On some of these systems, the compiler will not
4896# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4897# So we have to see first whether pthreads are available without
4898# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4900echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004901if test "${ac_cv_pthread_is_default+set}" = set; then
4902 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004903else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004904 if test "$cross_compiling" = yes; then
4905 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004906else
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004913
Martin v. Löwis130fb172001-07-19 11:00:41 +00004914#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004915
4916void* routine(void* p){return NULL;}
4917
4918int main(){
4919 pthread_t p;
4920 if(pthread_create(&p,NULL,routine,NULL)!=0)
4921 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004922 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004923 return 0;
4924}
4925
Martin v. Löwis11437992002-04-12 09:54:03 +00004926_ACEOF
4927rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928if { (ac_try="$ac_link"
4929case "(($ac_try" in
4930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4931 *) ac_try_echo=$ac_try;;
4932esac
4933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4934 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 ac_status=$?
4936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 { (case "(($ac_try" in
4939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4940 *) ac_try_echo=$ac_try;;
4941esac
4942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4943 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004947
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004948 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004949 ac_cv_kthread=no
4950 ac_cv_pthread=no
4951
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 echo "$as_me: program exited with status $ac_status" >&5
4954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957( exit $ac_status )
4958ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004960rm -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 +00004961fi
4962
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963
4964
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004965fi
4966
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4968echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004969
Michael W. Hudson54241132001-12-07 15:38:26 +00004970
Martin v. Löwis11437992002-04-12 09:54:03 +00004971if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004972then
4973 ac_cv_kpthread=no
4974else
4975# -Kpthread, if available, provides the right #defines
4976# and linker options to make pthread_create available
4977# Some compilers won't report that they do not support -Kpthread,
4978# so we need to run a program to see whether it really made the
4979# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4981echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004982if test "${ac_cv_kpthread+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004984else
4985 ac_save_cc="$CC"
4986CC="$CC -Kpthread"
4987if test "$cross_compiling" = yes; then
4988 ac_cv_kpthread=no
4989else
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004991/* confdefs.h. */
4992_ACEOF
4993cat confdefs.h >>conftest.$ac_ext
4994cat >>conftest.$ac_ext <<_ACEOF
4995/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004996
4997#include <pthread.h>
4998
4999void* routine(void* p){return NULL;}
5000
5001int main(){
5002 pthread_t p;
5003 if(pthread_create(&p,NULL,routine,NULL)!=0)
5004 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005005 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005006 return 0;
5007}
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009_ACEOF
5010rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005011if { (ac_try="$ac_link"
5012case "(($ac_try" in
5013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5014 *) ac_try_echo=$ac_try;;
5015esac
5016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5017 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005018 ac_status=$?
5019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021 { (case "(($ac_try" in
5022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5023 *) ac_try_echo=$ac_try;;
5024esac
5025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5026 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005030 ac_cv_kpthread=yes
5031else
Martin v. Löwis11437992002-04-12 09:54:03 +00005032 echo "$as_me: program exited with status $ac_status" >&5
5033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005034sed 's/^/| /' conftest.$ac_ext >&5
5035
Martin v. Löwis11437992002-04-12 09:54:03 +00005036( exit $ac_status )
5037ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005039rm -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 +00005040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005041
5042
Martin v. Löwis130fb172001-07-19 11:00:41 +00005043CC="$ac_save_cc"
5044fi
5045
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5047echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005048fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005049
Skip Montanarod8d39a02003-07-10 20:44:10 +00005050if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005051then
5052# -Kthread, if available, provides the right #defines
5053# and linker options to make pthread_create available
5054# Some compilers won't report that they do not support -Kthread,
5055# so we need to run a program to see whether it really made the
5056# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5058echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005059if test "${ac_cv_kthread+set}" = set; then
5060 echo $ECHO_N "(cached) $ECHO_C" >&6
5061else
5062 ac_save_cc="$CC"
5063CC="$CC -Kthread"
5064if test "$cross_compiling" = yes; then
5065 ac_cv_kthread=no
5066else
5067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005068/* confdefs.h. */
5069_ACEOF
5070cat confdefs.h >>conftest.$ac_ext
5071cat >>conftest.$ac_ext <<_ACEOF
5072/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005073
5074#include <pthread.h>
5075
5076void* routine(void* p){return NULL;}
5077
5078int main(){
5079 pthread_t p;
5080 if(pthread_create(&p,NULL,routine,NULL)!=0)
5081 return 1;
5082 (void)pthread_detach(p);
5083 return 0;
5084}
5085
5086_ACEOF
5087rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005088if { (ac_try="$ac_link"
5089case "(($ac_try" in
5090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5091 *) ac_try_echo=$ac_try;;
5092esac
5093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5094 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005095 ac_status=$?
5096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098 { (case "(($ac_try" in
5099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5100 *) ac_try_echo=$ac_try;;
5101esac
5102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5103 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
5107 ac_cv_kthread=yes
5108else
5109 echo "$as_me: program exited with status $ac_status" >&5
5110echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005111sed 's/^/| /' conftest.$ac_ext >&5
5112
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005113( exit $ac_status )
5114ac_cv_kthread=no
5115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005116rm -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 +00005117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005118
5119
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005120CC="$ac_save_cc"
5121fi
5122
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5124echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005125fi
5126
Skip Montanarod8d39a02003-07-10 20:44:10 +00005127if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005128then
5129# -pthread, if available, provides the right #defines
5130# and linker options to make pthread_create available
5131# Some compilers won't report that they do not support -pthread,
5132# so we need to run a program to see whether it really made the
5133# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005134{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5135echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005136if test "${ac_cv_thread+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139 ac_save_cc="$CC"
5140CC="$CC -pthread"
5141if test "$cross_compiling" = yes; then
5142 ac_cv_pthread=no
5143else
5144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005145/* confdefs.h. */
5146_ACEOF
5147cat confdefs.h >>conftest.$ac_ext
5148cat >>conftest.$ac_ext <<_ACEOF
5149/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005150
5151#include <pthread.h>
5152
5153void* routine(void* p){return NULL;}
5154
5155int main(){
5156 pthread_t p;
5157 if(pthread_create(&p,NULL,routine,NULL)!=0)
5158 return 1;
5159 (void)pthread_detach(p);
5160 return 0;
5161}
5162
5163_ACEOF
5164rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005165if { (ac_try="$ac_link"
5166case "(($ac_try" in
5167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168 *) ac_try_echo=$ac_try;;
5169esac
5170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5171 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175 { (case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;;
5178esac
5179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5180 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; }; then
5184 ac_cv_pthread=yes
5185else
5186 echo "$as_me: program exited with status $ac_status" >&5
5187echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005188sed 's/^/| /' conftest.$ac_ext >&5
5189
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005190( exit $ac_status )
5191ac_cv_pthread=no
5192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005193rm -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 +00005194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005195
5196
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005197CC="$ac_save_cc"
5198fi
5199
Martin v. Löwiseba40652007-08-30 20:10:57 +00005200{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5201echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005202fi
5203
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005204# If we have set a CC compiler flag for thread support then
5205# check if it works for CXX, too.
5206ac_cv_cxx_thread=no
5207if test ! -z "$CXX"
5208then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005209{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5210echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005211ac_save_cxx="$CXX"
5212
5213if test "$ac_cv_kpthread" = "yes"
5214then
5215 CXX="$CXX -Kpthread"
5216 ac_cv_cxx_thread=yes
5217elif test "$ac_cv_kthread" = "yes"
5218then
5219 CXX="$CXX -Kthread"
5220 ac_cv_cxx_thread=yes
5221elif test "$ac_cv_pthread" = "yes"
5222then
5223 CXX="$CXX -pthread"
5224 ac_cv_cxx_thread=yes
5225fi
5226
5227if test $ac_cv_cxx_thread = yes
5228then
5229 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5230 $CXX -c conftest.$ac_ext 2>&5
5231 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5232 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5233 then
5234 ac_cv_cxx_thread=yes
5235 else
5236 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005237 fi
5238 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005240{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5241echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005242fi
5243CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005244
Michael W. Hudson54241132001-12-07 15:38:26 +00005245
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005246# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005247{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5248echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005249if test "${ac_cv_header_stdc+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251else
Martin v. Löwis11437992002-04-12 09:54:03 +00005252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005253/* confdefs.h. */
5254_ACEOF
5255cat confdefs.h >>conftest.$ac_ext
5256cat >>conftest.$ac_ext <<_ACEOF
5257/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005258#include <stdlib.h>
5259#include <stdarg.h>
5260#include <string.h>
5261#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005262
Skip Montanaro6dead952003-09-25 14:50:04 +00005263int
5264main ()
5265{
5266
5267 ;
5268 return 0;
5269}
Martin v. Löwis11437992002-04-12 09:54:03 +00005270_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005272if { (ac_try="$ac_compile"
5273case "(($ac_try" in
5274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5275 *) ac_try_echo=$ac_try;;
5276esac
5277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005280 grep -v '^ *+' conftest.er1 >conftest.err
5281 rm -f conftest.er1
5282 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005284 (exit $ac_status); } && {
5285 test -z "$ac_c_werror_flag" ||
5286 test ! -s conftest.err
5287 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288 ac_cv_header_stdc=yes
5289else
Martin v. Löwis11437992002-04-12 09:54:03 +00005290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005291sed 's/^/| /' conftest.$ac_ext >&5
5292
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005295
5296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297
5298if test $ac_cv_header_stdc = yes; then
5299 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005306#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005307
5308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005310 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311 :
5312else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313 ac_cv_header_stdc=no
5314fi
5315rm -f conftest*
5316
5317fi
5318
5319if test $ac_cv_header_stdc = yes; then
5320 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005328
5329_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005331 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005332 :
5333else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005334 ac_cv_header_stdc=no
5335fi
5336rm -f conftest*
5337
5338fi
5339
5340if test $ac_cv_header_stdc = yes; then
5341 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005342 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005343 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344else
Martin v. Löwis11437992002-04-12 09:54:03 +00005345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005346/* confdefs.h. */
5347_ACEOF
5348cat confdefs.h >>conftest.$ac_ext
5349cat >>conftest.$ac_ext <<_ACEOF
5350/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005351#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005352#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005353#if ((' ' & 0x0FF) == 0x020)
5354# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5355# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5356#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005357# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005358 (('a' <= (c) && (c) <= 'i') \
5359 || ('j' <= (c) && (c) <= 'r') \
5360 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005361# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5362#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005363
Martin v. Löwis11437992002-04-12 09:54:03 +00005364#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5365int
5366main ()
5367{
5368 int i;
5369 for (i = 0; i < 256; i++)
5370 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005371 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005372 return 2;
5373 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005374}
5375_ACEOF
5376rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005377if { (ac_try="$ac_link"
5378case "(($ac_try" in
5379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5380 *) ac_try_echo=$ac_try;;
5381esac
5382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5383 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005384 ac_status=$?
5385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005387 { (case "(($ac_try" in
5388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5389 *) ac_try_echo=$ac_try;;
5390esac
5391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5392 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005393 ac_status=$?
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396 :
5397else
Martin v. Löwis11437992002-04-12 09:54:03 +00005398 echo "$as_me: program exited with status $ac_status" >&5
5399echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005400sed 's/^/| /' conftest.$ac_ext >&5
5401
Martin v. Löwis11437992002-04-12 09:54:03 +00005402( exit $ac_status )
5403ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5406fi
5407
5408
Michael W. Hudson54241132001-12-07 15:38:26 +00005409fi
5410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005411{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5412echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005413if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005414
5415cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005417_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418
5419fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420
Skip Montanarob9820a32004-01-17 00:16:12 +00005421# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005432 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005433do
5434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5436echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5437if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
5446$ac_includes_default
5447
5448#include <$ac_header>
5449_ACEOF
5450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005451if { (ac_try="$ac_compile"
5452case "(($ac_try" in
5453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5454 *) ac_try_echo=$ac_try;;
5455esac
5456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5457 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005459 grep -v '^ *+' conftest.er1 >conftest.err
5460 rm -f conftest.er1
5461 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005463 (exit $ac_status); } && {
5464 test -z "$ac_c_werror_flag" ||
5465 test ! -s conftest.err
5466 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005467 eval "$as_ac_Header=yes"
5468else
5469 echo "$as_me: failed program was:" >&5
5470sed 's/^/| /' conftest.$ac_ext >&5
5471
Martin v. Löwiseba40652007-08-30 20:10:57 +00005472 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005474
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005477ac_res=`eval echo '${'$as_ac_Header'}'`
5478 { echo "$as_me:$LINENO: result: $ac_res" >&5
5479echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005480if test `eval echo '${'$as_ac_Header'}'` = yes; then
5481 cat >>confdefs.h <<_ACEOF
5482#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5483_ACEOF
5484
5485fi
5486
5487done
5488
5489
Martin v. Löwis11437992002-04-12 09:54:03 +00005490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
Anthony Baxter8a560de2004-10-13 15:30:56 +00005526
Martin v. Löwisc3001752005-01-23 09:27:24 +00005527
Martin v. Löwis11017b12006-01-14 18:12:57 +00005528
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005529
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005530
5531
5532
5533
5534
5535
5536
5537
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005538
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005539
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005540
5541
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005542
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005543
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005544for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5545fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005546ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005547shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005548unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005549sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5550sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005551sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005552sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005553sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005554sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005555bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005556do
Martin v. Löwis11437992002-04-12 09:54:03 +00005557as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005558if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5559 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5561if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005562 echo $ECHO_N "(cached) $ECHO_C" >&6
5563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005564ac_res=`eval echo '${'$as_ac_Header'}'`
5565 { echo "$as_me:$LINENO: result: $ac_res" >&5
5566echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567else
Martin v. Löwis11437992002-04-12 09:54:03 +00005568 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005569{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5570echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005572/* confdefs.h. */
5573_ACEOF
5574cat confdefs.h >>conftest.$ac_ext
5575cat >>conftest.$ac_ext <<_ACEOF
5576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005577$ac_includes_default
5578#include <$ac_header>
5579_ACEOF
5580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005581if { (ac_try="$ac_compile"
5582case "(($ac_try" in
5583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5584 *) ac_try_echo=$ac_try;;
5585esac
5586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005589 grep -v '^ *+' conftest.er1 >conftest.err
5590 rm -f conftest.er1
5591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005593 (exit $ac_status); } && {
5594 test -z "$ac_c_werror_flag" ||
5595 test ! -s conftest.err
5596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005597 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005598else
Martin v. Löwis11437992002-04-12 09:54:03 +00005599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005600sed 's/^/| /' conftest.$ac_ext >&5
5601
Martin v. Löwiseba40652007-08-30 20:10:57 +00005602 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005604
5605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5607echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005608
5609# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5611echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005618#include <$ac_header>
5619_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005620if { (ac_try="$ac_cpp conftest.$ac_ext"
5621case "(($ac_try" in
5622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623 *) ac_try_echo=$ac_try;;
5624esac
5625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005628 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 rm -f conftest.er1
5630 cat conftest.err >&5
5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632 (exit $ac_status); } >/dev/null && {
5633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5634 test ! -s conftest.err
5635 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 ac_header_preproc=yes
5637else
5638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005639sed 's/^/| /' conftest.$ac_ext >&5
5640
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005643
Martin v. Löwis11437992002-04-12 09:54:03 +00005644rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5646echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005647
5648# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5650 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5652echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005653 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5654echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5655 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005656 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005657 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005658 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5659echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005660 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5661echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5662 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5663echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5664 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5665echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005666 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5667echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005668 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5669echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005671## ------------------------------------------------ ##
5672## Report this to http://www.python.org/python-bugs ##
5673## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005674_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005677esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005678{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5679echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5680if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005682else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685ac_res=`eval echo '${'$as_ac_Header'}'`
5686 { echo "$as_me:$LINENO: result: $ac_res" >&5
5687echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005688
5689fi
5690if test `eval echo '${'$as_ac_Header'}'` = yes; then
5691 cat >>confdefs.h <<_ACEOF
5692#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5693_ACEOF
5694
5695fi
5696
Guido van Rossum627b2d71993-12-24 10:39:16 +00005697done
5698
Martin v. Löwis11437992002-04-12 09:54:03 +00005699
5700
5701
5702
5703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005705for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5706 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005707{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5708echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5709if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718#include <sys/types.h>
5719#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005720
Martin v. Löwis11437992002-04-12 09:54:03 +00005721int
5722main ()
5723{
5724if ((DIR *) 0)
5725return 0;
5726 ;
5727 return 0;
5728}
5729_ACEOF
5730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005731if { (ac_try="$ac_compile"
5732case "(($ac_try" in
5733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5734 *) ac_try_echo=$ac_try;;
5735esac
5736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005739 grep -v '^ *+' conftest.er1 >conftest.err
5740 rm -f conftest.er1
5741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743 (exit $ac_status); } && {
5744 test -z "$ac_c_werror_flag" ||
5745 test ! -s conftest.err
5746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005748else
Martin v. Löwis11437992002-04-12 09:54:03 +00005749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005750sed 's/^/| /' conftest.$ac_ext >&5
5751
Martin v. Löwiseba40652007-08-30 20:10:57 +00005752 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754
5755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005757ac_res=`eval echo '${'$as_ac_Header'}'`
5758 { echo "$as_me:$LINENO: result: $ac_res" >&5
5759echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005760if test `eval echo '${'$as_ac_Header'}'` = yes; then
5761 cat >>confdefs.h <<_ACEOF
5762#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5763_ACEOF
5764
5765ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005767
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005768done
5769# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5770if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5772echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005773if test "${ac_cv_search_opendir+set}" = set; then
5774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775else
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005778/* confdefs.h. */
5779_ACEOF
5780cat confdefs.h >>conftest.$ac_ext
5781cat >>conftest.$ac_ext <<_ACEOF
5782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005783
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784/* Override any GCC internal prototype to avoid an error.
5785 Use char because int might match the return type of a GCC
5786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005787#ifdef __cplusplus
5788extern "C"
5789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005790char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005791int
5792main ()
5793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005794return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 ;
5796 return 0;
5797}
5798_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005799for ac_lib in '' dir; do
5800 if test -z "$ac_lib"; then
5801 ac_res="none required"
5802 else
5803 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005804 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805 fi
5806 rm -f conftest.$ac_objext conftest$ac_exeext
5807if { (ac_try="$ac_link"
5808case "(($ac_try" in
5809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5810 *) ac_try_echo=$ac_try;;
5811esac
5812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5813 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005814 ac_status=$?
5815 grep -v '^ *+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819 (exit $ac_status); } && {
5820 test -z "$ac_c_werror_flag" ||
5821 test ! -s conftest.err
5822 } && test -s conftest$ac_exeext &&
5823 $as_test_x conftest$ac_exeext; then
5824 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005825else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005826 echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
Martin v. Löwiseba40652007-08-30 20:10:57 +00005829
Brett Cannon19fab762007-06-02 03:02:29 +00005830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831
5832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5833 conftest$ac_exeext
5834 if test "${ac_cv_search_opendir+set}" = set; then
5835 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837done
5838if test "${ac_cv_search_opendir+set}" = set; then
5839 :
5840else
5841 ac_cv_search_opendir=no
5842fi
5843rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005844LIBS=$ac_func_search_save_LIBS
5845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5847echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5848ac_res=$ac_cv_search_opendir
5849if test "$ac_res" != no; then
5850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005851
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005853
Michael W. Hudson54241132001-12-07 15:38:26 +00005854else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005855 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5856echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005857if test "${ac_cv_search_opendir+set}" = set; then
5858 echo $ECHO_N "(cached) $ECHO_C" >&6
5859else
5860 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005862/* confdefs.h. */
5863_ACEOF
5864cat confdefs.h >>conftest.$ac_ext
5865cat >>conftest.$ac_ext <<_ACEOF
5866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005867
Martin v. Löwiseba40652007-08-30 20:10:57 +00005868/* Override any GCC internal prototype to avoid an error.
5869 Use char because int might match the return type of a GCC
5870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005871#ifdef __cplusplus
5872extern "C"
5873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005874char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005875int
5876main ()
5877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 ;
5880 return 0;
5881}
5882_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005883for ac_lib in '' x; do
5884 if test -z "$ac_lib"; then
5885 ac_res="none required"
5886 else
5887 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005888 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889 fi
5890 rm -f conftest.$ac_objext conftest$ac_exeext
5891if { (ac_try="$ac_link"
5892case "(($ac_try" in
5893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5894 *) ac_try_echo=$ac_try;;
5895esac
5896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5897 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005898 ac_status=$?
5899 grep -v '^ *+' conftest.er1 >conftest.err
5900 rm -f conftest.er1
5901 cat conftest.err >&5
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 (exit $ac_status); } && {
5904 test -z "$ac_c_werror_flag" ||
5905 test ! -s conftest.err
5906 } && test -s conftest$ac_exeext &&
5907 $as_test_x conftest$ac_exeext; then
5908 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005909else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005910 echo "$as_me: failed program was:" >&5
5911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913
Brett Cannon19fab762007-06-02 03:02:29 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5917 conftest$ac_exeext
5918 if test "${ac_cv_search_opendir+set}" = set; then
5919 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921done
5922if test "${ac_cv_search_opendir+set}" = set; then
5923 :
5924else
5925 ac_cv_search_opendir=no
5926fi
5927rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005928LIBS=$ac_func_search_save_LIBS
5929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5931echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5932ac_res=$ac_cv_search_opendir
5933if test "$ac_res" != no; then
5934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936fi
5937
5938fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005939
Martin v. Löwiseba40652007-08-30 20:10:57 +00005940{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5941echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5943 echo $ECHO_N "(cached) $ECHO_C" >&6
5944else
5945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005946/* confdefs.h. */
5947_ACEOF
5948cat confdefs.h >>conftest.$ac_ext
5949cat >>conftest.$ac_ext <<_ACEOF
5950/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005951#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952int
5953main ()
5954{
5955return makedev(0, 0);
5956 ;
5957 return 0;
5958}
5959_ACEOF
5960rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005961if { (ac_try="$ac_link"
5962case "(($ac_try" in
5963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5964 *) ac_try_echo=$ac_try;;
5965esac
5966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5967 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005969 grep -v '^ *+' conftest.er1 >conftest.err
5970 rm -f conftest.er1
5971 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973 (exit $ac_status); } && {
5974 test -z "$ac_c_werror_flag" ||
5975 test ! -s conftest.err
5976 } && test -s conftest$ac_exeext &&
5977 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978 ac_cv_header_sys_types_h_makedev=yes
5979else
5980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005981sed 's/^/| /' conftest.$ac_ext >&5
5982
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985
5986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988
5989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5991echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992
5993if test $ac_cv_header_sys_types_h_makedev = no; then
5994if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5996echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005997if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5998 echo $ECHO_N "(cached) $ECHO_C" >&6
5999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6001echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002else
6003 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6005echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006007/* confdefs.h. */
6008_ACEOF
6009cat confdefs.h >>conftest.$ac_ext
6010cat >>conftest.$ac_ext <<_ACEOF
6011/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012$ac_includes_default
6013#include <sys/mkdev.h>
6014_ACEOF
6015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016if { (ac_try="$ac_compile"
6017case "(($ac_try" in
6018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6019 *) ac_try_echo=$ac_try;;
6020esac
6021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006024 grep -v '^ *+' conftest.er1 >conftest.err
6025 rm -f conftest.er1
6026 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028 (exit $ac_status); } && {
6029 test -z "$ac_c_werror_flag" ||
6030 test ! -s conftest.err
6031 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032 ac_header_compiler=yes
6033else
6034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006035sed 's/^/| /' conftest.$ac_ext >&5
6036
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006039
6040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6042echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043
6044# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6046echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053#include <sys/mkdev.h>
6054_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055if { (ac_try="$ac_cpp conftest.$ac_ext"
6056case "(($ac_try" in
6057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6058 *) ac_try_echo=$ac_try;;
6059esac
6060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6061 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006063 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 rm -f conftest.er1
6065 cat conftest.err >&5
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 (exit $ac_status); } >/dev/null && {
6068 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6069 test ! -s conftest.err
6070 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_header_preproc=yes
6072else
6073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006074sed 's/^/| /' conftest.$ac_ext >&5
6075
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 ac_header_preproc=no
6077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6081echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082
6083# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006084case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6085 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6087echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6089echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6090 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006091 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006092 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006093 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6094echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006095 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6096echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6097 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6098echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6099 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6100echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006101 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6102echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006103 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6104echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006106## ------------------------------------------------ ##
6107## Report this to http://www.python.org/python-bugs ##
6108## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006109_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006111 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6114echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6116 echo $ECHO_N "(cached) $ECHO_C" >&6
6117else
6118 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006120{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6121echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122
6123fi
6124if test $ac_cv_header_sys_mkdev_h = yes; then
6125
6126cat >>confdefs.h <<\_ACEOF
6127#define MAJOR_IN_MKDEV 1
6128_ACEOF
6129
6130fi
6131
6132
6133
6134 if test $ac_cv_header_sys_mkdev_h = no; then
6135 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006136 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6137echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6139 echo $ECHO_N "(cached) $ECHO_C" >&6
6140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6142echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
6144 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6146echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006148/* confdefs.h. */
6149_ACEOF
6150cat confdefs.h >>conftest.$ac_ext
6151cat >>conftest.$ac_ext <<_ACEOF
6152/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153$ac_includes_default
6154#include <sys/sysmacros.h>
6155_ACEOF
6156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157if { (ac_try="$ac_compile"
6158case "(($ac_try" in
6159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6160 *) ac_try_echo=$ac_try;;
6161esac
6162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006165 grep -v '^ *+' conftest.er1 >conftest.err
6166 rm -f conftest.er1
6167 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169 (exit $ac_status); } && {
6170 test -z "$ac_c_werror_flag" ||
6171 test ! -s conftest.err
6172 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_header_compiler=yes
6174else
6175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006176sed 's/^/| /' conftest.$ac_ext >&5
6177
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180
6181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6182{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6183echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6187echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194#include <sys/sysmacros.h>
6195_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196if { (ac_try="$ac_cpp conftest.$ac_ext"
6197case "(($ac_try" in
6198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6199 *) ac_try_echo=$ac_try;;
6200esac
6201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6202 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006204 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 rm -f conftest.er1
6206 cat conftest.err >&5
6207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006208 (exit $ac_status); } >/dev/null && {
6209 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6210 test ! -s conftest.err
6211 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212 ac_header_preproc=yes
6213else
6214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217 ac_header_preproc=no
6218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6222echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6226 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6228echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6230echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6231 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006234 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6235echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006236 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6237echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6238 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6239echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6240 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6241echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006242 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6243echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006244 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6245echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006247## ------------------------------------------------ ##
6248## Report this to http://www.python.org/python-bugs ##
6249## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006250_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6255echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6258else
6259 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6262echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
6265if test $ac_cv_header_sys_sysmacros_h = yes; then
6266
6267cat >>confdefs.h <<\_ACEOF
6268#define MAJOR_IN_SYSMACROS 1
6269_ACEOF
6270
6271fi
6272
6273
6274 fi
6275fi
6276
Michael W. Hudson54241132001-12-07 15:38:26 +00006277
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006278# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006279
6280for ac_header in term.h
6281do
6282as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6284echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6285if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006286 echo $ECHO_N "(cached) $ECHO_C" >&6
6287else
6288 cat >conftest.$ac_ext <<_ACEOF
6289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006294
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
6299
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006300#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006301_ACEOF
6302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303if { (ac_try="$ac_compile"
6304case "(($ac_try" in
6305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6306 *) ac_try_echo=$ac_try;;
6307esac
6308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006310 ac_status=$?
6311 grep -v '^ *+' conftest.er1 >conftest.err
6312 rm -f conftest.er1
6313 cat conftest.err >&5
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315 (exit $ac_status); } && {
6316 test -z "$ac_c_werror_flag" ||
6317 test ! -s conftest.err
6318 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006319 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006320else
6321 echo "$as_me: failed program was:" >&5
6322sed 's/^/| /' conftest.$ac_ext >&5
6323
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326
6327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329ac_res=`eval echo '${'$as_ac_Header'}'`
6330 { echo "$as_me:$LINENO: result: $ac_res" >&5
6331echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006332if test `eval echo '${'$as_ac_Header'}'` = yes; then
6333 cat >>confdefs.h <<_ACEOF
6334#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6335_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006337fi
6338
6339done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006340
6341
Martin v. Löwis11017b12006-01-14 18:12:57 +00006342# On Linux, netlink.h requires asm/types.h
6343
6344for ac_header in linux/netlink.h
6345do
6346as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6348echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6349if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006350 echo $ECHO_N "(cached) $ECHO_C" >&6
6351else
6352 cat >conftest.$ac_ext <<_ACEOF
6353/* confdefs.h. */
6354_ACEOF
6355cat confdefs.h >>conftest.$ac_ext
6356cat >>conftest.$ac_ext <<_ACEOF
6357/* end confdefs.h. */
6358
6359#ifdef HAVE_ASM_TYPES_H
6360#include <asm/types.h>
6361#endif
6362#ifdef HAVE_SYS_SOCKET_H
6363#include <sys/socket.h>
6364#endif
6365
6366
6367#include <$ac_header>
6368_ACEOF
6369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370if { (ac_try="$ac_compile"
6371case "(($ac_try" in
6372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6373 *) ac_try_echo=$ac_try;;
6374esac
6375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377 ac_status=$?
6378 grep -v '^ *+' conftest.er1 >conftest.err
6379 rm -f conftest.er1
6380 cat conftest.err >&5
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382 (exit $ac_status); } && {
6383 test -z "$ac_c_werror_flag" ||
6384 test ! -s conftest.err
6385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386 eval "$as_ac_Header=yes"
6387else
6388 echo "$as_me: failed program was:" >&5
6389sed 's/^/| /' conftest.$ac_ext >&5
6390
Martin v. Löwiseba40652007-08-30 20:10:57 +00006391 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006393
6394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396ac_res=`eval echo '${'$as_ac_Header'}'`
6397 { echo "$as_me:$LINENO: result: $ac_res" >&5
6398echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006399if test `eval echo '${'$as_ac_Header'}'` = yes; then
6400 cat >>confdefs.h <<_ACEOF
6401#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6402_ACEOF
6403
6404fi
6405
6406done
6407
6408
Guido van Rossum627b2d71993-12-24 10:39:16 +00006409# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006410was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6412echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006419#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006423 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006424 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006425else
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427
6428cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006429#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006430_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006432
Guido van Rossum627b2d71993-12-24 10:39:16 +00006433fi
6434rm -f conftest*
6435
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6437echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006438
Neal Norwitz11690112002-07-30 01:08:28 +00006439# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006440{ echo "$as_me:$LINENO: checking for makedev" >&5
6441echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* confdefs.h. */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006448#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006449int
6450main ()
6451{
6452 makedev(0, 0)
6453 ;
6454 return 0;
6455}
6456_ACEOF
6457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006458if { (ac_try="$ac_link"
6459case "(($ac_try" in
6460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6461 *) ac_try_echo=$ac_try;;
6462esac
6463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6464 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006466 grep -v '^ *+' conftest.er1 >conftest.err
6467 rm -f conftest.er1
6468 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (exit $ac_status); } && {
6471 test -z "$ac_c_werror_flag" ||
6472 test ! -s conftest.err
6473 } && test -s conftest$ac_exeext &&
6474 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006475 ac_cv_has_makedev=yes
6476else
6477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006478sed 's/^/| /' conftest.$ac_ext >&5
6479
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482
6483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006484 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006485if test "$ac_cv_has_makedev" = "no"; then
6486 # we didn't link, try if _OSF_SOURCE will allow us to link
6487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006488/* confdefs.h. */
6489_ACEOF
6490cat confdefs.h >>conftest.$ac_ext
6491cat >>conftest.$ac_ext <<_ACEOF
6492/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006493
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006494#define _OSF_SOURCE 1
6495#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006496
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506if { (ac_try="$ac_link"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
6511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6512 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
6521 } && test -s conftest$ac_exeext &&
6522 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006523 ac_cv_has_makedev=yes
6524else
6525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006526sed 's/^/| /' conftest.$ac_ext >&5
6527
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530
6531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006533 if test "$ac_cv_has_makedev" = "yes"; then
6534
6535cat >>confdefs.h <<\_ACEOF
6536#define _OSF_SOURCE 1
6537_ACEOF
6538
6539 fi
6540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006541{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6542echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006543if test "$ac_cv_has_makedev" = "yes"; then
6544
6545cat >>confdefs.h <<\_ACEOF
6546#define HAVE_MAKEDEV 1
6547_ACEOF
6548
6549fi
6550
Martin v. Löwis399a6892002-10-04 10:22:02 +00006551# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6552# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6553# defined, but the compiler does not support pragma redefine_extname,
6554# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6555# structures (such as rlimit64) without declaring them. As a
6556# work-around, disable LFS on such configurations
6557
6558use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6560echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006562/* confdefs.h. */
6563_ACEOF
6564cat confdefs.h >>conftest.$ac_ext
6565cat >>conftest.$ac_ext <<_ACEOF
6566/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006567
6568#define _LARGEFILE_SOURCE 1
6569#define _FILE_OFFSET_BITS 64
6570#include <sys/resource.h>
6571
Martin v. Löwis399a6892002-10-04 10:22:02 +00006572int
6573main ()
6574{
6575struct rlimit foo;
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581if { (ac_try="$ac_compile"
6582case "(($ac_try" in
6583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584 *) ac_try_echo=$ac_try;;
6585esac
6586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006589 grep -v '^ *+' conftest.er1 >conftest.err
6590 rm -f conftest.er1
6591 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593 (exit $ac_status); } && {
6594 test -z "$ac_c_werror_flag" ||
6595 test ! -s conftest.err
6596 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597 sol_lfs_bug=no
6598else
6599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006600sed 's/^/| /' conftest.$ac_ext >&5
6601
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006604
6605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6607echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608if test "$sol_lfs_bug" = "yes"; then
6609 use_lfs=no
6610fi
6611
6612if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006613# Two defines needed to enable largefile support on various platforms
6614# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616cat >>confdefs.h <<\_ACEOF
6617#define _LARGEFILE_SOURCE 1
6618_ACEOF
6619
6620
6621cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006622#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006623_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006624
Martin v. Löwis399a6892002-10-04 10:22:02 +00006625fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006626
Guido van Rossum84e7b241996-08-19 21:59:00 +00006627# Add some code to confdefs.h so that the test for off_t works on SCO
6628cat >> confdefs.h <<\EOF
6629#if defined(SCO_DS)
6630#undef _OFF_T
6631#endif
6632EOF
6633
Guido van Rossumef2255b2000-03-10 22:30:29 +00006634# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006635{ echo "$as_me:$LINENO: checking for mode_t" >&5
6636echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006637if test "${ac_cv_type_mode_t+set}" = set; then
6638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006639else
Martin v. Löwis11437992002-04-12 09:54:03 +00006640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006641/* confdefs.h. */
6642_ACEOF
6643cat confdefs.h >>conftest.$ac_ext
6644cat >>conftest.$ac_ext <<_ACEOF
6645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006646$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006647typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006648int
6649main ()
6650{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006651if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006652 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 return 0;
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660if { (ac_try="$ac_compile"
6661case "(($ac_try" in
6662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6663 *) ac_try_echo=$ac_try;;
6664esac
6665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006668 grep -v '^ *+' conftest.er1 >conftest.err
6669 rm -f conftest.er1
6670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672 (exit $ac_status); } && {
6673 test -z "$ac_c_werror_flag" ||
6674 test ! -s conftest.err
6675 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006676 ac_cv_type_mode_t=yes
6677else
Martin v. Löwis11437992002-04-12 09:54:03 +00006678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006679sed 's/^/| /' conftest.$ac_ext >&5
6680
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683
6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6687echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006688if test $ac_cv_type_mode_t = yes; then
6689 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006690else
Martin v. Löwis11437992002-04-12 09:54:03 +00006691
6692cat >>confdefs.h <<_ACEOF
6693#define mode_t int
6694_ACEOF
6695
6696fi
6697
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698{ echo "$as_me:$LINENO: checking for off_t" >&5
6699echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006700if test "${ac_cv_type_off_t+set}" = set; then
6701 echo $ECHO_N "(cached) $ECHO_C" >&6
6702else
6703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006704/* confdefs.h. */
6705_ACEOF
6706cat confdefs.h >>conftest.$ac_ext
6707cat >>conftest.$ac_ext <<_ACEOF
6708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006709$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006710typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006711int
6712main ()
6713{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 return 0;
6718 ;
6719 return 0;
6720}
6721_ACEOF
6722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006723if { (ac_try="$ac_compile"
6724case "(($ac_try" in
6725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726 *) ac_try_echo=$ac_try;;
6727esac
6728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735 (exit $ac_status); } && {
6736 test -z "$ac_c_werror_flag" ||
6737 test ! -s conftest.err
6738 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006739 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006740else
Martin v. Löwis11437992002-04-12 09:54:03 +00006741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006742sed 's/^/| /' conftest.$ac_ext >&5
6743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746
6747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6750echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006751if test $ac_cv_type_off_t = yes; then
6752 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006753else
Martin v. Löwis11437992002-04-12 09:54:03 +00006754
6755cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006756#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006757_ACEOF
6758
6759fi
6760
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761{ echo "$as_me:$LINENO: checking for pid_t" >&5
6762echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006763if test "${ac_cv_type_pid_t+set}" = set; then
6764 echo $ECHO_N "(cached) $ECHO_C" >&6
6765else
6766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* confdefs.h. */
6768_ACEOF
6769cat confdefs.h >>conftest.$ac_ext
6770cat >>conftest.$ac_ext <<_ACEOF
6771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006774int
6775main ()
6776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 return 0;
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786if { (ac_try="$ac_compile"
6787case "(($ac_try" in
6788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789 *) ac_try_echo=$ac_try;;
6790esac
6791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006794 grep -v '^ *+' conftest.er1 >conftest.err
6795 rm -f conftest.er1
6796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 (exit $ac_status); } && {
6799 test -z "$ac_c_werror_flag" ||
6800 test ! -s conftest.err
6801 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006802 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006803else
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006805sed 's/^/| /' conftest.$ac_ext >&5
6806
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6813echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006814if test $ac_cv_type_pid_t = yes; then
6815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816else
Martin v. Löwis11437992002-04-12 09:54:03 +00006817
6818cat >>confdefs.h <<_ACEOF
6819#define pid_t int
6820_ACEOF
6821
6822fi
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6825echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006826if test "${ac_cv_type_signal+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006830/* confdefs.h. */
6831_ACEOF
6832cat confdefs.h >>conftest.$ac_ext
6833cat >>conftest.$ac_ext <<_ACEOF
6834/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835#include <sys/types.h>
6836#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838int
6839main ()
6840{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 ;
6843 return 0;
6844}
6845_ACEOF
6846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847if { (ac_try="$ac_compile"
6848case "(($ac_try" in
6849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6850 *) ac_try_echo=$ac_try;;
6851esac
6852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006855 grep -v '^ *+' conftest.er1 >conftest.err
6856 rm -f conftest.er1
6857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859 (exit $ac_status); } && {
6860 test -z "$ac_c_werror_flag" ||
6861 test ! -s conftest.err
6862 } && test -s conftest.$ac_objext; then
6863 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006866sed 's/^/| /' conftest.$ac_ext >&5
6867
Martin v. Löwiseba40652007-08-30 20:10:57 +00006868 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870
6871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6874echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006877#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881{ echo "$as_me:$LINENO: checking for size_t" >&5
6882echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006883if test "${ac_cv_type_size_t+set}" = set; then
6884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006885else
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006887/* confdefs.h. */
6888_ACEOF
6889cat confdefs.h >>conftest.$ac_ext
6890cat >>conftest.$ac_ext <<_ACEOF
6891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006892$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006893typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006894int
6895main ()
6896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006898 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 return 0;
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906if { (ac_try="$ac_compile"
6907case "(($ac_try" in
6908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6909 *) ac_try_echo=$ac_try;;
6910esac
6911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006914 grep -v '^ *+' conftest.er1 >conftest.err
6915 rm -f conftest.er1
6916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918 (exit $ac_status); } && {
6919 test -z "$ac_c_werror_flag" ||
6920 test ! -s conftest.err
6921 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006922 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923else
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006925sed 's/^/| /' conftest.$ac_ext >&5
6926
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929
6930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6933echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006934if test $ac_cv_type_size_t = yes; then
6935 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936else
Martin v. Löwis11437992002-04-12 09:54:03 +00006937
6938cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
6941
6942fi
6943
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6945echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006946if test "${ac_cv_type_uid_t+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6948else
6949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006950/* confdefs.h. */
6951_ACEOF
6952cat confdefs.h >>conftest.$ac_ext
6953cat >>conftest.$ac_ext <<_ACEOF
6954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006955#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006956
6957_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006959 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006960 ac_cv_type_uid_t=yes
6961else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962 ac_cv_type_uid_t=no
6963fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964rm -f conftest*
6965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6968echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006969if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970
Martin v. Löwis11437992002-04-12 09:54:03 +00006971cat >>confdefs.h <<\_ACEOF
6972#define uid_t int
6973_ACEOF
6974
6975
6976cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979
6980fi
6981
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6983echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006984if test "${ac_cv_type_ssize_t+set}" = set; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
6987 cat >conftest.$ac_ext <<_ACEOF
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
6993$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006994typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006995int
6996main ()
6997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006999 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007001 return 0;
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
7012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007014 ac_status=$?
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
7018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007023 ac_cv_type_ssize_t=yes
7024else
7025 echo "$as_me: failed program was:" >&5
7026sed 's/^/| /' conftest.$ac_ext >&5
7027
Martin v. Löwiseba40652007-08-30 20:10:57 +00007028 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7034echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007035if test $ac_cv_type_ssize_t = yes; then
7036
7037cat >>confdefs.h <<\_ACEOF
7038#define HAVE_SSIZE_T 1
7039_ACEOF
7040
7041fi
7042
Jack Jansendd19cf82001-12-06 22:36:17 +00007043
Michael W. Hudson54241132001-12-07 15:38:26 +00007044# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007045# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007046{ echo "$as_me:$LINENO: checking for int" >&5
7047echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007048if test "${ac_cv_type_int+set}" = set; then
7049 echo $ECHO_N "(cached) $ECHO_C" >&6
7050else
7051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007058typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007059int
7060main ()
7061{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007065 return 0;
7066 ;
7067 return 0;
7068}
7069_ACEOF
7070rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007071if { (ac_try="$ac_compile"
7072case "(($ac_try" in
7073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7074 *) ac_try_echo=$ac_try;;
7075esac
7076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007079 grep -v '^ *+' conftest.er1 >conftest.err
7080 rm -f conftest.er1
7081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083 (exit $ac_status); } && {
7084 test -z "$ac_c_werror_flag" ||
7085 test ! -s conftest.err
7086 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007087 ac_cv_type_int=yes
7088else
7089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007090sed 's/^/| /' conftest.$ac_ext >&5
7091
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007093fi
Brett Cannon19fab762007-06-02 03:02:29 +00007094
Martin v. Löwiseba40652007-08-30 20:10:57 +00007095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7098echo "${ECHO_T}$ac_cv_type_int" >&6; }
7099
7100# The cast to long int works around a bug in the HP C Compiler
7101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7103# This bug is HP SR number 8606223364.
7104{ echo "$as_me:$LINENO: checking size of int" >&5
7105echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007106if test "${ac_cv_sizeof_int+set}" = set; then
7107 echo $ECHO_N "(cached) $ECHO_C" >&6
7108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 if test "$cross_compiling" = yes; then
7110 # Depending upon the size, compute the lo and hi bounds.
7111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007112/* confdefs.h. */
7113_ACEOF
7114cat confdefs.h >>conftest.$ac_ext
7115cat >>conftest.$ac_ext <<_ACEOF
7116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007117$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007119int
7120main ()
7121{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007123test_array [0] = 0
7124
7125 ;
7126 return 0;
7127}
7128_ACEOF
7129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130if { (ac_try="$ac_compile"
7131case "(($ac_try" in
7132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7133 *) ac_try_echo=$ac_try;;
7134esac
7135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007138 grep -v '^ *+' conftest.er1 >conftest.err
7139 rm -f conftest.er1
7140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142 (exit $ac_status); } && {
7143 test -z "$ac_c_werror_flag" ||
7144 test ! -s conftest.err
7145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 ac_lo=0 ac_mid=0
7147 while :; do
7148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007149/* confdefs.h. */
7150_ACEOF
7151cat confdefs.h >>conftest.$ac_ext
7152cat >>conftest.$ac_ext <<_ACEOF
7153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007154$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007156int
7157main ()
7158{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007160test_array [0] = 0
7161
7162 ;
7163 return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167if { (ac_try="$ac_compile"
7168case "(($ac_try" in
7169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7170 *) ac_try_echo=$ac_try;;
7171esac
7172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007175 grep -v '^ *+' conftest.er1 >conftest.err
7176 rm -f conftest.er1
7177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007179 (exit $ac_status); } && {
7180 test -z "$ac_c_werror_flag" ||
7181 test ! -s conftest.err
7182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007183 ac_hi=$ac_mid; break
7184else
7185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007186sed 's/^/| /' conftest.$ac_ext >&5
7187
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 ac_lo=`expr $ac_mid + 1`
7189 if test $ac_lo -le $ac_mid; then
7190 ac_lo= ac_hi=
7191 break
7192 fi
7193 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195
7196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007197 done
7198else
7199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007200sed 's/^/| /' conftest.$ac_ext >&5
7201
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007210int
7211main ()
7212{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
7226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 ac_hi=-1 ac_mid=-1
7238 while :; do
7239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007247int
7248main ()
7249{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007251test_array [0] = 0
7252
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007258if { (ac_try="$ac_compile"
7259case "(($ac_try" in
7260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7261 *) ac_try_echo=$ac_try;;
7262esac
7263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007266 grep -v '^ *+' conftest.er1 >conftest.err
7267 rm -f conftest.er1
7268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 (exit $ac_status); } && {
7271 test -z "$ac_c_werror_flag" ||
7272 test ! -s conftest.err
7273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007274 ac_lo=$ac_mid; break
7275else
7276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007277sed 's/^/| /' conftest.$ac_ext >&5
7278
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279 ac_hi=`expr '(' $ac_mid ')' - 1`
7280 if test $ac_mid -le $ac_hi; then
7281 ac_lo= ac_hi=
7282 break
7283 fi
7284 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007286
7287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 done
7289else
7290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007291sed 's/^/| /' conftest.$ac_ext >&5
7292
Martin v. Löwiseba40652007-08-30 20:10:57 +00007293 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007295
7296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298
7299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007300# Binary search between lo and hi bounds.
7301while test "x$ac_lo" != "x$ac_hi"; do
7302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007309$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311int
7312main ()
7313{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007315test_array [0] = 0
7316
7317 ;
7318 return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322if { (ac_try="$ac_compile"
7323case "(($ac_try" in
7324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7325 *) ac_try_echo=$ac_try;;
7326esac
7327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334 (exit $ac_status); } && {
7335 test -z "$ac_c_werror_flag" ||
7336 test ! -s conftest.err
7337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007338 ac_hi=$ac_mid
7339else
7340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007341sed 's/^/| /' conftest.$ac_ext >&5
7342
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345
7346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007347done
7348case $ac_lo in
7349?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350'') if test "$ac_cv_type_int" = yes; then
7351 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007352See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007353echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007354See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355 { (exit 77); exit 77; }; }
7356 else
7357 ac_cv_sizeof_int=0
7358 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007359esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007360else
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007362/* confdefs.h. */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368 typedef int ac__type_sizeof_;
7369static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7370static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007371#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007372#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007373int
7374main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007375{
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
7377 FILE *f = fopen ("conftest.val", "w");
7378 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007379 return 1;
7380 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382 long int i = longval ();
7383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7384 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007385 fprintf (f, "%ld\n", i);
7386 }
7387 else
7388 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389 unsigned long int i = ulongval ();
7390 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7391 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007392 fprintf (f, "%lu\n", i);
7393 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
7396 ;
7397 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007398}
Martin v. Löwis11437992002-04-12 09:54:03 +00007399_ACEOF
7400rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007401if { (ac_try="$ac_link"
7402case "(($ac_try" in
7403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7404 *) ac_try_echo=$ac_try;;
7405esac
7406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7407 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411 { (case "(($ac_try" in
7412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7413 *) ac_try_echo=$ac_try;;
7414esac
7415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7416 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7420 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 echo "$as_me: program exited with status $ac_status" >&5
7423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007424sed 's/^/| /' conftest.$ac_ext >&5
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427if test "$ac_cv_type_int" = yes; then
7428 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007429See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007431See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432 { (exit 77); exit 77; }; }
7433 else
7434 ac_cv_sizeof_int=0
7435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437rm -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 +00007438fi
7439rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7442echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7443
7444
7445
Martin v. Löwis11437992002-04-12 09:54:03 +00007446cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007447#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007448_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007449
7450
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451{ echo "$as_me:$LINENO: checking for long" >&5
7452echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007453if test "${ac_cv_type_long+set}" = set; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
7455else
7456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* confdefs.h. */
7458_ACEOF
7459cat confdefs.h >>conftest.$ac_ext
7460cat >>conftest.$ac_ext <<_ACEOF
7461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007462$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007464int
7465main ()
7466{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007467if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007470 return 0;
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476if { (ac_try="$ac_compile"
7477case "(($ac_try" in
7478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7479 *) ac_try_echo=$ac_try;;
7480esac
7481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007484 grep -v '^ *+' conftest.er1 >conftest.err
7485 rm -f conftest.er1
7486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488 (exit $ac_status); } && {
7489 test -z "$ac_c_werror_flag" ||
7490 test ! -s conftest.err
7491 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007492 ac_cv_type_long=yes
7493else
7494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007498fi
Brett Cannon19fab762007-06-02 03:02:29 +00007499
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7501fi
7502{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7503echo "${ECHO_T}$ac_cv_type_long" >&6; }
7504
7505# The cast to long int works around a bug in the HP C Compiler
7506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508# This bug is HP SR number 8606223364.
7509{ echo "$as_me:$LINENO: checking size of long" >&5
7510echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007511if test "${ac_cv_sizeof_long+set}" = set; then
7512 echo $ECHO_N "(cached) $ECHO_C" >&6
7513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
7540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_lo=0 ac_mid=0
7552 while :; do
7553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* confdefs.h. */
7555_ACEOF
7556cat confdefs.h >>conftest.$ac_ext
7557cat >>conftest.$ac_ext <<_ACEOF
7558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007559$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561int
7562main ()
7563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007565test_array [0] = 0
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572if { (ac_try="$ac_compile"
7573case "(($ac_try" in
7574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575 *) ac_try_echo=$ac_try;;
7576esac
7577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007584 (exit $ac_status); } && {
7585 test -z "$ac_c_werror_flag" ||
7586 test ! -s conftest.err
7587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_hi=$ac_mid; break
7589else
7590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007591sed 's/^/| /' conftest.$ac_ext >&5
7592
Martin v. Löwiseba40652007-08-30 20:10:57 +00007593 ac_lo=`expr $ac_mid + 1`
7594 if test $ac_lo -le $ac_mid; then
7595 ac_lo= ac_hi=
7596 break
7597 fi
7598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 done
7603else
7604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007605sed 's/^/| /' conftest.$ac_ext >&5
7606
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007613$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007614 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007615int
7616main ()
7617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007619test_array [0] = 0
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
7631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_hi=-1 ac_mid=-1
7643 while :; do
7644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007656test_array [0] = 0
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
7668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_lo=$ac_mid; break
7680else
7681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 ac_hi=`expr '(' $ac_mid ')' - 1`
7685 if test $ac_mid -le $ac_hi; then
7686 ac_lo= ac_hi=
7687 break
7688 fi
7689 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 done
7694else
7695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007696sed 's/^/| /' conftest.$ac_ext >&5
7697
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700
7701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703
7704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007705# Binary search between lo and hi bounds.
7706while test "x$ac_lo" != "x$ac_hi"; do
7707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007709/* confdefs.h. */
7710_ACEOF
7711cat confdefs.h >>conftest.$ac_ext
7712cat >>conftest.$ac_ext <<_ACEOF
7713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
7718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007720test_array [0] = 0
7721
7722 ;
7723 return 0;
7724}
7725_ACEOF
7726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727if { (ac_try="$ac_compile"
7728case "(($ac_try" in
7729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7730 *) ac_try_echo=$ac_try;;
7731esac
7732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007735 grep -v '^ *+' conftest.er1 >conftest.err
7736 rm -f conftest.er1
7737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 (exit $ac_status); } && {
7740 test -z "$ac_c_werror_flag" ||
7741 test ! -s conftest.err
7742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_hi=$ac_mid
7744else
7745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007746sed 's/^/| /' conftest.$ac_ext >&5
7747
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750
7751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752done
7753case $ac_lo in
7754?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755'') if test "$ac_cv_type_long" = yes; then
7756 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007757See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 { (exit 77); exit 77; }; }
7761 else
7762 ac_cv_sizeof_long=0
7763 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007764esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765else
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* confdefs.h. */
7768_ACEOF
7769cat confdefs.h >>conftest.$ac_ext
7770cat >>conftest.$ac_ext <<_ACEOF
7771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 typedef long ac__type_sizeof_;
7774static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7775static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007776#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780{
Martin v. Löwis11437992002-04-12 09:54:03 +00007781
7782 FILE *f = fopen ("conftest.val", "w");
7783 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007784 return 1;
7785 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787 long int i = longval ();
7788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7789 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 fprintf (f, "%ld\n", i);
7791 }
7792 else
7793 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794 unsigned long int i = ulongval ();
7795 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7796 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 fprintf (f, "%lu\n", i);
7798 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
7801 ;
7802 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803}
Martin v. Löwis11437992002-04-12 09:54:03 +00007804_ACEOF
7805rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806if { (ac_try="$ac_link"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
7811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_status=$?
7814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 { (case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
7820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7821 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826else
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 echo "$as_me: program exited with status $ac_status" >&5
7828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007829sed 's/^/| /' conftest.$ac_ext >&5
7830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832if test "$ac_cv_type_long" = yes; then
7833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 { (exit 77); exit 77; }; }
7838 else
7839 ac_cv_sizeof_long=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842rm -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 +00007843fi
7844rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7847echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7848
7849
7850
Martin v. Löwis11437992002-04-12 09:54:03 +00007851cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854
7855
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856{ echo "$as_me:$LINENO: checking for void *" >&5
7857echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007858if test "${ac_cv_type_void_p+set}" = set; then
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
7860else
7861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007869int
7870main ()
7871{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881if { (ac_try="$ac_compile"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
7886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007889 grep -v '^ *+' conftest.er1 >conftest.err
7890 rm -f conftest.er1
7891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 (exit $ac_status); } && {
7894 test -z "$ac_c_werror_flag" ||
7895 test ! -s conftest.err
7896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_cv_type_void_p=yes
7898else
7899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007903fi
Brett Cannon19fab762007-06-02 03:02:29 +00007904
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7906fi
7907{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7908echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7909
7910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
7914{ echo "$as_me:$LINENO: checking size of void *" >&5
7915echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007916if test "${ac_cv_sizeof_void_p+set}" = set; then
7917 echo $ECHO_N "(cached) $ECHO_C" >&6
7918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 if test "$cross_compiling" = yes; then
7920 # Depending upon the size, compute the lo and hi bounds.
7921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007929int
7930main ()
7931{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007933test_array [0] = 0
7934
7935 ;
7936 return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940if { (ac_try="$ac_compile"
7941case "(($ac_try" in
7942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7943 *) ac_try_echo=$ac_try;;
7944esac
7945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 (exit $ac_status); } && {
7953 test -z "$ac_c_werror_flag" ||
7954 test ! -s conftest.err
7955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_lo=0 ac_mid=0
7957 while :; do
7958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007970test_array [0] = 0
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977if { (ac_try="$ac_compile"
7978case "(($ac_try" in
7979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7980 *) ac_try_echo=$ac_try;;
7981esac
7982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985 grep -v '^ *+' conftest.er1 >conftest.err
7986 rm -f conftest.er1
7987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989 (exit $ac_status); } && {
7990 test -z "$ac_c_werror_flag" ||
7991 test ! -s conftest.err
7992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_hi=$ac_mid; break
7994else
7995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998 ac_lo=`expr $ac_mid + 1`
7999 if test $ac_lo -le $ac_mid; then
8000 ac_lo= ac_hi=
8001 break
8002 fi
8003 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005
8006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 done
8008else
8009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008010sed 's/^/| /' conftest.$ac_ext >&5
8011
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031if { (ac_try="$ac_compile"
8032case "(($ac_try" in
8033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8034 *) ac_try_echo=$ac_try;;
8035esac
8036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008039 grep -v '^ *+' conftest.er1 >conftest.err
8040 rm -f conftest.er1
8041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043 (exit $ac_status); } && {
8044 test -z "$ac_c_werror_flag" ||
8045 test ! -s conftest.err
8046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_hi=-1 ac_mid=-1
8048 while :; do
8049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008057int
8058main ()
8059{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008061test_array [0] = 0
8062
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008068if { (ac_try="$ac_compile"
8069case "(($ac_try" in
8070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071 *) ac_try_echo=$ac_try;;
8072esac
8073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 (exit $ac_status); } && {
8081 test -z "$ac_c_werror_flag" ||
8082 test ! -s conftest.err
8083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_lo=$ac_mid; break
8085else
8086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 ac_hi=`expr '(' $ac_mid ')' - 1`
8090 if test $ac_mid -le $ac_hi; then
8091 ac_lo= ac_hi=
8092 break
8093 fi
8094 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096
8097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 done
8099else
8100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008101sed 's/^/| /' conftest.$ac_ext >&5
8102
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105
8106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110# Binary search between lo and hi bounds.
8111while test "x$ac_lo" != "x$ac_hi"; do
8112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* confdefs.h. */
8115_ACEOF
8116cat confdefs.h >>conftest.$ac_ext
8117cat >>conftest.$ac_ext <<_ACEOF
8118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132if { (ac_try="$ac_compile"
8133case "(($ac_try" in
8134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8135 *) ac_try_echo=$ac_try;;
8136esac
8137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008140 grep -v '^ *+' conftest.er1 >conftest.err
8141 rm -f conftest.er1
8142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144 (exit $ac_status); } && {
8145 test -z "$ac_c_werror_flag" ||
8146 test ! -s conftest.err
8147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_hi=$ac_mid
8149else
8150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008151sed 's/^/| /' conftest.$ac_ext >&5
8152
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155
8156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008157done
8158case $ac_lo in
8159?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160'') if test "$ac_cv_type_void_p" = yes; then
8161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008162See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 { (exit 77); exit 77; }; }
8166 else
8167 ac_cv_sizeof_void_p=0
8168 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008169esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 typedef void * ac__type_sizeof_;
8179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008181#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008182#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008185{
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187 FILE *f = fopen ("conftest.val", "w");
8188 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008189 return 1;
8190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192 long int i = longval ();
8193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8194 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 fprintf (f, "%ld\n", i);
8196 }
8197 else
8198 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199 unsigned long int i = ulongval ();
8200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8201 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 fprintf (f, "%lu\n", i);
8203 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206 ;
8207 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008208}
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211if { (ac_try="$ac_link"
8212case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
8216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 { (case "(($ac_try" in
8222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8223 *) ac_try_echo=$ac_try;;
8224esac
8225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_status=$?
8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); }; }; then
8230 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008231else
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 echo "$as_me: program exited with status $ac_status" >&5
8233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008234sed 's/^/| /' conftest.$ac_ext >&5
8235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237if test "$ac_cv_type_void_p" = yes; then
8238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 { (exit 77); exit 77; }; }
8243 else
8244 ac_cv_sizeof_void_p=0
8245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247rm -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 +00008248fi
8249rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8252echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8253
8254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008257#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008259
8260
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261{ echo "$as_me:$LINENO: checking for short" >&5
8262echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008263if test "${ac_cv_type_short+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8265else
8266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008272$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008274int
8275main ()
8276{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 return 0;
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286if { (ac_try="$ac_compile"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
8291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008294 grep -v '^ *+' conftest.er1 >conftest.err
8295 rm -f conftest.er1
8296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 (exit $ac_status); } && {
8299 test -z "$ac_c_werror_flag" ||
8300 test ! -s conftest.err
8301 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_cv_type_short=yes
8303else
8304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Brett Cannon19fab762007-06-02 03:02:29 +00008309
Martin v. Löwiseba40652007-08-30 20:10:57 +00008310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8311fi
8312{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8313echo "${ECHO_T}$ac_cv_type_short" >&6; }
8314
8315# The cast to long int works around a bug in the HP C Compiler
8316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
8319{ echo "$as_me:$LINENO: checking size of short" >&5
8320echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321if test "${ac_cv_sizeof_short+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 if test "$cross_compiling" = yes; then
8325 # Depending upon the size, compute the lo and hi bounds.
8326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008332$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334int
8335main ()
8336{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008338test_array [0] = 0
8339
8340 ;
8341 return 0;
8342}
8343_ACEOF
8344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345if { (ac_try="$ac_compile"
8346case "(($ac_try" in
8347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8348 *) ac_try_echo=$ac_try;;
8349esac
8350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008353 grep -v '^ *+' conftest.er1 >conftest.err
8354 rm -f conftest.er1
8355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 (exit $ac_status); } && {
8358 test -z "$ac_c_werror_flag" ||
8359 test ! -s conftest.err
8360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_lo=0 ac_mid=0
8362 while :; do
8363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008371int
8372main ()
8373{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382if { (ac_try="$ac_compile"
8383case "(($ac_try" in
8384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8385 *) ac_try_echo=$ac_try;;
8386esac
8387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008394 (exit $ac_status); } && {
8395 test -z "$ac_c_werror_flag" ||
8396 test ! -s conftest.err
8397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_hi=$ac_mid; break
8399else
8400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008401sed 's/^/| /' conftest.$ac_ext >&5
8402
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403 ac_lo=`expr $ac_mid + 1`
8404 if test $ac_lo -le $ac_mid; then
8405 ac_lo= ac_hi=
8406 break
8407 fi
8408 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410
8411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 done
8413else
8414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008415sed 's/^/| /' conftest.$ac_ext >&5
8416
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008425int
8426main ()
8427{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008429test_array [0] = 0
8430
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436if { (ac_try="$ac_compile"
8437case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
8441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 grep -v '^ *+' conftest.er1 >conftest.err
8445 rm -f conftest.er1
8446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448 (exit $ac_status); } && {
8449 test -z "$ac_c_werror_flag" ||
8450 test ! -s conftest.err
8451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_hi=-1 ac_mid=-1
8453 while :; do
8454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473if { (ac_try="$ac_compile"
8474case "(($ac_try" in
8475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8476 *) ac_try_echo=$ac_try;;
8477esac
8478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008481 grep -v '^ *+' conftest.er1 >conftest.err
8482 rm -f conftest.er1
8483 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 (exit $ac_status); } && {
8486 test -z "$ac_c_werror_flag" ||
8487 test ! -s conftest.err
8488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_lo=$ac_mid; break
8490else
8491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 ac_hi=`expr '(' $ac_mid ')' - 1`
8495 if test $ac_mid -le $ac_hi; then
8496 ac_lo= ac_hi=
8497 break
8498 fi
8499 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501
8502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 done
8504else
8505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008515# Binary search between lo and hi bounds.
8516while test "x$ac_lo" != "x$ac_hi"; do
8517 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008530test_array [0] = 0
8531
8532 ;
8533 return 0;
8534}
8535_ACEOF
8536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537if { (ac_try="$ac_compile"
8538case "(($ac_try" in
8539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8540 *) ac_try_echo=$ac_try;;
8541esac
8542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008545 grep -v '^ *+' conftest.er1 >conftest.err
8546 rm -f conftest.er1
8547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549 (exit $ac_status); } && {
8550 test -z "$ac_c_werror_flag" ||
8551 test ! -s conftest.err
8552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_hi=$ac_mid
8554else
8555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560
8561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565'') if test "$ac_cv_type_short" = yes; then
8566 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008567See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 { (exit 77); exit 77; }; }
8571 else
8572 ac_cv_sizeof_short=0
8573 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008574esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008577/* confdefs.h. */
8578_ACEOF
8579cat confdefs.h >>conftest.$ac_ext
8580cat >>conftest.$ac_ext <<_ACEOF
8581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 typedef short ac__type_sizeof_;
8584static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8585static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008590{
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
8592 FILE *f = fopen ("conftest.val", "w");
8593 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008594 return 1;
8595 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597 long int i = longval ();
8598 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8599 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 fprintf (f, "%ld\n", i);
8601 }
8602 else
8603 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604 unsigned long int i = ulongval ();
8605 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8606 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 fprintf (f, "%lu\n", i);
8608 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611 ;
8612 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008613}
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
8615rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616if { (ac_try="$ac_link"
8617case "(($ac_try" in
8618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8619 *) ac_try_echo=$ac_try;;
8620esac
8621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8622 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 { (case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
8630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8631 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_status=$?
8633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634 (exit $ac_status); }; }; then
8635 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008636else
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 echo "$as_me: program exited with status $ac_status" >&5
8638echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008639sed 's/^/| /' conftest.$ac_ext >&5
8640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642if test "$ac_cv_type_short" = yes; then
8643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 { (exit 77); exit 77; }; }
8648 else
8649 ac_cv_sizeof_short=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652rm -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 +00008653fi
8654rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8657echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664
8665
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666{ echo "$as_me:$LINENO: checking for float" >&5
8667echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008668if test "${ac_cv_type_float+set}" = set; then
8669 echo $ECHO_N "(cached) $ECHO_C" >&6
8670else
8671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 return 0;
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691if { (ac_try="$ac_compile"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
8696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008699 grep -v '^ *+' conftest.er1 >conftest.err
8700 rm -f conftest.er1
8701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 (exit $ac_status); } && {
8704 test -z "$ac_c_werror_flag" ||
8705 test ! -s conftest.err
8706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_type_float=yes
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008713fi
Brett Cannon19fab762007-06-02 03:02:29 +00008714
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8716fi
8717{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8718echo "${ECHO_T}$ac_cv_type_float" >&6; }
8719
8720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
8724{ echo "$as_me:$LINENO: checking size of float" >&5
8725echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008726if test "${ac_cv_sizeof_float+set}" = set; then
8727 echo $ECHO_N "(cached) $ECHO_C" >&6
8728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 if test "$cross_compiling" = yes; then
8730 # Depending upon the size, compute the lo and hi bounds.
8731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739int
8740main ()
8741{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008743test_array [0] = 0
8744
8745 ;
8746 return 0;
8747}
8748_ACEOF
8749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750if { (ac_try="$ac_compile"
8751case "(($ac_try" in
8752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8753 *) ac_try_echo=$ac_try;;
8754esac
8755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008758 grep -v '^ *+' conftest.er1 >conftest.err
8759 rm -f conftest.er1
8760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 (exit $ac_status); } && {
8763 test -z "$ac_c_werror_flag" ||
8764 test ! -s conftest.err
8765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_lo=0 ac_mid=0
8767 while :; do
8768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* confdefs.h. */
8770_ACEOF
8771cat confdefs.h >>conftest.$ac_ext
8772cat >>conftest.$ac_ext <<_ACEOF
8773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008776int
8777main ()
8778{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008780test_array [0] = 0
8781
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787if { (ac_try="$ac_compile"
8788case "(($ac_try" in
8789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8790 *) ac_try_echo=$ac_try;;
8791esac
8792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 grep -v '^ *+' conftest.er1 >conftest.err
8796 rm -f conftest.er1
8797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799 (exit $ac_status); } && {
8800 test -z "$ac_c_werror_flag" ||
8801 test ! -s conftest.err
8802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_hi=$ac_mid; break
8804else
8805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 ac_lo=`expr $ac_mid + 1`
8809 if test $ac_lo -le $ac_mid; then
8810 ac_lo= ac_hi=
8811 break
8812 fi
8813 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 done
8818else
8819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008820sed 's/^/| /' conftest.$ac_ext >&5
8821
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008829 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841if { (ac_try="$ac_compile"
8842case "(($ac_try" in
8843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8844 *) ac_try_echo=$ac_try;;
8845esac
8846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 grep -v '^ *+' conftest.er1 >conftest.err
8850 rm -f conftest.er1
8851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853 (exit $ac_status); } && {
8854 test -z "$ac_c_werror_flag" ||
8855 test ! -s conftest.err
8856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_hi=-1 ac_mid=-1
8858 while :; do
8859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008871test_array [0] = 0
8872
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
8883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_lo=$ac_mid; break
8895else
8896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 ac_hi=`expr '(' $ac_mid ')' - 1`
8900 if test $ac_mid -le $ac_hi; then
8901 ac_lo= ac_hi=
8902 break
8903 fi
8904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906
8907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 done
8909else
8910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008911sed 's/^/| /' conftest.$ac_ext >&5
8912
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918
8919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008920# Binary search between lo and hi bounds.
8921while test "x$ac_lo" != "x$ac_hi"; do
8922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* confdefs.h. */
8925_ACEOF
8926cat confdefs.h >>conftest.$ac_ext
8927cat >>conftest.$ac_ext <<_ACEOF
8928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942if { (ac_try="$ac_compile"
8943case "(($ac_try" in
8944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8945 *) ac_try_echo=$ac_try;;
8946esac
8947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008950 grep -v '^ *+' conftest.er1 >conftest.err
8951 rm -f conftest.er1
8952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 (exit $ac_status); } && {
8955 test -z "$ac_c_werror_flag" ||
8956 test ! -s conftest.err
8957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_hi=$ac_mid
8959else
8960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008961sed 's/^/| /' conftest.$ac_ext >&5
8962
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965
8966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008967done
8968case $ac_lo in
8969?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970'') if test "$ac_cv_type_float" = yes; then
8971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008972See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 { (exit 77); exit 77; }; }
8976 else
8977 ac_cv_sizeof_float=0
8978 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* confdefs.h. */
8983_ACEOF
8984cat confdefs.h >>conftest.$ac_ext
8985cat >>conftest.$ac_ext <<_ACEOF
8986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 typedef float ac__type_sizeof_;
8989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008992#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008995{
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
8997 FILE *f = fopen ("conftest.val", "w");
8998 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008999 return 1;
9000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002 long int i = longval ();
9003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9004 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 fprintf (f, "%ld\n", i);
9006 }
9007 else
9008 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009 unsigned long int i = ulongval ();
9010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9011 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 fprintf (f, "%lu\n", i);
9013 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
9016 ;
9017 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018}
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
9020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021if { (ac_try="$ac_link"
9022case "(($ac_try" in
9023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9024 *) ac_try_echo=$ac_try;;
9025esac
9026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 { (case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
9035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041else
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009044sed 's/^/| /' conftest.$ac_ext >&5
9045
Martin v. Löwis11437992002-04-12 09:54:03 +00009046( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047if test "$ac_cv_type_float" = yes; then
9048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 { (exit 77); exit 77; }; }
9053 else
9054 ac_cv_sizeof_float=0
9055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057rm -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 +00009058fi
9059rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9062echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9063
9064
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009067#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069
9070
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071{ echo "$as_me:$LINENO: checking for double" >&5
9072echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009073if test "${ac_cv_type_double+set}" = set; then
9074 echo $ECHO_N "(cached) $ECHO_C" >&6
9075else
9076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009082$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084int
9085main ()
9086{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 return 0;
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096if { (ac_try="$ac_compile"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
9101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009104 grep -v '^ *+' conftest.er1 >conftest.err
9105 rm -f conftest.er1
9106 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 (exit $ac_status); } && {
9109 test -z "$ac_c_werror_flag" ||
9110 test ! -s conftest.err
9111 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_cv_type_double=yes
9113else
9114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009118fi
Brett Cannon19fab762007-06-02 03:02:29 +00009119
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9121fi
9122{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9123echo "${ECHO_T}$ac_cv_type_double" >&6; }
9124
9125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
9129{ echo "$as_me:$LINENO: checking size of double" >&5
9130echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009131if test "${ac_cv_sizeof_double+set}" = set; then
9132 echo $ECHO_N "(cached) $ECHO_C" >&6
9133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 if test "$cross_compiling" = yes; then
9135 # Depending upon the size, compute the lo and hi bounds.
9136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144int
9145main ()
9146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009148test_array [0] = 0
9149
9150 ;
9151 return 0;
9152}
9153_ACEOF
9154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155if { (ac_try="$ac_compile"
9156case "(($ac_try" in
9157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9158 *) ac_try_echo=$ac_try;;
9159esac
9160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009163 grep -v '^ *+' conftest.er1 >conftest.err
9164 rm -f conftest.er1
9165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 (exit $ac_status); } && {
9168 test -z "$ac_c_werror_flag" ||
9169 test ! -s conftest.err
9170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_lo=0 ac_mid=0
9172 while :; do
9173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009179$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009181int
9182main ()
9183{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009185test_array [0] = 0
9186
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192if { (ac_try="$ac_compile"
9193case "(($ac_try" in
9194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9195 *) ac_try_echo=$ac_try;;
9196esac
9197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009200 grep -v '^ *+' conftest.er1 >conftest.err
9201 rm -f conftest.er1
9202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009204 (exit $ac_status); } && {
9205 test -z "$ac_c_werror_flag" ||
9206 test ! -s conftest.err
9207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_hi=$ac_mid; break
9209else
9210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009211sed 's/^/| /' conftest.$ac_ext >&5
9212
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213 ac_lo=`expr $ac_mid + 1`
9214 if test $ac_lo -le $ac_mid; then
9215 ac_lo= ac_hi=
9216 break
9217 fi
9218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 done
9223else
9224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* confdefs.h. */
9229_ACEOF
9230cat confdefs.h >>conftest.$ac_ext
9231cat >>conftest.$ac_ext <<_ACEOF
9232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246if { (ac_try="$ac_compile"
9247case "(($ac_try" in
9248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9249 *) ac_try_echo=$ac_try;;
9250esac
9251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258 (exit $ac_status); } && {
9259 test -z "$ac_c_werror_flag" ||
9260 test ! -s conftest.err
9261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_hi=-1 ac_mid=-1
9263 while :; do
9264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009270$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009276test_array [0] = 0
9277
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
9288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 (exit $ac_status); } && {
9296 test -z "$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_lo=$ac_mid; break
9300else
9301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 ac_hi=`expr '(' $ac_mid ')' - 1`
9305 if test $ac_mid -le $ac_hi; then
9306 ac_lo= ac_hi=
9307 break
9308 fi
9309 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311
9312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 done
9314else
9315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009316sed 's/^/| /' conftest.$ac_ext >&5
9317
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320
9321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323
9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009325# Binary search between lo and hi bounds.
9326while test "x$ac_lo" != "x$ac_hi"; do
9327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* confdefs.h. */
9330_ACEOF
9331cat confdefs.h >>conftest.$ac_ext
9332cat >>conftest.$ac_ext <<_ACEOF
9333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009334$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009340test_array [0] = 0
9341
9342 ;
9343 return 0;
9344}
9345_ACEOF
9346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347if { (ac_try="$ac_compile"
9348case "(($ac_try" in
9349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9350 *) ac_try_echo=$ac_try;;
9351esac
9352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355 grep -v '^ *+' conftest.er1 >conftest.err
9356 rm -f conftest.er1
9357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359 (exit $ac_status); } && {
9360 test -z "$ac_c_werror_flag" ||
9361 test ! -s conftest.err
9362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_hi=$ac_mid
9364else
9365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009366sed 's/^/| /' conftest.$ac_ext >&5
9367
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370
9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372done
9373case $ac_lo in
9374?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375'') if test "$ac_cv_type_double" = yes; then
9376 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009377See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 { (exit 77); exit 77; }; }
9381 else
9382 ac_cv_sizeof_double=0
9383 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 typedef double ac__type_sizeof_;
9394static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9395static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009396#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009400{
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
9402 FILE *f = fopen ("conftest.val", "w");
9403 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009404 return 1;
9405 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 long int i = longval ();
9408 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9409 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 fprintf (f, "%ld\n", i);
9411 }
9412 else
9413 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414 unsigned long int i = ulongval ();
9415 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9416 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 fprintf (f, "%lu\n", i);
9418 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
9421 ;
9422 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423}
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
9425rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426if { (ac_try="$ac_link"
9427case "(($ac_try" in
9428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9429 *) ac_try_echo=$ac_try;;
9430esac
9431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9432 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 { (case "(($ac_try" in
9437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9438 *) ac_try_echo=$ac_try;;
9439esac
9440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9441 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
9443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9444 (exit $ac_status); }; }; then
9445 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446else
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 echo "$as_me: program exited with status $ac_status" >&5
9448echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009449sed 's/^/| /' conftest.$ac_ext >&5
9450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452if test "$ac_cv_type_double" = yes; then
9453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 { (exit 77); exit 77; }; }
9458 else
9459 ac_cv_sizeof_double=0
9460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462rm -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 +00009463fi
9464rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9467echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9468
9469
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009472#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009473_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474
9475
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9477echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009478if test "${ac_cv_type_fpos_t+set}" = set; then
9479 echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009482/* confdefs.h. */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009487$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 return 0;
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501if { (ac_try="$ac_compile"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
9506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009509 grep -v '^ *+' conftest.er1 >conftest.err
9510 rm -f conftest.er1
9511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 (exit $ac_status); } && {
9514 test -z "$ac_c_werror_flag" ||
9515 test ! -s conftest.err
9516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_cv_type_fpos_t=yes
9518else
9519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009523fi
Brett Cannon19fab762007-06-02 03:02:29 +00009524
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526fi
9527{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9528echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9529
9530# The cast to long int works around a bug in the HP C Compiler
9531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9533# This bug is HP SR number 8606223364.
9534{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9535echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009536if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9537 echo $ECHO_N "(cached) $ECHO_C" >&6
9538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 if test "$cross_compiling" = yes; then
9540 # Depending upon the size, compute the lo and hi bounds.
9541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009553test_array [0] = 0
9554
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560if { (ac_try="$ac_compile"
9561case "(($ac_try" in
9562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563 *) ac_try_echo=$ac_try;;
9564esac
9565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 (exit $ac_status); } && {
9573 test -z "$ac_c_werror_flag" ||
9574 test ! -s conftest.err
9575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_lo=0 ac_mid=0
9577 while :; do
9578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009586int
9587main ()
9588{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009590test_array [0] = 0
9591
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597if { (ac_try="$ac_compile"
9598case "(($ac_try" in
9599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9600 *) ac_try_echo=$ac_try;;
9601esac
9602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009609 (exit $ac_status); } && {
9610 test -z "$ac_c_werror_flag" ||
9611 test ! -s conftest.err
9612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_hi=$ac_mid; break
9614else
9615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618 ac_lo=`expr $ac_mid + 1`
9619 if test $ac_lo -le $ac_mid; then
9620 ac_lo= ac_hi=
9621 break
9622 fi
9623 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 done
9628else
9629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009630sed 's/^/| /' conftest.$ac_ext >&5
9631
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* confdefs.h. */
9634_ACEOF
9635cat confdefs.h >>conftest.$ac_ext
9636cat >>conftest.$ac_ext <<_ACEOF
9637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009644test_array [0] = 0
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651if { (ac_try="$ac_compile"
9652case "(($ac_try" in
9653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654 *) ac_try_echo=$ac_try;;
9655esac
9656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663 (exit $ac_status); } && {
9664 test -z "$ac_c_werror_flag" ||
9665 test ! -s conftest.err
9666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_hi=-1 ac_mid=-1
9668 while :; do
9669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009681test_array [0] = 0
9682
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009688if { (ac_try="$ac_compile"
9689case "(($ac_try" in
9690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9691 *) ac_try_echo=$ac_try;;
9692esac
9693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 grep -v '^ *+' conftest.er1 >conftest.err
9697 rm -f conftest.er1
9698 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 (exit $ac_status); } && {
9701 test -z "$ac_c_werror_flag" ||
9702 test ! -s conftest.err
9703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_lo=$ac_mid; break
9705else
9706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 ac_hi=`expr '(' $ac_mid ')' - 1`
9710 if test $ac_mid -le $ac_hi; then
9711 ac_lo= ac_hi=
9712 break
9713 fi
9714 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716
9717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 done
9719else
9720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009721sed 's/^/| /' conftest.$ac_ext >&5
9722
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728
9729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730# Binary search between lo and hi bounds.
9731while test "x$ac_lo" != "x$ac_hi"; do
9732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* confdefs.h. */
9735_ACEOF
9736cat confdefs.h >>conftest.$ac_ext
9737cat >>conftest.$ac_ext <<_ACEOF
9738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009741int
9742main ()
9743{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009745test_array [0] = 0
9746
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752if { (ac_try="$ac_compile"
9753case "(($ac_try" in
9754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9755 *) ac_try_echo=$ac_try;;
9756esac
9757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 grep -v '^ *+' conftest.er1 >conftest.err
9761 rm -f conftest.er1
9762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764 (exit $ac_status); } && {
9765 test -z "$ac_c_werror_flag" ||
9766 test ! -s conftest.err
9767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_hi=$ac_mid
9769else
9770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009771sed 's/^/| /' conftest.$ac_ext >&5
9772
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775
9776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009777done
9778case $ac_lo in
9779?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780'') if test "$ac_cv_type_fpos_t" = yes; then
9781 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009782See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 { (exit 77); exit 77; }; }
9786 else
9787 ac_cv_sizeof_fpos_t=0
9788 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* confdefs.h. */
9793_ACEOF
9794cat confdefs.h >>conftest.$ac_ext
9795cat >>conftest.$ac_ext <<_ACEOF
9796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 typedef fpos_t ac__type_sizeof_;
9799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009805{
Martin v. Löwis11437992002-04-12 09:54:03 +00009806
9807 FILE *f = fopen ("conftest.val", "w");
9808 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809 return 1;
9810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812 long int i = longval ();
9813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9814 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 fprintf (f, "%ld\n", i);
9816 }
9817 else
9818 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819 unsigned long int i = ulongval ();
9820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9821 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 fprintf (f, "%lu\n", i);
9823 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
9826 ;
9827 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009828}
Martin v. Löwis11437992002-04-12 09:54:03 +00009829_ACEOF
9830rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831if { (ac_try="$ac_link"
9832case "(($ac_try" in
9833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834 *) ac_try_echo=$ac_try;;
9835esac
9836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 { (case "(($ac_try" in
9842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843 *) ac_try_echo=$ac_try;;
9844esac
9845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_status=$?
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849 (exit $ac_status); }; }; then
9850 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 echo "$as_me: program exited with status $ac_status" >&5
9853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis11437992002-04-12 09:54:03 +00009856( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857if test "$ac_cv_type_fpos_t" = yes; then
9858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 { (exit 77); exit 77; }; }
9863 else
9864 ac_cv_sizeof_fpos_t=0
9865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867rm -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 +00009868fi
9869rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9872echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9873
9874
9875
Martin v. Löwis11437992002-04-12 09:54:03 +00009876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009877#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009879
Michael W. Hudson54241132001-12-07 15:38:26 +00009880
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881{ echo "$as_me:$LINENO: checking for size_t" >&5
9882echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009883if test "${ac_cv_type_size_t+set}" = set; then
9884 echo $ECHO_N "(cached) $ECHO_C" >&6
9885else
9886 cat >conftest.$ac_ext <<_ACEOF
9887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
9892$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009894int
9895main ()
9896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009898 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009900 return 0;
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906if { (ac_try="$ac_compile"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
9911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009913 ac_status=$?
9914 grep -v '^ *+' conftest.er1 >conftest.err
9915 rm -f conftest.er1
9916 cat conftest.err >&5
9917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 (exit $ac_status); } && {
9919 test -z "$ac_c_werror_flag" ||
9920 test ! -s conftest.err
9921 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009922 ac_cv_type_size_t=yes
9923else
9924 echo "$as_me: failed program was:" >&5
9925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009928fi
Brett Cannon19fab762007-06-02 03:02:29 +00009929
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931fi
9932{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9933echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9934
9935# The cast to long int works around a bug in the HP C Compiler
9936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9938# This bug is HP SR number 8606223364.
9939{ echo "$as_me:$LINENO: checking size of size_t" >&5
9940echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009941if test "${ac_cv_sizeof_size_t+set}" = set; then
9942 echo $ECHO_N "(cached) $ECHO_C" >&6
9943else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009944 if test "$cross_compiling" = yes; then
9945 # Depending upon the size, compute the lo and hi bounds.
9946cat >conftest.$ac_ext <<_ACEOF
9947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
9952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009954int
9955main ()
9956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009958test_array [0] = 0
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965if { (ac_try="$ac_compile"
9966case "(($ac_try" in
9967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9968 *) ac_try_echo=$ac_try;;
9969esac
9970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009972 ac_status=$?
9973 grep -v '^ *+' conftest.er1 >conftest.err
9974 rm -f conftest.er1
9975 cat conftest.err >&5
9976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 (exit $ac_status); } && {
9978 test -z "$ac_c_werror_flag" ||
9979 test ! -s conftest.err
9980 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009981 ac_lo=0 ac_mid=0
9982 while :; do
9983 cat >conftest.$ac_ext <<_ACEOF
9984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
9989$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009991int
9992main ()
9993{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
10007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009 ac_status=$?
10010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010018 ac_hi=$ac_mid; break
10019else
10020 echo "$as_me: failed program was:" >&5
10021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 ac_lo=`expr $ac_mid + 1`
10024 if test $ac_lo -le $ac_mid; then
10025 ac_lo= ac_hi=
10026 break
10027 fi
10028 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010032 done
10033else
10034 echo "$as_me: failed program was:" >&5
10035sed 's/^/| /' conftest.$ac_ext >&5
10036
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
10043$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010044 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010045int
10046main ()
10047{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
10061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063 ac_status=$?
10064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068 (exit $ac_status); } && {
10069 test -z "$ac_c_werror_flag" ||
10070 test ! -s conftest.err
10071 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010072 ac_hi=-1 ac_mid=-1
10073 while :; do
10074 cat >conftest.$ac_ext <<_ACEOF
10075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
10080$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010082int
10083main ()
10084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086test_array [0] = 0
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093if { (ac_try="$ac_compile"
10094case "(($ac_try" in
10095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10096 *) ac_try_echo=$ac_try;;
10097esac
10098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 ac_status=$?
10101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
10104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010109 ac_lo=$ac_mid; break
10110else
10111 echo "$as_me: failed program was:" >&5
10112sed 's/^/| /' conftest.$ac_ext >&5
10113
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 ac_hi=`expr '(' $ac_mid ')' - 1`
10115 if test $ac_mid -le $ac_hi; then
10116 ac_lo= ac_hi=
10117 break
10118 fi
10119 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121
10122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123 done
10124else
10125 echo "$as_me: failed program was:" >&5
10126sed 's/^/| /' conftest.$ac_ext >&5
10127
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133
10134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135# Binary search between lo and hi bounds.
10136while test "x$ac_lo" != "x$ac_hi"; do
10137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10138 cat >conftest.$ac_ext <<_ACEOF
10139/* confdefs.h. */
10140_ACEOF
10141cat confdefs.h >>conftest.$ac_ext
10142cat >>conftest.$ac_ext <<_ACEOF
10143/* end confdefs.h. */
10144$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146int
10147main ()
10148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150test_array [0] = 0
10151
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157if { (ac_try="$ac_compile"
10158case "(($ac_try" in
10159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160 *) ac_try_echo=$ac_try;;
10161esac
10162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010164 ac_status=$?
10165 grep -v '^ *+' conftest.er1 >conftest.err
10166 rm -f conftest.er1
10167 cat conftest.err >&5
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169 (exit $ac_status); } && {
10170 test -z "$ac_c_werror_flag" ||
10171 test ! -s conftest.err
10172 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010173 ac_hi=$ac_mid
10174else
10175 echo "$as_me: failed program was:" >&5
10176sed 's/^/| /' conftest.$ac_ext >&5
10177
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180
10181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010182done
10183case $ac_lo in
10184?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185'') if test "$ac_cv_type_size_t" = yes; then
10186 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010187See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010189See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 { (exit 77); exit 77; }; }
10191 else
10192 ac_cv_sizeof_size_t=0
10193 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010194esac
10195else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010196 cat >conftest.$ac_ext <<_ACEOF
10197/* confdefs.h. */
10198_ACEOF
10199cat confdefs.h >>conftest.$ac_ext
10200cat >>conftest.$ac_ext <<_ACEOF
10201/* end confdefs.h. */
10202$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203 typedef size_t ac__type_sizeof_;
10204static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10205static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010206#include <stdio.h>
10207#include <stdlib.h>
10208int
10209main ()
10210{
10211
10212 FILE *f = fopen ("conftest.val", "w");
10213 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010214 return 1;
10215 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010216 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217 long int i = longval ();
10218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10219 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010220 fprintf (f, "%ld\n", i);
10221 }
10222 else
10223 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224 unsigned long int i = ulongval ();
10225 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10226 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010227 fprintf (f, "%lu\n", i);
10228 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010230
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236if { (ac_try="$ac_link"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
10241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10242 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010243 ac_status=$?
10244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 { (case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
10250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10251 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010252 ac_status=$?
10253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10254 (exit $ac_status); }; }; then
10255 ac_cv_sizeof_size_t=`cat conftest.val`
10256else
10257 echo "$as_me: program exited with status $ac_status" >&5
10258echo "$as_me: failed program was:" >&5
10259sed 's/^/| /' conftest.$ac_ext >&5
10260
10261( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262if test "$ac_cv_type_size_t" = yes; then
10263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010264See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010265echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010266See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 { (exit 77); exit 77; }; }
10268 else
10269 ac_cv_sizeof_size_t=0
10270 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272rm -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 +000010273fi
10274rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10277echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10278
10279
10280
Martin v. Löwis18e16552006-02-15 17:27:45 +000010281cat >>confdefs.h <<_ACEOF
10282#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10283_ACEOF
10284
10285
Christian Heimes951cc0f2008-01-31 23:08:23 +000010286{ echo "$as_me:$LINENO: checking for pid_t" >&5
10287echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10288if test "${ac_cv_type_pid_t+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10290else
10291 cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
10297$ac_includes_default
10298typedef pid_t ac__type_new_;
10299int
10300main ()
10301{
10302if ((ac__type_new_ *) 0)
10303 return 0;
10304if (sizeof (ac__type_new_))
10305 return 0;
10306 ;
10307 return 0;
10308}
10309_ACEOF
10310rm -f conftest.$ac_objext
10311if { (ac_try="$ac_compile"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
10316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10317 (eval "$ac_compile") 2>conftest.er1
10318 ac_status=$?
10319 grep -v '^ *+' conftest.er1 >conftest.err
10320 rm -f conftest.er1
10321 cat conftest.err >&5
10322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323 (exit $ac_status); } && {
10324 test -z "$ac_c_werror_flag" ||
10325 test ! -s conftest.err
10326 } && test -s conftest.$ac_objext; then
10327 ac_cv_type_pid_t=yes
10328else
10329 echo "$as_me: failed program was:" >&5
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
10332 ac_cv_type_pid_t=no
10333fi
10334
10335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10336fi
10337{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10338echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10339
10340# The cast to long int works around a bug in the HP C Compiler
10341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10343# This bug is HP SR number 8606223364.
10344{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10345echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10346if test "${ac_cv_sizeof_pid_t+set}" = set; then
10347 echo $ECHO_N "(cached) $ECHO_C" >&6
10348else
10349 if test "$cross_compiling" = yes; then
10350 # Depending upon the size, compute the lo and hi bounds.
10351cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
10357$ac_includes_default
10358 typedef pid_t ac__type_sizeof_;
10359int
10360main ()
10361{
10362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10363test_array [0] = 0
10364
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext
10370if { (ac_try="$ac_compile"
10371case "(($ac_try" in
10372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373 *) ac_try_echo=$ac_try;;
10374esac
10375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10376 (eval "$ac_compile") 2>conftest.er1
10377 ac_status=$?
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); } && {
10383 test -z "$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 } && test -s conftest.$ac_objext; then
10386 ac_lo=0 ac_mid=0
10387 while :; do
10388 cat >conftest.$ac_ext <<_ACEOF
10389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
10394$ac_includes_default
10395 typedef pid_t ac__type_sizeof_;
10396int
10397main ()
10398{
10399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10400test_array [0] = 0
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
10406rm -f conftest.$ac_objext
10407if { (ac_try="$ac_compile"
10408case "(($ac_try" in
10409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10410 *) ac_try_echo=$ac_try;;
10411esac
10412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10413 (eval "$ac_compile") 2>conftest.er1
10414 ac_status=$?
10415 grep -v '^ *+' conftest.er1 >conftest.err
10416 rm -f conftest.er1
10417 cat conftest.err >&5
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); } && {
10420 test -z "$ac_c_werror_flag" ||
10421 test ! -s conftest.err
10422 } && test -s conftest.$ac_objext; then
10423 ac_hi=$ac_mid; break
10424else
10425 echo "$as_me: failed program was:" >&5
10426sed 's/^/| /' conftest.$ac_ext >&5
10427
10428 ac_lo=`expr $ac_mid + 1`
10429 if test $ac_lo -le $ac_mid; then
10430 ac_lo= ac_hi=
10431 break
10432 fi
10433 ac_mid=`expr 2 '*' $ac_mid + 1`
10434fi
10435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437 done
10438else
10439 echo "$as_me: failed program was:" >&5
10440sed 's/^/| /' conftest.$ac_ext >&5
10441
10442 cat >conftest.$ac_ext <<_ACEOF
10443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
10448$ac_includes_default
10449 typedef pid_t ac__type_sizeof_;
10450int
10451main ()
10452{
10453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10454test_array [0] = 0
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
10461if { (ac_try="$ac_compile"
10462case "(($ac_try" in
10463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10464 *) ac_try_echo=$ac_try;;
10465esac
10466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10467 (eval "$ac_compile") 2>conftest.er1
10468 ac_status=$?
10469 grep -v '^ *+' conftest.er1 >conftest.err
10470 rm -f conftest.er1
10471 cat conftest.err >&5
10472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10473 (exit $ac_status); } && {
10474 test -z "$ac_c_werror_flag" ||
10475 test ! -s conftest.err
10476 } && test -s conftest.$ac_objext; then
10477 ac_hi=-1 ac_mid=-1
10478 while :; do
10479 cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h. */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h. */
10485$ac_includes_default
10486 typedef pid_t ac__type_sizeof_;
10487int
10488main ()
10489{
10490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10491test_array [0] = 0
10492
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext
10498if { (ac_try="$ac_compile"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
10503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10504 (eval "$ac_compile") 2>conftest.er1
10505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest.$ac_objext; then
10514 ac_lo=$ac_mid; break
10515else
10516 echo "$as_me: failed program was:" >&5
10517sed 's/^/| /' conftest.$ac_ext >&5
10518
10519 ac_hi=`expr '(' $ac_mid ')' - 1`
10520 if test $ac_mid -le $ac_hi; then
10521 ac_lo= ac_hi=
10522 break
10523 fi
10524 ac_mid=`expr 2 '*' $ac_mid`
10525fi
10526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528 done
10529else
10530 echo "$as_me: failed program was:" >&5
10531sed 's/^/| /' conftest.$ac_ext >&5
10532
10533 ac_lo= ac_hi=
10534fi
10535
10536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10537fi
10538
10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10540# Binary search between lo and hi bounds.
10541while test "x$ac_lo" != "x$ac_hi"; do
10542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10543 cat >conftest.$ac_ext <<_ACEOF
10544/* confdefs.h. */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h. */
10549$ac_includes_default
10550 typedef pid_t ac__type_sizeof_;
10551int
10552main ()
10553{
10554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10555test_array [0] = 0
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext
10562if { (ac_try="$ac_compile"
10563case "(($ac_try" in
10564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10565 *) ac_try_echo=$ac_try;;
10566esac
10567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10568 (eval "$ac_compile") 2>conftest.er1
10569 ac_status=$?
10570 grep -v '^ *+' conftest.er1 >conftest.err
10571 rm -f conftest.er1
10572 cat conftest.err >&5
10573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10574 (exit $ac_status); } && {
10575 test -z "$ac_c_werror_flag" ||
10576 test ! -s conftest.err
10577 } && test -s conftest.$ac_objext; then
10578 ac_hi=$ac_mid
10579else
10580 echo "$as_me: failed program was:" >&5
10581sed 's/^/| /' conftest.$ac_ext >&5
10582
10583 ac_lo=`expr '(' $ac_mid ')' + 1`
10584fi
10585
10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10587done
10588case $ac_lo in
10589?*) ac_cv_sizeof_pid_t=$ac_lo;;
10590'') if test "$ac_cv_type_pid_t" = yes; then
10591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10592See \`config.log' for more details." >&5
10593echo "$as_me: error: cannot compute sizeof (pid_t)
10594See \`config.log' for more details." >&2;}
10595 { (exit 77); exit 77; }; }
10596 else
10597 ac_cv_sizeof_pid_t=0
10598 fi ;;
10599esac
10600else
10601 cat >conftest.$ac_ext <<_ACEOF
10602/* confdefs.h. */
10603_ACEOF
10604cat confdefs.h >>conftest.$ac_ext
10605cat >>conftest.$ac_ext <<_ACEOF
10606/* end confdefs.h. */
10607$ac_includes_default
10608 typedef pid_t ac__type_sizeof_;
10609static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10610static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10611#include <stdio.h>
10612#include <stdlib.h>
10613int
10614main ()
10615{
10616
10617 FILE *f = fopen ("conftest.val", "w");
10618 if (! f)
10619 return 1;
10620 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10621 {
10622 long int i = longval ();
10623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10624 return 1;
10625 fprintf (f, "%ld\n", i);
10626 }
10627 else
10628 {
10629 unsigned long int i = ulongval ();
10630 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10631 return 1;
10632 fprintf (f, "%lu\n", i);
10633 }
10634 return ferror (f) || fclose (f) != 0;
10635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest$ac_exeext
10641if { (ac_try="$ac_link"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
10646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10647 (eval "$ac_link") 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10651 { (case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
10655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10656 (eval "$ac_try") 2>&5
10657 ac_status=$?
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); }; }; then
10660 ac_cv_sizeof_pid_t=`cat conftest.val`
10661else
10662 echo "$as_me: program exited with status $ac_status" >&5
10663echo "$as_me: failed program was:" >&5
10664sed 's/^/| /' conftest.$ac_ext >&5
10665
10666( exit $ac_status )
10667if test "$ac_cv_type_pid_t" = yes; then
10668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10669See \`config.log' for more details." >&5
10670echo "$as_me: error: cannot compute sizeof (pid_t)
10671See \`config.log' for more details." >&2;}
10672 { (exit 77); exit 77; }; }
10673 else
10674 ac_cv_sizeof_pid_t=0
10675 fi
10676fi
10677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10678fi
10679rm -f conftest.val
10680fi
10681{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10682echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10683
10684
10685
10686cat >>confdefs.h <<_ACEOF
10687#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10688_ACEOF
10689
10690
Michael W. Hudson54241132001-12-07 15:38:26 +000010691
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692{ echo "$as_me:$LINENO: checking for long long support" >&5
10693echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010694have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010696/* confdefs.h. */
10697_ACEOF
10698cat confdefs.h >>conftest.$ac_ext
10699cat >>conftest.$ac_ext <<_ACEOF
10700/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010701
Martin v. Löwis11437992002-04-12 09:54:03 +000010702int
10703main ()
10704{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010705long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 ;
10707 return 0;
10708}
10709_ACEOF
10710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711if { (ac_try="$ac_compile"
10712case "(($ac_try" in
10713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10714 *) ac_try_echo=$ac_try;;
10715esac
10716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010719 grep -v '^ *+' conftest.er1 >conftest.err
10720 rm -f conftest.er1
10721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (exit $ac_status); } && {
10724 test -z "$ac_c_werror_flag" ||
10725 test ! -s conftest.err
10726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
10728
10729cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010730#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010731_ACEOF
10732
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010733 have_long_long=yes
10734
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010737sed 's/^/| /' conftest.$ac_ext >&5
10738
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10744echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010745if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010746{ echo "$as_me:$LINENO: checking for long long" >&5
10747echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010748if test "${ac_cv_type_long_long+set}" = set; then
10749 echo $ECHO_N "(cached) $ECHO_C" >&6
10750else
10751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010752/* confdefs.h. */
10753_ACEOF
10754cat confdefs.h >>conftest.$ac_ext
10755cat >>conftest.$ac_ext <<_ACEOF
10756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 return 0;
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010771if { (ac_try="$ac_compile"
10772case "(($ac_try" in
10773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10774 *) ac_try_echo=$ac_try;;
10775esac
10776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010779 grep -v '^ *+' conftest.er1 >conftest.err
10780 rm -f conftest.er1
10781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 (exit $ac_status); } && {
10784 test -z "$ac_c_werror_flag" ||
10785 test ! -s conftest.err
10786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ac_cv_type_long_long=yes
10788else
10789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010790sed 's/^/| /' conftest.$ac_ext >&5
10791
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010793fi
Brett Cannon19fab762007-06-02 03:02:29 +000010794
Martin v. Löwiseba40652007-08-30 20:10:57 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796fi
10797{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10798echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10799
10800# The cast to long int works around a bug in the HP C Compiler
10801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10803# This bug is HP SR number 8606223364.
10804{ echo "$as_me:$LINENO: checking size of long long" >&5
10805echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010806if test "${ac_cv_sizeof_long_long+set}" = set; then
10807 echo $ECHO_N "(cached) $ECHO_C" >&6
10808else
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 if test "$cross_compiling" = yes; then
10810 # Depending upon the size, compute the lo and hi bounds.
10811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010817$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010819int
10820main ()
10821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010823test_array [0] = 0
10824
10825 ;
10826 return 0;
10827}
10828_ACEOF
10829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830if { (ac_try="$ac_compile"
10831case "(($ac_try" in
10832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10833 *) ac_try_echo=$ac_try;;
10834esac
10835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010842 (exit $ac_status); } && {
10843 test -z "$ac_c_werror_flag" ||
10844 test ! -s conftest.err
10845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ac_lo=0 ac_mid=0
10847 while :; do
10848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* confdefs.h. */
10850_ACEOF
10851cat confdefs.h >>conftest.$ac_ext
10852cat >>conftest.$ac_ext <<_ACEOF
10853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010854$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010855 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010856int
10857main ()
10858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010860test_array [0] = 0
10861
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010867if { (ac_try="$ac_compile"
10868case "(($ac_try" in
10869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10870 *) ac_try_echo=$ac_try;;
10871esac
10872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010875 grep -v '^ *+' conftest.er1 >conftest.err
10876 rm -f conftest.er1
10877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879 (exit $ac_status); } && {
10880 test -z "$ac_c_werror_flag" ||
10881 test ! -s conftest.err
10882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 ac_hi=$ac_mid; break
10884else
10885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010886sed 's/^/| /' conftest.$ac_ext >&5
10887
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888 ac_lo=`expr $ac_mid + 1`
10889 if test $ac_lo -le $ac_mid; then
10890 ac_lo= ac_hi=
10891 break
10892 fi
10893 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895
10896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 done
10898else
10899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010900sed 's/^/| /' conftest.$ac_ext >&5
10901
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010909 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010910int
10911main ()
10912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010914test_array [0] = 0
10915
10916 ;
10917 return 0;
10918}
10919_ACEOF
10920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010921if { (ac_try="$ac_compile"
10922case "(($ac_try" in
10923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10924 *) ac_try_echo=$ac_try;;
10925esac
10926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010929 grep -v '^ *+' conftest.er1 >conftest.err
10930 rm -f conftest.er1
10931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010933 (exit $ac_status); } && {
10934 test -z "$ac_c_werror_flag" ||
10935 test ! -s conftest.err
10936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 ac_hi=-1 ac_mid=-1
10938 while :; do
10939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* confdefs.h. */
10941_ACEOF
10942cat confdefs.h >>conftest.$ac_ext
10943cat >>conftest.$ac_ext <<_ACEOF
10944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010945$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010947int
10948main ()
10949{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010950static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010951test_array [0] = 0
10952
10953 ;
10954 return 0;
10955}
10956_ACEOF
10957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010958if { (ac_try="$ac_compile"
10959case "(($ac_try" in
10960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10961 *) ac_try_echo=$ac_try;;
10962esac
10963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010966 grep -v '^ *+' conftest.er1 >conftest.err
10967 rm -f conftest.er1
10968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 (exit $ac_status); } && {
10971 test -z "$ac_c_werror_flag" ||
10972 test ! -s conftest.err
10973 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 ac_lo=$ac_mid; break
10975else
10976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010977sed 's/^/| /' conftest.$ac_ext >&5
10978
Martin v. Löwiseba40652007-08-30 20:10:57 +000010979 ac_hi=`expr '(' $ac_mid ')' - 1`
10980 if test $ac_mid -le $ac_hi; then
10981 ac_lo= ac_hi=
10982 break
10983 fi
10984 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010986
10987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 done
10989else
10990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010991sed 's/^/| /' conftest.$ac_ext >&5
10992
Martin v. Löwiseba40652007-08-30 20:10:57 +000010993 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995
10996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998
10999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011000# Binary search between lo and hi bounds.
11001while test "x$ac_lo" != "x$ac_hi"; do
11002 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* confdefs.h. */
11005_ACEOF
11006cat confdefs.h >>conftest.$ac_ext
11007cat >>conftest.$ac_ext <<_ACEOF
11008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011015test_array [0] = 0
11016
11017 ;
11018 return 0;
11019}
11020_ACEOF
11021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022if { (ac_try="$ac_compile"
11023case "(($ac_try" in
11024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11025 *) ac_try_echo=$ac_try;;
11026esac
11027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011030 grep -v '^ *+' conftest.er1 >conftest.err
11031 rm -f conftest.er1
11032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034 (exit $ac_status); } && {
11035 test -z "$ac_c_werror_flag" ||
11036 test ! -s conftest.err
11037 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_hi=$ac_mid
11039else
11040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011041sed 's/^/| /' conftest.$ac_ext >&5
11042
Martin v. Löwiseba40652007-08-30 20:10:57 +000011043 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011045
11046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011047done
11048case $ac_lo in
11049?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050'') if test "$ac_cv_type_long_long" = yes; then
11051 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011052See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011053echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011054See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055 { (exit 77); exit 77; }; }
11056 else
11057 ac_cv_sizeof_long_long=0
11058 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011059esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011060else
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011067$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068 typedef long long ac__type_sizeof_;
11069static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11070static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011071#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011075{
Martin v. Löwis11437992002-04-12 09:54:03 +000011076
11077 FILE *f = fopen ("conftest.val", "w");
11078 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011079 return 1;
11080 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082 long int i = longval ();
11083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11084 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 fprintf (f, "%ld\n", i);
11086 }
11087 else
11088 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011089 unsigned long int i = ulongval ();
11090 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11091 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 fprintf (f, "%lu\n", i);
11093 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
11096 ;
11097 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011098}
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
11100rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101if { (ac_try="$ac_link"
11102case "(($ac_try" in
11103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11104 *) ac_try_echo=$ac_try;;
11105esac
11106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ac_status=$?
11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011111 { (case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
11115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11116 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ac_status=$?
11118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); }; }; then
11120 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011121else
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 echo "$as_me: program exited with status $ac_status" >&5
11123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011124sed 's/^/| /' conftest.$ac_ext >&5
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127if test "$ac_cv_type_long_long" = yes; then
11128 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011129See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011130echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011131See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132 { (exit 77); exit 77; }; }
11133 else
11134 ac_cv_sizeof_long_long=0
11135 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137rm -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 +000011138fi
11139rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11142echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11143
11144
11145
Martin v. Löwis11437992002-04-12 09:54:03 +000011146cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011151fi
11152
Martin v. Löwiseba40652007-08-30 20:10:57 +000011153{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11154echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011155have_c99_bool=no
11156cat >conftest.$ac_ext <<_ACEOF
11157/* confdefs.h. */
11158_ACEOF
11159cat confdefs.h >>conftest.$ac_ext
11160cat >>conftest.$ac_ext <<_ACEOF
11161/* end confdefs.h. */
11162
11163int
11164main ()
11165{
11166_Bool x; x = (_Bool)0;
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172if { (ac_try="$ac_compile"
11173case "(($ac_try" in
11174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11175 *) ac_try_echo=$ac_try;;
11176esac
11177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011179 ac_status=$?
11180 grep -v '^ *+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 (exit $ac_status); } && {
11185 test -z "$ac_c_werror_flag" ||
11186 test ! -s conftest.err
11187 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011188
11189
11190cat >>confdefs.h <<\_ACEOF
11191#define HAVE_C99_BOOL 1
11192_ACEOF
11193
11194 have_c99_bool=yes
11195
11196else
11197 echo "$as_me: failed program was:" >&5
11198sed 's/^/| /' conftest.$ac_ext >&5
11199
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202
11203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11204{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11205echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011206if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011207{ echo "$as_me:$LINENO: checking for _Bool" >&5
11208echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011209if test "${ac_cv_type__Bool+set}" = set; then
11210 echo $ECHO_N "(cached) $ECHO_C" >&6
11211else
11212 cat >conftest.$ac_ext <<_ACEOF
11213/* confdefs.h. */
11214_ACEOF
11215cat confdefs.h >>conftest.$ac_ext
11216cat >>conftest.$ac_ext <<_ACEOF
11217/* end confdefs.h. */
11218$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011220int
11221main ()
11222{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011224 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011225if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011226 return 0;
11227 ;
11228 return 0;
11229}
11230_ACEOF
11231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232if { (ac_try="$ac_compile"
11233case "(($ac_try" in
11234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11235 *) ac_try_echo=$ac_try;;
11236esac
11237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011239 ac_status=$?
11240 grep -v '^ *+' conftest.er1 >conftest.err
11241 rm -f conftest.er1
11242 cat conftest.err >&5
11243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244 (exit $ac_status); } && {
11245 test -z "$ac_c_werror_flag" ||
11246 test ! -s conftest.err
11247 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011248 ac_cv_type__Bool=yes
11249else
11250 echo "$as_me: failed program was:" >&5
11251sed 's/^/| /' conftest.$ac_ext >&5
11252
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011254fi
Brett Cannon19fab762007-06-02 03:02:29 +000011255
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11257fi
11258{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11259echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11260
11261# The cast to long int works around a bug in the HP C Compiler
11262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11264# This bug is HP SR number 8606223364.
11265{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11266echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011267if test "${ac_cv_sizeof__Bool+set}" = set; then
11268 echo $ECHO_N "(cached) $ECHO_C" >&6
11269else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011270 if test "$cross_compiling" = yes; then
11271 # Depending upon the size, compute the lo and hi bounds.
11272cat >conftest.$ac_ext <<_ACEOF
11273/* confdefs.h. */
11274_ACEOF
11275cat confdefs.h >>conftest.$ac_ext
11276cat >>conftest.$ac_ext <<_ACEOF
11277/* end confdefs.h. */
11278$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011280int
11281main ()
11282{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011284test_array [0] = 0
11285
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291if { (ac_try="$ac_compile"
11292case "(($ac_try" in
11293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11294 *) ac_try_echo=$ac_try;;
11295esac
11296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011298 ac_status=$?
11299 grep -v '^ *+' conftest.er1 >conftest.err
11300 rm -f conftest.er1
11301 cat conftest.err >&5
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303 (exit $ac_status); } && {
11304 test -z "$ac_c_werror_flag" ||
11305 test ! -s conftest.err
11306 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011307 ac_lo=0 ac_mid=0
11308 while :; do
11309 cat >conftest.$ac_ext <<_ACEOF
11310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
11315$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011317int
11318main ()
11319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011321test_array [0] = 0
11322
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328if { (ac_try="$ac_compile"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
11333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011335 ac_status=$?
11336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011344 ac_hi=$ac_mid; break
11345else
11346 echo "$as_me: failed program was:" >&5
11347sed 's/^/| /' conftest.$ac_ext >&5
11348
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349 ac_lo=`expr $ac_mid + 1`
11350 if test $ac_lo -le $ac_mid; then
11351 ac_lo= ac_hi=
11352 break
11353 fi
11354 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011356
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011358 done
11359else
11360 echo "$as_me: failed program was:" >&5
11361sed 's/^/| /' conftest.$ac_ext >&5
11362
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011364/* confdefs.h. */
11365_ACEOF
11366cat confdefs.h >>conftest.$ac_ext
11367cat >>conftest.$ac_ext <<_ACEOF
11368/* end confdefs.h. */
11369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011371int
11372main ()
11373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011375test_array [0] = 0
11376
11377 ;
11378 return 0;
11379}
11380_ACEOF
11381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382if { (ac_try="$ac_compile"
11383case "(($ac_try" in
11384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11385 *) ac_try_echo=$ac_try;;
11386esac
11387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011389 ac_status=$?
11390 grep -v '^ *+' conftest.er1 >conftest.err
11391 rm -f conftest.er1
11392 cat conftest.err >&5
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394 (exit $ac_status); } && {
11395 test -z "$ac_c_werror_flag" ||
11396 test ! -s conftest.err
11397 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011398 ac_hi=-1 ac_mid=-1
11399 while :; do
11400 cat >conftest.$ac_ext <<_ACEOF
11401/* confdefs.h. */
11402_ACEOF
11403cat confdefs.h >>conftest.$ac_ext
11404cat >>conftest.$ac_ext <<_ACEOF
11405/* end confdefs.h. */
11406$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011408int
11409main ()
11410{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011412test_array [0] = 0
11413
11414 ;
11415 return 0;
11416}
11417_ACEOF
11418rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011419if { (ac_try="$ac_compile"
11420case "(($ac_try" in
11421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11422 *) ac_try_echo=$ac_try;;
11423esac
11424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011426 ac_status=$?
11427 grep -v '^ *+' conftest.er1 >conftest.err
11428 rm -f conftest.er1
11429 cat conftest.err >&5
11430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431 (exit $ac_status); } && {
11432 test -z "$ac_c_werror_flag" ||
11433 test ! -s conftest.err
11434 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011435 ac_lo=$ac_mid; break
11436else
11437 echo "$as_me: failed program was:" >&5
11438sed 's/^/| /' conftest.$ac_ext >&5
11439
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440 ac_hi=`expr '(' $ac_mid ')' - 1`
11441 if test $ac_mid -le $ac_hi; then
11442 ac_lo= ac_hi=
11443 break
11444 fi
11445 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011449 done
11450else
11451 echo "$as_me: failed program was:" >&5
11452sed 's/^/| /' conftest.$ac_ext >&5
11453
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011456
11457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459
11460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011461# Binary search between lo and hi bounds.
11462while test "x$ac_lo" != "x$ac_hi"; do
11463 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11464 cat >conftest.$ac_ext <<_ACEOF
11465/* confdefs.h. */
11466_ACEOF
11467cat confdefs.h >>conftest.$ac_ext
11468cat >>conftest.$ac_ext <<_ACEOF
11469/* end confdefs.h. */
11470$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011472int
11473main ()
11474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011476test_array [0] = 0
11477
11478 ;
11479 return 0;
11480}
11481_ACEOF
11482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483if { (ac_try="$ac_compile"
11484case "(($ac_try" in
11485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11486 *) ac_try_echo=$ac_try;;
11487esac
11488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011490 ac_status=$?
11491 grep -v '^ *+' conftest.er1 >conftest.err
11492 rm -f conftest.er1
11493 cat conftest.err >&5
11494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495 (exit $ac_status); } && {
11496 test -z "$ac_c_werror_flag" ||
11497 test ! -s conftest.err
11498 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011499 ac_hi=$ac_mid
11500else
11501 echo "$as_me: failed program was:" >&5
11502sed 's/^/| /' conftest.$ac_ext >&5
11503
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011506
11507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011508done
11509case $ac_lo in
11510?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511'') if test "$ac_cv_type__Bool" = yes; then
11512 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011513See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011515See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516 { (exit 77); exit 77; }; }
11517 else
11518 ac_cv_sizeof__Bool=0
11519 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011520esac
11521else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011522 cat >conftest.$ac_ext <<_ACEOF
11523/* confdefs.h. */
11524_ACEOF
11525cat confdefs.h >>conftest.$ac_ext
11526cat >>conftest.$ac_ext <<_ACEOF
11527/* end confdefs.h. */
11528$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529 typedef _Bool ac__type_sizeof_;
11530static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11531static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011532#include <stdio.h>
11533#include <stdlib.h>
11534int
11535main ()
11536{
11537
11538 FILE *f = fopen ("conftest.val", "w");
11539 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540 return 1;
11541 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011542 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 long int i = longval ();
11544 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11545 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011546 fprintf (f, "%ld\n", i);
11547 }
11548 else
11549 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011550 unsigned long int i = ulongval ();
11551 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11552 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011553 fprintf (f, "%lu\n", i);
11554 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011556
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562if { (ac_try="$ac_link"
11563case "(($ac_try" in
11564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11565 *) ac_try_echo=$ac_try;;
11566esac
11567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11568 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011569 ac_status=$?
11570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 { (case "(($ac_try" in
11573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11574 *) ac_try_echo=$ac_try;;
11575esac
11576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11577 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011578 ac_status=$?
11579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11580 (exit $ac_status); }; }; then
11581 ac_cv_sizeof__Bool=`cat conftest.val`
11582else
11583 echo "$as_me: program exited with status $ac_status" >&5
11584echo "$as_me: failed program was:" >&5
11585sed 's/^/| /' conftest.$ac_ext >&5
11586
11587( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588if test "$ac_cv_type__Bool" = yes; then
11589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011590See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011592See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 { (exit 77); exit 77; }; }
11594 else
11595 ac_cv_sizeof__Bool=0
11596 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011599fi
11600rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11603echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11604
11605
11606
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011607cat >>confdefs.h <<_ACEOF
11608#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11609_ACEOF
11610
11611
11612fi
11613
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11615echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011616if test "${ac_cv_type_uintptr_t+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
11619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011625#ifdef HAVE_STDINT_H
11626 #include <stdint.h>
11627 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011628
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011630int
11631main ()
11632{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011634 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011635if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011636 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 ;
11638 return 0;
11639}
11640_ACEOF
11641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642if { (ac_try="$ac_compile"
11643case "(($ac_try" in
11644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11645 *) ac_try_echo=$ac_try;;
11646esac
11647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011650 grep -v '^ *+' conftest.er1 >conftest.err
11651 rm -f conftest.er1
11652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011654 (exit $ac_status); } && {
11655 test -z "$ac_c_werror_flag" ||
11656 test ! -s conftest.err
11657 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011658 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011659else
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011661sed 's/^/| /' conftest.$ac_ext >&5
11662
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665
11666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11669echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011670if test $ac_cv_type_uintptr_t = yes; then
11671
11672cat >>confdefs.h <<_ACEOF
11673#define HAVE_UINTPTR_T 1
11674_ACEOF
11675
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11677echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011678if test "${ac_cv_type_uintptr_t+set}" = set; then
11679 echo $ECHO_N "(cached) $ECHO_C" >&6
11680else
11681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* confdefs.h. */
11683_ACEOF
11684cat confdefs.h >>conftest.$ac_ext
11685cat >>conftest.$ac_ext <<_ACEOF
11686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011687$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011689int
11690main ()
11691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011694if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 return 0;
11696 ;
11697 return 0;
11698}
11699_ACEOF
11700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701if { (ac_try="$ac_compile"
11702case "(($ac_try" in
11703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11704 *) ac_try_echo=$ac_try;;
11705esac
11706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011709 grep -v '^ *+' conftest.er1 >conftest.err
11710 rm -f conftest.er1
11711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713 (exit $ac_status); } && {
11714 test -z "$ac_c_werror_flag" ||
11715 test ! -s conftest.err
11716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 ac_cv_type_uintptr_t=yes
11718else
11719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011720sed 's/^/| /' conftest.$ac_ext >&5
11721
Martin v. Löwiseba40652007-08-30 20:10:57 +000011722 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011723fi
Brett Cannon19fab762007-06-02 03:02:29 +000011724
Martin v. Löwiseba40652007-08-30 20:10:57 +000011725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11726fi
11727{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11728echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11729
11730# The cast to long int works around a bug in the HP C Compiler
11731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11733# This bug is HP SR number 8606223364.
11734{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11735echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011736if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11737 echo $ECHO_N "(cached) $ECHO_C" >&6
11738else
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 if test "$cross_compiling" = yes; then
11740 # Depending upon the size, compute the lo and hi bounds.
11741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* confdefs.h. */
11743_ACEOF
11744cat confdefs.h >>conftest.$ac_ext
11745cat >>conftest.$ac_ext <<_ACEOF
11746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011749int
11750main ()
11751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011753test_array [0] = 0
11754
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011760if { (ac_try="$ac_compile"
11761case "(($ac_try" in
11762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11763 *) ac_try_echo=$ac_try;;
11764esac
11765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011768 grep -v '^ *+' conftest.er1 >conftest.err
11769 rm -f conftest.er1
11770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011772 (exit $ac_status); } && {
11773 test -z "$ac_c_werror_flag" ||
11774 test ! -s conftest.err
11775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 ac_lo=0 ac_mid=0
11777 while :; do
11778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* confdefs.h. */
11780_ACEOF
11781cat confdefs.h >>conftest.$ac_ext
11782cat >>conftest.$ac_ext <<_ACEOF
11783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011784$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011786int
11787main ()
11788{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011790test_array [0] = 0
11791
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011797if { (ac_try="$ac_compile"
11798case "(($ac_try" in
11799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11800 *) ac_try_echo=$ac_try;;
11801esac
11802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011805 grep -v '^ *+' conftest.er1 >conftest.err
11806 rm -f conftest.er1
11807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011809 (exit $ac_status); } && {
11810 test -z "$ac_c_werror_flag" ||
11811 test ! -s conftest.err
11812 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 ac_hi=$ac_mid; break
11814else
11815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011816sed 's/^/| /' conftest.$ac_ext >&5
11817
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818 ac_lo=`expr $ac_mid + 1`
11819 if test $ac_lo -le $ac_mid; then
11820 ac_lo= ac_hi=
11821 break
11822 fi
11823 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 done
11828else
11829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011830sed 's/^/| /' conftest.$ac_ext >&5
11831
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011833/* confdefs.h. */
11834_ACEOF
11835cat confdefs.h >>conftest.$ac_ext
11836cat >>conftest.$ac_ext <<_ACEOF
11837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011838$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011839 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011840int
11841main ()
11842{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011844test_array [0] = 0
11845
11846 ;
11847 return 0;
11848}
11849_ACEOF
11850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011851if { (ac_try="$ac_compile"
11852case "(($ac_try" in
11853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11854 *) ac_try_echo=$ac_try;;
11855esac
11856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011859 grep -v '^ *+' conftest.er1 >conftest.err
11860 rm -f conftest.er1
11861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863 (exit $ac_status); } && {
11864 test -z "$ac_c_werror_flag" ||
11865 test ! -s conftest.err
11866 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 ac_hi=-1 ac_mid=-1
11868 while :; do
11869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011875$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011876 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011877int
11878main ()
11879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011881test_array [0] = 0
11882
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888if { (ac_try="$ac_compile"
11889case "(($ac_try" in
11890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11891 *) ac_try_echo=$ac_try;;
11892esac
11893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011896 grep -v '^ *+' conftest.er1 >conftest.err
11897 rm -f conftest.er1
11898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900 (exit $ac_status); } && {
11901 test -z "$ac_c_werror_flag" ||
11902 test ! -s conftest.err
11903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 ac_lo=$ac_mid; break
11905else
11906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011907sed 's/^/| /' conftest.$ac_ext >&5
11908
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909 ac_hi=`expr '(' $ac_mid ')' - 1`
11910 if test $ac_mid -le $ac_hi; then
11911 ac_lo= ac_hi=
11912 break
11913 fi
11914 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011916
11917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 done
11919else
11920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011921sed 's/^/| /' conftest.$ac_ext >&5
11922
Martin v. Löwiseba40652007-08-30 20:10:57 +000011923 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925
11926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011930# Binary search between lo and hi bounds.
11931while test "x$ac_lo" != "x$ac_hi"; do
11932 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011934/* confdefs.h. */
11935_ACEOF
11936cat confdefs.h >>conftest.$ac_ext
11937cat >>conftest.$ac_ext <<_ACEOF
11938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011939$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011941int
11942main ()
11943{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011945test_array [0] = 0
11946
11947 ;
11948 return 0;
11949}
11950_ACEOF
11951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011952if { (ac_try="$ac_compile"
11953case "(($ac_try" in
11954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11955 *) ac_try_echo=$ac_try;;
11956esac
11957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011960 grep -v '^ *+' conftest.er1 >conftest.err
11961 rm -f conftest.er1
11962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011964 (exit $ac_status); } && {
11965 test -z "$ac_c_werror_flag" ||
11966 test ! -s conftest.err
11967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 ac_hi=$ac_mid
11969else
11970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011971sed 's/^/| /' conftest.$ac_ext >&5
11972
Martin v. Löwiseba40652007-08-30 20:10:57 +000011973 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011975
11976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011977done
11978case $ac_lo in
11979?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011980'') if test "$ac_cv_type_uintptr_t" = yes; then
11981 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011982See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011984See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011985 { (exit 77); exit 77; }; }
11986 else
11987 ac_cv_sizeof_uintptr_t=0
11988 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011989esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011990else
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011992/* confdefs.h. */
11993_ACEOF
11994cat confdefs.h >>conftest.$ac_ext
11995cat >>conftest.$ac_ext <<_ACEOF
11996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998 typedef uintptr_t ac__type_sizeof_;
11999static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12000static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012001#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012002#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012003int
12004main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012005{
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
12007 FILE *f = fopen ("conftest.val", "w");
12008 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012009 return 1;
12010 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012012 long int i = longval ();
12013 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12014 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 fprintf (f, "%ld\n", i);
12016 }
12017 else
12018 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019 unsigned long int i = ulongval ();
12020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12021 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 fprintf (f, "%lu\n", i);
12023 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012024 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
12026 ;
12027 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012028}
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
12030rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031if { (ac_try="$ac_link"
12032case "(($ac_try" in
12033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12034 *) ac_try_echo=$ac_try;;
12035esac
12036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ac_status=$?
12039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041 { (case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
12045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); }; }; then
12050 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 echo "$as_me: program exited with status $ac_status" >&5
12053echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012054sed 's/^/| /' conftest.$ac_ext >&5
12055
Martin v. Löwis11437992002-04-12 09:54:03 +000012056( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012057if test "$ac_cv_type_uintptr_t" = yes; then
12058 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012059See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012061See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062 { (exit 77); exit 77; }; }
12063 else
12064 ac_cv_sizeof_uintptr_t=0
12065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012067rm -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 +000012068fi
12069rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012071{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12072echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12073
12074
12075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012077#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012078_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012079
Michael W. Hudson54241132001-12-07 15:38:26 +000012080
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012081fi
12082
Martin v. Löwisebe26702006-10-02 14:55:51 +000012083
12084
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012085# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012086{ echo "$as_me:$LINENO: checking size of off_t" >&5
12087echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012088if test "${ac_cv_sizeof_off_t+set}" = set; then
12089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012090else
12091 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012092 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012093else
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012100#include <stdio.h>
12101#include <sys/types.h>
12102main()
12103{
12104 FILE *f=fopen("conftestval", "w");
12105 if (!f) exit(1);
12106 fprintf(f, "%d\n", sizeof(off_t));
12107 exit(0);
12108}
Martin v. Löwis11437992002-04-12 09:54:03 +000012109_ACEOF
12110rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012111if { (ac_try="$ac_link"
12112case "(($ac_try" in
12113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12114 *) ac_try_echo=$ac_try;;
12115esac
12116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12117 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 ac_status=$?
12119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 { (case "(($ac_try" in
12122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12123 *) ac_try_echo=$ac_try;;
12124esac
12125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12126 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ac_status=$?
12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012130 ac_cv_sizeof_off_t=`cat conftestval`
12131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 echo "$as_me: program exited with status $ac_status" >&5
12133echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012134sed 's/^/| /' conftest.$ac_ext >&5
12135
Martin v. Löwis11437992002-04-12 09:54:03 +000012136( exit $ac_status )
12137ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012139rm -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 +000012140fi
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142
12143
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012144fi
12145
Martin v. Löwiseba40652007-08-30 20:10:57 +000012146{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12147echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012148
12149cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012150#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012151_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012152
Michael W. Hudson54241132001-12-07 15:38:26 +000012153
Martin v. Löwiseba40652007-08-30 20:10:57 +000012154{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12155echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012156if test "$have_long_long" = yes -a \
12157 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12158 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160cat >>confdefs.h <<\_ACEOF
12161#define HAVE_LARGEFILE_SUPPORT 1
12162_ACEOF
12163
Martin v. Löwiseba40652007-08-30 20:10:57 +000012164 { echo "$as_me:$LINENO: result: yes" >&5
12165echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012166else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167 { echo "$as_me:$LINENO: result: no" >&5
12168echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012169fi
12170
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012171# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172{ echo "$as_me:$LINENO: checking size of time_t" >&5
12173echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012174if test "${ac_cv_sizeof_time_t+set}" = set; then
12175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012176else
12177 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012178 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012179else
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012181/* confdefs.h. */
12182_ACEOF
12183cat confdefs.h >>conftest.$ac_ext
12184cat >>conftest.$ac_ext <<_ACEOF
12185/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012186#include <stdio.h>
12187#include <time.h>
12188main()
12189{
12190 FILE *f=fopen("conftestval", "w");
12191 if (!f) exit(1);
12192 fprintf(f, "%d\n", sizeof(time_t));
12193 exit(0);
12194}
Martin v. Löwis11437992002-04-12 09:54:03 +000012195_ACEOF
12196rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012197if { (ac_try="$ac_link"
12198case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
12202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12203 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_status=$?
12205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207 { (case "(($ac_try" in
12208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12209 *) ac_try_echo=$ac_try;;
12210esac
12211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12212 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 ac_status=$?
12214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12215 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012216 ac_cv_sizeof_time_t=`cat conftestval`
12217else
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 echo "$as_me: program exited with status $ac_status" >&5
12219echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012220sed 's/^/| /' conftest.$ac_ext >&5
12221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222( exit $ac_status )
12223ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012225rm -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 +000012226fi
12227
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228
12229
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012230fi
12231
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12233echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
12235cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012236#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012237_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012238
Michael W. Hudson54241132001-12-07 15:38:26 +000012239
12240
Trent Mick635f6fb2000-08-23 21:33:05 +000012241# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012242ac_save_cc="$CC"
12243if test "$ac_cv_kpthread" = "yes"
12244then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012245elif test "$ac_cv_kthread" = "yes"
12246then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012247elif test "$ac_cv_pthread" = "yes"
12248then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12251echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012252have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* confdefs.h. */
12255_ACEOF
12256cat confdefs.h >>conftest.$ac_ext
12257cat >>conftest.$ac_ext <<_ACEOF
12258/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012259#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Guido van Rossum12580492000-09-24 16:47:19 +000012263pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
12268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269if { (ac_try="$ac_compile"
12270case "(($ac_try" in
12271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12272 *) ac_try_echo=$ac_try;;
12273esac
12274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012277 grep -v '^ *+' conftest.er1 >conftest.err
12278 rm -f conftest.er1
12279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281 (exit $ac_status); } && {
12282 test -z "$ac_c_werror_flag" ||
12283 test ! -s conftest.err
12284 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012285 have_pthread_t=yes
12286else
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012288sed 's/^/| /' conftest.$ac_ext >&5
12289
Martin v. Löwiseba40652007-08-30 20:10:57 +000012290
Trent Mick635f6fb2000-08-23 21:33:05 +000012291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292
12293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12294{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12295echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012296if test "$have_pthread_t" = yes ; then
12297 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12299echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12301 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012302else
12303 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012304 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012305else
Martin v. Löwis11437992002-04-12 09:54:03 +000012306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012312#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012313#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012314 main()
12315 {
12316 FILE *f=fopen("conftestval", "w");
12317 if (!f) exit(1);
12318 fprintf(f, "%d\n", sizeof(pthread_t));
12319 exit(0);
12320 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012321_ACEOF
12322rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012323if { (ac_try="$ac_link"
12324case "(($ac_try" in
12325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12326 *) ac_try_echo=$ac_try;;
12327esac
12328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12329 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 ac_status=$?
12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 { (case "(($ac_try" in
12334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12335 *) ac_try_echo=$ac_try;;
12336esac
12337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12338 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 ac_status=$?
12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12341 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012342 ac_cv_sizeof_pthread_t=`cat conftestval`
12343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 echo "$as_me: program exited with status $ac_status" >&5
12345echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012346sed 's/^/| /' conftest.$ac_ext >&5
12347
Martin v. Löwis11437992002-04-12 09:54:03 +000012348( exit $ac_status )
12349ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012351rm -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 +000012352fi
12353
Martin v. Löwiseba40652007-08-30 20:10:57 +000012354
12355
Trent Mick635f6fb2000-08-23 21:33:05 +000012356fi
12357
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12359echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012360
12361cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012362#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012363_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012364
12365fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012366CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012367
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12369echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12370# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012371if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 enableval=$enable_toolbox_glue;
12373fi
Jack Jansene578a632001-08-15 01:27:14 +000012374
12375
12376if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012377then
Jack Jansene578a632001-08-15 01:27:14 +000012378 case $ac_sys_system/$ac_sys_release in
12379 Darwin/*)
12380 enable_toolbox_glue="yes";;
12381 *)
12382 enable_toolbox_glue="no";;
12383 esac
12384fi
12385case "$enable_toolbox_glue" in
12386yes)
Jack Jansene578a632001-08-15 01:27:14 +000012387 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012388 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
12390cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012391#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012393
12394 ;;
12395*)
Jack Jansene578a632001-08-15 01:27:14 +000012396 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012397 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012398 ;;
12399esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12401echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012402
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012403
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012404
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012405case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012406 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012407 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12408 ;;
12409 Darwin/*)
12410 OTHER_LIBTOOL_OPT=""
12411 ;;
12412esac
12413
12414
12415case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012416 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012417 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12418 if test "${enable_universalsdk}"; then
12419 :
12420 else
12421 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12422 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012423 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012424 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012425 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012426 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12427 if test ${gcc_version} '<' 4.0
12428 then
12429 LIBTOOL_CRUFT="-lcc_dynamic"
12430 else
12431 LIBTOOL_CRUFT=""
12432 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012433 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012434 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012436esac
12437
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12439echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012440if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012441then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012442 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012444 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446cat >>confdefs.h <<\_ACEOF
12447#define WITH_NEXT_FRAMEWORK 1
12448_ACEOF
12449
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450 { echo "$as_me:$LINENO: result: yes" >&5
12451echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012452else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453 { echo "$as_me:$LINENO: result: no" >&5
12454echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012455fi
12456
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457{ echo "$as_me:$LINENO: checking for dyld" >&5
12458echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012459case $ac_sys_system/$ac_sys_release in
12460 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462cat >>confdefs.h <<\_ACEOF
12463#define WITH_DYLD 1
12464_ACEOF
12465
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12467echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012468 ;;
12469 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012470 { echo "$as_me:$LINENO: result: no" >&5
12471echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012472 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012473esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012474
Guido van Rossum0a516c91994-09-12 10:58:40 +000012475# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012476
Michael W. Hudson54241132001-12-07 15:38:26 +000012477
12478
12479
12480
Guido van Rossum0a516c91994-09-12 10:58:40 +000012481# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012482# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483{ echo "$as_me:$LINENO: checking SO" >&5
12484echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012485if test -z "$SO"
12486then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012488 hp*|HP*)
12489 case `uname -m` in
12490 ia64) SO=.so;;
12491 *) SO=.sl;;
12492 esac
12493 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012494 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012495 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012496 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012497else
12498 # this might also be a termcap variable, see #610332
12499 echo
12500 echo '====================================================================='
12501 echo '+ +'
12502 echo '+ WARNING: You have set SO in your environment. +'
12503 echo '+ Do you really mean to change the extension for shared libraries? +'
12504 echo '+ Continuing in 10 seconds to let you to ponder. +'
12505 echo '+ +'
12506 echo '====================================================================='
12507 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509{ echo "$as_me:$LINENO: result: $SO" >&5
12510echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012511
12512cat >>confdefs.h <<_ACEOF
12513#define SHLIB_EXT "$SO"
12514_ACEOF
12515
Guido van Rossum0a516c91994-09-12 10:58:40 +000012516# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012517# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012518# (Shared libraries in this instance are shared modules to be loaded into
12519# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12521echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012522if test -z "$LDSHARED"
12523then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012525 AIX*)
12526 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012527 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012528 ;;
12529 BeOS*)
12530 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012531 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012532 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012533 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012534 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012536 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012537 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012538 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012539 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012540 hp*|HP*)
12541 if test "$GCC" = "yes"
12542 then LDSHARED='$(CC) -shared'
12543 else LDSHARED='ld -b';
12544 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012545 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012546 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012547 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12548 if test "$enable_framework" ; then
12549 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012550 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12551 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012552 else
12553 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012554 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012555 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012556 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012557 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12558 if test "$enable_framework" ; then
12559 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012560 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12561 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012562 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012563 # No framework, use the Python app as bundle-loader
12564 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012565 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012566 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012567 Darwin/*)
12568 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12569 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012570 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012571 if test ${cur_target} '>' 10.2; then
12572 cur_target=10.3
12573 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012574 if test "${UNIVERSAL_ARCHS}" = "all"; then
12575 # Ensure that the default platform for a 4-way
12576 # universal build is OSX 10.5, that's the first
12577 # OS release where 4-way builds make sense.
12578 cur_target='10.5'
12579 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012580 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012581
12582 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12583 # environment with a value that is the same as what we'll use
12584 # in the Makefile to ensure that we'll get the same compiler
12585 # environment during configure and build time.
12586 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12587 export MACOSX_DEPLOYMENT_TARGET
12588
Ronald Oussoren988117f2006-04-29 11:31:35 +000012589 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012590 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012591 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012592 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012593 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000012594 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012595 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12596 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012597 else
12598 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12599 if test "$enable_framework" ; then
12600 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012601 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12602 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012603 else
12604 # No framework, use the Python app as bundle-loader
12605 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12606 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12607 fi
12608 fi
12609 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012610 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012611 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012612 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012614 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012615 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012616 else
12617 LDSHARED="ld -Bshareable ${LDFLAGS}"
12618 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012619 OpenBSD*)
12620 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12621 then
12622 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12623 else
12624 case `uname -r` in
12625 [01].* | 2.[0-7] | 2.[0-7].*)
12626 LDSHARED="ld -Bshareable ${LDFLAGS}"
12627 ;;
12628 *)
12629 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12630 ;;
12631 esac
12632 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012633 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012634 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012635 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012636 then LDSHARED='$(CC) -shared'
12637 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012638 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012639 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012640 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012641 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012642 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012643 *) LDSHARED="ld";;
12644 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012646{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12647echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012648BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012649# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012650# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12652echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012653if test -z "$CCSHARED"
12654then
Guido van Rossum07397971997-04-29 21:49:50 +000012655 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012656 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012657 then CCSHARED="-fPIC";
12658 elif test `uname -p` = sparc;
12659 then CCSHARED="-xcode=pic32";
12660 else CCSHARED="-Kpic";
12661 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012662 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012663 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012664 else CCSHARED="+z";
12665 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012666 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012667 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012668 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012669 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012670 if test "$GCC" = "yes"
12671 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012672 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012673 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012674 SCO_SV*)
12675 if test "$GCC" = "yes"
12676 then CCSHARED="-fPIC"
12677 else CCSHARED="-Kpic -belf"
12678 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012679 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012680 IRIX*/6*) case $CC in
12681 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012682 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012683 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012684 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012685 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012687{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12688echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012689# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012690# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012691{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12692echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012693if test -z "$LINKFORSHARED"
12694then
Guido van Rossum07397971997-04-29 21:49:50 +000012695 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012696 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012697 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012698 LINKFORSHARED="-Wl,-E -Wl,+s";;
12699# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012700 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012701 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012702 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012704 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12705 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012706 # not used by the core itself but which needs to be in the core so
12707 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012708 # -prebind is no longer used, because it actually seems to give a
12709 # slowdown in stead of a speedup, maybe due to the large number of
12710 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012711
12712 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012713 if test "$enable_framework"
12714 then
Jack Jansenda49e192005-01-07 13:08:22 +000012715 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012716 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012717 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012718 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012719 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012720 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012721 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012722 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12723 then
12724 LINKFORSHARED="-Wl,--export-dynamic"
12725 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012726 SunOS/5*) case $CC in
12727 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012728 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012729 then
12730 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012731 fi;;
12732 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012733 CYGWIN*)
12734 if test $enable_shared = "no"
12735 then
12736 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12737 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012738 QNX*)
12739 # -Wl,-E causes the symbols to be added to the dynamic
12740 # symbol table so that they can be found when a module
12741 # is loaded. -N 2048K causes the stack size to be set
12742 # to 2048 kilobytes so that the stack doesn't overflow
12743 # when running test_compile.py.
12744 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012745 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012747{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12748echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012749
Michael W. Hudson54241132001-12-07 15:38:26 +000012750
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012751
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12753echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012754if test ! "$LIBRARY" = "$LDLIBRARY"
12755then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012756 case $ac_sys_system in
12757 CYGWIN*)
12758 # Cygwin needs CCSHARED when building extension DLLs
12759 # but not when building the interpreter DLL.
12760 CFLAGSFORSHARED='';;
12761 *)
12762 CFLAGSFORSHARED='$(CCSHARED)'
12763 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12766echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012767
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012768# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12769# library (with --enable-shared).
12770# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012771# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12772# if it is not required, since it creates a dependency of the shared library
12773# to LIBS. This, in turn, means that applications linking the shared libpython
12774# don't need to link LIBS explicitly. The default should be only changed
12775# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012776
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12778echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012779case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012780 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012781 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012782esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12784echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012785
12786
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12790echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012791if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012795LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* confdefs.h. */
12798_ACEOF
12799cat confdefs.h >>conftest.$ac_ext
12800cat >>conftest.$ac_ext <<_ACEOF
12801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Martin v. Löwiseba40652007-08-30 20:10:57 +000012803/* Override any GCC internal prototype to avoid an error.
12804 Use char because int might match the return type of a GCC
12805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806#ifdef __cplusplus
12807extern "C"
12808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012809char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012813return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ;
12815 return 0;
12816}
12817_ACEOF
12818rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819if { (ac_try="$ac_link"
12820case "(($ac_try" in
12821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12822 *) ac_try_echo=$ac_try;;
12823esac
12824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12825 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012827 grep -v '^ *+' conftest.er1 >conftest.err
12828 rm -f conftest.er1
12829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831 (exit $ac_status); } && {
12832 test -z "$ac_c_werror_flag" ||
12833 test ! -s conftest.err
12834 } && test -s conftest$ac_exeext &&
12835 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837else
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012839sed 's/^/| /' conftest.$ac_ext >&5
12840
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12849echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012850if test $ac_cv_lib_dl_dlopen = yes; then
12851 cat >>confdefs.h <<_ACEOF
12852#define HAVE_LIBDL 1
12853_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012854
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012855 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857fi
12858 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12861echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012862if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864else
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012866LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* confdefs.h. */
12869_ACEOF
12870cat confdefs.h >>conftest.$ac_ext
12871cat >>conftest.$ac_ext <<_ACEOF
12872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874/* Override any GCC internal prototype to avoid an error.
12875 Use char because int might match the return type of a GCC
12876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877#ifdef __cplusplus
12878extern "C"
12879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012880char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012881int
12882main ()
12883{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890if { (ac_try="$ac_link"
12891case "(($ac_try" in
12892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12893 *) ac_try_echo=$ac_try;;
12894esac
12895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12896 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902 (exit $ac_status); } && {
12903 test -z "$ac_c_werror_flag" ||
12904 test ! -s conftest.err
12905 } && test -s conftest$ac_exeext &&
12906 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012910sed 's/^/| /' conftest.$ac_ext >&5
12911
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914
12915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012917LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012919{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12920echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012921if test $ac_cv_lib_dld_shl_load = yes; then
12922 cat >>confdefs.h <<_ACEOF
12923#define HAVE_LIBDLD 1
12924_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012925
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012926 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928fi
12929 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012930
12931# only check for sem_ini if thread support is requested
12932if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12934echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012935if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012937else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012938 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012940/* confdefs.h. */
12941_ACEOF
12942cat confdefs.h >>conftest.$ac_ext
12943cat >>conftest.$ac_ext <<_ACEOF
12944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946/* Override any GCC internal prototype to avoid an error.
12947 Use char because int might match the return type of a GCC
12948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012949#ifdef __cplusplus
12950extern "C"
12951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012952char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012953int
12954main ()
12955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ;
12958 return 0;
12959}
12960_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961for ac_lib in '' pthread rt posix4; do
12962 if test -z "$ac_lib"; then
12963 ac_res="none required"
12964 else
12965 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012966 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967 fi
12968 rm -f conftest.$ac_objext conftest$ac_exeext
12969if { (ac_try="$ac_link"
12970case "(($ac_try" in
12971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12972 *) ac_try_echo=$ac_try;;
12973esac
12974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12975 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012976 ac_status=$?
12977 grep -v '^ *+' conftest.er1 >conftest.err
12978 rm -f conftest.er1
12979 cat conftest.err >&5
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981 (exit $ac_status); } && {
12982 test -z "$ac_c_werror_flag" ||
12983 test ! -s conftest.err
12984 } && test -s conftest$ac_exeext &&
12985 $as_test_x conftest$ac_exeext; then
12986 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012987else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012988 echo "$as_me: failed program was:" >&5
12989sed 's/^/| /' conftest.$ac_ext >&5
12990
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991
Brett Cannon19fab762007-06-02 03:02:29 +000012992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993
12994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12995 conftest$ac_exeext
12996 if test "${ac_cv_search_sem_init+set}" = set; then
12997 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999done
13000if test "${ac_cv_search_sem_init+set}" = set; then
13001 :
13002else
13003 ac_cv_search_sem_init=no
13004fi
13005rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013006LIBS=$ac_func_search_save_LIBS
13007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13009echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13010ac_res=$ac_cv_search_sem_init
13011if test "$ac_res" != no; then
13012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013013
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013014fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013015 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013016 # posix4 on Solaris 2.6
13017 # pthread (first!) on Linux
13018fi
13019
Martin v. Löwis19d17342003-06-14 21:03:05 +000013020# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13022echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013023if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13024 echo $ECHO_N "(cached) $ECHO_C" >&6
13025else
13026 ac_check_lib_save_LIBS=$LIBS
13027LIBS="-lintl $LIBS"
13028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013029/* confdefs.h. */
13030_ACEOF
13031cat confdefs.h >>conftest.$ac_ext
13032cat >>conftest.$ac_ext <<_ACEOF
13033/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013034
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035/* Override any GCC internal prototype to avoid an error.
13036 Use char because int might match the return type of a GCC
13037 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013038#ifdef __cplusplus
13039extern "C"
13040#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013041char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013042int
13043main ()
13044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013045return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013046 ;
13047 return 0;
13048}
13049_ACEOF
13050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013051if { (ac_try="$ac_link"
13052case "(($ac_try" in
13053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13054 *) ac_try_echo=$ac_try;;
13055esac
13056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013059 grep -v '^ *+' conftest.er1 >conftest.err
13060 rm -f conftest.er1
13061 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013063 (exit $ac_status); } && {
13064 test -z "$ac_c_werror_flag" ||
13065 test ! -s conftest.err
13066 } && test -s conftest$ac_exeext &&
13067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013068 ac_cv_lib_intl_textdomain=yes
13069else
13070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013071sed 's/^/| /' conftest.$ac_ext >&5
13072
Martin v. Löwiseba40652007-08-30 20:10:57 +000013073 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075
13076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013078LIBS=$ac_check_lib_save_LIBS
13079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013080{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13081echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013082if test $ac_cv_lib_intl_textdomain = yes; then
13083
13084cat >>confdefs.h <<\_ACEOF
13085#define WITH_LIBINTL 1
13086_ACEOF
13087
13088fi
13089
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013090
13091# checks for system dependent C++ extensions support
13092case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013093 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13094echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013096/* confdefs.h. */
13097_ACEOF
13098cat confdefs.h >>conftest.$ac_ext
13099cat >>conftest.$ac_ext <<_ACEOF
13100/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013101#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013105loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ;
13107 return 0;
13108}
13109_ACEOF
13110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111if { (ac_try="$ac_link"
13112case "(($ac_try" in
13113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13114 *) ac_try_echo=$ac_try;;
13115esac
13116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013119 grep -v '^ *+' conftest.er1 >conftest.err
13120 rm -f conftest.er1
13121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013123 (exit $ac_status); } && {
13124 test -z "$ac_c_werror_flag" ||
13125 test ! -s conftest.err
13126 } && test -s conftest$ac_exeext &&
13127 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129cat >>confdefs.h <<\_ACEOF
13130#define AIX_GENUINE_CPLUSPLUS 1
13131_ACEOF
13132
Martin v. Löwiseba40652007-08-30 20:10:57 +000013133 { echo "$as_me:$LINENO: result: yes" >&5
13134echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013135else
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013137sed 's/^/| /' conftest.$ac_ext >&5
13138
Martin v. Löwiseba40652007-08-30 20:10:57 +000013139 { echo "$as_me:$LINENO: result: no" >&5
13140echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013142
13143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013144 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013145 *) ;;
13146esac
13147
Guido van Rossum70c7f481998-03-26 18:44:10 +000013148# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013149# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13151echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013152if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013154else
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013156LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* confdefs.h. */
13159_ACEOF
13160cat confdefs.h >>conftest.$ac_ext
13161cat >>conftest.$ac_ext <<_ACEOF
13162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
Martin v. Löwiseba40652007-08-30 20:10:57 +000013164/* Override any GCC internal prototype to avoid an error.
13165 Use char because int might match the return type of a GCC
13166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013167#ifdef __cplusplus
13168extern "C"
13169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013170char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013171int
13172main ()
13173{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 ;
13176 return 0;
13177}
13178_ACEOF
13179rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013180if { (ac_try="$ac_link"
13181case "(($ac_try" in
13182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13183 *) ac_try_echo=$ac_try;;
13184esac
13185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013188 grep -v '^ *+' conftest.er1 >conftest.err
13189 rm -f conftest.er1
13190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013192 (exit $ac_status); } && {
13193 test -z "$ac_c_werror_flag" ||
13194 test ! -s conftest.err
13195 } && test -s conftest$ac_exeext &&
13196 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013197 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013198else
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013200sed 's/^/| /' conftest.$ac_ext >&5
13201
Martin v. Löwiseba40652007-08-30 20:10:57 +000013202 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013204
13205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013207LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013209{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13210echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013211if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013212 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013213fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013214 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13216echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013217if test "${ac_cv_lib_socket_socket+set}" = set; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219else
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013221LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* confdefs.h. */
13224_ACEOF
13225cat confdefs.h >>conftest.$ac_ext
13226cat >>conftest.$ac_ext <<_ACEOF
13227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013228
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229/* Override any GCC internal prototype to avoid an error.
13230 Use char because int might match the return type of a GCC
13231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013232#ifdef __cplusplus
13233extern "C"
13234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013235char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013239return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 ;
13241 return 0;
13242}
13243_ACEOF
13244rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013245if { (ac_try="$ac_link"
13246case "(($ac_try" in
13247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13248 *) ac_try_echo=$ac_try;;
13249esac
13250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13251 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013253 grep -v '^ *+' conftest.er1 >conftest.err
13254 rm -f conftest.er1
13255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257 (exit $ac_status); } && {
13258 test -z "$ac_c_werror_flag" ||
13259 test ! -s conftest.err
13260 } && test -s conftest$ac_exeext &&
13261 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013263else
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013265sed 's/^/| /' conftest.$ac_ext >&5
13266
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269
13270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013272LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013274{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13275echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013276if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013277 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013278fi
13279 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013280
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013281case "$ac_sys_system" in
13282BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013283{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13284echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013285if test "${ac_cv_lib_net_socket+set}" = set; then
13286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013287else
Martin v. Löwis11437992002-04-12 09:54:03 +000013288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013289LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013291/* confdefs.h. */
13292_ACEOF
13293cat confdefs.h >>conftest.$ac_ext
13294cat >>conftest.$ac_ext <<_ACEOF
13295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297/* Override any GCC internal prototype to avoid an error.
13298 Use char because int might match the return type of a GCC
13299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013300#ifdef __cplusplus
13301extern "C"
13302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013303char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013304int
13305main ()
13306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ;
13309 return 0;
13310}
13311_ACEOF
13312rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013313if { (ac_try="$ac_link"
13314case "(($ac_try" in
13315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13316 *) ac_try_echo=$ac_try;;
13317esac
13318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13319 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013321 grep -v '^ *+' conftest.er1 >conftest.err
13322 rm -f conftest.er1
13323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013325 (exit $ac_status); } && {
13326 test -z "$ac_c_werror_flag" ||
13327 test ! -s conftest.err
13328 } && test -s conftest$ac_exeext &&
13329 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013331else
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013333sed 's/^/| /' conftest.$ac_ext >&5
13334
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013337
13338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013340LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13343echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013344if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013345 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013346fi
13347 # BeOS
13348;;
13349esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013350
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13352echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Martin v. Löwiseba40652007-08-30 20:10:57 +000013354# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013355if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013356 withval=$with_libs;
13357{ echo "$as_me:$LINENO: result: $withval" >&5
13358echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013359LIBS="$withval $LIBS"
13360
13361else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013362 { echo "$as_me:$LINENO: result: no" >&5
13363echo "${ECHO_T}no" >&6; }
13364fi
13365
Guido van Rossum7f43da71994-08-01 12:15:30 +000013366
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013367# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013368{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13369echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013370
Martin v. Löwiseba40652007-08-30 20:10:57 +000013371# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013372if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373 withval=$with_system_ffi;
13374fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013375
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013376
Martin v. Löwiseba40652007-08-30 20:10:57 +000013377{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13378echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013379
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013380# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013381
13382
Martin v. Löwiseba40652007-08-30 20:10:57 +000013383{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13384echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013387if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013388 withval=$with_signal_module;
13389fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013390
13391
13392if test -z "$with_signal_module"
13393then with_signal_module="yes"
13394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013395{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13396echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013397
13398if test "${with_signal_module}" = "yes"; then
13399 USE_SIGNAL_MODULE=""
13400 SIGNAL_OBJS=""
13401else
13402 USE_SIGNAL_MODULE="#"
13403 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13404fi
13405
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013406# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013407
Barry Warsawc0d24d82000-06-29 16:12:00 +000013408USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013409
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13411echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Guido van Rossumec2f0731997-01-22 20:54:01 +000013413
Martin v. Löwiseba40652007-08-30 20:10:57 +000013414# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013415if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416 withval=$with_dec_threads;
13417{ echo "$as_me:$LINENO: result: $withval" >&5
13418echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013419LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013420if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013421 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013422fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013423else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013424 { echo "$as_me:$LINENO: result: no" >&5
13425echo "${ECHO_T}no" >&6; }
13426fi
13427
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
13429# Templates for things AC_DEFINEd more than once.
13430# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013431
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
13434
13435
13436
13437
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13439echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Martin v. Löwiseba40652007-08-30 20:10:57 +000013441# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013442if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443 withval=$with_threads;
13444fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013445
13446
Barry Warsawc0d24d82000-06-29 16:12:00 +000013447# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Martin v. Löwiseba40652007-08-30 20:10:57 +000013449# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013450if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451 withval=$with_thread; with_threads=$with_thread
13452fi
13453
Barry Warsawc0d24d82000-06-29 16:12:00 +000013454
13455if test -z "$with_threads"
13456then with_threads="yes"
13457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013458{ echo "$as_me:$LINENO: result: $with_threads" >&5
13459echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013460
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013461
Barry Warsawc0d24d82000-06-29 16:12:00 +000013462if test "$with_threads" = "no"
13463then
13464 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013465elif test "$ac_cv_pthread_is_default" = yes
13466then
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013468#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013469_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013470
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013471 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013473#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013475
13476 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013478elif test "$ac_cv_kpthread" = "yes"
13479then
13480 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013481 if test "$ac_cv_cxx_thread" = "yes"; then
13482 CXX="$CXX -Kpthread"
13483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013485#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013486_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013488 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013489 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013490elif test "$ac_cv_kthread" = "yes"
13491then
13492 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013493 if test "$ac_cv_cxx_thread" = "yes"; then
13494 CXX="$CXX -Kthread"
13495 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013496 cat >>confdefs.h <<\_ACEOF
13497#define WITH_THREAD 1
13498_ACEOF
13499
13500 posix_threads=yes
13501 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013502elif test "$ac_cv_pthread" = "yes"
13503then
13504 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013505 if test "$ac_cv_cxx_thread" = "yes"; then
13506 CXX="$CXX -pthread"
13507 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013508 cat >>confdefs.h <<\_ACEOF
13509#define WITH_THREAD 1
13510_ACEOF
13511
13512 posix_threads=yes
13513 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013514else
13515 if test ! -z "$with_threads" -a -d "$with_threads"
13516 then LDFLAGS="$LDFLAGS -L$with_threads"
13517 fi
13518 if test ! -z "$withval" -a -d "$withval"
13519 then LDFLAGS="$LDFLAGS -L$withval"
13520 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013521
13522 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013523 # define _POSIX_THREADS in unistd.h. Some apparently don't
13524 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13526echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* confdefs.h. */
13529_ACEOF
13530cat confdefs.h >>conftest.$ac_ext
13531cat >>conftest.$ac_ext <<_ACEOF
13532/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013533
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013534#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013535#ifdef _POSIX_THREADS
13536yes
13537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
13539_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013540if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013541 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013542 unistd_defines_pthreads=yes
13543else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013544 unistd_defines_pthreads=no
13545fi
13546rm -f conftest*
13547
Martin v. Löwiseba40652007-08-30 20:10:57 +000013548 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13549echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013552#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013553_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013556 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13557echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013558if test "${ac_cv_header_cthreads_h+set}" = set; then
13559 echo $ECHO_N "(cached) $ECHO_C" >&6
13560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13562echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13566echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013568/* confdefs.h. */
13569_ACEOF
13570cat confdefs.h >>conftest.$ac_ext
13571cat >>conftest.$ac_ext <<_ACEOF
13572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013573$ac_includes_default
13574#include <cthreads.h>
13575_ACEOF
13576rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013577if { (ac_try="$ac_compile"
13578case "(($ac_try" in
13579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13580 *) ac_try_echo=$ac_try;;
13581esac
13582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013585 grep -v '^ *+' conftest.er1 >conftest.err
13586 rm -f conftest.er1
13587 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013589 (exit $ac_status); } && {
13590 test -z "$ac_c_werror_flag" ||
13591 test ! -s conftest.err
13592 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ac_header_compiler=yes
13594else
13595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013596sed 's/^/| /' conftest.$ac_ext >&5
13597
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600
13601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13602{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13603echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
13605# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013606{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13607echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013609/* confdefs.h. */
13610_ACEOF
13611cat confdefs.h >>conftest.$ac_ext
13612cat >>conftest.$ac_ext <<_ACEOF
13613/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013614#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013615_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616if { (ac_try="$ac_cpp conftest.$ac_ext"
13617case "(($ac_try" in
13618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13619 *) ac_try_echo=$ac_try;;
13620esac
13621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13622 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013624 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 rm -f conftest.er1
13626 cat conftest.err >&5
13627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013628 (exit $ac_status); } >/dev/null && {
13629 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13630 test ! -s conftest.err
13631 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 ac_header_preproc=yes
13633else
13634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013635sed 's/^/| /' conftest.$ac_ext >&5
13636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13642echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
13644# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13646 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013647 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13648echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013649 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13650echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13651 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013652 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013653 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013654 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13655echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013656 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13657echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13658 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13659echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13660 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13661echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013662 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13663echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013664 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13665echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013666 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013667## ------------------------------------------------ ##
13668## Report this to http://www.python.org/python-bugs ##
13669## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013670_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013671 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013672 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013673esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013674{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13675echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013676if test "${ac_cv_header_cthreads_h+set}" = set; then
13677 echo $ECHO_N "(cached) $ECHO_C" >&6
13678else
13679 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13682echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
13684fi
13685if test $ac_cv_header_cthreads_h = yes; then
13686 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013687#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013688_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013691#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013692_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
13695cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013696#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698
13699 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013700 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013701else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013704 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13705echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013706if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13707 echo $ECHO_N "(cached) $ECHO_C" >&6
13708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13710echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013711else
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013713{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13714echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* confdefs.h. */
13717_ACEOF
13718cat confdefs.h >>conftest.$ac_ext
13719cat >>conftest.$ac_ext <<_ACEOF
13720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013721$ac_includes_default
13722#include <mach/cthreads.h>
13723_ACEOF
13724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013725if { (ac_try="$ac_compile"
13726case "(($ac_try" in
13727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13728 *) ac_try_echo=$ac_try;;
13729esac
13730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013733 grep -v '^ *+' conftest.er1 >conftest.err
13734 rm -f conftest.er1
13735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013737 (exit $ac_status); } && {
13738 test -z "$ac_c_werror_flag" ||
13739 test ! -s conftest.err
13740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ac_header_compiler=yes
13742else
13743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013744sed 's/^/| /' conftest.$ac_ext >&5
13745
Martin v. Löwiseba40652007-08-30 20:10:57 +000013746 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013748
13749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13750{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13751echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
13753# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013754{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13755echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013757/* confdefs.h. */
13758_ACEOF
13759cat confdefs.h >>conftest.$ac_ext
13760cat >>conftest.$ac_ext <<_ACEOF
13761/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013762#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013763_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764if { (ac_try="$ac_cpp conftest.$ac_ext"
13765case "(($ac_try" in
13766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13767 *) ac_try_echo=$ac_try;;
13768esac
13769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013772 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 rm -f conftest.er1
13774 cat conftest.err >&5
13775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013776 (exit $ac_status); } >/dev/null && {
13777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13778 test ! -s conftest.err
13779 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_header_preproc=yes
13781else
13782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013783sed 's/^/| /' conftest.$ac_ext >&5
13784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13790echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
13792# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013793case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13794 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13796echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013797 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13798echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13799 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013801 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013802 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13803echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013804 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13805echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13806 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13807echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13808 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13809echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013810 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13811echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013812 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13813echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013814 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013815## ------------------------------------------------ ##
13816## Report this to http://www.python.org/python-bugs ##
13817## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013818_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013820 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013821esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013822{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13823echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013824if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13825 echo $ECHO_N "(cached) $ECHO_C" >&6
13826else
13827 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13830echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013831
13832fi
13833if test $ac_cv_header_mach_cthreads_h = yes; then
13834 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013835#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013836_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013839#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013840_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
13843cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013844#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013845_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013846
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013847 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013848else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013849
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13851echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Martin v. Löwiseba40652007-08-30 20:10:57 +000013853# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013854if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013855 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13856echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013857 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013858#define WITH_THREAD 1
13859_ACEOF
13860
13861
13862cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013863#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013864_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013865
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013866 LIBS="-lpth $LIBS"
13867 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013868else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013869 { echo "$as_me:$LINENO: result: no" >&5
13870echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013871
13872 # Just looking for pthread_create in libpthread is not enough:
13873 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13874 # So we really have to include pthread.h, and then link.
13875 _libs=$LIBS
13876 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013877 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13878echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013880/* confdefs.h. */
13881_ACEOF
13882cat confdefs.h >>conftest.$ac_ext
13883cat >>conftest.$ac_ext <<_ACEOF
13884/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013885#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013886
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013887void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013888int
13889main ()
13890{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013891
13892pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898if { (ac_try="$ac_link"
13899case "(($ac_try" in
13900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13901 *) ac_try_echo=$ac_try;;
13902esac
13903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13904 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013906 grep -v '^ *+' conftest.er1 >conftest.err
13907 rm -f conftest.er1
13908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 (exit $ac_status); } && {
13911 test -z "$ac_c_werror_flag" ||
13912 test ! -s conftest.err
13913 } && test -s conftest$ac_exeext &&
13914 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916 { echo "$as_me:$LINENO: result: yes" >&5
13917echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013919#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013920_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013921
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013922 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013923 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013924else
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013926sed 's/^/| /' conftest.$ac_ext >&5
13927
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013929 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13931echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013932if test "${ac_cv_func_pthread_detach+set}" = set; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013934else
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* confdefs.h. */
13937_ACEOF
13938cat confdefs.h >>conftest.$ac_ext
13939cat >>conftest.$ac_ext <<_ACEOF
13940/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013941/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13942 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13943#define pthread_detach innocuous_pthread_detach
13944
Guido van Rossumad678af1998-10-02 14:42:15 +000013945/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013946 which can conflict with char pthread_detach (); below.
13947 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013948 <limits.h> exists even on freestanding compilers. */
13949
13950#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013951# include <limits.h>
13952#else
13953# include <assert.h>
13954#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013955
13956#undef pthread_detach
13957
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958/* Override any GCC internal prototype to avoid an error.
13959 Use char because int might match the return type of a GCC
13960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013961#ifdef __cplusplus
13962extern "C"
13963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013964char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013965/* The GNU C library defines this for functions which it implements
13966 to always fail with ENOSYS. Some functions are actually named
13967 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013969choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013970#endif
13971
Skip Montanaro6dead952003-09-25 14:50:04 +000013972int
13973main ()
13974{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ;
13977 return 0;
13978}
13979_ACEOF
13980rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005
14006rm -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
Guido van Rossumad678af1998-10-02 14:42:15 +000014008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14010echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014011if test $ac_cv_func_pthread_detach = yes; then
14012 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014013#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014014_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014015
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014016 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014017 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014018else
Guido van Rossumad678af1998-10-02 14:42:15 +000014019
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014020 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14022echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014023if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14024 echo $ECHO_N "(cached) $ECHO_C" >&6
14025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14027echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014028else
14029 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14031echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014033/* confdefs.h. */
14034_ACEOF
14035cat confdefs.h >>conftest.$ac_ext
14036cat >>conftest.$ac_ext <<_ACEOF
14037/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014038$ac_includes_default
14039#include <atheos/threads.h>
14040_ACEOF
14041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014042if { (ac_try="$ac_compile"
14043case "(($ac_try" in
14044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14045 *) ac_try_echo=$ac_try;;
14046esac
14047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014050 grep -v '^ *+' conftest.er1 >conftest.err
14051 rm -f conftest.er1
14052 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014054 (exit $ac_status); } && {
14055 test -z "$ac_c_werror_flag" ||
14056 test ! -s conftest.err
14057 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014058 ac_header_compiler=yes
14059else
14060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014061sed 's/^/| /' conftest.$ac_ext >&5
14062
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014065
14066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14067{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14068echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014069
14070# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14072echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014074/* confdefs.h. */
14075_ACEOF
14076cat confdefs.h >>conftest.$ac_ext
14077cat >>conftest.$ac_ext <<_ACEOF
14078/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014079#include <atheos/threads.h>
14080_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014081if { (ac_try="$ac_cpp conftest.$ac_ext"
14082case "(($ac_try" in
14083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14084 *) ac_try_echo=$ac_try;;
14085esac
14086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14087 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014088 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014089 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014090 rm -f conftest.er1
14091 cat conftest.err >&5
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093 (exit $ac_status); } >/dev/null && {
14094 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14095 test ! -s conftest.err
14096 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014097 ac_header_preproc=yes
14098else
14099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014100sed 's/^/| /' conftest.$ac_ext >&5
14101
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014102 ac_header_preproc=no
14103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014104
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014105rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14107echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014108
14109# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14111 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014112 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14113echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014114 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14115echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14116 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014117 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014118 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014119 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14120echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014121 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14122echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14123 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14124echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14125 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14126echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014127 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14128echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014129 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14130echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014132## ------------------------------------------------ ##
14133## Report this to http://www.python.org/python-bugs ##
14134## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014135_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014137 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014138esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014139{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14140echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014141if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14142 echo $ECHO_N "(cached) $ECHO_C" >&6
14143else
14144 ac_cv_header_atheos_threads_h=$ac_header_preproc
14145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14147echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014148
14149fi
14150if test $ac_cv_header_atheos_threads_h = yes; then
14151 cat >>confdefs.h <<\_ACEOF
14152#define WITH_THREAD 1
14153_ACEOF
14154
14155
14156cat >>confdefs.h <<\_ACEOF
14157#define ATHEOS_THREADS 1
14158_ACEOF
14159
14160 THREADOBJ="Python/thread.o"
14161else
14162
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014164 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14165echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014166if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
14168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14170echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014173{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14174echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014181$ac_includes_default
14182#include <kernel/OS.h>
14183_ACEOF
14184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014185if { (ac_try="$ac_compile"
14186case "(($ac_try" in
14187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14188 *) ac_try_echo=$ac_try;;
14189esac
14190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014193 grep -v '^ *+' conftest.er1 >conftest.err
14194 rm -f conftest.er1
14195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197 (exit $ac_status); } && {
14198 test -z "$ac_c_werror_flag" ||
14199 test ! -s conftest.err
14200 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ac_header_compiler=yes
14202else
14203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014204sed 's/^/| /' conftest.$ac_ext >&5
14205
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208
14209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14211echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014212
14213# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14215echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014217/* confdefs.h. */
14218_ACEOF
14219cat confdefs.h >>conftest.$ac_ext
14220cat >>conftest.$ac_ext <<_ACEOF
14221/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014222#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014223_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224if { (ac_try="$ac_cpp conftest.$ac_ext"
14225case "(($ac_try" in
14226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14227 *) ac_try_echo=$ac_try;;
14228esac
14229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14230 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014232 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 rm -f conftest.er1
14234 cat conftest.err >&5
14235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236 (exit $ac_status); } >/dev/null && {
14237 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14238 test ! -s conftest.err
14239 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 ac_header_preproc=yes
14241else
14242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014243sed 's/^/| /' conftest.$ac_ext >&5
14244
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014247
Martin v. Löwis11437992002-04-12 09:54:03 +000014248rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014249{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14250echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014251
Martin v. Löwis11437992002-04-12 09:54:03 +000014252# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014253case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14254 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14256echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014257 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14258echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14259 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014260 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014261 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014262 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14263echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014264 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14265echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14266 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14267echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14268 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14269echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014270 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14271echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014272 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14273echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014275## ------------------------------------------------ ##
14276## Report this to http://www.python.org/python-bugs ##
14277## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014278_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014279 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014280 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014281esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14283echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014284if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14285 echo $ECHO_N "(cached) $ECHO_C" >&6
14286else
14287 ac_cv_header_kernel_OS_h=$ac_header_preproc
14288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014289{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14290echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
14292fi
14293if test $ac_cv_header_kernel_OS_h = yes; then
14294 cat >>confdefs.h <<\_ACEOF
14295#define WITH_THREAD 1
14296_ACEOF
14297
14298
14299cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014300#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014301_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014302
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014303 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014304else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014305
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14307echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014310else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014312LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014313cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014314/* confdefs.h. */
14315_ACEOF
14316cat confdefs.h >>conftest.$ac_ext
14317cat >>conftest.$ac_ext <<_ACEOF
14318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320/* Override any GCC internal prototype to avoid an error.
14321 Use char because int might match the return type of a GCC
14322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014323#ifdef __cplusplus
14324extern "C"
14325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014326char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014327int
14328main ()
14329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 ;
14332 return 0;
14333}
14334_ACEOF
14335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014336if { (ac_try="$ac_link"
14337case "(($ac_try" in
14338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14339 *) ac_try_echo=$ac_try;;
14340esac
14341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014344 grep -v '^ *+' conftest.er1 >conftest.err
14345 rm -f conftest.er1
14346 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014348 (exit $ac_status); } && {
14349 test -z "$ac_c_werror_flag" ||
14350 test ! -s conftest.err
14351 } && test -s conftest$ac_exeext &&
14352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014356sed 's/^/| /' conftest.$ac_ext >&5
14357
Martin v. Löwiseba40652007-08-30 20:10:57 +000014358 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360
14361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014363LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14366echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014367if test $ac_cv_lib_pthreads_pthread_create = yes; then
14368 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014369#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014370_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014372 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014373 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014374 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014375else
Greg Steinadf63d62000-07-05 10:38:09 +000014376
Martin v. Löwiseba40652007-08-30 20:10:57 +000014377 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14378echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014379if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14380 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014381else
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014383LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014384cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014385/* confdefs.h. */
14386_ACEOF
14387cat confdefs.h >>conftest.$ac_ext
14388cat >>conftest.$ac_ext <<_ACEOF
14389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391/* Override any GCC internal prototype to avoid an error.
14392 Use char because int might match the return type of a GCC
14393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014394#ifdef __cplusplus
14395extern "C"
14396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014397char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014398int
14399main ()
14400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 ;
14403 return 0;
14404}
14405_ACEOF
14406rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407if { (ac_try="$ac_link"
14408case "(($ac_try" in
14409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14410 *) ac_try_echo=$ac_try;;
14411esac
14412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14413 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014415 grep -v '^ *+' conftest.er1 >conftest.err
14416 rm -f conftest.er1
14417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419 (exit $ac_status); } && {
14420 test -z "$ac_c_werror_flag" ||
14421 test ! -s conftest.err
14422 } && test -s conftest$ac_exeext &&
14423 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014425else
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014427sed 's/^/| /' conftest.$ac_ext >&5
14428
Martin v. Löwiseba40652007-08-30 20:10:57 +000014429 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014431
14432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014434LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14437echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438if test $ac_cv_lib_c_r_pthread_create = yes; then
14439 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014440#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014441_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014443 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014444 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014445 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014446else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014447
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14449echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014450if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14451 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014452else
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014454LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014456/* confdefs.h. */
14457_ACEOF
14458cat confdefs.h >>conftest.$ac_ext
14459cat >>conftest.$ac_ext <<_ACEOF
14460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
Martin v. Löwiseba40652007-08-30 20:10:57 +000014462/* Override any GCC internal prototype to avoid an error.
14463 Use char because int might match the return type of a GCC
14464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014465#ifdef __cplusplus
14466extern "C"
14467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014468char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014469int
14470main ()
14471{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ;
14474 return 0;
14475}
14476_ACEOF
14477rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478if { (ac_try="$ac_link"
14479case "(($ac_try" in
14480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14481 *) ac_try_echo=$ac_try;;
14482esac
14483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14484 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014486 grep -v '^ *+' conftest.er1 >conftest.err
14487 rm -f conftest.er1
14488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014490 (exit $ac_status); } && {
14491 test -z "$ac_c_werror_flag" ||
14492 test ! -s conftest.err
14493 } && test -s conftest$ac_exeext &&
14494 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014496else
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014498sed 's/^/| /' conftest.$ac_ext >&5
14499
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014502
14503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14508echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014509if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14510 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014511#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014512_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014513
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014514 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014515 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014516 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014517else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014518
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14520echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014521if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014523else
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014525LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* confdefs.h. */
14528_ACEOF
14529cat confdefs.h >>conftest.$ac_ext
14530cat >>conftest.$ac_ext <<_ACEOF
14531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Martin v. Löwiseba40652007-08-30 20:10:57 +000014533/* Override any GCC internal prototype to avoid an error.
14534 Use char because int might match the return type of a GCC
14535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014536#ifdef __cplusplus
14537extern "C"
14538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014539char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014540int
14541main ()
14542{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 ;
14545 return 0;
14546}
14547_ACEOF
14548rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549if { (ac_try="$ac_link"
14550case "(($ac_try" in
14551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14552 *) ac_try_echo=$ac_try;;
14553esac
14554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14555 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014557 grep -v '^ *+' conftest.er1 >conftest.err
14558 rm -f conftest.er1
14559 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014561 (exit $ac_status); } && {
14562 test -z "$ac_c_werror_flag" ||
14563 test ! -s conftest.err
14564 } && test -s conftest$ac_exeext &&
14565 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014567else
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014569sed 's/^/| /' conftest.$ac_ext >&5
14570
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573
14574rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014576LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14579echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014580if test $ac_cv_lib_cma_pthread_create = yes; then
14581 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014582#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014583_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014586 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014587 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014588else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014589
Martin v. Löwis130fb172001-07-19 11:00:41 +000014590 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014591fi
14592
Guido van Rossum627b2d71993-12-24 10:39:16 +000014593
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014594fi
14595
Guido van Rossum0be3e491997-05-22 20:33:33 +000014596fi
14597
Guido van Rossum49545951997-12-02 19:28:29 +000014598fi
14599
Guido van Rossumb93a8621998-05-07 13:27:32 +000014600fi
14601
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014602
Michael W. Hudson54241132001-12-07 15:38:26 +000014603fi
14604
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014605
14606fi
14607
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609
14610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612fi
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614fi
14615
14616
14617fi
14618
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014619
Michael W. Hudson54241132001-12-07 15:38:26 +000014620
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14622echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014623if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625else
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014627LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014629/* confdefs.h. */
14630_ACEOF
14631cat confdefs.h >>conftest.$ac_ext
14632cat >>conftest.$ac_ext <<_ACEOF
14633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635/* Override any GCC internal prototype to avoid an error.
14636 Use char because int might match the return type of a GCC
14637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014638#ifdef __cplusplus
14639extern "C"
14640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014641char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014642int
14643main ()
14644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014645return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ;
14647 return 0;
14648}
14649_ACEOF
14650rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651if { (ac_try="$ac_link"
14652case "(($ac_try" in
14653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14654 *) ac_try_echo=$ac_try;;
14655esac
14656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14657 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014659 grep -v '^ *+' conftest.er1 >conftest.err
14660 rm -f conftest.er1
14661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663 (exit $ac_status); } && {
14664 test -z "$ac_c_werror_flag" ||
14665 test ! -s conftest.err
14666 } && test -s conftest$ac_exeext &&
14667 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014669else
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014671sed 's/^/| /' conftest.$ac_ext >&5
14672
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675
14676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014680{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14681echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014682if test $ac_cv_lib_mpc_usconfig = yes; then
14683 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014684#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014686
Martin v. Löwis130fb172001-07-19 11:00:41 +000014687 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014688 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014689 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014690fi
14691
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014692
Neal Norwitza978ab02002-11-02 16:58:05 +000014693 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014694 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14695echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014696if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014700LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* confdefs.h. */
14703_ACEOF
14704cat confdefs.h >>conftest.$ac_ext
14705cat >>conftest.$ac_ext <<_ACEOF
14706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014707
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708/* Override any GCC internal prototype to avoid an error.
14709 Use char because int might match the return type of a GCC
14710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014711#ifdef __cplusplus
14712extern "C"
14713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014714char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014715int
14716main ()
14717{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 ;
14720 return 0;
14721}
14722_ACEOF
14723rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724if { (ac_try="$ac_link"
14725case "(($ac_try" in
14726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14727 *) ac_try_echo=$ac_try;;
14728esac
14729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14730 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014732 grep -v '^ *+' conftest.er1 >conftest.err
14733 rm -f conftest.er1
14734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014736 (exit $ac_status); } && {
14737 test -z "$ac_c_werror_flag" ||
14738 test ! -s conftest.err
14739 } && test -s conftest$ac_exeext &&
14740 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014742else
Martin v. Löwis11437992002-04-12 09:54:03 +000014743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014744sed 's/^/| /' conftest.$ac_ext >&5
14745
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014748
14749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014753{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14754echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014755if test $ac_cv_lib_thread_thr_create = yes; then
14756 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014757#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014759
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014760 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014761 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014762 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014763fi
14764
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014765 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014766
Martin v. Löwis130fb172001-07-19 11:00:41 +000014767 if test "$USE_THREAD_MODULE" != "#"
14768 then
14769 # If the above checks didn't disable threads, (at least) OSF1
14770 # needs this '-threads' argument during linking.
14771 case $ac_sys_system in
14772 OSF1) LDLAST=-threads;;
14773 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014774 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014775fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014777if test "$posix_threads" = "yes"; then
14778 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014779
14780cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014781#define _POSIX_THREADS 1
14782_ACEOF
14783
14784 fi
14785
14786 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14787 case $ac_sys_system/$ac_sys_release in
14788 SunOS/5.6)
14789cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014790#define HAVE_PTHREAD_DESTRUCTOR 1
14791_ACEOF
14792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014793 ;;
14794 SunOS/5.8)
14795cat >>confdefs.h <<\_ACEOF
14796#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14797_ACEOF
14798
14799 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014800 AIX/5)
14801cat >>confdefs.h <<\_ACEOF
14802#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14803_ACEOF
14804
14805 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014806 esac
14807
Martin v. Löwiseba40652007-08-30 20:10:57 +000014808 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14809echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014810 if test "${ac_cv_pthread_system_supported+set}" = set; then
14811 echo $ECHO_N "(cached) $ECHO_C" >&6
14812else
14813 if test "$cross_compiling" = yes; then
14814 ac_cv_pthread_system_supported=no
14815else
14816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014817/* confdefs.h. */
14818_ACEOF
14819cat confdefs.h >>conftest.$ac_ext
14820cat >>conftest.$ac_ext <<_ACEOF
14821/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014822#include <pthread.h>
14823 void *foo(void *parm) {
14824 return NULL;
14825 }
14826 main() {
14827 pthread_attr_t attr;
14828 pthread_t id;
14829 if (pthread_attr_init(&attr)) exit(-1);
14830 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14831 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14832 exit(0);
14833 }
14834_ACEOF
14835rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014836if { (ac_try="$ac_link"
14837case "(($ac_try" in
14838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14839 *) ac_try_echo=$ac_try;;
14840esac
14841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14842 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014843 ac_status=$?
14844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014846 { (case "(($ac_try" in
14847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14848 *) ac_try_echo=$ac_try;;
14849esac
14850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14851 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); }; }; then
14855 ac_cv_pthread_system_supported=yes
14856else
14857 echo "$as_me: program exited with status $ac_status" >&5
14858echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014859sed 's/^/| /' conftest.$ac_ext >&5
14860
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014861( exit $ac_status )
14862ac_cv_pthread_system_supported=no
14863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864rm -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 +000014865fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014866
Martin v. Löwiseba40652007-08-30 20:10:57 +000014867
14868
Guido van Rossum627b2d71993-12-24 10:39:16 +000014869fi
14870
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14872echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014873 if test "$ac_cv_pthread_system_supported" = "yes"; then
14874
14875cat >>confdefs.h <<\_ACEOF
14876#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14877_ACEOF
14878
14879 fi
14880
14881for ac_func in pthread_sigmask
14882do
14883as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14885echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14886if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014887 echo $ECHO_N "(cached) $ECHO_C" >&6
14888else
14889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014890/* confdefs.h. */
14891_ACEOF
14892cat confdefs.h >>conftest.$ac_ext
14893cat >>conftest.$ac_ext <<_ACEOF
14894/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014895/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14897#define $ac_func innocuous_$ac_func
14898
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014899/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014900 which can conflict with char $ac_func (); below.
14901 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014902 <limits.h> exists even on freestanding compilers. */
14903
14904#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014905# include <limits.h>
14906#else
14907# include <assert.h>
14908#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014909
14910#undef $ac_func
14911
Martin v. Löwiseba40652007-08-30 20:10:57 +000014912/* Override any GCC internal prototype to avoid an error.
14913 Use char because int might match the return type of a GCC
14914 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014915#ifdef __cplusplus
14916extern "C"
14917#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014918char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014919/* The GNU C library defines this for functions which it implements
14920 to always fail with ENOSYS. Some functions are actually named
14921 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014922#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014923choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014924#endif
14925
Skip Montanaro6dead952003-09-25 14:50:04 +000014926int
14927main ()
14928{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014930 ;
14931 return 0;
14932}
14933_ACEOF
14934rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935if { (ac_try="$ac_link"
14936case "(($ac_try" in
14937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14938 *) ac_try_echo=$ac_try;;
14939esac
14940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14941 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943 grep -v '^ *+' conftest.er1 >conftest.err
14944 rm -f conftest.er1
14945 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947 (exit $ac_status); } && {
14948 test -z "$ac_c_werror_flag" ||
14949 test ! -s conftest.err
14950 } && test -s conftest$ac_exeext &&
14951 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014952 eval "$as_ac_var=yes"
14953else
14954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014955sed 's/^/| /' conftest.$ac_ext >&5
14956
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959
14960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014963ac_res=`eval echo '${'$as_ac_var'}'`
14964 { echo "$as_me:$LINENO: result: $ac_res" >&5
14965echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014966if test `eval echo '${'$as_ac_var'}'` = yes; then
14967 cat >>confdefs.h <<_ACEOF
14968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14969_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014970 case $ac_sys_system in
14971 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014972
Jason Tishlerfac083d2003-07-22 15:20:49 +000014973cat >>confdefs.h <<\_ACEOF
14974#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14975_ACEOF
14976
14977 ;;
14978 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014979fi
14980done
14981
14982fi
14983
14984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014985# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
14987
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14989echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14990# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014991if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014993 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994 { echo "$as_me:$LINENO: result: no" >&5
14995echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014996 ipv6=no
14997 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014998 *) { echo "$as_me:$LINENO: result: yes" >&5
14999echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015001#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015003
15004 ipv6=yes
15005 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015007else
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015009 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010 { echo "$as_me:$LINENO: result: no" >&5
15011echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015012 ipv6=no
15013
15014else
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015016/* confdefs.h. */
15017_ACEOF
15018cat confdefs.h >>conftest.$ac_ext
15019cat >>conftest.$ac_ext <<_ACEOF
15020/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015021 /* AF_INET6 available check */
15022#include <sys/types.h>
15023#include <sys/socket.h>
15024main()
15025{
15026 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15027 exit(1);
15028 else
15029 exit(0);
15030}
15031
Martin v. Löwis11437992002-04-12 09:54:03 +000015032_ACEOF
15033rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034if { (ac_try="$ac_link"
15035case "(($ac_try" in
15036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15037 *) ac_try_echo=$ac_try;;
15038esac
15039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15040 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ac_status=$?
15042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044 { (case "(($ac_try" in
15045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15046 *) ac_try_echo=$ac_try;;
15047esac
15048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15049 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_status=$?
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015053 { echo "$as_me:$LINENO: result: yes" >&5
15054echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015055 ipv6=yes
15056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 echo "$as_me: program exited with status $ac_status" >&5
15058echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015059sed 's/^/| /' conftest.$ac_ext >&5
15060
Martin v. Löwis11437992002-04-12 09:54:03 +000015061( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062{ echo "$as_me:$LINENO: result: no" >&5
15063echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064 ipv6=no
15065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066rm -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 +000015067fi
15068
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069
15070
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015071if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15073echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015075/* confdefs.h. */
15076_ACEOF
15077cat confdefs.h >>conftest.$ac_ext
15078cat >>conftest.$ac_ext <<_ACEOF
15079/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015080#include <sys/types.h>
15081#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015082int
15083main ()
15084{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015085struct sockaddr_in6 x;
15086x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ;
15088 return 0;
15089}
15090_ACEOF
15091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092if { (ac_try="$ac_compile"
15093case "(($ac_try" in
15094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15095 *) ac_try_echo=$ac_try;;
15096esac
15097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015100 grep -v '^ *+' conftest.er1 >conftest.err
15101 rm -f conftest.er1
15102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104 (exit $ac_status); } && {
15105 test -z "$ac_c_werror_flag" ||
15106 test ! -s conftest.err
15107 } && test -s conftest.$ac_objext; then
15108 { echo "$as_me:$LINENO: result: yes" >&5
15109echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015110 ipv6=yes
15111else
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015113sed 's/^/| /' conftest.$ac_ext >&5
15114
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115 { echo "$as_me:$LINENO: result: no" >&5
15116echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015117 ipv6=no
15118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119
15120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015121fi
15122
15123if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015125#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015126_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015127
15128fi
15129
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130fi
15131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015132
15133ipv6type=unknown
15134ipv6lib=none
15135ipv6trylibc=no
15136
15137if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15139echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015140 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15141 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142 case $i in
15143 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015145/* confdefs.h. */
15146_ACEOF
15147cat confdefs.h >>conftest.$ac_ext
15148cat >>conftest.$ac_ext <<_ACEOF
15149/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015150
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015151#include <netinet/in.h>
15152#ifdef IPV6_INRIA_VERSION
15153yes
15154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015155_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015157 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015158 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015159fi
15160rm -f conftest*
15161
15162 ;;
15163 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015165/* confdefs.h. */
15166_ACEOF
15167cat confdefs.h >>conftest.$ac_ext
15168cat >>conftest.$ac_ext <<_ACEOF
15169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015171#include <netinet/in.h>
15172#ifdef __KAME__
15173yes
15174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015177 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015178 ipv6type=$i;
15179 ipv6lib=inet6
15180 ipv6libdir=/usr/local/v6/lib
15181 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015182fi
15183rm -f conftest*
15184
15185 ;;
15186 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* confdefs.h. */
15189_ACEOF
15190cat confdefs.h >>conftest.$ac_ext
15191cat >>conftest.$ac_ext <<_ACEOF
15192/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015194#include <features.h>
15195#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15196yes
15197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015200 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015201 ipv6type=$i;
15202 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015203fi
15204rm -f conftest*
15205
15206 ;;
15207 linux-inet6)
15208 if test -d /usr/inet6; then
15209 ipv6type=$i
15210 ipv6lib=inet6
15211 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015212 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015213 fi
15214 ;;
15215 solaris)
15216 if test -f /etc/netconfig; then
15217 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15218 ipv6type=$i
15219 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015220 fi
15221 fi
15222 ;;
15223 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* confdefs.h. */
15226_ACEOF
15227cat confdefs.h >>conftest.$ac_ext
15228cat >>conftest.$ac_ext <<_ACEOF
15229/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015230
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015231#include <sys/param.h>
15232#ifdef _TOSHIBA_INET6
15233yes
15234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015235_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015237 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015238 ipv6type=$i;
15239 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015240 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015241fi
15242rm -f conftest*
15243
15244 ;;
15245 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* confdefs.h. */
15248_ACEOF
15249cat confdefs.h >>conftest.$ac_ext
15250cat >>conftest.$ac_ext <<_ACEOF
15251/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015252
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015253#include </usr/local/v6/include/sys/v6config.h>
15254#ifdef __V6D__
15255yes
15256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015257_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015259 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015260 ipv6type=$i;
15261 ipv6lib=v6;
15262 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015263 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015264fi
15265rm -f conftest*
15266
15267 ;;
15268 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015270/* confdefs.h. */
15271_ACEOF
15272cat confdefs.h >>conftest.$ac_ext
15273cat >>conftest.$ac_ext <<_ACEOF
15274/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015276#include <sys/param.h>
15277#ifdef _ZETA_MINAMI_INET6
15278yes
15279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015280_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015282 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015283 ipv6type=$i;
15284 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015285 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015286fi
15287rm -f conftest*
15288
15289 ;;
15290 esac
15291 if test "$ipv6type" != "unknown"; then
15292 break
15293 fi
15294 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15296echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015297fi
15298
15299if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15300 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15301 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15302 echo "using lib$ipv6lib"
15303 else
15304 if test $ipv6trylibc = "yes"; then
15305 echo "using libc"
15306 else
15307 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15308 echo "You need to fetch lib$ipv6lib.a from appropriate"
15309 echo 'ipv6 kit and compile beforehand.'
15310 exit 1
15311 fi
15312 fi
15313fi
15314
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015315{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15316echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15317cat >conftest.$ac_ext <<_ACEOF
15318/* confdefs.h. */
15319_ACEOF
15320cat confdefs.h >>conftest.$ac_ext
15321cat >>conftest.$ac_ext <<_ACEOF
15322/* end confdefs.h. */
15323#include <Carbon/Carbon.h>
15324int
15325main ()
15326{
15327FSIORefNum fRef = 0
15328 ;
15329 return 0;
15330}
15331_ACEOF
15332rm -f conftest.$ac_objext
15333if { (ac_try="$ac_compile"
15334case "(($ac_try" in
15335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15336 *) ac_try_echo=$ac_try;;
15337esac
15338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15339 (eval "$ac_compile") 2>conftest.er1
15340 ac_status=$?
15341 grep -v '^ *+' conftest.er1 >conftest.err
15342 rm -f conftest.er1
15343 cat conftest.err >&5
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); } && {
15346 test -z "$ac_c_werror_flag" ||
15347 test ! -s conftest.err
15348 } && test -s conftest.$ac_objext; then
15349
15350cat >>confdefs.h <<\_ACEOF
15351#define HAVE_OSX105_SDK 1
15352_ACEOF
15353
15354 { echo "$as_me:$LINENO: result: yes" >&5
15355echo "${ECHO_T}yes" >&6; }
15356else
15357 echo "$as_me: failed program was:" >&5
15358sed 's/^/| /' conftest.$ac_ext >&5
15359
15360 { echo "$as_me:$LINENO: result: no" >&5
15361echo "${ECHO_T}no" >&6; }
15362
15363fi
15364
15365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15366
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015367# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15369echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015370
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015372if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373 withval=$with_doc_strings;
15374fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015375
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015376
15377if test -z "$with_doc_strings"
15378then with_doc_strings="yes"
15379fi
15380if test "$with_doc_strings" != "no"
15381then
15382
15383cat >>confdefs.h <<\_ACEOF
15384#define WITH_DOC_STRINGS 1
15385_ACEOF
15386
15387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15389echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015390
Neil Schemenauera35c6882001-02-27 04:45:05 +000015391# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15393echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015394
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015396if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015398if test "$withval" != no
15399then
15400
15401cat >>confdefs.h <<\_ACEOF
15402#define WITH_TSC 1
15403_ACEOF
15404
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405 { echo "$as_me:$LINENO: result: yes" >&5
15406echo "${ECHO_T}yes" >&6; }
15407else { echo "$as_me:$LINENO: result: no" >&5
15408echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015409fi
15410else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015411 { echo "$as_me:$LINENO: result: no" >&5
15412echo "${ECHO_T}no" >&6; }
15413fi
15414
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015415
15416# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15418echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015421if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422 withval=$with_pymalloc;
15423fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015424
Neil Schemenauera35c6882001-02-27 04:45:05 +000015425
Neil Schemenauer16c22972002-03-22 15:34:49 +000015426if test -z "$with_pymalloc"
15427then with_pymalloc="yes"
15428fi
15429if test "$with_pymalloc" != "no"
15430then
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015433#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015434_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015435
15436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15438echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015439
Barry Warsawef82cd72000-06-30 16:21:01 +000015440# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015441{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15442echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015445if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015447if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015448then
15449
15450cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015451#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015452_ACEOF
15453
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454 { echo "$as_me:$LINENO: result: yes" >&5
15455echo "${ECHO_T}yes" >&6; }
15456else { echo "$as_me:$LINENO: result: no" >&5
15457echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015458fi
15459else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460 { echo "$as_me:$LINENO: result: no" >&5
15461echo "${ECHO_T}no" >&6; }
15462fi
15463
Barry Warsawef82cd72000-06-30 16:21:01 +000015464
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015465# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015466
Guido van Rossum98935bf2001-09-05 19:13:16 +000015467DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015468
Guido van Rossume97ee181999-12-20 21:27:22 +000015469# the dlopen() function means we might want to use dynload_shlib.o. some
15470# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
Thomas Wouters3a584202000-08-05 23:28:51 +000015472for ac_func in dlopen
15473do
Martin v. Löwis11437992002-04-12 09:54:03 +000015474as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15476echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15477if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015481/* confdefs.h. */
15482_ACEOF
15483cat confdefs.h >>conftest.$ac_ext
15484cat >>conftest.$ac_ext <<_ACEOF
15485/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015486/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15487 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15488#define $ac_func innocuous_$ac_func
15489
Guido van Rossume97ee181999-12-20 21:27:22 +000015490/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015491 which can conflict with char $ac_func (); below.
15492 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015493 <limits.h> exists even on freestanding compilers. */
15494
15495#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015496# include <limits.h>
15497#else
15498# include <assert.h>
15499#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015500
15501#undef $ac_func
15502
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503/* Override any GCC internal prototype to avoid an error.
15504 Use char because int might match the return type of a GCC
15505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015506#ifdef __cplusplus
15507extern "C"
15508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015509char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015510/* The GNU C library defines this for functions which it implements
15511 to always fail with ENOSYS. Some functions are actually named
15512 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015513#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015514choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015515#endif
15516
Skip Montanaro6dead952003-09-25 14:50:04 +000015517int
15518main ()
15519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ;
15522 return 0;
15523}
15524_ACEOF
15525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526if { (ac_try="$ac_link"
15527case "(($ac_try" in
15528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15529 *) ac_try_echo=$ac_try;;
15530esac
15531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15532 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015534 grep -v '^ *+' conftest.er1 >conftest.err
15535 rm -f conftest.er1
15536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015538 (exit $ac_status); } && {
15539 test -z "$ac_c_werror_flag" ||
15540 test ! -s conftest.err
15541 } && test -s conftest$ac_exeext &&
15542 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015544else
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015546sed 's/^/| /' conftest.$ac_ext >&5
15547
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015550
15551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015552 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554ac_res=`eval echo '${'$as_ac_var'}'`
15555 { echo "$as_me:$LINENO: result: $ac_res" >&5
15556echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015557if test `eval echo '${'$as_ac_var'}'` = yes; then
15558 cat >>confdefs.h <<_ACEOF
15559#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15560_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015561
Guido van Rossume97ee181999-12-20 21:27:22 +000015562fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015563done
Guido van Rossume97ee181999-12-20 21:27:22 +000015564
Michael W. Hudson54241132001-12-07 15:38:26 +000015565
Guido van Rossume97ee181999-12-20 21:27:22 +000015566# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15567# loading of modules.
15568
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15570echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015571if test -z "$DYNLOADFILE"
15572then
15573 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015574 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15575 if test "$ac_cv_func_dlopen" = yes
15576 then DYNLOADFILE="dynload_shlib.o"
15577 else DYNLOADFILE="dynload_aix.o"
15578 fi
15579 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015580 BeOS*) DYNLOADFILE="dynload_beos.o";;
15581 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015582 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15583 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015584 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015585 *)
15586 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15587 # out any dynamic loading
15588 if test "$ac_cv_func_dlopen" = yes
15589 then DYNLOADFILE="dynload_shlib.o"
15590 else DYNLOADFILE="dynload_stub.o"
15591 fi
15592 ;;
15593 esac
15594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15596echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015597if test "$DYNLOADFILE" != "dynload_stub.o"
15598then
Martin v. Löwis11437992002-04-12 09:54:03 +000015599
15600cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015601#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015602_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015603
15604fi
15605
Neil Schemenauer4e425612001-06-19 15:44:15 +000015606# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15607
Michael W. Hudson54241132001-12-07 15:38:26 +000015608
Martin v. Löwiseba40652007-08-30 20:10:57 +000015609{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15610echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015611if test -z "$MACHDEP_OBJS"
15612then
Jack Jansene578a632001-08-15 01:27:14 +000015613 MACHDEP_OBJS=$extra_machdep_objs
15614else
15615 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15618echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015619
Guido van Rossum627b2d71993-12-24 10:39:16 +000015620# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
Martin v. Löwisd6320502004-08-12 13:45:08 +000015692
Martin v. Löwisc3001752005-01-23 09:27:24 +000015693
15694
Neal Norwitz05a45592006-03-20 06:30:08 +000015695
15696
Martin v. Löwis382abef2007-02-19 10:55:19 +000015697
15698
Christian Heimes36281872007-11-30 21:11:28 +000015699
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015700
15701
15702for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15703 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015704 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015705 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015706 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015707 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015708 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015709 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015710 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015711 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015712 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015713 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015714do
Martin v. Löwis11437992002-04-12 09:54:03 +000015715as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15717echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15718if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015720else
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015722/* confdefs.h. */
15723_ACEOF
15724cat confdefs.h >>conftest.$ac_ext
15725cat >>conftest.$ac_ext <<_ACEOF
15726/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015727/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15728 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15729#define $ac_func innocuous_$ac_func
15730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015731/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015732 which can conflict with char $ac_func (); below.
15733 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015734 <limits.h> exists even on freestanding compilers. */
15735
15736#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015737# include <limits.h>
15738#else
15739# include <assert.h>
15740#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015741
15742#undef $ac_func
15743
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744/* Override any GCC internal prototype to avoid an error.
15745 Use char because int might match the return type of a GCC
15746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015747#ifdef __cplusplus
15748extern "C"
15749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015750char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015751/* The GNU C library defines this for functions which it implements
15752 to always fail with ENOSYS. Some functions are actually named
15753 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015755choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015756#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015757
Skip Montanaro6dead952003-09-25 14:50:04 +000015758int
15759main ()
15760{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 ;
15763 return 0;
15764}
15765_ACEOF
15766rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767if { (ac_try="$ac_link"
15768case "(($ac_try" in
15769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15770 *) ac_try_echo=$ac_try;;
15771esac
15772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15773 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015775 grep -v '^ *+' conftest.er1 >conftest.err
15776 rm -f conftest.er1
15777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779 (exit $ac_status); } && {
15780 test -z "$ac_c_werror_flag" ||
15781 test ! -s conftest.err
15782 } && test -s conftest$ac_exeext &&
15783 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015785else
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015787sed 's/^/| /' conftest.$ac_ext >&5
15788
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015791
15792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015793 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795ac_res=`eval echo '${'$as_ac_var'}'`
15796 { echo "$as_me:$LINENO: result: $ac_res" >&5
15797echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015798if test `eval echo '${'$as_ac_var'}'` = yes; then
15799 cat >>confdefs.h <<_ACEOF
15800#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15801_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015802
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015803fi
15804done
15805
Michael W. Hudson54241132001-12-07 15:38:26 +000015806
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015807# For some functions, having a definition is not sufficient, since
15808# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809{ echo "$as_me:$LINENO: checking for chroot" >&5
15810echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015812/* confdefs.h. */
15813_ACEOF
15814cat confdefs.h >>conftest.$ac_ext
15815cat >>conftest.$ac_ext <<_ACEOF
15816/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015817#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015818int
15819main ()
15820{
15821void *x=chroot
15822 ;
15823 return 0;
15824}
15825_ACEOF
15826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827if { (ac_try="$ac_compile"
15828case "(($ac_try" in
15829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15830 *) ac_try_echo=$ac_try;;
15831esac
15832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015835 grep -v '^ *+' conftest.er1 >conftest.err
15836 rm -f conftest.er1
15837 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839 (exit $ac_status); } && {
15840 test -z "$ac_c_werror_flag" ||
15841 test ! -s conftest.err
15842 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015843
15844cat >>confdefs.h <<\_ACEOF
15845#define HAVE_CHROOT 1
15846_ACEOF
15847
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 { echo "$as_me:$LINENO: result: yes" >&5
15849echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015850else
15851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015852sed 's/^/| /' conftest.$ac_ext >&5
15853
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 { echo "$as_me:$LINENO: result: no" >&5
15855echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015856
15857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858
15859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15860{ echo "$as_me:$LINENO: checking for link" >&5
15861echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015863/* confdefs.h. */
15864_ACEOF
15865cat confdefs.h >>conftest.$ac_ext
15866cat >>conftest.$ac_ext <<_ACEOF
15867/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015868#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015869int
15870main ()
15871{
15872void *x=link
15873 ;
15874 return 0;
15875}
15876_ACEOF
15877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878if { (ac_try="$ac_compile"
15879case "(($ac_try" in
15880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15881 *) ac_try_echo=$ac_try;;
15882esac
15883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015886 grep -v '^ *+' conftest.er1 >conftest.err
15887 rm -f conftest.er1
15888 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890 (exit $ac_status); } && {
15891 test -z "$ac_c_werror_flag" ||
15892 test ! -s conftest.err
15893 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015894
15895cat >>confdefs.h <<\_ACEOF
15896#define HAVE_LINK 1
15897_ACEOF
15898
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899 { echo "$as_me:$LINENO: result: yes" >&5
15900echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015901else
15902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015903sed 's/^/| /' conftest.$ac_ext >&5
15904
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905 { echo "$as_me:$LINENO: result: no" >&5
15906echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015907
15908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015909
15910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15911{ echo "$as_me:$LINENO: checking for symlink" >&5
15912echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* confdefs.h. */
15915_ACEOF
15916cat confdefs.h >>conftest.$ac_ext
15917cat >>conftest.$ac_ext <<_ACEOF
15918/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015919#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015920int
15921main ()
15922{
15923void *x=symlink
15924 ;
15925 return 0;
15926}
15927_ACEOF
15928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929if { (ac_try="$ac_compile"
15930case "(($ac_try" in
15931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15932 *) ac_try_echo=$ac_try;;
15933esac
15934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015941 (exit $ac_status); } && {
15942 test -z "$ac_c_werror_flag" ||
15943 test ! -s conftest.err
15944 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015945
15946cat >>confdefs.h <<\_ACEOF
15947#define HAVE_SYMLINK 1
15948_ACEOF
15949
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950 { echo "$as_me:$LINENO: result: yes" >&5
15951echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015952else
15953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015954sed 's/^/| /' conftest.$ac_ext >&5
15955
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956 { echo "$as_me:$LINENO: result: no" >&5
15957echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015958
15959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960
15961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15962{ echo "$as_me:$LINENO: checking for fchdir" >&5
15963echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015965/* confdefs.h. */
15966_ACEOF
15967cat confdefs.h >>conftest.$ac_ext
15968cat >>conftest.$ac_ext <<_ACEOF
15969/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015970#include <unistd.h>
15971int
15972main ()
15973{
15974void *x=fchdir
15975 ;
15976 return 0;
15977}
15978_ACEOF
15979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980if { (ac_try="$ac_compile"
15981case "(($ac_try" in
15982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15983 *) ac_try_echo=$ac_try;;
15984esac
15985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015988 grep -v '^ *+' conftest.er1 >conftest.err
15989 rm -f conftest.er1
15990 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015992 (exit $ac_status); } && {
15993 test -z "$ac_c_werror_flag" ||
15994 test ! -s conftest.err
15995 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015996
15997cat >>confdefs.h <<\_ACEOF
15998#define HAVE_FCHDIR 1
15999_ACEOF
16000
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001 { echo "$as_me:$LINENO: result: yes" >&5
16002echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016003else
16004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016005sed 's/^/| /' conftest.$ac_ext >&5
16006
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007 { echo "$as_me:$LINENO: result: no" >&5
16008echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016009
16010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011
16012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16013{ echo "$as_me:$LINENO: checking for fsync" >&5
16014echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016021#include <unistd.h>
16022int
16023main ()
16024{
16025void *x=fsync
16026 ;
16027 return 0;
16028}
16029_ACEOF
16030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031if { (ac_try="$ac_compile"
16032case "(($ac_try" in
16033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16034 *) ac_try_echo=$ac_try;;
16035esac
16036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016039 grep -v '^ *+' conftest.er1 >conftest.err
16040 rm -f conftest.er1
16041 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016043 (exit $ac_status); } && {
16044 test -z "$ac_c_werror_flag" ||
16045 test ! -s conftest.err
16046 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016047
16048cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016049#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016050_ACEOF
16051
Martin v. Löwiseba40652007-08-30 20:10:57 +000016052 { echo "$as_me:$LINENO: result: yes" >&5
16053echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016054else
16055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016056sed 's/^/| /' conftest.$ac_ext >&5
16057
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058 { echo "$as_me:$LINENO: result: no" >&5
16059echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016060
16061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062
16063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16064{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16065echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016067/* confdefs.h. */
16068_ACEOF
16069cat confdefs.h >>conftest.$ac_ext
16070cat >>conftest.$ac_ext <<_ACEOF
16071/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016072#include <unistd.h>
16073int
16074main ()
16075{
16076void *x=fdatasync
16077 ;
16078 return 0;
16079}
16080_ACEOF
16081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016082if { (ac_try="$ac_compile"
16083case "(($ac_try" in
16084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16085 *) ac_try_echo=$ac_try;;
16086esac
16087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016090 grep -v '^ *+' conftest.er1 >conftest.err
16091 rm -f conftest.er1
16092 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094 (exit $ac_status); } && {
16095 test -z "$ac_c_werror_flag" ||
16096 test ! -s conftest.err
16097 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016098
16099cat >>confdefs.h <<\_ACEOF
16100#define HAVE_FDATASYNC 1
16101_ACEOF
16102
Martin v. Löwiseba40652007-08-30 20:10:57 +000016103 { echo "$as_me:$LINENO: result: yes" >&5
16104echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016105else
16106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016107sed 's/^/| /' conftest.$ac_ext >&5
16108
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109 { echo "$as_me:$LINENO: result: no" >&5
16110echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016111
16112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016113
16114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016115{ echo "$as_me:$LINENO: checking for epoll" >&5
16116echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16117cat >conftest.$ac_ext <<_ACEOF
16118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
16123#include <sys/epoll.h>
16124int
16125main ()
16126{
16127void *x=epoll_create
16128 ;
16129 return 0;
16130}
16131_ACEOF
16132rm -f conftest.$ac_objext
16133if { (ac_try="$ac_compile"
16134case "(($ac_try" in
16135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16136 *) ac_try_echo=$ac_try;;
16137esac
16138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16139 (eval "$ac_compile") 2>conftest.er1
16140 ac_status=$?
16141 grep -v '^ *+' conftest.er1 >conftest.err
16142 rm -f conftest.er1
16143 cat conftest.err >&5
16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145 (exit $ac_status); } && {
16146 test -z "$ac_c_werror_flag" ||
16147 test ! -s conftest.err
16148 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016149
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016150cat >>confdefs.h <<\_ACEOF
16151#define HAVE_EPOLL 1
16152_ACEOF
16153
16154 { echo "$as_me:$LINENO: result: yes" >&5
16155echo "${ECHO_T}yes" >&6; }
16156else
16157 echo "$as_me: failed program was:" >&5
16158sed 's/^/| /' conftest.$ac_ext >&5
16159
16160 { echo "$as_me:$LINENO: result: no" >&5
16161echo "${ECHO_T}no" >&6; }
16162
16163fi
16164
16165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16166{ echo "$as_me:$LINENO: checking for kqueue" >&5
16167echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16168cat >conftest.$ac_ext <<_ACEOF
16169/* confdefs.h. */
16170_ACEOF
16171cat confdefs.h >>conftest.$ac_ext
16172cat >>conftest.$ac_ext <<_ACEOF
16173/* end confdefs.h. */
16174
16175#include <sys/types.h>
16176#include <sys/event.h>
16177
16178int
16179main ()
16180{
16181int x=kqueue()
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext
16187if { (ac_try="$ac_compile"
16188case "(($ac_try" in
16189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16190 *) ac_try_echo=$ac_try;;
16191esac
16192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16193 (eval "$ac_compile") 2>conftest.er1
16194 ac_status=$?
16195 grep -v '^ *+' conftest.er1 >conftest.err
16196 rm -f conftest.er1
16197 cat conftest.err >&5
16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199 (exit $ac_status); } && {
16200 test -z "$ac_c_werror_flag" ||
16201 test ! -s conftest.err
16202 } && test -s conftest.$ac_objext; then
16203
16204cat >>confdefs.h <<\_ACEOF
16205#define HAVE_KQUEUE 1
16206_ACEOF
16207
16208 { echo "$as_me:$LINENO: result: yes" >&5
16209echo "${ECHO_T}yes" >&6; }
16210else
16211 echo "$as_me: failed program was:" >&5
16212sed 's/^/| /' conftest.$ac_ext >&5
16213
16214 { echo "$as_me:$LINENO: result: no" >&5
16215echo "${ECHO_T}no" >&6; }
16216
16217fi
16218
16219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016220# On some systems (eg. FreeBSD 5), we would find a definition of the
16221# functions ctermid_r, setgroups in the library, but no prototype
16222# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16223# address to avoid compiler warnings and potential miscompilations
16224# because of the missing prototypes.
16225
Martin v. Löwiseba40652007-08-30 20:10:57 +000016226{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16227echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016229/* confdefs.h. */
16230_ACEOF
16231cat confdefs.h >>conftest.$ac_ext
16232cat >>conftest.$ac_ext <<_ACEOF
16233/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016234
16235#include "confdefs.h"
16236#include <stdio.h>
16237
Martin v. Löwisd5843682002-11-21 20:41:28 +000016238int
16239main ()
16240{
16241void* p = ctermid_r
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016247if { (ac_try="$ac_compile"
16248case "(($ac_try" in
16249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16250 *) ac_try_echo=$ac_try;;
16251esac
16252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016255 grep -v '^ *+' conftest.er1 >conftest.err
16256 rm -f conftest.er1
16257 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259 (exit $ac_status); } && {
16260 test -z "$ac_c_werror_flag" ||
16261 test ! -s conftest.err
16262 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016263
16264cat >>confdefs.h <<\_ACEOF
16265#define HAVE_CTERMID_R 1
16266_ACEOF
16267
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268 { echo "$as_me:$LINENO: result: yes" >&5
16269echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016270else
16271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016272sed 's/^/| /' conftest.$ac_ext >&5
16273
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274 { echo "$as_me:$LINENO: result: no" >&5
16275echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016276
16277fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016278
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280
16281{ echo "$as_me:$LINENO: checking for flock" >&5
16282echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016284/* confdefs.h. */
16285_ACEOF
16286cat confdefs.h >>conftest.$ac_ext
16287cat >>conftest.$ac_ext <<_ACEOF
16288/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016289
16290#include "confdefs.h"
16291#include <sys/file.h>
16292
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016293int
16294main ()
16295{
16296void* p = flock
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302if { (ac_try="$ac_compile"
16303case "(($ac_try" in
16304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16305 *) ac_try_echo=$ac_try;;
16306esac
16307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 grep -v '^ *+' conftest.er1 >conftest.err
16311 rm -f conftest.er1
16312 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314 (exit $ac_status); } && {
16315 test -z "$ac_c_werror_flag" ||
16316 test ! -s conftest.err
16317 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016318
16319cat >>confdefs.h <<\_ACEOF
16320#define HAVE_FLOCK 1
16321_ACEOF
16322
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323 { echo "$as_me:$LINENO: result: yes" >&5
16324echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016325else
16326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016327sed 's/^/| /' conftest.$ac_ext >&5
16328
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329 { echo "$as_me:$LINENO: result: no" >&5
16330echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016331
16332fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016333
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335
16336{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16337echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016338cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016339/* confdefs.h. */
16340_ACEOF
16341cat confdefs.h >>conftest.$ac_ext
16342cat >>conftest.$ac_ext <<_ACEOF
16343/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016344
16345#include "confdefs.h"
16346#include <unistd.h>
16347
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016348int
16349main ()
16350{
16351void* p = getpagesize
16352 ;
16353 return 0;
16354}
16355_ACEOF
16356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016357if { (ac_try="$ac_compile"
16358case "(($ac_try" in
16359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16360 *) ac_try_echo=$ac_try;;
16361esac
16362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016365 grep -v '^ *+' conftest.er1 >conftest.err
16366 rm -f conftest.er1
16367 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369 (exit $ac_status); } && {
16370 test -z "$ac_c_werror_flag" ||
16371 test ! -s conftest.err
16372 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016373
16374cat >>confdefs.h <<\_ACEOF
16375#define HAVE_GETPAGESIZE 1
16376_ACEOF
16377
Martin v. Löwiseba40652007-08-30 20:10:57 +000016378 { echo "$as_me:$LINENO: result: yes" >&5
16379echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016380else
16381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016382sed 's/^/| /' conftest.$ac_ext >&5
16383
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384 { echo "$as_me:$LINENO: result: no" >&5
16385echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016386
16387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388
16389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016390
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016391for ac_prog in true
16392do
16393 # Extract the first word of "$ac_prog", so it can be a program name with args.
16394set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016397if test "${ac_cv_prog_TRUE+set}" = set; then
16398 echo $ECHO_N "(cached) $ECHO_C" >&6
16399else
16400 if test -n "$TRUE"; then
16401 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16402else
16403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16404for as_dir in $PATH
16405do
16406 IFS=$as_save_IFS
16407 test -z "$as_dir" && as_dir=.
16408 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 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 +000016410 ac_cv_prog_TRUE="$ac_prog"
16411 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16412 break 2
16413 fi
16414done
16415done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016417
16418fi
16419fi
16420TRUE=$ac_cv_prog_TRUE
16421if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016422 { echo "$as_me:$LINENO: result: $TRUE" >&5
16423echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016424else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425 { echo "$as_me:$LINENO: result: no" >&5
16426echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016427fi
16428
Martin v. Löwiseba40652007-08-30 20:10:57 +000016429
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016430 test -n "$TRUE" && break
16431done
16432test -n "$TRUE" || TRUE="/bin/true"
16433
16434
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16436echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016437if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16438 echo $ECHO_N "(cached) $ECHO_C" >&6
16439else
16440 ac_check_lib_save_LIBS=$LIBS
16441LIBS="-lc $LIBS"
16442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016443/* confdefs.h. */
16444_ACEOF
16445cat confdefs.h >>conftest.$ac_ext
16446cat >>conftest.$ac_ext <<_ACEOF
16447/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016448
Martin v. Löwiseba40652007-08-30 20:10:57 +000016449/* Override any GCC internal prototype to avoid an error.
16450 Use char because int might match the return type of a GCC
16451 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016452#ifdef __cplusplus
16453extern "C"
16454#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016455char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016456int
16457main ()
16458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016460 ;
16461 return 0;
16462}
16463_ACEOF
16464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465if { (ac_try="$ac_link"
16466case "(($ac_try" in
16467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16468 *) ac_try_echo=$ac_try;;
16469esac
16470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016473 grep -v '^ *+' conftest.er1 >conftest.err
16474 rm -f conftest.er1
16475 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016477 (exit $ac_status); } && {
16478 test -z "$ac_c_werror_flag" ||
16479 test ! -s conftest.err
16480 } && test -s conftest$ac_exeext &&
16481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016482 ac_cv_lib_c_inet_aton=yes
16483else
16484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016485sed 's/^/| /' conftest.$ac_ext >&5
16486
Martin v. Löwiseba40652007-08-30 20:10:57 +000016487 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016489
16490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016492LIBS=$ac_check_lib_save_LIBS
16493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016494{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16495echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016496if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016497 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016498else
16499
Martin v. Löwiseba40652007-08-30 20:10:57 +000016500{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16501echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016502if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16503 echo $ECHO_N "(cached) $ECHO_C" >&6
16504else
16505 ac_check_lib_save_LIBS=$LIBS
16506LIBS="-lresolv $LIBS"
16507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016513
Martin v. Löwiseba40652007-08-30 20:10:57 +000016514/* Override any GCC internal prototype to avoid an error.
16515 Use char because int might match the return type of a GCC
16516 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016517#ifdef __cplusplus
16518extern "C"
16519#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016520char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016521int
16522main ()
16523{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016524return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016525 ;
16526 return 0;
16527}
16528_ACEOF
16529rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530if { (ac_try="$ac_link"
16531case "(($ac_try" in
16532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16533 *) ac_try_echo=$ac_try;;
16534esac
16535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16536 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 grep -v '^ *+' conftest.er1 >conftest.err
16539 rm -f conftest.er1
16540 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 (exit $ac_status); } && {
16543 test -z "$ac_c_werror_flag" ||
16544 test ! -s conftest.err
16545 } && test -s conftest$ac_exeext &&
16546 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016547 ac_cv_lib_resolv_inet_aton=yes
16548else
16549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016550sed 's/^/| /' conftest.$ac_ext >&5
16551
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554
16555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016557LIBS=$ac_check_lib_save_LIBS
16558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016559{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16560echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016561if test $ac_cv_lib_resolv_inet_aton = yes; then
16562 cat >>confdefs.h <<_ACEOF
16563#define HAVE_LIBRESOLV 1
16564_ACEOF
16565
16566 LIBS="-lresolv $LIBS"
16567
16568fi
16569
16570
16571fi
16572
16573
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016574# On Tru64, chflags seems to be present, but calling it will
16575# exit Python
16576{ echo "$as_me:$LINENO: checking for chflags" >&5
16577echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16578if test "$cross_compiling" = yes; then
16579 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16580See \`config.log' for more details." >&5
16581echo "$as_me: error: cannot run test program while cross compiling
16582See \`config.log' for more details." >&2;}
16583 { (exit 1); exit 1; }; }
16584else
16585 cat >conftest.$ac_ext <<_ACEOF
16586/* confdefs.h. */
16587_ACEOF
16588cat confdefs.h >>conftest.$ac_ext
16589cat >>conftest.$ac_ext <<_ACEOF
16590/* end confdefs.h. */
16591
16592#include <sys/stat.h>
16593#include <unistd.h>
16594int main(int argc, char*argv[])
16595{
16596 if(chflags(argv[0], 0) != 0)
16597 return 1;
16598 return 0;
16599}
16600
16601_ACEOF
16602rm -f conftest$ac_exeext
16603if { (ac_try="$ac_link"
16604case "(($ac_try" in
16605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16606 *) ac_try_echo=$ac_try;;
16607esac
16608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16609 (eval "$ac_link") 2>&5
16610 ac_status=$?
16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16613 { (case "(($ac_try" in
16614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16615 *) ac_try_echo=$ac_try;;
16616esac
16617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16618 (eval "$ac_try") 2>&5
16619 ac_status=$?
16620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621 (exit $ac_status); }; }; then
16622
16623cat >>confdefs.h <<\_ACEOF
16624#define HAVE_CHFLAGS 1
16625_ACEOF
16626
16627 { echo "$as_me:$LINENO: result: yes" >&5
16628echo "${ECHO_T}yes" >&6; }
16629else
16630 echo "$as_me: program exited with status $ac_status" >&5
16631echo "$as_me: failed program was:" >&5
16632sed 's/^/| /' conftest.$ac_ext >&5
16633
16634( exit $ac_status )
16635{ echo "$as_me:$LINENO: result: no" >&5
16636echo "${ECHO_T}no" >&6; }
16637
16638fi
16639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16640fi
16641
16642
16643
16644{ echo "$as_me:$LINENO: checking for lchflags" >&5
16645echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16646if test "$cross_compiling" = yes; then
16647 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16648See \`config.log' for more details." >&5
16649echo "$as_me: error: cannot run test program while cross compiling
16650See \`config.log' for more details." >&2;}
16651 { (exit 1); exit 1; }; }
16652else
16653 cat >conftest.$ac_ext <<_ACEOF
16654/* confdefs.h. */
16655_ACEOF
16656cat confdefs.h >>conftest.$ac_ext
16657cat >>conftest.$ac_ext <<_ACEOF
16658/* end confdefs.h. */
16659
16660#include <sys/stat.h>
16661#include <unistd.h>
16662int main(int argc, char*argv[])
16663{
16664 if(lchflags(argv[0], 0) != 0)
16665 return 1;
16666 return 0;
16667}
16668
16669_ACEOF
16670rm -f conftest$ac_exeext
16671if { (ac_try="$ac_link"
16672case "(($ac_try" in
16673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16674 *) ac_try_echo=$ac_try;;
16675esac
16676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16677 (eval "$ac_link") 2>&5
16678 ac_status=$?
16679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16681 { (case "(($ac_try" in
16682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16683 *) ac_try_echo=$ac_try;;
16684esac
16685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16686 (eval "$ac_try") 2>&5
16687 ac_status=$?
16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689 (exit $ac_status); }; }; then
16690
16691cat >>confdefs.h <<\_ACEOF
16692#define HAVE_LCHFLAGS 1
16693_ACEOF
16694
16695 { echo "$as_me:$LINENO: result: yes" >&5
16696echo "${ECHO_T}yes" >&6; }
16697else
16698 echo "$as_me: program exited with status $ac_status" >&5
16699echo "$as_me: failed program was:" >&5
16700sed 's/^/| /' conftest.$ac_ext >&5
16701
16702( exit $ac_status )
16703{ echo "$as_me:$LINENO: result: no" >&5
16704echo "${ECHO_T}no" >&6; }
16705
16706fi
16707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16708fi
16709
16710
16711
Ronald Oussorenf8752642006-07-06 10:13:35 +000016712case $ac_sys_system/$ac_sys_release in
16713Darwin/*)
16714 _CUR_CFLAGS="${CFLAGS}"
16715 _CUR_LDFLAGS="${LDFLAGS}"
16716 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16717 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16718 ;;
16719esac
16720
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16722echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016723if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16724 echo $ECHO_N "(cached) $ECHO_C" >&6
16725else
16726 ac_check_lib_save_LIBS=$LIBS
16727LIBS="-lz $LIBS"
16728cat >conftest.$ac_ext <<_ACEOF
16729/* confdefs.h. */
16730_ACEOF
16731cat confdefs.h >>conftest.$ac_ext
16732cat >>conftest.$ac_ext <<_ACEOF
16733/* end confdefs.h. */
16734
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735/* Override any GCC internal prototype to avoid an error.
16736 Use char because int might match the return type of a GCC
16737 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016738#ifdef __cplusplus
16739extern "C"
16740#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016741char inflateCopy ();
16742int
16743main ()
16744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016746 ;
16747 return 0;
16748}
16749_ACEOF
16750rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751if { (ac_try="$ac_link"
16752case "(($ac_try" in
16753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16754 *) ac_try_echo=$ac_try;;
16755esac
16756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16757 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016758 ac_status=$?
16759 grep -v '^ *+' conftest.er1 >conftest.err
16760 rm -f conftest.er1
16761 cat conftest.err >&5
16762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763 (exit $ac_status); } && {
16764 test -z "$ac_c_werror_flag" ||
16765 test ! -s conftest.err
16766 } && test -s conftest$ac_exeext &&
16767 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016768 ac_cv_lib_z_inflateCopy=yes
16769else
16770 echo "$as_me: failed program was:" >&5
16771sed 's/^/| /' conftest.$ac_ext >&5
16772
Martin v. Löwiseba40652007-08-30 20:10:57 +000016773 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775
16776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016777 conftest$ac_exeext conftest.$ac_ext
16778LIBS=$ac_check_lib_save_LIBS
16779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16781echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016782if test $ac_cv_lib_z_inflateCopy = yes; then
16783
16784cat >>confdefs.h <<\_ACEOF
16785#define HAVE_ZLIB_COPY 1
16786_ACEOF
16787
16788fi
16789
16790
Ronald Oussorenf8752642006-07-06 10:13:35 +000016791case $ac_sys_system/$ac_sys_release in
16792Darwin/*)
16793 CFLAGS="${_CUR_CFLAGS}"
16794 LDFLAGS="${_CUR_LDFLAGS}"
16795 ;;
16796esac
16797
Martin v. Löwiseba40652007-08-30 20:10:57 +000016798{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16799echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016801/* confdefs.h. */
16802_ACEOF
16803cat confdefs.h >>conftest.$ac_ext
16804cat >>conftest.$ac_ext <<_ACEOF
16805/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016806
16807#include "confdefs.h"
16808#include <netdb.h>
16809
Martin v. Löwise9416172003-05-03 10:12:45 +000016810int
16811main ()
16812{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016813void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016814 ;
16815 return 0;
16816}
16817_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016818rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819if { (ac_try="$ac_link"
16820case "(($ac_try" in
16821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16822 *) ac_try_echo=$ac_try;;
16823esac
16824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16825 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016827 grep -v '^ *+' conftest.er1 >conftest.err
16828 rm -f conftest.er1
16829 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831 (exit $ac_status); } && {
16832 test -z "$ac_c_werror_flag" ||
16833 test ! -s conftest.err
16834 } && test -s conftest$ac_exeext &&
16835 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016836
16837cat >>confdefs.h <<\_ACEOF
16838#define HAVE_HSTRERROR 1
16839_ACEOF
16840
Martin v. Löwiseba40652007-08-30 20:10:57 +000016841 { echo "$as_me:$LINENO: result: yes" >&5
16842echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016843else
16844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016845sed 's/^/| /' conftest.$ac_ext >&5
16846
Martin v. Löwiseba40652007-08-30 20:10:57 +000016847 { echo "$as_me:$LINENO: result: no" >&5
16848echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016849
16850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851
16852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016854
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16856echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016863
16864#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016865#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016866#include <sys/socket.h>
16867#include <netinet/in.h>
16868#include <arpa/inet.h>
16869
Martin v. Löwise9416172003-05-03 10:12:45 +000016870int
16871main ()
16872{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016873void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016874 ;
16875 return 0;
16876}
16877_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016878rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879if { (ac_try="$ac_link"
16880case "(($ac_try" in
16881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16882 *) ac_try_echo=$ac_try;;
16883esac
16884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16885 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016887 grep -v '^ *+' conftest.er1 >conftest.err
16888 rm -f conftest.er1
16889 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016891 (exit $ac_status); } && {
16892 test -z "$ac_c_werror_flag" ||
16893 test ! -s conftest.err
16894 } && test -s conftest$ac_exeext &&
16895 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016896
16897cat >>confdefs.h <<\_ACEOF
16898#define HAVE_INET_ATON 1
16899_ACEOF
16900
Martin v. Löwiseba40652007-08-30 20:10:57 +000016901 { echo "$as_me:$LINENO: result: yes" >&5
16902echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016903else
16904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016905sed 's/^/| /' conftest.$ac_ext >&5
16906
Martin v. Löwiseba40652007-08-30 20:10:57 +000016907 { echo "$as_me:$LINENO: result: no" >&5
16908echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016909
16910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911
16912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016914
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16916echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016918/* confdefs.h. */
16919_ACEOF
16920cat confdefs.h >>conftest.$ac_ext
16921cat >>conftest.$ac_ext <<_ACEOF
16922/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016923
16924#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016925#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016926#include <sys/socket.h>
16927#include <netinet/in.h>
16928#include <arpa/inet.h>
16929
Martin v. Löwise9416172003-05-03 10:12:45 +000016930int
16931main ()
16932{
16933void* p = inet_pton
16934 ;
16935 return 0;
16936}
16937_ACEOF
16938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016939if { (ac_try="$ac_compile"
16940case "(($ac_try" in
16941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16942 *) ac_try_echo=$ac_try;;
16943esac
16944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016947 grep -v '^ *+' conftest.er1 >conftest.err
16948 rm -f conftest.er1
16949 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016951 (exit $ac_status); } && {
16952 test -z "$ac_c_werror_flag" ||
16953 test ! -s conftest.err
16954 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016955
16956cat >>confdefs.h <<\_ACEOF
16957#define HAVE_INET_PTON 1
16958_ACEOF
16959
Martin v. Löwiseba40652007-08-30 20:10:57 +000016960 { echo "$as_me:$LINENO: result: yes" >&5
16961echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016962else
16963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016964sed 's/^/| /' conftest.$ac_ext >&5
16965
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966 { echo "$as_me:$LINENO: result: no" >&5
16967echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016968
16969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970
16971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016972
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016973# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016974{ echo "$as_me:$LINENO: checking for setgroups" >&5
16975echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016977/* confdefs.h. */
16978_ACEOF
16979cat confdefs.h >>conftest.$ac_ext
16980cat >>conftest.$ac_ext <<_ACEOF
16981/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016982
16983#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016984#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016985#ifdef HAVE_GRP_H
16986#include <grp.h>
16987#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016988
Martin v. Löwisd5843682002-11-21 20:41:28 +000016989int
16990main ()
16991{
16992void* p = setgroups
16993 ;
16994 return 0;
16995}
16996_ACEOF
16997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998if { (ac_try="$ac_compile"
16999case "(($ac_try" in
17000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17001 *) ac_try_echo=$ac_try;;
17002esac
17003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017006 grep -v '^ *+' conftest.er1 >conftest.err
17007 rm -f conftest.er1
17008 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010 (exit $ac_status); } && {
17011 test -z "$ac_c_werror_flag" ||
17012 test ! -s conftest.err
17013 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017014
17015cat >>confdefs.h <<\_ACEOF
17016#define HAVE_SETGROUPS 1
17017_ACEOF
17018
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 { echo "$as_me:$LINENO: result: yes" >&5
17020echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017021else
17022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017023sed 's/^/| /' conftest.$ac_ext >&5
17024
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 { echo "$as_me:$LINENO: result: no" >&5
17026echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017027
17028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017029
17030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017032# check for openpty and forkpty
17033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017035for ac_func in openpty
17036do
Martin v. Löwis11437992002-04-12 09:54:03 +000017037as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17039echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17040if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017042else
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017044/* confdefs.h. */
17045_ACEOF
17046cat confdefs.h >>conftest.$ac_ext
17047cat >>conftest.$ac_ext <<_ACEOF
17048/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017049/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17050 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17051#define $ac_func innocuous_$ac_func
17052
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017053/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017054 which can conflict with char $ac_func (); below.
17055 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017056 <limits.h> exists even on freestanding compilers. */
17057
17058#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017059# include <limits.h>
17060#else
17061# include <assert.h>
17062#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017063
17064#undef $ac_func
17065
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066/* Override any GCC internal prototype to avoid an error.
17067 Use char because int might match the return type of a GCC
17068 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017069#ifdef __cplusplus
17070extern "C"
17071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017072char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017073/* The GNU C library defines this for functions which it implements
17074 to always fail with ENOSYS. Some functions are actually named
17075 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017076#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017077choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017078#endif
17079
Skip Montanaro6dead952003-09-25 14:50:04 +000017080int
17081main ()
17082{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017083return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 ;
17085 return 0;
17086}
17087_ACEOF
17088rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017089if { (ac_try="$ac_link"
17090case "(($ac_try" in
17091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17092 *) ac_try_echo=$ac_try;;
17093esac
17094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 grep -v '^ *+' conftest.er1 >conftest.err
17098 rm -f conftest.er1
17099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101 (exit $ac_status); } && {
17102 test -z "$ac_c_werror_flag" ||
17103 test ! -s conftest.err
17104 } && test -s conftest$ac_exeext &&
17105 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017106 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017107else
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017109sed 's/^/| /' conftest.$ac_ext >&5
17110
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113
17114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017115 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117ac_res=`eval echo '${'$as_ac_var'}'`
17118 { echo "$as_me:$LINENO: result: $ac_res" >&5
17119echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017120if test `eval echo '${'$as_ac_var'}'` = yes; then
17121 cat >>confdefs.h <<_ACEOF
17122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17123_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017125else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17127echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017128if test "${ac_cv_lib_util_openpty+set}" = set; then
17129 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017130else
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017132LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017134/* confdefs.h. */
17135_ACEOF
17136cat confdefs.h >>conftest.$ac_ext
17137cat >>conftest.$ac_ext <<_ACEOF
17138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
Martin v. Löwiseba40652007-08-30 20:10:57 +000017140/* Override any GCC internal prototype to avoid an error.
17141 Use char because int might match the return type of a GCC
17142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017143#ifdef __cplusplus
17144extern "C"
17145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017146char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017147int
17148main ()
17149{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 ;
17152 return 0;
17153}
17154_ACEOF
17155rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017156if { (ac_try="$ac_link"
17157case "(($ac_try" in
17158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17159 *) ac_try_echo=$ac_try;;
17160esac
17161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017164 grep -v '^ *+' conftest.er1 >conftest.err
17165 rm -f conftest.er1
17166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017168 (exit $ac_status); } && {
17169 test -z "$ac_c_werror_flag" ||
17170 test ! -s conftest.err
17171 } && test -s conftest$ac_exeext &&
17172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017174else
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017176sed 's/^/| /' conftest.$ac_ext >&5
17177
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180
17181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017183LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017185{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17186echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017187if test $ac_cv_lib_util_openpty = yes; then
17188 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017189#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017190_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017191 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017192else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017193 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17194echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017195if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17196 echo $ECHO_N "(cached) $ECHO_C" >&6
17197else
17198 ac_check_lib_save_LIBS=$LIBS
17199LIBS="-lbsd $LIBS"
17200cat >conftest.$ac_ext <<_ACEOF
17201/* confdefs.h. */
17202_ACEOF
17203cat confdefs.h >>conftest.$ac_ext
17204cat >>conftest.$ac_ext <<_ACEOF
17205/* end confdefs.h. */
17206
Martin v. Löwiseba40652007-08-30 20:10:57 +000017207/* Override any GCC internal prototype to avoid an error.
17208 Use char because int might match the return type of a GCC
17209 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017210#ifdef __cplusplus
17211extern "C"
17212#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017213char openpty ();
17214int
17215main ()
17216{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017218 ;
17219 return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223if { (ac_try="$ac_link"
17224case "(($ac_try" in
17225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17226 *) ac_try_echo=$ac_try;;
17227esac
17228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17229 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017230 ac_status=$?
17231 grep -v '^ *+' conftest.er1 >conftest.err
17232 rm -f conftest.er1
17233 cat conftest.err >&5
17234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235 (exit $ac_status); } && {
17236 test -z "$ac_c_werror_flag" ||
17237 test ! -s conftest.err
17238 } && test -s conftest$ac_exeext &&
17239 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017240 ac_cv_lib_bsd_openpty=yes
17241else
17242 echo "$as_me: failed program was:" >&5
17243sed 's/^/| /' conftest.$ac_ext >&5
17244
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247
17248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017249 conftest$ac_exeext conftest.$ac_ext
17250LIBS=$ac_check_lib_save_LIBS
17251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017252{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17253echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017254if test $ac_cv_lib_bsd_openpty = yes; then
17255 cat >>confdefs.h <<\_ACEOF
17256#define HAVE_OPENPTY 1
17257_ACEOF
17258 LIBS="$LIBS -lbsd"
17259fi
17260
17261
17262fi
17263
Fred Drake8cef4cf2000-06-28 16:40:38 +000017264
17265fi
17266done
17267
Martin v. Löwis11437992002-04-12 09:54:03 +000017268
Fred Drake8cef4cf2000-06-28 16:40:38 +000017269for ac_func in forkpty
17270do
Martin v. Löwis11437992002-04-12 09:54:03 +000017271as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17273echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17274if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017276else
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017278/* confdefs.h. */
17279_ACEOF
17280cat confdefs.h >>conftest.$ac_ext
17281cat >>conftest.$ac_ext <<_ACEOF
17282/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017283/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17284 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17285#define $ac_func innocuous_$ac_func
17286
Fred Drake8cef4cf2000-06-28 16:40:38 +000017287/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017288 which can conflict with char $ac_func (); below.
17289 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017290 <limits.h> exists even on freestanding compilers. */
17291
17292#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017293# include <limits.h>
17294#else
17295# include <assert.h>
17296#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017297
17298#undef $ac_func
17299
Martin v. Löwiseba40652007-08-30 20:10:57 +000017300/* Override any GCC internal prototype to avoid an error.
17301 Use char because int might match the return type of a GCC
17302 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017303#ifdef __cplusplus
17304extern "C"
17305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017306char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017307/* The GNU C library defines this for functions which it implements
17308 to always fail with ENOSYS. Some functions are actually named
17309 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017311choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017312#endif
17313
Skip Montanaro6dead952003-09-25 14:50:04 +000017314int
17315main ()
17316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017317return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 ;
17319 return 0;
17320}
17321_ACEOF
17322rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017323if { (ac_try="$ac_link"
17324case "(($ac_try" in
17325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17326 *) ac_try_echo=$ac_try;;
17327esac
17328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17329 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017331 grep -v '^ *+' conftest.er1 >conftest.err
17332 rm -f conftest.er1
17333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335 (exit $ac_status); } && {
17336 test -z "$ac_c_werror_flag" ||
17337 test ! -s conftest.err
17338 } && test -s conftest$ac_exeext &&
17339 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017341else
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017343sed 's/^/| /' conftest.$ac_ext >&5
17344
Martin v. Löwiseba40652007-08-30 20:10:57 +000017345 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017347
17348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017351ac_res=`eval echo '${'$as_ac_var'}'`
17352 { echo "$as_me:$LINENO: result: $ac_res" >&5
17353echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017354if test `eval echo '${'$as_ac_var'}'` = yes; then
17355 cat >>confdefs.h <<_ACEOF
17356#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17357_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017358
Fred Drake8cef4cf2000-06-28 16:40:38 +000017359else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17361echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017362if test "${ac_cv_lib_util_forkpty+set}" = set; then
17363 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017364else
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017366LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017368/* confdefs.h. */
17369_ACEOF
17370cat confdefs.h >>conftest.$ac_ext
17371cat >>conftest.$ac_ext <<_ACEOF
17372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017373
Martin v. Löwiseba40652007-08-30 20:10:57 +000017374/* Override any GCC internal prototype to avoid an error.
17375 Use char because int might match the return type of a GCC
17376 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017377#ifdef __cplusplus
17378extern "C"
17379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017380char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017381int
17382main ()
17383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017384return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 ;
17386 return 0;
17387}
17388_ACEOF
17389rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390if { (ac_try="$ac_link"
17391case "(($ac_try" in
17392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17393 *) ac_try_echo=$ac_try;;
17394esac
17395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017398 grep -v '^ *+' conftest.er1 >conftest.err
17399 rm -f conftest.er1
17400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017402 (exit $ac_status); } && {
17403 test -z "$ac_c_werror_flag" ||
17404 test ! -s conftest.err
17405 } && test -s conftest$ac_exeext &&
17406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017407 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017408else
Martin v. Löwis11437992002-04-12 09:54:03 +000017409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017410sed 's/^/| /' conftest.$ac_ext >&5
17411
Martin v. Löwiseba40652007-08-30 20:10:57 +000017412 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017414
17415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017417LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017419{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17420echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017421if test $ac_cv_lib_util_forkpty = yes; then
17422 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017423#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017424_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017425 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017426else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17428echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017429if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17430 echo $ECHO_N "(cached) $ECHO_C" >&6
17431else
17432 ac_check_lib_save_LIBS=$LIBS
17433LIBS="-lbsd $LIBS"
17434cat >conftest.$ac_ext <<_ACEOF
17435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
17440
Martin v. Löwiseba40652007-08-30 20:10:57 +000017441/* Override any GCC internal prototype to avoid an error.
17442 Use char because int might match the return type of a GCC
17443 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017444#ifdef __cplusplus
17445extern "C"
17446#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017447char forkpty ();
17448int
17449main ()
17450{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017452 ;
17453 return 0;
17454}
17455_ACEOF
17456rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017457if { (ac_try="$ac_link"
17458case "(($ac_try" in
17459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17460 *) ac_try_echo=$ac_try;;
17461esac
17462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17463 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017464 ac_status=$?
17465 grep -v '^ *+' conftest.er1 >conftest.err
17466 rm -f conftest.er1
17467 cat conftest.err >&5
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017469 (exit $ac_status); } && {
17470 test -z "$ac_c_werror_flag" ||
17471 test ! -s conftest.err
17472 } && test -s conftest$ac_exeext &&
17473 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017474 ac_cv_lib_bsd_forkpty=yes
17475else
17476 echo "$as_me: failed program was:" >&5
17477sed 's/^/| /' conftest.$ac_ext >&5
17478
Martin v. Löwiseba40652007-08-30 20:10:57 +000017479 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481
17482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017483 conftest$ac_exeext conftest.$ac_ext
17484LIBS=$ac_check_lib_save_LIBS
17485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17487echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017488if test $ac_cv_lib_bsd_forkpty = yes; then
17489 cat >>confdefs.h <<\_ACEOF
17490#define HAVE_FORKPTY 1
17491_ACEOF
17492 LIBS="$LIBS -lbsd"
17493fi
17494
17495
17496fi
17497
Fred Drake8cef4cf2000-06-28 16:40:38 +000017498
17499fi
17500done
17501
Jack Jansendd19cf82001-12-06 22:36:17 +000017502
Brett Cannonaa5778d2008-03-18 04:09:00 +000017503# Stuff for expat.
17504
17505for ac_func in memmove
17506do
17507as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17508{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17509echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17510if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17511 echo $ECHO_N "(cached) $ECHO_C" >&6
17512else
17513 cat >conftest.$ac_ext <<_ACEOF
17514/* confdefs.h. */
17515_ACEOF
17516cat confdefs.h >>conftest.$ac_ext
17517cat >>conftest.$ac_ext <<_ACEOF
17518/* end confdefs.h. */
17519/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17520 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17521#define $ac_func innocuous_$ac_func
17522
17523/* System header to define __stub macros and hopefully few prototypes,
17524 which can conflict with char $ac_func (); below.
17525 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17526 <limits.h> exists even on freestanding compilers. */
17527
17528#ifdef __STDC__
17529# include <limits.h>
17530#else
17531# include <assert.h>
17532#endif
17533
17534#undef $ac_func
17535
17536/* Override any GCC internal prototype to avoid an error.
17537 Use char because int might match the return type of a GCC
17538 builtin and then its argument prototype would still apply. */
17539#ifdef __cplusplus
17540extern "C"
17541#endif
17542char $ac_func ();
17543/* The GNU C library defines this for functions which it implements
17544 to always fail with ENOSYS. Some functions are actually named
17545 something starting with __ and the normal name is an alias. */
17546#if defined __stub_$ac_func || defined __stub___$ac_func
17547choke me
17548#endif
17549
17550int
17551main ()
17552{
17553return $ac_func ();
17554 ;
17555 return 0;
17556}
17557_ACEOF
17558rm -f conftest.$ac_objext conftest$ac_exeext
17559if { (ac_try="$ac_link"
17560case "(($ac_try" in
17561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17562 *) ac_try_echo=$ac_try;;
17563esac
17564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17565 (eval "$ac_link") 2>conftest.er1
17566 ac_status=$?
17567 grep -v '^ *+' conftest.er1 >conftest.err
17568 rm -f conftest.er1
17569 cat conftest.err >&5
17570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17571 (exit $ac_status); } && {
17572 test -z "$ac_c_werror_flag" ||
17573 test ! -s conftest.err
17574 } && test -s conftest$ac_exeext &&
17575 $as_test_x conftest$ac_exeext; then
17576 eval "$as_ac_var=yes"
17577else
17578 echo "$as_me: failed program was:" >&5
17579sed 's/^/| /' conftest.$ac_ext >&5
17580
17581 eval "$as_ac_var=no"
17582fi
17583
17584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17585 conftest$ac_exeext conftest.$ac_ext
17586fi
17587ac_res=`eval echo '${'$as_ac_var'}'`
17588 { echo "$as_me:$LINENO: result: $ac_res" >&5
17589echo "${ECHO_T}$ac_res" >&6; }
17590if test `eval echo '${'$as_ac_var'}'` = yes; then
17591 cat >>confdefs.h <<_ACEOF
17592#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17593_ACEOF
17594
17595fi
17596done
17597
17598
Michael W. Hudson54241132001-12-07 15:38:26 +000017599# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017600
17601
17602
17603
17604
17605
Fred Drake8cef4cf2000-06-28 16:40:38 +000017606for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17607do
Martin v. Löwis11437992002-04-12 09:54:03 +000017608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017609{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017613else
Martin v. Löwis11437992002-04-12 09:54:03 +000017614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017615/* confdefs.h. */
17616_ACEOF
17617cat confdefs.h >>conftest.$ac_ext
17618cat >>conftest.$ac_ext <<_ACEOF
17619/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17622#define $ac_func innocuous_$ac_func
17623
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017625 which can conflict with char $ac_func (); below.
17626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017627 <limits.h> exists even on freestanding compilers. */
17628
17629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017630# include <limits.h>
17631#else
17632# include <assert.h>
17633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017634
17635#undef $ac_func
17636
Martin v. Löwiseba40652007-08-30 20:10:57 +000017637/* Override any GCC internal prototype to avoid an error.
17638 Use char because int might match the return type of a GCC
17639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017640#ifdef __cplusplus
17641extern "C"
17642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017643char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017644/* The GNU C library defines this for functions which it implements
17645 to always fail with ENOSYS. Some functions are actually named
17646 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017647#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017648choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017649#endif
17650
Skip Montanaro6dead952003-09-25 14:50:04 +000017651int
17652main ()
17653{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017654return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 ;
17656 return 0;
17657}
17658_ACEOF
17659rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660if { (ac_try="$ac_link"
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_link") 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000017672 (exit $ac_status); } && {
17673 test -z "$ac_c_werror_flag" ||
17674 test ! -s conftest.err
17675 } && test -s conftest$ac_exeext &&
17676 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017678else
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017680sed 's/^/| /' conftest.$ac_ext >&5
17681
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017684
17685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017688ac_res=`eval echo '${'$as_ac_var'}'`
17689 { echo "$as_me:$LINENO: result: $ac_res" >&5
17690echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017691if test `eval echo '${'$as_ac_var'}'` = yes; then
17692 cat >>confdefs.h <<_ACEOF
17693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17694_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017696fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017697done
17698
Michael W. Hudson54241132001-12-07 15:38:26 +000017699
Martin v. Löwis11437992002-04-12 09:54:03 +000017700
17701
17702
Brett Cannonaa5778d2008-03-18 04:09:00 +000017703for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017704do
Martin v. Löwis11437992002-04-12 09:54:03 +000017705as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17707echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17708if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017710else
Martin v. Löwis11437992002-04-12 09:54:03 +000017711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017712/* confdefs.h. */
17713_ACEOF
17714cat confdefs.h >>conftest.$ac_ext
17715cat >>conftest.$ac_ext <<_ACEOF
17716/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017717/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17718 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17719#define $ac_func innocuous_$ac_func
17720
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017721/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017722 which can conflict with char $ac_func (); below.
17723 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017724 <limits.h> exists even on freestanding compilers. */
17725
17726#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017727# include <limits.h>
17728#else
17729# include <assert.h>
17730#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017731
17732#undef $ac_func
17733
Martin v. Löwiseba40652007-08-30 20:10:57 +000017734/* Override any GCC internal prototype to avoid an error.
17735 Use char because int might match the return type of a GCC
17736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017737#ifdef __cplusplus
17738extern "C"
17739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017740char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017741/* The GNU C library defines this for functions which it implements
17742 to always fail with ENOSYS. Some functions are actually named
17743 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017744#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017745choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017747
Skip Montanaro6dead952003-09-25 14:50:04 +000017748int
17749main ()
17750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017751return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 ;
17753 return 0;
17754}
17755_ACEOF
17756rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017757if { (ac_try="$ac_link"
17758case "(($ac_try" in
17759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17760 *) ac_try_echo=$ac_try;;
17761esac
17762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17763 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017765 grep -v '^ *+' conftest.er1 >conftest.err
17766 rm -f conftest.er1
17767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017769 (exit $ac_status); } && {
17770 test -z "$ac_c_werror_flag" ||
17771 test ! -s conftest.err
17772 } && test -s conftest$ac_exeext &&
17773 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017775else
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017777sed 's/^/| /' conftest.$ac_ext >&5
17778
Martin v. Löwiseba40652007-08-30 20:10:57 +000017779 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017781
17782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017785ac_res=`eval echo '${'$as_ac_var'}'`
17786 { echo "$as_me:$LINENO: result: $ac_res" >&5
17787echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017788if test `eval echo '${'$as_ac_var'}'` = yes; then
17789 cat >>confdefs.h <<_ACEOF
17790#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17791_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017792
Martin v. Löwis1142de32002-03-29 16:28:31 +000017793else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017794 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017795 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17797 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017798esac
17799
Martin v. Löwis1142de32002-03-29 16:28:31 +000017800fi
17801done
17802
17803
Martin v. Löwis11437992002-04-12 09:54:03 +000017804
Martin v. Löwis1142de32002-03-29 16:28:31 +000017805for ac_func in getpgrp
17806do
Martin v. Löwis11437992002-04-12 09:54:03 +000017807as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17809echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17810if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017812else
Martin v. Löwis11437992002-04-12 09:54:03 +000017813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017814/* confdefs.h. */
17815_ACEOF
17816cat confdefs.h >>conftest.$ac_ext
17817cat >>conftest.$ac_ext <<_ACEOF
17818/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017819/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17820 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17821#define $ac_func innocuous_$ac_func
17822
Martin v. Löwis1142de32002-03-29 16:28:31 +000017823/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017824 which can conflict with char $ac_func (); below.
17825 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017826 <limits.h> exists even on freestanding compilers. */
17827
17828#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017829# include <limits.h>
17830#else
17831# include <assert.h>
17832#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017833
17834#undef $ac_func
17835
Martin v. Löwiseba40652007-08-30 20:10:57 +000017836/* Override any GCC internal prototype to avoid an error.
17837 Use char because int might match the return type of a GCC
17838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017839#ifdef __cplusplus
17840extern "C"
17841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017842char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017843/* The GNU C library defines this for functions which it implements
17844 to always fail with ENOSYS. Some functions are actually named
17845 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017846#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017847choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017848#endif
17849
Skip Montanaro6dead952003-09-25 14:50:04 +000017850int
17851main ()
17852{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017853return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017854 ;
17855 return 0;
17856}
17857_ACEOF
17858rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017859if { (ac_try="$ac_link"
17860case "(($ac_try" in
17861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17862 *) ac_try_echo=$ac_try;;
17863esac
17864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17865 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867 grep -v '^ *+' conftest.er1 >conftest.err
17868 rm -f conftest.er1
17869 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017871 (exit $ac_status); } && {
17872 test -z "$ac_c_werror_flag" ||
17873 test ! -s conftest.err
17874 } && test -s conftest$ac_exeext &&
17875 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017877else
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017879sed 's/^/| /' conftest.$ac_ext >&5
17880
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017883
17884rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017885 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017887ac_res=`eval echo '${'$as_ac_var'}'`
17888 { echo "$as_me:$LINENO: result: $ac_res" >&5
17889echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017890if test `eval echo '${'$as_ac_var'}'` = yes; then
17891 cat >>confdefs.h <<_ACEOF
17892#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17893_ACEOF
17894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017900#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017901int
17902main ()
17903{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017904getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 ;
17906 return 0;
17907}
17908_ACEOF
17909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017910if { (ac_try="$ac_compile"
17911case "(($ac_try" in
17912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17913 *) ac_try_echo=$ac_try;;
17914esac
17915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017918 grep -v '^ *+' conftest.er1 >conftest.err
17919 rm -f conftest.er1
17920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017922 (exit $ac_status); } && {
17923 test -z "$ac_c_werror_flag" ||
17924 test ! -s conftest.err
17925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017926
17927cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017928#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017929_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017930
Martin v. Löwis11437992002-04-12 09:54:03 +000017931
Guido van Rossumf78abae1997-01-21 22:02:36 +000017932else
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017934sed 's/^/| /' conftest.$ac_ext >&5
17935
Martin v. Löwiseba40652007-08-30 20:10:57 +000017936
Guido van Rossum627b2d71993-12-24 10:39:16 +000017937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017938
17939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017940
Guido van Rossum627b2d71993-12-24 10:39:16 +000017941fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017942done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017943
Jack Jansen150753c2003-03-29 22:07:47 +000017944
17945for ac_func in setpgrp
17946do
17947as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017948{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17949echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17950if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017952else
Martin v. Löwis11437992002-04-12 09:54:03 +000017953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017954/* confdefs.h. */
17955_ACEOF
17956cat confdefs.h >>conftest.$ac_ext
17957cat >>conftest.$ac_ext <<_ACEOF
17958/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017959/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17960 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17961#define $ac_func innocuous_$ac_func
17962
Jack Jansen150753c2003-03-29 22:07:47 +000017963/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017964 which can conflict with char $ac_func (); below.
17965 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017966 <limits.h> exists even on freestanding compilers. */
17967
17968#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017969# include <limits.h>
17970#else
17971# include <assert.h>
17972#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017973
17974#undef $ac_func
17975
Martin v. Löwiseba40652007-08-30 20:10:57 +000017976/* Override any GCC internal prototype to avoid an error.
17977 Use char because int might match the return type of a GCC
17978 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017979#ifdef __cplusplus
17980extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017981#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017982char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017983/* The GNU C library defines this for functions which it implements
17984 to always fail with ENOSYS. Some functions are actually named
17985 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017986#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017987choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017988#endif
17989
Skip Montanaro6dead952003-09-25 14:50:04 +000017990int
17991main ()
17992{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 ;
17995 return 0;
17996}
17997_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017998rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999if { (ac_try="$ac_link"
18000case "(($ac_try" in
18001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18002 *) ac_try_echo=$ac_try;;
18003esac
18004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18005 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018007 grep -v '^ *+' conftest.er1 >conftest.err
18008 rm -f conftest.er1
18009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011 (exit $ac_status); } && {
18012 test -z "$ac_c_werror_flag" ||
18013 test ! -s conftest.err
18014 } && test -s conftest$ac_exeext &&
18015 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018016 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018017else
Jack Jansen150753c2003-03-29 22:07:47 +000018018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018019sed 's/^/| /' conftest.$ac_ext >&5
18020
Martin v. Löwiseba40652007-08-30 20:10:57 +000018021 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023
18024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018025 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018027ac_res=`eval echo '${'$as_ac_var'}'`
18028 { echo "$as_me:$LINENO: result: $ac_res" >&5
18029echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018030if test `eval echo '${'$as_ac_var'}'` = yes; then
18031 cat >>confdefs.h <<_ACEOF
18032#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18033_ACEOF
18034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018035/* confdefs.h. */
18036_ACEOF
18037cat confdefs.h >>conftest.$ac_ext
18038cat >>conftest.$ac_ext <<_ACEOF
18039/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018040#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018041int
18042main ()
18043{
18044setpgrp(0,0);
18045 ;
18046 return 0;
18047}
18048_ACEOF
18049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018050if { (ac_try="$ac_compile"
18051case "(($ac_try" in
18052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18053 *) ac_try_echo=$ac_try;;
18054esac
18055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18056 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018058 grep -v '^ *+' conftest.er1 >conftest.err
18059 rm -f conftest.er1
18060 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018062 (exit $ac_status); } && {
18063 test -z "$ac_c_werror_flag" ||
18064 test ! -s conftest.err
18065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018066
18067cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018068#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018069_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018070
Jack Jansen150753c2003-03-29 22:07:47 +000018071
18072else
18073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018074sed 's/^/| /' conftest.$ac_ext >&5
18075
Martin v. Löwiseba40652007-08-30 20:10:57 +000018076
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078
18079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018080
18081fi
18082done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018083
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
Thomas Wouters3a584202000-08-05 23:28:51 +000018085for ac_func in gettimeofday
18086do
Martin v. Löwis11437992002-04-12 09:54:03 +000018087as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18089echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18090if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018092else
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018094/* confdefs.h. */
18095_ACEOF
18096cat confdefs.h >>conftest.$ac_ext
18097cat >>conftest.$ac_ext <<_ACEOF
18098/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018099/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18101#define $ac_func innocuous_$ac_func
18102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018103/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018104 which can conflict with char $ac_func (); below.
18105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018106 <limits.h> exists even on freestanding compilers. */
18107
18108#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018109# include <limits.h>
18110#else
18111# include <assert.h>
18112#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018113
18114#undef $ac_func
18115
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116/* Override any GCC internal prototype to avoid an error.
18117 Use char because int might match the return type of a GCC
18118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018119#ifdef __cplusplus
18120extern "C"
18121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018122char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018123/* The GNU C library defines this for functions which it implements
18124 to always fail with ENOSYS. Some functions are actually named
18125 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018127choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018128#endif
18129
Skip Montanaro6dead952003-09-25 14:50:04 +000018130int
18131main ()
18132{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018133return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 ;
18135 return 0;
18136}
18137_ACEOF
18138rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018139if { (ac_try="$ac_link"
18140case "(($ac_try" in
18141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18142 *) ac_try_echo=$ac_try;;
18143esac
18144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018147 grep -v '^ *+' conftest.er1 >conftest.err
18148 rm -f conftest.er1
18149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151 (exit $ac_status); } && {
18152 test -z "$ac_c_werror_flag" ||
18153 test ! -s conftest.err
18154 } && test -s conftest$ac_exeext &&
18155 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018157else
Martin v. Löwis11437992002-04-12 09:54:03 +000018158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018159sed 's/^/| /' conftest.$ac_ext >&5
18160
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018163
18164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018167ac_res=`eval echo '${'$as_ac_var'}'`
18168 { echo "$as_me:$LINENO: result: $ac_res" >&5
18169echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018170if test `eval echo '${'$as_ac_var'}'` = yes; then
18171 cat >>confdefs.h <<_ACEOF
18172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18173_ACEOF
18174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018175/* confdefs.h. */
18176_ACEOF
18177cat confdefs.h >>conftest.$ac_ext
18178cat >>conftest.$ac_ext <<_ACEOF
18179/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018180#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018181int
18182main ()
18183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018184gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018185 ;
18186 return 0;
18187}
18188_ACEOF
18189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018190if { (ac_try="$ac_compile"
18191case "(($ac_try" in
18192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18193 *) ac_try_echo=$ac_try;;
18194esac
18195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018198 grep -v '^ *+' conftest.er1 >conftest.err
18199 rm -f conftest.er1
18200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018202 (exit $ac_status); } && {
18203 test -z "$ac_c_werror_flag" ||
18204 test ! -s conftest.err
18205 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018206 :
18207else
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018209sed 's/^/| /' conftest.$ac_ext >&5
18210
Martin v. Löwis11437992002-04-12 09:54:03 +000018211
18212cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018213#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018214_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018215
Martin v. Löwis11437992002-04-12 09:54:03 +000018216
Guido van Rossum627b2d71993-12-24 10:39:16 +000018217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218
18219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018220
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018221fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018222done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018223
Michael W. Hudson54241132001-12-07 15:38:26 +000018224
Martin v. Löwiseba40652007-08-30 20:10:57 +000018225{ echo "$as_me:$LINENO: checking for major" >&5
18226echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018228/* confdefs.h. */
18229_ACEOF
18230cat confdefs.h >>conftest.$ac_ext
18231cat >>conftest.$ac_ext <<_ACEOF
18232/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018233
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018234#if defined(MAJOR_IN_MKDEV)
18235#include <sys/mkdev.h>
18236#elif defined(MAJOR_IN_SYSMACROS)
18237#include <sys/sysmacros.h>
18238#else
18239#include <sys/types.h>
18240#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018241
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018242int
18243main ()
18244{
18245
18246 makedev(major(0),minor(0));
18247
18248 ;
18249 return 0;
18250}
18251_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018252rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018253if { (ac_try="$ac_link"
18254case "(($ac_try" in
18255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18256 *) ac_try_echo=$ac_try;;
18257esac
18258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18259 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018261 grep -v '^ *+' conftest.er1 >conftest.err
18262 rm -f conftest.er1
18263 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018265 (exit $ac_status); } && {
18266 test -z "$ac_c_werror_flag" ||
18267 test ! -s conftest.err
18268 } && test -s conftest$ac_exeext &&
18269 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018270
18271
18272cat >>confdefs.h <<\_ACEOF
18273#define HAVE_DEVICE_MACROS 1
18274_ACEOF
18275
Martin v. Löwiseba40652007-08-30 20:10:57 +000018276 { echo "$as_me:$LINENO: result: yes" >&5
18277echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018278
18279else
18280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018281sed 's/^/| /' conftest.$ac_ext >&5
18282
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018283
Martin v. Löwiseba40652007-08-30 20:10:57 +000018284 { echo "$as_me:$LINENO: result: no" >&5
18285echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018286
18287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018288
18289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018290 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018291
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018292# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018293# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18295echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018302
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018303#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018304#include <sys/socket.h>
18305#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018306#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308int
18309main ()
18310{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018311
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018312getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018313
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 ;
18315 return 0;
18316}
18317_ACEOF
18318rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018319if { (ac_try="$ac_link"
18320case "(($ac_try" in
18321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18322 *) ac_try_echo=$ac_try;;
18323esac
18324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18325 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018327 grep -v '^ *+' conftest.er1 >conftest.err
18328 rm -f conftest.er1
18329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018331 (exit $ac_status); } && {
18332 test -z "$ac_c_werror_flag" ||
18333 test ! -s conftest.err
18334 } && test -s conftest$ac_exeext &&
18335 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018336
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337{ echo "$as_me:$LINENO: result: yes" >&5
18338echo "${ECHO_T}yes" >&6; }
18339{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18340echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018341if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018342 { echo "$as_me:$LINENO: result: buggy" >&5
18343echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018344buggygetaddrinfo=yes
18345else
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018347/* confdefs.h. */
18348_ACEOF
18349cat confdefs.h >>conftest.$ac_ext
18350cat >>conftest.$ac_ext <<_ACEOF
18351/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018352
18353#include <sys/types.h>
18354#include <netdb.h>
18355#include <string.h>
18356#include <sys/socket.h>
18357#include <netinet/in.h>
18358
18359main()
18360{
18361 int passive, gaierr, inet4 = 0, inet6 = 0;
18362 struct addrinfo hints, *ai, *aitop;
18363 char straddr[INET6_ADDRSTRLEN], strport[16];
18364
18365 for (passive = 0; passive <= 1; passive++) {
18366 memset(&hints, 0, sizeof(hints));
18367 hints.ai_family = AF_UNSPEC;
18368 hints.ai_flags = passive ? AI_PASSIVE : 0;
18369 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018370 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018371 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18372 (void)gai_strerror(gaierr);
18373 goto bad;
18374 }
18375 for (ai = aitop; ai; ai = ai->ai_next) {
18376 if (ai->ai_addr == NULL ||
18377 ai->ai_addrlen == 0 ||
18378 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18379 straddr, sizeof(straddr), strport, sizeof(strport),
18380 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18381 goto bad;
18382 }
18383 switch (ai->ai_family) {
18384 case AF_INET:
18385 if (strcmp(strport, "54321") != 0) {
18386 goto bad;
18387 }
18388 if (passive) {
18389 if (strcmp(straddr, "0.0.0.0") != 0) {
18390 goto bad;
18391 }
18392 } else {
18393 if (strcmp(straddr, "127.0.0.1") != 0) {
18394 goto bad;
18395 }
18396 }
18397 inet4++;
18398 break;
18399 case AF_INET6:
18400 if (strcmp(strport, "54321") != 0) {
18401 goto bad;
18402 }
18403 if (passive) {
18404 if (strcmp(straddr, "::") != 0) {
18405 goto bad;
18406 }
18407 } else {
18408 if (strcmp(straddr, "::1") != 0) {
18409 goto bad;
18410 }
18411 }
18412 inet6++;
18413 break;
18414 case AF_UNSPEC:
18415 goto bad;
18416 break;
18417 default:
18418 /* another family support? */
18419 break;
18420 }
18421 }
18422 }
18423
18424 if (!(inet4 == 0 || inet4 == 2))
18425 goto bad;
18426 if (!(inet6 == 0 || inet6 == 2))
18427 goto bad;
18428
18429 if (aitop)
18430 freeaddrinfo(aitop);
18431 exit(0);
18432
18433 bad:
18434 if (aitop)
18435 freeaddrinfo(aitop);
18436 exit(1);
18437}
18438
Martin v. Löwis11437992002-04-12 09:54:03 +000018439_ACEOF
18440rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018441if { (ac_try="$ac_link"
18442case "(($ac_try" in
18443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18444 *) ac_try_echo=$ac_try;;
18445esac
18446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18447 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 ac_status=$?
18449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 { (case "(($ac_try" in
18452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18453 *) ac_try_echo=$ac_try;;
18454esac
18455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18456 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 ac_status=$?
18458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18459 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460 { echo "$as_me:$LINENO: result: good" >&5
18461echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018462buggygetaddrinfo=no
18463else
Martin v. Löwis11437992002-04-12 09:54:03 +000018464 echo "$as_me: program exited with status $ac_status" >&5
18465echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018466sed 's/^/| /' conftest.$ac_ext >&5
18467
Martin v. Löwis11437992002-04-12 09:54:03 +000018468( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018469{ echo "$as_me:$LINENO: result: buggy" >&5
18470echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018471buggygetaddrinfo=yes
18472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473rm -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 +000018474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018475
18476
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018477else
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018479sed 's/^/| /' conftest.$ac_ext >&5
18480
Martin v. Löwis11437992002-04-12 09:54:03 +000018481
Martin v. Löwiseba40652007-08-30 20:10:57 +000018482{ echo "$as_me:$LINENO: result: no" >&5
18483echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018484buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018485
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018487
18488rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018490
18491if test "$buggygetaddrinfo" = "yes"; then
18492 if test "$ipv6" = "yes"; then
18493 echo 'Fatal: You must get working getaddrinfo() function.'
18494 echo ' or you can specify "--disable-ipv6"'.
18495 exit 1
18496 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018497else
Martin v. Löwis11437992002-04-12 09:54:03 +000018498
18499cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018500#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018501_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018502
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018504
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018505for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018506do
Martin v. Löwis11437992002-04-12 09:54:03 +000018507as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18509echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18510if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018512else
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018514/* confdefs.h. */
18515_ACEOF
18516cat confdefs.h >>conftest.$ac_ext
18517cat >>conftest.$ac_ext <<_ACEOF
18518/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018519/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18520 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18521#define $ac_func innocuous_$ac_func
18522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018523/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018524 which can conflict with char $ac_func (); below.
18525 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018526 <limits.h> exists even on freestanding compilers. */
18527
18528#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018529# include <limits.h>
18530#else
18531# include <assert.h>
18532#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018533
18534#undef $ac_func
18535
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536/* Override any GCC internal prototype to avoid an error.
18537 Use char because int might match the return type of a GCC
18538 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018539#ifdef __cplusplus
18540extern "C"
18541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018542char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018543/* The GNU C library defines this for functions which it implements
18544 to always fail with ENOSYS. Some functions are actually named
18545 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018546#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018547choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018548#endif
18549
Skip Montanaro6dead952003-09-25 14:50:04 +000018550int
18551main ()
18552{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 ;
18555 return 0;
18556}
18557_ACEOF
18558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018559if { (ac_try="$ac_link"
18560case "(($ac_try" in
18561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18562 *) ac_try_echo=$ac_try;;
18563esac
18564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018567 grep -v '^ *+' conftest.er1 >conftest.err
18568 rm -f conftest.er1
18569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018571 (exit $ac_status); } && {
18572 test -z "$ac_c_werror_flag" ||
18573 test ! -s conftest.err
18574 } && test -s conftest$ac_exeext &&
18575 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018577else
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018579sed 's/^/| /' conftest.$ac_ext >&5
18580
Martin v. Löwiseba40652007-08-30 20:10:57 +000018581 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018583
18584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018585 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587ac_res=`eval echo '${'$as_ac_var'}'`
18588 { echo "$as_me:$LINENO: result: $ac_res" >&5
18589echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018590if test `eval echo '${'$as_ac_var'}'` = yes; then
18591 cat >>confdefs.h <<_ACEOF
18592#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18593_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018594
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018595fi
18596done
18597
Michael W. Hudson54241132001-12-07 15:38:26 +000018598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018599# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18601echo $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 +000018602if test "${ac_cv_header_time+set}" = set; then
18603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018604else
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018606/* confdefs.h. */
18607_ACEOF
18608cat confdefs.h >>conftest.$ac_ext
18609cat >>conftest.$ac_ext <<_ACEOF
18610/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018611#include <sys/types.h>
18612#include <sys/time.h>
18613#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018614
Martin v. Löwis11437992002-04-12 09:54:03 +000018615int
18616main ()
18617{
18618if ((struct tm *) 0)
18619return 0;
18620 ;
18621 return 0;
18622}
18623_ACEOF
18624rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625if { (ac_try="$ac_compile"
18626case "(($ac_try" in
18627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18628 *) ac_try_echo=$ac_try;;
18629esac
18630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 grep -v '^ *+' conftest.er1 >conftest.err
18634 rm -f conftest.er1
18635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018637 (exit $ac_status); } && {
18638 test -z "$ac_c_werror_flag" ||
18639 test ! -s conftest.err
18640 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018641 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018642else
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018644sed 's/^/| /' conftest.$ac_ext >&5
18645
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018648
18649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18652echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018653if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018654
18655cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018656#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018657_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018658
18659fi
18660
Martin v. Löwiseba40652007-08-30 20:10:57 +000018661{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18662echo $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 +000018663if test "${ac_cv_struct_tm+set}" = set; then
18664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018665else
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018667/* confdefs.h. */
18668_ACEOF
18669cat confdefs.h >>conftest.$ac_ext
18670cat >>conftest.$ac_ext <<_ACEOF
18671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018672#include <sys/types.h>
18673#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018674
Martin v. Löwis11437992002-04-12 09:54:03 +000018675int
18676main ()
18677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018678struct tm tm;
18679 int *p = &tm.tm_sec;
18680 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 ;
18682 return 0;
18683}
18684_ACEOF
18685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686if { (ac_try="$ac_compile"
18687case "(($ac_try" in
18688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18689 *) ac_try_echo=$ac_try;;
18690esac
18691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018694 grep -v '^ *+' conftest.er1 >conftest.err
18695 rm -f conftest.er1
18696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018698 (exit $ac_status); } && {
18699 test -z "$ac_c_werror_flag" ||
18700 test ! -s conftest.err
18701 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018702 ac_cv_struct_tm=time.h
18703else
Martin v. Löwis11437992002-04-12 09:54:03 +000018704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018705sed 's/^/| /' conftest.$ac_ext >&5
18706
Martin v. Löwiseba40652007-08-30 20:10:57 +000018707 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018709
18710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018712{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18713echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018714if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018715
18716cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018717#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018718_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018719
18720fi
18721
Martin v. Löwiseba40652007-08-30 20:10:57 +000018722{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18723echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018724if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018726else
Martin v. Löwis11437992002-04-12 09:54:03 +000018727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018728/* confdefs.h. */
18729_ACEOF
18730cat confdefs.h >>conftest.$ac_ext
18731cat >>conftest.$ac_ext <<_ACEOF
18732/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018733#include <sys/types.h>
18734#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018735
18736
Martin v. Löwis11437992002-04-12 09:54:03 +000018737int
18738main ()
18739{
18740static struct tm ac_aggr;
18741if (ac_aggr.tm_zone)
18742return 0;
18743 ;
18744 return 0;
18745}
18746_ACEOF
18747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018748if { (ac_try="$ac_compile"
18749case "(($ac_try" in
18750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18751 *) ac_try_echo=$ac_try;;
18752esac
18753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018756 grep -v '^ *+' conftest.er1 >conftest.err
18757 rm -f conftest.er1
18758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018760 (exit $ac_status); } && {
18761 test -z "$ac_c_werror_flag" ||
18762 test ! -s conftest.err
18763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018765else
Martin v. Löwis11437992002-04-12 09:54:03 +000018766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018767sed 's/^/| /' conftest.$ac_ext >&5
18768
Martin v. Löwiseba40652007-08-30 20:10:57 +000018769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018770/* confdefs.h. */
18771_ACEOF
18772cat confdefs.h >>conftest.$ac_ext
18773cat >>conftest.$ac_ext <<_ACEOF
18774/* end confdefs.h. */
18775#include <sys/types.h>
18776#include <$ac_cv_struct_tm>
18777
18778
18779int
18780main ()
18781{
18782static struct tm ac_aggr;
18783if (sizeof ac_aggr.tm_zone)
18784return 0;
18785 ;
18786 return 0;
18787}
18788_ACEOF
18789rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018790if { (ac_try="$ac_compile"
18791case "(($ac_try" in
18792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18793 *) ac_try_echo=$ac_try;;
18794esac
18795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18796 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018798 grep -v '^ *+' conftest.er1 >conftest.err
18799 rm -f conftest.er1
18800 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802 (exit $ac_status); } && {
18803 test -z "$ac_c_werror_flag" ||
18804 test ! -s conftest.err
18805 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018806 ac_cv_member_struct_tm_tm_zone=yes
18807else
18808 echo "$as_me: failed program was:" >&5
18809sed 's/^/| /' conftest.$ac_ext >&5
18810
Martin v. Löwiseba40652007-08-30 20:10:57 +000018811 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018813
18814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018816
18817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18820echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018821if test $ac_cv_member_struct_tm_tm_zone = yes; then
18822
18823cat >>confdefs.h <<_ACEOF
18824#define HAVE_STRUCT_TM_TM_ZONE 1
18825_ACEOF
18826
18827
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018828fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018829
Martin v. Löwis11437992002-04-12 09:54:03 +000018830if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18831
18832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018833#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018835
18836else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018837 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18838echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18839if test "${ac_cv_have_decl_tzname+set}" = set; then
18840 echo $ECHO_N "(cached) $ECHO_C" >&6
18841else
18842 cat >conftest.$ac_ext <<_ACEOF
18843/* confdefs.h. */
18844_ACEOF
18845cat confdefs.h >>conftest.$ac_ext
18846cat >>conftest.$ac_ext <<_ACEOF
18847/* end confdefs.h. */
18848#include <time.h>
18849
18850int
18851main ()
18852{
18853#ifndef tzname
18854 (void) tzname;
18855#endif
18856
18857 ;
18858 return 0;
18859}
18860_ACEOF
18861rm -f conftest.$ac_objext
18862if { (ac_try="$ac_compile"
18863case "(($ac_try" in
18864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18865 *) ac_try_echo=$ac_try;;
18866esac
18867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18868 (eval "$ac_compile") 2>conftest.er1
18869 ac_status=$?
18870 grep -v '^ *+' conftest.er1 >conftest.err
18871 rm -f conftest.er1
18872 cat conftest.err >&5
18873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18874 (exit $ac_status); } && {
18875 test -z "$ac_c_werror_flag" ||
18876 test ! -s conftest.err
18877 } && test -s conftest.$ac_objext; then
18878 ac_cv_have_decl_tzname=yes
18879else
18880 echo "$as_me: failed program was:" >&5
18881sed 's/^/| /' conftest.$ac_ext >&5
18882
18883 ac_cv_have_decl_tzname=no
18884fi
18885
18886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18887fi
18888{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18889echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18890if test $ac_cv_have_decl_tzname = yes; then
18891
18892cat >>confdefs.h <<_ACEOF
18893#define HAVE_DECL_TZNAME 1
18894_ACEOF
18895
18896
18897else
18898 cat >>confdefs.h <<_ACEOF
18899#define HAVE_DECL_TZNAME 0
18900_ACEOF
18901
18902
18903fi
18904
18905
18906 { echo "$as_me:$LINENO: checking for tzname" >&5
18907echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018908if test "${ac_cv_var_tzname+set}" = set; then
18909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018910else
Martin v. Löwis11437992002-04-12 09:54:03 +000018911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018912/* confdefs.h. */
18913_ACEOF
18914cat confdefs.h >>conftest.$ac_ext
18915cat >>conftest.$ac_ext <<_ACEOF
18916/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018917#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018918#if !HAVE_DECL_TZNAME
18919extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018921
Martin v. Löwis11437992002-04-12 09:54:03 +000018922int
18923main ()
18924{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 ;
18927 return 0;
18928}
18929_ACEOF
18930rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931if { (ac_try="$ac_link"
18932case "(($ac_try" in
18933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934 *) ac_try_echo=$ac_try;;
18935esac
18936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18937 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018939 grep -v '^ *+' conftest.er1 >conftest.err
18940 rm -f conftest.er1
18941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943 (exit $ac_status); } && {
18944 test -z "$ac_c_werror_flag" ||
18945 test ! -s conftest.err
18946 } && test -s conftest$ac_exeext &&
18947 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018948 ac_cv_var_tzname=yes
18949else
Martin v. Löwis11437992002-04-12 09:54:03 +000018950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018951sed 's/^/| /' conftest.$ac_ext >&5
18952
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018955
18956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018957 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18960echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018961 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018962
18963cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018964#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018965_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018967 fi
18968fi
18969
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18971echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018972if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18973 echo $ECHO_N "(cached) $ECHO_C" >&6
18974else
18975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018976/* confdefs.h. */
18977_ACEOF
18978cat confdefs.h >>conftest.$ac_ext
18979cat >>conftest.$ac_ext <<_ACEOF
18980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018981$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018982int
18983main ()
18984{
18985static struct stat ac_aggr;
18986if (ac_aggr.st_rdev)
18987return 0;
18988 ;
18989 return 0;
18990}
18991_ACEOF
18992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018993if { (ac_try="$ac_compile"
18994case "(($ac_try" in
18995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18996 *) ac_try_echo=$ac_try;;
18997esac
18998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019001 grep -v '^ *+' conftest.er1 >conftest.err
19002 rm -f conftest.er1
19003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019005 (exit $ac_status); } && {
19006 test -z "$ac_c_werror_flag" ||
19007 test ! -s conftest.err
19008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 ac_cv_member_struct_stat_st_rdev=yes
19010else
19011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019012sed 's/^/| /' conftest.$ac_ext >&5
19013
Martin v. Löwiseba40652007-08-30 20:10:57 +000019014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019015/* confdefs.h. */
19016_ACEOF
19017cat confdefs.h >>conftest.$ac_ext
19018cat >>conftest.$ac_ext <<_ACEOF
19019/* end confdefs.h. */
19020$ac_includes_default
19021int
19022main ()
19023{
19024static struct stat ac_aggr;
19025if (sizeof ac_aggr.st_rdev)
19026return 0;
19027 ;
19028 return 0;
19029}
19030_ACEOF
19031rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032if { (ac_try="$ac_compile"
19033case "(($ac_try" in
19034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19035 *) ac_try_echo=$ac_try;;
19036esac
19037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19038 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 grep -v '^ *+' conftest.er1 >conftest.err
19041 rm -f conftest.er1
19042 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019044 (exit $ac_status); } && {
19045 test -z "$ac_c_werror_flag" ||
19046 test ! -s conftest.err
19047 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019048 ac_cv_member_struct_stat_st_rdev=yes
19049else
19050 echo "$as_me: failed program was:" >&5
19051sed 's/^/| /' conftest.$ac_ext >&5
19052
Martin v. Löwiseba40652007-08-30 20:10:57 +000019053 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019055
19056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058
19059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19062echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019063if test $ac_cv_member_struct_stat_st_rdev = yes; then
19064
19065cat >>confdefs.h <<_ACEOF
19066#define HAVE_STRUCT_STAT_ST_RDEV 1
19067_ACEOF
19068
19069
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019070fi
19071
Martin v. Löwiseba40652007-08-30 20:10:57 +000019072{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19073echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019074if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019076else
Martin v. Löwis11437992002-04-12 09:54:03 +000019077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019078/* confdefs.h. */
19079_ACEOF
19080cat confdefs.h >>conftest.$ac_ext
19081cat >>conftest.$ac_ext <<_ACEOF
19082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019083$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019084int
19085main ()
19086{
19087static struct stat ac_aggr;
19088if (ac_aggr.st_blksize)
19089return 0;
19090 ;
19091 return 0;
19092}
19093_ACEOF
19094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019095if { (ac_try="$ac_compile"
19096case "(($ac_try" in
19097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19098 *) ac_try_echo=$ac_try;;
19099esac
19100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019103 grep -v '^ *+' conftest.er1 >conftest.err
19104 rm -f conftest.er1
19105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107 (exit $ac_status); } && {
19108 test -z "$ac_c_werror_flag" ||
19109 test ! -s conftest.err
19110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019112else
Martin v. Löwis11437992002-04-12 09:54:03 +000019113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019114sed 's/^/| /' conftest.$ac_ext >&5
19115
Martin v. Löwiseba40652007-08-30 20:10:57 +000019116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019117/* confdefs.h. */
19118_ACEOF
19119cat confdefs.h >>conftest.$ac_ext
19120cat >>conftest.$ac_ext <<_ACEOF
19121/* end confdefs.h. */
19122$ac_includes_default
19123int
19124main ()
19125{
19126static struct stat ac_aggr;
19127if (sizeof ac_aggr.st_blksize)
19128return 0;
19129 ;
19130 return 0;
19131}
19132_ACEOF
19133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019134if { (ac_try="$ac_compile"
19135case "(($ac_try" in
19136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19137 *) ac_try_echo=$ac_try;;
19138esac
19139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19140 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019142 grep -v '^ *+' conftest.er1 >conftest.err
19143 rm -f conftest.er1
19144 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019146 (exit $ac_status); } && {
19147 test -z "$ac_c_werror_flag" ||
19148 test ! -s conftest.err
19149 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019150 ac_cv_member_struct_stat_st_blksize=yes
19151else
19152 echo "$as_me: failed program was:" >&5
19153sed 's/^/| /' conftest.$ac_ext >&5
19154
Martin v. Löwiseba40652007-08-30 20:10:57 +000019155 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019157
19158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160
19161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019163{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19164echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019165if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019166
Martin v. Löwis11437992002-04-12 09:54:03 +000019167cat >>confdefs.h <<_ACEOF
19168#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19169_ACEOF
19170
19171
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019172fi
19173
Martin v. Löwiseba40652007-08-30 20:10:57 +000019174{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19175echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019176if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19177 echo $ECHO_N "(cached) $ECHO_C" >&6
19178else
19179 cat >conftest.$ac_ext <<_ACEOF
19180/* confdefs.h. */
19181_ACEOF
19182cat confdefs.h >>conftest.$ac_ext
19183cat >>conftest.$ac_ext <<_ACEOF
19184/* end confdefs.h. */
19185$ac_includes_default
19186int
19187main ()
19188{
19189static struct stat ac_aggr;
19190if (ac_aggr.st_flags)
19191return 0;
19192 ;
19193 return 0;
19194}
19195_ACEOF
19196rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197if { (ac_try="$ac_compile"
19198case "(($ac_try" in
19199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19200 *) ac_try_echo=$ac_try;;
19201esac
19202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19203 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019204 ac_status=$?
19205 grep -v '^ *+' conftest.er1 >conftest.err
19206 rm -f conftest.er1
19207 cat conftest.err >&5
19208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019209 (exit $ac_status); } && {
19210 test -z "$ac_c_werror_flag" ||
19211 test ! -s conftest.err
19212 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019213 ac_cv_member_struct_stat_st_flags=yes
19214else
19215 echo "$as_me: failed program was:" >&5
19216sed 's/^/| /' conftest.$ac_ext >&5
19217
Martin v. Löwiseba40652007-08-30 20:10:57 +000019218 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019219/* confdefs.h. */
19220_ACEOF
19221cat confdefs.h >>conftest.$ac_ext
19222cat >>conftest.$ac_ext <<_ACEOF
19223/* end confdefs.h. */
19224$ac_includes_default
19225int
19226main ()
19227{
19228static struct stat ac_aggr;
19229if (sizeof ac_aggr.st_flags)
19230return 0;
19231 ;
19232 return 0;
19233}
19234_ACEOF
19235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019236if { (ac_try="$ac_compile"
19237case "(($ac_try" in
19238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19239 *) ac_try_echo=$ac_try;;
19240esac
19241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19242 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019243 ac_status=$?
19244 grep -v '^ *+' conftest.er1 >conftest.err
19245 rm -f conftest.er1
19246 cat conftest.err >&5
19247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019248 (exit $ac_status); } && {
19249 test -z "$ac_c_werror_flag" ||
19250 test ! -s conftest.err
19251 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019252 ac_cv_member_struct_stat_st_flags=yes
19253else
19254 echo "$as_me: failed program was:" >&5
19255sed 's/^/| /' conftest.$ac_ext >&5
19256
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259
19260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019262
19263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019265{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19266echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019267if test $ac_cv_member_struct_stat_st_flags = yes; then
19268
19269cat >>confdefs.h <<_ACEOF
19270#define HAVE_STRUCT_STAT_ST_FLAGS 1
19271_ACEOF
19272
19273
19274fi
19275
Martin v. Löwiseba40652007-08-30 20:10:57 +000019276{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19277echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019278if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19279 echo $ECHO_N "(cached) $ECHO_C" >&6
19280else
19281 cat >conftest.$ac_ext <<_ACEOF
19282/* confdefs.h. */
19283_ACEOF
19284cat confdefs.h >>conftest.$ac_ext
19285cat >>conftest.$ac_ext <<_ACEOF
19286/* end confdefs.h. */
19287$ac_includes_default
19288int
19289main ()
19290{
19291static struct stat ac_aggr;
19292if (ac_aggr.st_gen)
19293return 0;
19294 ;
19295 return 0;
19296}
19297_ACEOF
19298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019299if { (ac_try="$ac_compile"
19300case "(($ac_try" in
19301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19302 *) ac_try_echo=$ac_try;;
19303esac
19304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019306 ac_status=$?
19307 grep -v '^ *+' conftest.er1 >conftest.err
19308 rm -f conftest.er1
19309 cat conftest.err >&5
19310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019311 (exit $ac_status); } && {
19312 test -z "$ac_c_werror_flag" ||
19313 test ! -s conftest.err
19314 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019315 ac_cv_member_struct_stat_st_gen=yes
19316else
19317 echo "$as_me: failed program was:" >&5
19318sed 's/^/| /' conftest.$ac_ext >&5
19319
Martin v. Löwiseba40652007-08-30 20:10:57 +000019320 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019321/* confdefs.h. */
19322_ACEOF
19323cat confdefs.h >>conftest.$ac_ext
19324cat >>conftest.$ac_ext <<_ACEOF
19325/* end confdefs.h. */
19326$ac_includes_default
19327int
19328main ()
19329{
19330static struct stat ac_aggr;
19331if (sizeof ac_aggr.st_gen)
19332return 0;
19333 ;
19334 return 0;
19335}
19336_ACEOF
19337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019338if { (ac_try="$ac_compile"
19339case "(($ac_try" in
19340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19341 *) ac_try_echo=$ac_try;;
19342esac
19343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019345 ac_status=$?
19346 grep -v '^ *+' conftest.er1 >conftest.err
19347 rm -f conftest.er1
19348 cat conftest.err >&5
19349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019350 (exit $ac_status); } && {
19351 test -z "$ac_c_werror_flag" ||
19352 test ! -s conftest.err
19353 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019354 ac_cv_member_struct_stat_st_gen=yes
19355else
19356 echo "$as_me: failed program was:" >&5
19357sed 's/^/| /' conftest.$ac_ext >&5
19358
Martin v. Löwiseba40652007-08-30 20:10:57 +000019359 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019361
19362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364
19365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019367{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19368echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019369if test $ac_cv_member_struct_stat_st_gen = yes; then
19370
19371cat >>confdefs.h <<_ACEOF
19372#define HAVE_STRUCT_STAT_ST_GEN 1
19373_ACEOF
19374
19375
19376fi
19377
Martin v. Löwiseba40652007-08-30 20:10:57 +000019378{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19379echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019380if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19381 echo $ECHO_N "(cached) $ECHO_C" >&6
19382else
19383 cat >conftest.$ac_ext <<_ACEOF
19384/* confdefs.h. */
19385_ACEOF
19386cat confdefs.h >>conftest.$ac_ext
19387cat >>conftest.$ac_ext <<_ACEOF
19388/* end confdefs.h. */
19389$ac_includes_default
19390int
19391main ()
19392{
19393static struct stat ac_aggr;
19394if (ac_aggr.st_birthtime)
19395return 0;
19396 ;
19397 return 0;
19398}
19399_ACEOF
19400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019401if { (ac_try="$ac_compile"
19402case "(($ac_try" in
19403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19404 *) ac_try_echo=$ac_try;;
19405esac
19406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019408 ac_status=$?
19409 grep -v '^ *+' conftest.er1 >conftest.err
19410 rm -f conftest.er1
19411 cat conftest.err >&5
19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019413 (exit $ac_status); } && {
19414 test -z "$ac_c_werror_flag" ||
19415 test ! -s conftest.err
19416 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019417 ac_cv_member_struct_stat_st_birthtime=yes
19418else
19419 echo "$as_me: failed program was:" >&5
19420sed 's/^/| /' conftest.$ac_ext >&5
19421
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019423/* confdefs.h. */
19424_ACEOF
19425cat confdefs.h >>conftest.$ac_ext
19426cat >>conftest.$ac_ext <<_ACEOF
19427/* end confdefs.h. */
19428$ac_includes_default
19429int
19430main ()
19431{
19432static struct stat ac_aggr;
19433if (sizeof ac_aggr.st_birthtime)
19434return 0;
19435 ;
19436 return 0;
19437}
19438_ACEOF
19439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019440if { (ac_try="$ac_compile"
19441case "(($ac_try" in
19442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19443 *) ac_try_echo=$ac_try;;
19444esac
19445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019447 ac_status=$?
19448 grep -v '^ *+' conftest.er1 >conftest.err
19449 rm -f conftest.er1
19450 cat conftest.err >&5
19451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019452 (exit $ac_status); } && {
19453 test -z "$ac_c_werror_flag" ||
19454 test ! -s conftest.err
19455 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019456 ac_cv_member_struct_stat_st_birthtime=yes
19457else
19458 echo "$as_me: failed program was:" >&5
19459sed 's/^/| /' conftest.$ac_ext >&5
19460
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019463
19464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466
19467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019469{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19470echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019471if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19472
19473cat >>confdefs.h <<_ACEOF
19474#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19475_ACEOF
19476
19477
19478fi
19479
Martin v. Löwiseba40652007-08-30 20:10:57 +000019480{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19481echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019482if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019484else
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019486/* confdefs.h. */
19487_ACEOF
19488cat confdefs.h >>conftest.$ac_ext
19489cat >>conftest.$ac_ext <<_ACEOF
19490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019491$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019492int
19493main ()
19494{
19495static struct stat ac_aggr;
19496if (ac_aggr.st_blocks)
19497return 0;
19498 ;
19499 return 0;
19500}
19501_ACEOF
19502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503if { (ac_try="$ac_compile"
19504case "(($ac_try" in
19505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19506 *) ac_try_echo=$ac_try;;
19507esac
19508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019511 grep -v '^ *+' conftest.er1 >conftest.err
19512 rm -f conftest.er1
19513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515 (exit $ac_status); } && {
19516 test -z "$ac_c_werror_flag" ||
19517 test ! -s conftest.err
19518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019520else
Martin v. Löwis11437992002-04-12 09:54:03 +000019521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019522sed 's/^/| /' conftest.$ac_ext >&5
19523
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019525/* confdefs.h. */
19526_ACEOF
19527cat confdefs.h >>conftest.$ac_ext
19528cat >>conftest.$ac_ext <<_ACEOF
19529/* end confdefs.h. */
19530$ac_includes_default
19531int
19532main ()
19533{
19534static struct stat ac_aggr;
19535if (sizeof ac_aggr.st_blocks)
19536return 0;
19537 ;
19538 return 0;
19539}
19540_ACEOF
19541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019542if { (ac_try="$ac_compile"
19543case "(($ac_try" in
19544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19545 *) ac_try_echo=$ac_try;;
19546esac
19547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19548 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019550 grep -v '^ *+' conftest.er1 >conftest.err
19551 rm -f conftest.er1
19552 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019554 (exit $ac_status); } && {
19555 test -z "$ac_c_werror_flag" ||
19556 test ! -s conftest.err
19557 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019558 ac_cv_member_struct_stat_st_blocks=yes
19559else
19560 echo "$as_me: failed program was:" >&5
19561sed 's/^/| /' conftest.$ac_ext >&5
19562
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019565
19566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568
19569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19572echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019573if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019574
Martin v. Löwis11437992002-04-12 09:54:03 +000019575cat >>confdefs.h <<_ACEOF
19576#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19577_ACEOF
19578
19579
19580cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019581#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019582_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019583
19584else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019586 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019587 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19588 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019589esac
19590
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019591fi
19592
Michael W. Hudson54241132001-12-07 15:38:26 +000019593
Martin v. Löwis11437992002-04-12 09:54:03 +000019594
Martin v. Löwiseba40652007-08-30 20:10:57 +000019595{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19596echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019597if test "${ac_cv_header_time_altzone+set}" = set; then
19598 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599else
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019601/* confdefs.h. */
19602_ACEOF
19603cat confdefs.h >>conftest.$ac_ext
19604cat >>conftest.$ac_ext <<_ACEOF
19605/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019606#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019607int
19608main ()
19609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019610return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 ;
19612 return 0;
19613}
19614_ACEOF
19615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616if { (ac_try="$ac_compile"
19617case "(($ac_try" in
19618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19619 *) ac_try_echo=$ac_try;;
19620esac
19621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019624 grep -v '^ *+' conftest.er1 >conftest.err
19625 rm -f conftest.er1
19626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019628 (exit $ac_status); } && {
19629 test -z "$ac_c_werror_flag" ||
19630 test ! -s conftest.err
19631 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019632 ac_cv_header_time_altzone=yes
19633else
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019635sed 's/^/| /' conftest.$ac_ext >&5
19636
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019638fi
19639
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19641fi
19642
19643{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19644echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019645if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019646
19647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019648#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019650
19651fi
19652
Guido van Rossumda88dad1995-01-26 00:46:29 +000019653was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019654{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19655echo $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 +000019656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019657/* confdefs.h. */
19658_ACEOF
19659cat confdefs.h >>conftest.$ac_ext
19660cat >>conftest.$ac_ext <<_ACEOF
19661/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019662
19663#include <sys/types.h>
19664#include <sys/select.h>
19665#include <sys/time.h>
19666
Martin v. Löwis11437992002-04-12 09:54:03 +000019667int
19668main ()
19669{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019670;
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 ;
19672 return 0;
19673}
19674_ACEOF
19675rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676if { (ac_try="$ac_compile"
19677case "(($ac_try" in
19678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19679 *) ac_try_echo=$ac_try;;
19680esac
19681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019684 grep -v '^ *+' conftest.er1 >conftest.err
19685 rm -f conftest.er1
19686 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019688 (exit $ac_status); } && {
19689 test -z "$ac_c_werror_flag" ||
19690 test ! -s conftest.err
19691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019692
19693
19694cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019695#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696_ACEOF
19697
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019698 was_it_defined=yes
19699
Guido van Rossumf78abae1997-01-21 22:02:36 +000019700else
Martin v. Löwis11437992002-04-12 09:54:03 +000019701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019702sed 's/^/| /' conftest.$ac_ext >&5
19703
Brett Cannon19fab762007-06-02 03:02:29 +000019704
Martin v. Löwiseba40652007-08-30 20:10:57 +000019705fi
19706
19707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19708{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19709echo "${ECHO_T}$was_it_defined" >&6; }
19710
19711{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19712echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019713if test "${ac_cv_struct_addrinfo+set}" = set; then
19714 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019715else
Martin v. Löwis11437992002-04-12 09:54:03 +000019716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019717/* confdefs.h. */
19718_ACEOF
19719cat confdefs.h >>conftest.$ac_ext
19720cat >>conftest.$ac_ext <<_ACEOF
19721/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019722
19723# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019724int
19725main ()
19726{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019727struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019728 ;
19729 return 0;
19730}
19731_ACEOF
19732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019733if { (ac_try="$ac_compile"
19734case "(($ac_try" in
19735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736 *) ac_try_echo=$ac_try;;
19737esac
19738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019741 grep -v '^ *+' conftest.er1 >conftest.err
19742 rm -f conftest.er1
19743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019745 (exit $ac_status); } && {
19746 test -z "$ac_c_werror_flag" ||
19747 test ! -s conftest.err
19748 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019749 ac_cv_struct_addrinfo=yes
19750else
Martin v. Löwis11437992002-04-12 09:54:03 +000019751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019752sed 's/^/| /' conftest.$ac_ext >&5
19753
Martin v. Löwiseba40652007-08-30 20:10:57 +000019754 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019755fi
19756
Martin v. Löwiseba40652007-08-30 20:10:57 +000019757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19758fi
19759
19760{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19761echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019762if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019763
19764cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019765#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019766_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019767
19768fi
19769
Martin v. Löwiseba40652007-08-30 20:10:57 +000019770{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19771echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019772if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19773 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019774else
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019776/* confdefs.h. */
19777_ACEOF
19778cat confdefs.h >>conftest.$ac_ext
19779cat >>conftest.$ac_ext <<_ACEOF
19780/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019781
19782# include <sys/types.h>
19783# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019784int
19785main ()
19786{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019787struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 ;
19789 return 0;
19790}
19791_ACEOF
19792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793if { (ac_try="$ac_compile"
19794case "(($ac_try" in
19795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19796 *) ac_try_echo=$ac_try;;
19797esac
19798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019801 grep -v '^ *+' conftest.er1 >conftest.err
19802 rm -f conftest.er1
19803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805 (exit $ac_status); } && {
19806 test -z "$ac_c_werror_flag" ||
19807 test ! -s conftest.err
19808 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019809 ac_cv_struct_sockaddr_storage=yes
19810else
Martin v. Löwis11437992002-04-12 09:54:03 +000019811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019812sed 's/^/| /' conftest.$ac_ext >&5
19813
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019815fi
19816
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19818fi
19819
19820{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19821echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019822if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019823
19824cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019825#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019826_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019827
19828fi
19829
Guido van Rossum627b2d71993-12-24 10:39:16 +000019830# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019831
Michael W. Hudson54241132001-12-07 15:38:26 +000019832
Martin v. Löwiseba40652007-08-30 20:10:57 +000019833{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19834echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019835if test "${ac_cv_c_char_unsigned+set}" = set; then
19836 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019837else
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019839/* confdefs.h. */
19840_ACEOF
19841cat confdefs.h >>conftest.$ac_ext
19842cat >>conftest.$ac_ext <<_ACEOF
19843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019844$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019845int
19846main ()
19847{
19848static int test_array [1 - 2 * !(((char) -1) < 0)];
19849test_array [0] = 0
19850
19851 ;
19852 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019853}
Martin v. Löwis11437992002-04-12 09:54:03 +000019854_ACEOF
19855rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019856if { (ac_try="$ac_compile"
19857case "(($ac_try" in
19858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19859 *) ac_try_echo=$ac_try;;
19860esac
19861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019864 grep -v '^ *+' conftest.er1 >conftest.err
19865 rm -f conftest.er1
19866 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868 (exit $ac_status); } && {
19869 test -z "$ac_c_werror_flag" ||
19870 test ! -s conftest.err
19871 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019872 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019873else
19874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019875sed 's/^/| /' conftest.$ac_ext >&5
19876
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019879
19880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19883echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019884if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019886#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019888
19889fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019890
Martin v. Löwiseba40652007-08-30 20:10:57 +000019891{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19892echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019893if test "${ac_cv_c_const+set}" = set; then
19894 echo $ECHO_N "(cached) $ECHO_C" >&6
19895else
19896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019897/* confdefs.h. */
19898_ACEOF
19899cat confdefs.h >>conftest.$ac_ext
19900cat >>conftest.$ac_ext <<_ACEOF
19901/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019902
Martin v. Löwis11437992002-04-12 09:54:03 +000019903int
19904main ()
19905{
19906/* FIXME: Include the comments suggested by Paul. */
19907#ifndef __cplusplus
19908 /* Ultrix mips cc rejects this. */
19909 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019910 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912 char const *const *pcpcc;
19913 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019914 /* NEC SVR4.0.2 mips cc rejects this. */
19915 struct point {int x, y;};
19916 static struct point const zero = {0,0};
19917 /* AIX XL C 1.02.0.0 rejects this.
19918 It does not let you subtract one const X* pointer from another in
19919 an arm of an if-expression whose if-part is not a constant
19920 expression */
19921 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019923 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924 ++pcpcc;
19925 ppc = (char**) pcpcc;
19926 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 { /* SCO 3.2v4 cc rejects this. */
19928 char *t;
19929 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019930
Martin v. Löwis11437992002-04-12 09:54:03 +000019931 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019933 }
19934 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19935 int x[] = {25, 17};
19936 const int *foo = &x[0];
19937 ++foo;
19938 }
19939 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19940 typedef const int *iptr;
19941 iptr p = 0;
19942 ++p;
19943 }
19944 { /* AIX XL C 1.02.0.0 rejects this saying
19945 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19946 struct s { int j; const int *ap[3]; };
19947 struct s *b; b->j = 5;
19948 }
19949 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19950 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019952 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019953 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019954#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019955
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 ;
19957 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019958}
Martin v. Löwis11437992002-04-12 09:54:03 +000019959_ACEOF
19960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961if { (ac_try="$ac_compile"
19962case "(($ac_try" in
19963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964 *) ac_try_echo=$ac_try;;
19965esac
19966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973 (exit $ac_status); } && {
19974 test -z "$ac_c_werror_flag" ||
19975 test ! -s conftest.err
19976 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019977 ac_cv_c_const=yes
19978else
Martin v. Löwis11437992002-04-12 09:54:03 +000019979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019980sed 's/^/| /' conftest.$ac_ext >&5
19981
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984
19985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19988echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019989if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019990
19991cat >>confdefs.h <<\_ACEOF
19992#define const
19993_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019994
19995fi
19996
Michael W. Hudson54241132001-12-07 15:38:26 +000019997
Guido van Rossumda88dad1995-01-26 00:46:29 +000019998works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999{ echo "$as_me:$LINENO: checking for working volatile" >&5
20000echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020002/* confdefs.h. */
20003_ACEOF
20004cat confdefs.h >>conftest.$ac_ext
20005cat >>conftest.$ac_ext <<_ACEOF
20006/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020007
Martin v. Löwis11437992002-04-12 09:54:03 +000020008int
20009main ()
20010{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020011volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020012 ;
20013 return 0;
20014}
20015_ACEOF
20016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017if { (ac_try="$ac_compile"
20018case "(($ac_try" in
20019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20020 *) ac_try_echo=$ac_try;;
20021esac
20022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020025 grep -v '^ *+' conftest.er1 >conftest.err
20026 rm -f conftest.er1
20027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029 (exit $ac_status); } && {
20030 test -z "$ac_c_werror_flag" ||
20031 test ! -s conftest.err
20032 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020033 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020034else
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020036sed 's/^/| /' conftest.$ac_ext >&5
20037
Martin v. Löwis11437992002-04-12 09:54:03 +000020038
20039cat >>confdefs.h <<\_ACEOF
20040#define volatile
20041_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020042
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020043
Guido van Rossum627b2d71993-12-24 10:39:16 +000020044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045
20046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20047{ echo "$as_me:$LINENO: result: $works" >&5
20048echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020049
Guido van Rossumda88dad1995-01-26 00:46:29 +000020050works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051{ echo "$as_me:$LINENO: checking for working signed char" >&5
20052echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020054/* confdefs.h. */
20055_ACEOF
20056cat confdefs.h >>conftest.$ac_ext
20057cat >>conftest.$ac_ext <<_ACEOF
20058/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020059
Martin v. Löwis11437992002-04-12 09:54:03 +000020060int
20061main ()
20062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020063signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020064 ;
20065 return 0;
20066}
20067_ACEOF
20068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069if { (ac_try="$ac_compile"
20070case "(($ac_try" in
20071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20072 *) ac_try_echo=$ac_try;;
20073esac
20074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020077 grep -v '^ *+' conftest.er1 >conftest.err
20078 rm -f conftest.er1
20079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081 (exit $ac_status); } && {
20082 test -z "$ac_c_werror_flag" ||
20083 test ! -s conftest.err
20084 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020085 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020086else
Martin v. Löwis11437992002-04-12 09:54:03 +000020087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020088sed 's/^/| /' conftest.$ac_ext >&5
20089
Martin v. Löwis11437992002-04-12 09:54:03 +000020090
20091cat >>confdefs.h <<\_ACEOF
20092#define signed
20093_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020095
Guido van Rossum7f43da71994-08-01 12:15:30 +000020096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020097
20098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20099{ echo "$as_me:$LINENO: result: $works" >&5
20100echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020101
Guido van Rossumda88dad1995-01-26 00:46:29 +000020102have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103{ echo "$as_me:$LINENO: checking for prototypes" >&5
20104echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020106/* confdefs.h. */
20107_ACEOF
20108cat confdefs.h >>conftest.$ac_ext
20109cat >>conftest.$ac_ext <<_ACEOF
20110/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020111int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020112int
20113main ()
20114{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020115return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 ;
20117 return 0;
20118}
20119_ACEOF
20120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121if { (ac_try="$ac_compile"
20122case "(($ac_try" in
20123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20124 *) ac_try_echo=$ac_try;;
20125esac
20126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020129 grep -v '^ *+' conftest.er1 >conftest.err
20130 rm -f conftest.er1
20131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 (exit $ac_status); } && {
20134 test -z "$ac_c_werror_flag" ||
20135 test ! -s conftest.err
20136 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020137
20138
20139cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020140#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020141_ACEOF
20142
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020143 have_prototypes=yes
20144
Guido van Rossumf78abae1997-01-21 22:02:36 +000020145else
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020147sed 's/^/| /' conftest.$ac_ext >&5
20148
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149
Guido van Rossum7f43da71994-08-01 12:15:30 +000020150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151
20152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20153{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20154echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020155
Guido van Rossumda88dad1995-01-26 00:46:29 +000020156works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020157{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20158echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020160/* confdefs.h. */
20161_ACEOF
20162cat confdefs.h >>conftest.$ac_ext
20163cat >>conftest.$ac_ext <<_ACEOF
20164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020165
20166#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020167int foo(int x, ...) {
20168 va_list va;
20169 va_start(va, x);
20170 va_arg(va, int);
20171 va_arg(va, char *);
20172 va_arg(va, double);
20173 return 0;
20174}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020175
Martin v. Löwis11437992002-04-12 09:54:03 +000020176int
20177main ()
20178{
Guido van Rossum90eea071996-08-30 20:58:57 +000020179return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 ;
20181 return 0;
20182}
20183_ACEOF
20184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185if { (ac_try="$ac_compile"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
20190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
20200 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020201
20202
20203cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020204#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020205_ACEOF
20206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020207 works=yes
20208
Guido van Rossumf78abae1997-01-21 22:02:36 +000020209else
Martin v. Löwis11437992002-04-12 09:54:03 +000020210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020211sed 's/^/| /' conftest.$ac_ext >&5
20212
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213
Guido van Rossum627b2d71993-12-24 10:39:16 +000020214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215
20216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20217{ echo "$as_me:$LINENO: result: $works" >&5
20218echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020219
Martin v. Löwisd6320502004-08-12 13:45:08 +000020220# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221{ echo "$as_me:$LINENO: checking for socketpair" >&5
20222echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020223cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020224/* confdefs.h. */
20225_ACEOF
20226cat confdefs.h >>conftest.$ac_ext
20227cat >>conftest.$ac_ext <<_ACEOF
20228/* end confdefs.h. */
20229
20230#include <sys/types.h>
20231#include <sys/socket.h>
20232
20233int
20234main ()
20235{
20236void *x=socketpair
20237 ;
20238 return 0;
20239}
20240_ACEOF
20241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242if { (ac_try="$ac_compile"
20243case "(($ac_try" in
20244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245 *) ac_try_echo=$ac_try;;
20246esac
20247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 grep -v '^ *+' conftest.er1 >conftest.err
20251 rm -f conftest.er1
20252 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254 (exit $ac_status); } && {
20255 test -z "$ac_c_werror_flag" ||
20256 test ! -s conftest.err
20257 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020258
20259cat >>confdefs.h <<\_ACEOF
20260#define HAVE_SOCKETPAIR 1
20261_ACEOF
20262
Martin v. Löwiseba40652007-08-30 20:10:57 +000020263 { echo "$as_me:$LINENO: result: yes" >&5
20264echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020265else
20266 echo "$as_me: failed program was:" >&5
20267sed 's/^/| /' conftest.$ac_ext >&5
20268
Martin v. Löwiseba40652007-08-30 20:10:57 +000020269 { echo "$as_me:$LINENO: result: no" >&5
20270echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020271
20272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020273
20274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020275
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020276# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20278echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020280/* confdefs.h. */
20281_ACEOF
20282cat confdefs.h >>conftest.$ac_ext
20283cat >>conftest.$ac_ext <<_ACEOF
20284/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020285#include <sys/types.h>
20286#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020287int
20288main ()
20289{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020290struct sockaddr x;
20291x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020292 ;
20293 return 0;
20294}
20295_ACEOF
20296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020297if { (ac_try="$ac_compile"
20298case "(($ac_try" in
20299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20300 *) ac_try_echo=$ac_try;;
20301esac
20302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020305 grep -v '^ *+' conftest.er1 >conftest.err
20306 rm -f conftest.er1
20307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020309 (exit $ac_status); } && {
20310 test -z "$ac_c_werror_flag" ||
20311 test ! -s conftest.err
20312 } && test -s conftest.$ac_objext; then
20313 { echo "$as_me:$LINENO: result: yes" >&5
20314echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020315
20316cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020317#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020318_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020319
20320else
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020322sed 's/^/| /' conftest.$ac_ext >&5
20323
Martin v. Löwiseba40652007-08-30 20:10:57 +000020324 { echo "$as_me:$LINENO: result: no" >&5
20325echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327
20328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020329
Guido van Rossumda88dad1995-01-26 00:46:29 +000020330va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20332echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020334/* confdefs.h. */
20335_ACEOF
20336cat confdefs.h >>conftest.$ac_ext
20337cat >>conftest.$ac_ext <<_ACEOF
20338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020339
20340#ifdef HAVE_STDARG_PROTOTYPES
20341#include <stdarg.h>
20342#else
20343#include <varargs.h>
20344#endif
20345
Martin v. Löwis11437992002-04-12 09:54:03 +000020346int
20347main ()
20348{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020349va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 ;
20351 return 0;
20352}
20353_ACEOF
20354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 (exit $ac_status); } && {
20368 test -z "$ac_c_werror_flag" ||
20369 test ! -s conftest.err
20370 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020371 :
20372else
Martin v. Löwis11437992002-04-12 09:54:03 +000020373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020374sed 's/^/| /' conftest.$ac_ext >&5
20375
Martin v. Löwis11437992002-04-12 09:54:03 +000020376
20377
20378cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020379#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020380_ACEOF
20381
Guido van Rossumda88dad1995-01-26 00:46:29 +000020382 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020383
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385
20386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20387{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20388echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020390# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020391
20392
20393
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20395echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020396if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020398else
Martin v. Löwis11437992002-04-12 09:54:03 +000020399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020400/* confdefs.h. */
20401_ACEOF
20402cat confdefs.h >>conftest.$ac_ext
20403cat >>conftest.$ac_ext <<_ACEOF
20404/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020405/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20406 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20407#define gethostbyname_r innocuous_gethostbyname_r
20408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020409/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020410 which can conflict with char gethostbyname_r (); below.
20411 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020412 <limits.h> exists even on freestanding compilers. */
20413
20414#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020415# include <limits.h>
20416#else
20417# include <assert.h>
20418#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020419
20420#undef gethostbyname_r
20421
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422/* Override any GCC internal prototype to avoid an error.
20423 Use char because int might match the return type of a GCC
20424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020425#ifdef __cplusplus
20426extern "C"
20427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020428char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020429/* The GNU C library defines this for functions which it implements
20430 to always fail with ENOSYS. Some functions are actually named
20431 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020432#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020433choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020434#endif
20435
Skip Montanaro6dead952003-09-25 14:50:04 +000020436int
20437main ()
20438{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 ;
20441 return 0;
20442}
20443_ACEOF
20444rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445if { (ac_try="$ac_link"
20446case "(($ac_try" in
20447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20448 *) ac_try_echo=$ac_try;;
20449esac
20450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 grep -v '^ *+' conftest.er1 >conftest.err
20454 rm -f conftest.er1
20455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 (exit $ac_status); } && {
20458 test -z "$ac_c_werror_flag" ||
20459 test ! -s conftest.err
20460 } && test -s conftest$ac_exeext &&
20461 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020462 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020463else
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020465sed 's/^/| /' conftest.$ac_ext >&5
20466
Martin v. Löwiseba40652007-08-30 20:10:57 +000020467 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469
20470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020471 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20474echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020475if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020476
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020478#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020479_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020480
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20482echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020483 OLD_CFLAGS=$CFLAGS
20484 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020486/* confdefs.h. */
20487_ACEOF
20488cat confdefs.h >>conftest.$ac_ext
20489cat >>conftest.$ac_ext <<_ACEOF
20490/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020491
20492# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020493
Martin v. Löwis11437992002-04-12 09:54:03 +000020494int
20495main ()
20496{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020497
20498 char *name;
20499 struct hostent *he, *res;
20500 char buffer[2048];
20501 int buflen = 2048;
20502 int h_errnop;
20503
20504 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020505
20506 ;
20507 return 0;
20508}
20509_ACEOF
20510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020511if { (ac_try="$ac_compile"
20512case "(($ac_try" in
20513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20514 *) ac_try_echo=$ac_try;;
20515esac
20516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020519 grep -v '^ *+' conftest.er1 >conftest.err
20520 rm -f conftest.er1
20521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523 (exit $ac_status); } && {
20524 test -z "$ac_c_werror_flag" ||
20525 test ! -s conftest.err
20526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020527
20528 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020529#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020530_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020531
Martin v. Löwis11437992002-04-12 09:54:03 +000020532
20533cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020534#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020535_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020536
Martin v. Löwiseba40652007-08-30 20:10:57 +000020537 { echo "$as_me:$LINENO: result: yes" >&5
20538echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020540else
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020542sed 's/^/| /' conftest.$ac_ext >&5
20543
Martin v. Löwis11437992002-04-12 09:54:03 +000020544
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545 { echo "$as_me:$LINENO: result: no" >&5
20546echo "${ECHO_T}no" >&6; }
20547 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20548echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020550/* confdefs.h. */
20551_ACEOF
20552cat confdefs.h >>conftest.$ac_ext
20553cat >>conftest.$ac_ext <<_ACEOF
20554/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020555
20556# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020557
Martin v. Löwis11437992002-04-12 09:54:03 +000020558int
20559main ()
20560{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020561
20562 char *name;
20563 struct hostent *he;
20564 char buffer[2048];
20565 int buflen = 2048;
20566 int h_errnop;
20567
20568 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020569
20570 ;
20571 return 0;
20572}
20573_ACEOF
20574rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020575if { (ac_try="$ac_compile"
20576case "(($ac_try" in
20577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20578 *) ac_try_echo=$ac_try;;
20579esac
20580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020583 grep -v '^ *+' conftest.er1 >conftest.err
20584 rm -f conftest.er1
20585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020587 (exit $ac_status); } && {
20588 test -z "$ac_c_werror_flag" ||
20589 test ! -s conftest.err
20590 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020591
20592 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020593#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020594_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020595
Martin v. Löwis11437992002-04-12 09:54:03 +000020596
20597cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020598#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020599_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020600
Martin v. Löwiseba40652007-08-30 20:10:57 +000020601 { echo "$as_me:$LINENO: result: yes" >&5
20602echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020604else
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020606sed 's/^/| /' conftest.$ac_ext >&5
20607
Martin v. Löwis11437992002-04-12 09:54:03 +000020608
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609 { echo "$as_me:$LINENO: result: no" >&5
20610echo "${ECHO_T}no" >&6; }
20611 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20612echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020614/* confdefs.h. */
20615_ACEOF
20616cat confdefs.h >>conftest.$ac_ext
20617cat >>conftest.$ac_ext <<_ACEOF
20618/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020619
20620# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020621
Martin v. Löwis11437992002-04-12 09:54:03 +000020622int
20623main ()
20624{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020625
20626 char *name;
20627 struct hostent *he;
20628 struct hostent_data data;
20629
20630 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020631
20632 ;
20633 return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637if { (ac_try="$ac_compile"
20638case "(($ac_try" in
20639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20640 *) ac_try_echo=$ac_try;;
20641esac
20642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020645 grep -v '^ *+' conftest.er1 >conftest.err
20646 rm -f conftest.er1
20647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649 (exit $ac_status); } && {
20650 test -z "$ac_c_werror_flag" ||
20651 test ! -s conftest.err
20652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020653
20654 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020655#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020656_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020657
Martin v. Löwis11437992002-04-12 09:54:03 +000020658
20659cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020660#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020661_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020662
Martin v. Löwiseba40652007-08-30 20:10:57 +000020663 { echo "$as_me:$LINENO: result: yes" >&5
20664echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020665
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020666else
Martin v. Löwis11437992002-04-12 09:54:03 +000020667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020668sed 's/^/| /' conftest.$ac_ext >&5
20669
Martin v. Löwis11437992002-04-12 09:54:03 +000020670
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671 { echo "$as_me:$LINENO: result: no" >&5
20672echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675
20676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020679
20680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020681
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683
20684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020685 CFLAGS=$OLD_CFLAGS
20686
20687else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020688
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
20690for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020691do
Martin v. Löwis11437992002-04-12 09:54:03 +000020692as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20694echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20695if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020697else
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020704/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20705 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20706#define $ac_func innocuous_$ac_func
20707
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020708/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020709 which can conflict with char $ac_func (); below.
20710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020711 <limits.h> exists even on freestanding compilers. */
20712
20713#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020714# include <limits.h>
20715#else
20716# include <assert.h>
20717#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020718
20719#undef $ac_func
20720
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721/* Override any GCC internal prototype to avoid an error.
20722 Use char because int might match the return type of a GCC
20723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020724#ifdef __cplusplus
20725extern "C"
20726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020727char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020728/* The GNU C library defines this for functions which it implements
20729 to always fail with ENOSYS. Some functions are actually named
20730 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020731#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020732choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020733#endif
20734
Skip Montanaro6dead952003-09-25 14:50:04 +000020735int
20736main ()
20737{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ;
20740 return 0;
20741}
20742_ACEOF
20743rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744if { (ac_try="$ac_link"
20745case "(($ac_try" in
20746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20747 *) ac_try_echo=$ac_try;;
20748esac
20749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20750 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 grep -v '^ *+' conftest.er1 >conftest.err
20753 rm -f conftest.er1
20754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020756 (exit $ac_status); } && {
20757 test -z "$ac_c_werror_flag" ||
20758 test ! -s conftest.err
20759 } && test -s conftest$ac_exeext &&
20760 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020762else
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020764sed 's/^/| /' conftest.$ac_ext >&5
20765
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768
20769rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020770 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020772ac_res=`eval echo '${'$as_ac_var'}'`
20773 { echo "$as_me:$LINENO: result: $ac_res" >&5
20774echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020775if test `eval echo '${'$as_ac_var'}'` = yes; then
20776 cat >>confdefs.h <<_ACEOF
20777#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20778_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020781done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020782
Michael W. Hudson54241132001-12-07 15:38:26 +000020783
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020784fi
20785
Michael W. Hudson54241132001-12-07 15:38:26 +000020786
20787
20788
20789
20790
20791
Guido van Rossum627b2d71993-12-24 10:39:16 +000020792# checks for system services
20793# (none yet)
20794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020795# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20797echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020798if test "${ac_cv_func___fpu_control+set}" = set; then
20799 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020800else
Martin v. Löwis11437992002-04-12 09:54:03 +000020801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020802/* confdefs.h. */
20803_ACEOF
20804cat confdefs.h >>conftest.$ac_ext
20805cat >>conftest.$ac_ext <<_ACEOF
20806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020807/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20809#define __fpu_control innocuous___fpu_control
20810
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020812 which can conflict with char __fpu_control (); below.
20813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020814 <limits.h> exists even on freestanding compilers. */
20815
20816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020817# include <limits.h>
20818#else
20819# include <assert.h>
20820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020821
20822#undef __fpu_control
20823
Martin v. Löwiseba40652007-08-30 20:10:57 +000020824/* Override any GCC internal prototype to avoid an error.
20825 Use char because int might match the return type of a GCC
20826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020827#ifdef __cplusplus
20828extern "C"
20829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020830char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020831/* The GNU C library defines this for functions which it implements
20832 to always fail with ENOSYS. Some functions are actually named
20833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020835choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020836#endif
20837
Skip Montanaro6dead952003-09-25 14:50:04 +000020838int
20839main ()
20840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020841return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020842 ;
20843 return 0;
20844}
20845_ACEOF
20846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847if { (ac_try="$ac_link"
20848case "(($ac_try" in
20849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20850 *) ac_try_echo=$ac_try;;
20851esac
20852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020855 grep -v '^ *+' conftest.er1 >conftest.err
20856 rm -f conftest.er1
20857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020859 (exit $ac_status); } && {
20860 test -z "$ac_c_werror_flag" ||
20861 test ! -s conftest.err
20862 } && test -s conftest$ac_exeext &&
20863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020864 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020865else
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020867sed 's/^/| /' conftest.$ac_ext >&5
20868
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871
20872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020873 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020875{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20876echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020877if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020878 :
20879else
Martin v. Löwis11437992002-04-12 09:54:03 +000020880
Martin v. Löwiseba40652007-08-30 20:10:57 +000020881{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20882echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020883if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020885else
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020887LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020889/* confdefs.h. */
20890_ACEOF
20891cat confdefs.h >>conftest.$ac_ext
20892cat >>conftest.$ac_ext <<_ACEOF
20893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020894
Martin v. Löwiseba40652007-08-30 20:10:57 +000020895/* Override any GCC internal prototype to avoid an error.
20896 Use char because int might match the return type of a GCC
20897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020898#ifdef __cplusplus
20899extern "C"
20900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020901char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020902int
20903main ()
20904{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020905return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020906 ;
20907 return 0;
20908}
20909_ACEOF
20910rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020911if { (ac_try="$ac_link"
20912case "(($ac_try" in
20913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20914 *) ac_try_echo=$ac_try;;
20915esac
20916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20917 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020919 grep -v '^ *+' conftest.er1 >conftest.err
20920 rm -f conftest.er1
20921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923 (exit $ac_status); } && {
20924 test -z "$ac_c_werror_flag" ||
20925 test ! -s conftest.err
20926 } && test -s conftest$ac_exeext &&
20927 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020929else
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020931sed 's/^/| /' conftest.$ac_ext >&5
20932
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935
20936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020937 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020938LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020940{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20941echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020942if test $ac_cv_lib_ieee___fpu_control = yes; then
20943 cat >>confdefs.h <<_ACEOF
20944#define HAVE_LIBIEEE 1
20945_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020947 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020948
Guido van Rossum627b2d71993-12-24 10:39:16 +000020949fi
20950
Michael W. Hudson54241132001-12-07 15:38:26 +000020951
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020952fi
20953
Michael W. Hudson54241132001-12-07 15:38:26 +000020954
Guido van Rossum7f253911997-05-09 02:42:48 +000020955# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020956{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20957echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020958
Martin v. Löwiseba40652007-08-30 20:10:57 +000020959# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020960if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020962if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020963then
20964
20965cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020966#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020967_ACEOF
20968
Martin v. Löwiseba40652007-08-30 20:10:57 +000020969 { echo "$as_me:$LINENO: result: yes" >&5
20970echo "${ECHO_T}yes" >&6; }
20971else { echo "$as_me:$LINENO: result: no" >&5
20972echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020973fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020974else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020975 { echo "$as_me:$LINENO: result: no" >&5
20976echo "${ECHO_T}no" >&6; }
20977fi
20978
Guido van Rossum7f253911997-05-09 02:42:48 +000020979
Guido van Rossum7f43da71994-08-01 12:15:30 +000020980# check for --with-libm=...
20981
Guido van Rossum563e7081996-09-10 18:20:48 +000020982case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020983Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020984BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020985*) LIBM=-lm
20986esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20988echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020989
Martin v. Löwiseba40652007-08-30 20:10:57 +000020990# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020991if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020992 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020993if test "$withval" = no
20994then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20996echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020997elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020998then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21000echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021001else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21002echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21003 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021004fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021005else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21007echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21008fi
21009
Guido van Rossum7f43da71994-08-01 12:15:30 +000021010
21011# check for --with-libc=...
21012
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21014echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021015
Martin v. Löwiseba40652007-08-30 20:10:57 +000021016# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021017if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021019if test "$withval" = no
21020then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021021 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21022echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021023elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021024then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21026echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021027else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21028echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21029 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021030fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021031else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021032 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21033echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21034fi
21035
Guido van Rossum7f43da71994-08-01 12:15:30 +000021036
Christian Heimes0a8143f2007-12-18 23:22:54 +000021037# ************************************
21038# * Check for mathematical functions *
21039# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021040
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021041LIBS_SAVE=$LIBS
21042LIBS="$LIBS $LIBM"
21043
Mark Dickinson265d7382008-04-21 22:32:24 +000021044# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21045# -0. on some architectures.
21046{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21047echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21048if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21049 echo $ECHO_N "(cached) $ECHO_C" >&6
21050else
21051
21052if test "$cross_compiling" = yes; then
21053 ac_cv_tanh_preserves_zero_sign=no
21054else
21055 cat >conftest.$ac_ext <<_ACEOF
21056/* confdefs.h. */
21057_ACEOF
21058cat confdefs.h >>conftest.$ac_ext
21059cat >>conftest.$ac_ext <<_ACEOF
21060/* end confdefs.h. */
21061
21062#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021063#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021064int main() {
21065 /* return 0 if either negative zeros don't exist
21066 on this platform or if negative zeros exist
21067 and tanh(-0.) == -0. */
21068 if (atan2(0., -1.) == atan2(-0., -1.) ||
21069 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21070 else exit(1);
21071}
21072
21073_ACEOF
21074rm -f conftest$ac_exeext
21075if { (ac_try="$ac_link"
21076case "(($ac_try" in
21077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21078 *) ac_try_echo=$ac_try;;
21079esac
21080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21081 (eval "$ac_link") 2>&5
21082 ac_status=$?
21083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21085 { (case "(($ac_try" in
21086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21087 *) ac_try_echo=$ac_try;;
21088esac
21089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21090 (eval "$ac_try") 2>&5
21091 ac_status=$?
21092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21093 (exit $ac_status); }; }; then
21094 ac_cv_tanh_preserves_zero_sign=yes
21095else
21096 echo "$as_me: program exited with status $ac_status" >&5
21097echo "$as_me: failed program was:" >&5
21098sed 's/^/| /' conftest.$ac_ext >&5
21099
21100( exit $ac_status )
21101ac_cv_tanh_preserves_zero_sign=no
21102fi
21103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21104fi
21105
21106
21107fi
21108
21109{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21110echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21111if test "$ac_cv_tanh_preserves_zero_sign" = yes
21112then
21113
21114cat >>confdefs.h <<\_ACEOF
21115#define TANH_PRESERVES_ZERO_SIGN 1
21116_ACEOF
21117
21118fi
21119
Martin v. Löwis11437992002-04-12 09:54:03 +000021120
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021121for ac_func in hypot
21122do
Martin v. Löwis11437992002-04-12 09:54:03 +000021123as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21125echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21126if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021128else
Martin v. Löwis11437992002-04-12 09:54:03 +000021129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021130/* confdefs.h. */
21131_ACEOF
21132cat confdefs.h >>conftest.$ac_ext
21133cat >>conftest.$ac_ext <<_ACEOF
21134/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021135/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21136 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21137#define $ac_func innocuous_$ac_func
21138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021139/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021140 which can conflict with char $ac_func (); below.
21141 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021142 <limits.h> exists even on freestanding compilers. */
21143
21144#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021145# include <limits.h>
21146#else
21147# include <assert.h>
21148#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021149
21150#undef $ac_func
21151
Martin v. Löwiseba40652007-08-30 20:10:57 +000021152/* Override any GCC internal prototype to avoid an error.
21153 Use char because int might match the return type of a GCC
21154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021155#ifdef __cplusplus
21156extern "C"
21157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021158char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021159/* The GNU C library defines this for functions which it implements
21160 to always fail with ENOSYS. Some functions are actually named
21161 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021162#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021163choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021164#endif
21165
Skip Montanaro6dead952003-09-25 14:50:04 +000021166int
21167main ()
21168{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021170 ;
21171 return 0;
21172}
21173_ACEOF
21174rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175if { (ac_try="$ac_link"
21176case "(($ac_try" in
21177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21178 *) ac_try_echo=$ac_try;;
21179esac
21180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21181 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021183 grep -v '^ *+' conftest.er1 >conftest.err
21184 rm -f conftest.er1
21185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021187 (exit $ac_status); } && {
21188 test -z "$ac_c_werror_flag" ||
21189 test ! -s conftest.err
21190 } && test -s conftest$ac_exeext &&
21191 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021193else
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021195sed 's/^/| /' conftest.$ac_ext >&5
21196
Martin v. Löwiseba40652007-08-30 20:10:57 +000021197 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199
21200rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021201 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203ac_res=`eval echo '${'$as_ac_var'}'`
21204 { echo "$as_me:$LINENO: result: $ac_res" >&5
21205echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021206if test `eval echo '${'$as_ac_var'}'` = yes; then
21207 cat >>confdefs.h <<_ACEOF
21208#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21209_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021210
Michael W. Hudson54241132001-12-07 15:38:26 +000021211else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021212 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021213 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021214 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21215 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021216esac
21217
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021218fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021219done
21220
Michael W. Hudson54241132001-12-07 15:38:26 +000021221
Christian Heimes0a8143f2007-12-18 23:22:54 +000021222
21223
21224
21225
21226
Christian Heimes48723512008-01-20 14:28:28 +000021227
21228
21229
21230
21231
21232for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021233do
21234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21235{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21237if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21238 echo $ECHO_N "(cached) $ECHO_C" >&6
21239else
21240 cat >conftest.$ac_ext <<_ACEOF
21241/* confdefs.h. */
21242_ACEOF
21243cat confdefs.h >>conftest.$ac_ext
21244cat >>conftest.$ac_ext <<_ACEOF
21245/* end confdefs.h. */
21246/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21248#define $ac_func innocuous_$ac_func
21249
21250/* System header to define __stub macros and hopefully few prototypes,
21251 which can conflict with char $ac_func (); below.
21252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21253 <limits.h> exists even on freestanding compilers. */
21254
21255#ifdef __STDC__
21256# include <limits.h>
21257#else
21258# include <assert.h>
21259#endif
21260
21261#undef $ac_func
21262
21263/* Override any GCC internal prototype to avoid an error.
21264 Use char because int might match the return type of a GCC
21265 builtin and then its argument prototype would still apply. */
21266#ifdef __cplusplus
21267extern "C"
21268#endif
21269char $ac_func ();
21270/* The GNU C library defines this for functions which it implements
21271 to always fail with ENOSYS. Some functions are actually named
21272 something starting with __ and the normal name is an alias. */
21273#if defined __stub_$ac_func || defined __stub___$ac_func
21274choke me
21275#endif
21276
21277int
21278main ()
21279{
21280return $ac_func ();
21281 ;
21282 return 0;
21283}
21284_ACEOF
21285rm -f conftest.$ac_objext conftest$ac_exeext
21286if { (ac_try="$ac_link"
21287case "(($ac_try" in
21288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21289 *) ac_try_echo=$ac_try;;
21290esac
21291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21292 (eval "$ac_link") 2>conftest.er1
21293 ac_status=$?
21294 grep -v '^ *+' conftest.er1 >conftest.err
21295 rm -f conftest.er1
21296 cat conftest.err >&5
21297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21298 (exit $ac_status); } && {
21299 test -z "$ac_c_werror_flag" ||
21300 test ! -s conftest.err
21301 } && test -s conftest$ac_exeext &&
21302 $as_test_x conftest$ac_exeext; then
21303 eval "$as_ac_var=yes"
21304else
21305 echo "$as_me: failed program was:" >&5
21306sed 's/^/| /' conftest.$ac_ext >&5
21307
21308 eval "$as_ac_var=no"
21309fi
21310
21311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21312 conftest$ac_exeext conftest.$ac_ext
21313fi
21314ac_res=`eval echo '${'$as_ac_var'}'`
21315 { echo "$as_me:$LINENO: result: $ac_res" >&5
21316echo "${ECHO_T}$ac_res" >&6; }
21317if test `eval echo '${'$as_ac_var'}'` = yes; then
21318 cat >>confdefs.h <<_ACEOF
21319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21320_ACEOF
21321
21322fi
21323done
21324
21325
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021326LIBS=$LIBS_SAVE
21327
Guido van Rossumef2255b2000-03-10 22:30:29 +000021328# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021329if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21331echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021332if test "${ac_cv_header_wchar_h+set}" = set; then
21333 echo $ECHO_N "(cached) $ECHO_C" >&6
21334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021335{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21336echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021337else
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21340echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021342/* confdefs.h. */
21343_ACEOF
21344cat confdefs.h >>conftest.$ac_ext
21345cat >>conftest.$ac_ext <<_ACEOF
21346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021347$ac_includes_default
21348#include <wchar.h>
21349_ACEOF
21350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021351if { (ac_try="$ac_compile"
21352case "(($ac_try" in
21353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21354 *) ac_try_echo=$ac_try;;
21355esac
21356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021359 grep -v '^ *+' conftest.er1 >conftest.err
21360 rm -f conftest.er1
21361 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021363 (exit $ac_status); } && {
21364 test -z "$ac_c_werror_flag" ||
21365 test ! -s conftest.err
21366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 ac_header_compiler=yes
21368else
21369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021370sed 's/^/| /' conftest.$ac_ext >&5
21371
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374
21375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21376{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21377echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021378
21379# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21381echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021382cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021383/* confdefs.h. */
21384_ACEOF
21385cat confdefs.h >>conftest.$ac_ext
21386cat >>conftest.$ac_ext <<_ACEOF
21387/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021388#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021389_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390if { (ac_try="$ac_cpp conftest.$ac_ext"
21391case "(($ac_try" in
21392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21393 *) ac_try_echo=$ac_try;;
21394esac
21395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21396 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021397 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021398 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 rm -f conftest.er1
21400 cat conftest.err >&5
21401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 (exit $ac_status); } >/dev/null && {
21403 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21404 test ! -s conftest.err
21405 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021406 ac_header_preproc=yes
21407else
21408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021409sed 's/^/| /' conftest.$ac_ext >&5
21410
Martin v. Löwis11437992002-04-12 09:54:03 +000021411 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021413
Martin v. Löwis11437992002-04-12 09:54:03 +000021414rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021415{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21416echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021417
21418# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021419case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21420 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021421 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21422echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021423 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21424echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21425 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021426 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021427 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021428 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21429echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021430 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21431echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21432 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21433echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21434 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21435echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021436 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21437echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021438 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21439echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021441## ------------------------------------------------ ##
21442## Report this to http://www.python.org/python-bugs ##
21443## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021444_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021446 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021447esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21449echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021450if test "${ac_cv_header_wchar_h+set}" = set; then
21451 echo $ECHO_N "(cached) $ECHO_C" >&6
21452else
21453 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21456echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021457
21458fi
21459if test $ac_cv_header_wchar_h = yes; then
21460
21461
21462cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021463#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021464_ACEOF
21465
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021466 wchar_h="yes"
21467
Guido van Rossumef2255b2000-03-10 22:30:29 +000021468else
Martin v. Löwis11437992002-04-12 09:54:03 +000021469 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021470
21471fi
21472
Michael W. Hudson54241132001-12-07 15:38:26 +000021473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021475# determine wchar_t size
21476if test "$wchar_h" = yes
21477then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021478 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21479echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021480if test "${ac_cv_type_wchar_t+set}" = set; then
21481 echo $ECHO_N "(cached) $ECHO_C" >&6
21482else
21483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021484/* confdefs.h. */
21485_ACEOF
21486cat confdefs.h >>conftest.$ac_ext
21487cat >>conftest.$ac_ext <<_ACEOF
21488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021489#include <wchar.h>
21490
Martin v. Löwiseba40652007-08-30 20:10:57 +000021491typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021492int
21493main ()
21494{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021496 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021497if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 return 0;
21499 ;
21500 return 0;
21501}
21502_ACEOF
21503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504if { (ac_try="$ac_compile"
21505case "(($ac_try" in
21506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21507 *) ac_try_echo=$ac_try;;
21508esac
21509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021512 grep -v '^ *+' conftest.er1 >conftest.err
21513 rm -f conftest.er1
21514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 (exit $ac_status); } && {
21517 test -z "$ac_c_werror_flag" ||
21518 test ! -s conftest.err
21519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 ac_cv_type_wchar_t=yes
21521else
21522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021523sed 's/^/| /' conftest.$ac_ext >&5
21524
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021526fi
Brett Cannon19fab762007-06-02 03:02:29 +000021527
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21529fi
21530{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21531echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21532
21533# The cast to long int works around a bug in the HP C Compiler
21534# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21535# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21536# This bug is HP SR number 8606223364.
21537{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21538echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021539if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21540 echo $ECHO_N "(cached) $ECHO_C" >&6
21541else
Martin v. Löwis11437992002-04-12 09:54:03 +000021542 if test "$cross_compiling" = yes; then
21543 # Depending upon the size, compute the lo and hi bounds.
21544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021545/* confdefs.h. */
21546_ACEOF
21547cat confdefs.h >>conftest.$ac_ext
21548cat >>conftest.$ac_ext <<_ACEOF
21549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021550#include <wchar.h>
21551
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021553int
21554main ()
21555{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021557test_array [0] = 0
21558
21559 ;
21560 return 0;
21561}
21562_ACEOF
21563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564if { (ac_try="$ac_compile"
21565case "(($ac_try" in
21566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21567 *) ac_try_echo=$ac_try;;
21568esac
21569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021572 grep -v '^ *+' conftest.er1 >conftest.err
21573 rm -f conftest.er1
21574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576 (exit $ac_status); } && {
21577 test -z "$ac_c_werror_flag" ||
21578 test ! -s conftest.err
21579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021580 ac_lo=0 ac_mid=0
21581 while :; do
21582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021588#include <wchar.h>
21589
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021591int
21592main ()
21593{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021595test_array [0] = 0
21596
21597 ;
21598 return 0;
21599}
21600_ACEOF
21601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602if { (ac_try="$ac_compile"
21603case "(($ac_try" in
21604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21605 *) ac_try_echo=$ac_try;;
21606esac
21607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021610 grep -v '^ *+' conftest.er1 >conftest.err
21611 rm -f conftest.er1
21612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614 (exit $ac_status); } && {
21615 test -z "$ac_c_werror_flag" ||
21616 test ! -s conftest.err
21617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021618 ac_hi=$ac_mid; break
21619else
21620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021621sed 's/^/| /' conftest.$ac_ext >&5
21622
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623 ac_lo=`expr $ac_mid + 1`
21624 if test $ac_lo -le $ac_mid; then
21625 ac_lo= ac_hi=
21626 break
21627 fi
21628 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 done
21633else
21634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021635sed 's/^/| /' conftest.$ac_ext >&5
21636
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021638/* confdefs.h. */
21639_ACEOF
21640cat confdefs.h >>conftest.$ac_ext
21641cat >>conftest.$ac_ext <<_ACEOF
21642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021643#include <wchar.h>
21644
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021646int
21647main ()
21648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021650test_array [0] = 0
21651
21652 ;
21653 return 0;
21654}
21655_ACEOF
21656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657if { (ac_try="$ac_compile"
21658case "(($ac_try" in
21659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21660 *) ac_try_echo=$ac_try;;
21661esac
21662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021665 grep -v '^ *+' conftest.er1 >conftest.err
21666 rm -f conftest.er1
21667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021669 (exit $ac_status); } && {
21670 test -z "$ac_c_werror_flag" ||
21671 test ! -s conftest.err
21672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021673 ac_hi=-1 ac_mid=-1
21674 while :; do
21675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021676/* confdefs.h. */
21677_ACEOF
21678cat confdefs.h >>conftest.$ac_ext
21679cat >>conftest.$ac_ext <<_ACEOF
21680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021681#include <wchar.h>
21682
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021684int
21685main ()
21686{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021688test_array [0] = 0
21689
21690 ;
21691 return 0;
21692}
21693_ACEOF
21694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021695if { (ac_try="$ac_compile"
21696case "(($ac_try" in
21697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21698 *) ac_try_echo=$ac_try;;
21699esac
21700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021703 grep -v '^ *+' conftest.er1 >conftest.err
21704 rm -f conftest.er1
21705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021707 (exit $ac_status); } && {
21708 test -z "$ac_c_werror_flag" ||
21709 test ! -s conftest.err
21710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021711 ac_lo=$ac_mid; break
21712else
21713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021714sed 's/^/| /' conftest.$ac_ext >&5
21715
Martin v. Löwiseba40652007-08-30 20:10:57 +000021716 ac_hi=`expr '(' $ac_mid ')' - 1`
21717 if test $ac_mid -le $ac_hi; then
21718 ac_lo= ac_hi=
21719 break
21720 fi
21721 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723
21724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 done
21726else
21727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021728sed 's/^/| /' conftest.$ac_ext >&5
21729
Martin v. Löwiseba40652007-08-30 20:10:57 +000021730 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021732
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735
21736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021737# Binary search between lo and hi bounds.
21738while test "x$ac_lo" != "x$ac_hi"; do
21739 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021741/* confdefs.h. */
21742_ACEOF
21743cat confdefs.h >>conftest.$ac_ext
21744cat >>conftest.$ac_ext <<_ACEOF
21745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021746#include <wchar.h>
21747
Martin v. Löwiseba40652007-08-30 20:10:57 +000021748 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021749int
21750main ()
21751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021753test_array [0] = 0
21754
21755 ;
21756 return 0;
21757}
21758_ACEOF
21759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021760if { (ac_try="$ac_compile"
21761case "(($ac_try" in
21762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21763 *) ac_try_echo=$ac_try;;
21764esac
21765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021768 grep -v '^ *+' conftest.er1 >conftest.err
21769 rm -f conftest.er1
21770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021772 (exit $ac_status); } && {
21773 test -z "$ac_c_werror_flag" ||
21774 test ! -s conftest.err
21775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021776 ac_hi=$ac_mid
21777else
21778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021779sed 's/^/| /' conftest.$ac_ext >&5
21780
Martin v. Löwiseba40652007-08-30 20:10:57 +000021781 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021783
21784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021785done
21786case $ac_lo in
21787?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021788'') if test "$ac_cv_type_wchar_t" = yes; then
21789 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021790See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021792See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021793 { (exit 77); exit 77; }; }
21794 else
21795 ac_cv_sizeof_wchar_t=0
21796 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021797esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021798else
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021800/* confdefs.h. */
21801_ACEOF
21802cat confdefs.h >>conftest.$ac_ext
21803cat >>conftest.$ac_ext <<_ACEOF
21804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021805#include <wchar.h>
21806
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 typedef wchar_t ac__type_sizeof_;
21808static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21809static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021811#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021812int
21813main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021814{
Martin v. Löwis11437992002-04-12 09:54:03 +000021815
21816 FILE *f = fopen ("conftest.val", "w");
21817 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818 return 1;
21819 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021820 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021821 long int i = longval ();
21822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21823 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021824 fprintf (f, "%ld\n", i);
21825 }
21826 else
21827 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828 unsigned long int i = ulongval ();
21829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21830 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021831 fprintf (f, "%lu\n", i);
21832 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021833 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021834
21835 ;
21836 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021837}
Martin v. Löwis11437992002-04-12 09:54:03 +000021838_ACEOF
21839rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840if { (ac_try="$ac_link"
21841case "(($ac_try" in
21842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21843 *) ac_try_echo=$ac_try;;
21844esac
21845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21846 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021847 ac_status=$?
21848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021850 { (case "(($ac_try" in
21851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21852 *) ac_try_echo=$ac_try;;
21853esac
21854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21855 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021856 ac_status=$?
21857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21858 (exit $ac_status); }; }; then
21859 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021860else
Martin v. Löwis11437992002-04-12 09:54:03 +000021861 echo "$as_me: program exited with status $ac_status" >&5
21862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021863sed 's/^/| /' conftest.$ac_ext >&5
21864
Martin v. Löwis11437992002-04-12 09:54:03 +000021865( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866if test "$ac_cv_type_wchar_t" = yes; then
21867 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021868See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021869echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021870See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871 { (exit 77); exit 77; }; }
21872 else
21873 ac_cv_sizeof_wchar_t=0
21874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021876rm -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 +000021877fi
21878rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21881echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21882
21883
21884
Martin v. Löwis11437992002-04-12 09:54:03 +000021885cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021886#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021887_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021888
Michael W. Hudson54241132001-12-07 15:38:26 +000021889
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021890fi
21891
Martin v. Löwiseba40652007-08-30 20:10:57 +000021892{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21893echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021894have_ucs4_tcl=no
21895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021896/* confdefs.h. */
21897_ACEOF
21898cat confdefs.h >>conftest.$ac_ext
21899cat >>conftest.$ac_ext <<_ACEOF
21900/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021901
21902#include <tcl.h>
21903#if TCL_UTF_MAX != 6
21904# error "NOT UCS4_TCL"
21905#endif
21906int
21907main ()
21908{
21909
21910 ;
21911 return 0;
21912}
21913_ACEOF
21914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915if { (ac_try="$ac_compile"
21916case "(($ac_try" in
21917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21918 *) ac_try_echo=$ac_try;;
21919esac
21920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021923 grep -v '^ *+' conftest.er1 >conftest.err
21924 rm -f conftest.er1
21925 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927 (exit $ac_status); } && {
21928 test -z "$ac_c_werror_flag" ||
21929 test ! -s conftest.err
21930 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021931
21932
21933cat >>confdefs.h <<\_ACEOF
21934#define HAVE_UCS4_TCL 1
21935_ACEOF
21936
21937 have_ucs4_tcl=yes
21938
21939else
21940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021941sed 's/^/| /' conftest.$ac_ext >&5
21942
Martin v. Löwiseba40652007-08-30 20:10:57 +000021943
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945
21946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21947{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21948echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021949
Skip Montanaro6dead952003-09-25 14:50:04 +000021950# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021951if test "$wchar_h" = yes
21952then
21953 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021954 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21955echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021956 if test "${ac_cv_wchar_t_signed+set}" = set; then
21957 echo $ECHO_N "(cached) $ECHO_C" >&6
21958else
21959
21960 if test "$cross_compiling" = yes; then
21961 ac_cv_wchar_t_signed=yes
21962else
21963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021964/* confdefs.h. */
21965_ACEOF
21966cat confdefs.h >>conftest.$ac_ext
21967cat >>conftest.$ac_ext <<_ACEOF
21968/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021969
21970 #include <wchar.h>
21971 int main()
21972 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021973 /* Success: exit code 0 */
21974 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021975 }
21976
21977_ACEOF
21978rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979if { (ac_try="$ac_link"
21980case "(($ac_try" in
21981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21982 *) ac_try_echo=$ac_try;;
21983esac
21984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21985 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021986 ac_status=$?
21987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989 { (case "(($ac_try" in
21990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21991 *) ac_try_echo=$ac_try;;
21992esac
21993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21994 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021995 ac_status=$?
21996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21997 (exit $ac_status); }; }; then
21998 ac_cv_wchar_t_signed=yes
21999else
22000 echo "$as_me: program exited with status $ac_status" >&5
22001echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022002sed 's/^/| /' conftest.$ac_ext >&5
22003
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022004( exit $ac_status )
22005ac_cv_wchar_t_signed=no
22006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007rm -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 +000022008fi
22009
Martin v. Löwiseba40652007-08-30 20:10:57 +000022010
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022011fi
22012
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22014echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22015fi
22016
22017{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22018echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22019# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022020if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022021 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022022else
22023 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022024fi
22025
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022026
22027if test $enable_unicode = yes
22028then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022029 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022030 case "$have_ucs4_tcl" in
22031 yes) enable_unicode="ucs4"
22032 ;;
22033 *) enable_unicode="ucs2"
22034 ;;
22035 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022036fi
22037
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022038
22039
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022040case "$enable_unicode" in
22041ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022043#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022044_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022045
22046 ;;
22047ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022048 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022049#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022050_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022051
22052 ;;
22053esac
22054
Michael W. Hudson54241132001-12-07 15:38:26 +000022055
Martin v. Löwis11437992002-04-12 09:54:03 +000022056
22057
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022058
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022059if test "$enable_unicode" = "no"
22060then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022061 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062 { echo "$as_me:$LINENO: result: not used" >&5
22063echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022064else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022065 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022066
22067cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022068#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022069_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022070
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022071
22072 # wchar_t is only usable if it maps to an unsigned type
22073 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022074 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022075 then
22076 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022077
Martin v. Löwis11437992002-04-12 09:54:03 +000022078cat >>confdefs.h <<\_ACEOF
22079#define HAVE_USABLE_WCHAR_T 1
22080_ACEOF
22081
22082 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022083#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022084_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022085
22086 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22087 then
22088 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022089 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022090#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022091_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022092
22093 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22094 then
22095 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022096 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022097#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022098_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022099
22100 else
22101 PY_UNICODE_TYPE="no type found"
22102 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022103 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22104echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022105fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022106
22107# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22109echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022110if test "${ac_cv_c_bigendian+set}" = set; then
22111 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022112else
Martin v. Löwis11437992002-04-12 09:54:03 +000022113 # See if sys/param.h defines the BYTE_ORDER macro.
22114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022115/* confdefs.h. */
22116_ACEOF
22117cat confdefs.h >>conftest.$ac_ext
22118cat >>conftest.$ac_ext <<_ACEOF
22119/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022120#include <sys/types.h>
22121#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022122
Martin v. Löwis11437992002-04-12 09:54:03 +000022123int
22124main ()
22125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22127 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022128 bogus endian macros
22129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022130
22131 ;
22132 return 0;
22133}
22134_ACEOF
22135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136if { (ac_try="$ac_compile"
22137case "(($ac_try" in
22138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22139 *) ac_try_echo=$ac_try;;
22140esac
22141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022144 grep -v '^ *+' conftest.er1 >conftest.err
22145 rm -f conftest.er1
22146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022148 (exit $ac_status); } && {
22149 test -z "$ac_c_werror_flag" ||
22150 test ! -s conftest.err
22151 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022152 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022159#include <sys/types.h>
22160#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022161
Martin v. Löwis11437992002-04-12 09:54:03 +000022162int
22163main ()
22164{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022165#if BYTE_ORDER != BIG_ENDIAN
22166 not big endian
22167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022168
22169 ;
22170 return 0;
22171}
22172_ACEOF
22173rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174if { (ac_try="$ac_compile"
22175case "(($ac_try" in
22176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22177 *) ac_try_echo=$ac_try;;
22178esac
22179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022182 grep -v '^ *+' conftest.er1 >conftest.err
22183 rm -f conftest.er1
22184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186 (exit $ac_status); } && {
22187 test -z "$ac_c_werror_flag" ||
22188 test ! -s conftest.err
22189 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022190 ac_cv_c_bigendian=yes
22191else
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022193sed 's/^/| /' conftest.$ac_ext >&5
22194
Martin v. Löwiseba40652007-08-30 20:10:57 +000022195 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197
22198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022199else
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022201sed 's/^/| /' conftest.$ac_ext >&5
22202
Martin v. Löwiseba40652007-08-30 20:10:57 +000022203 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022204if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022205 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022206 ac_cv_c_bigendian=unknown
22207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022208/* confdefs.h. */
22209_ACEOF
22210cat confdefs.h >>conftest.$ac_ext
22211cat >>conftest.$ac_ext <<_ACEOF
22212/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22214short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022215void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22217short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022218void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022219int
22220main ()
22221{
22222 _ascii (); _ebcdic ();
22223 ;
22224 return 0;
22225}
22226_ACEOF
22227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022228if { (ac_try="$ac_compile"
22229case "(($ac_try" in
22230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22231 *) ac_try_echo=$ac_try;;
22232esac
22233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022236 grep -v '^ *+' conftest.er1 >conftest.err
22237 rm -f conftest.er1
22238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022240 (exit $ac_status); } && {
22241 test -z "$ac_c_werror_flag" ||
22242 test ! -s conftest.err
22243 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022244 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022245 ac_cv_c_bigendian=yes
22246fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022247if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 if test "$ac_cv_c_bigendian" = unknown; then
22249 ac_cv_c_bigendian=no
22250 else
22251 # finding both strings is unlikely to happen, but who knows?
22252 ac_cv_c_bigendian=unknown
22253 fi
22254fi
22255else
22256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022257sed 's/^/| /' conftest.$ac_ext >&5
22258
Martin v. Löwiseba40652007-08-30 20:10:57 +000022259
Martin v. Löwis11437992002-04-12 09:54:03 +000022260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022261
22262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022263else
22264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022265/* confdefs.h. */
22266_ACEOF
22267cat confdefs.h >>conftest.$ac_ext
22268cat >>conftest.$ac_ext <<_ACEOF
22269/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022271int
22272main ()
22273{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274
Guido van Rossumef2255b2000-03-10 22:30:29 +000022275 /* Are we little or big endian? From Harbison&Steele. */
22276 union
22277 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022278 long int l;
22279 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022280 } u;
22281 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282 return u.c[sizeof (long int) - 1] == 1;
22283
22284 ;
22285 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022286}
Martin v. Löwis11437992002-04-12 09:54:03 +000022287_ACEOF
22288rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022289if { (ac_try="$ac_link"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
22294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22295 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022296 ac_status=$?
22297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022299 { (case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
22303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22304 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022305 ac_status=$?
22306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22307 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022308 ac_cv_c_bigendian=no
22309else
Martin v. Löwis11437992002-04-12 09:54:03 +000022310 echo "$as_me: program exited with status $ac_status" >&5
22311echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022312sed 's/^/| /' conftest.$ac_ext >&5
22313
Martin v. Löwis11437992002-04-12 09:54:03 +000022314( exit $ac_status )
22315ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317rm -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 +000022318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022319
22320
Martin v. Löwis11437992002-04-12 09:54:03 +000022321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322
22323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22326echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022327case $ac_cv_c_bigendian in
22328 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022329
Martin v. Löwis11437992002-04-12 09:54:03 +000022330cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022331#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022332_ACEOF
22333 ;;
22334 no)
22335 ;;
22336 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022337 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022338presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022339echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022340presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22341 { (exit 1); exit 1; }; } ;;
22342esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022343
Michael W. Hudson54241132001-12-07 15:38:26 +000022344
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022345# Check whether right shifting a negative integer extends the sign bit
22346# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022347{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22348echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022349if test "${ac_cv_rshift_extends_sign+set}" = set; then
22350 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022351else
Martin v. Löwis11437992002-04-12 09:54:03 +000022352
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022353if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022354 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022355else
Martin v. Löwis11437992002-04-12 09:54:03 +000022356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022357/* confdefs.h. */
22358_ACEOF
22359cat confdefs.h >>conftest.$ac_ext
22360cat >>conftest.$ac_ext <<_ACEOF
22361/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022362
22363int main()
22364{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022365 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022366}
22367
Martin v. Löwis11437992002-04-12 09:54:03 +000022368_ACEOF
22369rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022370if { (ac_try="$ac_link"
22371case "(($ac_try" in
22372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22373 *) ac_try_echo=$ac_try;;
22374esac
22375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22376 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022377 ac_status=$?
22378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22379 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022380 { (case "(($ac_try" in
22381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22382 *) ac_try_echo=$ac_try;;
22383esac
22384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22385 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022386 ac_status=$?
22387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22388 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022389 ac_cv_rshift_extends_sign=yes
22390else
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 echo "$as_me: program exited with status $ac_status" >&5
22392echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022393sed 's/^/| /' conftest.$ac_ext >&5
22394
Martin v. Löwis11437992002-04-12 09:54:03 +000022395( exit $ac_status )
22396ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398rm -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 +000022399fi
22400
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401
22402fi
22403
22404{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22405echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022406if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022407then
Martin v. Löwis11437992002-04-12 09:54:03 +000022408
22409cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022410#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022411_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022412
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022413fi
22414
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022415# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22417echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022418if test "${ac_cv_have_getc_unlocked+set}" = set; then
22419 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022420else
Martin v. Löwis11437992002-04-12 09:54:03 +000022421
22422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022423/* confdefs.h. */
22424_ACEOF
22425cat confdefs.h >>conftest.$ac_ext
22426cat >>conftest.$ac_ext <<_ACEOF
22427/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022428#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022429int
22430main ()
22431{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022432
22433 FILE *f = fopen("/dev/null", "r");
22434 flockfile(f);
22435 getc_unlocked(f);
22436 funlockfile(f);
22437
Martin v. Löwis11437992002-04-12 09:54:03 +000022438 ;
22439 return 0;
22440}
22441_ACEOF
22442rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022443if { (ac_try="$ac_link"
22444case "(($ac_try" in
22445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22446 *) ac_try_echo=$ac_try;;
22447esac
22448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22449 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022451 grep -v '^ *+' conftest.er1 >conftest.err
22452 rm -f conftest.er1
22453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022455 (exit $ac_status); } && {
22456 test -z "$ac_c_werror_flag" ||
22457 test ! -s conftest.err
22458 } && test -s conftest$ac_exeext &&
22459 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022460 ac_cv_have_getc_unlocked=yes
22461else
Martin v. Löwis11437992002-04-12 09:54:03 +000022462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022463sed 's/^/| /' conftest.$ac_ext >&5
22464
Martin v. Löwiseba40652007-08-30 20:10:57 +000022465 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467
22468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022469 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022470fi
22471
Martin v. Löwiseba40652007-08-30 20:10:57 +000022472{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22473echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022474if test "$ac_cv_have_getc_unlocked" = yes
22475then
Martin v. Löwis11437992002-04-12 09:54:03 +000022476
22477cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022478#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022479_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022480
22481fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022482
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022483# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022484# save the value of LIBS so we don't actually link Python with readline
22485LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022486
Martin v. Löwiseba40652007-08-30 20:10:57 +000022487{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22488echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022489if test "${ac_cv_lib_readline_readline+set}" = set; then
22490 echo $ECHO_N "(cached) $ECHO_C" >&6
22491else
22492 ac_check_lib_save_LIBS=$LIBS
22493LIBS="-lreadline $LIBS"
22494cat >conftest.$ac_ext <<_ACEOF
22495/* confdefs.h. */
22496_ACEOF
22497cat confdefs.h >>conftest.$ac_ext
22498cat >>conftest.$ac_ext <<_ACEOF
22499/* end confdefs.h. */
22500
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501/* Override any GCC internal prototype to avoid an error.
22502 Use char because int might match the return type of a GCC
22503 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022504#ifdef __cplusplus
22505extern "C"
22506#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022507char readline ();
22508int
22509main ()
22510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022512 ;
22513 return 0;
22514}
22515_ACEOF
22516rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022517if { (ac_try="$ac_link"
22518case "(($ac_try" in
22519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22520 *) ac_try_echo=$ac_try;;
22521esac
22522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22523 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022524 ac_status=$?
22525 grep -v '^ *+' conftest.er1 >conftest.err
22526 rm -f conftest.er1
22527 cat conftest.err >&5
22528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529 (exit $ac_status); } && {
22530 test -z "$ac_c_werror_flag" ||
22531 test ! -s conftest.err
22532 } && test -s conftest$ac_exeext &&
22533 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022534 ac_cv_lib_readline_readline=yes
22535else
22536 echo "$as_me: failed program was:" >&5
22537sed 's/^/| /' conftest.$ac_ext >&5
22538
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541
22542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022543 conftest$ac_exeext conftest.$ac_ext
22544LIBS=$ac_check_lib_save_LIBS
22545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22547echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022548if test $ac_cv_lib_readline_readline = yes; then
22549 cat >>confdefs.h <<_ACEOF
22550#define HAVE_LIBREADLINE 1
22551_ACEOF
22552
22553 LIBS="-lreadline $LIBS"
22554
22555fi
22556
22557if test "$ac_cv_have_readline_readline" = no
22558then
22559
Martin v. Löwiseba40652007-08-30 20:10:57 +000022560{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22561echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022562if test "${ac_cv_lib_termcap_readline+set}" = set; then
22563 echo $ECHO_N "(cached) $ECHO_C" >&6
22564else
22565 ac_check_lib_save_LIBS=$LIBS
22566LIBS="-ltermcap $LIBS"
22567cat >conftest.$ac_ext <<_ACEOF
22568/* confdefs.h. */
22569_ACEOF
22570cat confdefs.h >>conftest.$ac_ext
22571cat >>conftest.$ac_ext <<_ACEOF
22572/* end confdefs.h. */
22573
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574/* Override any GCC internal prototype to avoid an error.
22575 Use char because int might match the return type of a GCC
22576 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022577#ifdef __cplusplus
22578extern "C"
22579#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022580char readline ();
22581int
22582main ()
22583{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022585 ;
22586 return 0;
22587}
22588_ACEOF
22589rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022590if { (ac_try="$ac_link"
22591case "(($ac_try" in
22592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22593 *) ac_try_echo=$ac_try;;
22594esac
22595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22596 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022597 ac_status=$?
22598 grep -v '^ *+' conftest.er1 >conftest.err
22599 rm -f conftest.er1
22600 cat conftest.err >&5
22601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022602 (exit $ac_status); } && {
22603 test -z "$ac_c_werror_flag" ||
22604 test ! -s conftest.err
22605 } && test -s conftest$ac_exeext &&
22606 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022607 ac_cv_lib_termcap_readline=yes
22608else
22609 echo "$as_me: failed program was:" >&5
22610sed 's/^/| /' conftest.$ac_ext >&5
22611
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614
22615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022616 conftest$ac_exeext conftest.$ac_ext
22617LIBS=$ac_check_lib_save_LIBS
22618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22620echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022621if test $ac_cv_lib_termcap_readline = yes; then
22622 cat >>confdefs.h <<_ACEOF
22623#define HAVE_LIBTERMCAP 1
22624_ACEOF
22625
22626 LIBS="-ltermcap $LIBS"
22627
22628fi
22629
22630fi
22631
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022632# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22634echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022635if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22636 echo $ECHO_N "(cached) $ECHO_C" >&6
22637else
22638 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022639LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022640cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022641/* confdefs.h. */
22642_ACEOF
22643cat confdefs.h >>conftest.$ac_ext
22644cat >>conftest.$ac_ext <<_ACEOF
22645/* end confdefs.h. */
22646
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647/* Override any GCC internal prototype to avoid an error.
22648 Use char because int might match the return type of a GCC
22649 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022650#ifdef __cplusplus
22651extern "C"
22652#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022653char rl_callback_handler_install ();
22654int
22655main ()
22656{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022658 ;
22659 return 0;
22660}
22661_ACEOF
22662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022663if { (ac_try="$ac_link"
22664case "(($ac_try" in
22665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666 *) ac_try_echo=$ac_try;;
22667esac
22668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22669 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022671 grep -v '^ *+' conftest.er1 >conftest.err
22672 rm -f conftest.er1
22673 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675 (exit $ac_status); } && {
22676 test -z "$ac_c_werror_flag" ||
22677 test ! -s conftest.err
22678 } && test -s conftest$ac_exeext &&
22679 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022680 ac_cv_lib_readline_rl_callback_handler_install=yes
22681else
22682 echo "$as_me: failed program was:" >&5
22683sed 's/^/| /' conftest.$ac_ext >&5
22684
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687
22688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022689 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022690LIBS=$ac_check_lib_save_LIBS
22691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22693echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022694if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22695
22696cat >>confdefs.h <<\_ACEOF
22697#define HAVE_RL_CALLBACK 1
22698_ACEOF
22699
22700fi
22701
22702
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022703# check for readline 2.2
22704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022705/* confdefs.h. */
22706_ACEOF
22707cat confdefs.h >>conftest.$ac_ext
22708cat >>conftest.$ac_ext <<_ACEOF
22709/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022710#include <readline/readline.h>
22711_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712if { (ac_try="$ac_cpp conftest.$ac_ext"
22713case "(($ac_try" in
22714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22715 *) ac_try_echo=$ac_try;;
22716esac
22717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22718 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022719 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022720 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022721 rm -f conftest.er1
22722 cat conftest.err >&5
22723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022724 (exit $ac_status); } >/dev/null && {
22725 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22726 test ! -s conftest.err
22727 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022728 have_readline=yes
22729else
22730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022731sed 's/^/| /' conftest.$ac_ext >&5
22732
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022733 have_readline=no
22734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022735
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022736rm -f conftest.err conftest.$ac_ext
22737if test $have_readline = yes
22738then
22739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022740/* confdefs.h. */
22741_ACEOF
22742cat confdefs.h >>conftest.$ac_ext
22743cat >>conftest.$ac_ext <<_ACEOF
22744/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022745#include <readline/readline.h>
22746
22747_ACEOF
22748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022749 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022750
22751cat >>confdefs.h <<\_ACEOF
22752#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22753_ACEOF
22754
22755fi
22756rm -f conftest*
22757
22758fi
22759
Martin v. Löwis0daad592001-09-30 21:09:59 +000022760# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022761{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22762echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022763if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022765else
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022767LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022769/* confdefs.h. */
22770_ACEOF
22771cat confdefs.h >>conftest.$ac_ext
22772cat >>conftest.$ac_ext <<_ACEOF
22773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022774
Martin v. Löwiseba40652007-08-30 20:10:57 +000022775/* Override any GCC internal prototype to avoid an error.
22776 Use char because int might match the return type of a GCC
22777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022778#ifdef __cplusplus
22779extern "C"
22780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022781char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022782int
22783main ()
22784{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022786 ;
22787 return 0;
22788}
22789_ACEOF
22790rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791if { (ac_try="$ac_link"
22792case "(($ac_try" in
22793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22794 *) ac_try_echo=$ac_try;;
22795esac
22796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22797 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022799 grep -v '^ *+' conftest.er1 >conftest.err
22800 rm -f conftest.er1
22801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803 (exit $ac_status); } && {
22804 test -z "$ac_c_werror_flag" ||
22805 test ! -s conftest.err
22806 } && test -s conftest$ac_exeext &&
22807 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022809else
Martin v. Löwis11437992002-04-12 09:54:03 +000022810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022811sed 's/^/| /' conftest.$ac_ext >&5
22812
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022815
22816rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022818LIBS=$ac_check_lib_save_LIBS
22819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22821echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022822if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022823
Martin v. Löwis11437992002-04-12 09:54:03 +000022824cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022825#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022826_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022827
Martin v. Löwis0daad592001-09-30 21:09:59 +000022828fi
22829
Michael W. Hudson54241132001-12-07 15:38:26 +000022830
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022831# also in 4.0
22832{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22833echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22834if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22835 echo $ECHO_N "(cached) $ECHO_C" >&6
22836else
22837 ac_check_lib_save_LIBS=$LIBS
22838LIBS="-lreadline $LIBS"
22839cat >conftest.$ac_ext <<_ACEOF
22840/* confdefs.h. */
22841_ACEOF
22842cat confdefs.h >>conftest.$ac_ext
22843cat >>conftest.$ac_ext <<_ACEOF
22844/* end confdefs.h. */
22845
22846/* Override any GCC internal prototype to avoid an error.
22847 Use char because int might match the return type of a GCC
22848 builtin and then its argument prototype would still apply. */
22849#ifdef __cplusplus
22850extern "C"
22851#endif
22852char rl_completion_display_matches_hook ();
22853int
22854main ()
22855{
22856return rl_completion_display_matches_hook ();
22857 ;
22858 return 0;
22859}
22860_ACEOF
22861rm -f conftest.$ac_objext conftest$ac_exeext
22862if { (ac_try="$ac_link"
22863case "(($ac_try" in
22864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22865 *) ac_try_echo=$ac_try;;
22866esac
22867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22868 (eval "$ac_link") 2>conftest.er1
22869 ac_status=$?
22870 grep -v '^ *+' conftest.er1 >conftest.err
22871 rm -f conftest.er1
22872 cat conftest.err >&5
22873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22874 (exit $ac_status); } && {
22875 test -z "$ac_c_werror_flag" ||
22876 test ! -s conftest.err
22877 } && test -s conftest$ac_exeext &&
22878 $as_test_x conftest$ac_exeext; then
22879 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22880else
22881 echo "$as_me: failed program was:" >&5
22882sed 's/^/| /' conftest.$ac_ext >&5
22883
22884 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22885fi
22886
22887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22888 conftest$ac_exeext conftest.$ac_ext
22889LIBS=$ac_check_lib_save_LIBS
22890fi
22891{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22892echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22893if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22894
22895cat >>confdefs.h <<\_ACEOF
22896#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22897_ACEOF
22898
22899fi
22900
22901
Martin v. Löwis0daad592001-09-30 21:09:59 +000022902# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22904echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022905if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22906 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022907else
Martin v. Löwis11437992002-04-12 09:54:03 +000022908 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022909LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022911/* confdefs.h. */
22912_ACEOF
22913cat confdefs.h >>conftest.$ac_ext
22914cat >>conftest.$ac_ext <<_ACEOF
22915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022916
Martin v. Löwiseba40652007-08-30 20:10:57 +000022917/* Override any GCC internal prototype to avoid an error.
22918 Use char because int might match the return type of a GCC
22919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022920#ifdef __cplusplus
22921extern "C"
22922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022923char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022924int
22925main ()
22926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022927return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022928 ;
22929 return 0;
22930}
22931_ACEOF
22932rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022933if { (ac_try="$ac_link"
22934case "(($ac_try" in
22935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22936 *) ac_try_echo=$ac_try;;
22937esac
22938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22939 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022941 grep -v '^ *+' conftest.er1 >conftest.err
22942 rm -f conftest.er1
22943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945 (exit $ac_status); } && {
22946 test -z "$ac_c_werror_flag" ||
22947 test ! -s conftest.err
22948 } && test -s conftest$ac_exeext &&
22949 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022951else
Martin v. Löwis11437992002-04-12 09:54:03 +000022952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022953sed 's/^/| /' conftest.$ac_ext >&5
22954
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022957
22958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022960LIBS=$ac_check_lib_save_LIBS
22961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22963echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022964if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022965
Martin v. Löwis11437992002-04-12 09:54:03 +000022966cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022967#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022968_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022969
Guido van Rossum353ae582001-07-10 16:45:32 +000022970fi
22971
Jack Jansendd19cf82001-12-06 22:36:17 +000022972
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022973# also in readline 4.2
22974cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022975/* confdefs.h. */
22976_ACEOF
22977cat confdefs.h >>conftest.$ac_ext
22978cat >>conftest.$ac_ext <<_ACEOF
22979/* end confdefs.h. */
22980#include <readline/readline.h>
22981_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022982if { (ac_try="$ac_cpp conftest.$ac_ext"
22983case "(($ac_try" in
22984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22985 *) ac_try_echo=$ac_try;;
22986esac
22987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22988 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022989 ac_status=$?
22990 grep -v '^ *+' conftest.er1 >conftest.err
22991 rm -f conftest.er1
22992 cat conftest.err >&5
22993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994 (exit $ac_status); } >/dev/null && {
22995 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22996 test ! -s conftest.err
22997 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022998 have_readline=yes
22999else
23000 echo "$as_me: failed program was:" >&5
23001sed 's/^/| /' conftest.$ac_ext >&5
23002
23003 have_readline=no
23004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023006rm -f conftest.err conftest.$ac_ext
23007if test $have_readline = yes
23008then
23009 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023010/* confdefs.h. */
23011_ACEOF
23012cat confdefs.h >>conftest.$ac_ext
23013cat >>conftest.$ac_ext <<_ACEOF
23014/* end confdefs.h. */
23015#include <readline/readline.h>
23016
23017_ACEOF
23018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23019 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23020
23021cat >>confdefs.h <<\_ACEOF
23022#define HAVE_RL_CATCH_SIGNAL 1
23023_ACEOF
23024
23025fi
23026rm -f conftest*
23027
23028fi
23029
Martin v. Löwis82bca632006-02-10 20:49:30 +000023030# End of readline checks: restore LIBS
23031LIBS=$LIBS_no_readline
23032
Martin v. Löwiseba40652007-08-30 20:10:57 +000023033{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23034echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023035if test "${ac_cv_broken_nice+set}" = set; then
23036 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023037else
Martin v. Löwis11437992002-04-12 09:54:03 +000023038
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023039if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023040 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023041else
Martin v. Löwis11437992002-04-12 09:54:03 +000023042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023043/* confdefs.h. */
23044_ACEOF
23045cat confdefs.h >>conftest.$ac_ext
23046cat >>conftest.$ac_ext <<_ACEOF
23047/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023048
23049int main()
23050{
23051 int val1 = nice(1);
23052 if (val1 != -1 && val1 == nice(2))
23053 exit(0);
23054 exit(1);
23055}
23056
Martin v. Löwis11437992002-04-12 09:54:03 +000023057_ACEOF
23058rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059if { (ac_try="$ac_link"
23060case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
23064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23065 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023066 ac_status=$?
23067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069 { (case "(($ac_try" in
23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071 *) ac_try_echo=$ac_try;;
23072esac
23073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23074 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023075 ac_status=$?
23076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23077 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023078 ac_cv_broken_nice=yes
23079else
Martin v. Löwis11437992002-04-12 09:54:03 +000023080 echo "$as_me: program exited with status $ac_status" >&5
23081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023082sed 's/^/| /' conftest.$ac_ext >&5
23083
Martin v. Löwis11437992002-04-12 09:54:03 +000023084( exit $ac_status )
23085ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087rm -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 +000023088fi
23089
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090
23091fi
23092
23093{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23094echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023095if test "$ac_cv_broken_nice" = yes
23096then
Martin v. Löwis11437992002-04-12 09:54:03 +000023097
23098cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023099#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023100_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023101
23102fi
23103
Martin v. Löwiseba40652007-08-30 20:10:57 +000023104{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23105echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023106if test "$cross_compiling" = yes; then
23107 ac_cv_broken_poll=no
23108else
23109 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023110/* confdefs.h. */
23111_ACEOF
23112cat confdefs.h >>conftest.$ac_ext
23113cat >>conftest.$ac_ext <<_ACEOF
23114/* end confdefs.h. */
23115
23116#include <poll.h>
23117
23118int main (void)
23119 {
23120 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23121
23122 close (42);
23123
23124 int poll_test = poll (&poll_struct, 1, 0);
23125
23126 if (poll_test < 0)
23127 {
23128 exit(0);
23129 }
23130 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23131 {
23132 exit(0);
23133 }
23134 else
23135 {
23136 exit(1);
23137 }
23138 }
23139
23140_ACEOF
23141rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023142if { (ac_try="$ac_link"
23143case "(($ac_try" in
23144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23145 *) ac_try_echo=$ac_try;;
23146esac
23147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23148 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023149 ac_status=$?
23150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023152 { (case "(($ac_try" in
23153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23154 *) ac_try_echo=$ac_try;;
23155esac
23156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23157 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023158 ac_status=$?
23159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23160 (exit $ac_status); }; }; then
23161 ac_cv_broken_poll=yes
23162else
23163 echo "$as_me: program exited with status $ac_status" >&5
23164echo "$as_me: failed program was:" >&5
23165sed 's/^/| /' conftest.$ac_ext >&5
23166
23167( exit $ac_status )
23168ac_cv_broken_poll=no
23169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023170rm -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 +000023171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023172
23173
23174{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23175echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023176if test "$ac_cv_broken_poll" = yes
23177then
23178
23179cat >>confdefs.h <<\_ACEOF
23180#define HAVE_BROKEN_POLL 1
23181_ACEOF
23182
23183fi
23184
Brett Cannon43802422005-02-10 20:48:03 +000023185# 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 +000023186# (which is not required by ISO C or UNIX spec) and/or if we support
23187# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023188{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23189echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023190if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23191 echo $ECHO_N "(cached) $ECHO_C" >&6
23192else
23193 cat >conftest.$ac_ext <<_ACEOF
23194/* confdefs.h. */
23195_ACEOF
23196cat confdefs.h >>conftest.$ac_ext
23197cat >>conftest.$ac_ext <<_ACEOF
23198/* end confdefs.h. */
23199#include <sys/types.h>
23200#include <$ac_cv_struct_tm>
23201
23202
23203int
23204main ()
23205{
23206static struct tm ac_aggr;
23207if (ac_aggr.tm_zone)
23208return 0;
23209 ;
23210 return 0;
23211}
23212_ACEOF
23213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023214if { (ac_try="$ac_compile"
23215case "(($ac_try" in
23216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23217 *) ac_try_echo=$ac_try;;
23218esac
23219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23220 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023221 ac_status=$?
23222 grep -v '^ *+' conftest.er1 >conftest.err
23223 rm -f conftest.er1
23224 cat conftest.err >&5
23225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023226 (exit $ac_status); } && {
23227 test -z "$ac_c_werror_flag" ||
23228 test ! -s conftest.err
23229 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023230 ac_cv_member_struct_tm_tm_zone=yes
23231else
23232 echo "$as_me: failed program was:" >&5
23233sed 's/^/| /' conftest.$ac_ext >&5
23234
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023236/* confdefs.h. */
23237_ACEOF
23238cat confdefs.h >>conftest.$ac_ext
23239cat >>conftest.$ac_ext <<_ACEOF
23240/* end confdefs.h. */
23241#include <sys/types.h>
23242#include <$ac_cv_struct_tm>
23243
23244
23245int
23246main ()
23247{
23248static struct tm ac_aggr;
23249if (sizeof ac_aggr.tm_zone)
23250return 0;
23251 ;
23252 return 0;
23253}
23254_ACEOF
23255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023256if { (ac_try="$ac_compile"
23257case "(($ac_try" in
23258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23259 *) ac_try_echo=$ac_try;;
23260esac
23261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23262 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023263 ac_status=$?
23264 grep -v '^ *+' conftest.er1 >conftest.err
23265 rm -f conftest.er1
23266 cat conftest.err >&5
23267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268 (exit $ac_status); } && {
23269 test -z "$ac_c_werror_flag" ||
23270 test ! -s conftest.err
23271 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023272 ac_cv_member_struct_tm_tm_zone=yes
23273else
23274 echo "$as_me: failed program was:" >&5
23275sed 's/^/| /' conftest.$ac_ext >&5
23276
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279
23280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023282
23283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023285{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23286echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023287if test $ac_cv_member_struct_tm_tm_zone = yes; then
23288
23289cat >>confdefs.h <<_ACEOF
23290#define HAVE_STRUCT_TM_TM_ZONE 1
23291_ACEOF
23292
23293
23294fi
23295
23296if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23297
23298cat >>confdefs.h <<\_ACEOF
23299#define HAVE_TM_ZONE 1
23300_ACEOF
23301
23302else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023303 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23304echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23305if test "${ac_cv_have_decl_tzname+set}" = set; then
23306 echo $ECHO_N "(cached) $ECHO_C" >&6
23307else
23308 cat >conftest.$ac_ext <<_ACEOF
23309/* confdefs.h. */
23310_ACEOF
23311cat confdefs.h >>conftest.$ac_ext
23312cat >>conftest.$ac_ext <<_ACEOF
23313/* end confdefs.h. */
23314#include <time.h>
23315
23316int
23317main ()
23318{
23319#ifndef tzname
23320 (void) tzname;
23321#endif
23322
23323 ;
23324 return 0;
23325}
23326_ACEOF
23327rm -f conftest.$ac_objext
23328if { (ac_try="$ac_compile"
23329case "(($ac_try" in
23330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23331 *) ac_try_echo=$ac_try;;
23332esac
23333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23334 (eval "$ac_compile") 2>conftest.er1
23335 ac_status=$?
23336 grep -v '^ *+' conftest.er1 >conftest.err
23337 rm -f conftest.er1
23338 cat conftest.err >&5
23339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23340 (exit $ac_status); } && {
23341 test -z "$ac_c_werror_flag" ||
23342 test ! -s conftest.err
23343 } && test -s conftest.$ac_objext; then
23344 ac_cv_have_decl_tzname=yes
23345else
23346 echo "$as_me: failed program was:" >&5
23347sed 's/^/| /' conftest.$ac_ext >&5
23348
23349 ac_cv_have_decl_tzname=no
23350fi
23351
23352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23353fi
23354{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23355echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23356if test $ac_cv_have_decl_tzname = yes; then
23357
23358cat >>confdefs.h <<_ACEOF
23359#define HAVE_DECL_TZNAME 1
23360_ACEOF
23361
23362
23363else
23364 cat >>confdefs.h <<_ACEOF
23365#define HAVE_DECL_TZNAME 0
23366_ACEOF
23367
23368
23369fi
23370
23371
23372 { echo "$as_me:$LINENO: checking for tzname" >&5
23373echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023374if test "${ac_cv_var_tzname+set}" = set; then
23375 echo $ECHO_N "(cached) $ECHO_C" >&6
23376else
23377 cat >conftest.$ac_ext <<_ACEOF
23378/* confdefs.h. */
23379_ACEOF
23380cat confdefs.h >>conftest.$ac_ext
23381cat >>conftest.$ac_ext <<_ACEOF
23382/* end confdefs.h. */
23383#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023384#if !HAVE_DECL_TZNAME
23385extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023386#endif
23387
23388int
23389main ()
23390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023392 ;
23393 return 0;
23394}
23395_ACEOF
23396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023397if { (ac_try="$ac_link"
23398case "(($ac_try" in
23399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23400 *) ac_try_echo=$ac_try;;
23401esac
23402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23403 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023404 ac_status=$?
23405 grep -v '^ *+' conftest.er1 >conftest.err
23406 rm -f conftest.er1
23407 cat conftest.err >&5
23408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409 (exit $ac_status); } && {
23410 test -z "$ac_c_werror_flag" ||
23411 test ! -s conftest.err
23412 } && test -s conftest$ac_exeext &&
23413 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023414 ac_cv_var_tzname=yes
23415else
23416 echo "$as_me: failed program was:" >&5
23417sed 's/^/| /' conftest.$ac_ext >&5
23418
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023421
23422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023423 conftest$ac_exeext conftest.$ac_ext
23424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023425{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23426echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023427 if test $ac_cv_var_tzname = yes; then
23428
23429cat >>confdefs.h <<\_ACEOF
23430#define HAVE_TZNAME 1
23431_ACEOF
23432
23433 fi
23434fi
23435
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023436
Martin v. Löwis1d459062005-03-14 21:23:33 +000023437# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023438{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23439echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023440if test "${ac_cv_working_tzset+set}" = set; then
23441 echo $ECHO_N "(cached) $ECHO_C" >&6
23442else
23443
23444if test "$cross_compiling" = yes; then
23445 ac_cv_working_tzset=no
23446else
23447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023448/* confdefs.h. */
23449_ACEOF
23450cat confdefs.h >>conftest.$ac_ext
23451cat >>conftest.$ac_ext <<_ACEOF
23452/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023453
23454#include <stdlib.h>
23455#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023456#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023457
23458#if HAVE_TZNAME
23459extern char *tzname[];
23460#endif
23461
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023462int main()
23463{
Brett Cannon18367812003-09-19 00:59:16 +000023464 /* Note that we need to ensure that not only does tzset(3)
23465 do 'something' with localtime, but it works as documented
23466 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023467 This includes making sure that tzname is set properly if
23468 tm->tm_zone does not exist since it is the alternative way
23469 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023470
23471 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023472 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023473 */
23474
Martin v. Löwis1d459062005-03-14 21:23:33 +000023475 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023476 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23477
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023478 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023479 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023480 if (localtime(&groundhogday)->tm_hour != 0)
23481 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023482#if HAVE_TZNAME
23483 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23484 if (strcmp(tzname[0], "UTC") ||
23485 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23486 exit(1);
23487#endif
Brett Cannon18367812003-09-19 00:59:16 +000023488
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023489 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023490 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023491 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023492 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023493#if HAVE_TZNAME
23494 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23495 exit(1);
23496#endif
Brett Cannon18367812003-09-19 00:59:16 +000023497
23498 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23499 tzset();
23500 if (localtime(&groundhogday)->tm_hour != 11)
23501 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023502#if HAVE_TZNAME
23503 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23504 exit(1);
23505#endif
23506
23507#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023508 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23509 exit(1);
23510 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23511 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023512#endif
Brett Cannon18367812003-09-19 00:59:16 +000023513
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023514 exit(0);
23515}
23516
23517_ACEOF
23518rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023519if { (ac_try="$ac_link"
23520case "(($ac_try" in
23521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23522 *) ac_try_echo=$ac_try;;
23523esac
23524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23525 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023526 ac_status=$?
23527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529 { (case "(($ac_try" in
23530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23531 *) ac_try_echo=$ac_try;;
23532esac
23533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23534 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023535 ac_status=$?
23536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23537 (exit $ac_status); }; }; then
23538 ac_cv_working_tzset=yes
23539else
23540 echo "$as_me: program exited with status $ac_status" >&5
23541echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023542sed 's/^/| /' conftest.$ac_ext >&5
23543
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023544( exit $ac_status )
23545ac_cv_working_tzset=no
23546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547rm -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 +000023548fi
23549
Martin v. Löwiseba40652007-08-30 20:10:57 +000023550
23551fi
23552
23553{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23554echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023555if test "$ac_cv_working_tzset" = yes
23556then
23557
23558cat >>confdefs.h <<\_ACEOF
23559#define HAVE_WORKING_TZSET 1
23560_ACEOF
23561
23562fi
23563
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023564# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23566echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023567if test "${ac_cv_stat_tv_nsec+set}" = set; then
23568 echo $ECHO_N "(cached) $ECHO_C" >&6
23569else
23570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023571/* confdefs.h. */
23572_ACEOF
23573cat confdefs.h >>conftest.$ac_ext
23574cat >>conftest.$ac_ext <<_ACEOF
23575/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023576#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023577int
23578main ()
23579{
23580
23581struct stat st;
23582st.st_mtim.tv_nsec = 1;
23583
23584 ;
23585 return 0;
23586}
23587_ACEOF
23588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023589if { (ac_try="$ac_compile"
23590case "(($ac_try" in
23591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23592 *) ac_try_echo=$ac_try;;
23593esac
23594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023597 grep -v '^ *+' conftest.er1 >conftest.err
23598 rm -f conftest.er1
23599 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601 (exit $ac_status); } && {
23602 test -z "$ac_c_werror_flag" ||
23603 test ! -s conftest.err
23604 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023605 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023606else
23607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023608sed 's/^/| /' conftest.$ac_ext >&5
23609
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023611fi
23612
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23614fi
23615
23616{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23617echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023618if test "$ac_cv_stat_tv_nsec" = yes
23619then
23620
23621cat >>confdefs.h <<\_ACEOF
23622#define HAVE_STAT_TV_NSEC 1
23623_ACEOF
23624
23625fi
23626
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023627# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023628{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23629echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023630if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23631 echo $ECHO_N "(cached) $ECHO_C" >&6
23632else
23633 cat >conftest.$ac_ext <<_ACEOF
23634/* confdefs.h. */
23635_ACEOF
23636cat confdefs.h >>conftest.$ac_ext
23637cat >>conftest.$ac_ext <<_ACEOF
23638/* end confdefs.h. */
23639#include <sys/stat.h>
23640int
23641main ()
23642{
23643
23644struct stat st;
23645st.st_mtimespec.tv_nsec = 1;
23646
23647 ;
23648 return 0;
23649}
23650_ACEOF
23651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023652if { (ac_try="$ac_compile"
23653case "(($ac_try" in
23654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23655 *) ac_try_echo=$ac_try;;
23656esac
23657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023659 ac_status=$?
23660 grep -v '^ *+' conftest.er1 >conftest.err
23661 rm -f conftest.er1
23662 cat conftest.err >&5
23663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023664 (exit $ac_status); } && {
23665 test -z "$ac_c_werror_flag" ||
23666 test ! -s conftest.err
23667 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023668 ac_cv_stat_tv_nsec2=yes
23669else
23670 echo "$as_me: failed program was:" >&5
23671sed 's/^/| /' conftest.$ac_ext >&5
23672
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023674fi
23675
Martin v. Löwiseba40652007-08-30 20:10:57 +000023676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23677fi
23678
23679{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23680echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023681if test "$ac_cv_stat_tv_nsec2" = yes
23682then
23683
23684cat >>confdefs.h <<\_ACEOF
23685#define HAVE_STAT_TV_NSEC2 1
23686_ACEOF
23687
23688fi
23689
Jack Jansen666b1e72001-10-31 12:11:48 +000023690# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23692echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023693if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23694 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023695else
Martin v. Löwis11437992002-04-12 09:54:03 +000023696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023697/* confdefs.h. */
23698_ACEOF
23699cat confdefs.h >>conftest.$ac_ext
23700cat >>conftest.$ac_ext <<_ACEOF
23701/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023702#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023703int
23704main ()
23705{
Jack Jansen666b1e72001-10-31 12:11:48 +000023706
23707 int rtn;
23708 rtn = mvwdelch(0,0,0);
23709
Martin v. Löwis11437992002-04-12 09:54:03 +000023710 ;
23711 return 0;
23712}
23713_ACEOF
23714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023715if { (ac_try="$ac_compile"
23716case "(($ac_try" in
23717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23718 *) ac_try_echo=$ac_try;;
23719esac
23720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023723 grep -v '^ *+' conftest.er1 >conftest.err
23724 rm -f conftest.er1
23725 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023727 (exit $ac_status); } && {
23728 test -z "$ac_c_werror_flag" ||
23729 test ! -s conftest.err
23730 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023731 ac_cv_mvwdelch_is_expression=yes
23732else
Martin v. Löwis11437992002-04-12 09:54:03 +000023733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023734sed 's/^/| /' conftest.$ac_ext >&5
23735
Martin v. Löwiseba40652007-08-30 20:10:57 +000023736 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023737fi
23738
Martin v. Löwiseba40652007-08-30 20:10:57 +000023739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23740fi
23741
23742{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23743echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023744
23745if test "$ac_cv_mvwdelch_is_expression" = yes
23746then
Martin v. Löwis11437992002-04-12 09:54:03 +000023747
23748cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023749#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023750_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023751
23752fi
23753
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23755echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023756if test "${ac_cv_window_has_flags+set}" = set; then
23757 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023758else
Martin v. Löwis11437992002-04-12 09:54:03 +000023759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023760/* confdefs.h. */
23761_ACEOF
23762cat confdefs.h >>conftest.$ac_ext
23763cat >>conftest.$ac_ext <<_ACEOF
23764/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023765#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023766int
23767main ()
23768{
Jack Jansen666b1e72001-10-31 12:11:48 +000023769
23770 WINDOW *w;
23771 w->_flags = 0;
23772
Martin v. Löwis11437992002-04-12 09:54:03 +000023773 ;
23774 return 0;
23775}
23776_ACEOF
23777rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778if { (ac_try="$ac_compile"
23779case "(($ac_try" in
23780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23781 *) ac_try_echo=$ac_try;;
23782esac
23783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023786 grep -v '^ *+' conftest.er1 >conftest.err
23787 rm -f conftest.er1
23788 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023790 (exit $ac_status); } && {
23791 test -z "$ac_c_werror_flag" ||
23792 test ! -s conftest.err
23793 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023794 ac_cv_window_has_flags=yes
23795else
Martin v. Löwis11437992002-04-12 09:54:03 +000023796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023797sed 's/^/| /' conftest.$ac_ext >&5
23798
Martin v. Löwiseba40652007-08-30 20:10:57 +000023799 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023800fi
23801
Martin v. Löwiseba40652007-08-30 20:10:57 +000023802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23803fi
23804
23805{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23806echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023807
Jack Jansen666b1e72001-10-31 12:11:48 +000023808
23809if test "$ac_cv_window_has_flags" = yes
23810then
Martin v. Löwis11437992002-04-12 09:54:03 +000023811
23812cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023813#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023814_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023815
23816fi
23817
Martin v. Löwiseba40652007-08-30 20:10:57 +000023818{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23819echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023820cat >conftest.$ac_ext <<_ACEOF
23821/* confdefs.h. */
23822_ACEOF
23823cat confdefs.h >>conftest.$ac_ext
23824cat >>conftest.$ac_ext <<_ACEOF
23825/* end confdefs.h. */
23826#include <curses.h>
23827int
23828main ()
23829{
23830void *x=is_term_resized
23831 ;
23832 return 0;
23833}
23834_ACEOF
23835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836if { (ac_try="$ac_compile"
23837case "(($ac_try" in
23838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23839 *) ac_try_echo=$ac_try;;
23840esac
23841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23842 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023843 ac_status=$?
23844 grep -v '^ *+' conftest.er1 >conftest.err
23845 rm -f conftest.er1
23846 cat conftest.err >&5
23847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023848 (exit $ac_status); } && {
23849 test -z "$ac_c_werror_flag" ||
23850 test ! -s conftest.err
23851 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023852
23853cat >>confdefs.h <<\_ACEOF
23854#define HAVE_CURSES_IS_TERM_RESIZED 1
23855_ACEOF
23856
Martin v. Löwiseba40652007-08-30 20:10:57 +000023857 { echo "$as_me:$LINENO: result: yes" >&5
23858echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023859else
23860 echo "$as_me: failed program was:" >&5
23861sed 's/^/| /' conftest.$ac_ext >&5
23862
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863 { echo "$as_me:$LINENO: result: no" >&5
23864echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023865
23866fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023867
Martin v. Löwiseba40652007-08-30 20:10:57 +000023868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23869
23870{ echo "$as_me:$LINENO: checking for resize_term" >&5
23871echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023872cat >conftest.$ac_ext <<_ACEOF
23873/* confdefs.h. */
23874_ACEOF
23875cat confdefs.h >>conftest.$ac_ext
23876cat >>conftest.$ac_ext <<_ACEOF
23877/* end confdefs.h. */
23878#include <curses.h>
23879int
23880main ()
23881{
23882void *x=resize_term
23883 ;
23884 return 0;
23885}
23886_ACEOF
23887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023888if { (ac_try="$ac_compile"
23889case "(($ac_try" in
23890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23891 *) ac_try_echo=$ac_try;;
23892esac
23893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23894 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023895 ac_status=$?
23896 grep -v '^ *+' conftest.er1 >conftest.err
23897 rm -f conftest.er1
23898 cat conftest.err >&5
23899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023900 (exit $ac_status); } && {
23901 test -z "$ac_c_werror_flag" ||
23902 test ! -s conftest.err
23903 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023904
23905cat >>confdefs.h <<\_ACEOF
23906#define HAVE_CURSES_RESIZE_TERM 1
23907_ACEOF
23908
Martin v. Löwiseba40652007-08-30 20:10:57 +000023909 { echo "$as_me:$LINENO: result: yes" >&5
23910echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023911else
23912 echo "$as_me: failed program was:" >&5
23913sed 's/^/| /' conftest.$ac_ext >&5
23914
Martin v. Löwiseba40652007-08-30 20:10:57 +000023915 { echo "$as_me:$LINENO: result: no" >&5
23916echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023917
23918fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023919
Martin v. Löwiseba40652007-08-30 20:10:57 +000023920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23921
23922{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23923echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023924cat >conftest.$ac_ext <<_ACEOF
23925/* confdefs.h. */
23926_ACEOF
23927cat confdefs.h >>conftest.$ac_ext
23928cat >>conftest.$ac_ext <<_ACEOF
23929/* end confdefs.h. */
23930#include <curses.h>
23931int
23932main ()
23933{
23934void *x=resizeterm
23935 ;
23936 return 0;
23937}
23938_ACEOF
23939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023940if { (ac_try="$ac_compile"
23941case "(($ac_try" in
23942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23943 *) ac_try_echo=$ac_try;;
23944esac
23945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23946 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023947 ac_status=$?
23948 grep -v '^ *+' conftest.er1 >conftest.err
23949 rm -f conftest.er1
23950 cat conftest.err >&5
23951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023952 (exit $ac_status); } && {
23953 test -z "$ac_c_werror_flag" ||
23954 test ! -s conftest.err
23955 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023956
23957cat >>confdefs.h <<\_ACEOF
23958#define HAVE_CURSES_RESIZETERM 1
23959_ACEOF
23960
Martin v. Löwiseba40652007-08-30 20:10:57 +000023961 { echo "$as_me:$LINENO: result: yes" >&5
23962echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023963else
23964 echo "$as_me: failed program was:" >&5
23965sed 's/^/| /' conftest.$ac_ext >&5
23966
Martin v. Löwiseba40652007-08-30 20:10:57 +000023967 { echo "$as_me:$LINENO: result: no" >&5
23968echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023969
23970fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023971
Martin v. Löwiseba40652007-08-30 20:10:57 +000023972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23973
23974{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23975echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023976
23977if test -r /dev/ptmx
23978then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023979 { echo "$as_me:$LINENO: result: yes" >&5
23980echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023981
23982cat >>confdefs.h <<\_ACEOF
23983#define HAVE_DEV_PTMX 1
23984_ACEOF
23985
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023986else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023987 { echo "$as_me:$LINENO: result: no" >&5
23988echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023989fi
23990
Martin v. Löwiseba40652007-08-30 20:10:57 +000023991{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23992echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023993
23994if test -r /dev/ptc
23995then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023996 { echo "$as_me:$LINENO: result: yes" >&5
23997echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023998
23999cat >>confdefs.h <<\_ACEOF
24000#define HAVE_DEV_PTC 1
24001_ACEOF
24002
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024003else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024004 { echo "$as_me:$LINENO: result: no" >&5
24005echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024006fi
24007
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24009echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024010if test "$cross_compiling" = yes; then
24011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24012See \`config.log' for more details." >&5
24013echo "$as_me: error: cannot run test program while cross compiling
24014See \`config.log' for more details." >&2;}
24015 { (exit 1); exit 1; }; }
24016else
24017 cat >conftest.$ac_ext <<_ACEOF
24018/* confdefs.h. */
24019_ACEOF
24020cat confdefs.h >>conftest.$ac_ext
24021cat >>conftest.$ac_ext <<_ACEOF
24022/* end confdefs.h. */
24023#include <stdio.h>
24024#include <stddef.h>
24025#include <string.h>
24026
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024027#ifdef HAVE_SYS_TYPES_H
24028#include <sys/types.h>
24029#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024030
24031#ifdef HAVE_SSIZE_T
24032typedef ssize_t Py_ssize_t;
24033#elif SIZEOF_VOID_P == SIZEOF_LONG
24034typedef long Py_ssize_t;
24035#else
24036typedef int Py_ssize_t;
24037#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024038
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024039int main()
24040{
24041 char buffer[256];
24042
Brett Cannon09d12362006-05-11 05:11:33 +000024043 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24044 return 1;
24045
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024046 if (strcmp(buffer, "123"))
24047 return 1;
24048
24049 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24050 return 1;
24051
24052 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024053 return 1;
24054
24055 return 0;
24056}
24057_ACEOF
24058rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024059if { (ac_try="$ac_link"
24060case "(($ac_try" in
24061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24062 *) ac_try_echo=$ac_try;;
24063esac
24064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24065 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024066 ac_status=$?
24067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024069 { (case "(($ac_try" in
24070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24071 *) ac_try_echo=$ac_try;;
24072esac
24073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24074 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024075 ac_status=$?
24076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24077 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024078 { echo "$as_me:$LINENO: result: yes" >&5
24079echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024080
24081cat >>confdefs.h <<\_ACEOF
24082#define PY_FORMAT_SIZE_T "z"
24083_ACEOF
24084
24085else
24086 echo "$as_me: program exited with status $ac_status" >&5
24087echo "$as_me: failed program was:" >&5
24088sed 's/^/| /' conftest.$ac_ext >&5
24089
24090( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024091{ echo "$as_me:$LINENO: result: no" >&5
24092echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000024095fi
24096
Martin v. Löwiseba40652007-08-30 20:10:57 +000024097
24098
24099{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24100echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024101if test "${ac_cv_type_socklen_t+set}" = set; then
24102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024103else
Martin v. Löwis11437992002-04-12 09:54:03 +000024104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024105/* confdefs.h. */
24106_ACEOF
24107cat confdefs.h >>conftest.$ac_ext
24108cat >>conftest.$ac_ext <<_ACEOF
24109/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024110
24111#ifdef HAVE_SYS_TYPES_H
24112#include <sys/types.h>
24113#endif
24114#ifdef HAVE_SYS_SOCKET_H
24115#include <sys/socket.h>
24116#endif
24117
24118
Martin v. Löwiseba40652007-08-30 20:10:57 +000024119typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024120int
24121main ()
24122{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024123if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024124 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024125if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024126 return 0;
24127 ;
24128 return 0;
24129}
24130_ACEOF
24131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024132if { (ac_try="$ac_compile"
24133case "(($ac_try" in
24134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24135 *) ac_try_echo=$ac_try;;
24136esac
24137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024140 grep -v '^ *+' conftest.er1 >conftest.err
24141 rm -f conftest.er1
24142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024144 (exit $ac_status); } && {
24145 test -z "$ac_c_werror_flag" ||
24146 test ! -s conftest.err
24147 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024148 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024149else
Martin v. Löwis11437992002-04-12 09:54:03 +000024150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024151sed 's/^/| /' conftest.$ac_ext >&5
24152
Martin v. Löwiseba40652007-08-30 20:10:57 +000024153 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155
24156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024158{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24159echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024160if test $ac_cv_type_socklen_t = yes; then
24161 :
24162else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024163
Martin v. Löwis01c04012002-11-11 14:58:44 +000024164cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024165#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024166_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024167
24168fi
24169
Michael W. Hudson54241132001-12-07 15:38:26 +000024170
Michael W. Hudson54241132001-12-07 15:38:26 +000024171
24172
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024173for h in `(cd $srcdir;echo Python/thread_*.h)`
24174do
24175 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24176done
24177
Michael W. Hudson54241132001-12-07 15:38:26 +000024178
Neal Norwitzd24499d2005-12-18 21:36:39 +000024179SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024180{ echo "$as_me:$LINENO: checking for build directories" >&5
24181echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024182for dir in $SRCDIRS; do
24183 if test ! -d $dir; then
24184 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024185 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024186done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187{ echo "$as_me:$LINENO: result: done" >&5
24188echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024189
Guido van Rossum627b2d71993-12-24 10:39:16 +000024190# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024191ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024192
Martin v. Löwis11437992002-04-12 09:54:03 +000024193cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024194# This file is a shell script that caches the results of configure
24195# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024196# scripts and configure runs, see configure's option --config-cache.
24197# It is not useful on other systems. If it contains results you don't
24198# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024199#
Martin v. Löwis11437992002-04-12 09:54:03 +000024200# config.status only pays attention to the cache file if you give it
24201# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024202#
Skip Montanaro6dead952003-09-25 14:50:04 +000024203# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024204# loading this file, other *unset* `ac_cv_foo' will be assigned the
24205# following values.
24206
24207_ACEOF
24208
Guido van Rossumf78abae1997-01-21 22:02:36 +000024209# The following way of writing the cache mishandles newlines in values,
24210# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024211# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024212# Ultrix sh set writes to stderr and can't be redirected directly,
24213# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214(
24215 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24216 eval ac_val=\$$ac_var
24217 case $ac_val in #(
24218 *${as_nl}*)
24219 case $ac_var in #(
24220 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24221echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24222 esac
24223 case $ac_var in #(
24224 _ | IFS | as_nl) ;; #(
24225 *) $as_unset $ac_var ;;
24226 esac ;;
24227 esac
24228 done
24229
Martin v. Löwis11437992002-04-12 09:54:03 +000024230 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024231 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24232 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024233 # `set' does not quote correctly, so add quotes (double-quote
24234 # substitution turns \\\\ into \\, and sed turns \\ into \).
24235 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024236 "s/'/'\\\\''/g;
24237 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024238 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024239 *)
24240 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024241 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024242 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024243 esac |
24244 sort
24245) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024246 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024248 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024249 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24251 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024252 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24253 :end' >>confcache
24254if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24255 if test -w "$cache_file"; then
24256 test "x$cache_file" != "x/dev/null" &&
24257 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24258echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024259 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024260 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024261 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24262echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024264fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024265rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024267test "x$prefix" = xNONE && prefix=$ac_default_prefix
24268# Let make expand exec_prefix.
24269test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024271DEFS=-DHAVE_CONFIG_H
24272
Skip Montanaro6dead952003-09-25 14:50:04 +000024273ac_libobjs=
24274ac_ltlibobjs=
24275for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24276 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24278 ac_i=`echo "$ac_i" | sed "$ac_script"`
24279 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24280 # will be set to the directory where LIBOBJS objects are built.
24281 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24282 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024283done
24284LIBOBJS=$ac_libobjs
24285
24286LTLIBOBJS=$ac_ltlibobjs
24287
24288
Martin v. Löwis11437992002-04-12 09:54:03 +000024289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024290: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024291ac_clean_files_save=$ac_clean_files
24292ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24293{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24294echo "$as_me: creating $CONFIG_STATUS" >&6;}
24295cat >$CONFIG_STATUS <<_ACEOF
24296#! $SHELL
24297# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024298# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024299# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024300# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024301
Martin v. Löwis11437992002-04-12 09:54:03 +000024302debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024303ac_cs_recheck=false
24304ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024305SHELL=\${CONFIG_SHELL-$SHELL}
24306_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024307
Martin v. Löwis11437992002-04-12 09:54:03 +000024308cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024309## --------------------- ##
24310## M4sh Initialization. ##
24311## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024312
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313# Be more Bourne compatible
24314DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024315if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24316 emulate sh
24317 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024318 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24319 # is contrary to our usage. Disable this feature.
24320 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024322else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323 case `(set -o) 2>/dev/null` in
24324 *posix*) set -o posix ;;
24325esac
24326
Martin v. Löwis11437992002-04-12 09:54:03 +000024327fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024328
Skip Montanaro6dead952003-09-25 14:50:04 +000024329
Martin v. Löwis11437992002-04-12 09:54:03 +000024330
24331
Martin v. Löwiseba40652007-08-30 20:10:57 +000024332# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024333# Avoid depending upon Character Ranges.
24334as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24335as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24336as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24337as_cr_digits='0123456789'
24338as_cr_alnum=$as_cr_Letters$as_cr_digits
24339
24340# The user is always right.
24341if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024342 echo "#! /bin/sh" >conf$$.sh
24343 echo "exit 0" >>conf$$.sh
24344 chmod +x conf$$.sh
24345 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024346 PATH_SEPARATOR=';'
24347 else
24348 PATH_SEPARATOR=:
24349 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024350 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024351fi
24352
Martin v. Löwiseba40652007-08-30 20:10:57 +000024353# Support unset when possible.
24354if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24355 as_unset=unset
24356else
24357 as_unset=false
24358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024359
Martin v. Löwiseba40652007-08-30 20:10:57 +000024360
24361# IFS
24362# We need space, tab and new line, in precisely that order. Quoting is
24363# there to prevent editors from complaining about space-tab.
24364# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24365# splitting by setting IFS to empty value.)
24366as_nl='
24367'
24368IFS=" "" $as_nl"
24369
24370# Find who we are. Look in the path if we contain no directory separator.
24371case $0 in
24372 *[\\/]* ) as_myself=$0 ;;
24373 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024374for as_dir in $PATH
24375do
24376 IFS=$as_save_IFS
24377 test -z "$as_dir" && as_dir=.
24378 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24379done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024381
Martin v. Löwiseba40652007-08-30 20:10:57 +000024382 ;;
24383esac
24384# We did not find ourselves, most probably we were run as `sh COMMAND'
24385# in which case we are not to be found in the path.
24386if test "x$as_myself" = x; then
24387 as_myself=$0
24388fi
24389if test ! -f "$as_myself"; then
24390 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24391 { (exit 1); exit 1; }
24392fi
24393
24394# Work around bugs in pre-3.0 UWIN ksh.
24395for as_var in ENV MAIL MAILPATH
24396do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24397done
24398PS1='$ '
24399PS2='> '
24400PS4='+ '
24401
24402# NLS nuisances.
24403for as_var in \
24404 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24405 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24406 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024407do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024408 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24409 eval $as_var=C; export $as_var
24410 else
24411 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24412 fi
24413done
24414
24415# Required to use basename.
24416if expr a : '\(a\)' >/dev/null 2>&1 &&
24417 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24418 as_expr=expr
24419else
24420 as_expr=false
24421fi
24422
24423if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24424 as_basename=basename
24425else
24426 as_basename=false
24427fi
24428
24429
24430# Name of the executable.
24431as_me=`$as_basename -- "$0" ||
24432$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24433 X"$0" : 'X\(//\)$' \| \
24434 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24435echo X/"$0" |
24436 sed '/^.*\/\([^/][^/]*\)\/*$/{
24437 s//\1/
24438 q
24439 }
24440 /^X\/\(\/\/\)$/{
24441 s//\1/
24442 q
24443 }
24444 /^X\/\(\/\).*/{
24445 s//\1/
24446 q
24447 }
24448 s/.*/./; q'`
24449
24450# CDPATH.
24451$as_unset CDPATH
24452
24453
24454
Martin v. Löwis11437992002-04-12 09:54:03 +000024455 as_lineno_1=$LINENO
24456 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024457 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024458 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024459
Martin v. Löwis11437992002-04-12 09:54:03 +000024460 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24461 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024462 # line-number line after each line using $LINENO; the second 'sed'
24463 # does the real work. The second script uses 'N' to pair each
24464 # line-number line with the line containing $LINENO, and appends
24465 # trailing '-' during substitution so that $LINENO is not a special
24466 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024467 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024468 # scripts with optimization help from Paolo Bonzini. Blame Lee
24469 # E. McMahon (1931-1989) for sed's syntax. :-)
24470 sed -n '
24471 p
24472 /[$]LINENO/=
24473 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024474 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475 s/[$]LINENO.*/&-/
24476 t lineno
24477 b
24478 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024479 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024480 :loop
24481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024482 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024483 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024484 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024485 chmod +x "$as_me.lineno" ||
24486 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024487 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024488
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 # Don't try to exec as it changes $[0], causing all sort of problems
24490 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024491 # original and so on. Autoconf is especially sensitive to this).
24492 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024493 # Exit status is that of the last command.
24494 exit
24495}
24496
24497
Martin v. Löwiseba40652007-08-30 20:10:57 +000024498if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24499 as_dirname=dirname
24500else
24501 as_dirname=false
24502fi
24503
24504ECHO_C= ECHO_N= ECHO_T=
24505case `echo -n x` in
24506-n*)
24507 case `echo 'x\c'` in
24508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24509 *) ECHO_C='\c';;
24510 esac;;
24511*)
24512 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024513esac
24514
Martin v. Löwiseba40652007-08-30 20:10:57 +000024515if expr a : '\(a\)' >/dev/null 2>&1 &&
24516 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024517 as_expr=expr
24518else
24519 as_expr=false
24520fi
24521
24522rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024523if test -d conf$$.dir; then
24524 rm -f conf$$.dir/conf$$.file
24525else
24526 rm -f conf$$.dir
24527 mkdir conf$$.dir
24528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024529echo >conf$$.file
24530if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024531 as_ln_s='ln -s'
24532 # ... but there are two gotchas:
24533 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24534 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24535 # In both cases, we have to default to `cp -p'.
24536 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024537 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024538elif ln conf$$.file conf$$ 2>/dev/null; then
24539 as_ln_s=ln
24540else
24541 as_ln_s='cp -p'
24542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024543rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24544rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024545
Skip Montanaro6dead952003-09-25 14:50:04 +000024546if mkdir -p . 2>/dev/null; then
24547 as_mkdir_p=:
24548else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024549 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024550 as_mkdir_p=false
24551fi
24552
Martin v. Löwiseba40652007-08-30 20:10:57 +000024553if test -x / >/dev/null 2>&1; then
24554 as_test_x='test -x'
24555else
24556 if ls -dL / >/dev/null 2>&1; then
24557 as_ls_L_option=L
24558 else
24559 as_ls_L_option=
24560 fi
24561 as_test_x='
24562 eval sh -c '\''
24563 if test -d "$1"; then
24564 test -d "$1/.";
24565 else
24566 case $1 in
24567 -*)set "./$1";;
24568 esac;
24569 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24570 ???[sx]*):;;*)false;;esac;fi
24571 '\'' sh
24572 '
24573fi
24574as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024575
24576# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024577as_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 +000024578
24579# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024580as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024581
24582
Martin v. Löwis11437992002-04-12 09:54:03 +000024583exec 6>&1
24584
Martin v. Löwiseba40652007-08-30 20:10:57 +000024585# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024586# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024587# values after options handling.
24588ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024589This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024590generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024591
24592 CONFIG_FILES = $CONFIG_FILES
24593 CONFIG_HEADERS = $CONFIG_HEADERS
24594 CONFIG_LINKS = $CONFIG_LINKS
24595 CONFIG_COMMANDS = $CONFIG_COMMANDS
24596 $ $0 $@
24597
Martin v. Löwiseba40652007-08-30 20:10:57 +000024598on `(hostname || uname -n) 2>/dev/null | sed 1q`
24599"
24600
Martin v. Löwis11437992002-04-12 09:54:03 +000024601_ACEOF
24602
Martin v. Löwiseba40652007-08-30 20:10:57 +000024603cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024604# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605config_files="$ac_config_files"
24606config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024607
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024609
24610cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024611ac_cs_usage="\
24612\`$as_me' instantiates files from templates according to the
24613current configuration.
24614
24615Usage: $0 [OPTIONS] [FILE]...
24616
24617 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024619 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024620 -d, --debug don't remove temporary files
24621 --recheck update $as_me by reconfiguring in the same conditions
24622 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024623 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024625 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024626
24627Configuration files:
24628$config_files
24629
24630Configuration headers:
24631$config_headers
24632
24633Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024634
Martin v. Löwiseba40652007-08-30 20:10:57 +000024635_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024636cat >>$CONFIG_STATUS <<_ACEOF
24637ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024638python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024639configured by $0, generated by GNU Autoconf 2.61,
24640 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024641
Martin v. Löwiseba40652007-08-30 20:10:57 +000024642Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024643This config.status script is free software; the Free Software Foundation
24644gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024645
24646ac_pwd='$ac_pwd'
24647srcdir='$srcdir'
24648INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024649_ACEOF
24650
24651cat >>$CONFIG_STATUS <<\_ACEOF
24652# If no file are specified by the user, then we need to provide default
24653# value. By we need to know if files were specified by the user.
24654ac_need_defaults=:
24655while test $# != 0
24656do
24657 case $1 in
24658 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024659 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24660 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024661 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024662 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024663 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024664 ac_option=$1
24665 ac_optarg=$2
24666 ac_shift=shift
24667 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024668 esac
24669
Skip Montanaro6dead952003-09-25 14:50:04 +000024670 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024672 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24673 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024674 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24675 echo "$ac_cs_version"; exit ;;
24676 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024677 debug=: ;;
24678 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024679 $ac_shift
24680 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024681 ac_need_defaults=false;;
24682 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024683 $ac_shift
24684 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024685 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024686 --he | --h)
24687 # Conflict between --help and --header
24688 { echo "$as_me: error: ambiguous option: $1
24689Try \`$0 --help' for more information." >&2
24690 { (exit 1); exit 1; }; };;
24691 --help | --hel | -h )
24692 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024693 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24694 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24695 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024696
24697 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024698 -*) { echo "$as_me: error: unrecognized option: $1
24699Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 { (exit 1); exit 1; }; } ;;
24701
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702 *) ac_config_targets="$ac_config_targets $1"
24703 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024704
24705 esac
24706 shift
24707done
24708
Skip Montanaro6dead952003-09-25 14:50:04 +000024709ac_configure_extra_args=
24710
24711if $ac_cs_silent; then
24712 exec 6>/dev/null
24713 ac_configure_extra_args="$ac_configure_extra_args --silent"
24714fi
24715
24716_ACEOF
24717cat >>$CONFIG_STATUS <<_ACEOF
24718if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024719 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24720 CONFIG_SHELL=$SHELL
24721 export CONFIG_SHELL
24722 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024723fi
24724
Martin v. Löwis11437992002-04-12 09:54:03 +000024725_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024726cat >>$CONFIG_STATUS <<\_ACEOF
24727exec 5>>config.log
24728{
24729 echo
24730 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24731## Running $as_me. ##
24732_ASBOX
24733 echo "$ac_log"
24734} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024735
Martin v. Löwiseba40652007-08-30 20:10:57 +000024736_ACEOF
24737cat >>$CONFIG_STATUS <<_ACEOF
24738_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024739
24740cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741
24742# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024743for ac_config_target in $ac_config_targets
24744do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024745 case $ac_config_target in
24746 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24747 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24748 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24749 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024750 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24751 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024752 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24753 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24754
Martin v. Löwis11437992002-04-12 09:54:03 +000024755 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24756echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24757 { (exit 1); exit 1; }; };;
24758 esac
24759done
24760
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761
Martin v. Löwis11437992002-04-12 09:54:03 +000024762# If the user did not use the arguments to specify the items to instantiate,
24763# then the envvar interface is used. Set only those that are not.
24764# We use the long form for the default assignment because of an extremely
24765# bizarre bug on SunOS 4.1.3.
24766if $ac_need_defaults; then
24767 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24768 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24769fi
24770
Skip Montanaro6dead952003-09-25 14:50:04 +000024771# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024772# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024773# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024774# Hook for its removal unless debugging.
24775# Note that there is a small window in which the directory will not be cleaned:
24776# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024777$debug ||
24778{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024779 tmp=
24780 trap 'exit_status=$?
24781 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24782' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024783 trap '{ (exit 1); exit 1; }' 1 2 13 15
24784}
Martin v. Löwis11437992002-04-12 09:54:03 +000024785# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024786
Martin v. Löwis11437992002-04-12 09:54:03 +000024787{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024788 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024789 test -n "$tmp" && test -d "$tmp"
24790} ||
24791{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024792 tmp=./conf$$-$RANDOM
24793 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024794} ||
24795{
Skip Montanaro6dead952003-09-25 14:50:04 +000024796 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024797 { (exit 1); exit 1; }
24798}
24799
Martin v. Löwis11437992002-04-12 09:54:03 +000024800#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024801# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024802#
24803
24804# No need to generate the scripts if there are no CONFIG_FILES.
24805# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024806if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024807
24808_ACEOF
24809
Martin v. Löwiseba40652007-08-30 20:10:57 +000024810
24811
24812ac_delim='%!_!# '
24813for ac_last_try in false false false false false :; do
24814 cat >conf$$subs.sed <<_ACEOF
24815SHELL!$SHELL$ac_delim
24816PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24817PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24818PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24819PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24820PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24821PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24822exec_prefix!$exec_prefix$ac_delim
24823prefix!$prefix$ac_delim
24824program_transform_name!$program_transform_name$ac_delim
24825bindir!$bindir$ac_delim
24826sbindir!$sbindir$ac_delim
24827libexecdir!$libexecdir$ac_delim
24828datarootdir!$datarootdir$ac_delim
24829datadir!$datadir$ac_delim
24830sysconfdir!$sysconfdir$ac_delim
24831sharedstatedir!$sharedstatedir$ac_delim
24832localstatedir!$localstatedir$ac_delim
24833includedir!$includedir$ac_delim
24834oldincludedir!$oldincludedir$ac_delim
24835docdir!$docdir$ac_delim
24836infodir!$infodir$ac_delim
24837htmldir!$htmldir$ac_delim
24838dvidir!$dvidir$ac_delim
24839pdfdir!$pdfdir$ac_delim
24840psdir!$psdir$ac_delim
24841libdir!$libdir$ac_delim
24842localedir!$localedir$ac_delim
24843mandir!$mandir$ac_delim
24844DEFS!$DEFS$ac_delim
24845ECHO_C!$ECHO_C$ac_delim
24846ECHO_N!$ECHO_N$ac_delim
24847ECHO_T!$ECHO_T$ac_delim
24848LIBS!$LIBS$ac_delim
24849build_alias!$build_alias$ac_delim
24850host_alias!$host_alias$ac_delim
24851target_alias!$target_alias$ac_delim
24852VERSION!$VERSION$ac_delim
24853SOVERSION!$SOVERSION$ac_delim
24854CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24855UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24856PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024857PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024858PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24859PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24860PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24861FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24862FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24863FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24864FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24865FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24866MACHDEP!$MACHDEP$ac_delim
24867SGI_ABI!$SGI_ABI$ac_delim
24868EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24869EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24870CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24871EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24872CC!$CC$ac_delim
24873CFLAGS!$CFLAGS$ac_delim
24874LDFLAGS!$LDFLAGS$ac_delim
24875CPPFLAGS!$CPPFLAGS$ac_delim
24876ac_ct_CC!$ac_ct_CC$ac_delim
24877EXEEXT!$EXEEXT$ac_delim
24878OBJEXT!$OBJEXT$ac_delim
24879CXX!$CXX$ac_delim
24880MAINCC!$MAINCC$ac_delim
24881CPP!$CPP$ac_delim
24882GREP!$GREP$ac_delim
24883EGREP!$EGREP$ac_delim
24884BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24885LIBRARY!$LIBRARY$ac_delim
24886LDLIBRARY!$LDLIBRARY$ac_delim
24887DLLLIBRARY!$DLLLIBRARY$ac_delim
24888BLDLIBRARY!$BLDLIBRARY$ac_delim
24889LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24890INSTSONAME!$INSTSONAME$ac_delim
24891RUNSHARED!$RUNSHARED$ac_delim
24892LINKCC!$LINKCC$ac_delim
24893RANLIB!$RANLIB$ac_delim
24894AR!$AR$ac_delim
24895SVNVERSION!$SVNVERSION$ac_delim
24896INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24897INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24898INSTALL_DATA!$INSTALL_DATA$ac_delim
24899LN!$LN$ac_delim
24900OPT!$OPT$ac_delim
24901BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024902UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24904LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24905SO!$SO$ac_delim
24906LDSHARED!$LDSHARED$ac_delim
24907BLDSHARED!$BLDSHARED$ac_delim
24908CCSHARED!$CCSHARED$ac_delim
24909LINKFORSHARED!$LINKFORSHARED$ac_delim
24910CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24911SHLIBS!$SHLIBS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024912_ACEOF
24913
24914 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24915 break
24916 elif $ac_last_try; then
24917 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24918echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24919 { (exit 1); exit 1; }; }
24920 else
24921 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024922 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024923done
24924
24925ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24926if test -n "$ac_eof"; then
24927 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24928 ac_eof=`expr $ac_eof + 1`
24929fi
24930
24931cat >>$CONFIG_STATUS <<_ACEOF
24932cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24933/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24934_ACEOF
24935sed '
24936s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24937s/^/s,@/; s/!/@,|#_!!_#|/
24938:n
24939t n
24940s/'"$ac_delim"'$/,g/; t
24941s/$/\\/; p
24942N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24943' >>$CONFIG_STATUS <conf$$subs.sed
24944rm -f conf$$subs.sed
24945cat >>$CONFIG_STATUS <<_ACEOF
24946CEOF$ac_eof
24947_ACEOF
24948
24949
24950ac_delim='%!_!# '
24951for ac_last_try in false false false false false :; do
24952 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024953USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024954SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024955USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24956LDLAST!$LDLAST$ac_delim
24957THREADOBJ!$THREADOBJ$ac_delim
24958DLINCLDIR!$DLINCLDIR$ac_delim
24959DYNLOADFILE!$DYNLOADFILE$ac_delim
24960MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24961TRUE!$TRUE$ac_delim
24962LIBOBJS!$LIBOBJS$ac_delim
24963HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24964HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24965HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24966HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24967HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24968LIBM!$LIBM$ac_delim
24969LIBC!$LIBC$ac_delim
24970UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24971THREADHEADERS!$THREADHEADERS$ac_delim
24972SRCDIRS!$SRCDIRS$ac_delim
24973LTLIBOBJS!$LTLIBOBJS$ac_delim
24974_ACEOF
24975
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024976 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 break
24978 elif $ac_last_try; then
24979 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24980echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24981 { (exit 1); exit 1; }; }
24982 else
24983 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24984 fi
24985done
24986
24987ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24988if test -n "$ac_eof"; then
24989 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24990 ac_eof=`expr $ac_eof + 1`
24991fi
24992
24993cat >>$CONFIG_STATUS <<_ACEOF
24994cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24995/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24996_ACEOF
24997sed '
24998s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24999s/^/s,@/; s/!/@,|#_!!_#|/
25000:n
25001t n
25002s/'"$ac_delim"'$/,g/; t
25003s/$/\\/; p
25004N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25005' >>$CONFIG_STATUS <conf$$subs.sed
25006rm -f conf$$subs.sed
25007cat >>$CONFIG_STATUS <<_ACEOF
25008:end
25009s/|#_!!_#|//g
25010CEOF$ac_eof
25011_ACEOF
25012
25013
25014# VPATH may cause trouble with some makes, so we remove $(srcdir),
25015# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25016# trailing colons and then remove the whole line if VPATH becomes empty
25017# (actually we leave an empty line to preserve line numbers).
25018if test "x$srcdir" = x.; then
25019 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25020s/:*\$(srcdir):*/:/
25021s/:*\${srcdir}:*/:/
25022s/:*@srcdir@:*/:/
25023s/^\([^=]*=[ ]*\):*/\1/
25024s/:*$//
25025s/^[^=]*=[ ]*$//
25026}'
25027fi
25028
25029cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025030fi # test -n "$CONFIG_FILES"
25031
Martin v. Löwiseba40652007-08-30 20:10:57 +000025032
25033for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25034do
25035 case $ac_tag in
25036 :[FHLC]) ac_mode=$ac_tag; continue;;
25037 esac
25038 case $ac_mode$ac_tag in
25039 :[FHL]*:*);;
25040 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25041echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25042 { (exit 1); exit 1; }; };;
25043 :[FH]-) ac_tag=-:-;;
25044 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25045 esac
25046 ac_save_IFS=$IFS
25047 IFS=:
25048 set x $ac_tag
25049 IFS=$ac_save_IFS
25050 shift
25051 ac_file=$1
25052 shift
25053
25054 case $ac_mode in
25055 :L) ac_source=$1;;
25056 :[FH])
25057 ac_file_inputs=
25058 for ac_f
25059 do
25060 case $ac_f in
25061 -) ac_f="$tmp/stdin";;
25062 *) # Look for the file first in the build tree, then in the source tree
25063 # (if the path is not absolute). The absolute path cannot be DOS-style,
25064 # because $ac_f cannot contain `:'.
25065 test -f "$ac_f" ||
25066 case $ac_f in
25067 [\\/$]*) false;;
25068 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25069 esac ||
25070 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25071echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25072 { (exit 1); exit 1; }; };;
25073 esac
25074 ac_file_inputs="$ac_file_inputs $ac_f"
25075 done
25076
25077 # Let's still pretend it is `configure' which instantiates (i.e., don't
25078 # use $as_me), people would be surprised to read:
25079 # /* config.h. Generated by config.status. */
25080 configure_input="Generated from "`IFS=:
25081 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25082 if test x"$ac_file" != x-; then
25083 configure_input="$ac_file. $configure_input"
25084 { echo "$as_me:$LINENO: creating $ac_file" >&5
25085echo "$as_me: creating $ac_file" >&6;}
25086 fi
25087
25088 case $ac_tag in
25089 *:-:* | *:-) cat >"$tmp/stdin";;
25090 esac
25091 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025092 esac
25093
Martin v. Löwiseba40652007-08-30 20:10:57 +000025094 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025095$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025096 X"$ac_file" : 'X\(//\)[^/]' \| \
25097 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025099echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25101 s//\1/
25102 q
25103 }
25104 /^X\(\/\/\)[^/].*/{
25105 s//\1/
25106 q
25107 }
25108 /^X\(\/\/\)$/{
25109 s//\1/
25110 q
25111 }
25112 /^X\(\/\).*/{
25113 s//\1/
25114 q
25115 }
25116 s/.*/./; q'`
25117 { as_dir="$ac_dir"
25118 case $as_dir in #(
25119 -*) as_dir=./$as_dir;;
25120 esac
25121 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025122 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123 while :; do
25124 case $as_dir in #(
25125 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25126 *) as_qdir=$as_dir;;
25127 esac
25128 as_dirs="'$as_qdir' $as_dirs"
25129 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025130$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025131 X"$as_dir" : 'X\(//\)[^/]' \| \
25132 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025133 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025134echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25136 s//\1/
25137 q
25138 }
25139 /^X\(\/\/\)[^/].*/{
25140 s//\1/
25141 q
25142 }
25143 /^X\(\/\/\)$/{
25144 s//\1/
25145 q
25146 }
25147 /^X\(\/\).*/{
25148 s//\1/
25149 q
25150 }
25151 s/.*/./; q'`
25152 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025153 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154 test -z "$as_dirs" || eval "mkdir $as_dirs"
25155 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25156echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025157 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 ac_builddir=.
25159
Martin v. Löwiseba40652007-08-30 20:10:57 +000025160case "$ac_dir" in
25161.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25162*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025163 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025164 # A ".." for each directory in $ac_dir_suffix.
25165 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25166 case $ac_top_builddir_sub in
25167 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25168 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25169 esac ;;
25170esac
25171ac_abs_top_builddir=$ac_pwd
25172ac_abs_builddir=$ac_pwd$ac_dir_suffix
25173# for backward compatibility:
25174ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025175
25176case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025177 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025178 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 ac_top_srcdir=$ac_top_builddir_sub
25180 ac_abs_top_srcdir=$ac_pwd ;;
25181 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025182 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 ac_top_srcdir=$srcdir
25184 ac_abs_top_srcdir=$srcdir ;;
25185 *) # Relative name.
25186 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25187 ac_top_srcdir=$ac_top_build_prefix$srcdir
25188 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025189esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025190ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025191
Martin v. Löwis11437992002-04-12 09:54:03 +000025192
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193 case $ac_mode in
25194 :F)
25195 #
25196 # CONFIG_FILE
25197 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025198
25199 case $INSTALL in
25200 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025201 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025202 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025203_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204
25205cat >>$CONFIG_STATUS <<\_ACEOF
25206# If the template does not know about datarootdir, expand it.
25207# FIXME: This hack should be removed a few years after 2.60.
25208ac_datarootdir_hack=; ac_datarootdir_seen=
25209
25210case `sed -n '/datarootdir/ {
25211 p
25212 q
25213}
25214/@datadir@/p
25215/@docdir@/p
25216/@infodir@/p
25217/@localedir@/p
25218/@mandir@/p
25219' $ac_file_inputs` in
25220*datarootdir*) ac_datarootdir_seen=yes;;
25221*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25222 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25223echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25224_ACEOF
25225cat >>$CONFIG_STATUS <<_ACEOF
25226 ac_datarootdir_hack='
25227 s&@datadir@&$datadir&g
25228 s&@docdir@&$docdir&g
25229 s&@infodir@&$infodir&g
25230 s&@localedir@&$localedir&g
25231 s&@mandir@&$mandir&g
25232 s&\\\${datarootdir}&$datarootdir&g' ;;
25233esac
25234_ACEOF
25235
25236# Neutralize VPATH when `$srcdir' = `.'.
25237# Shell code in configure.ac might set extrasub.
25238# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025239cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025240 sed "$ac_vpsub
25241$extrasub
25242_ACEOF
25243cat >>$CONFIG_STATUS <<\_ACEOF
25244:t
25245/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025246s&@configure_input@&$configure_input&;t t
25247s&@top_builddir@&$ac_top_builddir_sub&;t t
25248s&@srcdir@&$ac_srcdir&;t t
25249s&@abs_srcdir@&$ac_abs_srcdir&;t t
25250s&@top_srcdir@&$ac_top_srcdir&;t t
25251s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25252s&@builddir@&$ac_builddir&;t t
25253s&@abs_builddir@&$ac_abs_builddir&;t t
25254s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25255s&@INSTALL@&$ac_INSTALL&;t t
25256$ac_datarootdir_hack
25257" $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 +000025258
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25260 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25261 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25262 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25263which seems to be undefined. Please make sure it is defined." >&5
25264echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25265which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025266
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269 -) cat "$tmp/out"; rm -f "$tmp/out";;
25270 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025271 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025272 ;;
25273 :H)
25274 #
25275 # CONFIG_HEADER
25276 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025278
Martin v. Löwiseba40652007-08-30 20:10:57 +000025279# Transform confdefs.h into a sed script `conftest.defines', that
25280# substitutes the proper values into config.h.in to produce config.h.
25281rm -f conftest.defines conftest.tail
25282# First, append a space to every undef/define line, to ease matching.
25283echo 's/$/ /' >conftest.defines
25284# Then, protect against being on the right side of a sed subst, or in
25285# an unquoted here document, in config.status. If some macros were
25286# called several times there might be several #defines for the same
25287# symbol, which is useless. But do not sort them, since the last
25288# AC_DEFINE must be honored.
25289ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25290# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25291# NAME is the cpp macro being defined, VALUE is the value it is being given.
25292# PARAMS is the parameter list in the macro definition--in most cases, it's
25293# just an empty string.
25294ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25295ac_dB='\\)[ (].*,\\1define\\2'
25296ac_dC=' '
25297ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025298
Martin v. Löwiseba40652007-08-30 20:10:57 +000025299uniq confdefs.h |
25300 sed -n '
25301 t rset
25302 :rset
25303 s/^[ ]*#[ ]*define[ ][ ]*//
25304 t ok
25305 d
25306 :ok
25307 s/[\\&,]/\\&/g
25308 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25309 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25310 ' >>conftest.defines
25311
25312# Remove the space that was appended to ease matching.
25313# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025314# example, in the case of _POSIX_SOURCE, which is predefined and required
25315# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316# (The regexp can be short, since the line contains either #define or #undef.)
25317echo 's/ $//
25318s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025319
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320# Break up conftest.defines:
25321ac_max_sed_lines=50
25322
25323# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25324# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25325# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25326# et cetera.
25327ac_in='$ac_file_inputs'
25328ac_out='"$tmp/out1"'
25329ac_nxt='"$tmp/out2"'
25330
25331while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025332do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333 # Write a here document:
25334 cat >>$CONFIG_STATUS <<_ACEOF
25335 # First, check the format of the line:
25336 cat >"\$tmp/defines.sed" <<\\CEOF
25337/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25338/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25339b
25340:def
25341_ACEOF
25342 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025343 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025344 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25345 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25346 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25347 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 rm -f conftest.defines
25349 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025350done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025352
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025354cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 echo "/* $configure_input */" >"$tmp/config.h"
25357 cat "$ac_result" >>"$tmp/config.h"
25358 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25360echo "$as_me: $ac_file is unchanged" >&6;}
25361 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025363 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025364 fi
25365 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 echo "/* $configure_input */"
25367 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025368 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025369 rm -f "$tmp/out12"
25370 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025371
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372
25373 esac
25374
25375done # for ac_tag
25376
Guido van Rossum627b2d71993-12-24 10:39:16 +000025377
Martin v. Löwis11437992002-04-12 09:54:03 +000025378{ (exit 0); exit 0; }
25379_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025380chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025381ac_clean_files=$ac_clean_files_save
25382
25383
25384# configure is writing to config.log, and then calls config.status.
25385# config.status does its own redirection, appending to config.log.
25386# Unfortunately, on DOS this fails, as config.log is still kept open
25387# by configure, so config.status won't be able to write to it; its
25388# output is simply discarded. So we exec the FD to /dev/null,
25389# effectively closing config.log, so it can be properly (re)opened and
25390# appended to by config.status. When coming back to configure, we
25391# need to make the FD available again.
25392if test "$no_create" != yes; then
25393 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025394 ac_config_status_args=
25395 test "$silent" = yes &&
25396 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025398 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 exec 5>>config.log
25400 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25401 # would make configure fail if this is the last instruction.
25402 $ac_cs_success || { (exit 1); exit 1; }
25403fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025404
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025405
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025406echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025407if test ! -f Modules/Setup
25408then
25409 cp $srcdir/Modules/Setup.dist Modules/Setup
25410fi
25411
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025412echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025413if test ! -f Modules/Setup.local
25414then
25415 echo "# Edit this file for local setup changes" >Modules/Setup.local
25416fi
25417
25418echo "creating Makefile"
25419$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25420 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025421 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025422
25423case $ac_sys_system in
25424BeOS)
25425 { echo "$as_me:$LINENO: WARNING:
25426
25427 Support for BeOS is deprecated as of Python 2.6.
25428 See PEP 11 for the gory details.
25429 " >&5
25430echo "$as_me: WARNING:
25431
25432 Support for BeOS is deprecated as of Python 2.6.
25433 See PEP 11 for the gory details.
25434 " >&2;}
25435 ;;
25436*) ;;
25437esac
25438
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025439mv config.c Modules